diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..8225bffb8f --- /dev/null +++ b/.gitignore @@ -0,0 +1,308 @@ +build/ +subprojects/ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..c61aa7a529 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1 @@ +include: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/master/gitlab/ci_template.yml" diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000..e5ab03e123 --- /dev/null +++ b/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000000..e69de29bb2 diff --git a/README.md b/README.md new file mode 100644 index 0000000000..864f069ef0 --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +gstreamer-sharp +========= + +gstreamer-sharp is a .NET/mono binding for Gstreamer +generated from gobject-introspection data using the [bindinator]. +gstreamer-sharp currently wraps the API exposed by Gstreamer 1.12 +and is compatible with newer gstreamer versions. It was developed +under GSoC 2014 for the mono organization. gstreamer-sharp covers +the core and base gstreamer libraries. + +Prerequisites +---- +These libraries are needed for gstreamer-sharp to compile: +* gstreamer core, base and good 1.14 or higher +* [gtk-sharp] 3.22.0 or higher - *NOTE: This can be built as a meson subproject.* + +You will also need various .NET/mono bits (mcs and al). On debian-based distros +you can install these with: + + sudo apt-get install mono-mcs mono-devel + +Building +---- + + meson build && ninja -C build/ + +Installing +---- + +This package is not installed as part of the system. It should either +be built into a Nuget or used as a subproject like this. For example, +with meson, one would use it like this: + + + subproject('gstreamer-sharp', default_options: ['install=false']) + gst_sharp = subproject('gstreamer-sharp') + gst_sharp_dep = gst_sharp.get_variable('gst_sharp_dep') + + +HACKING +------- + +While hacking on the code generator or the `.metadata` files, you will +need to force code regeneration with `ninja update-code`, a full rebuild +is triggered right after. + +Updating to new GStreamer version +-------------------------------- + +Make sure you are in an environement where latest `.gir` files are available (either installed +or through the `$GI_TYPELIB_PATH` env var), those files are automatically copied to `girs/`. + + ninja -C build update-all + +or if using gst-build, start gst-env and then run + + ninja -C build gstreamer-sharp@@update-all + +* Verify newly copied gir files in `girs/` and `git add` them +* Verify newly generated code and `git add` files in `sources/generated/` and `ges/generated` +* Commit + +Supported Platforms +---- +* Linux +* Mac OS X + +Quick Start +---- +gstreamer-sharp provides ports of all samples from gst-docs in the samples folder. + +Documentation +---- + +Since this is a gobject-introspection binding the recommended documentation is +the native [gstreamer] documentation. A monodoc generated documentation will be installed. + +Roadmap +---- +* Add an easy way to compile on Windows +* iOS and Android support +* Provide binaries for these platforms + +License +---- +gstreamer-sharp is licensed under the [LGPL 2.1](https://www.gnu.org/licenses/lgpl-2.1.html) + +[bindinator]:https://github.com/GLibSharp/bindinator +[gtk-sharp]:https://github.com/GLibSharp/GtkSharp +[gstreamer]: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/ diff --git a/Tests/SdpTests.cs b/Tests/SdpTests.cs new file mode 100644 index 0000000000..675e8b3b19 --- /dev/null +++ b/Tests/SdpTests.cs @@ -0,0 +1,44 @@ +// Copyright (C) 2018 Thibault Saunier +// +// 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 + +using NUnit.Framework; +using System; +using Gst; +using Gst.Sdp; + +namespace GstSharp.Tests +{ + [TestFixture] + public class SdpTests : TestBase + { + [Test] + public void TesSdpMessage() + { + Gst.Application.Init(); + Gst.Sdp.SDPMessage msg; + var res = Gst.Sdp.SDPMessage.New(out msg); + + Assert.AreEqual(res, Gst.Sdp.SDPResult.Ok); + + var uri = "udp://nothing.com"; + msg.SetUri(uri); + Assert.AreEqual(msg.Uri, uri); + } + + } +} + diff --git a/Tests/TestBase.cs b/Tests/TestBase.cs new file mode 100644 index 0000000000..e0cabcc635 --- /dev/null +++ b/Tests/TestBase.cs @@ -0,0 +1,53 @@ +// Copyright (C) 2018 Collabora Ltd. +// Author: Justin Kim +// +// 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 + +using Gst; +using System.Threading; +using NUnit.Framework; + +namespace GstSharp.Tests +{ + [TestFixture] + public abstract class TestBase + { + GLib.MainLoop mainLoop; + Thread thread; + + void Run(object o) + { + GLib.MainContext context = new GLib.MainContext(); + mainLoop = new GLib.MainLoop(context); + } + + [SetUp] + public void BaseSetUp() + { + Assert.IsTrue(Application.InitCheck()); + + thread = new Thread(Run); + thread.Start(); + } + + [TearDown] + public void BaseTearDown() + { + mainLoop.Quit(); + thread.Join(); + } + } +} diff --git a/Tests/meson.build b/Tests/meson.build new file mode 100644 index 0000000000..a7052bcf7a --- /dev/null +++ b/Tests/meson.build @@ -0,0 +1,53 @@ +nunit_console = find_program('nunit-console', 'nunitlite-runner', required: get_option('tests')) + +if nunit_console.found() + nunit_tests_env = environment() + # FIXME: port this to macOS and Windows + nunit_tests_env.prepend('LD_LIBRARY_PATH', testsenv_ld_library_path) + + nunit_version = '3.10.1' + get_nunit_res = run_command(nuget, 'get', + '--builddir=NUnit', + '--nuget-name=NUnit', + '--nuget-version', nunit_version, + '--csharp-version=net45', + '--current-builddir', meson.current_build_dir(), + '--builddir', meson.build_root(), + ) + + + nunit_mono_path = [] + nunit_dep = dependency('mono-nunit', required: false, version: ['>=2.6', '< 2.7']) + if not nunit_dep.found() + if get_nunit_res.returncode() != 0 + message('Failed to get NUnit: ' + get_nunit_res.stderr()) + else + foreach path: get_nunit_res.stdout().split() + nunit_mono_path += [join_paths(meson.build_root(), path.strip('-r:'), '..')] + endforeach + + nunit_dep = declare_dependency(link_args: get_nunit_res.stdout().split(), + version: nunit_version) + endif + endif + + if nunit_mono_path.length() > 0 + nunit_tests_env.prepend('MONO_PATH', nunit_mono_path + mono_path) + else + nunit_tests_env.prepend('MONO_PATH', mono_path) + endif + + if nunit_dep.found() + foreach test: [ + # 'PipelineTests', + 'SdpTests' + ] + lib = shared_library(test, test + '.cs', 'TestBase.cs', + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114'], + dependencies: [gst_sharp_dep, nunit_dep]) + test(test, nunit_console, args: [lib.full_path()], env: nunit_tests_env) + endforeach + endif +else + message('Could not find nunit-console, can\'t run unitests') +endif \ No newline at end of file diff --git a/Tests/test_abi.py b/Tests/test_abi.py new file mode 100755 index 0000000000..838801cab6 --- /dev/null +++ b/Tests/test_abi.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import difflib +import sys +import shutil +import subprocess + +reference_abi = subprocess.check_output(sys.argv[1]).decode().split("\n") +launcher = [] +if shutil.which("mono"): + launcher = ["mono", "--debug"] +csharp_abi = subprocess.check_output(launcher + [sys.argv[2]]).decode().split("\n") +print("Comparing output of %s and %s" % (sys.argv[1], sys.argv[2])) + +res = 0 +for line in difflib.unified_diff(reference_abi, csharp_abi): + res = 1 + print(line) + +if res: + files = [(sys.argv[1] + ".res", reference_abi), + (sys.argv[2] + 'res', csharp_abi)] + + for f, vals in files: + with open(f, "w") as _f: + print("Outputing results in " + f) + _f.write("\n".join(vals)) +sys.exit(res) diff --git a/gacutil_install.py b/gacutil_install.py new file mode 100644 index 0000000000..48ef320b24 --- /dev/null +++ b/gacutil_install.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import os +import sys +import subprocess + +outdir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], 'lib') +builddir = os.environ['MESON_BUILD_ROOT'] + +for i in range(1, len(sys.argv), 2): + assembly_name, fname = sys.argv[i], os.path.join(builddir, sys.argv[i + 1]) + + cmd = ['gacutil', '/i', fname, '/f', '/package', assembly_name, '/root', outdir] + print('(%s) Running %s' % (os.path.abspath(os.path.curdir), ' '.join(cmd))) + subprocess.check_call(cmd) diff --git a/generate_code.py b/generate_code.py new file mode 100644 index 0000000000..df9c395b3e --- /dev/null +++ b/generate_code.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 + +import argparse +import glob +import os +import re +import shutil +import subprocess + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--api-raw") + parser.add_argument("--gapi-fixup") + parser.add_argument("--metadata") + parser.add_argument("--gapi-codegen") + parser.add_argument("--abi-includes", default="") + parser.add_argument("--abi-cs-usings", default="") + parser.add_argument("--assembly-name") + parser.add_argument("--extra-includes", action='append', default=[]) + parser.add_argument("--out") + parser.add_argument("--files") + parser.add_argument("--symbols") + parser.add_argument("--schema") + parser.add_argument("--fake", action='store_true') + + opts = parser.parse_args() + if opts.fake: + exit(0) + + api_xml = os.path.join(opts.out, os.path.basename( + opts.api_raw).replace('.raw', '.xml')) + + shutil.copyfile(opts.api_raw, api_xml) + + if shutil.which('mono'): + launcher = ['mono', '--debug'] + else: + launcher = [] + + cmd = [opts.gapi_fixup, "--api=" + api_xml] + if opts.metadata: + cmd += ["--metadata=" + opts.metadata] + if opts.symbols: + cmd.extend(['--symbols=' + opts.symbols]) + subprocess.check_call(launcher + cmd) + + cmd = [ + opts.gapi_codegen, '--generate', api_xml, + '--outdir=' + opts.out, + '--assembly-name=' + opts.assembly_name, + '--glue-includes=' + opts.abi_includes, + '--abi-c-filename=' + + os.path.join(opts.out, opts.assembly_name + "-abi.c"), + '--abi-cs-filename=' + + os.path.join(opts.out, opts.assembly_name + "-abi.cs"), + ] + + if opts.schema: + cmd += ['--schema=' + opts.schema] + + if opts.abi_cs_usings: + cmd += ['--abi-cs-usings=' + opts.abi_cs_usings] + + cmd += ['-I' + i for i in opts.extra_includes] + + subprocess.check_call(launcher + cmd) + + # WORKAROUND: Moving files into the out directory with special names + # as meson doesn't like path separator in output names. + regex = re.compile('_') + dirs = set() + expected_files = set(opts.files.split(';')) + for _f in expected_files: + dirs.add(os.path.dirname(_f)) + + generated = set(glob.glob(os.path.join('*/*.cs'))) + rcode = 0 + not_listed = generated - expected_files + if not_listed: + print("Following files were generated but not listed:\n %s" % + '\n '.join(["'%s/%s'," % (m.split(os.path.sep)[-2], m.split(os.path.sep)[-1]) + for m in not_listed])) + rcode = 1 + + not_generated = expected_files - generated + if not_generated: + print("Following files were generated but not listed:\n %s" % + '\n '.join(["'%s/%s'," % (m.split(os.path.sep)[-2], m.split(os.path.sep)[-1]) + for m in not_generated])) + rcode = 1 + + if rcode == 1: + generated = sorted(list(generated)) + print("List of files to use in `meson.build`:\n %s" % + '\n '.join(["'%s/%s'," % (m.split(os.path.sep)[-2], m.split(os.path.sep)[-1]) + for m in generated])) + + exit(rcode) diff --git a/ges/generated/GES/Asset.cs b/ges/generated/GES/Asset.cs new file mode 100644 index 0000000000..69860a5ac7 --- /dev/null +++ b/ges/generated/GES/Asset.cs @@ -0,0 +1,1032 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Asset : GLib.Object, GES.IMetaContainer, GLib.IAsyncInitable, GLib.IInitable { + + public Asset (IntPtr raw) : base(raw) {} + + protected Asset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_get_extractable_type(IntPtr raw); + + [GLib.Property ("extractable-type")] + public GLib.GType ExtractableType { + get { + IntPtr raw_ret = ges_asset_get_extractable_type(Handle); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_get_id(IntPtr raw); + + [GLib.Property ("id")] + public string Id { + get { + IntPtr raw_ret = ges_asset_get_id(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_get_proxy(IntPtr raw); + + [GLib.Property ("proxy")] + public GES.Asset Proxy { + get { + IntPtr raw_ret = ges_asset_get_proxy(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("proxy", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_get_proxy_target(IntPtr raw); + + [GLib.Property ("proxy-target")] + public GES.Asset ProxyTarget { + get { + IntPtr raw_ret = ges_asset_get_proxy_target(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + static StartLoadingNativeDelegate StartLoading_cb_delegate; + static StartLoadingNativeDelegate StartLoadingVMCallback { + get { + if (StartLoading_cb_delegate == null) + StartLoading_cb_delegate = new StartLoadingNativeDelegate (StartLoading_cb); + return StartLoading_cb_delegate; + } + } + + static void OverrideStartLoading (GLib.GType gtype) + { + OverrideStartLoading (gtype, StartLoadingVMCallback); + } + + static void OverrideStartLoading (GLib.GType gtype, StartLoadingNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start_loading")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int StartLoadingNativeDelegate (IntPtr inst, out IntPtr error); + + static int StartLoading_cb (IntPtr inst, out IntPtr error) + { + error = IntPtr.Zero; + + try { + Asset __obj = GLib.Object.GetObject (inst, false) as Asset; + GES.AssetLoadingReturn __result; + __result = __obj.OnStartLoading (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Asset), ConnectionMethod="OverrideStartLoading")] + protected virtual GES.AssetLoadingReturn OnStartLoading () + { + return InternalStartLoading (); + } + + private GES.AssetLoadingReturn InternalStartLoading () + { + StartLoadingNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start_loading")); + unmanaged = (StartLoadingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartLoadingNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr error = IntPtr.Zero; + int __result = unmanaged (this.Handle, out error); + return (GES.AssetLoadingReturn) __result; + } + + static ExtractNativeDelegate Extract_cb_delegate; + static ExtractNativeDelegate ExtractVMCallback { + get { + if (Extract_cb_delegate == null) + Extract_cb_delegate = new ExtractNativeDelegate (Extract_cb); + return Extract_cb_delegate; + } + } + + static void OverrideExtract (GLib.GType gtype) + { + OverrideExtract (gtype, ExtractVMCallback); + } + + static void OverrideExtract (GLib.GType gtype, ExtractNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("extract")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ExtractNativeDelegate (IntPtr inst, out IntPtr error); + + static IntPtr Extract_cb (IntPtr inst, out IntPtr error) + { + error = IntPtr.Zero; + + try { + Asset __obj = GLib.Object.GetObject (inst, false) as Asset; + GES.IExtractable __result; + __result = __obj.OnExtract (); + return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GES.ExtractableAdapter).Handle); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Asset), ConnectionMethod="OverrideExtract")] + protected virtual GES.IExtractable OnExtract () + { + return InternalExtract (); + } + + private GES.IExtractable InternalExtract () + { + ExtractNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("extract")); + unmanaged = (ExtractNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ExtractNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr error = IntPtr.Zero; + IntPtr __result = unmanaged (this.Handle, out error); + return GES.ExtractableAdapter.GetObject (__result, false); + } + + static InformProxyNativeDelegate InformProxy_cb_delegate; + static InformProxyNativeDelegate InformProxyVMCallback { + get { + if (InformProxy_cb_delegate == null) + InformProxy_cb_delegate = new InformProxyNativeDelegate (InformProxy_cb); + return InformProxy_cb_delegate; + } + } + + static void OverrideInformProxy (GLib.GType gtype) + { + OverrideInformProxy (gtype, InformProxyVMCallback); + } + + static void OverrideInformProxy (GLib.GType gtype, InformProxyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("inform_proxy")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void InformProxyNativeDelegate (IntPtr inst, IntPtr proxy_id); + + static void InformProxy_cb (IntPtr inst, IntPtr proxy_id) + { + try { + Asset __obj = GLib.Object.GetObject (inst, false) as Asset; + __obj.OnInformProxy (GLib.Marshaller.Utf8PtrToString (proxy_id)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Asset), ConnectionMethod="OverrideInformProxy")] + protected virtual void OnInformProxy (string proxy_id) + { + InternalInformProxy (proxy_id); + } + + private void InternalInformProxy (string proxy_id) + { + InformProxyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("inform_proxy")); + unmanaged = (InformProxyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(InformProxyNativeDelegate)); + } + if (unmanaged == null) return; + + IntPtr native_proxy_id = GLib.Marshaller.StringToPtrGStrdup (proxy_id); + unmanaged (this.Handle, native_proxy_id); + GLib.Marshaller.Free (native_proxy_id); + } + + static ProxiedNativeDelegate Proxied_cb_delegate; + static ProxiedNativeDelegate ProxiedVMCallback { + get { + if (Proxied_cb_delegate == null) + Proxied_cb_delegate = new ProxiedNativeDelegate (Proxied_cb); + return Proxied_cb_delegate; + } + } + + static void OverrideProxied (GLib.GType gtype) + { + OverrideProxied (gtype, ProxiedVMCallback); + } + + static void OverrideProxied (GLib.GType gtype, ProxiedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("proxied")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ProxiedNativeDelegate (IntPtr inst, IntPtr proxy); + + static void Proxied_cb (IntPtr inst, IntPtr proxy) + { + try { + Asset __obj = GLib.Object.GetObject (inst, false) as Asset; + __obj.OnProxied (GLib.Object.GetObject(proxy) as GES.Asset); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Asset), ConnectionMethod="OverrideProxied")] + protected virtual void OnProxied (GES.Asset proxy) + { + InternalProxied (proxy); + } + + private void InternalProxied (GES.Asset proxy) + { + ProxiedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("proxied")); + unmanaged = (ProxiedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProxiedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, proxy == null ? IntPtr.Zero : proxy.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("start_loading" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start_loading + , null + , "extract" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("extract" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // extract + , "start_loading" + , "inform_proxy" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("inform_proxy" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // inform_proxy + , "extract" + , "proxied" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("proxied" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // proxied + , "inform_proxy" + , "request_id_update" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("request_id_update" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // request_id_update + , "proxied" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "request_id_update" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_asset_needs_reload(IntPtr extractable_type, IntPtr id); + + public static bool NeedsReload(GLib.GType extractable_type, string id) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + bool raw_ret = ges_asset_needs_reload(extractable_type.Val, native_id); + bool ret = raw_ret; + GLib.Marshaller.Free (native_id); + return ret; + } + + public static bool NeedsReload(GLib.GType extractable_type) { + return NeedsReload (extractable_type, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_asset_request(IntPtr extractable_type, IntPtr id, out IntPtr error); + + public static unsafe GES.Asset Request(GLib.GType extractable_type, string id) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_asset_request(extractable_type.Val, native_id, out error); + GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset; + GLib.Marshaller.Free (native_id); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static GES.Asset Request(GLib.GType extractable_type) { + return Request (extractable_type, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_asset_request_async(IntPtr extractable_type, IntPtr id, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data); + + public static void RequestAsync(GLib.GType extractable_type, string id, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb); + cb_wrapper.PersistUntilCalled (); + ges_asset_request_async(extractable_type.Val, native_id, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); + GLib.Marshaller.Free (native_id); + } + + public static void RequestAsync(GLib.GType extractable_type) { + RequestAsync (extractable_type, null, null, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_asset_request_finish(IntPtr res, out IntPtr error); + + public static unsafe GES.Asset RequestFinish(GLib.IAsyncResult res) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_asset_request_finish(res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), out error); + GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_asset_extract(IntPtr raw, out IntPtr error); + + public unsafe GES.IExtractable Extract() { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_asset_extract(Handle, out error); + GES.IExtractable ret = GES.ExtractableAdapter.GetObject (raw_ret, false); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_asset_list_proxies(IntPtr raw); + + public GES.Asset[] ListProxies() { + IntPtr raw_ret = ges_asset_list_proxies(Handle); + GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GES.Asset)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_asset_set_proxy(IntPtr raw, IntPtr proxy); + + public bool SetProxy(GES.Asset proxy) { + bool raw_ret = ges_asset_set_proxy(Handle, proxy == null ? IntPtr.Zero : proxy.Handle); + bool ret = raw_ret; + return ret; + } + + public bool SetProxy() { + return SetProxy (null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_asset_unproxy(IntPtr raw, IntPtr proxy); + + public bool Unproxy(GES.Asset proxy) { + bool raw_ret = ges_asset_unproxy(Handle, proxy == null ? IntPtr.Zero : proxy.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.Asset __obj = GLib.Object.GetObject (inst, false) as GES.Asset; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Asset), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_async_initable_init_async(IntPtr raw, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data); + + public void InitAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) { + GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb); + cb_wrapper.PersistUntilCalled (); + g_async_initable_init_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool g_async_initable_init_finish(IntPtr raw, IntPtr res, out IntPtr error); + + public bool InitFinish(GLib.IAsyncResult res) { + IntPtr error = IntPtr.Zero; + bool raw_ret = g_async_initable_init_finish(Handle, res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool g_initable_init(IntPtr raw, IntPtr cancellable, out IntPtr error); + + public bool Init(GLib.Cancellable cancellable) { + IntPtr error = IntPtr.Zero; + bool raw_ret = g_initable_init(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static Asset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/AssetAddedHandler.cs b/ges/generated/GES/AssetAddedHandler.cs new file mode 100644 index 0000000000..bebc548661 --- /dev/null +++ b/ges/generated/GES/AssetAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void AssetAddedHandler(object o, AssetAddedArgs args); + + public class AssetAddedArgs : GLib.SignalArgs { + public GES.Asset Asset{ + get { + return (GES.Asset) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/AssetLoadingHandler.cs b/ges/generated/GES/AssetLoadingHandler.cs new file mode 100644 index 0000000000..61f8ad7645 --- /dev/null +++ b/ges/generated/GES/AssetLoadingHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void AssetLoadingHandler(object o, AssetLoadingArgs args); + + public class AssetLoadingArgs : GLib.SignalArgs { + public GES.Asset Asset{ + get { + return (GES.Asset) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/AssetLoadingReturn.cs b/ges/generated/GES/AssetLoadingReturn.cs new file mode 100644 index 0000000000..71d0ff5fc9 --- /dev/null +++ b/ges/generated/GES/AssetLoadingReturn.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum AssetLoadingReturn { + + Error = 0, + Async = 1, + Ok = 2, + } +#endregion +} diff --git a/ges/generated/GES/AssetRemovedHandler.cs b/ges/generated/GES/AssetRemovedHandler.cs new file mode 100644 index 0000000000..b3c02775e3 --- /dev/null +++ b/ges/generated/GES/AssetRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void AssetRemovedHandler(object o, AssetRemovedArgs args); + + public class AssetRemovedArgs : GLib.SignalArgs { + public GES.Asset Asset{ + get { + return (GES.Asset) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/AudioSource.cs b/ges/generated/GES/AudioSource.cs new file mode 100644 index 0000000000..c564906e0d --- /dev/null +++ b/ges/generated/GES/AudioSource.cs @@ -0,0 +1,103 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioSource : GES.Source { + + protected AudioSource (IntPtr raw) : base(raw) {} + + protected AudioSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_source" + , GES.Source.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_source + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "create_source" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_audio_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Source.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/AudioTestSource.cs b/ges/generated/GES/AudioTestSource.cs new file mode 100644 index 0000000000..3b58e63d18 --- /dev/null +++ b/ges/generated/GES/AudioTestSource.cs @@ -0,0 +1,129 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioTestSource : GES.AudioSource { + + public AudioTestSource (IntPtr raw) : base(raw) {} + + protected AudioTestSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.AudioSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_test_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_audio_test_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_audio_test_source_get_freq(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_audio_test_source_set_freq(IntPtr raw, double freq); + + public double Freq { + get { + double raw_ret = ges_audio_test_source_get_freq(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_audio_test_source_set_freq(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_audio_test_source_get_volume(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_audio_test_source_set_volume(IntPtr raw, double volume); + + public double Volume { + get { + double raw_ret = ges_audio_test_source_get_volume(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_audio_test_source_set_volume(Handle, value); + } + } + + + static AudioTestSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.AudioSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/AudioTrack.cs b/ges/generated/GES/AudioTrack.cs new file mode 100644 index 0000000000..3ed84c52a6 --- /dev/null +++ b/ges/generated/GES/AudioTrack.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioTrack : GES.Track { + + public AudioTrack (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_track_new(); + + public AudioTrack () : base (IntPtr.Zero) + { + if (GetType () != typeof (AudioTrack)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_audio_track_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Track.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_track_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_audio_track_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioTrack () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Track.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/AudioTransition.cs b/ges/generated/GES/AudioTransition.cs new file mode 100644 index 0000000000..bdef0fb249 --- /dev/null +++ b/ges/generated/GES/AudioTransition.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioTransition : GES.Transition { + + public AudioTransition (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_transition_new(); + + public AudioTransition () : base (IntPtr.Zero) + { + if (GetType () != typeof (AudioTransition)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_audio_transition_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Transition.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_transition_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_audio_transition_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioTransition () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Transition.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/AudioUriSource.cs b/ges/generated/GES/AudioUriSource.cs new file mode 100644 index 0000000000..050b6b4590 --- /dev/null +++ b/ges/generated/GES/AudioUriSource.cs @@ -0,0 +1,113 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioUriSource : GES.AudioSource { + + public AudioUriSource (IntPtr raw) : base(raw) {} + + protected AudioUriSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("uri")] + public string Uri { + get { + GLib.Value val = GetProperty ("uri"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.AudioSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_audio_uri_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_audio_uri_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioUriSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("uri" + , GES.AudioSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "uri" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/BaseEffect.cs b/ges/generated/GES/BaseEffect.cs new file mode 100644 index 0000000000..d3bf948d4e --- /dev/null +++ b/ges/generated/GES/BaseEffect.cs @@ -0,0 +1,117 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseEffect : GES.Operation { + + protected BaseEffect (IntPtr raw) : base(raw) {} + + protected BaseEffect() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Operation.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_base_effect_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_base_effect_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_base_effect_is_time_effect(IntPtr raw); + + public bool IsTimeEffect { + get { + bool raw_ret = ges_base_effect_is_time_effect(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_base_effect_register_time_property(IntPtr raw, IntPtr child_property_name); + + public bool RegisterTimeProperty(string child_property_name) { + IntPtr native_child_property_name = GLib.Marshaller.StringToPtrGStrdup (child_property_name); + bool raw_ret = ges_base_effect_register_time_property(Handle, native_child_property_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_child_property_name); + return ret; + } + + + static BaseEffect () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Operation.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/BaseEffectClip.cs b/ges/generated/GES/BaseEffectClip.cs new file mode 100644 index 0000000000..dded25483f --- /dev/null +++ b/ges/generated/GES/BaseEffectClip.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseEffectClip : GES.OperationClip { + + protected BaseEffectClip (IntPtr raw) : base(raw) {} + + protected BaseEffectClip() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.OperationClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_base_effect_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_base_effect_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static BaseEffectClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.OperationClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/BaseEffectTimeTranslationFunc.cs b/ges/generated/GES/BaseEffectTimeTranslationFunc.cs new file mode 100644 index 0000000000..7ab5f205fe --- /dev/null +++ b/ges/generated/GES/BaseEffectTimeTranslationFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate ulong BaseEffectTimeTranslationFunc(GES.BaseEffect effect, ulong time, System.IntPtr time_property_values); + +} diff --git a/ges/generated/GES/BaseTransitionClip.cs b/ges/generated/GES/BaseTransitionClip.cs new file mode 100644 index 0000000000..b955112aca --- /dev/null +++ b/ges/generated/GES/BaseTransitionClip.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseTransitionClip : GES.OperationClip { + + protected BaseTransitionClip (IntPtr raw) : base(raw) {} + + protected BaseTransitionClip() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.OperationClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_base_transition_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_base_transition_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static BaseTransitionClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.OperationClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/BaseXmlFormatter.cs b/ges/generated/GES/BaseXmlFormatter.cs new file mode 100644 index 0000000000..4734fa537c --- /dev/null +++ b/ges/generated/GES/BaseXmlFormatter.cs @@ -0,0 +1,126 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseXmlFormatter : GES.Formatter { + + protected BaseXmlFormatter (IntPtr raw) : base(raw) {} + + protected BaseXmlFormatter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("content_parser" + , GES.Formatter.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(GLib.MarkupParser)) // content_parser + , null + , "save" + , (long) Marshal.OffsetOf(typeof(GESBaseXmlFormatter_content_parserAlign), "content_parser") + , 0 + ), + new GLib.AbiField("save" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // save + , "content_parser" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "save" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESBaseXmlFormatter_content_parserAlign + { + sbyte f1; + private GLib.MarkupParser content_parser; + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_base_xml_formatter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_base_xml_formatter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static BaseXmlFormatter () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Formatter.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "xmlcontent" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("xmlcontent" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // xmlcontent + , "priv" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , "xmlcontent" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/ChildAddedHandler.cs b/ges/generated/GES/ChildAddedHandler.cs new file mode 100644 index 0000000000..58aef20697 --- /dev/null +++ b/ges/generated/GES/ChildAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ChildAddedHandler(object o, ChildAddedArgs args); + + public class ChildAddedArgs : GLib.SignalArgs { + public GES.TimelineElement Element{ + get { + return (GES.TimelineElement) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/ChildPropertyAddedHandler.cs b/ges/generated/GES/ChildPropertyAddedHandler.cs new file mode 100644 index 0000000000..daa442c998 --- /dev/null +++ b/ges/generated/GES/ChildPropertyAddedHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ChildPropertyAddedHandler(object o, ChildPropertyAddedArgs args); + + public class ChildPropertyAddedArgs : GLib.SignalArgs { + public GLib.Object PropObject{ + get { + return (GLib.Object) Args [0]; + } + } + + public IntPtr Prop{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/ChildPropertyRemovedHandler.cs b/ges/generated/GES/ChildPropertyRemovedHandler.cs new file mode 100644 index 0000000000..a1eb1081bf --- /dev/null +++ b/ges/generated/GES/ChildPropertyRemovedHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ChildPropertyRemovedHandler(object o, ChildPropertyRemovedArgs args); + + public class ChildPropertyRemovedArgs : GLib.SignalArgs { + public GLib.Object PropObject{ + get { + return (GLib.Object) Args [0]; + } + } + + public IntPtr Prop{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/ChildRemovedHandler.cs b/ges/generated/GES/ChildRemovedHandler.cs new file mode 100644 index 0000000000..a5e9a05312 --- /dev/null +++ b/ges/generated/GES/ChildRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ChildRemovedHandler(object o, ChildRemovedArgs args); + + public class ChildRemovedArgs : GLib.SignalArgs { + public GES.TimelineElement Element{ + get { + return (GES.TimelineElement) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/ChildrenControlMode.cs b/ges/generated/GES/ChildrenControlMode.cs new file mode 100644 index 0000000000..387b6d32d8 --- /dev/null +++ b/ges/generated/GES/ChildrenControlMode.cs @@ -0,0 +1,19 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum ChildrenControlMode { + + Update = 0, + IgnoreNotifies = 1, + UpdateOffsets = 2, + UpdateAllValues = 3, + Last = 4, + } +#endregion +} diff --git a/ges/generated/GES/Clip.cs b/ges/generated/GES/Clip.cs new file mode 100644 index 0000000000..a8bba4d5fe --- /dev/null +++ b/ges/generated/GES/Clip.cs @@ -0,0 +1,368 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Clip : GES.Container { + + protected Clip (IntPtr raw) : base(raw) {} + + protected Clip() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_clip_get_duration_limit(IntPtr raw); + + [GLib.Property ("duration-limit")] + public ulong DurationLimit { + get { + ulong raw_ret = ges_clip_get_duration_limit(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_get_layer(IntPtr raw); + + [GLib.Property ("layer")] + public GES.Layer Layer { + get { + IntPtr raw_ret = ges_clip_get_layer(Handle); + GES.Layer ret = GLib.Object.GetObject(raw_ret, true) as GES.Layer; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_clip_get_supported_formats(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_clip_set_supported_formats(IntPtr raw, int supportedformats); + + [GLib.Property ("supported-formats")] + public GES.TrackType SupportedFormats { + get { + int raw_ret = ges_clip_get_supported_formats(Handle); + GES.TrackType ret = (GES.TrackType) raw_ret; + return ret; + } + set { + ges_clip_set_supported_formats(Handle, (int) value); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_track_element" + , GES.Container.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_track_element + , null + , "create_track_elements" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create_track_elements" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_track_elements + , "create_track_element" + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI.abi + // End ABI.abi + + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // ABI._gst_reserved + , "create_track_elements" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {}, + new List() {"ABI._gst_reserved"} + } + , "create_track_elements" + , null + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_add_asset(IntPtr raw, IntPtr asset); + + public GES.TrackElement AddAsset(GES.Asset asset) { + IntPtr raw_ret = ges_clip_add_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + GES.TrackElement ret = GLib.Object.GetObject(raw_ret) as GES.TrackElement; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_clip_add_child_to_track(IntPtr raw, IntPtr child, IntPtr track, out IntPtr error); + + public unsafe GES.TrackElement AddChildToTrack(GES.TrackElement child, GES.Track track) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_clip_add_child_to_track(Handle, child == null ? IntPtr.Zero : child.Handle, track == null ? IntPtr.Zero : track.Handle, out error); + GES.TrackElement ret = GLib.Object.GetObject(raw_ret) as GES.TrackElement; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_clip_add_top_effect(IntPtr raw, IntPtr effect, int index, out IntPtr error); + + public unsafe bool AddTopEffect(GES.BaseEffect effect, int index) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_clip_add_top_effect(Handle, effect == null ? IntPtr.Zero : effect.Handle, index, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_find_track_element(IntPtr raw, IntPtr track, IntPtr type); + + public GES.TrackElement FindTrackElement(GES.Track track, GLib.GType type) { + IntPtr raw_ret = ges_clip_find_track_element(Handle, track == null ? IntPtr.Zero : track.Handle, type.Val); + GES.TrackElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TrackElement; + return ret; + } + + public GES.TrackElement FindTrackElement(GLib.GType type) { + return FindTrackElement (null, type); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_find_track_elements(IntPtr raw, IntPtr track, int track_type, IntPtr type); + + public GES.TrackElement[] FindTrackElements(GES.Track track, GES.TrackType track_type, GLib.GType type) { + IntPtr raw_ret = ges_clip_find_track_elements(Handle, track == null ? IntPtr.Zero : track.Handle, (int) track_type, type.Val); + GES.TrackElement[] ret = (GES.TrackElement[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.TrackElement)); + return ret; + } + + public GES.TrackElement[] FindTrackElements(GES.TrackType track_type, GLib.GType type) { + return FindTrackElements (null, track_type, type); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe ulong ges_clip_get_internal_time_from_timeline_time(IntPtr raw, IntPtr child, ulong timeline_time, out IntPtr error); + + public unsafe ulong GetInternalTimeFromTimelineTime(GES.TrackElement child, ulong timeline_time) { + IntPtr error = IntPtr.Zero; + ulong raw_ret = ges_clip_get_internal_time_from_timeline_time(Handle, child == null ? IntPtr.Zero : child.Handle, timeline_time, out error); + ulong ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe ulong ges_clip_get_timeline_time_from_internal_time(IntPtr raw, IntPtr child, ulong internal_time, out IntPtr error); + + public unsafe ulong GetTimelineTimeFromInternalTime(GES.TrackElement child, ulong internal_time) { + IntPtr error = IntPtr.Zero; + ulong raw_ret = ges_clip_get_timeline_time_from_internal_time(Handle, child == null ? IntPtr.Zero : child.Handle, internal_time, out error); + ulong ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe ulong ges_clip_get_timeline_time_from_source_frame(IntPtr raw, long frame_number, out IntPtr error); + + public unsafe ulong GetTimelineTimeFromSourceFrame(long frame_number) { + IntPtr error = IntPtr.Zero; + ulong raw_ret = ges_clip_get_timeline_time_from_source_frame(Handle, frame_number, out error); + ulong ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_clip_get_top_effect_index(IntPtr raw, IntPtr effect); + + public int GetTopEffectIndex(GES.BaseEffect effect) { + int raw_ret = ges_clip_get_top_effect_index(Handle, effect == null ? IntPtr.Zero : effect.Handle); + int ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_clip_get_top_effect_position(IntPtr raw, IntPtr effect); + + public int GetTopEffectPosition(GES.BaseEffect effect) { + int raw_ret = ges_clip_get_top_effect_position(Handle, effect == null ? IntPtr.Zero : effect.Handle); + int ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_get_top_effects(IntPtr raw); + + public GES.TrackElement[] TopEffects { + get { + IntPtr raw_ret = ges_clip_get_top_effects(Handle); + GES.TrackElement[] ret = (GES.TrackElement[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.TrackElement)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_clip_move_to_layer(IntPtr raw, IntPtr layer); + + public bool MoveToLayer(GES.Layer layer) { + bool raw_ret = ges_clip_move_to_layer(Handle, layer == null ? IntPtr.Zero : layer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_clip_move_to_layer_full(IntPtr raw, IntPtr layer, out IntPtr error); + + public unsafe bool MoveToLayerFull(GES.Layer layer) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_clip_move_to_layer_full(Handle, layer == null ? IntPtr.Zero : layer.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_clip_remove_top_effect(IntPtr raw, IntPtr effect, out IntPtr error); + + public unsafe bool RemoveTopEffect(GES.BaseEffect effect) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_clip_remove_top_effect(Handle, effect == null ? IntPtr.Zero : effect.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_clip_set_top_effect_index(IntPtr raw, IntPtr effect, uint newindex); + + public bool SetTopEffectIndex(GES.BaseEffect effect, uint newindex) { + bool raw_ret = ges_clip_set_top_effect_index(Handle, effect == null ? IntPtr.Zero : effect.Handle, newindex); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_clip_set_top_effect_index_full(IntPtr raw, IntPtr effect, uint newindex, out IntPtr error); + + public unsafe bool SetTopEffectIndexFull(GES.BaseEffect effect, uint newindex) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_clip_set_top_effect_index_full(Handle, effect == null ? IntPtr.Zero : effect.Handle, newindex, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_clip_set_top_effect_priority(IntPtr raw, IntPtr effect, uint newpriority); + + public bool SetTopEffectPriority(GES.BaseEffect effect, uint newpriority) { + bool raw_ret = ges_clip_set_top_effect_priority(Handle, effect == null ? IntPtr.Zero : effect.Handle, newpriority); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_split(IntPtr raw, ulong position); + + public GES.Clip Split(ulong position) { + IntPtr raw_ret = ges_clip_split(Handle, position); + GES.Clip ret = GLib.Object.GetObject(raw_ret) as GES.Clip; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_clip_split_full(IntPtr raw, ulong position, out IntPtr error); + + public unsafe GES.Clip SplitFull(ulong position) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_clip_split_full(Handle, position, out error); + GES.Clip ret = GLib.Object.GetObject(raw_ret) as GES.Clip; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static Clip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Container.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/ClipAddedHandler.cs b/ges/generated/GES/ClipAddedHandler.cs new file mode 100644 index 0000000000..194c382f74 --- /dev/null +++ b/ges/generated/GES/ClipAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ClipAddedHandler(object o, ClipAddedArgs args); + + public class ClipAddedArgs : GLib.SignalArgs { + public GES.Clip Clip{ + get { + return (GES.Clip) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/ClipAsset.cs b/ges/generated/GES/ClipAsset.cs new file mode 100644 index 0000000000..2db2d626fb --- /dev/null +++ b/ges/generated/GES/ClipAsset.cs @@ -0,0 +1,197 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ClipAsset : GES.Asset { + + public ClipAsset (IntPtr raw) : base(raw) {} + + protected ClipAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_clip_asset_get_supported_formats(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_clip_asset_set_supported_formats(IntPtr raw, int supportedformats); + + [GLib.Property ("supported-formats")] + public GES.TrackType SupportedFormats { + get { + int raw_ret = ges_clip_asset_get_supported_formats(Handle); + GES.TrackType ret = (GES.TrackType) raw_ret; + return ret; + } + set { + ges_clip_asset_set_supported_formats(Handle, (int) value); + } + } + + static GetNaturalFramerateNativeDelegate GetNaturalFramerate_cb_delegate; + static GetNaturalFramerateNativeDelegate GetNaturalFramerateVMCallback { + get { + if (GetNaturalFramerate_cb_delegate == null) + GetNaturalFramerate_cb_delegate = new GetNaturalFramerateNativeDelegate (GetNaturalFramerate_cb); + return GetNaturalFramerate_cb_delegate; + } + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype) + { + OverrideGetNaturalFramerate (gtype, GetNaturalFramerateVMCallback); + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype, GetNaturalFramerateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetNaturalFramerateNativeDelegate (IntPtr inst, int framerate_n, int framerate_d); + + static bool GetNaturalFramerate_cb (IntPtr inst, int framerate_n, int framerate_d) + { + try { + ClipAsset __obj = GLib.Object.GetObject (inst, false) as ClipAsset; + bool __result; + __result = __obj.OnGetNaturalFramerate (framerate_n, framerate_d); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.ClipAsset), ConnectionMethod="OverrideGetNaturalFramerate")] + protected virtual bool OnGetNaturalFramerate (int framerate_n, int framerate_d) + { + return InternalGetNaturalFramerate (framerate_n, framerate_d); + } + + private bool InternalGetNaturalFramerate (int framerate_n, int framerate_d) + { + GetNaturalFramerateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + unmanaged = (GetNaturalFramerateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetNaturalFramerateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, framerate_n, framerate_d); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_natural_framerate" + , GES.Asset.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_natural_framerate + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , "get_natural_framerate" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_clip_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_clip_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_clip_asset_get_frame_time(IntPtr raw, long frame_number); + + public ulong GetFrameTime(long frame_number) { + ulong raw_ret = ges_clip_asset_get_frame_time(Handle, frame_number); + ulong ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_clip_asset_get_natural_framerate(IntPtr raw, int framerate_n, int framerate_d); + + public bool GetNaturalFramerate(int framerate_n, int framerate_d) { + bool raw_ret = ges_clip_asset_get_natural_framerate(Handle, framerate_n, framerate_d); + bool ret = raw_ret; + return ret; + } + + + static ClipAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Asset.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/ClipRemovedHandler.cs b/ges/generated/GES/ClipRemovedHandler.cs new file mode 100644 index 0000000000..77253bbc1b --- /dev/null +++ b/ges/generated/GES/ClipRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ClipRemovedHandler(object o, ClipRemovedArgs args); + + public class ClipRemovedArgs : GLib.SignalArgs { + public GES.Clip Clip{ + get { + return (GES.Clip) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/CommandLineFormatter.cs b/ges/generated/GES/CommandLineFormatter.cs new file mode 100644 index 0000000000..409e04f6f6 --- /dev/null +++ b/ges/generated/GES/CommandLineFormatter.cs @@ -0,0 +1,89 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class CommandLineFormatter : GES.Formatter { + + public CommandLineFormatter (IntPtr raw) : base(raw) {} + + protected CommandLineFormatter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GES.Formatter.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_command_line_formatter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_command_line_formatter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_command_line_formatter_get_help(int nargs, IntPtr commands); + + public static string GetHelp(int nargs, string commands) { + IntPtr native_commands = GLib.Marshaller.StringToPtrGStrdup (commands); + IntPtr raw_ret = ges_command_line_formatter_get_help(nargs, native_commands); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_commands); + return ret; + } + + + static CommandLineFormatter () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Formatter.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Constants.cs b/ges/generated/GES/Constants.cs new file mode 100644 index 0000000000..41937b61cc --- /dev/null +++ b/ges/generated/GES/Constants.cs @@ -0,0 +1,35 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const long FRAME_NUMBER_NONE = 9223372036854775807; + public const string META_DESCRIPTION = @"description"; + public const string META_FORMATTER_EXTENSION = @"extension"; + public const string META_FORMATTER_MIMETYPE = @"mimetype"; + public const string META_FORMATTER_NAME = @"name"; + public const string META_FORMATTER_RANK = @"rank"; + public const string META_FORMATTER_VERSION = @"version"; + public const string META_FORMAT_VERSION = @"format-version"; + public const string META_MARKER_COLOR = @"marker-color"; + public const string META_VOLUME = @"volume"; + public const double META_VOLUME_DEFAULT = 1.000000; + public const string MULTI_FILE_URI_PREFIX = @"multifile://"; + public const int PADDING = 4; + public const int PADDING_LARGE = 20; + public const uint TIMELINE_ELEMENT_NO_LAYER_PRIORITY = 4294967295; + public const int VERSION_MAJOR = 1; + public const int VERSION_MICRO = 0; + public const int VERSION_MINOR = 19; + public const int VERSION_NANO = 1; +#endregion + } +} diff --git a/ges/generated/GES/Container.cs b/ges/generated/GES/Container.cs new file mode 100644 index 0000000000..23b46c94f1 --- /dev/null +++ b/ges/generated/GES/Container.cs @@ -0,0 +1,679 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Container : GES.TimelineElement { + + protected Container (IntPtr raw) : base(raw) {} + + protected Container() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("height")] + public uint Height { + get { + GLib.Value val = GetProperty ("height"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + public GLib.List Children { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("children")); + return new GLib.List((*raw_ptr)); + } + } + } + + public uint HeightField { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("height")); + return (*raw_ptr); + } + } + } + + public GES.ChildrenControlMode ChildrenControlMode { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("children_control_mode")); + return (GES.ChildrenControlMode) (*raw_ptr); + } + } + } + + public GES.TimelineElement InitiatedMove { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("initiated_move")); + return GLib.Object.GetObject((*raw_ptr)) as GES.TimelineElement; + } + } + } + + [GLib.Signal("child-added")] + public event GES.ChildAddedHandler ChildAdded { + add { + this.AddSignalHandler ("child-added", value, typeof (GES.ChildAddedArgs)); + } + remove { + this.RemoveSignalHandler ("child-added", value); + } + } + + [GLib.Signal("child-removed")] + public event GES.ChildRemovedHandler ChildRemoved { + add { + this.AddSignalHandler ("child-removed", value, typeof (GES.ChildRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("child-removed", value); + } + } + + static ChildAddedNativeDelegate ChildAdded_cb_delegate; + static ChildAddedNativeDelegate ChildAddedVMCallback { + get { + if (ChildAdded_cb_delegate == null) + ChildAdded_cb_delegate = new ChildAddedNativeDelegate (ChildAdded_cb); + return ChildAdded_cb_delegate; + } + } + + static void OverrideChildAdded (GLib.GType gtype) + { + OverrideChildAdded (gtype, ChildAddedVMCallback); + } + + static void OverrideChildAdded (GLib.GType gtype, ChildAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("child_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildAddedNativeDelegate (IntPtr inst, IntPtr element); + + static void ChildAdded_cb (IntPtr inst, IntPtr element) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + __obj.OnChildAdded (GLib.Object.GetObject(element) as GES.TimelineElement); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideChildAdded")] + protected virtual void OnChildAdded (GES.TimelineElement element) + { + InternalChildAdded (element); + } + + private void InternalChildAdded (GES.TimelineElement element) + { + ChildAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("child_added")); + unmanaged = (ChildAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChildAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + static ChildRemovedNativeDelegate ChildRemoved_cb_delegate; + static ChildRemovedNativeDelegate ChildRemovedVMCallback { + get { + if (ChildRemoved_cb_delegate == null) + ChildRemoved_cb_delegate = new ChildRemovedNativeDelegate (ChildRemoved_cb); + return ChildRemoved_cb_delegate; + } + } + + static void OverrideChildRemoved (GLib.GType gtype) + { + OverrideChildRemoved (gtype, ChildRemovedVMCallback); + } + + static void OverrideChildRemoved (GLib.GType gtype, ChildRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("child_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildRemovedNativeDelegate (IntPtr inst, IntPtr element); + + static void ChildRemoved_cb (IntPtr inst, IntPtr element) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + __obj.OnChildRemoved (GLib.Object.GetObject(element) as GES.TimelineElement); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideChildRemoved")] + protected virtual void OnChildRemoved (GES.TimelineElement element) + { + InternalChildRemoved (element); + } + + private void InternalChildRemoved (GES.TimelineElement element) + { + ChildRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("child_removed")); + unmanaged = (ChildRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChildRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + static AddChildNativeDelegate AddChild_cb_delegate; + static AddChildNativeDelegate AddChildVMCallback { + get { + if (AddChild_cb_delegate == null) + AddChild_cb_delegate = new AddChildNativeDelegate (AddChild_cb); + return AddChild_cb_delegate; + } + } + + static void OverrideAddChild (GLib.GType gtype) + { + OverrideAddChild (gtype, AddChildVMCallback); + } + + static void OverrideAddChild (GLib.GType gtype, AddChildNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_child")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool AddChildNativeDelegate (IntPtr inst, IntPtr element); + + static bool AddChild_cb (IntPtr inst, IntPtr element) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + bool __result; + __result = __obj.OnAddChild (GLib.Object.GetObject(element) as GES.TimelineElement); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideAddChild")] + protected virtual bool OnAddChild (GES.TimelineElement element) + { + return InternalAddChild (element); + } + + private bool InternalAddChild (GES.TimelineElement element) + { + AddChildNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("add_child")); + unmanaged = (AddChildNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AddChildNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + return __result; + } + + static RemoveChildNativeDelegate RemoveChild_cb_delegate; + static RemoveChildNativeDelegate RemoveChildVMCallback { + get { + if (RemoveChild_cb_delegate == null) + RemoveChild_cb_delegate = new RemoveChildNativeDelegate (RemoveChild_cb); + return RemoveChild_cb_delegate; + } + } + + static void OverrideRemoveChild (GLib.GType gtype) + { + OverrideRemoveChild (gtype, RemoveChildVMCallback); + } + + static void OverrideRemoveChild (GLib.GType gtype, RemoveChildNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_child")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RemoveChildNativeDelegate (IntPtr inst, IntPtr element); + + static bool RemoveChild_cb (IntPtr inst, IntPtr element) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + bool __result; + __result = __obj.OnRemoveChild (GLib.Object.GetObject(element) as GES.TimelineElement); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideRemoveChild")] + protected virtual bool OnRemoveChild (GES.TimelineElement element) + { + return InternalRemoveChild (element); + } + + private bool InternalRemoveChild (GES.TimelineElement element) + { + RemoveChildNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_child")); + unmanaged = (RemoveChildNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RemoveChildNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + return __result; + } + + static UngroupNativeDelegate Ungroup_cb_delegate; + static UngroupNativeDelegate UngroupVMCallback { + get { + if (Ungroup_cb_delegate == null) + Ungroup_cb_delegate = new UngroupNativeDelegate (Ungroup_cb); + return Ungroup_cb_delegate; + } + } + + static void OverrideUngroup (GLib.GType gtype) + { + OverrideUngroup (gtype, UngroupVMCallback); + } + + static void OverrideUngroup (GLib.GType gtype, UngroupNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("ungroup")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr UngroupNativeDelegate (IntPtr inst, bool recursive); + + static IntPtr Ungroup_cb (IntPtr inst, bool recursive) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + GES.Container[] __result; + __result = __obj.OnUngroup (recursive); + return new GLib.List(__result, typeof (GES.Container), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (GES.Container), true, true).Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideUngroup")] + protected virtual GES.Container[] OnUngroup (bool recursive) + { + return InternalUngroup (recursive); + } + + private GES.Container[] InternalUngroup (bool recursive) + { + UngroupNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("ungroup")); + unmanaged = (UngroupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UngroupNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, recursive); + return (GES.Container[]) GLib.Marshaller.ListPtrToArray (__result, typeof(GLib.List), true, true, typeof(GES.Container)); + } + + static EditNativeDelegate Edit_cb_delegate; + static EditNativeDelegate EditVMCallback { + get { + if (Edit_cb_delegate == null) + Edit_cb_delegate = new EditNativeDelegate (Edit_cb); + return Edit_cb_delegate; + } + } + + static void OverrideEdit (GLib.GType gtype) + { + OverrideEdit (gtype, EditVMCallback); + } + + static void OverrideEdit (GLib.GType gtype, EditNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("edit")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool EditNativeDelegate (IntPtr inst, IntPtr layers, int new_layer_priority, int mode, int edge, ulong position); + + static bool Edit_cb (IntPtr inst, IntPtr layers, int new_layer_priority, int mode, int edge, ulong position) + { + try { + Container __obj = GLib.Object.GetObject (inst, false) as Container; + bool __result; + __result = __obj.OnEdit (new GLib.List(layers), new_layer_priority, (GES.EditMode) mode, (GES.Edge) edge, position); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Container), ConnectionMethod="OverrideEdit")] + protected virtual bool OnEdit (GLib.List layers, int new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) + { + return InternalEdit (layers, new_layer_priority, mode, edge, position); + } + + private bool InternalEdit (GLib.List layers, int new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) + { + EditNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("edit")); + unmanaged = (EditNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EditNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, layers == null ? IntPtr.Zero : layers.Handle, new_layer_priority, (int) mode, (int) edge, position); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("child_added" + , GES.TimelineElement.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // child_added + , null + , "child_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("child_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // child_removed + , "child_added" + , "add_child" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("add_child" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // add_child + , "child_removed" + , "remove_child" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("remove_child" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // remove_child + , "add_child" + , "ungroup" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("ungroup" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ungroup + , "remove_child" + , "group" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("group" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // group + , "ungroup" + , "edit" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("edit" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // edit + , "group" + , "grouping_priority" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("grouping_priority" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // grouping_priority + , "edit" + , "_ges_reserved" + , (long) Marshal.OffsetOf(typeof(GESContainer_grouping_priorityAlign), "grouping_priority") + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _ges_reserved + , "grouping_priority" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESContainer_grouping_priorityAlign + { + sbyte f1; + private uint grouping_priority; + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_container_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_container_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_container_group(IntPtr containers); + + public static GES.Container Group(GLib.List containers) { + IntPtr raw_ret = ges_container_group(containers == null ? IntPtr.Zero : containers.Handle); + GES.Container ret = GLib.Object.GetObject(raw_ret) as GES.Container; + return ret; + } + + public static GES.Container Group() { + return Group (null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_container_add(IntPtr raw, IntPtr child); + + public bool Add(GES.TimelineElement child) { + bool raw_ret = ges_container_add(Handle, child == null ? IntPtr.Zero : child.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_container_edit(IntPtr raw, IntPtr layers, int new_layer_priority, int mode, int edge, ulong position); + + [Obsolete] + public bool Edit(GLib.List layers, int new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) { + bool raw_ret = ges_container_edit(Handle, layers == null ? IntPtr.Zero : layers.Handle, new_layer_priority, (int) mode, (int) edge, position); + bool ret = raw_ret; + return ret; + } + + public bool Edit(int new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) { + return Edit (null, new_layer_priority, mode, edge, position); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_container_get_children(IntPtr raw, bool recursive); + + public GES.TimelineElement[] GetChildren(bool recursive) { + IntPtr raw_ret = ges_container_get_children(Handle, recursive); + GES.TimelineElement[] ret = (GES.TimelineElement[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.TimelineElement)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_container_remove(IntPtr raw, IntPtr child); + + public bool Remove(GES.TimelineElement child) { + bool raw_ret = ges_container_remove(Handle, child == null ? IntPtr.Zero : child.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_container_ungroup(IntPtr raw, bool recursive); + + public GES.Container[] Ungroup(bool recursive) { + IntPtr raw_ret = ges_container_ungroup(Handle, recursive); + GES.Container[] ret = (GES.Container[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Container)); + return ret; + } + + + static Container () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("children" + , GES.TimelineElement.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // children + , null + , "height" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("height" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // height + , "children" + , "children_control_mode" + , (long) Marshal.OffsetOf(typeof(GESContainer_heightAlign), "height") + , 0 + ), + new GLib.AbiField("children_control_mode" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(GES.ChildrenControlMode))) // children_control_mode + , "height" + , "initiated_move" + , (long) Marshal.OffsetOf(typeof(GESContainer_children_control_modeAlign), "children_control_mode") + , 0 + ), + new GLib.AbiField("initiated_move" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // initiated_move + , "children_control_mode" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "initiated_move" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESContainer_heightAlign + { + sbyte f1; + private uint height; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESContainer_children_control_modeAlign + { + sbyte f1; + private GES.ChildrenControlMode children_control_mode; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/ControlBindingAddedHandler.cs b/ges/generated/GES/ControlBindingAddedHandler.cs new file mode 100644 index 0000000000..2e2579361a --- /dev/null +++ b/ges/generated/GES/ControlBindingAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ControlBindingAddedHandler(object o, ControlBindingAddedArgs args); + + public class ControlBindingAddedArgs : GLib.SignalArgs { + public Gst.ControlBinding ControlBinding{ + get { + return (Gst.ControlBinding) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/ControlBindingRemovedHandler.cs b/ges/generated/GES/ControlBindingRemovedHandler.cs new file mode 100644 index 0000000000..c94381a250 --- /dev/null +++ b/ges/generated/GES/ControlBindingRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void ControlBindingRemovedHandler(object o, ControlBindingRemovedArgs args); + + public class ControlBindingRemovedArgs : GLib.SignalArgs { + public Gst.ControlBinding ControlBinding{ + get { + return (Gst.ControlBinding) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/CreateElementForGapFunc.cs b/ges/generated/GES/CreateElementForGapFunc.cs new file mode 100644 index 0000000000..4b5a90365a --- /dev/null +++ b/ges/generated/GES/CreateElementForGapFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate Gst.Element CreateElementForGapFunc(GES.Track track); + +} diff --git a/ges/generated/GES/CreateTrackElementFunc.cs b/ges/generated/GES/CreateTrackElementFunc.cs new file mode 100644 index 0000000000..0de1565b01 --- /dev/null +++ b/ges/generated/GES/CreateTrackElementFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate GES.TrackElement CreateTrackElementFunc(GES.Clip clip, GES.TrackType type); + +} diff --git a/ges/generated/GES/CreateTrackElementsFunc.cs b/ges/generated/GES/CreateTrackElementsFunc.cs new file mode 100644 index 0000000000..815fd49c70 --- /dev/null +++ b/ges/generated/GES/CreateTrackElementsFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate GES.TrackElement[] CreateTrackElementsFunc(GES.Clip clip, GES.TrackType type); + +} diff --git a/ges/generated/GES/DeepNotifyHandler.cs b/ges/generated/GES/DeepNotifyHandler.cs new file mode 100644 index 0000000000..81f48b5bc4 --- /dev/null +++ b/ges/generated/GES/DeepNotifyHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void DeepNotifyHandler(object o, DeepNotifyArgs args); + + public class DeepNotifyArgs : GLib.SignalArgs { + public GLib.Object PropObject{ + get { + return (GLib.Object) Args [0]; + } + } + + public IntPtr Prop{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/Edge.cs b/ges/generated/GES/Edge.cs new file mode 100644 index 0000000000..ae38f5e513 --- /dev/null +++ b/ges/generated/GES/Edge.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.EdgeGType))] + public enum Edge { + + EdgeStart = 0, + Start = 0, + EdgeEnd = 1, + End = 1, + EdgeNone = 2, + None = 2, + } + + internal class EdgeGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_edge_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_edge_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/EditMode.cs b/ges/generated/GES/EditMode.cs new file mode 100644 index 0000000000..ceac9e5b5b --- /dev/null +++ b/ges/generated/GES/EditMode.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.EditModeGType))] + public enum EditMode { + + EditNormal = 0, + Normal = 0, + EditRipple = 1, + Ripple = 1, + EditRoll = 2, + Roll = 2, + EditTrim = 3, + Trim = 3, + EditSlide = 4, + Slide = 4, + } + + internal class EditModeGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_edit_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_edit_mode_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/Effect.cs b/ges/generated/GES/Effect.cs new file mode 100644 index 0000000000..9d0a225107 --- /dev/null +++ b/ges/generated/GES/Effect.cs @@ -0,0 +1,139 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Effect : GES.BaseEffect { + + public Effect (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_effect_new(IntPtr bin_description); + + public Effect (string bin_description) : base (IntPtr.Zero) + { + if (GetType () != typeof (Effect)) { + var vals = new List (); + var names = new List (); + names.Add ("bin_description"); + vals.Add (new GLib.Value (bin_description)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_bin_description = GLib.Marshaller.StringToPtrGStrdup (bin_description); + Raw = ges_effect_new(native_bin_description); + GLib.Marshaller.Free (native_bin_description); + } + + [GLib.Property ("bin-description")] + public string BinDescription { + get { + GLib.Value val = GetProperty ("bin-description"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("rate_properties" + , GES.BaseEffect.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // rate_properties + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "rate_properties" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_effect_class_register_rate_property(IntPtr element_name, IntPtr property_name); + + public static bool RegisterRateProperty(string element_name, string property_name) { + IntPtr native_element_name = GLib.Marshaller.StringToPtrGStrdup (element_name); + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + bool raw_ret = ges_effect_class_register_rate_property(native_element_name, native_property_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_element_name); + GLib.Marshaller.Free (native_property_name); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_effect_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_effect_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static Effect () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.BaseEffect.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/EffectAsset.cs b/ges/generated/GES/EffectAsset.cs new file mode 100644 index 0000000000..4aa0a5b712 --- /dev/null +++ b/ges/generated/GES/EffectAsset.cs @@ -0,0 +1,39 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EffectAsset : GES.TrackElementAsset { + + public EffectAsset (IntPtr raw) : base(raw) {} + + protected EffectAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_effect_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_effect_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static EffectAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/ges/generated/GES/EffectClip.cs b/ges/generated/GES/EffectClip.cs new file mode 100644 index 0000000000..6c254a2079 --- /dev/null +++ b/ges/generated/GES/EffectClip.cs @@ -0,0 +1,132 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EffectClip : GES.BaseEffectClip { + + public EffectClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_effect_clip_new(IntPtr video_bin_description, IntPtr audio_bin_description); + + public EffectClip (string video_bin_description, string audio_bin_description) : base (IntPtr.Zero) + { + if (GetType () != typeof (EffectClip)) { + var vals = new List (); + var names = new List (); + names.Add ("video_bin_description"); + vals.Add (new GLib.Value (video_bin_description)); + names.Add ("audio_bin_description"); + vals.Add (new GLib.Value (audio_bin_description)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_video_bin_description = GLib.Marshaller.StringToPtrGStrdup (video_bin_description); + IntPtr native_audio_bin_description = GLib.Marshaller.StringToPtrGStrdup (audio_bin_description); + Raw = ges_effect_clip_new(native_video_bin_description, native_audio_bin_description); + GLib.Marshaller.Free (native_video_bin_description); + GLib.Marshaller.Free (native_audio_bin_description); + } + + [GLib.Property ("audio-bin-description")] + public string AudioBinDescription { + get { + GLib.Value val = GetProperty ("audio-bin-description"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("video-bin-description")] + public string VideoBinDescription { + get { + GLib.Value val = GetProperty ("video-bin-description"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.BaseEffectClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_effect_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_effect_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static EffectClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.BaseEffectClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Error.cs b/ges/generated/GES/Error.cs new file mode 100644 index 0000000000..179c56331d --- /dev/null +++ b/ges/generated/GES/Error.cs @@ -0,0 +1,23 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum Error { + + AssetWrongId = 0, + AssetLoading = 1, + FormatterMalformedInputFile = 2, + InvalidFrameNumber = 3, + NegativeLayer = 4, + NegativeTime = 5, + NotEnoughInternalContent = 6, + InvalidOverlapInTrack = 7, + InvalidEffectBinDescription = 8, + } +#endregion +} diff --git a/ges/generated/GES/ExtractableAdapter.cs b/ges/generated/GES/ExtractableAdapter.cs new file mode 100644 index 0000000000..62838aa116 --- /dev/null +++ b/ges/generated/GES/ExtractableAdapter.cs @@ -0,0 +1,191 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ExtractableAdapter : GLib.GInterfaceAdapter, GES.IExtractable { + + [StructLayout (LayoutKind.Sequential)] + struct GESExtractableInterface { + public GLib.GType AssetType; + private GESSharp.ExtractableCheckIdNative _check_id; + public GES.ExtractableCheckId CheckId { + get { + return GESSharp.ExtractableCheckIdWrapper.GetManagedDelegate (_check_id); + } + } + public bool CanUpdateAsset; + public SetAssetNativeDelegate SetAsset; + IntPtr SetAssetFull; + IntPtr GetParametersFromId; + public GetIdNativeDelegate GetId; + IntPtr GetRealExtractableType; + IntPtr RegisterMetas; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public IntPtr[] _gesGesReserved; + } + + static GESExtractableInterface iface; + + static ExtractableAdapter () + { + GLib.GType.Register (_gtype, typeof (ExtractableAdapter)); + iface.SetAsset = new SetAssetNativeDelegate (SetAsset_cb); + iface.GetId = new GetIdNativeDelegate (GetId_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetAssetNativeDelegate (IntPtr inst, IntPtr asset); + + static void SetAsset_cb (IntPtr inst, IntPtr asset) + { + try { + IExtractableImplementor __obj = GLib.Object.GetObject (inst, false) as IExtractableImplementor; + __obj.Asset = GLib.Object.GetObject(asset) as GES.Asset; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetIdNativeDelegate (IntPtr inst); + + static IntPtr GetId_cb (IntPtr inst) + { + try { + IExtractableImplementor __obj = GLib.Object.GetObject (inst, false) as IExtractableImplementor; + string __result; + __result = __obj.Id; + return GLib.Marshaller.StringToPtrGStrdup(__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GESExtractableInterface native_iface = (GESExtractableInterface) Marshal.PtrToStructure (ifaceptr, typeof (GESExtractableInterface)); + native_iface.SetAsset = iface.SetAsset; + native_iface.GetId = iface.GetId; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public ExtractableAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public ExtractableAdapter (IExtractableImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public ExtractableAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_type(); + + private static GLib.GType _gtype = new GLib.GType (ges_extractable_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IExtractable GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IExtractable GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IExtractableImplementor) + return new ExtractableAdapter (obj as IExtractableImplementor); + else if (obj as IExtractable == null) + return new ExtractableAdapter (obj.Handle); + else + return obj as IExtractable; + } + + public IExtractableImplementor Implementor { + get { + return implementor as IExtractableImplementor; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_asset(IntPtr raw); + + public GES.Asset Asset { + get { + IntPtr raw_ret = ges_extractable_get_asset(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_id(IntPtr raw); + + public string Id { + get { + IntPtr raw_ret = ges_extractable_get_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_extractable_set_asset(IntPtr raw, IntPtr asset); + + public bool SetAsset(GES.Asset asset) { + bool raw_ret = ges_extractable_set_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/ges/generated/GES/ExtractableCheckId.cs b/ges/generated/GES/ExtractableCheckId.cs new file mode 100644 index 0000000000..59529e4be5 --- /dev/null +++ b/ges/generated/GES/ExtractableCheckId.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate string ExtractableCheckId(GLib.GType type, string id); + +} diff --git a/ges/generated/GES/FillTrackElementFunc.cs b/ges/generated/GES/FillTrackElementFunc.cs new file mode 100644 index 0000000000..bfa123715c --- /dev/null +++ b/ges/generated/GES/FillTrackElementFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate bool FillTrackElementFunc(GES.Clip clip, GES.TrackElement track_element, Gst.Element nleobj); + +} diff --git a/ges/generated/GES/Formatter.cs b/ges/generated/GES/Formatter.cs new file mode 100644 index 0000000000..7ad6778c1f --- /dev/null +++ b/ges/generated/GES/Formatter.cs @@ -0,0 +1,308 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Formatter : GLib.InitiallyUnowned, GES.IExtractable { + + protected Formatter (IntPtr raw) : base(raw) {} + + protected Formatter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("can_load_uri" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // can_load_uri + , null + , "load_from_uri" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("load_from_uri" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // load_from_uri + , "can_load_uri" + , "save_to_uri" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("save_to_uri" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // save_to_uri + , "load_from_uri" + , "name" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // name + , "save_to_uri" + , "description" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("description" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // description + , "name" + , "extension" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("extension" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // extension + , "description" + , "mimetype" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mimetype" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mimetype + , "extension" + , "version" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("version" + , -1 + , (uint) Marshal.SizeOf(typeof(double)) // version + , "mimetype" + , "rank" + , (long) Marshal.OffsetOf(typeof(GESFormatter_versionAlign), "version") + , 0 + ), + new GLib.AbiField("rank" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Rank))) // rank + , "version" + , "_ges_reserved" + , (long) Marshal.OffsetOf(typeof(GESFormatter_rankAlign), "rank") + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "rank" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESFormatter_versionAlign + { + sbyte f1; + private double version; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESFormatter_rankAlign + { + sbyte f1; + private Gst.Rank rank; + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_formatter_class_register_metas(IntPtr name, IntPtr description, IntPtr extensions, IntPtr caps, double version, int rank); + + public static void RegisterMetas(string name, string description, string extensions, string caps, double version, Gst.Rank rank) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_extensions = GLib.Marshaller.StringToPtrGStrdup (extensions); + IntPtr native_caps = GLib.Marshaller.StringToPtrGStrdup (caps); + ges_formatter_class_register_metas(native_name, native_description, native_extensions, native_caps, version, (int) rank); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_extensions); + GLib.Marshaller.Free (native_caps); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_formatter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_formatter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_formatter_can_load_uri(IntPtr uri, out IntPtr error); + + public static unsafe bool CanLoadUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_formatter_can_load_uri(native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_formatter_can_save_uri(IntPtr uri, out IntPtr error); + + public static unsafe bool CanSaveUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_formatter_can_save_uri(native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_formatter_get_default(); + + public static GES.Asset Default { + get { + IntPtr raw_ret = ges_formatter_get_default(); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_formatter_load_from_uri(IntPtr raw, IntPtr timeline, IntPtr uri, out IntPtr error); + + [Obsolete] + public unsafe bool LoadFromUri(GES.Timeline timeline, string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_formatter_load_from_uri(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_formatter_save_to_uri(IntPtr raw, IntPtr timeline, IntPtr uri, bool overwrite, out IntPtr error); + + [Obsolete] + public unsafe bool SaveToUri(GES.Timeline timeline, string uri, bool overwrite) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_formatter_save_to_uri(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, overwrite, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_asset(IntPtr raw); + + public GES.Asset Asset { + get { + IntPtr raw_ret = ges_extractable_get_asset(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_id(IntPtr raw); + + public string Id { + get { + IntPtr raw_ret = ges_extractable_get_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_extractable_set_asset(IntPtr raw, IntPtr asset); + + public bool SetAsset(GES.Asset asset) { + bool raw_ret = ges_extractable_set_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + + static Formatter () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "project" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("project" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // project + , "priv" + , "timeline" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("timeline" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // timeline + , "project" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "timeline" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/FormatterCanLoadURIMethod.cs b/ges/generated/GES/FormatterCanLoadURIMethod.cs new file mode 100644 index 0000000000..617d104baf --- /dev/null +++ b/ges/generated/GES/FormatterCanLoadURIMethod.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate bool FormatterCanLoadURIMethod(GES.Formatter dummy_instance, string uri); + +} diff --git a/ges/generated/GES/FormatterLoadFromURIMethod.cs b/ges/generated/GES/FormatterLoadFromURIMethod.cs new file mode 100644 index 0000000000..ef142af052 --- /dev/null +++ b/ges/generated/GES/FormatterLoadFromURIMethod.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate bool FormatterLoadFromURIMethod(GES.Formatter formatter, GES.Timeline timeline, string uri); + +} diff --git a/ges/generated/GES/FormatterSaveToURIMethod.cs b/ges/generated/GES/FormatterSaveToURIMethod.cs new file mode 100644 index 0000000000..8601227116 --- /dev/null +++ b/ges/generated/GES/FormatterSaveToURIMethod.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate bool FormatterSaveToURIMethod(GES.Formatter formatter, GES.Timeline timeline, string uri, bool overwrite); + +} diff --git a/ges/generated/GES/GESSharp.BaseEffectTimeTranslationFuncNative.cs b/ges/generated/GES/GESSharp.BaseEffectTimeTranslationFuncNative.cs new file mode 100644 index 0000000000..e3a81987cd --- /dev/null +++ b/ges/generated/GES/GESSharp.BaseEffectTimeTranslationFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate ulong BaseEffectTimeTranslationFuncNative(IntPtr effect, ulong time, System.IntPtr time_property_values, IntPtr user_data); + + internal class BaseEffectTimeTranslationFuncInvoker { + + BaseEffectTimeTranslationFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~BaseEffectTimeTranslationFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal BaseEffectTimeTranslationFuncInvoker (BaseEffectTimeTranslationFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal BaseEffectTimeTranslationFuncInvoker (BaseEffectTimeTranslationFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal BaseEffectTimeTranslationFuncInvoker (BaseEffectTimeTranslationFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.BaseEffectTimeTranslationFunc Handler { + get { + return new GES.BaseEffectTimeTranslationFunc(InvokeNative); + } + } + + ulong InvokeNative (GES.BaseEffect effect, ulong time, System.IntPtr time_property_values) + { + ulong __result = native_cb (effect == null ? IntPtr.Zero : effect.Handle, time, time_property_values, __data); + return __result; + } + } + + internal class BaseEffectTimeTranslationFuncWrapper { + + public ulong NativeCallback (IntPtr effect, ulong time, System.IntPtr time_property_values, IntPtr user_data) + { + try { + ulong __ret = managed (GLib.Object.GetObject(effect) as GES.BaseEffect, time, time_property_values); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal BaseEffectTimeTranslationFuncNative NativeDelegate; + GES.BaseEffectTimeTranslationFunc managed; + + public BaseEffectTimeTranslationFuncWrapper (GES.BaseEffectTimeTranslationFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new BaseEffectTimeTranslationFuncNative (NativeCallback); + } + + public static GES.BaseEffectTimeTranslationFunc GetManagedDelegate (BaseEffectTimeTranslationFuncNative native) + { + if (native == null) + return null; + BaseEffectTimeTranslationFuncWrapper wrapper = (BaseEffectTimeTranslationFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.CreateElementForGapFuncNative.cs b/ges/generated/GES/GESSharp.CreateElementForGapFuncNative.cs new file mode 100644 index 0000000000..5e6613fc82 --- /dev/null +++ b/ges/generated/GES/GESSharp.CreateElementForGapFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr CreateElementForGapFuncNative(IntPtr track); + + internal class CreateElementForGapFuncInvoker { + + CreateElementForGapFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CreateElementForGapFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CreateElementForGapFuncInvoker (CreateElementForGapFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CreateElementForGapFuncInvoker (CreateElementForGapFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CreateElementForGapFuncInvoker (CreateElementForGapFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.CreateElementForGapFunc Handler { + get { + return new GES.CreateElementForGapFunc(InvokeNative); + } + } + + Gst.Element InvokeNative (GES.Track track) + { + Gst.Element __result = GLib.Object.GetObject(native_cb (track == null ? IntPtr.Zero : track.Handle)) as Gst.Element; + return __result; + } + } + + internal class CreateElementForGapFuncWrapper { + + public IntPtr NativeCallback (IntPtr track) + { + try { + Gst.Element __ret = managed (GLib.Object.GetObject(track) as GES.Track); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CreateElementForGapFuncNative NativeDelegate; + GES.CreateElementForGapFunc managed; + + public CreateElementForGapFuncWrapper (GES.CreateElementForGapFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CreateElementForGapFuncNative (NativeCallback); + } + + public static GES.CreateElementForGapFunc GetManagedDelegate (CreateElementForGapFuncNative native) + { + if (native == null) + return null; + CreateElementForGapFuncWrapper wrapper = (CreateElementForGapFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.CreateTrackElementFuncNative.cs b/ges/generated/GES/GESSharp.CreateTrackElementFuncNative.cs new file mode 100644 index 0000000000..650be8d63c --- /dev/null +++ b/ges/generated/GES/GESSharp.CreateTrackElementFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr CreateTrackElementFuncNative(IntPtr clip, int type); + + internal class CreateTrackElementFuncInvoker { + + CreateTrackElementFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CreateTrackElementFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CreateTrackElementFuncInvoker (CreateTrackElementFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CreateTrackElementFuncInvoker (CreateTrackElementFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CreateTrackElementFuncInvoker (CreateTrackElementFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.CreateTrackElementFunc Handler { + get { + return new GES.CreateTrackElementFunc(InvokeNative); + } + } + + GES.TrackElement InvokeNative (GES.Clip clip, GES.TrackType type) + { + GES.TrackElement __result = GLib.Object.GetObject(native_cb (clip == null ? IntPtr.Zero : clip.Handle, (int) type)) as GES.TrackElement; + return __result; + } + } + + internal class CreateTrackElementFuncWrapper { + + public IntPtr NativeCallback (IntPtr clip, int type) + { + try { + GES.TrackElement __ret = managed (GLib.Object.GetObject(clip) as GES.Clip, (GES.TrackType) type); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CreateTrackElementFuncNative NativeDelegate; + GES.CreateTrackElementFunc managed; + + public CreateTrackElementFuncWrapper (GES.CreateTrackElementFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CreateTrackElementFuncNative (NativeCallback); + } + + public static GES.CreateTrackElementFunc GetManagedDelegate (CreateTrackElementFuncNative native) + { + if (native == null) + return null; + CreateTrackElementFuncWrapper wrapper = (CreateTrackElementFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.CreateTrackElementsFuncNative.cs b/ges/generated/GES/GESSharp.CreateTrackElementsFuncNative.cs new file mode 100644 index 0000000000..579cd178f2 --- /dev/null +++ b/ges/generated/GES/GESSharp.CreateTrackElementsFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr CreateTrackElementsFuncNative(IntPtr clip, int type); + + internal class CreateTrackElementsFuncInvoker { + + CreateTrackElementsFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CreateTrackElementsFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CreateTrackElementsFuncInvoker (CreateTrackElementsFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CreateTrackElementsFuncInvoker (CreateTrackElementsFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CreateTrackElementsFuncInvoker (CreateTrackElementsFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.CreateTrackElementsFunc Handler { + get { + return new GES.CreateTrackElementsFunc(InvokeNative); + } + } + + GES.TrackElement[] InvokeNative (GES.Clip clip, GES.TrackType type) + { + GES.TrackElement[] __result = (GES.TrackElement[]) GLib.Marshaller.ListPtrToArray (native_cb (clip == null ? IntPtr.Zero : clip.Handle, (int) type), typeof(GLib.List), false, true, typeof(GES.TrackElement)); + return __result; + } + } + + internal class CreateTrackElementsFuncWrapper { + + public IntPtr NativeCallback (IntPtr clip, int type) + { + try { + GES.TrackElement[] __ret = managed (GLib.Object.GetObject(clip) as GES.Clip, (GES.TrackType) type); + if (release_on_call) + gch.Free (); + return new GLib.List(__ret, typeof (GES.TrackElement), false, true) == null ? IntPtr.Zero : new GLib.List(__ret, typeof (GES.TrackElement), false, true).Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CreateTrackElementsFuncNative NativeDelegate; + GES.CreateTrackElementsFunc managed; + + public CreateTrackElementsFuncWrapper (GES.CreateTrackElementsFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CreateTrackElementsFuncNative (NativeCallback); + } + + public static GES.CreateTrackElementsFunc GetManagedDelegate (CreateTrackElementsFuncNative native) + { + if (native == null) + return null; + CreateTrackElementsFuncWrapper wrapper = (CreateTrackElementsFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.ExtractableCheckIdNative.cs b/ges/generated/GES/GESSharp.ExtractableCheckIdNative.cs new file mode 100644 index 0000000000..1fa166731f --- /dev/null +++ b/ges/generated/GES/GESSharp.ExtractableCheckIdNative.cs @@ -0,0 +1,101 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr ExtractableCheckIdNative(IntPtr type, IntPtr id, out IntPtr error); + + internal class ExtractableCheckIdInvoker { + + ExtractableCheckIdNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ExtractableCheckIdInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ExtractableCheckIdInvoker (ExtractableCheckIdNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ExtractableCheckIdInvoker (ExtractableCheckIdNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ExtractableCheckIdInvoker (ExtractableCheckIdNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.ExtractableCheckId Handler { + get { + return new GES.ExtractableCheckId(InvokeNative); + } + } + + string InvokeNative (GLib.GType type, string id) + { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + IntPtr error = IntPtr.Zero; + string __result = GLib.Marshaller.PtrToStringGFree(native_cb (type.Val, native_id, out error)); + GLib.Marshaller.Free (native_id); + return __result; + } + } + + internal class ExtractableCheckIdWrapper { + + public IntPtr NativeCallback (IntPtr type, IntPtr id, out IntPtr error) + { + error = IntPtr.Zero; + + try { + string __ret = managed (new GLib.GType(type), GLib.Marshaller.Utf8PtrToString (id)); + if (release_on_call) + gch.Free (); + return GLib.Marshaller.StringToPtrGStrdup(__ret); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ExtractableCheckIdNative NativeDelegate; + GES.ExtractableCheckId managed; + + public ExtractableCheckIdWrapper (GES.ExtractableCheckId managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ExtractableCheckIdNative (NativeCallback); + } + + public static GES.ExtractableCheckId GetManagedDelegate (ExtractableCheckIdNative native) + { + if (native == null) + return null; + ExtractableCheckIdWrapper wrapper = (ExtractableCheckIdWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.FillTrackElementFuncNative.cs b/ges/generated/GES/GESSharp.FillTrackElementFuncNative.cs new file mode 100644 index 0000000000..575df8e4ff --- /dev/null +++ b/ges/generated/GES/GESSharp.FillTrackElementFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool FillTrackElementFuncNative(IntPtr clip, IntPtr track_element, IntPtr nleobj); + + internal class FillTrackElementFuncInvoker { + + FillTrackElementFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~FillTrackElementFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal FillTrackElementFuncInvoker (FillTrackElementFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal FillTrackElementFuncInvoker (FillTrackElementFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal FillTrackElementFuncInvoker (FillTrackElementFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.FillTrackElementFunc Handler { + get { + return new GES.FillTrackElementFunc(InvokeNative); + } + } + + bool InvokeNative (GES.Clip clip, GES.TrackElement track_element, Gst.Element nleobj) + { + bool __result = native_cb (clip == null ? IntPtr.Zero : clip.Handle, track_element == null ? IntPtr.Zero : track_element.Handle, nleobj == null ? IntPtr.Zero : nleobj.Handle); + return __result; + } + } + + internal class FillTrackElementFuncWrapper { + + public bool NativeCallback (IntPtr clip, IntPtr track_element, IntPtr nleobj) + { + try { + bool __ret = managed (GLib.Object.GetObject(clip) as GES.Clip, GLib.Object.GetObject(track_element) as GES.TrackElement, GLib.Object.GetObject(nleobj) as Gst.Element); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal FillTrackElementFuncNative NativeDelegate; + GES.FillTrackElementFunc managed; + + public FillTrackElementFuncWrapper (GES.FillTrackElementFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new FillTrackElementFuncNative (NativeCallback); + } + + public static GES.FillTrackElementFunc GetManagedDelegate (FillTrackElementFuncNative native) + { + if (native == null) + return null; + FillTrackElementFuncWrapper wrapper = (FillTrackElementFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.FormatterCanLoadURIMethodNative.cs b/ges/generated/GES/GESSharp.FormatterCanLoadURIMethodNative.cs new file mode 100644 index 0000000000..659458d443 --- /dev/null +++ b/ges/generated/GES/GESSharp.FormatterCanLoadURIMethodNative.cs @@ -0,0 +1,100 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool FormatterCanLoadURIMethodNative(IntPtr dummy_instance, IntPtr uri, out IntPtr error); + + internal class FormatterCanLoadURIMethodInvoker { + + FormatterCanLoadURIMethodNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~FormatterCanLoadURIMethodInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal FormatterCanLoadURIMethodInvoker (FormatterCanLoadURIMethodNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal FormatterCanLoadURIMethodInvoker (FormatterCanLoadURIMethodNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal FormatterCanLoadURIMethodInvoker (FormatterCanLoadURIMethodNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.FormatterCanLoadURIMethod Handler { + get { + return new GES.FormatterCanLoadURIMethod(InvokeNative); + } + } + + bool InvokeNative (GES.Formatter dummy_instance, string uri) + { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool __result = native_cb (dummy_instance == null ? IntPtr.Zero : dummy_instance.Handle, native_uri, out error); + GLib.Marshaller.Free (native_uri); + return __result; + } + } + + internal class FormatterCanLoadURIMethodWrapper { + + public bool NativeCallback (IntPtr dummy_instance, IntPtr uri, out IntPtr error) + { + error = IntPtr.Zero; + + try { + bool __ret = managed (GLib.Object.GetObject(dummy_instance) as GES.Formatter, GLib.Marshaller.Utf8PtrToString (uri)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal FormatterCanLoadURIMethodNative NativeDelegate; + GES.FormatterCanLoadURIMethod managed; + + public FormatterCanLoadURIMethodWrapper (GES.FormatterCanLoadURIMethod managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new FormatterCanLoadURIMethodNative (NativeCallback); + } + + public static GES.FormatterCanLoadURIMethod GetManagedDelegate (FormatterCanLoadURIMethodNative native) + { + if (native == null) + return null; + FormatterCanLoadURIMethodWrapper wrapper = (FormatterCanLoadURIMethodWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.FormatterLoadFromURIMethodNative.cs b/ges/generated/GES/GESSharp.FormatterLoadFromURIMethodNative.cs new file mode 100644 index 0000000000..61b19dcdca --- /dev/null +++ b/ges/generated/GES/GESSharp.FormatterLoadFromURIMethodNative.cs @@ -0,0 +1,100 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool FormatterLoadFromURIMethodNative(IntPtr formatter, IntPtr timeline, IntPtr uri, out IntPtr error); + + internal class FormatterLoadFromURIMethodInvoker { + + FormatterLoadFromURIMethodNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~FormatterLoadFromURIMethodInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal FormatterLoadFromURIMethodInvoker (FormatterLoadFromURIMethodNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal FormatterLoadFromURIMethodInvoker (FormatterLoadFromURIMethodNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal FormatterLoadFromURIMethodInvoker (FormatterLoadFromURIMethodNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.FormatterLoadFromURIMethod Handler { + get { + return new GES.FormatterLoadFromURIMethod(InvokeNative); + } + } + + bool InvokeNative (GES.Formatter formatter, GES.Timeline timeline, string uri) + { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool __result = native_cb (formatter == null ? IntPtr.Zero : formatter.Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, out error); + GLib.Marshaller.Free (native_uri); + return __result; + } + } + + internal class FormatterLoadFromURIMethodWrapper { + + public bool NativeCallback (IntPtr formatter, IntPtr timeline, IntPtr uri, out IntPtr error) + { + error = IntPtr.Zero; + + try { + bool __ret = managed (GLib.Object.GetObject(formatter) as GES.Formatter, GLib.Object.GetObject(timeline) as GES.Timeline, GLib.Marshaller.Utf8PtrToString (uri)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal FormatterLoadFromURIMethodNative NativeDelegate; + GES.FormatterLoadFromURIMethod managed; + + public FormatterLoadFromURIMethodWrapper (GES.FormatterLoadFromURIMethod managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new FormatterLoadFromURIMethodNative (NativeCallback); + } + + public static GES.FormatterLoadFromURIMethod GetManagedDelegate (FormatterLoadFromURIMethodNative native) + { + if (native == null) + return null; + FormatterLoadFromURIMethodWrapper wrapper = (FormatterLoadFromURIMethodWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.FormatterSaveToURIMethodNative.cs b/ges/generated/GES/GESSharp.FormatterSaveToURIMethodNative.cs new file mode 100644 index 0000000000..3d85392c6a --- /dev/null +++ b/ges/generated/GES/GESSharp.FormatterSaveToURIMethodNative.cs @@ -0,0 +1,100 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool FormatterSaveToURIMethodNative(IntPtr formatter, IntPtr timeline, IntPtr uri, bool overwrite, out IntPtr error); + + internal class FormatterSaveToURIMethodInvoker { + + FormatterSaveToURIMethodNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~FormatterSaveToURIMethodInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal FormatterSaveToURIMethodInvoker (FormatterSaveToURIMethodNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal FormatterSaveToURIMethodInvoker (FormatterSaveToURIMethodNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal FormatterSaveToURIMethodInvoker (FormatterSaveToURIMethodNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.FormatterSaveToURIMethod Handler { + get { + return new GES.FormatterSaveToURIMethod(InvokeNative); + } + } + + bool InvokeNative (GES.Formatter formatter, GES.Timeline timeline, string uri, bool overwrite) + { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool __result = native_cb (formatter == null ? IntPtr.Zero : formatter.Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, overwrite, out error); + GLib.Marshaller.Free (native_uri); + return __result; + } + } + + internal class FormatterSaveToURIMethodWrapper { + + public bool NativeCallback (IntPtr formatter, IntPtr timeline, IntPtr uri, bool overwrite, out IntPtr error) + { + error = IntPtr.Zero; + + try { + bool __ret = managed (GLib.Object.GetObject(formatter) as GES.Formatter, GLib.Object.GetObject(timeline) as GES.Timeline, GLib.Marshaller.Utf8PtrToString (uri), overwrite); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal FormatterSaveToURIMethodNative NativeDelegate; + GES.FormatterSaveToURIMethod managed; + + public FormatterSaveToURIMethodWrapper (GES.FormatterSaveToURIMethod managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new FormatterSaveToURIMethodNative (NativeCallback); + } + + public static GES.FormatterSaveToURIMethod GetManagedDelegate (FormatterSaveToURIMethodNative native) + { + if (native == null) + return null; + FormatterSaveToURIMethodWrapper wrapper = (FormatterSaveToURIMethodWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/GESSharp.MetaForeachFuncNative.cs b/ges/generated/GES/GESSharp.MetaForeachFuncNative.cs new file mode 100644 index 0000000000..b13ca17455 --- /dev/null +++ b/ges/generated/GES/GESSharp.MetaForeachFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GESSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MetaForeachFuncNative(IntPtr container, IntPtr key, IntPtr value, IntPtr user_data); + + internal class MetaForeachFuncInvoker { + + MetaForeachFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MetaForeachFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MetaForeachFuncInvoker (MetaForeachFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MetaForeachFuncInvoker (MetaForeachFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MetaForeachFuncInvoker (MetaForeachFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GES.MetaForeachFunc Handler { + get { + return new GES.MetaForeachFunc(InvokeNative); + } + } + + void InvokeNative (GES.IMetaContainer container, string key, GLib.Value value) + { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + native_cb (container == null ? IntPtr.Zero : ((container is GLib.Object) ? (container as GLib.Object).Handle : (container as GES.MetaContainerAdapter).Handle), native_key, native_value, __data); + GLib.Marshaller.Free (native_key); + Marshal.FreeHGlobal (native_value); + } + } + + internal class MetaForeachFuncWrapper { + + public void NativeCallback (IntPtr container, IntPtr key, IntPtr value, IntPtr user_data) + { + try { + managed (GES.MetaContainerAdapter.GetObject (container, false), GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MetaForeachFuncNative NativeDelegate; + GES.MetaForeachFunc managed; + + public MetaForeachFuncWrapper (GES.MetaForeachFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MetaForeachFuncNative (NativeCallback); + } + + public static GES.MetaForeachFunc GetManagedDelegate (MetaForeachFuncNative native) + { + if (native == null) + return null; + MetaForeachFuncWrapper wrapper = (MetaForeachFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GES/Global.cs b/ges/generated/GES/Global.cs new file mode 100644 index 0000000000..1ed283c8e3 --- /dev/null +++ b/ges/generated/GES/Global.cs @@ -0,0 +1,153 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_add_missing_uri_relocation_uri(IntPtr uri, bool recurse); + + public static bool AddMissingUriRelocationUri(string uri, bool recurse) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + bool raw_ret = ges_add_missing_uri_relocation_uri(native_uri, recurse); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_deinit(); + + public static void Deinit() { + ges_deinit(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_edge_name(int edge); + + public static string EdgeName(GES.Edge edge) { + IntPtr raw_ret = ges_edge_name((int) edge); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_edit_mode_name(int mode); + + public static string EditModeName(GES.EditMode mode) { + IntPtr raw_ret = ges_edit_mode_name((int) mode); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_find_formatter_for_uri(IntPtr uri); + + public static GES.Asset FindFormatterForUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = ges_find_formatter_for_uri(native_uri); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_init(); + + public static bool Init() { + bool raw_ret = ges_init(); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_is_initialized(); + + public static bool IsInitialized { + get { + bool raw_ret = ges_is_initialized(); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_list_assets(IntPtr filter); + + public static GES.Asset[] ListAssets(GLib.GType filter) { + IntPtr raw_ret = ges_list_assets(filter.Val); + GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, true, typeof(GES.Asset)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_play_sink_convert_frame(IntPtr playsink, IntPtr caps); + + [Obsolete] + public static Gst.Sample PlaySinkConvertFrame(Gst.Element playsink, Gst.Caps caps) { + IntPtr raw_ret = ges_play_sink_convert_frame(playsink == null ? IntPtr.Zero : playsink.Handle, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_pspec_equal(IntPtr key_spec_1, IntPtr key_spec_2); + + public static bool PspecEqual(IntPtr key_spec_1, IntPtr key_spec_2) { + bool raw_ret = ges_pspec_equal(key_spec_1, key_spec_2); + bool ret = raw_ret; + return ret; + } + + public static bool PspecEqual() { + return PspecEqual (IntPtr.Zero, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_pspec_hash(IntPtr key_spec); + + public static uint PspecHash(IntPtr key_spec) { + uint raw_ret = ges_pspec_hash(key_spec); + uint ret = raw_ret; + return ret; + } + + public static uint PspecHash() { + return PspecHash (IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_type_name(int type); + + public static string TrackTypeName(GES.TrackType type) { + IntPtr raw_ret = ges_track_type_name((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_validate_register_action_types(); + + public static bool ValidateRegisterActionTypes() { + bool raw_ret = ges_validate_register_action_types(); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_version(out uint major, out uint minor, out uint micro, out uint nano); + + public static void Version(out uint major, out uint minor, out uint micro, out uint nano) { + ges_version(out major, out minor, out micro, out nano); + } + +#endregion + } +} diff --git a/ges/generated/GES/Group.cs b/ges/generated/GES/Group.cs new file mode 100644 index 0000000000..723bc77fca --- /dev/null +++ b/ges/generated/GES/Group.cs @@ -0,0 +1,177 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Group : GES.Container { + + public Group (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_group_new(); + + public Group () : base (IntPtr.Zero) + { + if (GetType () != typeof (Group)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_group_new(); + } + + [GLib.Property ("duration")] + public new ulong Duration { + get { + GLib.Value val = GetProperty ("duration"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("duration", val); + val.Dispose (); + } + } + + [GLib.Property ("in-point")] + public new ulong InPoint { + get { + GLib.Value val = GetProperty ("in-point"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("in-point", val); + val.Dispose (); + } + } + + [GLib.Property ("max-duration")] + public new ulong MaxDuration { + get { + GLib.Value val = GetProperty ("max-duration"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-duration", val); + val.Dispose (); + } + } + + [GLib.Property ("priority")] + public new uint Priority { + get { + GLib.Value val = GetProperty ("priority"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("priority", val); + val.Dispose (); + } + } + + [GLib.Property ("start")] + public new ulong Start { + get { + GLib.Value val = GetProperty ("start"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("start", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Container.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_group_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_group_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static Group () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Container.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/GroupAddedHandler.cs b/ges/generated/GES/GroupAddedHandler.cs new file mode 100644 index 0000000000..da0c424085 --- /dev/null +++ b/ges/generated/GES/GroupAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void GroupAddedHandler(object o, GroupAddedArgs args); + + public class GroupAddedArgs : GLib.SignalArgs { + public GES.Group Group{ + get { + return (GES.Group) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/IExtractable.cs b/ges/generated/GES/IExtractable.cs new file mode 100644 index 0000000000..ad6e0d03bf --- /dev/null +++ b/ges/generated/GES/IExtractable.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + +#region Autogenerated code + public partial interface IExtractable : GLib.IWrapper { + + GES.Asset Asset { + get; + } + string Id { + get; + } + bool SetAsset(GES.Asset asset); + } + + [GLib.GInterface (typeof (ExtractableAdapter))] + public partial interface IExtractableImplementor : GLib.IWrapper { + + GES.Asset Asset { set; } + string Id { get; } + } +#endregion +} diff --git a/ges/generated/GES/IMetaContainer.cs b/ges/generated/GES/IMetaContainer.cs new file mode 100644 index 0000000000..fd545f163b --- /dev/null +++ b/ges/generated/GES/IMetaContainer.cs @@ -0,0 +1,56 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + +#region Autogenerated code + public partial interface IMetaContainer : GLib.IWrapper { + + event GES.NotifyMetaHandler NotifyMeta; + bool AddMetasFromString(string str); + bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type); + void Foreach(GES.MetaForeachFunc func); + bool GetBoolean(string meta_item, out bool dest); + bool GetDateTime(string meta_item, out Gst.DateTime dest); + bool GetDouble(string meta_item, out double dest); + bool GetFloat(string meta_item, out float dest); + bool GetInt(string meta_item, out int dest); + bool GetInt64(string meta_item, out long dest); + GES.MarkerList GetMarkerList(string key); + GLib.Value GetMeta(string key); + string GetString(string meta_item); + bool GetUint(string meta_item, out uint dest); + bool GetUint64(string meta_item, out ulong dest); + string MetasToString(); + bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value); + bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value); + bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value); + bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value); + bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value); + bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value); + bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value); + bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value); + bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value); + bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value); + bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type); + bool SetBoolean(string meta_item, bool value); + bool SetDateTime(string meta_item, Gst.DateTime value); + bool SetDouble(string meta_item, double value); + bool SetFloat(string meta_item, float value); + bool SetInt(string meta_item, int value); + bool SetInt64(string meta_item, long value); + bool SetMarkerList(string meta_item, GES.MarkerList list); + bool SetMeta(string meta_item, GLib.Value value); + bool SetString(string meta_item, string value); + bool SetUint(string meta_item, uint value); + bool SetUint64(string meta_item, ulong value); + } + + [GLib.GInterface (typeof (MetaContainerAdapter))] + public partial interface IMetaContainerImplementor : GLib.IWrapper { + + } +#endregion +} diff --git a/ges/generated/GES/ImageSource.cs b/ges/generated/GES/ImageSource.cs new file mode 100644 index 0000000000..e423bbea09 --- /dev/null +++ b/ges/generated/GES/ImageSource.cs @@ -0,0 +1,114 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Obsolete] + public partial class ImageSource : GES.VideoSource { + + public ImageSource (IntPtr raw) : base(raw) {} + + protected ImageSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("uri")] + public string Uri { + get { + GLib.Value val = GetProperty ("uri"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.VideoSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_image_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_image_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static ImageSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("uri" + , GES.VideoSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "uri" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Layer.cs b/ges/generated/GES/Layer.cs new file mode 100644 index 0000000000..667037013f --- /dev/null +++ b/ges/generated/GES/Layer.cs @@ -0,0 +1,1091 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Layer : GLib.InitiallyUnowned, GES.IExtractable, GES.IMetaContainer { + + public Layer (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_new(); + + public Layer () : base (IntPtr.Zero) + { + if (GetType () != typeof (Layer)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_layer_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_get_auto_transition(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_layer_set_auto_transition(IntPtr raw, bool auto_transition); + + [GLib.Property ("auto-transition")] + public bool AutoTransition { + get { + bool raw_ret = ges_layer_get_auto_transition(Handle); + bool ret = raw_ret; + return ret; + } + set { + ges_layer_set_auto_transition(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_layer_get_priority(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_layer_set_priority(IntPtr raw, uint priority); + + [Obsolete] + [GLib.Property ("priority")] + public uint Priority { + get { + uint raw_ret = ges_layer_get_priority(Handle); + uint ret = raw_ret; + return ret; + } + set { + ges_layer_set_priority(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_get_timeline(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_layer_set_timeline(IntPtr raw, IntPtr timeline); + + public GES.Timeline Timeline { + get { + IntPtr raw_ret = ges_layer_get_timeline(Handle); + GES.Timeline ret = GLib.Object.GetObject(raw_ret) as GES.Timeline; + return ret; + } + set { + ges_layer_set_timeline(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + public uint MinNlePriority { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("min_nle_priority")); + return (*raw_ptr); + } + } + } + + public uint MaxNlePriority { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("max_nle_priority")); + return (*raw_ptr); + } + } + } + + [GLib.Signal("clip-removed")] + public event GES.ClipRemovedHandler ClipRemoved { + add { + this.AddSignalHandler ("clip-removed", value, typeof (GES.ClipRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("clip-removed", value); + } + } + + [GLib.Signal("clip-added")] + public event GES.ClipAddedHandler ClipAdded { + add { + this.AddSignalHandler ("clip-added", value, typeof (GES.ClipAddedArgs)); + } + remove { + this.RemoveSignalHandler ("clip-added", value); + } + } + + static ClipAddedNativeDelegate ClipAdded_cb_delegate; + static ClipAddedNativeDelegate ClipAddedVMCallback { + get { + if (ClipAdded_cb_delegate == null) + ClipAdded_cb_delegate = new ClipAddedNativeDelegate (ClipAdded_cb); + return ClipAdded_cb_delegate; + } + } + + static void OverrideClipAdded (GLib.GType gtype) + { + OverrideClipAdded (gtype, ClipAddedVMCallback); + } + + static void OverrideClipAdded (GLib.GType gtype, ClipAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "clip-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ClipAddedNativeDelegate (IntPtr inst, IntPtr clip); + + static void ClipAdded_cb (IntPtr inst, IntPtr clip) + { + try { + Layer __obj = GLib.Object.GetObject (inst, false) as Layer; + __obj.OnClipAdded (GLib.Object.GetObject(clip) as GES.Clip); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Layer), ConnectionMethod="OverrideClipAdded")] + protected virtual void OnClipAdded (GES.Clip clip) + { + InternalClipAdded (clip); + } + + private void InternalClipAdded (GES.Clip clip) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (clip); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ClipRemovedNativeDelegate ClipRemoved_cb_delegate; + static ClipRemovedNativeDelegate ClipRemovedVMCallback { + get { + if (ClipRemoved_cb_delegate == null) + ClipRemoved_cb_delegate = new ClipRemovedNativeDelegate (ClipRemoved_cb); + return ClipRemoved_cb_delegate; + } + } + + static void OverrideClipRemoved (GLib.GType gtype) + { + OverrideClipRemoved (gtype, ClipRemovedVMCallback); + } + + static void OverrideClipRemoved (GLib.GType gtype, ClipRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "clip-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ClipRemovedNativeDelegate (IntPtr inst, IntPtr clip); + + static void ClipRemoved_cb (IntPtr inst, IntPtr clip) + { + try { + Layer __obj = GLib.Object.GetObject (inst, false) as Layer; + __obj.OnClipRemoved (GLib.Object.GetObject(clip) as GES.Clip); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Layer), ConnectionMethod="OverrideClipRemoved")] + protected virtual void OnClipRemoved (GES.Clip clip) + { + InternalClipRemoved (clip); + } + + private void InternalClipRemoved (GES.Clip clip) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (clip); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ObjectAddedNativeDelegate ObjectAdded_cb_delegate; + static ObjectAddedNativeDelegate ObjectAddedVMCallback { + get { + if (ObjectAdded_cb_delegate == null) + ObjectAdded_cb_delegate = new ObjectAddedNativeDelegate (ObjectAdded_cb); + return ObjectAdded_cb_delegate; + } + } + + static void OverrideObjectAdded (GLib.GType gtype) + { + OverrideObjectAdded (gtype, ObjectAddedVMCallback); + } + + static void OverrideObjectAdded (GLib.GType gtype, ObjectAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("object_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ObjectAddedNativeDelegate (IntPtr inst, IntPtr _object); + + static void ObjectAdded_cb (IntPtr inst, IntPtr _object) + { + try { + Layer __obj = GLib.Object.GetObject (inst, false) as Layer; + __obj.OnObjectAdded (GLib.Object.GetObject(_object) as GES.Clip); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Layer), ConnectionMethod="OverrideObjectAdded")] + protected virtual void OnObjectAdded (GES.Clip _object) + { + InternalObjectAdded (_object); + } + + private void InternalObjectAdded (GES.Clip _object) + { + ObjectAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("object_added")); + unmanaged = (ObjectAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ObjectAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle); + } + + static ObjectRemovedNativeDelegate ObjectRemoved_cb_delegate; + static ObjectRemovedNativeDelegate ObjectRemovedVMCallback { + get { + if (ObjectRemoved_cb_delegate == null) + ObjectRemoved_cb_delegate = new ObjectRemovedNativeDelegate (ObjectRemoved_cb); + return ObjectRemoved_cb_delegate; + } + } + + static void OverrideObjectRemoved (GLib.GType gtype) + { + OverrideObjectRemoved (gtype, ObjectRemovedVMCallback); + } + + static void OverrideObjectRemoved (GLib.GType gtype, ObjectRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("object_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ObjectRemovedNativeDelegate (IntPtr inst, IntPtr _object); + + static void ObjectRemoved_cb (IntPtr inst, IntPtr _object) + { + try { + Layer __obj = GLib.Object.GetObject (inst, false) as Layer; + __obj.OnObjectRemoved (GLib.Object.GetObject(_object) as GES.Clip); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Layer), ConnectionMethod="OverrideObjectRemoved")] + protected virtual void OnObjectRemoved (GES.Clip _object) + { + InternalObjectRemoved (_object); + } + + private void InternalObjectRemoved (GES.Clip _object) + { + ObjectRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("object_removed")); + unmanaged = (ObjectRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ObjectRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_objects" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_objects + , null + , "object_added" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("object_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // object_added + , "get_objects" + , "object_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("object_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // object_removed + , "object_added" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "object_removed" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_layer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_add_asset(IntPtr raw, IntPtr asset, ulong start, ulong inpoint, ulong duration, int track_types); + + public GES.Clip AddAsset(GES.Asset asset, ulong start, ulong inpoint, ulong duration, GES.TrackType track_types) { + IntPtr raw_ret = ges_layer_add_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle, start, inpoint, duration, (int) track_types); + GES.Clip ret = GLib.Object.GetObject(raw_ret) as GES.Clip; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_layer_add_asset_full(IntPtr raw, IntPtr asset, ulong start, ulong inpoint, ulong duration, int track_types, out IntPtr error); + + public unsafe GES.Clip AddAssetFull(GES.Asset asset, ulong start, ulong inpoint, ulong duration, GES.TrackType track_types) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_layer_add_asset_full(Handle, asset == null ? IntPtr.Zero : asset.Handle, start, inpoint, duration, (int) track_types, out error); + GES.Clip ret = GLib.Object.GetObject(raw_ret) as GES.Clip; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_add_clip(IntPtr raw, IntPtr clip); + + public bool AddClip(GES.Clip clip) { + bool raw_ret = ges_layer_add_clip(Handle, clip == null ? IntPtr.Zero : clip.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_layer_add_clip_full(IntPtr raw, IntPtr clip, out IntPtr error); + + public unsafe bool AddClipFull(GES.Clip clip) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_layer_add_clip_full(Handle, clip == null ? IntPtr.Zero : clip.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_get_active_for_track(IntPtr raw, IntPtr track); + + public bool GetActiveForTrack(GES.Track track) { + bool raw_ret = ges_layer_get_active_for_track(Handle, track == null ? IntPtr.Zero : track.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_get_clips(IntPtr raw); + + public GES.Clip[] Clips { + get { + IntPtr raw_ret = ges_layer_get_clips(Handle); + GES.Clip[] ret = (GES.Clip[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Clip)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_layer_get_clips_in_interval(IntPtr raw, ulong start, ulong end); + + public GES.Clip[] GetClipsInInterval(ulong start, ulong end) { + IntPtr raw_ret = ges_layer_get_clips_in_interval(Handle, start, end); + GES.Clip[] ret = (GES.Clip[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Clip)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_layer_get_duration(IntPtr raw); + + public ulong Duration { + get { + ulong raw_ret = ges_layer_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_is_empty(IntPtr raw); + + public bool IsEmpty { + get { + bool raw_ret = ges_layer_is_empty(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_remove_clip(IntPtr raw, IntPtr clip); + + public bool RemoveClip(GES.Clip clip) { + bool raw_ret = ges_layer_remove_clip(Handle, clip == null ? IntPtr.Zero : clip.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_layer_set_active_for_tracks(IntPtr raw, bool active, IntPtr tracks); + + public bool SetActiveForTracks(bool active, GLib.List tracks) { + bool raw_ret = ges_layer_set_active_for_tracks(Handle, active, tracks == null ? IntPtr.Zero : tracks.Handle); + bool ret = raw_ret; + return ret; + } + + public bool SetActiveForTracks(bool active) { + return SetActiveForTracks (active, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_asset(IntPtr raw); + + public GES.Asset Asset { + get { + IntPtr raw_ret = ges_extractable_get_asset(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_id(IntPtr raw); + + public string Id { + get { + IntPtr raw_ret = ges_extractable_get_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_extractable_set_asset(IntPtr raw, IntPtr asset); + + public bool SetAsset(GES.Asset asset) { + bool raw_ret = ges_extractable_set_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.Layer __obj = GLib.Object.GetObject (inst, false) as GES.Layer; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Layer), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + static Layer () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("timeline" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // timeline + , null + , "min_nle_priority" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("min_nle_priority" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // min_nle_priority + , "timeline" + , "max_nle_priority" + , (long) Marshal.OffsetOf(typeof(GESLayer_min_nle_priorityAlign), "min_nle_priority") + , 0 + ), + new GLib.AbiField("max_nle_priority" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // max_nle_priority + , "min_nle_priority" + , "priv" + , (long) Marshal.OffsetOf(typeof(GESLayer_max_nle_priorityAlign), "max_nle_priority") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "max_nle_priority" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESLayer_min_nle_priorityAlign + { + sbyte f1; + private uint min_nle_priority; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESLayer_max_nle_priorityAlign + { + sbyte f1; + private uint max_nle_priority; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/LayerAddedHandler.cs b/ges/generated/GES/LayerAddedHandler.cs new file mode 100644 index 0000000000..d324cd1ba7 --- /dev/null +++ b/ges/generated/GES/LayerAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void LayerAddedHandler(object o, LayerAddedArgs args); + + public class LayerAddedArgs : GLib.SignalArgs { + public GES.Layer Layer{ + get { + return (GES.Layer) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/LayerRemovedHandler.cs b/ges/generated/GES/LayerRemovedHandler.cs new file mode 100644 index 0000000000..a190710fbc --- /dev/null +++ b/ges/generated/GES/LayerRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void LayerRemovedHandler(object o, LayerRemovedArgs args); + + public class LayerRemovedArgs : GLib.SignalArgs { + public GES.Layer Layer{ + get { + return (GES.Layer) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/LoadedHandler.cs b/ges/generated/GES/LoadedHandler.cs new file mode 100644 index 0000000000..15b56b1f71 --- /dev/null +++ b/ges/generated/GES/LoadedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void LoadedHandler(object o, LoadedArgs args); + + public class LoadedArgs : GLib.SignalArgs { + public GES.Timeline Timeline{ + get { + return (GES.Timeline) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/LoadingHandler.cs b/ges/generated/GES/LoadingHandler.cs new file mode 100644 index 0000000000..df6e204209 --- /dev/null +++ b/ges/generated/GES/LoadingHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void LoadingHandler(object o, LoadingArgs args); + + public class LoadingArgs : GLib.SignalArgs { + public GES.Timeline Timeline{ + get { + return (GES.Timeline) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/Marker.cs b/ges/generated/GES/Marker.cs new file mode 100644 index 0000000000..6505fb628a --- /dev/null +++ b/ges/generated/GES/Marker.cs @@ -0,0 +1,562 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Marker : GLib.Object, GES.IMetaContainer { + + public Marker (IntPtr raw) : base(raw) {} + + protected Marker() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("position")] + public ulong Position { + get { + GLib.Value val = GetProperty ("position"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_marker_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_marker_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.Marker __obj = GLib.Object.GetObject (inst, false) as GES.Marker; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Marker), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + static Marker () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/MarkerAddedHandler.cs b/ges/generated/GES/MarkerAddedHandler.cs new file mode 100644 index 0000000000..ec1bc99300 --- /dev/null +++ b/ges/generated/GES/MarkerAddedHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void MarkerAddedHandler(object o, MarkerAddedArgs args); + + public class MarkerAddedArgs : GLib.SignalArgs { + public ulong Position{ + get { + return (ulong) Args [0]; + } + } + + public GES.Marker Marker{ + get { + return (GES.Marker) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/MarkerList.cs b/ges/generated/GES/MarkerList.cs new file mode 100644 index 0000000000..8e396b943e --- /dev/null +++ b/ges/generated/GES/MarkerList.cs @@ -0,0 +1,312 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MarkerList : GLib.Object { + + public MarkerList (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_marker_list_new(); + + public MarkerList () : base (IntPtr.Zero) + { + if (GetType () != typeof (MarkerList)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_marker_list_new(); + } + + [GLib.Signal("marker-added")] + public event GES.MarkerAddedHandler MarkerAdded { + add { + this.AddSignalHandler ("marker-added", value, typeof (GES.MarkerAddedArgs)); + } + remove { + this.RemoveSignalHandler ("marker-added", value); + } + } + + [GLib.Signal("marker-moved")] + public event GES.MarkerMovedHandler MarkerMoved { + add { + this.AddSignalHandler ("marker-moved", value, typeof (GES.MarkerMovedArgs)); + } + remove { + this.RemoveSignalHandler ("marker-moved", value); + } + } + + [GLib.Signal("marker-removed")] + public event GES.MarkerRemovedHandler MarkerRemoved { + add { + this.AddSignalHandler ("marker-removed", value, typeof (GES.MarkerRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("marker-removed", value); + } + } + + static MarkerAddedNativeDelegate MarkerAdded_cb_delegate; + static MarkerAddedNativeDelegate MarkerAddedVMCallback { + get { + if (MarkerAdded_cb_delegate == null) + MarkerAdded_cb_delegate = new MarkerAddedNativeDelegate (MarkerAdded_cb); + return MarkerAdded_cb_delegate; + } + } + + static void OverrideMarkerAdded (GLib.GType gtype) + { + OverrideMarkerAdded (gtype, MarkerAddedVMCallback); + } + + static void OverrideMarkerAdded (GLib.GType gtype, MarkerAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "marker-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void MarkerAddedNativeDelegate (IntPtr inst, ulong position, IntPtr marker); + + static void MarkerAdded_cb (IntPtr inst, ulong position, IntPtr marker) + { + try { + MarkerList __obj = GLib.Object.GetObject (inst, false) as MarkerList; + __obj.OnMarkerAdded (position, GLib.Object.GetObject(marker) as GES.Marker); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.MarkerList), ConnectionMethod="OverrideMarkerAdded")] + protected virtual void OnMarkerAdded (ulong position, GES.Marker marker) + { + InternalMarkerAdded (position, marker); + } + + private void InternalMarkerAdded (ulong position, GES.Marker marker) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (position); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (marker); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static MarkerMovedNativeDelegate MarkerMoved_cb_delegate; + static MarkerMovedNativeDelegate MarkerMovedVMCallback { + get { + if (MarkerMoved_cb_delegate == null) + MarkerMoved_cb_delegate = new MarkerMovedNativeDelegate (MarkerMoved_cb); + return MarkerMoved_cb_delegate; + } + } + + static void OverrideMarkerMoved (GLib.GType gtype) + { + OverrideMarkerMoved (gtype, MarkerMovedVMCallback); + } + + static void OverrideMarkerMoved (GLib.GType gtype, MarkerMovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "marker-moved", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void MarkerMovedNativeDelegate (IntPtr inst, ulong previous_position, ulong new_position, IntPtr marker); + + static void MarkerMoved_cb (IntPtr inst, ulong previous_position, ulong new_position, IntPtr marker) + { + try { + MarkerList __obj = GLib.Object.GetObject (inst, false) as MarkerList; + __obj.OnMarkerMoved (previous_position, new_position, GLib.Object.GetObject(marker) as GES.Marker); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.MarkerList), ConnectionMethod="OverrideMarkerMoved")] + protected virtual void OnMarkerMoved (ulong previous_position, ulong new_position, GES.Marker marker) + { + InternalMarkerMoved (previous_position, new_position, marker); + } + + private void InternalMarkerMoved (ulong previous_position, ulong new_position, GES.Marker marker) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (4); + GLib.Value[] vals = new GLib.Value [4]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (previous_position); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (new_position); + inst_and_params.Append (vals [2]); + vals [3] = new GLib.Value (marker); + inst_and_params.Append (vals [3]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static MarkerRemovedNativeDelegate MarkerRemoved_cb_delegate; + static MarkerRemovedNativeDelegate MarkerRemovedVMCallback { + get { + if (MarkerRemoved_cb_delegate == null) + MarkerRemoved_cb_delegate = new MarkerRemovedNativeDelegate (MarkerRemoved_cb); + return MarkerRemoved_cb_delegate; + } + } + + static void OverrideMarkerRemoved (GLib.GType gtype) + { + OverrideMarkerRemoved (gtype, MarkerRemovedVMCallback); + } + + static void OverrideMarkerRemoved (GLib.GType gtype, MarkerRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "marker-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void MarkerRemovedNativeDelegate (IntPtr inst, IntPtr marker); + + static void MarkerRemoved_cb (IntPtr inst, IntPtr marker) + { + try { + MarkerList __obj = GLib.Object.GetObject (inst, false) as MarkerList; + __obj.OnMarkerRemoved (GLib.Object.GetObject(marker) as GES.Marker); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.MarkerList), ConnectionMethod="OverrideMarkerRemoved")] + protected virtual void OnMarkerRemoved (GES.Marker marker) + { + InternalMarkerRemoved (marker); + } + + private void InternalMarkerRemoved (GES.Marker marker) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (marker); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_marker_list_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_marker_list_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_marker_list_add(IntPtr raw, ulong position); + + public GES.Marker Add(ulong position) { + IntPtr raw_ret = ges_marker_list_add(Handle, position); + GES.Marker ret = GLib.Object.GetObject(raw_ret) as GES.Marker; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_marker_list_get_markers(IntPtr raw); + + public GES.Marker[] Markers { + get { + IntPtr raw_ret = ges_marker_list_get_markers(Handle); + GES.Marker[] ret = (GES.Marker[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Marker)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_marker_list_move(IntPtr raw, IntPtr marker, ulong position); + + public bool Move(GES.Marker marker, ulong position) { + bool raw_ret = ges_marker_list_move(Handle, marker == null ? IntPtr.Zero : marker.Handle, position); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_marker_list_remove(IntPtr raw, IntPtr marker); + + public bool Remove(GES.Marker marker) { + bool raw_ret = ges_marker_list_remove(Handle, marker == null ? IntPtr.Zero : marker.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_marker_list_size(IntPtr raw); + + public uint Size() { + uint raw_ret = ges_marker_list_size(Handle); + uint ret = raw_ret; + return ret; + } + + + static MarkerList () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/MarkerMovedHandler.cs b/ges/generated/GES/MarkerMovedHandler.cs new file mode 100644 index 0000000000..8b582d2c7a --- /dev/null +++ b/ges/generated/GES/MarkerMovedHandler.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void MarkerMovedHandler(object o, MarkerMovedArgs args); + + public class MarkerMovedArgs : GLib.SignalArgs { + public ulong PreviousPosition{ + get { + return (ulong) Args [0]; + } + } + + public ulong NewPosition{ + get { + return (ulong) Args [1]; + } + } + + public GES.Marker Marker{ + get { + return (GES.Marker) Args [2]; + } + } + + } +} diff --git a/ges/generated/GES/MarkerRemovedHandler.cs b/ges/generated/GES/MarkerRemovedHandler.cs new file mode 100644 index 0000000000..b91edaeba0 --- /dev/null +++ b/ges/generated/GES/MarkerRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void MarkerRemovedHandler(object o, MarkerRemovedArgs args); + + public class MarkerRemovedArgs : GLib.SignalArgs { + public GES.Marker Marker{ + get { + return (GES.Marker) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/MetaContainerAdapter.cs b/ges/generated/GES/MetaContainerAdapter.cs new file mode 100644 index 0000000000..9ec9688c6e --- /dev/null +++ b/ges/generated/GES/MetaContainerAdapter.cs @@ -0,0 +1,537 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MetaContainerAdapter : GLib.GInterfaceAdapter, GES.IMetaContainer { + + [StructLayout (LayoutKind.Sequential)] + struct GESMetaContainerInterface { + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public IntPtr[] _gesGesReserved; + } + + static GESMetaContainerInterface iface; + + static MetaContainerAdapter () + { + GLib.GType.Register (_gtype, typeof (MetaContainerAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public MetaContainerAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public MetaContainerAdapter (IMetaContainerImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public MetaContainerAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_type(); + + private static GLib.GType _gtype = new GLib.GType (ges_meta_container_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IMetaContainer GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IMetaContainer GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IMetaContainerImplementor) + return new MetaContainerAdapter (obj as IMetaContainerImplementor); + else if (obj as IMetaContainer == null) + return new MetaContainerAdapter (obj.Handle); + else + return obj as IMetaContainer; + } + + public IMetaContainerImplementor Implementor { + get { + return implementor as IMetaContainerImplementor; + } + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + GLib.Object.GetObject (Handle).AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + GLib.Object.GetObject (Handle).RemoveSignalHandler ("notify-meta", value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + +#endregion + } +} diff --git a/ges/generated/GES/MetaFlag.cs b/ges/generated/GES/MetaFlag.cs new file mode 100644 index 0000000000..a2bc960e1c --- /dev/null +++ b/ges/generated/GES/MetaFlag.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (GES.MetaFlagGType))] + public enum MetaFlag : uint { + + Readable = 1, + Writable = 2, + Readwrite = 3, + } + + internal class MetaFlagGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_flag_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_meta_flag_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/MetaForeachFunc.cs b/ges/generated/GES/MetaForeachFunc.cs new file mode 100644 index 0000000000..aa1ae5b07c --- /dev/null +++ b/ges/generated/GES/MetaForeachFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void MetaForeachFunc(GES.IMetaContainer container, string key, GLib.Value value); + +} diff --git a/ges/generated/GES/MultiFileSource.cs b/ges/generated/GES/MultiFileSource.cs new file mode 100644 index 0000000000..b45f943a50 --- /dev/null +++ b/ges/generated/GES/MultiFileSource.cs @@ -0,0 +1,127 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Obsolete] + public partial class MultiFileSource : GES.VideoSource { + + public MultiFileSource (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_multi_file_source_new(IntPtr uri); + + public MultiFileSource (string uri) : base (IntPtr.Zero) + { + if (GetType () != typeof (MultiFileSource)) { + var vals = new List (); + var names = new List (); + names.Add ("uri"); + vals.Add (new GLib.Value (uri)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + Raw = ges_multi_file_source_new(native_uri); + GLib.Marshaller.Free (native_uri); + } + + [GLib.Property ("uri")] + public string Uri { + get { + GLib.Value val = GetProperty ("uri"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.VideoSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_multi_file_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_multi_file_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static MultiFileSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("uri" + , GES.VideoSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "uri" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/NotifyMetaHandler.cs b/ges/generated/GES/NotifyMetaHandler.cs new file mode 100644 index 0000000000..5612a84efa --- /dev/null +++ b/ges/generated/GES/NotifyMetaHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void NotifyMetaHandler(object o, NotifyMetaArgs args); + + public class NotifyMetaArgs : GLib.SignalArgs { + public string Key{ + get { + return (string) Args [0]; + } + } + + public GLib.Value Value{ + get { + return (GLib.Value) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/Operation.cs b/ges/generated/GES/Operation.cs new file mode 100644 index 0000000000..cd00ac36bf --- /dev/null +++ b/ges/generated/GES/Operation.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Operation : GES.TrackElement { + + protected Operation (IntPtr raw) : base(raw) {} + + protected Operation() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.TrackElement.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_operation_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_operation_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static Operation () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.TrackElement.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/OperationClip.cs b/ges/generated/GES/OperationClip.cs new file mode 100644 index 0000000000..869d836976 --- /dev/null +++ b/ges/generated/GES/OperationClip.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class OperationClip : GES.Clip { + + protected OperationClip (IntPtr raw) : base(raw) {} + + protected OperationClip() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Clip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_operation_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_operation_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static OperationClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Clip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/OverlayClip.cs b/ges/generated/GES/OverlayClip.cs new file mode 100644 index 0000000000..3e94c8138f --- /dev/null +++ b/ges/generated/GES/OverlayClip.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class OverlayClip : GES.OperationClip { + + protected OverlayClip (IntPtr raw) : base(raw) {} + + protected OverlayClip() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.OperationClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_overlay_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_overlay_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static OverlayClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.OperationClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Pipeline.cs b/ges/generated/GES/Pipeline.cs new file mode 100644 index 0000000000..ad81eafa1c --- /dev/null +++ b/ges/generated/GES/Pipeline.cs @@ -0,0 +1,334 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Pipeline : Gst.Pipeline, Gst.Video.IVideoOverlay { + + public Pipeline (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_new(); + + public Pipeline () : base (IntPtr.Zero) + { + if (GetType () != typeof (Pipeline)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_pipeline_new(); + } + + [GLib.Property ("audio-filter")] + public Gst.Element AudioFilter { + get { + GLib.Value val = GetProperty ("audio-filter"); + Gst.Element ret = (Gst.Element) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("audio-filter", val); + val.Dispose (); + } + } + + [GLib.Property ("audio-sink")] + public Gst.Element AudioSink { + get { + GLib.Value val = GetProperty ("audio-sink"); + Gst.Element ret = (Gst.Element) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("audio-sink", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_pipeline_get_mode(IntPtr raw); + + [GLib.Property ("mode")] + public GES.PipelineFlags Mode { + get { + int raw_ret = ges_pipeline_get_mode(Handle); + GES.PipelineFlags ret = (GES.PipelineFlags) raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("mode", val); + val.Dispose (); + } + } + + [GLib.Property ("timeline")] + public GES.Timeline Timeline { + get { + GLib.Value val = GetProperty ("timeline"); + GES.Timeline ret = (GES.Timeline) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("timeline", val); + val.Dispose (); + } + } + + [GLib.Property ("video-filter")] + public Gst.Element VideoFilter { + get { + GLib.Value val = GetProperty ("video-filter"); + Gst.Element ret = (Gst.Element) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("video-filter", val); + val.Dispose (); + } + } + + [GLib.Property ("video-sink")] + public Gst.Element VideoSink { + get { + GLib.Value val = GetProperty ("video-sink"); + Gst.Element ret = (Gst.Element) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("video-sink", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , Gst.Pipeline.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_pipeline_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_get_thumbnail(IntPtr raw, IntPtr caps); + + public Gst.Sample GetThumbnail(Gst.Caps caps) { + IntPtr raw_ret = ges_pipeline_get_thumbnail(Handle, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_get_thumbnail_rgb24(IntPtr raw, int width, int height); + + public Gst.Sample GetThumbnailRgb24(int width, int height) { + IntPtr raw_ret = ges_pipeline_get_thumbnail_rgb24(Handle, width, height); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_preview_get_audio_sink(IntPtr raw); + + public Gst.Element PreviewGetAudioSink() { + IntPtr raw_ret = ges_pipeline_preview_get_audio_sink(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_preview_get_video_sink(IntPtr raw); + + public Gst.Element PreviewGetVideoSink() { + IntPtr raw_ret = ges_pipeline_preview_get_video_sink(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_pipeline_preview_set_audio_sink(IntPtr raw, IntPtr sink); + + public void PreviewSetAudioSink(Gst.Element sink) { + ges_pipeline_preview_set_audio_sink(Handle, sink == null ? IntPtr.Zero : sink.Handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_pipeline_preview_set_video_sink(IntPtr raw, IntPtr sink); + + public void PreviewSetVideoSink(Gst.Element sink) { + ges_pipeline_preview_set_video_sink(Handle, sink == null ? IntPtr.Zero : sink.Handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_pipeline_save_thumbnail(IntPtr raw, int width, int height, IntPtr format, IntPtr location, out IntPtr error); + + public unsafe bool SaveThumbnail(int width, int height, string format, string location) { + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_pipeline_save_thumbnail(Handle, width, height, native_format, native_location, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_format); + GLib.Marshaller.Free (native_location); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_pipeline_set_mode(IntPtr raw, int mode); + + public bool SetMode(GES.PipelineFlags mode) { + bool raw_ret = ges_pipeline_set_mode(Handle, (int) mode); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_pipeline_set_render_settings(IntPtr raw, IntPtr output_uri, IntPtr profile); + + public bool SetRenderSettings(string output_uri, Gst.PbUtils.EncodingProfile profile) { + IntPtr native_output_uri = GLib.Marshaller.StringToPtrGStrdup (output_uri); + bool raw_ret = ges_pipeline_set_render_settings(Handle, native_output_uri, profile == null ? IntPtr.Zero : profile.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_output_uri); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_pipeline_set_timeline(IntPtr raw, IntPtr timeline); + + public bool SetTimeline(GES.Timeline timeline) { + bool raw_ret = ges_pipeline_set_timeline(Handle, timeline == null ? IntPtr.Zero : timeline.OwnedHandle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_expose(IntPtr raw); + + public void Expose() { + gst_video_overlay_expose(Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_got_window_handle(IntPtr raw, IntPtr handle); + + public void GotWindowHandle(IntPtr handle) { + gst_video_overlay_got_window_handle(Handle, handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_handle_events(IntPtr raw, bool handle_events); + + public void HandleEvents(bool handle_events) { + gst_video_overlay_handle_events(Handle, handle_events); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_prepare_window_handle(IntPtr raw); + + public void PrepareWindowHandle() { + gst_video_overlay_prepare_window_handle(Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_render_rectangle(IntPtr raw, int x, int y, int width, int height); + + public bool SetRenderRectangle(int x, int y, int width, int height) { + bool raw_ret = gst_video_overlay_set_render_rectangle(Handle, x, y, width, height); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_set_window_handle(IntPtr raw, IntPtr handle); + + public IntPtr WindowHandle { + set { + gst_video_overlay_set_window_handle(Handle, value); + } + } + + + static Pipeline () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Pipeline.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/PipelineFlags.cs b/ges/generated/GES/PipelineFlags.cs new file mode 100644 index 0000000000..0cbf0dbce1 --- /dev/null +++ b/ges/generated/GES/PipelineFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (GES.PipelineFlagsGType))] + public enum PipelineFlags : uint { + + AudioPreview = 1, + VideoPreview = 2, + FullPreview = 3, + Render = 4, + SmartRender = 8, + } + + internal class PipelineFlagsGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pipeline_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_pipeline_flags_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/PitiviFormatter.cs b/ges/generated/GES/PitiviFormatter.cs new file mode 100644 index 0000000000..a1b2c13070 --- /dev/null +++ b/ges/generated/GES/PitiviFormatter.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PitiviFormatter : GES.Formatter { + + public PitiviFormatter (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pitivi_formatter_new(); + + public PitiviFormatter () : base (IntPtr.Zero) + { + if (GetType () != typeof (PitiviFormatter)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_pitivi_formatter_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Formatter.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_pitivi_formatter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_pitivi_formatter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static PitiviFormatter () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Formatter.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Project.cs b/ges/generated/GES/Project.cs new file mode 100644 index 0000000000..732355e17f --- /dev/null +++ b/ges/generated/GES/Project.cs @@ -0,0 +1,625 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Project : GES.Asset { + + public Project (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_new(IntPtr uri); + + public Project (string uri) : base (IntPtr.Zero) + { + if (GetType () != typeof (Project)) { + var vals = new List (); + var names = new List (); + names.Add ("uri"); + vals.Add (new GLib.Value (uri)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + Raw = ges_project_new(native_uri); + GLib.Marshaller.Free (native_uri); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_get_uri(IntPtr raw); + + [GLib.Property ("uri")] + public string Uri { + get { + IntPtr raw_ret = ges_project_get_uri(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [GLib.Signal("loaded")] + public event GES.LoadedHandler Loaded { + add { + this.AddSignalHandler ("loaded", value, typeof (GES.LoadedArgs)); + } + remove { + this.RemoveSignalHandler ("loaded", value); + } + } + + [GLib.Signal("asset-added")] + public event GES.AssetAddedHandler AssetAdded { + add { + this.AddSignalHandler ("asset-added", value, typeof (GES.AssetAddedArgs)); + } + remove { + this.RemoveSignalHandler ("asset-added", value); + } + } + + [GLib.Signal("asset-removed")] + public event GES.AssetRemovedHandler AssetRemoved { + add { + this.AddSignalHandler ("asset-removed", value, typeof (GES.AssetRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("asset-removed", value); + } + } + + [GLib.Signal("loading")] + public event GES.LoadingHandler Loading { + add { + this.AddSignalHandler ("loading", value, typeof (GES.LoadingArgs)); + } + remove { + this.RemoveSignalHandler ("loading", value); + } + } + + [GLib.Signal("asset-loading")] + public event GES.AssetLoadingHandler AssetLoading { + add { + this.AddSignalHandler ("asset-loading", value, typeof (GES.AssetLoadingArgs)); + } + remove { + this.RemoveSignalHandler ("asset-loading", value); + } + } + + static AssetAddedNativeDelegate AssetAdded_cb_delegate; + static AssetAddedNativeDelegate AssetAddedVMCallback { + get { + if (AssetAdded_cb_delegate == null) + AssetAdded_cb_delegate = new AssetAddedNativeDelegate (AssetAdded_cb); + return AssetAdded_cb_delegate; + } + } + + static void OverrideAssetAdded (GLib.GType gtype) + { + OverrideAssetAdded (gtype, AssetAddedVMCallback); + } + + static void OverrideAssetAdded (GLib.GType gtype, AssetAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void AssetAddedNativeDelegate (IntPtr inst, IntPtr asset); + + static void AssetAdded_cb (IntPtr inst, IntPtr asset) + { + try { + Project __obj = GLib.Object.GetObject (inst, false) as Project; + __obj.OnAssetAdded (GLib.Object.GetObject(asset) as GES.Asset); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetAdded")] + protected virtual void OnAssetAdded (GES.Asset asset) + { + InternalAssetAdded (asset); + } + + private void InternalAssetAdded (GES.Asset asset) + { + AssetAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_added")); + unmanaged = (AssetAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle); + } + + static AssetLoadingNativeDelegate AssetLoading_cb_delegate; + static AssetLoadingNativeDelegate AssetLoadingVMCallback { + get { + if (AssetLoading_cb_delegate == null) + AssetLoading_cb_delegate = new AssetLoadingNativeDelegate (AssetLoading_cb); + return AssetLoading_cb_delegate; + } + } + + static void OverrideAssetLoading (GLib.GType gtype) + { + OverrideAssetLoading (gtype, AssetLoadingVMCallback); + } + + static void OverrideAssetLoading (GLib.GType gtype, AssetLoadingNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_loading")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void AssetLoadingNativeDelegate (IntPtr inst, IntPtr asset); + + static void AssetLoading_cb (IntPtr inst, IntPtr asset) + { + try { + Project __obj = GLib.Object.GetObject (inst, false) as Project; + __obj.OnAssetLoading (GLib.Object.GetObject(asset) as GES.Asset); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetLoading")] + protected virtual void OnAssetLoading (GES.Asset asset) + { + InternalAssetLoading (asset); + } + + private void InternalAssetLoading (GES.Asset asset) + { + AssetLoadingNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_loading")); + unmanaged = (AssetLoadingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetLoadingNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle); + } + + static AssetRemovedNativeDelegate AssetRemoved_cb_delegate; + static AssetRemovedNativeDelegate AssetRemovedVMCallback { + get { + if (AssetRemoved_cb_delegate == null) + AssetRemoved_cb_delegate = new AssetRemovedNativeDelegate (AssetRemoved_cb); + return AssetRemoved_cb_delegate; + } + } + + static void OverrideAssetRemoved (GLib.GType gtype) + { + OverrideAssetRemoved (gtype, AssetRemovedVMCallback); + } + + static void OverrideAssetRemoved (GLib.GType gtype, AssetRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void AssetRemovedNativeDelegate (IntPtr inst, IntPtr asset); + + static void AssetRemoved_cb (IntPtr inst, IntPtr asset) + { + try { + Project __obj = GLib.Object.GetObject (inst, false) as Project; + __obj.OnAssetRemoved (GLib.Object.GetObject(asset) as GES.Asset); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetRemoved")] + protected virtual void OnAssetRemoved (GES.Asset asset) + { + InternalAssetRemoved (asset); + } + + private void InternalAssetRemoved (GES.Asset asset) + { + AssetRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_removed")); + unmanaged = (AssetRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle); + } + + static LoadedNativeDelegate Loaded_cb_delegate; + static LoadedNativeDelegate LoadedVMCallback { + get { + if (Loaded_cb_delegate == null) + Loaded_cb_delegate = new LoadedNativeDelegate (Loaded_cb); + return Loaded_cb_delegate; + } + } + + static void OverrideLoaded (GLib.GType gtype) + { + OverrideLoaded (gtype, LoadedVMCallback); + } + + static void OverrideLoaded (GLib.GType gtype, LoadedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("loaded")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void LoadedNativeDelegate (IntPtr inst, IntPtr timeline); + + static void Loaded_cb (IntPtr inst, IntPtr timeline) + { + try { + Project __obj = GLib.Object.GetObject (inst, false) as Project; + __obj.OnLoaded (GLib.Object.GetObject(timeline) as GES.Timeline); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideLoaded")] + protected virtual void OnLoaded (GES.Timeline timeline) + { + InternalLoaded (timeline); + } + + private void InternalLoaded (GES.Timeline timeline) + { + LoadedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("loaded")); + unmanaged = (LoadedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LoadedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, timeline == null ? IntPtr.Zero : timeline.Handle); + } + + static LoadingNativeDelegate Loading_cb_delegate; + static LoadingNativeDelegate LoadingVMCallback { + get { + if (Loading_cb_delegate == null) + Loading_cb_delegate = new LoadingNativeDelegate (Loading_cb); + return Loading_cb_delegate; + } + } + + static void OverrideLoading (GLib.GType gtype) + { + OverrideLoading (gtype, LoadingVMCallback); + } + + static void OverrideLoading (GLib.GType gtype, LoadingNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("loading")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void LoadingNativeDelegate (IntPtr inst, IntPtr timeline); + + static void Loading_cb (IntPtr inst, IntPtr timeline) + { + try { + Project __obj = GLib.Object.GetObject (inst, false) as Project; + __obj.OnLoading (GLib.Object.GetObject(timeline) as GES.Timeline); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideLoading")] + protected virtual void OnLoading (GES.Timeline timeline) + { + InternalLoading (timeline); + } + + private void InternalLoading (GES.Timeline timeline) + { + LoadingNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("loading")); + unmanaged = (LoadingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LoadingNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, timeline == null ? IntPtr.Zero : timeline.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("asset_added" + , GES.Asset.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_added + , null + , "asset_loading" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("asset_loading" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_loading + , "asset_added" + , "asset_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("asset_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_removed + , "asset_loading" + , "missing_uri" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("missing_uri" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // missing_uri + , "asset_removed" + , "loading_error" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("loading_error" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // loading_error + , "missing_uri" + , "loaded" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("loaded" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // loaded + , "loading_error" + , "loading" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("loading" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // loading + , "loaded" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , "loading" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_project_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_project_add_asset(IntPtr raw, IntPtr asset); + + public bool AddAsset(GES.Asset asset) { + bool raw_ret = ges_project_add_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_project_add_encoding_profile(IntPtr raw, IntPtr profile); + + public bool AddEncodingProfile(Gst.PbUtils.EncodingProfile profile) { + bool raw_ret = ges_project_add_encoding_profile(Handle, profile == null ? IntPtr.Zero : profile.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_project_add_formatter(IntPtr raw, IntPtr formatter); + + public void AddFormatter(GES.Formatter formatter) { + ges_project_add_formatter(Handle, formatter == null ? IntPtr.Zero : formatter.Handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_project_create_asset(IntPtr raw, IntPtr id, IntPtr extractable_type); + + public bool CreateAsset(string id, GLib.GType extractable_type) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + bool raw_ret = ges_project_create_asset(Handle, native_id, extractable_type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_id); + return ret; + } + + public bool CreateAsset(GLib.GType extractable_type) { + return CreateAsset (null, extractable_type); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_project_create_asset_sync(IntPtr raw, IntPtr id, IntPtr extractable_type, out IntPtr error); + + public unsafe GES.Asset CreateAssetSync(string id, GLib.GType extractable_type) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_project_create_asset_sync(Handle, native_id, extractable_type.Val, out error); + GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset; + GLib.Marshaller.Free (native_id); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public GES.Asset CreateAssetSync(GLib.GType extractable_type) { + return CreateAssetSync (null, extractable_type); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_get_asset(IntPtr raw, IntPtr id, IntPtr extractable_type); + + public GES.Asset GetAsset(string id, GLib.GType extractable_type) { + IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id); + IntPtr raw_ret = ges_project_get_asset(Handle, native_id, extractable_type.Val); + GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset; + GLib.Marshaller.Free (native_id); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_get_loading_assets(IntPtr raw); + + public GES.Asset[] LoadingAssets { + get { + IntPtr raw_ret = ges_project_get_loading_assets(Handle); + GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Asset)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_list_assets(IntPtr raw, IntPtr filter); + + public GES.Asset[] ListAssets(GLib.GType filter) { + IntPtr raw_ret = ges_project_list_assets(Handle, filter.Val); + GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Asset)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_project_list_encoding_profiles(IntPtr raw); + + public Gst.PbUtils.EncodingProfile[] ListEncodingProfiles() { + IntPtr raw_ret = ges_project_list_encoding_profiles(Handle); + Gst.PbUtils.EncodingProfile[] ret = (Gst.PbUtils.EncodingProfile[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PbUtils.EncodingProfile)); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_project_load(IntPtr raw, IntPtr timeline, out IntPtr error); + + public unsafe bool Load(GES.Timeline timeline) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_project_load(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_project_remove_asset(IntPtr raw, IntPtr asset); + + public bool RemoveAsset(GES.Asset asset) { + bool raw_ret = ges_project_remove_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_project_save(IntPtr raw, IntPtr timeline, IntPtr uri, IntPtr formatter_asset, bool overwrite, out IntPtr error); + + public unsafe bool Save(GES.Timeline timeline, string uri, GES.Asset formatter_asset, bool overwrite) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_project_save(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, formatter_asset == null ? IntPtr.Zero : formatter_asset.OwnedHandle, overwrite, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public bool Save(GES.Timeline timeline, string uri, bool overwrite) { + return Save (timeline, uri, null, overwrite); + } + + + static Project () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Asset.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "__ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("__ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // __ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/SelectElementTrackHandler.cs b/ges/generated/GES/SelectElementTrackHandler.cs new file mode 100644 index 0000000000..c4e7afae69 --- /dev/null +++ b/ges/generated/GES/SelectElementTrackHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void SelectElementTrackHandler(object o, SelectElementTrackArgs args); + + public class SelectElementTrackArgs : GLib.SignalArgs { + public GES.Clip Clip{ + get { + return (GES.Clip) Args [0]; + } + } + + public GES.TrackElement TrackElement{ + get { + return (GES.TrackElement) Args [1]; + } + } + + } +} diff --git a/ges/generated/GES/SnappingEndedHandler.cs b/ges/generated/GES/SnappingEndedHandler.cs new file mode 100644 index 0000000000..ad053790ce --- /dev/null +++ b/ges/generated/GES/SnappingEndedHandler.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void SnappingEndedHandler(object o, SnappingEndedArgs args); + + public class SnappingEndedArgs : GLib.SignalArgs { + public GES.TrackElement Obj1{ + get { + return (GES.TrackElement) Args [0]; + } + } + + public GES.TrackElement Obj2{ + get { + return (GES.TrackElement) Args [1]; + } + } + + public ulong Position{ + get { + return (ulong) Args [2]; + } + } + + } +} diff --git a/ges/generated/GES/SnappingStartedHandler.cs b/ges/generated/GES/SnappingStartedHandler.cs new file mode 100644 index 0000000000..202e4f2003 --- /dev/null +++ b/ges/generated/GES/SnappingStartedHandler.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void SnappingStartedHandler(object o, SnappingStartedArgs args); + + public class SnappingStartedArgs : GLib.SignalArgs { + public GES.TrackElement Obj1{ + get { + return (GES.TrackElement) Args [0]; + } + } + + public GES.TrackElement Obj2{ + get { + return (GES.TrackElement) Args [1]; + } + } + + public ulong Position{ + get { + return (ulong) Args [2]; + } + } + + } +} diff --git a/ges/generated/GES/Source.cs b/ges/generated/GES/Source.cs new file mode 100644 index 0000000000..732e8a1d75 --- /dev/null +++ b/ges/generated/GES/Source.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Source : GES.TrackElement { + + public Source (IntPtr raw) : base(raw) {} + + protected Source() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.TrackElement.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static Source () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.TrackElement.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/SourceClip.cs b/ges/generated/GES/SourceClip.cs new file mode 100644 index 0000000000..ac43c4c506 --- /dev/null +++ b/ges/generated/GES/SourceClip.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class SourceClip : GES.Clip { + + public SourceClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_source_clip_new_time_overlay(); + + public SourceClip () : base (IntPtr.Zero) + { + if (GetType () != typeof (SourceClip)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_source_clip_new_time_overlay(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Clip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_source_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_source_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static SourceClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Clip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/SourceClipAsset.cs b/ges/generated/GES/SourceClipAsset.cs new file mode 100644 index 0000000000..e0ebb59e32 --- /dev/null +++ b/ges/generated/GES/SourceClipAsset.cs @@ -0,0 +1,69 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class SourceClipAsset : GES.ClipAsset { + + public SourceClipAsset (IntPtr raw) : base(raw) {} + + protected SourceClipAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GES.ClipAsset.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_source_clip_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_source_clip_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static SourceClipAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GES.ClipAsset.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TestClip.cs b/ges/generated/GES/TestClip.cs new file mode 100644 index 0000000000..5160b8aad5 --- /dev/null +++ b/ges/generated/GES/TestClip.cs @@ -0,0 +1,213 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TestClip : GES.SourceClip { + + public TestClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_test_clip_new(); + + public TestClip () : base (IntPtr.Zero) + { + if (GetType () != typeof (TestClip)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_test_clip_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_test_clip_new_for_nick(IntPtr nick); + + public TestClip (string nick) : base (IntPtr.Zero) + { + if (GetType () != typeof (TestClip)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_nick = GLib.Marshaller.StringToPtrGStrdup (nick); + Raw = ges_test_clip_new_for_nick(native_nick); + GLib.Marshaller.Free (native_nick); + } + + [GLib.Property ("freq")] + public double Freq { + get { + GLib.Value val = GetProperty ("freq"); + double ret = (double) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("freq", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_test_clip_set_mute(IntPtr raw, bool mute); + + [GLib.Property ("mute")] + public bool Mute { + get { + GLib.Value val = GetProperty ("mute"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + ges_test_clip_set_mute(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_test_clip_get_volume(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_test_clip_set_volume(IntPtr raw, double volume); + + [GLib.Property ("volume")] + public double Volume { + get { + double raw_ret = ges_test_clip_get_volume(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_test_clip_set_volume(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_test_clip_get_vpattern(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_test_clip_set_vpattern(IntPtr raw, int vpattern); + + [GLib.Property ("vpattern")] + public GES.VideoTestPattern Vpattern { + get { + int raw_ret = ges_test_clip_get_vpattern(Handle); + GES.VideoTestPattern ret = (GES.VideoTestPattern) raw_ret; + return ret; + } + set { + ges_test_clip_set_vpattern(Handle, (int) value); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.SourceClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_test_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_test_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_test_clip_get_frequency(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_test_clip_set_frequency(IntPtr raw, double freq); + + public double Frequency { + get { + double raw_ret = ges_test_clip_get_frequency(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_test_clip_set_frequency(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_test_clip_is_muted(IntPtr raw); + + public bool IsMuted { + get { + bool raw_ret = ges_test_clip_is_muted(Handle); + bool ret = raw_ret; + return ret; + } + } + + + static TestClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.SourceClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TextHAlign.cs b/ges/generated/GES/TextHAlign.cs new file mode 100644 index 0000000000..d7ac22e01c --- /dev/null +++ b/ges/generated/GES/TextHAlign.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.TextHAlignGType))] + public enum TextHAlign { + + Left = 0, + Center = 1, + Right = 2, + Position = 4, + Absolute = 5, + } + + internal class TextHAlignGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_halign_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_text_halign_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/TextOverlay.cs b/ges/generated/GES/TextOverlay.cs new file mode 100644 index 0000000000..91a013f8d8 --- /dev/null +++ b/ges/generated/GES/TextOverlay.cs @@ -0,0 +1,225 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TextOverlay : GES.Operation { + + public TextOverlay (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_new(); + + public TextOverlay () : base (IntPtr.Zero) + { + if (GetType () != typeof (TextOverlay)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_text_overlay_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Operation.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_text_overlay_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_text_overlay_get_color(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_color(IntPtr raw, uint color); + + public uint Color { + get { + uint raw_ret = ges_text_overlay_get_color(Handle); + uint ret = raw_ret; + return ret; + } + set { + ges_text_overlay_set_color(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_get_font_desc(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_font_desc(IntPtr raw, IntPtr font_desc); + + public string FontDesc { + get { + IntPtr raw_ret = ges_text_overlay_get_font_desc(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_text_overlay_set_font_desc(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_text_overlay_get_halignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_halignment(IntPtr raw, int halign); + + public GES.TextHAlign Halignment { + get { + int raw_ret = ges_text_overlay_get_halignment(Handle); + GES.TextHAlign ret = (GES.TextHAlign) raw_ret; + return ret; + } + set { + ges_text_overlay_set_halignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_get_text(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_text(IntPtr raw, IntPtr text); + + public string Text { + get { + IntPtr raw_ret = ges_text_overlay_get_text(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_text_overlay_set_text(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_text_overlay_get_valignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_valignment(IntPtr raw, int valign); + + public GES.TextVAlign Valignment { + get { + int raw_ret = ges_text_overlay_get_valignment(Handle); + GES.TextVAlign ret = (GES.TextVAlign) raw_ret; + return ret; + } + set { + ges_text_overlay_set_valignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_text_overlay_get_xpos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_xpos(IntPtr raw, double position); + + public double Xpos { + get { + double raw_ret = ges_text_overlay_get_xpos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_text_overlay_set_xpos(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_text_overlay_get_ypos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_set_ypos(IntPtr raw, double position); + + public double Ypos { + get { + double raw_ret = ges_text_overlay_get_ypos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_text_overlay_set_ypos(Handle, value); + } + } + + + static TextOverlay () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Operation.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TextOverlayClip.cs b/ges/generated/GES/TextOverlayClip.cs new file mode 100644 index 0000000000..c1e0f4fa1b --- /dev/null +++ b/ges/generated/GES/TextOverlayClip.cs @@ -0,0 +1,248 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TextOverlayClip : GES.OverlayClip { + + public TextOverlayClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_clip_new(); + + public TextOverlayClip () : base (IntPtr.Zero) + { + if (GetType () != typeof (TextOverlayClip)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_text_overlay_clip_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_text_overlay_clip_get_color(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_color(IntPtr raw, uint color); + + [GLib.Property ("color")] + public uint Color { + get { + uint raw_ret = ges_text_overlay_clip_get_color(Handle); + uint ret = raw_ret; + return ret; + } + set { + ges_text_overlay_clip_set_color(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_clip_get_font_desc(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_font_desc(IntPtr raw, IntPtr font_desc); + + [GLib.Property ("font-desc")] + public string FontDesc { + get { + IntPtr raw_ret = ges_text_overlay_clip_get_font_desc(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_text_overlay_clip_set_font_desc(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_text_overlay_clip_get_halignment(IntPtr raw); + + [GLib.Property ("halignment")] + public GES.TextHAlign Halignment { + get { + int raw_ret = ges_text_overlay_clip_get_halignment(Handle); + GES.TextHAlign ret = (GES.TextHAlign) raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("halignment", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_clip_get_text(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_text(IntPtr raw, IntPtr text); + + [GLib.Property ("text")] + public string Text { + get { + IntPtr raw_ret = ges_text_overlay_clip_get_text(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_text_overlay_clip_set_text(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_text_overlay_clip_get_valignment(IntPtr raw); + + [GLib.Property ("valignment")] + public GES.TextVAlign Valignment { + get { + int raw_ret = ges_text_overlay_clip_get_valignment(Handle); + GES.TextVAlign ret = (GES.TextVAlign) raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("valignment", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_text_overlay_clip_get_xpos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_xpos(IntPtr raw, double position); + + [GLib.Property ("xpos")] + public double Xpos { + get { + double raw_ret = ges_text_overlay_clip_get_xpos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_text_overlay_clip_set_xpos(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_text_overlay_clip_get_ypos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_ypos(IntPtr raw, double position); + + [GLib.Property ("ypos")] + public double Ypos { + get { + double raw_ret = ges_text_overlay_clip_get_ypos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_text_overlay_clip_set_ypos(Handle, value); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.OverlayClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_overlay_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_text_overlay_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_halign(IntPtr raw, int halign); + + public GES.TextHAlign Halign { + set { + ges_text_overlay_clip_set_halign(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_text_overlay_clip_set_valign(IntPtr raw, int valign); + + public GES.TextVAlign Valign { + set { + ges_text_overlay_clip_set_valign(Handle, (int) value); + } + } + + + static TextOverlayClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.OverlayClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TextVAlign.cs b/ges/generated/GES/TextVAlign.cs new file mode 100644 index 0000000000..fb709b8be9 --- /dev/null +++ b/ges/generated/GES/TextVAlign.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.TextVAlignGType))] + public enum TextVAlign { + + Baseline = 0, + Bottom = 1, + Top = 2, + Position = 3, + Center = 4, + Absolute = 5, + } + + internal class TextVAlignGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_text_valign_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_text_valign_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/Timeline.cs b/ges/generated/GES/Timeline.cs new file mode 100644 index 0000000000..f209c6da84 --- /dev/null +++ b/ges/generated/GES/Timeline.cs @@ -0,0 +1,1539 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Timeline : Gst.Bin, GES.IExtractable, GES.IMetaContainer { + + public Timeline (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_new(); + + public Timeline () : base (IntPtr.Zero) + { + if (GetType () != typeof (Timeline)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_timeline_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_new_audio_video(); + + public static Timeline NewAudioVideo() + { + Timeline result = new Timeline (ges_timeline_new_audio_video()); + return result; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_new_from_uri(IntPtr uri); + + public Timeline (string uri) : base (IntPtr.Zero) + { + if (GetType () != typeof (Timeline)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + Raw = ges_timeline_new_from_uri(native_uri); + GLib.Marshaller.Free (native_uri); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_get_auto_transition(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_timeline_set_auto_transition(IntPtr raw, bool auto_transition); + + [GLib.Property ("auto-transition")] + public bool AutoTransition { + get { + bool raw_ret = ges_timeline_get_auto_transition(Handle); + bool ret = raw_ret; + return ret; + } + set { + ges_timeline_set_auto_transition(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_get_duration(IntPtr raw); + + [GLib.Property ("duration")] + public ulong Duration { + get { + ulong raw_ret = ges_timeline_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_get_snapping_distance(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_timeline_set_snapping_distance(IntPtr raw, ulong snapping_distance); + + [GLib.Property ("snapping-distance")] + public ulong SnappingDistance { + get { + ulong raw_ret = ges_timeline_get_snapping_distance(Handle); + ulong ret = raw_ret; + return ret; + } + set { + ges_timeline_set_snapping_distance(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_layers(IntPtr raw); + + public GES.Layer[] Layers { + get { + IntPtr raw_ret = ges_timeline_get_layers(Handle); + GES.Layer[] ret = (GES.Layer[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Layer)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_tracks(IntPtr raw); + + public GES.Track[] Tracks { + get { + IntPtr raw_ret = ges_timeline_get_tracks(Handle); + GES.Track[] ret = (GES.Track[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Track)); + return ret; + } + } + + [GLib.Signal("track-added")] + public event GES.TrackAddedHandler TrackAdded { + add { + this.AddSignalHandler ("track-added", value, typeof (GES.TrackAddedArgs)); + } + remove { + this.RemoveSignalHandler ("track-added", value); + } + } + + [GLib.Signal("commited")] + public event System.EventHandler Commited { + add { + this.AddSignalHandler ("commited", value); + } + remove { + this.RemoveSignalHandler ("commited", value); + } + } + + [GLib.Signal("group-added")] + public event GES.GroupAddedHandler GroupAdded { + add { + this.AddSignalHandler ("group-added", value, typeof (GES.GroupAddedArgs)); + } + remove { + this.RemoveSignalHandler ("group-added", value); + } + } + + [GLib.Signal("layer-added")] + public event GES.LayerAddedHandler LayerAdded { + add { + this.AddSignalHandler ("layer-added", value, typeof (GES.LayerAddedArgs)); + } + remove { + this.RemoveSignalHandler ("layer-added", value); + } + } + + [GLib.Signal("snapping-started")] + public event GES.SnappingStartedHandler SnappingStarted { + add { + this.AddSignalHandler ("snapping-started", value, typeof (GES.SnappingStartedArgs)); + } + remove { + this.RemoveSignalHandler ("snapping-started", value); + } + } + + [GLib.Signal("layer-removed")] + public event GES.LayerRemovedHandler LayerRemoved { + add { + this.AddSignalHandler ("layer-removed", value, typeof (GES.LayerRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("layer-removed", value); + } + } + + [GLib.Signal("select-element-track")] + public event GES.SelectElementTrackHandler SelectElementTrack { + add { + this.AddSignalHandler ("select-element-track", value, typeof (GES.SelectElementTrackArgs)); + } + remove { + this.RemoveSignalHandler ("select-element-track", value); + } + } + + [GLib.Signal("track-removed")] + public event GES.TrackRemovedHandler TrackRemoved { + add { + this.AddSignalHandler ("track-removed", value, typeof (GES.TrackRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("track-removed", value); + } + } + + [GLib.Signal("snapping-ended")] + public event GES.SnappingEndedHandler SnappingEnded { + add { + this.AddSignalHandler ("snapping-ended", value, typeof (GES.SnappingEndedArgs)); + } + remove { + this.RemoveSignalHandler ("snapping-ended", value); + } + } + + static CommitedNativeDelegate Commited_cb_delegate; + static CommitedNativeDelegate CommitedVMCallback { + get { + if (Commited_cb_delegate == null) + Commited_cb_delegate = new CommitedNativeDelegate (Commited_cb); + return Commited_cb_delegate; + } + } + + static void OverrideCommited (GLib.GType gtype) + { + OverrideCommited (gtype, CommitedVMCallback); + } + + static void OverrideCommited (GLib.GType gtype, CommitedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "commited", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CommitedNativeDelegate (IntPtr inst); + + static void Commited_cb (IntPtr inst) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnCommited (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideCommited")] + protected virtual void OnCommited () + { + InternalCommited (); + } + + private void InternalCommited () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static SelectElementTrackNativeDelegate SelectElementTrack_cb_delegate; + static SelectElementTrackNativeDelegate SelectElementTrackVMCallback { + get { + if (SelectElementTrack_cb_delegate == null) + SelectElementTrack_cb_delegate = new SelectElementTrackNativeDelegate (SelectElementTrack_cb); + return SelectElementTrack_cb_delegate; + } + } + + static void OverrideSelectElementTrack (GLib.GType gtype) + { + OverrideSelectElementTrack (gtype, SelectElementTrackVMCallback); + } + + static void OverrideSelectElementTrack (GLib.GType gtype, SelectElementTrackNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "select-element-track", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr SelectElementTrackNativeDelegate (IntPtr inst, IntPtr clip, IntPtr track_element); + + static IntPtr SelectElementTrack_cb (IntPtr inst, IntPtr clip, IntPtr track_element) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + GES.Track __result; + __result = __obj.OnSelectElementTrack (GLib.Object.GetObject(clip) as GES.Clip, GLib.Object.GetObject(track_element) as GES.TrackElement); + return __result == null ? IntPtr.Zero : __result.OwnedHandle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideSelectElementTrack")] + protected virtual GES.Track OnSelectElementTrack (GES.Clip clip, GES.TrackElement track_element) + { + return InternalSelectElementTrack (clip, track_element); + } + + private GES.Track InternalSelectElementTrack (GES.Clip clip, GES.TrackElement track_element) + { + GLib.Value ret = new GLib.Value (GLib.GType.Object); + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (clip); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (track_element); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + GES.Track result = (GES.Track) ret; + ret.Dispose (); + return result; + } + + static SnappingEndedNativeDelegate SnappingEnded_cb_delegate; + static SnappingEndedNativeDelegate SnappingEndedVMCallback { + get { + if (SnappingEnded_cb_delegate == null) + SnappingEnded_cb_delegate = new SnappingEndedNativeDelegate (SnappingEnded_cb); + return SnappingEnded_cb_delegate; + } + } + + static void OverrideSnappingEnded (GLib.GType gtype) + { + OverrideSnappingEnded (gtype, SnappingEndedVMCallback); + } + + static void OverrideSnappingEnded (GLib.GType gtype, SnappingEndedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "snapping-ended", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SnappingEndedNativeDelegate (IntPtr inst, IntPtr obj1, IntPtr obj2, ulong position); + + static void SnappingEnded_cb (IntPtr inst, IntPtr obj1, IntPtr obj2, ulong position) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnSnappingEnded (GLib.Object.GetObject(obj1) as GES.TrackElement, GLib.Object.GetObject(obj2) as GES.TrackElement, position); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideSnappingEnded")] + protected virtual void OnSnappingEnded (GES.TrackElement obj1, GES.TrackElement obj2, ulong position) + { + InternalSnappingEnded (obj1, obj2, position); + } + + private void InternalSnappingEnded (GES.TrackElement obj1, GES.TrackElement obj2, ulong position) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (4); + GLib.Value[] vals = new GLib.Value [4]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (obj1); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (obj2); + inst_and_params.Append (vals [2]); + vals [3] = new GLib.Value (position); + inst_and_params.Append (vals [3]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static SnappingStartedNativeDelegate SnappingStarted_cb_delegate; + static SnappingStartedNativeDelegate SnappingStartedVMCallback { + get { + if (SnappingStarted_cb_delegate == null) + SnappingStarted_cb_delegate = new SnappingStartedNativeDelegate (SnappingStarted_cb); + return SnappingStarted_cb_delegate; + } + } + + static void OverrideSnappingStarted (GLib.GType gtype) + { + OverrideSnappingStarted (gtype, SnappingStartedVMCallback); + } + + static void OverrideSnappingStarted (GLib.GType gtype, SnappingStartedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "snapping-started", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SnappingStartedNativeDelegate (IntPtr inst, IntPtr obj1, IntPtr obj2, ulong position); + + static void SnappingStarted_cb (IntPtr inst, IntPtr obj1, IntPtr obj2, ulong position) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnSnappingStarted (GLib.Object.GetObject(obj1) as GES.TrackElement, GLib.Object.GetObject(obj2) as GES.TrackElement, position); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideSnappingStarted")] + protected virtual void OnSnappingStarted (GES.TrackElement obj1, GES.TrackElement obj2, ulong position) + { + InternalSnappingStarted (obj1, obj2, position); + } + + private void InternalSnappingStarted (GES.TrackElement obj1, GES.TrackElement obj2, ulong position) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (4); + GLib.Value[] vals = new GLib.Value [4]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (obj1); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (obj2); + inst_and_params.Append (vals [2]); + vals [3] = new GLib.Value (position); + inst_and_params.Append (vals [3]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static TrackAddedNativeDelegate TrackAdded_cb_delegate; + static TrackAddedNativeDelegate TrackAddedVMCallback { + get { + if (TrackAdded_cb_delegate == null) + TrackAdded_cb_delegate = new TrackAddedNativeDelegate (TrackAdded_cb); + return TrackAdded_cb_delegate; + } + } + + static void OverrideTrackAdded (GLib.GType gtype) + { + OverrideTrackAdded (gtype, TrackAddedVMCallback); + } + + static void OverrideTrackAdded (GLib.GType gtype, TrackAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("track_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void TrackAddedNativeDelegate (IntPtr inst, IntPtr track); + + static void TrackAdded_cb (IntPtr inst, IntPtr track) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnTrackAdded (GLib.Object.GetObject(track) as GES.Track); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideTrackAdded")] + protected virtual void OnTrackAdded (GES.Track track) + { + InternalTrackAdded (track); + } + + private void InternalTrackAdded (GES.Track track) + { + TrackAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("track_added")); + unmanaged = (TrackAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TrackAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, track == null ? IntPtr.Zero : track.Handle); + } + + static TrackRemovedNativeDelegate TrackRemoved_cb_delegate; + static TrackRemovedNativeDelegate TrackRemovedVMCallback { + get { + if (TrackRemoved_cb_delegate == null) + TrackRemoved_cb_delegate = new TrackRemovedNativeDelegate (TrackRemoved_cb); + return TrackRemoved_cb_delegate; + } + } + + static void OverrideTrackRemoved (GLib.GType gtype) + { + OverrideTrackRemoved (gtype, TrackRemovedVMCallback); + } + + static void OverrideTrackRemoved (GLib.GType gtype, TrackRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("track_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void TrackRemovedNativeDelegate (IntPtr inst, IntPtr track); + + static void TrackRemoved_cb (IntPtr inst, IntPtr track) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnTrackRemoved (GLib.Object.GetObject(track) as GES.Track); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideTrackRemoved")] + protected virtual void OnTrackRemoved (GES.Track track) + { + InternalTrackRemoved (track); + } + + private void InternalTrackRemoved (GES.Track track) + { + TrackRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("track_removed")); + unmanaged = (TrackRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TrackRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, track == null ? IntPtr.Zero : track.Handle); + } + + static LayerAddedNativeDelegate LayerAdded_cb_delegate; + static LayerAddedNativeDelegate LayerAddedVMCallback { + get { + if (LayerAdded_cb_delegate == null) + LayerAdded_cb_delegate = new LayerAddedNativeDelegate (LayerAdded_cb); + return LayerAdded_cb_delegate; + } + } + + static void OverrideLayerAdded (GLib.GType gtype) + { + OverrideLayerAdded (gtype, LayerAddedVMCallback); + } + + static void OverrideLayerAdded (GLib.GType gtype, LayerAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("layer_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void LayerAddedNativeDelegate (IntPtr inst, IntPtr layer); + + static void LayerAdded_cb (IntPtr inst, IntPtr layer) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnLayerAdded (GLib.Object.GetObject(layer) as GES.Layer); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideLayerAdded")] + protected virtual void OnLayerAdded (GES.Layer layer) + { + InternalLayerAdded (layer); + } + + private void InternalLayerAdded (GES.Layer layer) + { + LayerAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("layer_added")); + unmanaged = (LayerAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LayerAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, layer == null ? IntPtr.Zero : layer.Handle); + } + + static LayerRemovedNativeDelegate LayerRemoved_cb_delegate; + static LayerRemovedNativeDelegate LayerRemovedVMCallback { + get { + if (LayerRemoved_cb_delegate == null) + LayerRemoved_cb_delegate = new LayerRemovedNativeDelegate (LayerRemoved_cb); + return LayerRemoved_cb_delegate; + } + } + + static void OverrideLayerRemoved (GLib.GType gtype) + { + OverrideLayerRemoved (gtype, LayerRemovedVMCallback); + } + + static void OverrideLayerRemoved (GLib.GType gtype, LayerRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("layer_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void LayerRemovedNativeDelegate (IntPtr inst, IntPtr layer); + + static void LayerRemoved_cb (IntPtr inst, IntPtr layer) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnLayerRemoved (GLib.Object.GetObject(layer) as GES.Layer); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideLayerRemoved")] + protected virtual void OnLayerRemoved (GES.Layer layer) + { + InternalLayerRemoved (layer); + } + + private void InternalLayerRemoved (GES.Layer layer) + { + LayerRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("layer_removed")); + unmanaged = (LayerRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LayerRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, layer == null ? IntPtr.Zero : layer.Handle); + } + + static GroupAddedNativeDelegate GroupAdded_cb_delegate; + static GroupAddedNativeDelegate GroupAddedVMCallback { + get { + if (GroupAdded_cb_delegate == null) + GroupAdded_cb_delegate = new GroupAddedNativeDelegate (GroupAdded_cb); + return GroupAdded_cb_delegate; + } + } + + static void OverrideGroupAdded (GLib.GType gtype) + { + OverrideGroupAdded (gtype, GroupAddedVMCallback); + } + + static void OverrideGroupAdded (GLib.GType gtype, GroupAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("group_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void GroupAddedNativeDelegate (IntPtr inst, IntPtr group); + + static void GroupAdded_cb (IntPtr inst, IntPtr group) + { + try { + Timeline __obj = GLib.Object.GetObject (inst, false) as Timeline; + __obj.OnGroupAdded (GLib.Object.GetObject(group) as GES.Group); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideGroupAdded")] + protected virtual void OnGroupAdded (GES.Group group) + { + InternalGroupAdded (group); + } + + private void InternalGroupAdded (GES.Group group) + { + GroupAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("group_added")); + unmanaged = (GroupAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GroupAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, group == null ? IntPtr.Zero : group.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("track_added" + , Gst.Bin.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // track_added + , null + , "track_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("track_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // track_removed + , "track_added" + , "layer_added" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("layer_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // layer_added + , "track_removed" + , "layer_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("layer_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // layer_removed + , "layer_added" + , "group_added" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("group_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // group_added + , "layer_removed" + , "group_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("group_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // group_removed + , "group_added" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "group_removed" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_timeline_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_add_layer(IntPtr raw, IntPtr layer); + + [Obsolete] + public bool AddLayer(GES.Layer layer) { + bool raw_ret = ges_timeline_add_layer(Handle, layer == null ? IntPtr.Zero : layer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_add_track(IntPtr raw, IntPtr track); + + public bool AddTrack(GES.Track track) { + bool raw_ret = ges_timeline_add_track(Handle, track == null ? IntPtr.Zero : track.OwnedHandle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_append_layer(IntPtr raw); + + public GES.Layer AppendLayer() { + IntPtr raw_ret = ges_timeline_append_layer(Handle); + GES.Layer ret = GLib.Object.GetObject(raw_ret) as GES.Layer; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_commit(IntPtr raw); + + public bool Commit() { + bool raw_ret = ges_timeline_commit(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_commit_sync(IntPtr raw); + + public bool CommitSync() { + bool raw_ret = ges_timeline_commit_sync(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_element(IntPtr raw, IntPtr name); + + public GES.TimelineElement GetElement(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = ges_timeline_get_element(Handle, native_name); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TimelineElement; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern long ges_timeline_get_frame_at(IntPtr raw, ulong timestamp); + + public long GetFrameAt(ulong timestamp) { + long raw_ret = ges_timeline_get_frame_at(Handle, timestamp); + long ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_get_frame_time(IntPtr raw, long frame_number); + + public ulong GetFrameTime(long frame_number) { + ulong raw_ret = ges_timeline_get_frame_time(Handle, frame_number); + ulong ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_groups(IntPtr raw); + + public GES.Group[] Groups { + get { + IntPtr raw_ret = ges_timeline_get_groups(Handle); + GES.Group[] ret = (GES.Group[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GES.Group)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_layer(IntPtr raw, uint priority); + + public GES.Layer GetLayer(uint priority) { + IntPtr raw_ret = ges_timeline_get_layer(Handle, priority); + GES.Layer ret = GLib.Object.GetObject(raw_ret, true) as GES.Layer; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_pad_for_track(IntPtr raw, IntPtr track); + + public Gst.Pad GetPadForTrack(GES.Track track) { + IntPtr raw_ret = ges_timeline_get_pad_for_track(Handle, track == null ? IntPtr.Zero : track.Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret) as Gst.Pad; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_get_track_for_pad(IntPtr raw, IntPtr pad); + + public GES.Track GetTrackForPad(Gst.Pad pad) { + IntPtr raw_ret = ges_timeline_get_track_for_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle); + GES.Track ret = GLib.Object.GetObject(raw_ret) as GES.Track; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_is_empty(IntPtr raw); + + public bool IsEmpty { + get { + bool raw_ret = ges_timeline_is_empty(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_timeline_load_from_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public unsafe bool LoadFromUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_timeline_load_from_uri(Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_move_layer(IntPtr raw, IntPtr layer, uint new_layer_priority); + + public bool MoveLayer(GES.Layer layer, uint new_layer_priority) { + bool raw_ret = ges_timeline_move_layer(Handle, layer == null ? IntPtr.Zero : layer.Handle, new_layer_priority); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_paste_element(IntPtr raw, IntPtr element, ulong position, int layer_priority); + + public GES.TimelineElement PasteElement(GES.TimelineElement element, ulong position, int layer_priority) { + IntPtr raw_ret = ges_timeline_paste_element(Handle, element == null ? IntPtr.Zero : element.Handle, position, layer_priority); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TimelineElement; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_remove_layer(IntPtr raw, IntPtr layer); + + public bool RemoveLayer(GES.Layer layer) { + bool raw_ret = ges_timeline_remove_layer(Handle, layer == null ? IntPtr.Zero : layer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_remove_track(IntPtr raw, IntPtr track); + + public bool RemoveTrack(GES.Track track) { + bool raw_ret = ges_timeline_remove_track(Handle, track == null ? IntPtr.Zero : track.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_timeline_save_to_uri(IntPtr raw, IntPtr uri, IntPtr formatter_asset, bool overwrite, out IntPtr error); + + public unsafe bool SaveToUri(string uri, GES.Asset formatter_asset, bool overwrite) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_timeline_save_to_uri(Handle, native_uri, formatter_asset == null ? IntPtr.Zero : formatter_asset.Handle, overwrite, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public bool SaveToUri(string uri, bool overwrite) { + return SaveToUri (uri, null, overwrite); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_asset(IntPtr raw); + + public GES.Asset Asset { + get { + IntPtr raw_ret = ges_extractable_get_asset(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_id(IntPtr raw); + + public string Id { + get { + IntPtr raw_ret = ges_extractable_get_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_extractable_set_asset(IntPtr raw, IntPtr asset); + + public bool SetAsset(GES.Asset asset) { + bool raw_ret = ges_extractable_set_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.Timeline __obj = GLib.Object.GetObject (inst, false) as GES.Timeline; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Timeline), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + static Timeline () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("layers" + , Gst.Bin.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // layers + , null + , "tracks" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("tracks" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // tracks + , "layers" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "tracks" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TimelineElement.cs b/ges/generated/GES/TimelineElement.cs new file mode 100644 index 0000000000..c7db68b19e --- /dev/null +++ b/ges/generated/GES/TimelineElement.cs @@ -0,0 +1,2629 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TimelineElement : GLib.InitiallyUnowned, GES.IExtractable, GES.IMetaContainer { + + protected TimelineElement (IntPtr raw) : base(raw) {} + + protected TimelineElement() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_element_get_duration(IntPtr raw); + + [GLib.Property ("duration")] + public ulong Duration { + get { + ulong raw_ret = ges_timeline_element_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("duration", val); + val.Dispose (); + } + } + + [GLib.Property ("in-point")] + public ulong InPoint { + get { + GLib.Value val = GetProperty ("in-point"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("in-point", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_element_get_max_duration(IntPtr raw); + + [GLib.Property ("max-duration")] + public ulong MaxDuration { + get { + ulong raw_ret = ges_timeline_element_get_max_duration(Handle); + ulong ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-duration", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_get_name(IntPtr raw); + + [GLib.Property ("name")] + public string Name { + get { + IntPtr raw_ret = ges_timeline_element_get_name(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("name", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_get_parent(IntPtr raw); + + [GLib.Property ("parent")] + public GES.TimelineElement Parent { + get { + IntPtr raw_ret = ges_timeline_element_get_parent(Handle); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TimelineElement; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("parent", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_timeline_element_get_priority(IntPtr raw); + + [Obsolete] + [GLib.Property ("priority")] + public uint Priority { + get { + uint raw_ret = ges_timeline_element_get_priority(Handle); + uint ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("priority", val); + val.Dispose (); + } + } + + [GLib.Property ("serialize")] + public bool Serialize { + get { + GLib.Value val = GetProperty ("serialize"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("serialize", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_element_get_start(IntPtr raw); + + [GLib.Property ("start")] + public ulong Start { + get { + ulong raw_ret = ges_timeline_element_get_start(Handle); + ulong ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("start", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_get_timeline(IntPtr raw); + + [GLib.Property ("timeline")] + public GES.Timeline Timeline { + get { + IntPtr raw_ret = ges_timeline_element_get_timeline(Handle); + GES.Timeline ret = GLib.Object.GetObject(raw_ret, true) as GES.Timeline; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("timeline", val); + val.Dispose (); + } + } + + public ulong StartField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("start")); + return (*raw_ptr); + } + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_timeline_element_get_inpoint(IntPtr raw); + + public ulong Inpoint { + get { + ulong raw_ret = ges_timeline_element_get_inpoint(Handle); + ulong ret = raw_ret; + return ret; + } + } + + public ulong DurationField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("duration")); + return (*raw_ptr); + } + } + } + + public ulong Maxduration { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("maxduration")); + return (*raw_ptr); + } + } + } + + public uint PriorityField { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("priority")); + return (*raw_ptr); + } + } + } + + public GES.Timeline TimelineField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("timeline")); + return GLib.Object.GetObject((*raw_ptr)) as GES.Timeline; + } + } + } + + public string NameField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + [GLib.Signal("child-property-removed")] + public event GES.ChildPropertyRemovedHandler ChildPropertyRemoved { + add { + this.AddSignalHandler ("child-property-removed", value, typeof (GES.ChildPropertyRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("child-property-removed", value); + } + } + + [GLib.Signal("deep-notify")] + public event GES.DeepNotifyHandler DeepNotify { + add { + this.AddSignalHandler ("deep-notify", value, typeof (GES.DeepNotifyArgs)); + } + remove { + this.RemoveSignalHandler ("deep-notify", value); + } + } + + [GLib.Signal("child-property-added")] + public event GES.ChildPropertyAddedHandler ChildPropertyAdded { + add { + this.AddSignalHandler ("child-property-added", value, typeof (GES.ChildPropertyAddedArgs)); + } + remove { + this.RemoveSignalHandler ("child-property-added", value); + } + } + + static ChildPropertyAddedNativeDelegate ChildPropertyAdded_cb_delegate; + static ChildPropertyAddedNativeDelegate ChildPropertyAddedVMCallback { + get { + if (ChildPropertyAdded_cb_delegate == null) + ChildPropertyAdded_cb_delegate = new ChildPropertyAddedNativeDelegate (ChildPropertyAdded_cb); + return ChildPropertyAdded_cb_delegate; + } + } + + static void OverrideChildPropertyAdded (GLib.GType gtype) + { + OverrideChildPropertyAdded (gtype, ChildPropertyAddedVMCallback); + } + + static void OverrideChildPropertyAdded (GLib.GType gtype, ChildPropertyAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "child-property-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildPropertyAddedNativeDelegate (IntPtr inst, IntPtr prop_object, IntPtr prop); + + static void ChildPropertyAdded_cb (IntPtr inst, IntPtr prop_object, IntPtr prop) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + __obj.OnChildPropertyAdded (GLib.Object.GetObject (prop_object), prop); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideChildPropertyAdded")] + protected virtual void OnChildPropertyAdded (GLib.Object prop_object, IntPtr prop) + { + InternalChildPropertyAdded (prop_object, prop); + } + + private void InternalChildPropertyAdded (GLib.Object prop_object, IntPtr prop) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (prop_object); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (prop); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ChildPropertyRemovedNativeDelegate ChildPropertyRemoved_cb_delegate; + static ChildPropertyRemovedNativeDelegate ChildPropertyRemovedVMCallback { + get { + if (ChildPropertyRemoved_cb_delegate == null) + ChildPropertyRemoved_cb_delegate = new ChildPropertyRemovedNativeDelegate (ChildPropertyRemoved_cb); + return ChildPropertyRemoved_cb_delegate; + } + } + + static void OverrideChildPropertyRemoved (GLib.GType gtype) + { + OverrideChildPropertyRemoved (gtype, ChildPropertyRemovedVMCallback); + } + + static void OverrideChildPropertyRemoved (GLib.GType gtype, ChildPropertyRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "child-property-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildPropertyRemovedNativeDelegate (IntPtr inst, IntPtr prop_object, IntPtr prop); + + static void ChildPropertyRemoved_cb (IntPtr inst, IntPtr prop_object, IntPtr prop) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + __obj.OnChildPropertyRemoved (GLib.Object.GetObject (prop_object), prop); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideChildPropertyRemoved")] + protected virtual void OnChildPropertyRemoved (GLib.Object prop_object, IntPtr prop) + { + InternalChildPropertyRemoved (prop_object, prop); + } + + private void InternalChildPropertyRemoved (GLib.Object prop_object, IntPtr prop) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (prop_object); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (prop); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static DeepNotifyNativeDelegate DeepNotify_cb_delegate; + static DeepNotifyNativeDelegate DeepNotifyVMCallback { + get { + if (DeepNotify_cb_delegate == null) + DeepNotify_cb_delegate = new DeepNotifyNativeDelegate (DeepNotify_cb); + return DeepNotify_cb_delegate; + } + } + + static void OverrideDeepNotify (GLib.GType gtype) + { + OverrideDeepNotify (gtype, DeepNotifyVMCallback); + } + + static void OverrideDeepNotify (GLib.GType gtype, DeepNotifyNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "deep-notify", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DeepNotifyNativeDelegate (IntPtr inst, IntPtr prop_object, IntPtr prop); + + static void DeepNotify_cb (IntPtr inst, IntPtr prop_object, IntPtr prop) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + __obj.OnDeepNotify (GLib.Object.GetObject (prop_object), prop); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideDeepNotify")] + protected virtual void OnDeepNotify (GLib.Object prop_object, IntPtr prop) + { + InternalDeepNotify (prop_object, prop); + } + + private void InternalDeepNotify (GLib.Object prop_object, IntPtr prop) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (prop_object); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (prop); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static SetParentNativeDelegate SetParent_cb_delegate; + static SetParentNativeDelegate SetParentVMCallback { + get { + if (SetParent_cb_delegate == null) + SetParent_cb_delegate = new SetParentNativeDelegate (SetParent_cb); + return SetParent_cb_delegate; + } + } + + static void OverrideSetParent (GLib.GType gtype) + { + OverrideSetParent (gtype, SetParentVMCallback); + } + + static void OverrideSetParent (GLib.GType gtype, SetParentNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_parent")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetParentNativeDelegate (IntPtr inst, IntPtr parent); + + static bool SetParent_cb (IntPtr inst, IntPtr parent) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetParent (GLib.Object.GetObject(parent) as GES.TimelineElement); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetParent")] + protected virtual bool OnSetParent (GES.TimelineElement parent) + { + return InternalSetParent (parent); + } + + private bool InternalSetParent (GES.TimelineElement parent) + { + SetParentNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_parent")); + unmanaged = (SetParentNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetParentNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, parent == null ? IntPtr.Zero : parent.Handle); + return __result; + } + + static SetStartNativeDelegate SetStart_cb_delegate; + static SetStartNativeDelegate SetStartVMCallback { + get { + if (SetStart_cb_delegate == null) + SetStart_cb_delegate = new SetStartNativeDelegate (SetStart_cb); + return SetStart_cb_delegate; + } + } + + static void OverrideSetStart (GLib.GType gtype) + { + OverrideSetStart (gtype, SetStartVMCallback); + } + + static void OverrideSetStart (GLib.GType gtype, SetStartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetStartNativeDelegate (IntPtr inst, ulong start); + + static bool SetStart_cb (IntPtr inst, ulong start) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetStart (start); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetStart")] + protected virtual bool OnSetStart (ulong start) + { + return InternalSetStart (start); + } + + private bool InternalSetStart (ulong start) + { + SetStartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_start")); + unmanaged = (SetStartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetStartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, start); + return __result; + } + + static SetInpointNativeDelegate SetInpoint_cb_delegate; + static SetInpointNativeDelegate SetInpointVMCallback { + get { + if (SetInpoint_cb_delegate == null) + SetInpoint_cb_delegate = new SetInpointNativeDelegate (SetInpoint_cb); + return SetInpoint_cb_delegate; + } + } + + static void OverrideSetInpoint (GLib.GType gtype) + { + OverrideSetInpoint (gtype, SetInpointVMCallback); + } + + static void OverrideSetInpoint (GLib.GType gtype, SetInpointNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_inpoint")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetInpointNativeDelegate (IntPtr inst, ulong inpoint); + + static bool SetInpoint_cb (IntPtr inst, ulong inpoint) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetInpoint (inpoint); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetInpoint")] + protected virtual bool OnSetInpoint (ulong inpoint) + { + return InternalSetInpoint (inpoint); + } + + private bool InternalSetInpoint (ulong inpoint) + { + SetInpointNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_inpoint")); + unmanaged = (SetInpointNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetInpointNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, inpoint); + return __result; + } + + static SetDurationNativeDelegate SetDuration_cb_delegate; + static SetDurationNativeDelegate SetDurationVMCallback { + get { + if (SetDuration_cb_delegate == null) + SetDuration_cb_delegate = new SetDurationNativeDelegate (SetDuration_cb); + return SetDuration_cb_delegate; + } + } + + static void OverrideSetDuration (GLib.GType gtype) + { + OverrideSetDuration (gtype, SetDurationVMCallback); + } + + static void OverrideSetDuration (GLib.GType gtype, SetDurationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_duration")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetDurationNativeDelegate (IntPtr inst, ulong duration); + + static bool SetDuration_cb (IntPtr inst, ulong duration) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetDuration (duration); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetDuration")] + protected virtual bool OnSetDuration (ulong duration) + { + return InternalSetDuration (duration); + } + + private bool InternalSetDuration (ulong duration) + { + SetDurationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_duration")); + unmanaged = (SetDurationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetDurationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, duration); + return __result; + } + + static SetMaxDurationNativeDelegate SetMaxDuration_cb_delegate; + static SetMaxDurationNativeDelegate SetMaxDurationVMCallback { + get { + if (SetMaxDuration_cb_delegate == null) + SetMaxDuration_cb_delegate = new SetMaxDurationNativeDelegate (SetMaxDuration_cb); + return SetMaxDuration_cb_delegate; + } + } + + static void OverrideSetMaxDuration (GLib.GType gtype) + { + OverrideSetMaxDuration (gtype, SetMaxDurationVMCallback); + } + + static void OverrideSetMaxDuration (GLib.GType gtype, SetMaxDurationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_max_duration")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetMaxDurationNativeDelegate (IntPtr inst, ulong maxduration); + + static bool SetMaxDuration_cb (IntPtr inst, ulong maxduration) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetMaxDuration (maxduration); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetMaxDuration")] + protected virtual bool OnSetMaxDuration (ulong maxduration) + { + return InternalSetMaxDuration (maxduration); + } + + private bool InternalSetMaxDuration (ulong maxduration) + { + SetMaxDurationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_max_duration")); + unmanaged = (SetMaxDurationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetMaxDurationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, maxduration); + return __result; + } + + static SetPriorityNativeDelegate SetPriority_cb_delegate; + static SetPriorityNativeDelegate SetPriorityVMCallback { + get { + if (SetPriority_cb_delegate == null) + SetPriority_cb_delegate = new SetPriorityNativeDelegate (SetPriority_cb); + return SetPriority_cb_delegate; + } + } + + static void OverrideSetPriority (GLib.GType gtype) + { + OverrideSetPriority (gtype, SetPriorityVMCallback); + } + + static void OverrideSetPriority (GLib.GType gtype, SetPriorityNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_priority")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetPriorityNativeDelegate (IntPtr inst, uint priority); + + static bool SetPriority_cb (IntPtr inst, uint priority) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetPriority (priority); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetPriority")] + protected virtual bool OnSetPriority (uint priority) + { + return InternalSetPriority (priority); + } + + private bool InternalSetPriority (uint priority) + { + SetPriorityNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_priority")); + unmanaged = (SetPriorityNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetPriorityNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, priority); + return __result; + } + + static RippleNativeDelegate Ripple_cb_delegate; + static RippleNativeDelegate RippleVMCallback { + get { + if (Ripple_cb_delegate == null) + Ripple_cb_delegate = new RippleNativeDelegate (Ripple_cb); + return Ripple_cb_delegate; + } + } + + static void OverrideRipple (GLib.GType gtype) + { + OverrideRipple (gtype, RippleVMCallback); + } + + static void OverrideRipple (GLib.GType gtype, RippleNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("ripple")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RippleNativeDelegate (IntPtr inst, ulong start); + + static bool Ripple_cb (IntPtr inst, ulong start) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnRipple (start); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideRipple")] + protected virtual bool OnRipple (ulong start) + { + return InternalRipple (start); + } + + private bool InternalRipple (ulong start) + { + RippleNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("ripple")); + unmanaged = (RippleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RippleNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, start); + return __result; + } + + static RippleEndNativeDelegate RippleEnd_cb_delegate; + static RippleEndNativeDelegate RippleEndVMCallback { + get { + if (RippleEnd_cb_delegate == null) + RippleEnd_cb_delegate = new RippleEndNativeDelegate (RippleEnd_cb); + return RippleEnd_cb_delegate; + } + } + + static void OverrideRippleEnd (GLib.GType gtype) + { + OverrideRippleEnd (gtype, RippleEndVMCallback); + } + + static void OverrideRippleEnd (GLib.GType gtype, RippleEndNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("ripple_end")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RippleEndNativeDelegate (IntPtr inst, ulong end); + + static bool RippleEnd_cb (IntPtr inst, ulong end) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnRippleEnd (end); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideRippleEnd")] + protected virtual bool OnRippleEnd (ulong end) + { + return InternalRippleEnd (end); + } + + private bool InternalRippleEnd (ulong end) + { + RippleEndNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("ripple_end")); + unmanaged = (RippleEndNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RippleEndNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, end); + return __result; + } + + static RollStartNativeDelegate RollStart_cb_delegate; + static RollStartNativeDelegate RollStartVMCallback { + get { + if (RollStart_cb_delegate == null) + RollStart_cb_delegate = new RollStartNativeDelegate (RollStart_cb); + return RollStart_cb_delegate; + } + } + + static void OverrideRollStart (GLib.GType gtype) + { + OverrideRollStart (gtype, RollStartVMCallback); + } + + static void OverrideRollStart (GLib.GType gtype, RollStartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("roll_start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RollStartNativeDelegate (IntPtr inst, ulong start); + + static bool RollStart_cb (IntPtr inst, ulong start) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnRollStart (start); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideRollStart")] + protected virtual bool OnRollStart (ulong start) + { + return InternalRollStart (start); + } + + private bool InternalRollStart (ulong start) + { + RollStartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("roll_start")); + unmanaged = (RollStartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RollStartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, start); + return __result; + } + + static RollEndNativeDelegate RollEnd_cb_delegate; + static RollEndNativeDelegate RollEndVMCallback { + get { + if (RollEnd_cb_delegate == null) + RollEnd_cb_delegate = new RollEndNativeDelegate (RollEnd_cb); + return RollEnd_cb_delegate; + } + } + + static void OverrideRollEnd (GLib.GType gtype) + { + OverrideRollEnd (gtype, RollEndVMCallback); + } + + static void OverrideRollEnd (GLib.GType gtype, RollEndNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("roll_end")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RollEndNativeDelegate (IntPtr inst, ulong end); + + static bool RollEnd_cb (IntPtr inst, ulong end) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnRollEnd (end); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideRollEnd")] + protected virtual bool OnRollEnd (ulong end) + { + return InternalRollEnd (end); + } + + private bool InternalRollEnd (ulong end) + { + RollEndNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("roll_end")); + unmanaged = (RollEndNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RollEndNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, end); + return __result; + } + + static TrimNativeDelegate Trim_cb_delegate; + static TrimNativeDelegate TrimVMCallback { + get { + if (Trim_cb_delegate == null) + Trim_cb_delegate = new TrimNativeDelegate (Trim_cb); + return Trim_cb_delegate; + } + } + + static void OverrideTrim (GLib.GType gtype) + { + OverrideTrim (gtype, TrimVMCallback); + } + + static void OverrideTrim (GLib.GType gtype, TrimNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("trim")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TrimNativeDelegate (IntPtr inst, ulong start); + + static bool Trim_cb (IntPtr inst, ulong start) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnTrim (start); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideTrim")] + protected virtual bool OnTrim (ulong start) + { + return InternalTrim (start); + } + + private bool InternalTrim (ulong start) + { + TrimNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("trim")); + unmanaged = (TrimNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TrimNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, start); + return __result; + } + + static DeepCopyNativeDelegate DeepCopy_cb_delegate; + static DeepCopyNativeDelegate DeepCopyVMCallback { + get { + if (DeepCopy_cb_delegate == null) + DeepCopy_cb_delegate = new DeepCopyNativeDelegate (DeepCopy_cb); + return DeepCopy_cb_delegate; + } + } + + static void OverrideDeepCopy (GLib.GType gtype) + { + OverrideDeepCopy (gtype, DeepCopyVMCallback); + } + + static void OverrideDeepCopy (GLib.GType gtype, DeepCopyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_copy")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DeepCopyNativeDelegate (IntPtr inst, IntPtr copy); + + static void DeepCopy_cb (IntPtr inst, IntPtr copy) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + __obj.OnDeepCopy (GLib.Object.GetObject(copy) as GES.TimelineElement); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideDeepCopy")] + protected virtual void OnDeepCopy (GES.TimelineElement copy) + { + InternalDeepCopy (copy); + } + + private void InternalDeepCopy (GES.TimelineElement copy) + { + DeepCopyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_copy")); + unmanaged = (DeepCopyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepCopyNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, copy == null ? IntPtr.Zero : copy.Handle); + } + + static LookupChildNativeDelegate LookupChild_cb_delegate; + static LookupChildNativeDelegate LookupChildVMCallback { + get { + if (LookupChild_cb_delegate == null) + LookupChild_cb_delegate = new LookupChildNativeDelegate (LookupChild_cb); + return LookupChild_cb_delegate; + } + } + + static void OverrideLookupChild (GLib.GType gtype) + { + OverrideLookupChild (gtype, LookupChildVMCallback); + } + + static void OverrideLookupChild (GLib.GType gtype, LookupChildNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("lookup_child")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool LookupChildNativeDelegate (IntPtr inst, IntPtr prop_name, out IntPtr child, out IntPtr pspec); + + static bool LookupChild_cb (IntPtr inst, IntPtr prop_name, out IntPtr child, out IntPtr pspec) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + GLib.Object mychild; + __result = __obj.OnLookupChild (GLib.Marshaller.Utf8PtrToString (prop_name), out mychild, out pspec); + child = mychild == null ? IntPtr.Zero : mychild.Handle; + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideLookupChild")] + protected virtual bool OnLookupChild (string prop_name, out GLib.Object child, out IntPtr pspec) + { + return InternalLookupChild (prop_name, out child, out pspec); + } + + private bool InternalLookupChild (string prop_name, out GLib.Object child, out IntPtr pspec) + { + LookupChildNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("lookup_child")); + unmanaged = (LookupChildNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LookupChildNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup (prop_name); + IntPtr native_child; + bool __result = unmanaged (this.Handle, native_prop_name, out native_child, out pspec); + GLib.Marshaller.Free (native_prop_name); + child = GLib.Object.GetObject (native_child); + return __result; + } + + static GetTrackTypesNativeDelegate GetTrackTypes_cb_delegate; + static GetTrackTypesNativeDelegate GetTrackTypesVMCallback { + get { + if (GetTrackTypes_cb_delegate == null) + GetTrackTypes_cb_delegate = new GetTrackTypesNativeDelegate (GetTrackTypes_cb); + return GetTrackTypes_cb_delegate; + } + } + + static void OverrideGetTrackTypes (GLib.GType gtype) + { + OverrideGetTrackTypes (gtype, GetTrackTypesVMCallback); + } + + static void OverrideGetTrackTypes (GLib.GType gtype, GetTrackTypesNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_track_types")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GetTrackTypesNativeDelegate (IntPtr inst); + + static int GetTrackTypes_cb (IntPtr inst) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + GES.TrackType __result; + __result = __obj.OnGetTrackTypes (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideGetTrackTypes")] + protected virtual GES.TrackType OnGetTrackTypes () + { + return InternalGetTrackTypes (); + } + + private GES.TrackType InternalGetTrackTypes () + { + GetTrackTypesNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_track_types")); + unmanaged = (GetTrackTypesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetTrackTypesNativeDelegate)); + } + if (unmanaged == null) return (GES.TrackType) 0; + + int __result = unmanaged (this.Handle); + return (GES.TrackType) __result; + } + + static SetChildPropertyNativeDelegate SetChildProperty_cb_delegate; + static SetChildPropertyNativeDelegate SetChildPropertyVMCallback { + get { + if (SetChildProperty_cb_delegate == null) + SetChildProperty_cb_delegate = new SetChildPropertyNativeDelegate (SetChildProperty_cb); + return SetChildProperty_cb_delegate; + } + } + + static void OverrideSetChildProperty (GLib.GType gtype) + { + OverrideSetChildProperty (gtype, SetChildPropertyVMCallback); + } + + static void OverrideSetChildProperty (GLib.GType gtype, SetChildPropertyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_child_property")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetChildPropertyNativeDelegate (IntPtr inst, IntPtr child, IntPtr pspec, IntPtr value); + + static void SetChildProperty_cb (IntPtr inst, IntPtr child, IntPtr pspec, IntPtr value) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + __obj.OnSetChildProperty (GLib.Object.GetObject (child), pspec, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetChildProperty")] + protected virtual void OnSetChildProperty (GLib.Object child, IntPtr pspec, GLib.Value value) + { + InternalSetChildProperty (child, pspec, value); + } + + private void InternalSetChildProperty (GLib.Object child, IntPtr pspec, GLib.Value value) + { + SetChildPropertyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_child_property")); + unmanaged = (SetChildPropertyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetChildPropertyNativeDelegate)); + } + if (unmanaged == null) return; + + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, pspec, native_value); + Marshal.FreeHGlobal (native_value); + } + + static GetLayerPriorityNativeDelegate GetLayerPriority_cb_delegate; + static GetLayerPriorityNativeDelegate GetLayerPriorityVMCallback { + get { + if (GetLayerPriority_cb_delegate == null) + GetLayerPriority_cb_delegate = new GetLayerPriorityNativeDelegate (GetLayerPriority_cb); + return GetLayerPriority_cb_delegate; + } + } + + static void OverrideGetLayerPriority (GLib.GType gtype) + { + OverrideGetLayerPriority (gtype, GetLayerPriorityVMCallback); + } + + static void OverrideGetLayerPriority (GLib.GType gtype, GetLayerPriorityNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_layer_priority")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint GetLayerPriorityNativeDelegate (IntPtr inst); + + static uint GetLayerPriority_cb (IntPtr inst) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + uint __result; + __result = __obj.OnGetLayerPriority (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideGetLayerPriority")] + protected virtual uint OnGetLayerPriority () + { + return InternalGetLayerPriority (); + } + + private uint InternalGetLayerPriority () + { + GetLayerPriorityNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_layer_priority")); + unmanaged = (GetLayerPriorityNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetLayerPriorityNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle); + return __result; + } + + static GetNaturalFramerateNativeDelegate GetNaturalFramerate_cb_delegate; + static GetNaturalFramerateNativeDelegate GetNaturalFramerateVMCallback { + get { + if (GetNaturalFramerate_cb_delegate == null) + GetNaturalFramerate_cb_delegate = new GetNaturalFramerateNativeDelegate (GetNaturalFramerate_cb); + return GetNaturalFramerate_cb_delegate; + } + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype) + { + OverrideGetNaturalFramerate (gtype, GetNaturalFramerateVMCallback); + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype, GetNaturalFramerateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetNaturalFramerateNativeDelegate (IntPtr inst, out int framerate_n, out int framerate_d); + + static bool GetNaturalFramerate_cb (IntPtr inst, out int framerate_n, out int framerate_d) + { + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnGetNaturalFramerate (out framerate_n, out framerate_d); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideGetNaturalFramerate")] + protected virtual bool OnGetNaturalFramerate (out int framerate_n, out int framerate_d) + { + return InternalGetNaturalFramerate (out framerate_n, out framerate_d); + } + + private bool InternalGetNaturalFramerate (out int framerate_n, out int framerate_d) + { + GetNaturalFramerateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + unmanaged = (GetNaturalFramerateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetNaturalFramerateNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + bool __result = unmanaged (this.Handle, out framerate_n, out framerate_d); + return __result; + } + + static SetChildPropertyFullNativeDelegate SetChildPropertyFull_cb_delegate; + static SetChildPropertyFullNativeDelegate SetChildPropertyFullVMCallback { + get { + if (SetChildPropertyFull_cb_delegate == null) + SetChildPropertyFull_cb_delegate = new SetChildPropertyFullNativeDelegate (SetChildPropertyFull_cb); + return SetChildPropertyFull_cb_delegate; + } + } + + static void OverrideSetChildPropertyFull (GLib.GType gtype) + { + OverrideSetChildPropertyFull (gtype, SetChildPropertyFullVMCallback); + } + + static void OverrideSetChildPropertyFull (GLib.GType gtype, SetChildPropertyFullNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_child_property_full")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetChildPropertyFullNativeDelegate (IntPtr inst, IntPtr child, IntPtr pspec, IntPtr value, out IntPtr error); + + static bool SetChildPropertyFull_cb (IntPtr inst, IntPtr child, IntPtr pspec, IntPtr value, out IntPtr error) + { + error = IntPtr.Zero; + + try { + TimelineElement __obj = GLib.Object.GetObject (inst, false) as TimelineElement; + bool __result; + __result = __obj.OnSetChildPropertyFull (GLib.Object.GetObject (child), pspec, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideSetChildPropertyFull")] + protected virtual bool OnSetChildPropertyFull (GLib.Object child, IntPtr pspec, GLib.Value value) + { + return InternalSetChildPropertyFull (child, pspec, value); + } + + private bool InternalSetChildPropertyFull (GLib.Object child, IntPtr pspec, GLib.Value value) + { + SetChildPropertyFullNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_child_property_full")); + unmanaged = (SetChildPropertyFullNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetChildPropertyFullNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr error = IntPtr.Zero; + bool __result = unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, pspec, native_value, out error); + Marshal.FreeHGlobal (native_value); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("set_parent" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_parent + , null + , "set_start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_start + , "set_parent" + , "set_inpoint" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_inpoint" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_inpoint + , "set_start" + , "set_duration" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_duration" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_duration + , "set_inpoint" + , "set_max_duration" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_max_duration" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_max_duration + , "set_duration" + , "set_priority" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_priority" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_priority + , "set_max_duration" + , "ripple" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("ripple" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ripple + , "set_priority" + , "ripple_end" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("ripple_end" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ripple_end + , "ripple" + , "roll_start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("roll_start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // roll_start + , "ripple_end" + , "roll_end" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("roll_end" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // roll_end + , "roll_start" + , "trim" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("trim" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // trim + , "roll_end" + , "deep_copy" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("deep_copy" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_copy + , "trim" + , "paste" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("paste" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // paste + , "deep_copy" + , "list_children_properties" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("list_children_properties" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // list_children_properties + , "paste" + , "lookup_child" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("lookup_child" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lookup_child + , "list_children_properties" + , "get_track_types" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_track_types" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_track_types + , "lookup_child" + , "set_child_property" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_child_property" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_child_property + , "get_track_types" + , "get_layer_priority" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_layer_priority" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_layer_priority + , "set_child_property" + , "get_natural_framerate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_natural_framerate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_natural_framerate + , "get_layer_priority" + , "set_child_property_full" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_child_property_full" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_child_property_full + , "get_natural_framerate" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 14 // _ges_reserved + , "set_child_property_full" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_timeline_element_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_add_child_property(IntPtr raw, IntPtr pspec, IntPtr child); + + public bool AddChildProperty(IntPtr pspec, GLib.Object child) { + bool raw_ret = ges_timeline_element_add_child_property(Handle, pspec, child == null ? IntPtr.Zero : child.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_copy(IntPtr raw, bool deep); + + public GES.TimelineElement Copy(bool deep) { + IntPtr raw_ret = ges_timeline_element_copy(Handle, deep); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret) as GES.TimelineElement; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_edit(IntPtr raw, IntPtr layers, long new_layer_priority, int mode, int edge, ulong position); + + public bool Edit(GLib.List layers, long new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) { + bool raw_ret = ges_timeline_element_edit(Handle, layers == null ? IntPtr.Zero : layers.Handle, new_layer_priority, (int) mode, (int) edge, position); + bool ret = raw_ret; + return ret; + } + + public bool Edit(long new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) { + return Edit (null, new_layer_priority, mode, edge, position); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_timeline_element_edit_full(IntPtr raw, long new_layer_priority, int mode, int edge, ulong position, out IntPtr error); + + public unsafe bool EditFull(long new_layer_priority, GES.EditMode mode, GES.Edge edge, ulong position) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_timeline_element_edit_full(Handle, new_layer_priority, (int) mode, (int) edge, position, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_get_child_property(IntPtr raw, IntPtr property_name, IntPtr value); + + public bool GetChildProperty(string property_name, out GLib.Value value) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_value = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + bool raw_ret = ges_timeline_element_get_child_property(Handle, native_property_name, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + value = (GLib.Value) Marshal.PtrToStructure (native_value, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_timeline_element_get_child_property_by_pspec(IntPtr raw, IntPtr pspec, IntPtr value); + + public GLib.Value GetChildPropertyByPspec(IntPtr pspec) { + GLib.Value value; + IntPtr native_value = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + ges_timeline_element_get_child_property_by_pspec(Handle, pspec, native_value); + value = (GLib.Value) Marshal.PtrToStructure (native_value, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return value; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_timeline_element_get_layer_priority(IntPtr raw); + + public uint LayerPriority { + get { + uint raw_ret = ges_timeline_element_get_layer_priority(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_get_natural_framerate(IntPtr raw, out int framerate_n, out int framerate_d); + + public bool GetNaturalFramerate(out int framerate_n, out int framerate_d) { + bool raw_ret = ges_timeline_element_get_natural_framerate(Handle, out framerate_n, out framerate_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_get_toplevel_parent(IntPtr raw); + + public GES.TimelineElement ToplevelParent { + get { + IntPtr raw_ret = ges_timeline_element_get_toplevel_parent(Handle); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TimelineElement; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_timeline_element_get_track_types(IntPtr raw); + + public GES.TrackType TrackTypes { + get { + int raw_ret = ges_timeline_element_get_track_types(Handle); + GES.TrackType ret = (GES.TrackType) raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_lookup_child(IntPtr raw, IntPtr prop_name, out IntPtr child, out IntPtr pspec); + + public bool LookupChild(string prop_name, out GLib.Object child, out IntPtr pspec) { + IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup (prop_name); + IntPtr native_child; + bool raw_ret = ges_timeline_element_lookup_child(Handle, native_prop_name, out native_child, out pspec); + bool ret = raw_ret; + GLib.Marshaller.Free (native_prop_name); + child = GLib.Object.GetObject (native_child); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_element_paste(IntPtr raw, ulong paste_position); + + public GES.TimelineElement Paste(ulong paste_position) { + IntPtr raw_ret = ges_timeline_element_paste(Handle, paste_position); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret, true) as GES.TimelineElement; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_remove_child_property(IntPtr raw, IntPtr pspec); + + public bool RemoveChildProperty(IntPtr pspec) { + bool raw_ret = ges_timeline_element_remove_child_property(Handle, pspec); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_ripple(IntPtr raw, ulong start); + + public bool Ripple(ulong start) { + bool raw_ret = ges_timeline_element_ripple(Handle, start); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_ripple_end(IntPtr raw, ulong end); + + public bool RippleEnd(ulong end) { + bool raw_ret = ges_timeline_element_ripple_end(Handle, end); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_roll_end(IntPtr raw, ulong end); + + public bool RollEnd(ulong end) { + bool raw_ret = ges_timeline_element_roll_end(Handle, end); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_roll_start(IntPtr raw, ulong start); + + public bool RollStart(ulong start) { + bool raw_ret = ges_timeline_element_roll_start(Handle, start); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_child_property(IntPtr raw, IntPtr property_name, IntPtr value); + + public bool SetChildProperty(string property_name, GLib.Value value) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_timeline_element_set_child_property(Handle, native_property_name, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_timeline_element_set_child_property_by_pspec(IntPtr raw, IntPtr pspec, IntPtr value); + + public void SetChildPropertyByPspec(IntPtr pspec, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + ges_timeline_element_set_child_property_by_pspec(Handle, pspec, native_value); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_timeline_element_set_child_property_full(IntPtr raw, IntPtr property_name, IntPtr value, out IntPtr error); + + public unsafe bool SetChildPropertyFull(string property_name, GLib.Value value) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_timeline_element_set_child_property_full(Handle, native_property_name, native_value, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + Marshal.FreeHGlobal (native_value); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_duration(IntPtr raw, ulong duration); + + public bool SetDuration(ulong duration) { + bool raw_ret = ges_timeline_element_set_duration(Handle, duration); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_inpoint(IntPtr raw, ulong inpoint); + + public bool SetInpoint(ulong inpoint) { + bool raw_ret = ges_timeline_element_set_inpoint(Handle, inpoint); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_max_duration(IntPtr raw, ulong maxduration); + + public bool SetMaxDuration(ulong maxduration) { + bool raw_ret = ges_timeline_element_set_max_duration(Handle, maxduration); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_name(IntPtr raw, IntPtr name); + + public bool SetName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = ges_timeline_element_set_name(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + public bool SetName() { + return SetName (null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_parent(IntPtr raw, IntPtr parent); + + public bool SetParent(GES.TimelineElement parent) { + bool raw_ret = ges_timeline_element_set_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_priority(IntPtr raw, uint priority); + + [Obsolete] + public bool SetPriority(uint priority) { + bool raw_ret = ges_timeline_element_set_priority(Handle, priority); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_start(IntPtr raw, ulong start); + + public bool SetStart(ulong start) { + bool raw_ret = ges_timeline_element_set_start(Handle, start); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_set_timeline(IntPtr raw, IntPtr timeline); + + public bool SetTimeline(GES.Timeline timeline) { + bool raw_ret = ges_timeline_element_set_timeline(Handle, timeline == null ? IntPtr.Zero : timeline.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_timeline_element_trim(IntPtr raw, ulong start); + + public bool Trim(ulong start) { + bool raw_ret = ges_timeline_element_trim(Handle, start); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_asset(IntPtr raw); + + public GES.Asset Asset { + get { + IntPtr raw_ret = ges_extractable_get_asset(Handle); + GES.Asset ret = GLib.Object.GetObject(raw_ret) as GES.Asset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_extractable_get_id(IntPtr raw); + + public string Id { + get { + IntPtr raw_ret = ges_extractable_get_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_extractable_set_asset(IntPtr raw, IntPtr asset); + + public bool SetAsset(GES.Asset asset) { + bool raw_ret = ges_extractable_set_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.TimelineElement __obj = GLib.Object.GetObject (inst, false) as GES.TimelineElement; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TimelineElement), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + static TimelineElement () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("parent" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parent + , null + , "asset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("asset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // asset + , "parent" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // start + , "asset" + , "inpoint" + , (long) Marshal.OffsetOf(typeof(GESTimelineElement_startAlign), "start") + , 0 + ), + new GLib.AbiField("inpoint" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // inpoint + , "start" + , "duration" + , (long) Marshal.OffsetOf(typeof(GESTimelineElement_inpointAlign), "inpoint") + , 0 + ), + new GLib.AbiField("duration" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // duration + , "inpoint" + , "maxduration" + , (long) Marshal.OffsetOf(typeof(GESTimelineElement_durationAlign), "duration") + , 0 + ), + new GLib.AbiField("maxduration" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // maxduration + , "duration" + , "priority" + , (long) Marshal.OffsetOf(typeof(GESTimelineElement_maxdurationAlign), "maxduration") + , 0 + ), + new GLib.AbiField("priority" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // priority + , "maxduration" + , "timeline" + , (long) Marshal.OffsetOf(typeof(GESTimelineElement_priorityAlign), "priority") + , 0 + ), + new GLib.AbiField("timeline" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // timeline + , "priority" + , "name" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // name + , "timeline" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "name" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTimelineElement_startAlign + { + sbyte f1; + private ulong start; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTimelineElement_inpointAlign + { + sbyte f1; + private ulong inpoint; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTimelineElement_durationAlign + { + sbyte f1; + private ulong duration; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTimelineElement_maxdurationAlign + { + sbyte f1; + private ulong maxduration; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTimelineElement_priorityAlign + { + sbyte f1; + private uint priority; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TitleClip.cs b/ges/generated/GES/TitleClip.cs new file mode 100644 index 0000000000..dc301a75e9 --- /dev/null +++ b/ges/generated/GES/TitleClip.cs @@ -0,0 +1,278 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TitleClip : GES.SourceClip { + + public TitleClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_clip_new(); + + public TitleClip () : base (IntPtr.Zero) + { + if (GetType () != typeof (TitleClip)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_title_clip_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_background(IntPtr raw, uint background); + + [Obsolete] + [GLib.Property ("background")] + public uint Background { + get { + GLib.Value val = GetProperty ("background"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + ges_title_clip_set_background(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_color(IntPtr raw, uint color); + + [Obsolete] + [GLib.Property ("color")] + public uint Color { + get { + GLib.Value val = GetProperty ("color"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + ges_title_clip_set_color(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_clip_get_font_desc(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_font_desc(IntPtr raw, IntPtr font_desc); + + [Obsolete] + [GLib.Property ("font-desc")] + public string FontDesc { + get { + IntPtr raw_ret = ges_title_clip_get_font_desc(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_title_clip_set_font_desc(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_title_clip_get_halignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_halignment(IntPtr raw, int halign); + + [Obsolete] + [GLib.Property ("halignment")] + public GES.TextHAlign Halignment { + get { + int raw_ret = ges_title_clip_get_halignment(Handle); + GES.TextHAlign ret = (GES.TextHAlign) raw_ret; + return ret; + } + set { + ges_title_clip_set_halignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_clip_get_text(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_text(IntPtr raw, IntPtr text); + + [Obsolete] + [GLib.Property ("text")] + public string Text { + get { + IntPtr raw_ret = ges_title_clip_get_text(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_title_clip_set_text(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_title_clip_get_valignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_valignment(IntPtr raw, int valign); + + [Obsolete] + [GLib.Property ("valignment")] + public GES.TextVAlign Valignment { + get { + int raw_ret = ges_title_clip_get_valignment(Handle); + GES.TextVAlign ret = (GES.TextVAlign) raw_ret; + return ret; + } + set { + ges_title_clip_set_valignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_title_clip_get_xpos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_xpos(IntPtr raw, double position); + + [Obsolete] + [GLib.Property ("xpos")] + public double Xpos { + get { + double raw_ret = ges_title_clip_get_xpos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_title_clip_set_xpos(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_title_clip_get_ypos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_clip_set_ypos(IntPtr raw, double position); + + [Obsolete] + [GLib.Property ("ypos")] + public double Ypos { + get { + double raw_ret = ges_title_clip_get_ypos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_title_clip_set_ypos(Handle, value); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.SourceClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_title_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_title_clip_get_background_color(IntPtr raw); + + [Obsolete] + public uint BackgroundColor { + get { + uint raw_ret = ges_title_clip_get_background_color(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_title_clip_get_text_color(IntPtr raw); + + [Obsolete] + public uint TextColor { + get { + uint raw_ret = ges_title_clip_get_text_color(Handle); + uint ret = raw_ret; + return ret; + } + } + + + static TitleClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.SourceClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TitleSource.cs b/ges/generated/GES/TitleSource.cs new file mode 100644 index 0000000000..e2a36e2864 --- /dev/null +++ b/ges/generated/GES/TitleSource.cs @@ -0,0 +1,237 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TitleSource : GES.VideoSource { + + public TitleSource (IntPtr raw) : base(raw) {} + + protected TitleSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.VideoSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_title_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_title_source_get_background_color(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_background_color(IntPtr raw, uint color); + + public uint BackgroundColor { + get { + uint raw_ret = ges_title_source_get_background_color(Handle); + uint ret = raw_ret; + return ret; + } + set { + ges_title_source_set_background_color(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_source_get_font_desc(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_font_desc(IntPtr raw, IntPtr font_desc); + + [Obsolete] + public string FontDesc { + get { + IntPtr raw_ret = ges_title_source_get_font_desc(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_title_source_set_font_desc(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_title_source_get_halignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_halignment(IntPtr raw, int halign); + + public GES.TextHAlign Halignment { + get { + int raw_ret = ges_title_source_get_halignment(Handle); + GES.TextHAlign ret = (GES.TextHAlign) raw_ret; + return ret; + } + set { + ges_title_source_set_halignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_title_source_get_text(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_text(IntPtr raw, IntPtr text); + + [Obsolete] + public string Text { + get { + IntPtr raw_ret = ges_title_source_get_text(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + ges_title_source_set_text(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern uint ges_title_source_get_text_color(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_text_color(IntPtr raw, uint color); + + public uint TextColor { + get { + uint raw_ret = ges_title_source_get_text_color(Handle); + uint ret = raw_ret; + return ret; + } + set { + ges_title_source_set_text_color(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_title_source_get_valignment(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_valignment(IntPtr raw, int valign); + + public GES.TextVAlign Valignment { + get { + int raw_ret = ges_title_source_get_valignment(Handle); + GES.TextVAlign ret = (GES.TextVAlign) raw_ret; + return ret; + } + set { + ges_title_source_set_valignment(Handle, (int) value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_title_source_get_xpos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_xpos(IntPtr raw, double position); + + public double Xpos { + get { + double raw_ret = ges_title_source_get_xpos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_title_source_set_xpos(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern double ges_title_source_get_ypos(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_title_source_set_ypos(IntPtr raw, double position); + + public double Ypos { + get { + double raw_ret = ges_title_source_get_ypos(Handle); + double ret = raw_ret; + return ret; + } + set { + ges_title_source_set_ypos(Handle, value); + } + } + + + static TitleSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.VideoSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/Track.cs b/ges/generated/GES/Track.cs new file mode 100644 index 0000000000..d7f0fc1cf3 --- /dev/null +++ b/ges/generated/GES/Track.cs @@ -0,0 +1,970 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Track : Gst.Bin, GES.IMetaContainer { + + public Track (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_new(int type, IntPtr caps); + + public Track (GES.TrackType type, Gst.Caps caps) : base (IntPtr.Zero) + { + if (GetType () != typeof (Track)) { + var vals = new List (); + var names = new List (); + names.Add ("caps"); + vals.Add (new GLib.Value (caps)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + caps.Owned = false; + Raw = ges_track_new((int) type, caps == null ? IntPtr.Zero : caps.Handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_get_caps(IntPtr raw); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = ges_track_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), false); + return ret; + } + } + + [GLib.Property ("duration")] + public ulong Duration { + get { + GLib.Value val = GetProperty ("duration"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("id")] + public string Id { + get { + GLib.Value val = GetProperty ("id"); + string ret = (string) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("id", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_get_mixing(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_set_mixing(IntPtr raw, bool mixing); + + [GLib.Property ("mixing")] + public bool Mixing { + get { + bool raw_ret = ges_track_get_mixing(Handle); + bool ret = raw_ret; + return ret; + } + set { + ges_track_set_mixing(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_get_restriction_caps(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_set_restriction_caps(IntPtr raw, IntPtr caps); + + [GLib.Property ("restriction-caps")] + public Gst.Caps RestrictionCaps { + get { + IntPtr raw_ret = ges_track_get_restriction_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + ges_track_set_restriction_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [GLib.Property ("track-type")] + public GES.TrackType TrackType { + get { + GLib.Value val = GetProperty ("track-type"); + GES.TrackType ret = (GES.TrackType) (Enum) val; + val.Dispose (); + return ret; + } + } + + public GES.TrackType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (GES.TrackType) (*raw_ptr); + } + } + } + + [GLib.Signal("track-element-added")] + public event GES.TrackElementAddedHandler TrackElementAdded { + add { + this.AddSignalHandler ("track-element-added", value, typeof (GES.TrackElementAddedArgs)); + } + remove { + this.RemoveSignalHandler ("track-element-added", value); + } + } + + [GLib.Signal("track-element-removed")] + public event GES.TrackElementRemovedHandler TrackElementRemoved { + add { + this.AddSignalHandler ("track-element-removed", value, typeof (GES.TrackElementRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("track-element-removed", value); + } + } + + [GLib.Signal("commited")] + public event System.EventHandler Commited { + add { + this.AddSignalHandler ("commited", value); + } + remove { + this.RemoveSignalHandler ("commited", value); + } + } + + static CommitedNativeDelegate Commited_cb_delegate; + static CommitedNativeDelegate CommitedVMCallback { + get { + if (Commited_cb_delegate == null) + Commited_cb_delegate = new CommitedNativeDelegate (Commited_cb); + return Commited_cb_delegate; + } + } + + static void OverrideCommited (GLib.GType gtype) + { + OverrideCommited (gtype, CommitedVMCallback); + } + + static void OverrideCommited (GLib.GType gtype, CommitedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "commited", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CommitedNativeDelegate (IntPtr inst); + + static void Commited_cb (IntPtr inst) + { + try { + Track __obj = GLib.Object.GetObject (inst, false) as Track; + __obj.OnCommited (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Track), ConnectionMethod="OverrideCommited")] + protected virtual void OnCommited () + { + InternalCommited (); + } + + private void InternalCommited () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static TrackElementAddedNativeDelegate TrackElementAdded_cb_delegate; + static TrackElementAddedNativeDelegate TrackElementAddedVMCallback { + get { + if (TrackElementAdded_cb_delegate == null) + TrackElementAdded_cb_delegate = new TrackElementAddedNativeDelegate (TrackElementAdded_cb); + return TrackElementAdded_cb_delegate; + } + } + + static void OverrideTrackElementAdded (GLib.GType gtype) + { + OverrideTrackElementAdded (gtype, TrackElementAddedVMCallback); + } + + static void OverrideTrackElementAdded (GLib.GType gtype, TrackElementAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "track-element-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void TrackElementAddedNativeDelegate (IntPtr inst, IntPtr effect); + + static void TrackElementAdded_cb (IntPtr inst, IntPtr effect) + { + try { + Track __obj = GLib.Object.GetObject (inst, false) as Track; + __obj.OnTrackElementAdded (GLib.Object.GetObject(effect) as GES.TrackElement); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Track), ConnectionMethod="OverrideTrackElementAdded")] + protected virtual void OnTrackElementAdded (GES.TrackElement effect) + { + InternalTrackElementAdded (effect); + } + + private void InternalTrackElementAdded (GES.TrackElement effect) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (effect); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static TrackElementRemovedNativeDelegate TrackElementRemoved_cb_delegate; + static TrackElementRemovedNativeDelegate TrackElementRemovedVMCallback { + get { + if (TrackElementRemoved_cb_delegate == null) + TrackElementRemoved_cb_delegate = new TrackElementRemovedNativeDelegate (TrackElementRemoved_cb); + return TrackElementRemoved_cb_delegate; + } + } + + static void OverrideTrackElementRemoved (GLib.GType gtype) + { + OverrideTrackElementRemoved (gtype, TrackElementRemovedVMCallback); + } + + static void OverrideTrackElementRemoved (GLib.GType gtype, TrackElementRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "track-element-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void TrackElementRemovedNativeDelegate (IntPtr inst, IntPtr effect); + + static void TrackElementRemoved_cb (IntPtr inst, IntPtr effect) + { + try { + Track __obj = GLib.Object.GetObject (inst, false) as Track; + __obj.OnTrackElementRemoved (GLib.Object.GetObject(effect) as GES.TrackElement); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Track), ConnectionMethod="OverrideTrackElementRemoved")] + protected virtual void OnTrackElementRemoved (GES.TrackElement effect) + { + InternalTrackElementRemoved (effect); + } + + private void InternalTrackElementRemoved (GES.TrackElement effect) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (effect); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_mixing_element" + , Gst.Bin.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_mixing_element + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "get_mixing_element" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_track_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_add_element(IntPtr raw, IntPtr _object); + + public bool AddElement(GES.TrackElement _object) { + bool raw_ret = ges_track_add_element(Handle, _object == null ? IntPtr.Zero : _object.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_track_add_element_full(IntPtr raw, IntPtr _object, out IntPtr error); + + public unsafe bool AddElementFull(GES.TrackElement _object) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_track_add_element_full(Handle, _object == null ? IntPtr.Zero : _object.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_commit(IntPtr raw); + + public bool Commit() { + bool raw_ret = ges_track_commit(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_get_elements(IntPtr raw); + + public GES.TrackElement[] Elements { + get { + IntPtr raw_ret = ges_track_get_elements(Handle); + GES.TrackElement[] ret = (GES.TrackElement[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.TrackElement)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_get_timeline(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_set_timeline(IntPtr raw, IntPtr timeline); + + public GES.Timeline Timeline { + get { + IntPtr raw_ret = ges_track_get_timeline(Handle); + GES.Timeline ret = GLib.Object.GetObject(raw_ret) as GES.Timeline; + return ret; + } + set { + ges_track_set_timeline(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_remove_element(IntPtr raw, IntPtr _object); + + public bool RemoveElement(GES.TrackElement _object) { + bool raw_ret = ges_track_remove_element(Handle, _object == null ? IntPtr.Zero : _object.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool ges_track_remove_element_full(IntPtr raw, IntPtr _object, out IntPtr error); + + public unsafe bool RemoveElementFull(GES.TrackElement _object) { + IntPtr error = IntPtr.Zero; + bool raw_ret = ges_track_remove_element_full(Handle, _object == null ? IntPtr.Zero : _object.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_update_restriction_caps(IntPtr raw, IntPtr caps); + + public void UpdateRestrictionCaps(Gst.Caps caps) { + ges_track_update_restriction_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_add_metas_from_string(IntPtr raw, IntPtr str); + + public bool AddMetasFromString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + bool raw_ret = ges_meta_container_add_metas_from_string(Handle, native_str); + bool ret = raw_ret; + GLib.Marshaller.Free (native_str); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_check_meta_registered(IntPtr raw, IntPtr meta_item, out int flags, out IntPtr type); + + public bool CheckMetaRegistered(string meta_item, out GES.MetaFlag flags, out GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + int native_flags; + IntPtr native_type; + bool raw_ret = ges_meta_container_check_meta_registered(Handle, native_meta_item, out native_flags, out native_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + flags = (GES.MetaFlag) native_flags; + type = new GLib.GType(native_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_meta_container_foreach(IntPtr raw, GESSharp.MetaForeachFuncNative func, IntPtr user_data); + + public void Foreach(GES.MetaForeachFunc func) { + GESSharp.MetaForeachFuncWrapper func_wrapper = new GESSharp.MetaForeachFuncWrapper (func); + ges_meta_container_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_boolean(IntPtr raw, IntPtr meta_item, out bool dest); + + public bool GetBoolean(string meta_item, out bool dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_boolean(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_date_time(IntPtr raw, IntPtr meta_item, out IntPtr dest); + + public bool GetDateTime(string meta_item, out Gst.DateTime dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_dest; + bool raw_ret = ges_meta_container_get_date_time(Handle, native_meta_item, out native_dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + dest = native_dest == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_double(IntPtr raw, IntPtr meta_item, out double dest); + + public bool GetDouble(string meta_item, out double dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_double(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_float(IntPtr raw, IntPtr meta_item, out float dest); + + public bool GetFloat(string meta_item, out float dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_float(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int(IntPtr raw, IntPtr meta_item, out int dest); + + public bool GetInt(string meta_item, out int dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_int64(IntPtr raw, IntPtr meta_item, out long dest); + + public bool GetInt64(string meta_item, out long dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_int64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_marker_list(IntPtr raw, IntPtr key); + + public GES.MarkerList GetMarkerList(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_marker_list(Handle, native_key); + GES.MarkerList ret = GLib.Object.GetObject(raw_ret, true) as GES.MarkerList; + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_meta(IntPtr raw, IntPtr key); + + public GLib.Value GetMeta(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = ges_meta_container_get_meta(Handle, native_key); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_get_string(IntPtr raw, IntPtr meta_item); + + public string GetString(string meta_item) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr raw_ret = ges_meta_container_get_string(Handle, native_meta_item); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint(IntPtr raw, IntPtr meta_item, out uint dest); + + public bool GetUint(string meta_item, out uint dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_get_uint64(IntPtr raw, IntPtr meta_item, out ulong dest); + + public bool GetUint64(string meta_item, out ulong dest) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_get_uint64(Handle, native_meta_item, out dest); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_meta_container_metas_to_string(IntPtr raw); + + public string MetasToString() { + IntPtr raw_ret = ges_meta_container_metas_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMeta(GES.MetaFlag flags, string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_register_meta(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_boolean(IntPtr raw, int flags, IntPtr meta_item, bool value); + + public bool RegisterMetaBoolean(GES.MetaFlag flags, string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_boolean(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_date_time(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaDateTime(GES.MetaFlag flags, string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_date_time(Handle, (int) flags, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_double(IntPtr raw, int flags, IntPtr meta_item, double value); + + public bool RegisterMetaDouble(GES.MetaFlag flags, string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_double(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_float(IntPtr raw, int flags, IntPtr meta_item, float value); + + public bool RegisterMetaFloat(GES.MetaFlag flags, string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_float(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int(IntPtr raw, int flags, IntPtr meta_item, int value); + + public bool RegisterMetaInt(GES.MetaFlag flags, string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_int64(IntPtr raw, int flags, IntPtr meta_item, long value); + + public bool RegisterMetaInt64(GES.MetaFlag flags, string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_int64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_string(IntPtr raw, int flags, IntPtr meta_item, IntPtr value); + + public bool RegisterMetaString(GES.MetaFlag flags, string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_register_meta_string(Handle, (int) flags, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint(IntPtr raw, int flags, IntPtr meta_item, uint value); + + public bool RegisterMetaUint(GES.MetaFlag flags, string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_meta_uint64(IntPtr raw, int flags, IntPtr meta_item, ulong value); + + public bool RegisterMetaUint64(GES.MetaFlag flags, string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_meta_uint64(Handle, (int) flags, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_register_static_meta(IntPtr raw, int flags, IntPtr meta_item, IntPtr type); + + public bool RegisterStaticMeta(GES.MetaFlag flags, string meta_item, GLib.GType type) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_register_static_meta(Handle, (int) flags, native_meta_item, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_boolean(IntPtr raw, IntPtr meta_item, bool value); + + public bool SetBoolean(string meta_item, bool value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_boolean(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_date_time(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetDateTime(string meta_item, Gst.DateTime value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_date_time(Handle, native_meta_item, value == null ? IntPtr.Zero : value.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_double(IntPtr raw, IntPtr meta_item, double value); + + public bool SetDouble(string meta_item, double value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_double(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_float(IntPtr raw, IntPtr meta_item, float value); + + public bool SetFloat(string meta_item, float value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_float(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int(IntPtr raw, IntPtr meta_item, int value); + + public bool SetInt(string meta_item, int value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_int64(IntPtr raw, IntPtr meta_item, long value); + + public bool SetInt64(string meta_item, long value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_int64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_marker_list(IntPtr raw, IntPtr meta_item, IntPtr list); + + public bool SetMarkerList(string meta_item, GES.MarkerList list) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_marker_list(Handle, native_meta_item, list == null ? IntPtr.Zero : list.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_meta(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetMeta(string meta_item, GLib.Value value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = ges_meta_container_set_meta(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + Marshal.FreeHGlobal (native_value); + return ret; + } + + public bool SetMeta(string meta_item) { + return SetMeta (meta_item, GLib.Value.Empty); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_string(IntPtr raw, IntPtr meta_item, IntPtr value); + + public bool SetString(string meta_item, string value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = ges_meta_container_set_string(Handle, native_meta_item, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint(IntPtr raw, IntPtr meta_item, uint value); + + public bool SetUint(string meta_item, uint value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_meta_container_set_uint64(IntPtr raw, IntPtr meta_item, ulong value); + + public bool SetUint64(string meta_item, ulong value) { + IntPtr native_meta_item = GLib.Marshaller.StringToPtrGStrdup (meta_item); + bool raw_ret = ges_meta_container_set_uint64(Handle, native_meta_item, value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_meta_item); + return ret; + } + + [GLib.Signal("notify-meta")] + public event GES.NotifyMetaHandler NotifyMeta { + add { + this.AddSignalHandler ("notify-meta", value, typeof (GES.NotifyMetaArgs)); + } + remove { + this.RemoveSignalHandler ("notify-meta", value); + } + } + + static NotifyMetaNativeDelegate NotifyMeta_cb_delegate; + static NotifyMetaNativeDelegate NotifyMetaVMCallback { + get { + if (NotifyMeta_cb_delegate == null) + NotifyMeta_cb_delegate = new NotifyMetaNativeDelegate (NotifyMeta_cb); + return NotifyMeta_cb_delegate; + } + } + + static void OverrideNotifyMeta (GLib.GType gtype) + { + OverrideNotifyMeta (gtype, NotifyMetaVMCallback); + } + + static void OverrideNotifyMeta (GLib.GType gtype, NotifyMetaNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "notify-meta", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NotifyMetaNativeDelegate (IntPtr inst, IntPtr key, IntPtr value); + + static void NotifyMeta_cb (IntPtr inst, IntPtr key, IntPtr value) + { + try { + GES.Track __obj = GLib.Object.GetObject (inst, false) as GES.Track; + __obj.OnNotifyMeta (GLib.Marshaller.Utf8PtrToString (key), (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.Track), ConnectionMethod="OverrideNotifyMeta")] + protected virtual void OnNotifyMeta (string key, GLib.Value value) + { + InternalNotifyMeta (key, value); + } + + private void InternalNotifyMeta (string key, GLib.Value value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (key); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (value); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + static Track () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , Gst.Bin.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(GES.TrackType))) // type + , null + , "priv" + , (long) Marshal.OffsetOf(typeof(GESTrack_typeAlign), "type") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "type" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTrack_typeAlign + { + sbyte f1; + private GES.TrackType type; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TrackAddedHandler.cs b/ges/generated/GES/TrackAddedHandler.cs new file mode 100644 index 0000000000..f8a6c1d599 --- /dev/null +++ b/ges/generated/GES/TrackAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void TrackAddedHandler(object o, TrackAddedArgs args); + + public class TrackAddedArgs : GLib.SignalArgs { + public GES.Track Track{ + get { + return (GES.Track) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/TrackElement.cs b/ges/generated/GES/TrackElement.cs new file mode 100644 index 0000000000..2f3732604e --- /dev/null +++ b/ges/generated/GES/TrackElement.cs @@ -0,0 +1,755 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TrackElement : GES.TimelineElement { + + protected TrackElement (IntPtr raw) : base(raw) {} + + protected TrackElement() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("active")] + public bool Active { + get { + GLib.Value val = GetProperty ("active"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("active", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_get_auto_clamp_control_sources(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_element_set_auto_clamp_control_sources(IntPtr raw, bool auto_clamp); + + [GLib.Property ("auto-clamp-control-sources")] + public bool AutoClampControlSources { + get { + bool raw_ret = ges_track_element_get_auto_clamp_control_sources(Handle); + bool ret = raw_ret; + return ret; + } + set { + ges_track_element_set_auto_clamp_control_sources(Handle, value); + } + } + + [GLib.Property ("has-internal-source")] + public bool HasInternalSourceProp + { + get { + GLib.Value val = GetProperty ("has-internal-source"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("has-internal-source", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_track(IntPtr raw); + + [GLib.Property ("track")] + public GES.Track Track { + get { + IntPtr raw_ret = ges_track_element_get_track(Handle); + GES.Track ret = GLib.Object.GetObject(raw_ret) as GES.Track; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_track_element_get_track_type(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_element_set_track_type(IntPtr raw, int type); + + [GLib.Property ("track-type")] + public GES.TrackType TrackType { + get { + int raw_ret = ges_track_element_get_track_type(Handle); + GES.TrackType ret = (GES.TrackType) raw_ret; + return ret; + } + set { + ges_track_element_set_track_type(Handle, (int) value); + } + } + + [GLib.Signal("control-binding-added")] + public event GES.ControlBindingAddedHandler ControlBindingAdded { + add { + this.AddSignalHandler ("control-binding-added", value, typeof (GES.ControlBindingAddedArgs)); + } + remove { + this.RemoveSignalHandler ("control-binding-added", value); + } + } + + [GLib.Signal("control-binding-removed")] + public event GES.ControlBindingRemovedHandler ControlBindingRemoved { + add { + this.AddSignalHandler ("control-binding-removed", value, typeof (GES.ControlBindingRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("control-binding-removed", value); + } + } + + static ControlBindingAddedNativeDelegate ControlBindingAdded_cb_delegate; + static ControlBindingAddedNativeDelegate ControlBindingAddedVMCallback { + get { + if (ControlBindingAdded_cb_delegate == null) + ControlBindingAdded_cb_delegate = new ControlBindingAddedNativeDelegate (ControlBindingAdded_cb); + return ControlBindingAdded_cb_delegate; + } + } + + static void OverrideControlBindingAdded (GLib.GType gtype) + { + OverrideControlBindingAdded (gtype, ControlBindingAddedVMCallback); + } + + static void OverrideControlBindingAdded (GLib.GType gtype, ControlBindingAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "control-binding-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ControlBindingAddedNativeDelegate (IntPtr inst, IntPtr control_binding); + + static void ControlBindingAdded_cb (IntPtr inst, IntPtr control_binding) + { + try { + TrackElement __obj = GLib.Object.GetObject (inst, false) as TrackElement; + __obj.OnControlBindingAdded (GLib.Object.GetObject(control_binding) as Gst.ControlBinding); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElement), ConnectionMethod="OverrideControlBindingAdded")] + protected virtual void OnControlBindingAdded (Gst.ControlBinding control_binding) + { + InternalControlBindingAdded (control_binding); + } + + private void InternalControlBindingAdded (Gst.ControlBinding control_binding) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (control_binding); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ControlBindingRemovedNativeDelegate ControlBindingRemoved_cb_delegate; + static ControlBindingRemovedNativeDelegate ControlBindingRemovedVMCallback { + get { + if (ControlBindingRemoved_cb_delegate == null) + ControlBindingRemoved_cb_delegate = new ControlBindingRemovedNativeDelegate (ControlBindingRemoved_cb); + return ControlBindingRemoved_cb_delegate; + } + } + + static void OverrideControlBindingRemoved (GLib.GType gtype) + { + OverrideControlBindingRemoved (gtype, ControlBindingRemovedVMCallback); + } + + static void OverrideControlBindingRemoved (GLib.GType gtype, ControlBindingRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "control-binding-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ControlBindingRemovedNativeDelegate (IntPtr inst, IntPtr control_binding); + + static void ControlBindingRemoved_cb (IntPtr inst, IntPtr control_binding) + { + try { + TrackElement __obj = GLib.Object.GetObject (inst, false) as TrackElement; + __obj.OnControlBindingRemoved (GLib.Object.GetObject(control_binding) as Gst.ControlBinding); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElement), ConnectionMethod="OverrideControlBindingRemoved")] + protected virtual void OnControlBindingRemoved (Gst.ControlBinding control_binding) + { + InternalControlBindingRemoved (control_binding); + } + + private void InternalControlBindingRemoved (Gst.ControlBinding control_binding) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (control_binding); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ActiveChangedNativeDelegate ActiveChanged_cb_delegate; + static ActiveChangedNativeDelegate ActiveChangedVMCallback { + get { + if (ActiveChanged_cb_delegate == null) + ActiveChanged_cb_delegate = new ActiveChangedNativeDelegate (ActiveChanged_cb); + return ActiveChanged_cb_delegate; + } + } + + static void OverrideActiveChanged (GLib.GType gtype) + { + OverrideActiveChanged (gtype, ActiveChangedVMCallback); + } + + static void OverrideActiveChanged (GLib.GType gtype, ActiveChangedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("active_changed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ActiveChangedNativeDelegate (IntPtr inst, bool active); + + static void ActiveChanged_cb (IntPtr inst, bool active) + { + try { + TrackElement __obj = GLib.Object.GetObject (inst, false) as TrackElement; + __obj.OnActiveChanged (active); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElement), ConnectionMethod="OverrideActiveChanged")] + protected virtual void OnActiveChanged (bool active) + { + InternalActiveChanged (active); + } + + private void InternalActiveChanged (bool active) + { + ActiveChangedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("active_changed")); + unmanaged = (ActiveChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActiveChangedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, active); + } + + static ChangedNativeDelegate Changed_cb_delegate; + static ChangedNativeDelegate ChangedVMCallback { + get { + if (Changed_cb_delegate == null) + Changed_cb_delegate = new ChangedNativeDelegate (Changed_cb); + return Changed_cb_delegate; + } + } + + static void OverrideChanged (GLib.GType gtype) + { + OverrideChanged (gtype, ChangedVMCallback); + } + + static void OverrideChanged (GLib.GType gtype, ChangedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("changed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChangedNativeDelegate (IntPtr inst); + + static void Changed_cb (IntPtr inst) + { + try { + TrackElement __obj = GLib.Object.GetObject (inst, false) as TrackElement; + __obj.OnChanged (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElement), ConnectionMethod="OverrideChanged")] + protected virtual void OnChanged () + { + InternalChanged (); + } + + private void InternalChanged () + { + ChangedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("changed")); + unmanaged = (ChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static LookupChildNativeDelegate LookupChild_cb_delegate; + static LookupChildNativeDelegate LookupChildVMCallback { + get { + if (LookupChild_cb_delegate == null) + LookupChild_cb_delegate = new LookupChildNativeDelegate (LookupChild_cb); + return LookupChild_cb_delegate; + } + } + + static void OverrideLookupChild (GLib.GType gtype) + { + OverrideLookupChild (gtype, LookupChildVMCallback); + } + + static void OverrideLookupChild (GLib.GType gtype, LookupChildNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("lookup_child")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool LookupChildNativeDelegate (IntPtr inst, IntPtr prop_name, out IntPtr element, out IntPtr pspec); + + static bool LookupChild_cb (IntPtr inst, IntPtr prop_name, out IntPtr element, out IntPtr pspec) + { + try { + TrackElement __obj = GLib.Object.GetObject (inst, false) as TrackElement; + bool __result; + Gst.Element myelement; + __result = __obj.OnLookupChild (GLib.Marshaller.Utf8PtrToString (prop_name), out myelement, out pspec); + element = myelement == null ? IntPtr.Zero : myelement.Handle; + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElement), ConnectionMethod="OverrideLookupChild")] + protected virtual bool OnLookupChild (string prop_name, out Gst.Element element, out IntPtr pspec) + { + return InternalLookupChild (prop_name, out element, out pspec); + } + + private bool InternalLookupChild (string prop_name, out Gst.Element element, out IntPtr pspec) + { + LookupChildNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("lookup_child")); + unmanaged = (LookupChildNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LookupChildNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup (prop_name); + IntPtr native_element; + bool __result = unmanaged (this.Handle, native_prop_name, out native_element, out pspec); + GLib.Marshaller.Free (native_prop_name); + element = GLib.Object.GetObject(native_element, true) as Gst.Element; + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("nleobject_factorytype" + , GES.TimelineElement.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // nleobject_factorytype + , null + , "create_gnl_object" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create_gnl_object" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_gnl_object + , "nleobject_factorytype" + , "create_element" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create_element" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_element + , "create_gnl_object" + , "active_changed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("active_changed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // active_changed + , "create_element" + , "changed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("changed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // changed + , "active_changed" + , "list_children_properties" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("list_children_properties" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // list_children_properties + , "changed" + , "lookup_child" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("lookup_child" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lookup_child + , "list_children_properties" + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI.abi + // End ABI.abi + + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // ABI._gst_reserved + , "lookup_child" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {}, + new List() {"ABI._gst_reserved"} + } + , "lookup_child" + , null + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_track_element_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_element_add_children_props(IntPtr raw, IntPtr element, IntPtr[] wanted_categories, IntPtr[] blacklist, IntPtr[] whitelist); + + public void AddChildrenProps(Gst.Element element, string[] wanted_categories, string[] blacklist, string[] whitelist) { + int cnt_wanted_categories = wanted_categories == null ? 0 : wanted_categories.Length; + IntPtr[] native_wanted_categories = new IntPtr [cnt_wanted_categories + 1]; + for (int i = 0; i < cnt_wanted_categories; i++) + native_wanted_categories [i] = GLib.Marshaller.StringToPtrGStrdup(wanted_categories[i]); + native_wanted_categories [cnt_wanted_categories] = IntPtr.Zero; + int cnt_blacklist = blacklist == null ? 0 : blacklist.Length; + IntPtr[] native_blacklist = new IntPtr [cnt_blacklist + 1]; + for (int i = 0; i < cnt_blacklist; i++) + native_blacklist [i] = GLib.Marshaller.StringToPtrGStrdup(blacklist[i]); + native_blacklist [cnt_blacklist] = IntPtr.Zero; + int cnt_whitelist = whitelist == null ? 0 : whitelist.Length; + IntPtr[] native_whitelist = new IntPtr [cnt_whitelist + 1]; + for (int i = 0; i < cnt_whitelist; i++) + native_whitelist [i] = GLib.Marshaller.StringToPtrGStrdup(whitelist[i]); + native_whitelist [cnt_whitelist] = IntPtr.Zero; + ges_track_element_add_children_props(Handle, element == null ? IntPtr.Zero : element.Handle, native_wanted_categories, native_blacklist, native_whitelist); + } + + public void AddChildrenProps(Gst.Element element) { + AddChildrenProps (element, null, null, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_element_clamp_control_source(IntPtr raw, IntPtr property_name); + + public void ClampControlSource(string property_name) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + ges_track_element_clamp_control_source(Handle, native_property_name); + GLib.Marshaller.Free (native_property_name); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_edit(IntPtr raw, IntPtr layers, int mode, int edge, ulong position); + + [Obsolete] + public bool Edit(GLib.List layers, GES.EditMode mode, GES.Edge edge, ulong position) { + bool raw_ret = ges_track_element_edit(Handle, layers == null ? IntPtr.Zero : layers.Handle, (int) mode, (int) edge, position); + bool ret = raw_ret; + return ret; + } + + public bool Edit(GES.EditMode mode, GES.Edge edge, ulong position) { + return Edit (null, mode, edge, position); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern System.IntPtr ges_track_element_get_all_control_bindings(IntPtr raw); + + public string[] AllControlBindings { + get { + System.IntPtr raw_ret = ges_track_element_get_all_control_bindings(Handle); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(System.IntPtr), false, false, typeof(string)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_control_binding(IntPtr raw, IntPtr property_name); + + public Gst.ControlBinding GetControlBinding(string property_name) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr raw_ret = ges_track_element_get_control_binding(Handle, native_property_name); + Gst.ControlBinding ret = GLib.Object.GetObject(raw_ret) as Gst.ControlBinding; + GLib.Marshaller.Free (native_property_name); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_element(IntPtr raw); + + public Gst.Element Element { + get { + IntPtr raw_ret = ges_track_element_get_element(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_gnlobject(IntPtr raw); + + [Obsolete] + public Gst.Element Gnlobject { + get { + IntPtr raw_ret = ges_track_element_get_gnlobject(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_get_nleobject(IntPtr raw); + + public Gst.Element Nleobject { + get { + IntPtr raw_ret = ges_track_element_get_nleobject(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_has_internal_source(IntPtr raw); + + public bool HasInternalSource { + get { + bool raw_ret = ges_track_element_has_internal_source(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_is_active(IntPtr raw); + + public bool IsActive { + get { + bool raw_ret = ges_track_element_is_active(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_is_core(IntPtr raw); + + public bool IsCore { + get { + bool raw_ret = ges_track_element_is_core(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_lookup_child(IntPtr raw, IntPtr prop_name, out IntPtr element, out IntPtr pspec); + + [Obsolete] + public bool LookupChild(string prop_name, out Gst.Element element, out IntPtr pspec) { + IntPtr native_prop_name = GLib.Marshaller.StringToPtrGStrdup (prop_name); + IntPtr native_element; + bool raw_ret = ges_track_element_lookup_child(Handle, native_prop_name, out native_element, out pspec); + bool ret = raw_ret; + GLib.Marshaller.Free (native_prop_name); + element = GLib.Object.GetObject(native_element, true) as Gst.Element; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_remove_control_binding(IntPtr raw, IntPtr property_name); + + public bool RemoveControlBinding(string property_name) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + bool raw_ret = ges_track_element_remove_control_binding(Handle, native_property_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_set_active(IntPtr raw, bool active); + + public bool SetActive(bool active) { + bool raw_ret = ges_track_element_set_active(Handle, active); + bool ret = raw_ret; + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_set_control_source(IntPtr raw, IntPtr source, IntPtr property_name, IntPtr binding_type); + + public bool SetControlSource(Gst.ControlSource source, string property_name, string binding_type) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_binding_type = GLib.Marshaller.StringToPtrGStrdup (binding_type); + bool raw_ret = ges_track_element_set_control_source(Handle, source == null ? IntPtr.Zero : source.Handle, native_property_name, native_binding_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + GLib.Marshaller.Free (native_binding_type); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_set_has_internal_source(IntPtr raw, bool has_internal_source); + + public bool SetHasInternalSource(bool has_internal_source) { + bool raw_ret = ges_track_element_set_has_internal_source(Handle, has_internal_source); + bool ret = raw_ret; + return ret; + } + + + static TrackElement () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("active" + , GES.TimelineElement.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(bool)) // active + , null + , "priv" + , (long) Marshal.OffsetOf(typeof(GESTrackElement_activeAlign), "active") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "active" + , "asset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("asset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // asset + , "priv" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _ges_reserved + , "asset" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTrackElement_activeAlign + { + sbyte f1; + private bool active; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TrackElementAddedHandler.cs b/ges/generated/GES/TrackElementAddedHandler.cs new file mode 100644 index 0000000000..92246c62a3 --- /dev/null +++ b/ges/generated/GES/TrackElementAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void TrackElementAddedHandler(object o, TrackElementAddedArgs args); + + public class TrackElementAddedArgs : GLib.SignalArgs { + public GES.TrackElement Effect{ + get { + return (GES.TrackElement) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/TrackElementAsset.cs b/ges/generated/GES/TrackElementAsset.cs new file mode 100644 index 0000000000..5d638bbf68 --- /dev/null +++ b/ges/generated/GES/TrackElementAsset.cs @@ -0,0 +1,188 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TrackElementAsset : GES.Asset { + + public TrackElementAsset (IntPtr raw) : base(raw) {} + + protected TrackElementAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_track_element_asset_get_track_type(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_track_element_asset_set_track_type(IntPtr raw, int type); + + [GLib.Property ("track-type")] + public GES.TrackType TrackType { + get { + int raw_ret = ges_track_element_asset_get_track_type(Handle); + GES.TrackType ret = (GES.TrackType) raw_ret; + return ret; + } + set { + ges_track_element_asset_set_track_type(Handle, (int) value); + } + } + + static GetNaturalFramerateNativeDelegate GetNaturalFramerate_cb_delegate; + static GetNaturalFramerateNativeDelegate GetNaturalFramerateVMCallback { + get { + if (GetNaturalFramerate_cb_delegate == null) + GetNaturalFramerate_cb_delegate = new GetNaturalFramerateNativeDelegate (GetNaturalFramerate_cb); + return GetNaturalFramerate_cb_delegate; + } + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype) + { + OverrideGetNaturalFramerate (gtype, GetNaturalFramerateVMCallback); + } + + static void OverrideGetNaturalFramerate (GLib.GType gtype, GetNaturalFramerateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetNaturalFramerateNativeDelegate (IntPtr inst, int framerate_n, int framerate_d); + + static bool GetNaturalFramerate_cb (IntPtr inst, int framerate_n, int framerate_d) + { + try { + TrackElementAsset __obj = GLib.Object.GetObject (inst, false) as TrackElementAsset; + bool __result; + __result = __obj.OnGetNaturalFramerate (framerate_n, framerate_d); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(GES.TrackElementAsset), ConnectionMethod="OverrideGetNaturalFramerate")] + protected virtual bool OnGetNaturalFramerate (int framerate_n, int framerate_d) + { + return InternalGetNaturalFramerate (framerate_n, framerate_d); + } + + private bool InternalGetNaturalFramerate (int framerate_n, int framerate_d) + { + GetNaturalFramerateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_natural_framerate")); + unmanaged = (GetNaturalFramerateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetNaturalFramerateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, framerate_n, framerate_d); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_natural_framerate" + , GES.Asset.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_natural_framerate + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , "get_natural_framerate" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_element_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_track_element_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_track_element_asset_get_natural_framerate(IntPtr raw, int framerate_n, int framerate_d); + + public bool GetNaturalFramerate(int framerate_n, int framerate_d) { + bool raw_ret = ges_track_element_asset_get_natural_framerate(Handle, framerate_n, framerate_d); + bool ret = raw_ret; + return ret; + } + + + static TrackElementAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Asset.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "__ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("__ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // __ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TrackElementRemovedHandler.cs b/ges/generated/GES/TrackElementRemovedHandler.cs new file mode 100644 index 0000000000..224d61b592 --- /dev/null +++ b/ges/generated/GES/TrackElementRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void TrackElementRemovedHandler(object o, TrackElementRemovedArgs args); + + public class TrackElementRemovedArgs : GLib.SignalArgs { + public GES.TrackElement Effect{ + get { + return (GES.TrackElement) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/TrackRemovedHandler.cs b/ges/generated/GES/TrackRemovedHandler.cs new file mode 100644 index 0000000000..e796d94822 --- /dev/null +++ b/ges/generated/GES/TrackRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + + public delegate void TrackRemovedHandler(object o, TrackRemovedArgs args); + + public class TrackRemovedArgs : GLib.SignalArgs { + public GES.Track Track{ + get { + return (GES.Track) Args [0]; + } + } + + } +} diff --git a/ges/generated/GES/TrackType.cs b/ges/generated/GES/TrackType.cs new file mode 100644 index 0000000000..4150043caa --- /dev/null +++ b/ges/generated/GES/TrackType.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (GES.TrackTypeGType))] + public enum TrackType : uint { + + Unknown = 1, + Audio = 2, + Video = 4, + Text = 8, + Custom = 16, + } + + internal class TrackTypeGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_track_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_track_type_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/Transition.cs b/ges/generated/GES/Transition.cs new file mode 100644 index 0000000000..8f92f50677 --- /dev/null +++ b/ges/generated/GES/Transition.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Transition : GES.Operation { + + protected Transition (IntPtr raw) : base(raw) {} + + protected Transition() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Operation.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_transition_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_transition_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static Transition () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Operation.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/TransitionClip.cs b/ges/generated/GES/TransitionClip.cs new file mode 100644 index 0000000000..0b7c583903 --- /dev/null +++ b/ges/generated/GES/TransitionClip.cs @@ -0,0 +1,161 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TransitionClip : GES.BaseTransitionClip { + + public TransitionClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_transition_clip_new(int vtype); + + public TransitionClip (GES.VideoStandardTransitionType vtype) : base (IntPtr.Zero) + { + if (GetType () != typeof (TransitionClip)) { + var vals = new List (); + var names = new List (); + names.Add ("vtype"); + vals.Add (new GLib.Value (vtype)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + Raw = ges_transition_clip_new((int) vtype); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_transition_clip_new_for_nick(IntPtr nick); + + public TransitionClip (string nick) : base (IntPtr.Zero) + { + if (GetType () != typeof (TransitionClip)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_nick = GLib.Marshaller.StringToPtrGStrdup (nick); + Raw = ges_transition_clip_new_for_nick(native_nick); + GLib.Marshaller.Free (native_nick); + } + + [GLib.Property ("vtype")] + public GES.VideoStandardTransitionType Vtype { + get { + GLib.Value val = GetProperty ("vtype"); + GES.VideoStandardTransitionType ret = (GES.VideoStandardTransitionType) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("vtype", val); + val.Dispose (); + } + } + + public GES.VideoStandardTransitionType VtypeField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("vtype")); + return (GES.VideoStandardTransitionType) (*raw_ptr); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.BaseTransitionClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_transition_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_transition_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static TransitionClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("vtype" + , GES.BaseTransitionClip.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(GES.VideoStandardTransitionType))) // vtype + , null + , "priv" + , (long) Marshal.OffsetOf(typeof(GESTransitionClip_vtypeAlign), "vtype") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "vtype" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESTransitionClip_vtypeAlign + { + sbyte f1; + private GES.VideoStandardTransitionType vtype; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/UriClip.cs b/ges/generated/GES/UriClip.cs new file mode 100644 index 0000000000..39052a9829 --- /dev/null +++ b/ges/generated/GES/UriClip.cs @@ -0,0 +1,178 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class UriClip : GES.SourceClip { + + public UriClip (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_new(IntPtr uri); + + public UriClip (string uri) : base (IntPtr.Zero) + { + if (GetType () != typeof (UriClip)) { + var vals = new List (); + var names = new List (); + names.Add ("uri"); + vals.Add (new GLib.Value (uri)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + Raw = ges_uri_clip_new(native_uri); + GLib.Marshaller.Free (native_uri); + } + + [GLib.Property ("is-image")] + public bool IsImageProp + { + get { + GLib.Value val = GetProperty ("is-image"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("is-image", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_uri_clip_set_mute(IntPtr raw, bool mute); + + [GLib.Property ("mute")] + public bool Mute { + get { + GLib.Value val = GetProperty ("mute"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + ges_uri_clip_set_mute(Handle, value); + } + } + + [GLib.Property ("supported-formats")] + public new GES.TrackType SupportedFormats { + get { + GLib.Value val = GetProperty ("supported-formats"); + GES.TrackType ret = (GES.TrackType) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("supported-formats", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_get_uri(IntPtr raw); + + [GLib.Property ("uri")] + public string Uri { + get { + IntPtr raw_ret = ges_uri_clip_get_uri(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.SourceClip.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_uri_clip_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_uri_clip_is_muted(IntPtr raw); + + public bool IsMuted { + get { + bool raw_ret = ges_uri_clip_is_muted(Handle); + bool ret = raw_ret; + return ret; + } + } + + + static UriClip () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.SourceClip.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/UriClipAsset.cs b/ges/generated/GES/UriClipAsset.cs new file mode 100644 index 0000000000..4808988bd5 --- /dev/null +++ b/ges/generated/GES/UriClipAsset.cs @@ -0,0 +1,238 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class UriClipAsset : GES.SourceClipAsset { + + public UriClipAsset (IntPtr raw) : base(raw) {} + + protected UriClipAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_uri_clip_asset_get_duration(IntPtr raw); + + [GLib.Property ("duration")] + public ulong Duration { + get { + ulong raw_ret = ges_uri_clip_asset_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("duration", val); + val.Dispose (); + } + } + + [GLib.Property ("is-nested-timeline")] + public bool IsNestedTimeline { + get { + GLib.Value val = GetProperty ("is-nested-timeline"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("discoverer" + , GES.SourceClipAsset.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // discoverer + , null + , "sync_discoverer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sync_discoverer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sync_discoverer + , "discoverer" + , "discovered" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("discovered" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // discovered + , "sync_discoverer" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved + , "discovered" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_uri_clip_asset_class_set_timeout(ulong timeout); + + public static ulong Timeout { + set { + ges_uri_clip_asset_class_set_timeout(value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_uri_clip_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_uri_clip_asset_finish(IntPtr res, out IntPtr error); + + public static unsafe GES.UriClipAsset Finish(GLib.IAsyncResult res) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_uri_clip_asset_finish(res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), out error); + GES.UriClipAsset ret = GLib.Object.GetObject(raw_ret, true) as GES.UriClipAsset; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_uri_clip_asset_new(IntPtr uri, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data); + + public static void New(string uri, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb); + cb_wrapper.PersistUntilCalled (); + ges_uri_clip_asset_new(native_uri, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); + GLib.Marshaller.Free (native_uri); + } + + public static void New(string uri) { + New (uri, null, null); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr ges_uri_clip_asset_request_sync(IntPtr uri, out IntPtr error); + + public static unsafe GES.UriClipAsset RequestSync(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = ges_uri_clip_asset_request_sync(native_uri, out error); + GES.UriClipAsset ret = GLib.Object.GetObject(raw_ret, true) as GES.UriClipAsset; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_asset_get_info(IntPtr raw); + + public Gst.PbUtils.DiscovererInfo Info { + get { + IntPtr raw_ret = ges_uri_clip_asset_get_info(Handle); + Gst.PbUtils.DiscovererInfo ret = GLib.Object.GetObject(raw_ret) as Gst.PbUtils.DiscovererInfo; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern ulong ges_uri_clip_asset_get_max_duration(IntPtr raw); + + public ulong MaxDuration { + get { + ulong raw_ret = ges_uri_clip_asset_get_max_duration(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_clip_asset_get_stream_assets(IntPtr raw); + + public GES.UriSourceAsset[] StreamAssets { + get { + IntPtr raw_ret = ges_uri_clip_asset_get_stream_assets(Handle); + GES.UriSourceAsset[] ret = (GES.UriSourceAsset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GES.UriSourceAsset)); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_uri_clip_asset_is_image(IntPtr raw); + + public bool IsImage { + get { + bool raw_ret = ges_uri_clip_asset_is_image(Handle); + bool ret = raw_ret; + return ret; + } + } + + + static UriClipAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.SourceClipAsset.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "__ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("__ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // __ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/UriSource.cs b/ges/generated/GES/UriSource.cs new file mode 100644 index 0000000000..0bff57dc4d --- /dev/null +++ b/ges/generated/GES/UriSource.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class UriSource : GLib.Opaque { + + public UriSource(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/UriSourceAsset.cs b/ges/generated/GES/UriSourceAsset.cs new file mode 100644 index 0000000000..ca3eeefc27 --- /dev/null +++ b/ges/generated/GES/UriSourceAsset.cs @@ -0,0 +1,139 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class UriSourceAsset : GES.TrackElementAsset { + + public UriSourceAsset (IntPtr raw) : base(raw) {} + + protected UriSourceAsset() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.TrackElementAsset.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_source_asset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_uri_source_asset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_source_asset_get_filesource_asset(IntPtr raw); + + public GES.UriClipAsset FilesourceAsset { + get { + IntPtr raw_ret = ges_uri_source_asset_get_filesource_asset(Handle); + GES.UriClipAsset ret = GLib.Object.GetObject(raw_ret) as GES.UriClipAsset; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_source_asset_get_stream_info(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo StreamInfo { + get { + IntPtr raw_ret = ges_uri_source_asset_get_stream_info(Handle); + Gst.PbUtils.DiscovererStreamInfo ret = GLib.Object.GetObject(raw_ret) as Gst.PbUtils.DiscovererStreamInfo; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_uri_source_asset_get_stream_uri(IntPtr raw); + + public string StreamUri { + get { + IntPtr raw_ret = ges_uri_source_asset_get_stream_uri(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_uri_source_asset_is_image(IntPtr raw); + + public bool IsImage { + get { + bool raw_ret = ges_uri_source_asset_is_image(Handle); + bool ret = raw_ret; + return ret; + } + } + + + static UriSourceAsset () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.TrackElementAsset.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "__ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("__ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // __ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/VideoSource.cs b/ges/generated/GES/VideoSource.cs new file mode 100644 index 0000000000..0438b1c75a --- /dev/null +++ b/ges/generated/GES/VideoSource.cs @@ -0,0 +1,143 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoSource : GES.Source { + + protected VideoSource (IntPtr raw) : base(raw) {} + + protected VideoSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_source" + , GES.Source.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_source + , null + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI.abi + new GLib.AbiField("ABI.abi.disable_scale_in_compositor" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // ABI.abi.disable_scale_in_compositor + , "create_source" + , null + , (long) Marshal.OffsetOf(typeof(GESVideoSource_ABI_abi_disable_scale_in_compositorAlign), "ABI_abi_disable_scale_in_compositor") + , 0 + ), + // End ABI.abi + + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "create_source" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI.abi.disable_scale_in_compositor"}, + new List() {"ABI._gst_reserved"} + } + , "create_source" + , null + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GESVideoSource_ABI_abi_disable_scale_in_compositorAlign + { + sbyte f1; + private long ABI_abi_disable_scale_in_compositor; + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_video_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_video_source_get_natural_size(IntPtr raw, out int width, out int height); + + public bool GetNaturalSize(out int width, out int height) { + bool raw_ret = ges_video_source_get_natural_size(Handle, out width, out height); + bool ret = raw_ret; + return ret; + } + + + static VideoSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Source.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/VideoStandardTransitionType.cs b/ges/generated/GES/VideoStandardTransitionType.cs new file mode 100644 index 0000000000..8311998e1e --- /dev/null +++ b/ges/generated/GES/VideoStandardTransitionType.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.VideoStandardTransitionTypeGType))] + public enum VideoStandardTransitionType { + + None = 0, + BarWipeLr = 1, + BarWipeTb = 2, + BoxWipeTl = 3, + BoxWipeTr = 4, + BoxWipeBr = 5, + BoxWipeBl = 6, + FourBoxWipeCi = 7, + FourBoxWipeCo = 8, + BarndoorV = 21, + BarndoorH = 22, + BoxWipeTc = 23, + BoxWipeRc = 24, + BoxWipeBc = 25, + BoxWipeLc = 26, + DiagonalTl = 41, + DiagonalTr = 42, + BowtieV = 43, + BowtieH = 44, + BarndoorDbl = 45, + BarndoorDtl = 46, + MiscDiagonalDbd = 47, + MiscDiagonalDd = 48, + VeeD = 61, + VeeL = 62, + VeeU = 63, + VeeR = 64, + BarnveeD = 65, + BarnveeL = 66, + BarnveeU = 67, + BarnveeR = 68, + IrisRect = 101, + ClockCw12 = 201, + ClockCw3 = 202, + ClockCw6 = 203, + ClockCw9 = 204, + PinwheelTbv = 205, + PinwheelTbh = 206, + PinwheelFb = 207, + FanCt = 211, + FanCr = 212, + DoublefanFov = 213, + DoublefanFoh = 214, + SinglesweepCwt = 221, + SinglesweepCwr = 222, + SinglesweepCwb = 223, + SinglesweepCwl = 224, + DoublesweepPv = 225, + DoublesweepPd = 226, + DoublesweepOv = 227, + DoublesweepOh = 228, + FanT = 231, + FanR = 232, + FanB = 233, + FanL = 234, + DoublefanFiv = 235, + DoublefanFih = 236, + SinglesweepCwtl = 241, + SinglesweepCwbl = 242, + SinglesweepCwbr = 243, + SinglesweepCwtr = 244, + DoublesweepPdtl = 245, + DoublesweepPdbl = 246, + SaloondoorT = 251, + SaloondoorL = 252, + SaloondoorB = 253, + SaloondoorR = 254, + WindshieldR = 261, + WindshieldU = 262, + WindshieldV = 263, + WindshieldH = 264, + Crossfade = 512, + } + + internal class VideoStandardTransitionTypeGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_standard_transition_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_video_standard_transition_type_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/VideoTestPattern.cs b/ges/generated/GES/VideoTestPattern.cs new file mode 100644 index 0000000000..323c9b0a9a --- /dev/null +++ b/ges/generated/GES/VideoTestPattern.cs @@ -0,0 +1,44 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (GES.VideoTestPatternGType))] + public enum VideoTestPattern { + + Smpte = 0, + Snow = 1, + Black = 2, + White = 3, + Red = 4, + Green = 5, + Blue = 6, + Checkers1 = 7, + Checkers2 = 8, + Checkers4 = 9, + Checkers8 = 10, + Circular = 11, + Blink = 12, + Smpte75 = 13, + ZonePlate = 14, + Gamut = 15, + ChromaZonePlate = 16, + SolidColor = 17, + } + + internal class VideoTestPatternGType { + [DllImport ("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_test_pattern_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (ges_video_test_pattern_get_type ()); + } + } + } +#endregion +} diff --git a/ges/generated/GES/VideoTestSource.cs b/ges/generated/GES/VideoTestSource.cs new file mode 100644 index 0000000000..b0e7ccc6cb --- /dev/null +++ b/ges/generated/GES/VideoTestSource.cs @@ -0,0 +1,112 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoTestSource : GES.VideoSource { + + public VideoTestSource (IntPtr raw) : base(raw) {} + + protected VideoTestSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.VideoSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_test_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_video_test_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_video_test_source_get_pattern(IntPtr raw); + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_video_test_source_set_pattern(IntPtr raw, int pattern); + + public GES.VideoTestPattern Pattern { + get { + int raw_ret = ges_video_test_source_get_pattern(Handle); + GES.VideoTestPattern ret = (GES.VideoTestPattern) raw_ret; + return ret; + } + set { + ges_video_test_source_set_pattern(Handle, (int) value); + } + } + + + static VideoTestSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.VideoSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/VideoTrack.cs b/ges/generated/GES/VideoTrack.cs new file mode 100644 index 0000000000..b7e2b2c9ed --- /dev/null +++ b/ges/generated/GES/VideoTrack.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoTrack : GES.Track { + + public VideoTrack (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_track_new(); + + public VideoTrack () : base (IntPtr.Zero) + { + if (GetType () != typeof (VideoTrack)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_video_track_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Track.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_track_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_video_track_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static VideoTrack () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Track.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/VideoTransition.cs b/ges/generated/GES/VideoTransition.cs new file mode 100644 index 0000000000..fa5c37331c --- /dev/null +++ b/ges/generated/GES/VideoTransition.cs @@ -0,0 +1,184 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoTransition : GES.Transition { + + public VideoTransition (IntPtr raw) : base(raw) {} + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_transition_new(); + + public VideoTransition () : base (IntPtr.Zero) + { + if (GetType () != typeof (VideoTransition)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = ges_video_transition_new(); + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_video_transition_get_border(IntPtr raw); + + [Obsolete] + [GLib.Property ("border")] + public int Border { + get { + int raw_ret = ges_video_transition_get_border(Handle); + int ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("border", val); + val.Dispose (); + } + } + + [Obsolete] + [GLib.Property ("invert")] + public bool Invert { + get { + GLib.Value val = GetProperty ("invert"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("invert", val); + val.Dispose (); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern int ges_video_transition_get_transition_type(IntPtr raw); + + [GLib.Property ("transition-type")] + public GES.VideoStandardTransitionType TransitionType { + get { + int raw_ret = ges_video_transition_get_transition_type(Handle); + GES.VideoStandardTransitionType ret = (GES.VideoStandardTransitionType) raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("transition-type", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.Transition.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_transition_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_video_transition_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_video_transition_is_inverted(IntPtr raw); + + [Obsolete] + public bool IsInverted { + get { + bool raw_ret = ges_video_transition_is_inverted(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern void ges_video_transition_set_inverted(IntPtr raw, bool inverted); + + [Obsolete] + public bool Inverted { + set { + ges_video_transition_set_inverted(Handle, value); + } + } + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern bool ges_video_transition_set_transition_type(IntPtr raw, int type); + + public bool SetTransitionType(GES.VideoStandardTransitionType type) { + bool raw_ret = ges_video_transition_set_transition_type(Handle, (int) type); + bool ret = raw_ret; + return ret; + } + + + static VideoTransition () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.Transition.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/VideoUriSource.cs b/ges/generated/GES/VideoUriSource.cs new file mode 100644 index 0000000000..55607cda63 --- /dev/null +++ b/ges/generated/GES/VideoUriSource.cs @@ -0,0 +1,113 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoUriSource : GES.VideoSource { + + public VideoUriSource (IntPtr raw) : base(raw) {} + + protected VideoUriSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("uri")] + public string Uri { + get { + GLib.Value val = GetProperty ("uri"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.VideoSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_video_uri_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_video_uri_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static VideoUriSource () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("uri" + , GES.VideoSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "uri" + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GES/XmlFormatter.cs b/ges/generated/GES/XmlFormatter.cs new file mode 100644 index 0000000000..6676167b72 --- /dev/null +++ b/ges/generated/GES/XmlFormatter.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GES { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class XmlFormatter : GES.BaseXmlFormatter { + + public XmlFormatter (IntPtr raw) : base(raw) {} + + protected XmlFormatter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_ges_reserved" + , GES.BaseXmlFormatter.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_xml_formatter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = ges_xml_formatter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static XmlFormatter () + { + GtkSharp.GstEditingServices.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GES.BaseXmlFormatter.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_ges_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_ges_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _ges_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/ges/generated/GLib/GLibSharp.AsyncReadyCallbackNative.cs b/ges/generated/GLib/GLibSharp.AsyncReadyCallbackNative.cs new file mode 100644 index 0000000000..b0e77b7371 --- /dev/null +++ b/ges/generated/GLib/GLibSharp.AsyncReadyCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GLibSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AsyncReadyCallbackNative(IntPtr source_object, IntPtr res, IntPtr user_data); + + internal class AsyncReadyCallbackInvoker { + + AsyncReadyCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AsyncReadyCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AsyncReadyCallbackInvoker (AsyncReadyCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AsyncReadyCallbackInvoker (AsyncReadyCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AsyncReadyCallbackInvoker (AsyncReadyCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal GLib.AsyncReadyCallback Handler { + get { + return new GLib.AsyncReadyCallback(InvokeNative); + } + } + + void InvokeNative (GLib.Object source_object, GLib.IAsyncResult res) + { + native_cb (source_object == null ? IntPtr.Zero : source_object.Handle, res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), __data); + } + } + + internal class AsyncReadyCallbackWrapper { + + public void NativeCallback (IntPtr source_object, IntPtr res, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject (source_object), GLib.AsyncResultAdapter.GetObject (res, false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AsyncReadyCallbackNative NativeDelegate; + GLib.AsyncReadyCallback managed; + + public AsyncReadyCallbackWrapper (GLib.AsyncReadyCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AsyncReadyCallbackNative (NativeCallback); + } + + public static GLib.AsyncReadyCallback GetManagedDelegate (AsyncReadyCallbackNative native) + { + if (native == null) + return null; + AsyncReadyCallbackWrapper wrapper = (AsyncReadyCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/ges/generated/GtkSharp/ObjectManager.cs b/ges/generated/GtkSharp/ObjectManager.cs new file mode 100644 index 0000000000..38fa7148d1 --- /dev/null +++ b/ges/generated/GtkSharp/ObjectManager.cs @@ -0,0 +1,71 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GtkSharp.GstEditingServices { + + public class ObjectManager { + + static bool initialized = false; + // Call this method from the appropriate module init function. + public static void Initialize () + { + if (initialized) + return; + + initialized = true; + GLib.GType.Register (GES.Asset.GType, typeof (GES.Asset)); + GLib.GType.Register (GES.AudioSource.GType, typeof (GES.AudioSource)); + GLib.GType.Register (GES.AudioTestSource.GType, typeof (GES.AudioTestSource)); + GLib.GType.Register (GES.AudioTrack.GType, typeof (GES.AudioTrack)); + GLib.GType.Register (GES.AudioTransition.GType, typeof (GES.AudioTransition)); + GLib.GType.Register (GES.AudioUriSource.GType, typeof (GES.AudioUriSource)); + GLib.GType.Register (GES.BaseEffect.GType, typeof (GES.BaseEffect)); + GLib.GType.Register (GES.BaseEffectClip.GType, typeof (GES.BaseEffectClip)); + GLib.GType.Register (GES.BaseTransitionClip.GType, typeof (GES.BaseTransitionClip)); + GLib.GType.Register (GES.BaseXmlFormatter.GType, typeof (GES.BaseXmlFormatter)); + GLib.GType.Register (GES.Clip.GType, typeof (GES.Clip)); + GLib.GType.Register (GES.ClipAsset.GType, typeof (GES.ClipAsset)); + GLib.GType.Register (GES.CommandLineFormatter.GType, typeof (GES.CommandLineFormatter)); + GLib.GType.Register (GES.Container.GType, typeof (GES.Container)); + GLib.GType.Register (GES.Effect.GType, typeof (GES.Effect)); + GLib.GType.Register (GES.EffectAsset.GType, typeof (GES.EffectAsset)); + GLib.GType.Register (GES.EffectClip.GType, typeof (GES.EffectClip)); + GLib.GType.Register (GES.Formatter.GType, typeof (GES.Formatter)); + GLib.GType.Register (GES.Group.GType, typeof (GES.Group)); + GLib.GType.Register (GES.ImageSource.GType, typeof (GES.ImageSource)); + GLib.GType.Register (GES.Layer.GType, typeof (GES.Layer)); + GLib.GType.Register (GES.Marker.GType, typeof (GES.Marker)); + GLib.GType.Register (GES.MarkerList.GType, typeof (GES.MarkerList)); + GLib.GType.Register (GES.MultiFileSource.GType, typeof (GES.MultiFileSource)); + GLib.GType.Register (GES.Operation.GType, typeof (GES.Operation)); + GLib.GType.Register (GES.OperationClip.GType, typeof (GES.OperationClip)); + GLib.GType.Register (GES.OverlayClip.GType, typeof (GES.OverlayClip)); + GLib.GType.Register (GES.Pipeline.GType, typeof (GES.Pipeline)); + GLib.GType.Register (GES.Project.GType, typeof (GES.Project)); + GLib.GType.Register (GES.Source.GType, typeof (GES.Source)); + GLib.GType.Register (GES.SourceClip.GType, typeof (GES.SourceClip)); + GLib.GType.Register (GES.SourceClipAsset.GType, typeof (GES.SourceClipAsset)); + GLib.GType.Register (GES.TestClip.GType, typeof (GES.TestClip)); + GLib.GType.Register (GES.TextOverlay.GType, typeof (GES.TextOverlay)); + GLib.GType.Register (GES.TextOverlayClip.GType, typeof (GES.TextOverlayClip)); + GLib.GType.Register (GES.Timeline.GType, typeof (GES.Timeline)); + GLib.GType.Register (GES.TimelineElement.GType, typeof (GES.TimelineElement)); + GLib.GType.Register (GES.TitleClip.GType, typeof (GES.TitleClip)); + GLib.GType.Register (GES.TitleSource.GType, typeof (GES.TitleSource)); + GLib.GType.Register (GES.Track.GType, typeof (GES.Track)); + GLib.GType.Register (GES.TrackElement.GType, typeof (GES.TrackElement)); + GLib.GType.Register (GES.TrackElementAsset.GType, typeof (GES.TrackElementAsset)); + GLib.GType.Register (GES.Transition.GType, typeof (GES.Transition)); + GLib.GType.Register (GES.TransitionClip.GType, typeof (GES.TransitionClip)); + GLib.GType.Register (GES.UriClip.GType, typeof (GES.UriClip)); + GLib.GType.Register (GES.UriClipAsset.GType, typeof (GES.UriClipAsset)); + GLib.GType.Register (GES.UriSourceAsset.GType, typeof (GES.UriSourceAsset)); + GLib.GType.Register (GES.VideoSource.GType, typeof (GES.VideoSource)); + GLib.GType.Register (GES.VideoTestSource.GType, typeof (GES.VideoTestSource)); + GLib.GType.Register (GES.VideoTrack.GType, typeof (GES.VideoTrack)); + GLib.GType.Register (GES.VideoTransition.GType, typeof (GES.VideoTransition)); + GLib.GType.Register (GES.VideoUriSource.GType, typeof (GES.VideoUriSource)); + GLib.GType.Register (GES.XmlFormatter.GType, typeof (GES.XmlFormatter)); + } + } +} diff --git a/ges/generated/gst-editing-services-abi.c b/ges/generated/gst-editing-services-abi.c new file mode 100644 index 0000000000..3d3604dcab --- /dev/null +++ b/ges/generated/gst-editing-services-abi.c @@ -0,0 +1,261 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +#include + +int main (int argc, char *argv[]) { + g_print("\"sizeof(GESAssetClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAssetClass)); + g_print("\"GESAssetClass.start_loading\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAssetClass, start_loading)); + g_print("\"GESAssetClass.extract\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAssetClass, extract)); + g_print("\"GESAssetClass.inform_proxy\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAssetClass, inform_proxy)); + g_print("\"GESAssetClass.proxied\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAssetClass, proxied)); + g_print("\"GESAssetClass.request_id_update\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAssetClass, request_id_update)); + g_print("\"sizeof(GESAsset)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAsset)); + g_print("\"GESAsset.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAsset, priv)); + g_print("\"sizeof(GESAudioSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioSourceClass)); + g_print("\"GESAudioSourceClass.create_source\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioSourceClass, create_source)); + g_print("\"sizeof(GESAudioSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioSource)); + g_print("\"GESAudioSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioSource, priv)); + g_print("\"sizeof(GESAudioTestSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTestSourceClass)); + g_print("\"sizeof(GESAudioTestSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTestSource)); + g_print("\"GESAudioTestSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioTestSource, priv)); + g_print("\"sizeof(GESAudioTrackClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTrackClass)); + g_print("\"sizeof(GESAudioTrack)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTrack)); + g_print("\"GESAudioTrack.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioTrack, priv)); + g_print("\"sizeof(GESAudioTransitionClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTransitionClass)); + g_print("\"sizeof(GESAudioTransition)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioTransition)); + g_print("\"GESAudioTransition.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioTransition, priv)); + g_print("\"sizeof(GESAudioUriSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioUriSourceClass)); + g_print("\"sizeof(GESAudioUriSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESAudioUriSource)); + g_print("\"GESAudioUriSource.uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioUriSource, uri)); + g_print("\"GESAudioUriSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESAudioUriSource, priv)); + g_print("\"sizeof(GESBaseEffectClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseEffectClass)); + g_print("\"sizeof(GESBaseEffect)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseEffect)); + g_print("\"GESBaseEffect.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseEffect, priv)); + g_print("\"sizeof(GESBaseEffectClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseEffectClipClass)); + g_print("\"sizeof(GESBaseEffectClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseEffectClip)); + g_print("\"GESBaseEffectClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseEffectClip, priv)); + g_print("\"sizeof(GESBaseTransitionClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseTransitionClipClass)); + g_print("\"sizeof(GESBaseTransitionClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseTransitionClip)); + g_print("\"GESBaseTransitionClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseTransitionClip, priv)); + g_print("\"sizeof(GESBaseXmlFormatterClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseXmlFormatterClass)); + g_print("\"GESBaseXmlFormatterClass.content_parser\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseXmlFormatterClass, content_parser)); + g_print("\"GESBaseXmlFormatterClass.save\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseXmlFormatterClass, save)); + g_print("\"sizeof(GESBaseXmlFormatter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESBaseXmlFormatter)); + g_print("\"GESBaseXmlFormatter.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseXmlFormatter, priv)); + g_print("\"GESBaseXmlFormatter.xmlcontent\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESBaseXmlFormatter, xmlcontent)); + g_print("\"sizeof(GESClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESClipClass)); + g_print("\"GESClipClass.create_track_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESClipClass, create_track_element)); + g_print("\"GESClipClass.create_track_elements\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESClipClass, create_track_elements)); + g_print("\"sizeof(GESClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESClip)); + g_print("\"GESClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESClip, priv)); + g_print("\"sizeof(GESClipAssetClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESClipAssetClass)); + g_print("\"GESClipAssetClass.get_natural_framerate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESClipAssetClass, get_natural_framerate)); + g_print("\"sizeof(GESClipAsset)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESClipAsset)); + g_print("\"GESClipAsset.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESClipAsset, priv)); + g_print("\"sizeof(GESCommandLineFormatter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESCommandLineFormatter)); + g_print("\"GESCommandLineFormatter.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESCommandLineFormatter, priv)); + g_print("\"sizeof(GESContainerClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESContainerClass)); + g_print("\"GESContainerClass.child_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, child_added)); + g_print("\"GESContainerClass.child_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, child_removed)); + g_print("\"GESContainerClass.add_child\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, add_child)); + g_print("\"GESContainerClass.remove_child\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, remove_child)); + g_print("\"GESContainerClass.ungroup\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, ungroup)); + g_print("\"GESContainerClass.group\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, group)); + g_print("\"GESContainerClass.edit\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, edit)); + g_print("\"GESContainerClass.grouping_priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainerClass, grouping_priority)); + g_print("\"sizeof(GESContainer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESContainer)); + g_print("\"GESContainer.children\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainer, children)); + g_print("\"GESContainer.height\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainer, height)); + g_print("\"GESContainer.children_control_mode\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainer, children_control_mode)); + g_print("\"GESContainer.initiated_move\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainer, initiated_move)); + g_print("\"GESContainer.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESContainer, priv)); + g_print("\"sizeof(GESEffectClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESEffectClass)); + g_print("\"GESEffectClass.rate_properties\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESEffectClass, rate_properties)); + g_print("\"sizeof(GESEffect)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESEffect)); + g_print("\"GESEffect.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESEffect, priv)); + g_print("\"sizeof(GESEffectClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESEffectClipClass)); + g_print("\"sizeof(GESEffectClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESEffectClip)); + g_print("\"GESEffectClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESEffectClip, priv)); + g_print("\"sizeof(GESFormatterClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESFormatterClass)); + g_print("\"GESFormatterClass.can_load_uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, can_load_uri)); + g_print("\"GESFormatterClass.load_from_uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, load_from_uri)); + g_print("\"GESFormatterClass.save_to_uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, save_to_uri)); + g_print("\"GESFormatterClass.name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, name)); + g_print("\"GESFormatterClass.description\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, description)); + g_print("\"GESFormatterClass.extension\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, extension)); + g_print("\"GESFormatterClass.mimetype\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, mimetype)); + g_print("\"GESFormatterClass.version\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, version)); + g_print("\"GESFormatterClass.rank\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatterClass, rank)); + g_print("\"sizeof(GESFormatter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESFormatter)); + g_print("\"GESFormatter.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatter, priv)); + g_print("\"GESFormatter.project\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatter, project)); + g_print("\"GESFormatter.timeline\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESFormatter, timeline)); + g_print("\"sizeof(GESGroupClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESGroupClass)); + g_print("\"sizeof(GESGroup)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESGroup)); + g_print("\"GESGroup.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESGroup, priv)); + g_print("\"sizeof(GESImageSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESImageSourceClass)); + g_print("\"sizeof(GESImageSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESImageSource)); + g_print("\"GESImageSource.uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESImageSource, uri)); + g_print("\"GESImageSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESImageSource, priv)); + g_print("\"sizeof(GESLayerClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESLayerClass)); + g_print("\"GESLayerClass.get_objects\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayerClass, get_objects)); + g_print("\"GESLayerClass.object_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayerClass, object_added)); + g_print("\"GESLayerClass.object_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayerClass, object_removed)); + g_print("\"sizeof(GESLayer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESLayer)); + g_print("\"GESLayer.timeline\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayer, timeline)); + g_print("\"GESLayer.min_nle_priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayer, min_nle_priority)); + g_print("\"GESLayer.max_nle_priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayer, max_nle_priority)); + g_print("\"GESLayer.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESLayer, priv)); + g_print("\"sizeof(GESMultiFileSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESMultiFileSourceClass)); + g_print("\"sizeof(GESMultiFileSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESMultiFileSource)); + g_print("\"GESMultiFileSource.uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESMultiFileSource, uri)); + g_print("\"GESMultiFileSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESMultiFileSource, priv)); + g_print("\"sizeof(GESOperationClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOperationClass)); + g_print("\"sizeof(GESOperation)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOperation)); + g_print("\"GESOperation.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESOperation, priv)); + g_print("\"sizeof(GESOperationClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOperationClipClass)); + g_print("\"sizeof(GESOperationClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOperationClip)); + g_print("\"GESOperationClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESOperationClip, priv)); + g_print("\"sizeof(GESOverlayClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOverlayClipClass)); + g_print("\"sizeof(GESOverlayClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESOverlayClip)); + g_print("\"GESOverlayClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESOverlayClip, priv)); + g_print("\"sizeof(GESPipelineClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESPipelineClass)); + g_print("\"sizeof(GESPipeline)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESPipeline)); + g_print("\"GESPipeline.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESPipeline, priv)); + g_print("\"sizeof(GESProjectClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESProjectClass)); + g_print("\"GESProjectClass.asset_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, asset_added)); + g_print("\"GESProjectClass.asset_loading\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, asset_loading)); + g_print("\"GESProjectClass.asset_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, asset_removed)); + g_print("\"GESProjectClass.missing_uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, missing_uri)); + g_print("\"GESProjectClass.loading_error\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, loading_error)); + g_print("\"GESProjectClass.loaded\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, loaded)); + g_print("\"GESProjectClass.loading\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProjectClass, loading)); + g_print("\"sizeof(GESProject)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESProject)); + g_print("\"GESProject.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESProject, priv)); + g_print("\"sizeof(GESSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESSourceClass)); + g_print("\"sizeof(GESSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESSource)); + g_print("\"GESSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESSource, priv)); + g_print("\"sizeof(GESSourceClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESSourceClipClass)); + g_print("\"sizeof(GESSourceClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESSourceClip)); + g_print("\"GESSourceClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESSourceClip, priv)); + g_print("\"sizeof(GESTestClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTestClipClass)); + g_print("\"sizeof(GESTestClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTestClip)); + g_print("\"GESTestClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTestClip, priv)); + g_print("\"sizeof(GESTextOverlayClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTextOverlayClass)); + g_print("\"sizeof(GESTextOverlay)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTextOverlay)); + g_print("\"GESTextOverlay.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTextOverlay, priv)); + g_print("\"sizeof(GESTextOverlayClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTextOverlayClipClass)); + g_print("\"sizeof(GESTextOverlayClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTextOverlayClip)); + g_print("\"GESTextOverlayClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTextOverlayClip, priv)); + g_print("\"sizeof(GESTimelineClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTimelineClass)); + g_print("\"GESTimelineClass.track_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, track_added)); + g_print("\"GESTimelineClass.track_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, track_removed)); + g_print("\"GESTimelineClass.layer_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, layer_added)); + g_print("\"GESTimelineClass.layer_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, layer_removed)); + g_print("\"GESTimelineClass.group_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, group_added)); + g_print("\"GESTimelineClass.group_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineClass, group_removed)); + g_print("\"sizeof(GESTimeline)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTimeline)); + g_print("\"GESTimeline.layers\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimeline, layers)); + g_print("\"GESTimeline.tracks\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimeline, tracks)); + g_print("\"GESTimeline.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimeline, priv)); + g_print("\"sizeof(GESTimelineElementClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTimelineElementClass)); + g_print("\"GESTimelineElementClass.set_parent\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_parent)); + g_print("\"GESTimelineElementClass.set_start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_start)); + g_print("\"GESTimelineElementClass.set_inpoint\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_inpoint)); + g_print("\"GESTimelineElementClass.set_duration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_duration)); + g_print("\"GESTimelineElementClass.set_max_duration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_max_duration)); + g_print("\"GESTimelineElementClass.set_priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_priority)); + g_print("\"GESTimelineElementClass.ripple\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, ripple)); + g_print("\"GESTimelineElementClass.ripple_end\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, ripple_end)); + g_print("\"GESTimelineElementClass.roll_start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, roll_start)); + g_print("\"GESTimelineElementClass.roll_end\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, roll_end)); + g_print("\"GESTimelineElementClass.trim\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, trim)); + g_print("\"GESTimelineElementClass.deep_copy\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, deep_copy)); + g_print("\"GESTimelineElementClass.paste\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, paste)); + g_print("\"GESTimelineElementClass.list_children_properties\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, list_children_properties)); + g_print("\"GESTimelineElementClass.lookup_child\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, lookup_child)); + g_print("\"GESTimelineElementClass.get_track_types\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, get_track_types)); + g_print("\"GESTimelineElementClass.set_child_property\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_child_property)); + g_print("\"GESTimelineElementClass.get_layer_priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, get_layer_priority)); + g_print("\"GESTimelineElementClass.get_natural_framerate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, get_natural_framerate)); + g_print("\"GESTimelineElementClass.set_child_property_full\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElementClass, set_child_property_full)); + g_print("\"sizeof(GESTimelineElement)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTimelineElement)); + g_print("\"GESTimelineElement.parent\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, parent)); + g_print("\"GESTimelineElement.asset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, asset)); + g_print("\"GESTimelineElement.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, start)); + g_print("\"GESTimelineElement.inpoint\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, inpoint)); + g_print("\"GESTimelineElement.duration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, duration)); + g_print("\"GESTimelineElement.maxduration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, maxduration)); + g_print("\"GESTimelineElement.priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, priority)); + g_print("\"GESTimelineElement.timeline\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, timeline)); + g_print("\"GESTimelineElement.name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, name)); + g_print("\"GESTimelineElement.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTimelineElement, priv)); + g_print("\"sizeof(GESTitleClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTitleClipClass)); + g_print("\"sizeof(GESTitleClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTitleClip)); + g_print("\"GESTitleClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTitleClip, priv)); + g_print("\"sizeof(GESTitleSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTitleSourceClass)); + g_print("\"sizeof(GESTitleSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTitleSource)); + g_print("\"GESTitleSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTitleSource, priv)); + g_print("\"sizeof(GESTrackClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrackClass)); + g_print("\"GESTrackClass.get_mixing_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackClass, get_mixing_element)); + g_print("\"sizeof(GESTrack)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrack)); + g_print("\"GESTrack.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrack, type)); + g_print("\"GESTrack.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrack, priv)); + g_print("\"sizeof(GESTrackElementClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrackElementClass)); + g_print("\"GESTrackElementClass.nleobject_factorytype\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, nleobject_factorytype)); + g_print("\"GESTrackElementClass.create_gnl_object\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, create_gnl_object)); + g_print("\"GESTrackElementClass.create_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, create_element)); + g_print("\"GESTrackElementClass.active_changed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, active_changed)); + g_print("\"GESTrackElementClass.changed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, changed)); + g_print("\"GESTrackElementClass.list_children_properties\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, list_children_properties)); + g_print("\"GESTrackElementClass.lookup_child\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementClass, lookup_child)); + g_print("\"sizeof(GESTrackElement)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrackElement)); + g_print("\"GESTrackElement.active\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElement, active)); + g_print("\"GESTrackElement.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElement, priv)); + g_print("\"GESTrackElement.asset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElement, asset)); + g_print("\"sizeof(GESTrackElementAssetClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrackElementAssetClass)); + g_print("\"GESTrackElementAssetClass.get_natural_framerate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementAssetClass, get_natural_framerate)); + g_print("\"sizeof(GESTrackElementAsset)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTrackElementAsset)); + g_print("\"GESTrackElementAsset.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTrackElementAsset, priv)); + g_print("\"sizeof(GESTransitionClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTransitionClass)); + g_print("\"sizeof(GESTransition)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTransition)); + g_print("\"GESTransition.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTransition, priv)); + g_print("\"sizeof(GESTransitionClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTransitionClipClass)); + g_print("\"sizeof(GESTransitionClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESTransitionClip)); + g_print("\"GESTransitionClip.vtype\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTransitionClip, vtype)); + g_print("\"GESTransitionClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESTransitionClip, priv)); + g_print("\"sizeof(GESUriClipClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriClipClass)); + g_print("\"sizeof(GESUriClip)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriClip)); + g_print("\"GESUriClip.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriClip, priv)); + g_print("\"sizeof(GESUriClipAssetClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriClipAssetClass)); + g_print("\"GESUriClipAssetClass.discoverer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriClipAssetClass, discoverer)); + g_print("\"GESUriClipAssetClass.sync_discoverer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriClipAssetClass, sync_discoverer)); + g_print("\"GESUriClipAssetClass.discovered\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriClipAssetClass, discovered)); + g_print("\"sizeof(GESUriClipAsset)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriClipAsset)); + g_print("\"GESUriClipAsset.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriClipAsset, priv)); + g_print("\"sizeof(GESUriSourceAssetClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriSourceAssetClass)); + g_print("\"sizeof(GESUriSourceAsset)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESUriSourceAsset)); + g_print("\"GESUriSourceAsset.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESUriSourceAsset, priv)); + g_print("\"sizeof(GESVideoSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoSourceClass)); + g_print("\"GESVideoSourceClass.create_source\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoSourceClass, create_source)); + g_print("\"sizeof(GESVideoSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoSource)); + g_print("\"GESVideoSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoSource, priv)); + g_print("\"sizeof(GESVideoTestSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTestSourceClass)); + g_print("\"sizeof(GESVideoTestSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTestSource)); + g_print("\"GESVideoTestSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoTestSource, priv)); + g_print("\"sizeof(GESVideoTrackClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTrackClass)); + g_print("\"sizeof(GESVideoTrack)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTrack)); + g_print("\"GESVideoTrack.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoTrack, priv)); + g_print("\"sizeof(GESVideoTransitionClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTransitionClass)); + g_print("\"sizeof(GESVideoTransition)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoTransition)); + g_print("\"GESVideoTransition.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoTransition, priv)); + g_print("\"sizeof(GESVideoUriSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoUriSourceClass)); + g_print("\"sizeof(GESVideoUriSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESVideoUriSource)); + g_print("\"GESVideoUriSource.uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoUriSource, uri)); + g_print("\"GESVideoUriSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESVideoUriSource, priv)); + g_print("\"sizeof(GESXmlFormatterClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESXmlFormatterClass)); + g_print("\"sizeof(GESXmlFormatter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GESXmlFormatter)); + g_print("\"GESXmlFormatter.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GESXmlFormatter, priv)); + return 0; +} diff --git a/ges/generated/gst-editing-services-abi.cs b/ges/generated/gst-editing-services-abi.cs new file mode 100644 index 0000000000..ba08cb4290 --- /dev/null +++ b/ges/generated/gst-editing-services-abi.cs @@ -0,0 +1,277 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +using Gst; +using Gst.Video; +using Gst.Sdp; +using Gst.Tags; +using Gst.Rtsp; +using Gst.PbUtils; +using Gst.Net; +using Gst.FFT; +using Gst.Controller; +using Gst.Base; +using Gst.Audio; +using Gst.App; +using GES; +using System; + +namespace AbiTester { + class ___Gst { + public static void Main (string[] args) { + Console.WriteLine("\"sizeof(GESAssetClass)\": \"" + GES.Asset.class_abi.Size + "\""); + Console.WriteLine("\"GESAssetClass.start_loading\": \"" + GES.Asset.class_abi.GetFieldOffset("start_loading") + "\""); + Console.WriteLine("\"GESAssetClass.extract\": \"" + GES.Asset.class_abi.GetFieldOffset("extract") + "\""); + Console.WriteLine("\"GESAssetClass.inform_proxy\": \"" + GES.Asset.class_abi.GetFieldOffset("inform_proxy") + "\""); + Console.WriteLine("\"GESAssetClass.proxied\": \"" + GES.Asset.class_abi.GetFieldOffset("proxied") + "\""); + Console.WriteLine("\"GESAssetClass.request_id_update\": \"" + GES.Asset.class_abi.GetFieldOffset("request_id_update") + "\""); + Console.WriteLine("\"sizeof(GESAsset)\": \"" + GES.Asset.abi_info.Size + "\""); + Console.WriteLine("\"GESAsset.priv\": \"" + GES.Asset.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESAudioSourceClass)\": \"" + GES.AudioSource.class_abi.Size + "\""); + Console.WriteLine("\"GESAudioSourceClass.create_source\": \"" + GES.AudioSource.class_abi.GetFieldOffset("create_source") + "\""); + Console.WriteLine("\"sizeof(GESAudioSource)\": \"" + GES.AudioSource.abi_info.Size + "\""); + Console.WriteLine("\"GESAudioSource.priv\": \"" + GES.AudioSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESAudioTestSourceClass)\": \"" + GES.AudioTestSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESAudioTestSource)\": \"" + GES.AudioTestSource.abi_info.Size + "\""); + Console.WriteLine("\"GESAudioTestSource.priv\": \"" + GES.AudioTestSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESAudioTrackClass)\": \"" + GES.AudioTrack.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESAudioTrack)\": \"" + GES.AudioTrack.abi_info.Size + "\""); + Console.WriteLine("\"GESAudioTrack.priv\": \"" + GES.AudioTrack.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESAudioTransitionClass)\": \"" + GES.AudioTransition.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESAudioTransition)\": \"" + GES.AudioTransition.abi_info.Size + "\""); + Console.WriteLine("\"GESAudioTransition.priv\": \"" + GES.AudioTransition.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESAudioUriSourceClass)\": \"" + GES.AudioUriSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESAudioUriSource)\": \"" + GES.AudioUriSource.abi_info.Size + "\""); + Console.WriteLine("\"GESAudioUriSource.uri\": \"" + GES.AudioUriSource.abi_info.GetFieldOffset("uri") + "\""); + Console.WriteLine("\"GESAudioUriSource.priv\": \"" + GES.AudioUriSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESBaseEffectClass)\": \"" + GES.BaseEffect.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESBaseEffect)\": \"" + GES.BaseEffect.abi_info.Size + "\""); + Console.WriteLine("\"GESBaseEffect.priv\": \"" + GES.BaseEffect.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESBaseEffectClipClass)\": \"" + GES.BaseEffectClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESBaseEffectClip)\": \"" + GES.BaseEffectClip.abi_info.Size + "\""); + Console.WriteLine("\"GESBaseEffectClip.priv\": \"" + GES.BaseEffectClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESBaseTransitionClipClass)\": \"" + GES.BaseTransitionClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESBaseTransitionClip)\": \"" + GES.BaseTransitionClip.abi_info.Size + "\""); + Console.WriteLine("\"GESBaseTransitionClip.priv\": \"" + GES.BaseTransitionClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESBaseXmlFormatterClass)\": \"" + GES.BaseXmlFormatter.class_abi.Size + "\""); + Console.WriteLine("\"GESBaseXmlFormatterClass.content_parser\": \"" + GES.BaseXmlFormatter.class_abi.GetFieldOffset("content_parser") + "\""); + Console.WriteLine("\"GESBaseXmlFormatterClass.save\": \"" + GES.BaseXmlFormatter.class_abi.GetFieldOffset("save") + "\""); + Console.WriteLine("\"sizeof(GESBaseXmlFormatter)\": \"" + GES.BaseXmlFormatter.abi_info.Size + "\""); + Console.WriteLine("\"GESBaseXmlFormatter.priv\": \"" + GES.BaseXmlFormatter.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GESBaseXmlFormatter.xmlcontent\": \"" + GES.BaseXmlFormatter.abi_info.GetFieldOffset("xmlcontent") + "\""); + Console.WriteLine("\"sizeof(GESClipClass)\": \"" + GES.Clip.class_abi.Size + "\""); + Console.WriteLine("\"GESClipClass.create_track_element\": \"" + GES.Clip.class_abi.GetFieldOffset("create_track_element") + "\""); + Console.WriteLine("\"GESClipClass.create_track_elements\": \"" + GES.Clip.class_abi.GetFieldOffset("create_track_elements") + "\""); + Console.WriteLine("\"sizeof(GESClip)\": \"" + GES.Clip.abi_info.Size + "\""); + Console.WriteLine("\"GESClip.priv\": \"" + GES.Clip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESClipAssetClass)\": \"" + GES.ClipAsset.class_abi.Size + "\""); + Console.WriteLine("\"GESClipAssetClass.get_natural_framerate\": \"" + GES.ClipAsset.class_abi.GetFieldOffset("get_natural_framerate") + "\""); + Console.WriteLine("\"sizeof(GESClipAsset)\": \"" + GES.ClipAsset.abi_info.Size + "\""); + Console.WriteLine("\"GESClipAsset.priv\": \"" + GES.ClipAsset.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESCommandLineFormatter)\": \"" + GES.CommandLineFormatter.abi_info.Size + "\""); + Console.WriteLine("\"GESCommandLineFormatter.priv\": \"" + GES.CommandLineFormatter.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESContainerClass)\": \"" + GES.Container.class_abi.Size + "\""); + Console.WriteLine("\"GESContainerClass.child_added\": \"" + GES.Container.class_abi.GetFieldOffset("child_added") + "\""); + Console.WriteLine("\"GESContainerClass.child_removed\": \"" + GES.Container.class_abi.GetFieldOffset("child_removed") + "\""); + Console.WriteLine("\"GESContainerClass.add_child\": \"" + GES.Container.class_abi.GetFieldOffset("add_child") + "\""); + Console.WriteLine("\"GESContainerClass.remove_child\": \"" + GES.Container.class_abi.GetFieldOffset("remove_child") + "\""); + Console.WriteLine("\"GESContainerClass.ungroup\": \"" + GES.Container.class_abi.GetFieldOffset("ungroup") + "\""); + Console.WriteLine("\"GESContainerClass.group\": \"" + GES.Container.class_abi.GetFieldOffset("group") + "\""); + Console.WriteLine("\"GESContainerClass.edit\": \"" + GES.Container.class_abi.GetFieldOffset("edit") + "\""); + Console.WriteLine("\"GESContainerClass.grouping_priority\": \"" + GES.Container.class_abi.GetFieldOffset("grouping_priority") + "\""); + Console.WriteLine("\"sizeof(GESContainer)\": \"" + GES.Container.abi_info.Size + "\""); + Console.WriteLine("\"GESContainer.children\": \"" + GES.Container.abi_info.GetFieldOffset("children") + "\""); + Console.WriteLine("\"GESContainer.height\": \"" + GES.Container.abi_info.GetFieldOffset("height") + "\""); + Console.WriteLine("\"GESContainer.children_control_mode\": \"" + GES.Container.abi_info.GetFieldOffset("children_control_mode") + "\""); + Console.WriteLine("\"GESContainer.initiated_move\": \"" + GES.Container.abi_info.GetFieldOffset("initiated_move") + "\""); + Console.WriteLine("\"GESContainer.priv\": \"" + GES.Container.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESEffectClass)\": \"" + GES.Effect.class_abi.Size + "\""); + Console.WriteLine("\"GESEffectClass.rate_properties\": \"" + GES.Effect.class_abi.GetFieldOffset("rate_properties") + "\""); + Console.WriteLine("\"sizeof(GESEffect)\": \"" + GES.Effect.abi_info.Size + "\""); + Console.WriteLine("\"GESEffect.priv\": \"" + GES.Effect.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESEffectClipClass)\": \"" + GES.EffectClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESEffectClip)\": \"" + GES.EffectClip.abi_info.Size + "\""); + Console.WriteLine("\"GESEffectClip.priv\": \"" + GES.EffectClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESFormatterClass)\": \"" + GES.Formatter.class_abi.Size + "\""); + Console.WriteLine("\"GESFormatterClass.can_load_uri\": \"" + GES.Formatter.class_abi.GetFieldOffset("can_load_uri") + "\""); + Console.WriteLine("\"GESFormatterClass.load_from_uri\": \"" + GES.Formatter.class_abi.GetFieldOffset("load_from_uri") + "\""); + Console.WriteLine("\"GESFormatterClass.save_to_uri\": \"" + GES.Formatter.class_abi.GetFieldOffset("save_to_uri") + "\""); + Console.WriteLine("\"GESFormatterClass.name\": \"" + GES.Formatter.class_abi.GetFieldOffset("name") + "\""); + Console.WriteLine("\"GESFormatterClass.description\": \"" + GES.Formatter.class_abi.GetFieldOffset("description") + "\""); + Console.WriteLine("\"GESFormatterClass.extension\": \"" + GES.Formatter.class_abi.GetFieldOffset("extension") + "\""); + Console.WriteLine("\"GESFormatterClass.mimetype\": \"" + GES.Formatter.class_abi.GetFieldOffset("mimetype") + "\""); + Console.WriteLine("\"GESFormatterClass.version\": \"" + GES.Formatter.class_abi.GetFieldOffset("version") + "\""); + Console.WriteLine("\"GESFormatterClass.rank\": \"" + GES.Formatter.class_abi.GetFieldOffset("rank") + "\""); + Console.WriteLine("\"sizeof(GESFormatter)\": \"" + GES.Formatter.abi_info.Size + "\""); + Console.WriteLine("\"GESFormatter.priv\": \"" + GES.Formatter.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GESFormatter.project\": \"" + GES.Formatter.abi_info.GetFieldOffset("project") + "\""); + Console.WriteLine("\"GESFormatter.timeline\": \"" + GES.Formatter.abi_info.GetFieldOffset("timeline") + "\""); + Console.WriteLine("\"sizeof(GESGroupClass)\": \"" + GES.Group.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESGroup)\": \"" + GES.Group.abi_info.Size + "\""); + Console.WriteLine("\"GESGroup.priv\": \"" + GES.Group.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESImageSourceClass)\": \"" + GES.ImageSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESImageSource)\": \"" + GES.ImageSource.abi_info.Size + "\""); + Console.WriteLine("\"GESImageSource.uri\": \"" + GES.ImageSource.abi_info.GetFieldOffset("uri") + "\""); + Console.WriteLine("\"GESImageSource.priv\": \"" + GES.ImageSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESLayerClass)\": \"" + GES.Layer.class_abi.Size + "\""); + Console.WriteLine("\"GESLayerClass.get_objects\": \"" + GES.Layer.class_abi.GetFieldOffset("get_objects") + "\""); + Console.WriteLine("\"GESLayerClass.object_added\": \"" + GES.Layer.class_abi.GetFieldOffset("object_added") + "\""); + Console.WriteLine("\"GESLayerClass.object_removed\": \"" + GES.Layer.class_abi.GetFieldOffset("object_removed") + "\""); + Console.WriteLine("\"sizeof(GESLayer)\": \"" + GES.Layer.abi_info.Size + "\""); + Console.WriteLine("\"GESLayer.timeline\": \"" + GES.Layer.abi_info.GetFieldOffset("timeline") + "\""); + Console.WriteLine("\"GESLayer.min_nle_priority\": \"" + GES.Layer.abi_info.GetFieldOffset("min_nle_priority") + "\""); + Console.WriteLine("\"GESLayer.max_nle_priority\": \"" + GES.Layer.abi_info.GetFieldOffset("max_nle_priority") + "\""); + Console.WriteLine("\"GESLayer.priv\": \"" + GES.Layer.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESMultiFileSourceClass)\": \"" + GES.MultiFileSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESMultiFileSource)\": \"" + GES.MultiFileSource.abi_info.Size + "\""); + Console.WriteLine("\"GESMultiFileSource.uri\": \"" + GES.MultiFileSource.abi_info.GetFieldOffset("uri") + "\""); + Console.WriteLine("\"GESMultiFileSource.priv\": \"" + GES.MultiFileSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESOperationClass)\": \"" + GES.Operation.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESOperation)\": \"" + GES.Operation.abi_info.Size + "\""); + Console.WriteLine("\"GESOperation.priv\": \"" + GES.Operation.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESOperationClipClass)\": \"" + GES.OperationClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESOperationClip)\": \"" + GES.OperationClip.abi_info.Size + "\""); + Console.WriteLine("\"GESOperationClip.priv\": \"" + GES.OperationClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESOverlayClipClass)\": \"" + GES.OverlayClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESOverlayClip)\": \"" + GES.OverlayClip.abi_info.Size + "\""); + Console.WriteLine("\"GESOverlayClip.priv\": \"" + GES.OverlayClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESPipelineClass)\": \"" + GES.Pipeline.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESPipeline)\": \"" + GES.Pipeline.abi_info.Size + "\""); + Console.WriteLine("\"GESPipeline.priv\": \"" + GES.Pipeline.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESProjectClass)\": \"" + GES.Project.class_abi.Size + "\""); + Console.WriteLine("\"GESProjectClass.asset_added\": \"" + GES.Project.class_abi.GetFieldOffset("asset_added") + "\""); + Console.WriteLine("\"GESProjectClass.asset_loading\": \"" + GES.Project.class_abi.GetFieldOffset("asset_loading") + "\""); + Console.WriteLine("\"GESProjectClass.asset_removed\": \"" + GES.Project.class_abi.GetFieldOffset("asset_removed") + "\""); + Console.WriteLine("\"GESProjectClass.missing_uri\": \"" + GES.Project.class_abi.GetFieldOffset("missing_uri") + "\""); + Console.WriteLine("\"GESProjectClass.loading_error\": \"" + GES.Project.class_abi.GetFieldOffset("loading_error") + "\""); + Console.WriteLine("\"GESProjectClass.loaded\": \"" + GES.Project.class_abi.GetFieldOffset("loaded") + "\""); + Console.WriteLine("\"GESProjectClass.loading\": \"" + GES.Project.class_abi.GetFieldOffset("loading") + "\""); + Console.WriteLine("\"sizeof(GESProject)\": \"" + GES.Project.abi_info.Size + "\""); + Console.WriteLine("\"GESProject.priv\": \"" + GES.Project.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESSourceClass)\": \"" + GES.Source.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESSource)\": \"" + GES.Source.abi_info.Size + "\""); + Console.WriteLine("\"GESSource.priv\": \"" + GES.Source.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESSourceClipClass)\": \"" + GES.SourceClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESSourceClip)\": \"" + GES.SourceClip.abi_info.Size + "\""); + Console.WriteLine("\"GESSourceClip.priv\": \"" + GES.SourceClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTestClipClass)\": \"" + GES.TestClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTestClip)\": \"" + GES.TestClip.abi_info.Size + "\""); + Console.WriteLine("\"GESTestClip.priv\": \"" + GES.TestClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTextOverlayClass)\": \"" + GES.TextOverlay.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTextOverlay)\": \"" + GES.TextOverlay.abi_info.Size + "\""); + Console.WriteLine("\"GESTextOverlay.priv\": \"" + GES.TextOverlay.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTextOverlayClipClass)\": \"" + GES.TextOverlayClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTextOverlayClip)\": \"" + GES.TextOverlayClip.abi_info.Size + "\""); + Console.WriteLine("\"GESTextOverlayClip.priv\": \"" + GES.TextOverlayClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTimelineClass)\": \"" + GES.Timeline.class_abi.Size + "\""); + Console.WriteLine("\"GESTimelineClass.track_added\": \"" + GES.Timeline.class_abi.GetFieldOffset("track_added") + "\""); + Console.WriteLine("\"GESTimelineClass.track_removed\": \"" + GES.Timeline.class_abi.GetFieldOffset("track_removed") + "\""); + Console.WriteLine("\"GESTimelineClass.layer_added\": \"" + GES.Timeline.class_abi.GetFieldOffset("layer_added") + "\""); + Console.WriteLine("\"GESTimelineClass.layer_removed\": \"" + GES.Timeline.class_abi.GetFieldOffset("layer_removed") + "\""); + Console.WriteLine("\"GESTimelineClass.group_added\": \"" + GES.Timeline.class_abi.GetFieldOffset("group_added") + "\""); + Console.WriteLine("\"GESTimelineClass.group_removed\": \"" + GES.Timeline.class_abi.GetFieldOffset("group_removed") + "\""); + Console.WriteLine("\"sizeof(GESTimeline)\": \"" + GES.Timeline.abi_info.Size + "\""); + Console.WriteLine("\"GESTimeline.layers\": \"" + GES.Timeline.abi_info.GetFieldOffset("layers") + "\""); + Console.WriteLine("\"GESTimeline.tracks\": \"" + GES.Timeline.abi_info.GetFieldOffset("tracks") + "\""); + Console.WriteLine("\"GESTimeline.priv\": \"" + GES.Timeline.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTimelineElementClass)\": \"" + GES.TimelineElement.class_abi.Size + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_parent\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_parent") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_start\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_start") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_inpoint\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_inpoint") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_duration\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_duration") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_max_duration\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_max_duration") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_priority\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_priority") + "\""); + Console.WriteLine("\"GESTimelineElementClass.ripple\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("ripple") + "\""); + Console.WriteLine("\"GESTimelineElementClass.ripple_end\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("ripple_end") + "\""); + Console.WriteLine("\"GESTimelineElementClass.roll_start\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("roll_start") + "\""); + Console.WriteLine("\"GESTimelineElementClass.roll_end\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("roll_end") + "\""); + Console.WriteLine("\"GESTimelineElementClass.trim\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("trim") + "\""); + Console.WriteLine("\"GESTimelineElementClass.deep_copy\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("deep_copy") + "\""); + Console.WriteLine("\"GESTimelineElementClass.paste\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("paste") + "\""); + Console.WriteLine("\"GESTimelineElementClass.list_children_properties\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("list_children_properties") + "\""); + Console.WriteLine("\"GESTimelineElementClass.lookup_child\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("lookup_child") + "\""); + Console.WriteLine("\"GESTimelineElementClass.get_track_types\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("get_track_types") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_child_property\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_child_property") + "\""); + Console.WriteLine("\"GESTimelineElementClass.get_layer_priority\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("get_layer_priority") + "\""); + Console.WriteLine("\"GESTimelineElementClass.get_natural_framerate\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("get_natural_framerate") + "\""); + Console.WriteLine("\"GESTimelineElementClass.set_child_property_full\": \"" + GES.TimelineElement.class_abi.GetFieldOffset("set_child_property_full") + "\""); + Console.WriteLine("\"sizeof(GESTimelineElement)\": \"" + GES.TimelineElement.abi_info.Size + "\""); + Console.WriteLine("\"GESTimelineElement.parent\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("parent") + "\""); + Console.WriteLine("\"GESTimelineElement.asset\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("asset") + "\""); + Console.WriteLine("\"GESTimelineElement.start\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GESTimelineElement.inpoint\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("inpoint") + "\""); + Console.WriteLine("\"GESTimelineElement.duration\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("duration") + "\""); + Console.WriteLine("\"GESTimelineElement.maxduration\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("maxduration") + "\""); + Console.WriteLine("\"GESTimelineElement.priority\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("priority") + "\""); + Console.WriteLine("\"GESTimelineElement.timeline\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("timeline") + "\""); + Console.WriteLine("\"GESTimelineElement.name\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("name") + "\""); + Console.WriteLine("\"GESTimelineElement.priv\": \"" + GES.TimelineElement.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTitleClipClass)\": \"" + GES.TitleClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTitleClip)\": \"" + GES.TitleClip.abi_info.Size + "\""); + Console.WriteLine("\"GESTitleClip.priv\": \"" + GES.TitleClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTitleSourceClass)\": \"" + GES.TitleSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTitleSource)\": \"" + GES.TitleSource.abi_info.Size + "\""); + Console.WriteLine("\"GESTitleSource.priv\": \"" + GES.TitleSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTrackClass)\": \"" + GES.Track.class_abi.Size + "\""); + Console.WriteLine("\"GESTrackClass.get_mixing_element\": \"" + GES.Track.class_abi.GetFieldOffset("get_mixing_element") + "\""); + Console.WriteLine("\"sizeof(GESTrack)\": \"" + GES.Track.abi_info.Size + "\""); + Console.WriteLine("\"GESTrack.type\": \"" + GES.Track.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GESTrack.priv\": \"" + GES.Track.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTrackElementClass)\": \"" + GES.TrackElement.class_abi.Size + "\""); + Console.WriteLine("\"GESTrackElementClass.nleobject_factorytype\": \"" + GES.TrackElement.class_abi.GetFieldOffset("nleobject_factorytype") + "\""); + Console.WriteLine("\"GESTrackElementClass.create_gnl_object\": \"" + GES.TrackElement.class_abi.GetFieldOffset("create_gnl_object") + "\""); + Console.WriteLine("\"GESTrackElementClass.create_element\": \"" + GES.TrackElement.class_abi.GetFieldOffset("create_element") + "\""); + Console.WriteLine("\"GESTrackElementClass.active_changed\": \"" + GES.TrackElement.class_abi.GetFieldOffset("active_changed") + "\""); + Console.WriteLine("\"GESTrackElementClass.changed\": \"" + GES.TrackElement.class_abi.GetFieldOffset("changed") + "\""); + Console.WriteLine("\"GESTrackElementClass.list_children_properties\": \"" + GES.TrackElement.class_abi.GetFieldOffset("list_children_properties") + "\""); + Console.WriteLine("\"GESTrackElementClass.lookup_child\": \"" + GES.TrackElement.class_abi.GetFieldOffset("lookup_child") + "\""); + Console.WriteLine("\"sizeof(GESTrackElement)\": \"" + GES.TrackElement.abi_info.Size + "\""); + Console.WriteLine("\"GESTrackElement.active\": \"" + GES.TrackElement.abi_info.GetFieldOffset("active") + "\""); + Console.WriteLine("\"GESTrackElement.priv\": \"" + GES.TrackElement.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GESTrackElement.asset\": \"" + GES.TrackElement.abi_info.GetFieldOffset("asset") + "\""); + Console.WriteLine("\"sizeof(GESTrackElementAssetClass)\": \"" + GES.TrackElementAsset.class_abi.Size + "\""); + Console.WriteLine("\"GESTrackElementAssetClass.get_natural_framerate\": \"" + GES.TrackElementAsset.class_abi.GetFieldOffset("get_natural_framerate") + "\""); + Console.WriteLine("\"sizeof(GESTrackElementAsset)\": \"" + GES.TrackElementAsset.abi_info.Size + "\""); + Console.WriteLine("\"GESTrackElementAsset.priv\": \"" + GES.TrackElementAsset.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTransitionClass)\": \"" + GES.Transition.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTransition)\": \"" + GES.Transition.abi_info.Size + "\""); + Console.WriteLine("\"GESTransition.priv\": \"" + GES.Transition.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESTransitionClipClass)\": \"" + GES.TransitionClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESTransitionClip)\": \"" + GES.TransitionClip.abi_info.Size + "\""); + Console.WriteLine("\"GESTransitionClip.vtype\": \"" + GES.TransitionClip.abi_info.GetFieldOffset("vtype") + "\""); + Console.WriteLine("\"GESTransitionClip.priv\": \"" + GES.TransitionClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESUriClipClass)\": \"" + GES.UriClip.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESUriClip)\": \"" + GES.UriClip.abi_info.Size + "\""); + Console.WriteLine("\"GESUriClip.priv\": \"" + GES.UriClip.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESUriClipAssetClass)\": \"" + GES.UriClipAsset.class_abi.Size + "\""); + Console.WriteLine("\"GESUriClipAssetClass.discoverer\": \"" + GES.UriClipAsset.class_abi.GetFieldOffset("discoverer") + "\""); + Console.WriteLine("\"GESUriClipAssetClass.sync_discoverer\": \"" + GES.UriClipAsset.class_abi.GetFieldOffset("sync_discoverer") + "\""); + Console.WriteLine("\"GESUriClipAssetClass.discovered\": \"" + GES.UriClipAsset.class_abi.GetFieldOffset("discovered") + "\""); + Console.WriteLine("\"sizeof(GESUriClipAsset)\": \"" + GES.UriClipAsset.abi_info.Size + "\""); + Console.WriteLine("\"GESUriClipAsset.priv\": \"" + GES.UriClipAsset.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESUriSourceAssetClass)\": \"" + GES.UriSourceAsset.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESUriSourceAsset)\": \"" + GES.UriSourceAsset.abi_info.Size + "\""); + Console.WriteLine("\"GESUriSourceAsset.priv\": \"" + GES.UriSourceAsset.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESVideoSourceClass)\": \"" + GES.VideoSource.class_abi.Size + "\""); + Console.WriteLine("\"GESVideoSourceClass.create_source\": \"" + GES.VideoSource.class_abi.GetFieldOffset("create_source") + "\""); + Console.WriteLine("\"sizeof(GESVideoSource)\": \"" + GES.VideoSource.abi_info.Size + "\""); + Console.WriteLine("\"GESVideoSource.priv\": \"" + GES.VideoSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESVideoTestSourceClass)\": \"" + GES.VideoTestSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESVideoTestSource)\": \"" + GES.VideoTestSource.abi_info.Size + "\""); + Console.WriteLine("\"GESVideoTestSource.priv\": \"" + GES.VideoTestSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESVideoTrackClass)\": \"" + GES.VideoTrack.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESVideoTrack)\": \"" + GES.VideoTrack.abi_info.Size + "\""); + Console.WriteLine("\"GESVideoTrack.priv\": \"" + GES.VideoTrack.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESVideoTransitionClass)\": \"" + GES.VideoTransition.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESVideoTransition)\": \"" + GES.VideoTransition.abi_info.Size + "\""); + Console.WriteLine("\"GESVideoTransition.priv\": \"" + GES.VideoTransition.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESVideoUriSourceClass)\": \"" + GES.VideoUriSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESVideoUriSource)\": \"" + GES.VideoUriSource.abi_info.Size + "\""); + Console.WriteLine("\"GESVideoUriSource.uri\": \"" + GES.VideoUriSource.abi_info.GetFieldOffset("uri") + "\""); + Console.WriteLine("\"GESVideoUriSource.priv\": \"" + GES.VideoUriSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GESXmlFormatterClass)\": \"" + GES.XmlFormatter.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GESXmlFormatter)\": \"" + GES.XmlFormatter.abi_info.Size + "\""); + Console.WriteLine("\"GESXmlFormatter.priv\": \"" + GES.XmlFormatter.abi_info.GetFieldOffset("priv") + "\""); + } + } +} diff --git a/ges/generated/gst-editing-services-api.xml b/ges/generated/gst-editing-services-api.xml new file mode 100644 index 0000000000..5e4a0cdb0d --- /dev/null +++ b/ges/generated/gst-editing-services-api.xml @@ -0,0 +1,4419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ges/generated/meson.build b/ges/generated/meson.build new file mode 100644 index 0000000000..e2999b5a33 --- /dev/null +++ b/ges/generated/meson.build @@ -0,0 +1,150 @@ +generated_sources = [ + 'GES/Asset.cs', + 'GES/AssetAddedHandler.cs', + 'GES/AssetLoadingHandler.cs', + 'GES/AssetLoadingReturn.cs', + 'GES/AssetRemovedHandler.cs', + 'GES/AudioSource.cs', + 'GES/AudioTestSource.cs', + 'GES/AudioTrack.cs', + 'GES/AudioTransition.cs', + 'GES/AudioUriSource.cs', + 'GES/BaseEffect.cs', + 'GES/BaseEffectClip.cs', + 'GES/BaseEffectTimeTranslationFunc.cs', + 'GES/BaseTransitionClip.cs', + 'GES/BaseXmlFormatter.cs', + 'GES/ChildAddedHandler.cs', + 'GES/ChildPropertyAddedHandler.cs', + 'GES/ChildPropertyRemovedHandler.cs', + 'GES/ChildRemovedHandler.cs', + 'GES/ChildrenControlMode.cs', + 'GES/Clip.cs', + 'GES/ClipAddedHandler.cs', + 'GES/ClipAsset.cs', + 'GES/ClipRemovedHandler.cs', + 'GES/CommandLineFormatter.cs', + 'GES/Constants.cs', + 'GES/Container.cs', + 'GES/ControlBindingAddedHandler.cs', + 'GES/ControlBindingRemovedHandler.cs', + 'GES/CreateElementForGapFunc.cs', + 'GES/CreateTrackElementFunc.cs', + 'GES/CreateTrackElementsFunc.cs', + 'GES/DeepNotifyHandler.cs', + 'GES/Edge.cs', + 'GES/EditMode.cs', + 'GES/Effect.cs', + 'GES/EffectAsset.cs', + 'GES/EffectClip.cs', + 'GES/Error.cs', + 'GES/ExtractableAdapter.cs', + 'GES/ExtractableCheckId.cs', + 'GES/FillTrackElementFunc.cs', + 'GES/Formatter.cs', + 'GES/FormatterCanLoadURIMethod.cs', + 'GES/FormatterLoadFromURIMethod.cs', + 'GES/FormatterSaveToURIMethod.cs', + 'GES/GESSharp.BaseEffectTimeTranslationFuncNative.cs', + 'GES/GESSharp.CreateElementForGapFuncNative.cs', + 'GES/GESSharp.CreateTrackElementFuncNative.cs', + 'GES/GESSharp.CreateTrackElementsFuncNative.cs', + 'GES/GESSharp.ExtractableCheckIdNative.cs', + 'GES/GESSharp.FillTrackElementFuncNative.cs', + 'GES/GESSharp.FormatterCanLoadURIMethodNative.cs', + 'GES/GESSharp.FormatterLoadFromURIMethodNative.cs', + 'GES/GESSharp.FormatterSaveToURIMethodNative.cs', + 'GES/GESSharp.MetaForeachFuncNative.cs', + 'GES/Global.cs', + 'GES/Group.cs', + 'GES/GroupAddedHandler.cs', + 'GES/IExtractable.cs', + 'GES/IMetaContainer.cs', + 'GES/ImageSource.cs', + 'GES/Layer.cs', + 'GES/LayerAddedHandler.cs', + 'GES/LayerRemovedHandler.cs', + 'GES/LoadedHandler.cs', + 'GES/LoadingHandler.cs', + 'GES/Marker.cs', + 'GES/MarkerAddedHandler.cs', + 'GES/MarkerList.cs', + 'GES/MarkerMovedHandler.cs', + 'GES/MarkerRemovedHandler.cs', + 'GES/MetaContainerAdapter.cs', + 'GES/MetaFlag.cs', + 'GES/MetaForeachFunc.cs', + 'GES/MultiFileSource.cs', + 'GES/NotifyMetaHandler.cs', + 'GES/Operation.cs', + 'GES/OperationClip.cs', + 'GES/OverlayClip.cs', + 'GES/Pipeline.cs', + 'GES/PipelineFlags.cs', + 'GES/PitiviFormatter.cs', + 'GES/Project.cs', + 'GES/SelectElementTrackHandler.cs', + 'GES/SnappingEndedHandler.cs', + 'GES/SnappingStartedHandler.cs', + 'GES/Source.cs', + 'GES/SourceClip.cs', + 'GES/SourceClipAsset.cs', + 'GES/TestClip.cs', + 'GES/TextHAlign.cs', + 'GES/TextOverlay.cs', + 'GES/TextOverlayClip.cs', + 'GES/TextVAlign.cs', + 'GES/Timeline.cs', + 'GES/TimelineElement.cs', + 'GES/TitleClip.cs', + 'GES/TitleSource.cs', + 'GES/Track.cs', + 'GES/TrackAddedHandler.cs', + 'GES/TrackElement.cs', + 'GES/TrackElementAddedHandler.cs', + 'GES/TrackElementAsset.cs', + 'GES/TrackElementRemovedHandler.cs', + 'GES/TrackRemovedHandler.cs', + 'GES/TrackType.cs', + 'GES/Transition.cs', + 'GES/TransitionClip.cs', + 'GES/UriClip.cs', + 'GES/UriClipAsset.cs', + 'GES/UriSource.cs', + 'GES/UriSourceAsset.cs', + 'GES/VideoSource.cs', + 'GES/VideoStandardTransitionType.cs', + 'GES/VideoTestPattern.cs', + 'GES/VideoTestSource.cs', + 'GES/VideoTrack.cs', + 'GES/VideoTransition.cs', + 'GES/VideoUriSource.cs', + 'GES/XmlFormatter.cs', + 'GLib/GLibSharp.AsyncReadyCallbackNative.cs', + 'GtkSharp/ObjectManager.cs', +] + +run_target('update_ges_code', + command: [ + generate_api, + '--api-raw', raw_api_fname, + '--gapi-fixup', gapi_fixup, + '--metadata', metadata, + '--gapi-codegen', gapi_codegen, + '--extra-includes=' + glib_api_includes, + '--extra-includes=' + gio_api_includes, + '--extra-includes=' + gst_api_includes, + '--out', meson.current_source_dir(), + '--files', ';'.join(generated_sources), + '--assembly-name', pkg, + '--abi-includes', 'ges/ges.h', + '--abi-cs-usings', 'Gst,Gst.Video,Gst.Sdp,Gst.Tags,Gst.Rtsp,Gst.PbUtils,Gst.Net,Gst.FFT,Gst.Controller,Gst.Base,Gst.Audio,Gst.App,GES', + ], +) + +ges_generate_files = files(generated_sources) + +c_abi = files(pkg + '-abi.c') +cs_abi = files(pkg + '-abi.cs') +gapis += [join_paths(meson.current_build_dir(), pkg + '-api.xml')] +gapis_deps = [] diff --git a/ges/gst-editing-services-api.raw b/ges/gst-editing-services-api.raw new file mode 100644 index 0000000000..fa8186d3db --- /dev/null +++ b/ges/gst-editing-services-api.raw @@ -0,0 +1,4435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ges/gst-editing-services-sharp.dll.config b/ges/gst-editing-services-sharp.dll.config new file mode 100644 index 0000000000..20acb97cc7 --- /dev/null +++ b/ges/gst-editing-services-sharp.dll.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/ges/gst-editing-services.metadata b/ges/gst-editing-services.metadata new file mode 100644 index 0000000000..ec1a68c444 --- /dev/null +++ b/ges/gst-editing-services.metadata @@ -0,0 +1,66 @@ + + + + + + + + + + GInitiallyUnowned + GObject + + true + true + private + private + private + private + GMarkupParser + + true + + + + + + + + + + + + + + + + + + + + + + + true + diff --git a/ges/meson.build b/ges/meson.build new file mode 100644 index 0000000000..77606fb9d8 --- /dev/null +++ b/ges/meson.build @@ -0,0 +1,32 @@ +pkg = 'gst-editing-services' +raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') +metadata = files(pkg + '.metadata') + +subdir('generated') + +ges_sharp = shared_library(pkg + '-sharp', ges_generate_files, + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-unsafe'], + link_with: gst_sharp, + dependencies: [glib_sharp_dep, gio_sharp_dep]) + +ges_sharp_dep = declare_dependency(dependencies: [glib_sharp_dep, gio_sharp_dep, gst_sharp_dep], link_with: ges_sharp) + +configure_file( + input: pkg + '-sharp.dll.config', + output: pkg + '-sharp.dll.config', + copy: true) + +if add_languages('c', required: get_option('tests')) and csc.get_id() == 'mono' + c_abi_exe = executable(pkg + '_c_abi', c_abi, + c_args: ['-Wno-deprecated', '-Wno-deprecated-declarations'], + dependencies: [gst_deps, ges_dep]) + + cs_abi_exe = executable(pkg + '_cs_abi', cs_abi, + cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-nowarn:0618', '-unsafe'], + dependencies: [ges_sharp_dep]) + + test(pkg + 'abi', diff, args: [c_abi_exe.full_path(), cs_abi_exe.full_path()], + env: testsenv) +else + message('Not running tests ' + csc.get_id()) +endif diff --git a/girs/GES-1.0.gir b/girs/GES-1.0.gir new file mode 100644 index 0000000000..60fb24a257 --- /dev/null +++ b/girs/GES-1.0.gir @@ -0,0 +1,22193 @@ + + + + + + + + + + + + + A datatype to hold a frame number. + + + + + A #GESAsset in the GStreamer Editing Services represents a resources +that can be used. In particular, any class that implements the +#GESExtractable interface may have some associated assets with a +corresponding #GESAsset:extractable-type, from which its objects can be +extracted using ges_asset_extract(). Some examples would be +#GESClip, #GESFormatter and #GESTrackElement. + +All assets that are created within GES are stored in a cache; one per +each #GESAsset:id and #GESAsset:extractable-type pair. These assets can +be fetched, and initialized if they do not yet exist in the cache, +using ges_asset_request(). + +``` c +GESAsset *effect_asset; +GESEffect *effect; + +// You create an asset for an effect +effect_asset = ges_asset_request (GES_TYPE_EFFECT, "agingtv", NULL); + +// And now you can extract an instance of GESEffect from that asset +effect = GES_EFFECT (ges_asset_extract (effect_asset)); + +``` + +The advantage of using assets, rather than simply creating the object +directly, is that the currently loaded resources can be listed with +ges_list_assets() and displayed to an end user. For example, to show +which media files have been loaded, and a standard list of effects. In +fact, the GES library already creates assets for #GESTransitionClip and +#GESFormatter, which you can use to list all the available transition +types and supported formats. + +The other advantage is that #GESAsset implements #GESMetaContainer, so +metadata can be set on the asset, with some subclasses automatically +creating this metadata on initiation. + +For example, to display information about the supported formats, you +could do the following: +|[ + GList *formatter_assets, *tmp; + + // List all the transitions + formatter_assets = ges_list_assets (GES_TYPE_FORMATTER); + + // Print some infos about the formatter GESAsset + for (tmp = formatter_assets; tmp; tmp = tmp->next) { + g_print ("Name of the formatter: %s, file extension it produces: %s", + ges_meta_container_get_string ( + GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_NAME), + ges_meta_container_get_string ( + GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_EXTENSION)); + } + + g_list_free (transition_assets); + +]| + +## ID + +Each asset is uniquely defined in the cache by its +#GESAsset:extractable-type and #GESAsset:id. Depending on the +#GESAsset:extractable-type, the #GESAsset:id can be used to parametrise +the creation of the object upon extraction. By default, a class that +implements #GESExtractable will only have a single associated asset, +with an #GESAsset:id set to the type name of its objects. However, this +is overwritten by some implementations, which allow a class to have +multiple associated assets. For example, for #GESTransitionClip the +#GESAsset:id will be a nickname of the #GESTransitionClip:vtype. You +should check the documentation for each extractable type to see if they +differ from the default. + +Moreover, each #GESAsset:extractable-type may also associate itself +with a specific asset subclass. In such cases, when their asset is +requested, an asset of this subclass will be returned instead. + +## Managing + +You can use a #GESProject to easily manage the assets of a +#GESTimeline. + +## Proxies + +Some assets can (temporarily) act as the #GESAsset:proxy of another +asset. When the original asset is requested from the cache, the proxy +will be returned in its place. This can be useful if, say, you want +to substitute a #GESUriClipAsset corresponding to a high resolution +media file with the asset of a lower resolution stand in. + +An asset may even have several proxies, the first of which will act as +its default and be returned on requests, but the others will be ordered +to take its place once it is removed. You can add a proxy to an asset, +or set its default, using ges_asset_set_proxy(), and you can remove +them with ges_asset_unproxy(). + + + + + + Indicate that an existing #GESAsset in the cache should be reloaded +upon the next request. This can be used when some condition has +changed, which may require that an existing asset should be updated. +For example, if an external resource has changed or now become +available. + +Note, the asset is not immediately changed, but will only actually +reload on the next call to ges_asset_request() or +ges_asset_request_async(). + + + %TRUE if the specified asset exists in the cache and could be +marked for reloading. + + + + + The #GESAsset:extractable-type of the asset that +needs reloading + + + + The #GESAsset:id of the asset asset that needs +reloading + + + + + + Returns an asset with the given properties. If such an asset already +exists in the cache (it has been previously created in GES), then a +reference to the existing asset is returned. Otherwise, a newly created +asset is returned, and also added to the cache. + +If the requested asset has been loaded with an error, then @error is +set, if given, and %NULL will be returned instead. + +Note that the given @id may not be exactly the #GESAsset:id that is +set on the returned asset. For instance, it may be adjusted into a +standard format. Or, if a #GESExtractable type does not have its +extraction parametrised, as is the case by default, then the given @id +may be ignored entirely and the #GESAsset:id set to some standard, in +which case a %NULL @id can be given. + +Similarly, the given @extractable_type may not be exactly the +#GESAsset:extractable-type that is set on the returned asset. Instead, +the actual extractable type may correspond to a subclass of the given +@extractable_type, depending on the given @id. + +Moreover, depending on the given @extractable_type, the returned asset +may belong to a subclass of #GESAsset. + +Finally, if the requested asset has a #GESAsset:proxy, then the proxy +that is found at the end of the chain of proxies is returned (a proxy's +proxy will take its place, and so on, unless it has no proxy). + +Some asset subclasses only support asynchronous construction of its +assets, such as #GESUriClip. For such assets this method will fail, and +you should use ges_asset_request_async() instead. In the case of +#GESUriClip, you can use ges_uri_clip_asset_request_sync() if you only +want to wait for the request to finish. + + + A reference to the requested +asset, or %NULL if an error occurred. + + + + + The #GESAsset:extractable-type of the asset + + + + The #GESAsset:id of the asset + + + + + + Requests an asset with the given properties asynchronously (see +ges_asset_request()). When the asset has been initialized or fetched +from the cache, the given callback function will be called. The +asset can then be retrieved in the callback using the +ges_asset_request_finish() method on the given #GAsyncResult. + +Note that the source object passed to the callback will be the +#GESAsset corresponding to the request, but it may not have loaded +correctly and therefore can not be used as is. Instead, +ges_asset_request_finish() should be used to fetch a usable asset, or +indicate that an error occurred in the asset's creation. + +Note that the callback will be called in the #GMainLoop running under +the same #GMainContext that ges_init() was called in. So, if you wish +the callback to be invoked outside the default #GMainContext, you can +call g_main_context_push_thread_default() in a new thread before +calling ges_init(). + +Example of an asynchronous asset request: +``` c +// The request callback +static void +asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data) +{ + GESAsset *asset; + GError *error = NULL; + + asset = ges_asset_request_finish (res, &error); + if (asset) { + g_print ("The file: %s is usable as a GESUriClip", + ges_asset_get_id (asset)); + } else { + g_print ("The file: %s is *not* usable as a GESUriClip because: %s", + ges_asset_get_id (source), error->message); + } + + gst_object_unref (asset); +} + +// The request: +ges_asset_request_async (GES_TYPE_URI_CLIP, some_uri, NULL, + (GAsyncReadyCallback) asset_loaded_cb, user_data); +``` + + + + + + + The #GESAsset:extractable-type of the asset + + + + The #GESAsset:id of the asset + + + + An object to allow cancellation of the +asset request, or %NULL to ignore + + + + A function to call when the initialization is finished + + + + Data to be passed to @callback + + + + + + Fetches an asset requested by ges_asset_request_async(), which +finalises the request. + + + The requested asset, or %NULL if an error +occurred. + + + + + The task result to fetch the asset from + + + + + + Extracts a new #GESAsset:extractable-type object from the asset. The +#GESAsset:id of the asset may determine the properties and state of the +newly created object. + + + A newly created object, or %NULL if an +error occurred. + + + + + The #GESAsset to extract an object from + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extracts a new #GESAsset:extractable-type object from the asset. The +#GESAsset:id of the asset may determine the properties and state of the +newly created object. + + + A newly created object, or %NULL if an +error occurred. + + + + + The #GESAsset to extract an object from + + + + + + Retrieve the error that was set on the asset when it was loaded. + + + The error set on @asset, or +%NULL if no error occurred when @asset was loaded. + + + + + A #GESAsset + + + + + + Gets the #GESAsset:extractable-type of the asset. + + + The extractable type of @self. + + + + + The #GESAsset + + + + + + Gets the #GESAsset:id of the asset. + + + The ID of @self. + + + + + A #GESAsset + + + + + + Gets the default #GESAsset:proxy of the asset. + + + The default proxy of @asset. + + + + + A #GESAsset + + + + + + Gets the #GESAsset:proxy-target of the asset. + +Note that the proxy target may have loaded with an error, so you should +call ges_asset_get_error() on the returned target. + + + The asset that @proxy is a proxy +of. + + + + + A #GESAsset + + + + + + Get all the proxies that the asset has. The first item of the list will +be the default #GESAsset:proxy. The second will be the proxy that is +'next in line' to be default, and so on. + + + The list of proxies +that @asset has. + + + + + + + A #GESAsset + + + + + + Sets the #GESAsset:proxy for the asset. + +If @proxy is among the existing proxies of the asset (see +ges_asset_list_proxies()) it will be moved to become the default +proxy. Otherwise, if @proxy is not %NULL, it will be added to the list +of proxies, as the new default. The previous default proxy will become +'next in line' for if the new one is removed, and so on. As such, this +will **not** actually remove the previous default proxy (use +ges_asset_unproxy() for that). + +Note that an asset can only act as a proxy for one other asset. + +As a special case, if @proxy is %NULL, then this method will actually +remove **all** proxies from the asset. + + + %TRUE if @proxy was successfully set as the default for +@asset. + + + + + The #GESAsset to proxy + + + + A new default proxy for @asset + + + + + + Removes the proxy from the available list of proxies for the asset. If +the given proxy is the default proxy of the list, then the next proxy +in the available list (see ges_asset_list_proxies()) will become the +default. If there are no other proxies, then the asset will no longer +have a default #GESAsset:proxy. + + + %TRUE if @proxy was successfully removed from @asset's proxy +list. + + + + + The #GESAsset to no longer proxy with @proxy + + + + An existing proxy of @asset + + + + + + The #GESExtractable object type that can be extracted from the asset. + + + + The ID of the asset. This should be unique amongst all assets with +the same #GESAsset:extractable-type. Depending on the associated +#GESExtractable implementation, this id may convey some information +about the #GObject that should be extracted. Note that, as such, the +ID will have an expected format, and you can not choose this value +arbitrarily. By default, this will be set to the type name of the +#GESAsset:extractable-type, but you should check the documentation +of the extractable type to see whether they differ from the +default behaviour. + + + + The default proxy for this asset, or %NULL if it has no proxy. A +proxy will act as a substitute for the original asset when the +original is requested (see ges_asset_request()). + +Setting this property will not usually remove the existing proxy, but +will replace it as the default (see ges_asset_set_proxy()). + + + + The asset that this asset is a proxy for, or %NULL if it is not a +proxy for another asset. + +Note that even if this asset is acting as a proxy for another asset, +but this asset is not the default #GESAsset:proxy, then @proxy-target +will *still* point to this other asset. So you should check the +#GESAsset:proxy property of @target-proxy before assuming it is the +current default proxy for the target. + +Note that the #GObject::notify for this property is emitted after +the #GESAsset:proxy #GObject::notify for the corresponding (if any) +asset it is now the proxy of/no longer the proxy of. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A newly created object, or %NULL if an +error occurred. + + + + + The #GESAsset to extract an object from + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates that an error occurred + + + Indicates that the loading is being performed +asynchronously + + + Indicates that the loading is complete, without +error + + + + + + + ## Children Properties + +You can use the following children properties through the +#ges_track_element_set_child_property and alike set of methods: + +- #gdouble `volume`: volume factor, 1.0=100%. +- #gboolean `mute`: mute channel. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Outputs a test audio stream using audiotestsrc. The default property values +output silence. Useful for testing pipelines, or to fill gaps in an audio +track. + + + + + Get the current frequency of @self. + + + The current frequency of @self. + + + + + a #GESAudioTestSource + + + + + + Get the current volume of @self. + + + The current volume of @self + + + + + a #GESAudioTestSource + + + + + + Lets you set the frequency applied on the track element + + + + + + + a #GESAudioTestSource + + + + The frequency you want to apply on @self + + + + + + Sets the volume of the test audio signal. + + + + + + + a #GESAudioTestSource + + + + The volume you want to apply on @self + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESAudioTrack is a default audio #GESTrack, with a +#GES_TRACK_TYPE_AUDIO #GESTrack:track-type and "audio/x-raw(ANY)" +#GESTrack:caps. + +By default, an audio track will have its #GESTrack:restriction-caps +set to "audio/x-raw" with the following properties: + +- format: "S32LE" +- channels: 2 +- rate: 44100 +- layout: "interleaved" + +These fields are needed for negotiation purposes, but you can change +their values if you wish. It is advised that you do so using +ges_track_update_restriction_caps() with new values for the fields you +wish to change, and any additional fields you may want to add. Unlike +using ges_track_set_restriction_caps(), this will ensure that these +default fields will at least have some value set. + + + + + Creates a new audio track, with a #GES_TRACK_TYPE_AUDIO +#GESTrack:track-type, "audio/x-raw(ANY)" #GESTrack:caps, and +"audio/x-raw" #GESTrack:restriction-caps with the properties: + +- format: "S32LE" +- channels: 2 +- rate: 44100 +- layout: "interleaved" + +You should use ges_track_update_restriction_caps() if you wish to +modify these fields, or add additional ones. + + + The newly created audio track. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates a new #GESAudioTransition. + This should never be called by applications as this will +be created by clips. + + + The newly created #GESAudioTransition. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ### Children Properties + + {{ libs/GESVideoUriSource-children-props.md }} + + + + + The location of the file/resource to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESBaseEffect is some operation that applies an effect to the data +it receives. + +## Time Effects + +Some operations will change the timing of the stream data they receive +in some way. In particular, the #GstElement that they wrap could alter +the times of the segment they receive in a #GST_EVENT_SEGMENT event, +or the times of a seek they receive in a #GST_EVENT_SEEK event. Such +operations would be considered time effects since they translate the +times they receive on their source to different times at their sink, +and vis versa. This introduces two sets of time coordinates for the +event: (internal) sink coordinates and (internal) source coordinates, +where segment times are translated from the sink coordinates to the +source coordinates, and seek times are translated from the source +coordinates to the sink coordinates. + +If you use such an effect in GES, you will need to inform GES of the +properties that control the timing with +ges_base_effect_register_time_property(), and the effect's timing +behaviour using ges_base_effect_set_time_translation_funcs(). + +Note that a time effect should not have its +#GESTrackElement:has-internal-source set to %TRUE. + +In addition, note that GES only *fully* supports time effects whose +mapping from the source to sink coordinates (those applied to seeks) +obeys: + ++ Maps the time `0` to `0`. So initial time-shifting effects are + excluded. ++ Is monotonically increasing. So reversing effects, and effects that + jump backwards in the stream are excluded. ++ Can handle a reasonable #GstClockTime, relative to the project. So + this would exclude a time effect with an extremely large speed-up + that would cause the converted #GstClockTime seeks to overflow. ++ Is 'continuously reversible'. This essentially means that for every + time in the sink coordinates, we can, to 'good enough' accuracy, + calculate the corresponding time in the source coordinates. Moreover, + this should correspond to how segment times are translated from + sink to source. ++ Only depends on the registered time properties, rather than the + state of the #GstElement or the data it receives. This would exclude, + say, an effect that would speedup if there is more red in the image + it receives. + +Note that a constant-rate-change effect that is not extremely fast or +slow would satisfy these conditions. For such effects, you may wish to +use ges_effect_class_register_rate_property(). + + + + + Get whether the effect is considered a time effect or not. An effect +with registered time properties or set translation functions is +considered a time effect. + + + %TRUE if @effect is considered a time effect. + + + + + A #GESBaseEffect + + + + + + Register a child property of the effect as a property that, when set, +can change the timing of its input data. The child property should be +specified as in ges_timeline_element_lookup_child(). + +You should also set the corresponding time translation using +ges_base_effect_set_time_translation_funcs(). + +Note that @effect must not be part of a clip, nor can it have +#GESTrackElement:has-internal-source set to %TRUE. + + + %TRUE if the child property was found and newly registered. + + + + + A #GESBaseEffect + + + + The name of the child property to register as +a time property + + + + + + Set the time translation query functions for the time effect. If an +effect is a time effect, it will have two sets of coordinates: one +at its sink and one at its source. The given functions should be able +to translate between these two sets of coordinates. More specifically, +@source_to_sink_func should *emulate* how the corresponding #GstElement +would translate the #GstSegment @time field, and @sink_to_source_func +should emulate how the corresponding #GstElement would translate the +seek query @start and @stop values, as used in gst_element_seek(). As +such, @sink_to_source_func should act as an approximate reverse of +@source_to_sink_func. + +Note, these functions will be passed a table of time properties, as +registered in ges_base_effect_register_time_property(), and their +values. The functions should emulate what the translation *would* be +*if* the time properties were set to the given values. They should not +use the currently set values. + +Note that @effect must not be part of a clip, nor can it have +#GESTrackElement:has-internal-source set to %TRUE. + + + %TRUE if the translation functions were set. + + + + + A #GESBaseEffect + + + + The function to use +for querying how a time is translated from the source coordinates to +the sink coordinates of @effect + + + + The function to use +for querying how a time is translated from the sink coordinates to the +source coordinates of @effect + + + + Data to pass to both @source_to_sink_func and +@sink_to_source_func + + + + Method to call to destroy +@user_data, or %NULL + + + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + #GESBaseEffectClip-s are clips whose core elements are +#GESBaseEffect-s. + +## Effects + +#GESBaseEffectClip-s can have **additional** #GESBaseEffect-s added as +non-core elements. These additional effects are applied to the output +of the core effects of the clip that they share a #GESTrack with. See +#GESClip for how to add and move these effects from the clip. + +Note that you cannot add time effects to #GESBaseEffectClip, neither +as core children, nor as additional effects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A function for querying how an effect would translate a time if it had +the given child property values set. The keys for @time_properties will +be the same string that was passed to +ges_base_effect_register_time_property(), the values will be #GValue* +values of the corresponding child properties. You should always use the +values given in @time_properties before using the currently set values. + + + The translated time. + + + + + The #GESBaseEffect that is doing the time translation + + + + The #GstClockTime to translation + + + + A table of child +property name/value pairs + + + + + + + Data passed to ges_base_effect_set_time_translation_funcs() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Whether the class allows for the user to add additional non-core +#GESBaseEffect-s to clips from this class. + + + + A #GESClipClass + + + + + The #GList containing the children of @obj. + + + + a #GESContainer + + + + + The #GESContainer:height of @obj. + + + + a #GESContainer + + + + + To be used by subclasses only. This indicate how to handle a change in +a child. + + + + + + + + + + + + + + #GESClip-s are the core objects of a #GESLayer. Each clip may exist in +a single layer but may control several #GESTrackElement-s that span +several #GESTrack-s. A clip will ensure that all its children share the +same #GESTimelineElement:start and #GESTimelineElement:duration in +their tracks, which will match the #GESTimelineElement:start and +#GESTimelineElement:duration of the clip itself. Therefore, changing +the timing of the clip will change the timing of the children, and a +change in the timing of a child will change the timing of the clip and +subsequently all its siblings. As such, a clip can be treated as a +singular object in its layer. + +For most uses of a #GESTimeline, it is often sufficient to only +interact with #GESClip-s directly, which will take care of creating and +organising the elements of the timeline's tracks. + +## Core Children + +In more detail, clips will usually have some *core* #GESTrackElement +children, which are created by the clip when it is added to a layer in +a timeline. The type and form of these core children will depend on the +clip's subclass. You can use ges_track_element_is_core() to determine +whether a track element is considered such a core track element. Note, +if a core track element is part of a clip, it will always be treated as +a core *child* of the clip. You can connect to the +#GESContainer::child-added signal to be notified of their creation. + +When a child is added to a clip, the timeline will select its tracks +using #GESTimeline::select-tracks-for-object. Note that it may be the +case that the child will still have no set #GESTrackElement:track +after this process. For example, if the timeline does not have a track +of the corresponding #GESTrack:track-type. A clip can safely contain +such children, which may have their track set later, although they will +play no functioning role in the timeline in the meantime. + +If a clip may create track elements with various +#GESTrackElement:track-type(s), such as a #GESUriClip, but you only +want it to create a subset of these types, you should set the +#GESClip:supported-formats of the clip to the subset of types. This +should be done *before* adding the clip to a layer. + +If a clip will produce several core elements of the same +#GESTrackElement:track-type, you should connect to the timeline's +#GESTimeline::select-tracks-for-object signal to coordinate which +tracks each element should land in. Note, no two core children within a +clip can share the same #GESTrack, so you should not select the same +track for two separate core children. Provided you stick to this rule, +it is still safe to select several tracks for the same core child, the +core child will be copied into the additional tracks. You can manually +add the child to more tracks later using ges_clip_add_child_to_track(). +If you do not wish to use a core child, you can always select no track. + +The #GESTimelineElement:in-point of the clip will control the +#GESTimelineElement:in-point of its core children to be the same +value if their #GESTrackElement:has-internal-source is set to %TRUE. + +The #GESTimelineElement:max-duration of the clip is the minimum +#GESTimelineElement:max-duration of its core children. If you set its +value to anything other than its current value, this will also set the +#GESTimelineElement:max-duration of all its core children to the same +value if their #GESTrackElement:has-internal-source is set to %TRUE. +As a special case, whilst a clip does not yet have any core children, +its #GESTimelineElement:max-duration may be set to indicate what its +value will be once they are created. + +## Effects + +Some subclasses (#GESSourceClip and #GESBaseEffectClip) may also allow +their objects to have additional non-core #GESBaseEffect-s elements as +children. These are additional effects that are applied to the output +data of the core elements. They can be added to the clip using +ges_clip_add_top_effect(), which will take care of adding the effect to +the timeline's tracks. The new effect will be placed between the clip's +core track elements and its other effects. As such, the newly added +effect will be applied to any source data **before** the other existing +effects. You can change the ordering of effects using +ges_clip_set_top_effect_index(). + +Tracks are selected for top effects in the same way as core children. +If you add a top effect to a clip before it is part of a timeline, and +later add the clip to a timeline, the track selection for the top +effects will occur just after the track selection for the core +children. If you add a top effect to a clip that is already part of a +timeline, the track selection will occur immediately. Since a top +effect must be applied on top of a core child, if you use +#GESTimeline::select-tracks-for-object, you should ensure that the +added effects are destined for a #GESTrack that already contains a core +child. + +In addition, if the core child in the track is not +#GESTrackElement:active, then neither can any of its effects be +#GESTrackElement:active. Therefore, if a core child is made in-active, +all of the additional effects in the same track will also become +in-active. Similarly, if an effect is set to be active, then the core +child will also become active, but other effects will be left alone. +Finally, if an active effect is added to the track of an in-active core +child, it will become in-active as well. Note, in contrast, setting a +core child to be active, or an effect to be in-active will *not* change +the other children in the same track. + +### Time Effects + +Some effects also change the timing of their data (see #GESBaseEffect +for what counts as a time effect). Note that a #GESBaseEffectClip will +refuse time effects, but a #GESSource will allow them. + +When added to a clip, time effects may adjust the timing of other +children in the same track. Similarly, when changing the order of +effects, making them (in)-active, setting their time property values +or removing time effects. These can cause the #GESClip:duration-limit +to change in value. However, if such an operation would ever cause the +#GESTimelineElement:duration to shrink such that a clip's #GESSource is +totally overlapped in the timeline, the operation would be prevented. +Note that the same can happen when adding non-time effects with a +finite #GESTimelineElement:max-duration. + +Therefore, when working with time effects, you should -- more so than +usual -- not assume that setting the properties of the clip's children +will succeed. In particular, you should use +ges_timeline_element_set_child_property_full() when setting the time +properties. + +If you wish to preserve the *internal* duration of a source in a clip +during these time effect operations, you can do something like the +following. + +```c +void +do_time_effect_change (GESClip * clip) +{ + GList *tmp, *children; + GESTrackElement *source; + GstClockTime source_outpoint; + GstClockTime new_end; + GError *error = NULL; + + // choose some active source in a track to preserve the internal + // duration of + source = ges_clip_get_track_element (clip, NULL, GES_TYPE_SOURCE); + + // note its current internal end time + source_outpoint = ges_clip_get_internal_time_from_timeline_time ( + clip, source, GES_TIMELINE_ELEMENT_END (clip), NULL); + + // handle invalid out-point + + // stop the children's control sources from clamping when their + // out-point changes with a change in the time effects + children = ges_container_get_children (GES_CONTAINER (clip), FALSE); + + for (tmp = children; tmp; tmp = tmp->next) + ges_track_element_set_auto_clamp_control_source (tmp->data, FALSE); + + // add time effect, or set their children properties, or move them around + ... + // user can make sure that if a time effect changes one source, we should + // also change the time effect for another source. E.g. if + // "GstVideorate::rate" is set to 2.0, we also set "GstPitch::rate" to + // 2.0 + + // Note the duration of the clip may have already changed if the + // duration-limit of the clip dropped below its current value + + new_end = ges_clip_get_timeline_time_from_internal_time ( + clip, source, source_outpoint, &error); + // handle error + + if (!ges_timeline_elemnet_edit_full (GES_TIMELINE_ELEMENT (clip), + -1, GES_EDIT_MODE_TRIM, GES_EDGE_END, new_end, &error)) + // handle error + + for (tmp = children; tmp; tmp = tmp->next) + ges_track_element_set_auto_clamp_control_source (tmp->data, TRUE); + + g_list_free_full (children, gst_object_unref); + gst_object_unref (source); +} +``` + + + + + + + The #GESTrackElement created +by @clip, or %NULL if @clip can not provide a track element for the +given @type or an error occurred. + + + + + A #GESClip + + + + A #GESTrackType to create a #GESTrackElement for + + + + + + + + A list of +the #GESTrackElement-s created by @clip for the given @type, or %NULL +if no track elements are created or an error occurred. + + + + + + + A #GESClip + + + + A #GESTrackType to create #GESTrackElement-s for + + + + + + Extracts a #GESTrackElement from an asset and adds it to the clip. +This can be used to add effects that derive from the asset to the +clip, but this method is not intended to be used to create the core +elements of the clip. + + + The newly created element, or +%NULL if an error occurred. + + + + + A #GESClip + + + + An asset with #GES_TYPE_TRACK_ELEMENT as its +#GESAsset:extractable-type + + + + + + Adds the track element child of the clip to a specific track. + +If the given child is already in another track, this will create a copy +of the child, add it to the clip, and add this copy to the track. + +You should only call this whilst a clip is part of a #GESTimeline, and +for tracks that are in the same timeline. + +This method is an alternative to using the +#GESTimeline::select-tracks-for-object signal, but can be used to +complement it when, say, you wish to copy a clip's children from one +track into a new one. + +When the child is a core child, it must be added to a track that does +not already contain another core child of the same clip. If it is not a +core child (an additional effect), then it must be added to a track +that already contains one of the core children of the same clip. + +This method can also fail if the adding the track element to the track +would break a configuration rule of the corresponding #GESTimeline, +such as causing three sources to overlap at a single time, or causing +a source to completely overlap another in the same track. + + + The element that was added to @track, either +@child or a copy of child, or %NULL if the element could not be added. + + + + + A #GESClip + + + + A child of @clip + + + + The track to add @child to + + + + + + Add a top effect to a clip at the given index. + +Unlike using ges_container_add(), this allows you to set the index +in advance. It will also check that no error occurred during the track +selection for the effect. + +Note, only subclasses of #GESClipClass that have +#GES_CLIP_CLASS_CAN_ADD_EFFECTS set to %TRUE (such as #GESSourceClip +and #GESBaseEffectClip) can have additional top effects added. + +Note, if the effect is a time effect, this may be refused if the clip +would not be able to adapt itself once the effect is added. + + + %TRUE if @effect was successfully added to @clip at @index. + + + + + A #GESClip + + + + A top effect to add + + + + The index to add @effect at, or -1 to add at the highest + + + + + + Finds an element controlled by the clip. If @track is given, +then only the track elements in @track are searched for. If @type is +given, then this function searches for a track element of the given +@type. + +Note, if multiple track elements in the clip match the given criteria, +this will return the element amongst them with the highest +#GESTimelineElement:priority (numerically, the smallest). See +ges_clip_find_track_elements() if you wish to find all such elements. + + + The element controlled by +@clip, in @track, and of the given @type, or %NULL if no such element +could be found. + + + + + A #GESClip + + + + The track to search in, or %NULL to search in +all tracks + + + + The type of track element to search for, or `G_TYPE_NONE` to +match any type + + + + + + Finds the #GESTrackElement-s controlled by the clip that match the +given criteria. If @track is given as %NULL and @track_type is given as +#GES_TRACK_TYPE_UNKNOWN, then the search will match all elements in any +track, including those with no track, and of any +#GESTrackElement:track-type. Otherwise, if @track is not %NULL, but +@track_type is #GES_TRACK_TYPE_UNKNOWN, then only the track elements in +@track are searched for. Otherwise, if @track_type is not +#GES_TRACK_TYPE_UNKNOWN, but @track is %NULL, then only the track +elements whose #GESTrackElement:track-type matches @track_type are +searched for. Otherwise, when both are given, the track elements that +match **either** criteria are searched for. Therefore, if you wish to +only find elements in a specific track, you should give the track as +@track, but you should not give the track's #GESTrack:track-type as +@track_type because this would also select elements from other tracks +of the same type. + +You may also give @type to _further_ restrict the search to track +elements of the given @type. + + + A list of all +the #GESTrackElement-s controlled by @clip, in @track or of the given +@track_type, and of the given @type. + + + + + + + A #GESClip + + + + The track to search in, or %NULL to search in +all tracks + + + + The track-type of the track element to search for, or +#GES_TRACK_TYPE_UNKNOWN to match any track type + + + + The type of track element to search for, or %G_TYPE_NONE to +match any type + + + + + + Gets the #GESClip:duration-limit of the clip. + + + The duration-limit of @clip. + + + + + A #GESClip + + + + + + Convert the timeline time to an internal source time of the child. +This will take any time effects placed on the clip into account (see +#GESBaseEffect for what time effects are supported, and how to +declare them in GES). + +When @timeline_time is above the #GESTimelineElement:start of @clip, +this will return the internal time at which the content that appears at +@timeline_time in the output of the timeline is created in @child. For +example, if @timeline_time corresponds to the current seek position, +this would let you know which part of a media file is being read. + +This will be done assuming the clip has an indefinite end, so the +internal time may be beyond the current out-point of the child, or even +its #GESTimelineElement:max-duration. + +If, instead, @timeline_time is below the current +#GESTimelineElement:start of @clip, this will return what you would +need to set the #GESTimelineElement:in-point of @child to if you set +the #GESTimelineElement:start of @clip to @timeline_time and wanted +to keep the content of @child currently found at the current +#GESTimelineElement:start of @clip at the same timeline position. If +this would be negative, the conversion fails. This is useful for +determining what #GESTimelineElement:in-point would result from a +#GES_EDIT_MODE_TRIM to @timeline_time. + +Note that whilst a clip has no time effects, this second return is +equivalent to finding the internal time at which the content that +appears at @timeline_time in the timeline can be found in @child if it +had indefinite extent in both directions. However, with non-linear time +effects this second return will be more distinct. + +In either case, the returned time would be appropriate to use for the +#GESTimelineElement:in-point or #GESTimelineElement:max-duration of the +child. + +See ges_clip_get_timeline_time_from_internal_time(), which performs the +reverse. + + + The time in the internal coordinates of @child corresponding +to @timeline_time, or #GST_CLOCK_TIME_NONE if the conversion could not +be performed. + + + + + A #GESClip + + + + An #GESTrackElement:active child of @clip with a +#GESTrackElement:track + + + + A time in the timeline time coordinates + + + + + + Gets the #GESClip:layer of the clip. + + + The layer @clip is in, or %NULL if +@clip is not in any layer. + + + + + A #GESClip + + + + + + Gets the #GESClip:supported-formats of the clip. + + + The #GESTrackType-s supported by @clip. + + + + + A #GESClip + + + + + + Convert the internal source time from the child to a timeline time. +This will take any time effects placed on the clip into account (see +#GESBaseEffect for what time effects are supported, and how to +declare them in GES). + +When @internal_time is above the #GESTimelineElement:in-point of +@child, this will return the timeline time at which the internal +content found at @internal_time appears in the output of the timeline's +track. For example, this would let you know where in the timeline a +particular scene in a media file would appear. + +This will be done assuming the clip has an indefinite end, so the +timeline time may be beyond the end of the clip, or even breaking its +#GESClip:duration-limit. + +If, instead, @internal_time is below the current +#GESTimelineElement:in-point of @child, this will return what you would +need to set the #GESTimelineElement:start of @clip to if you set the +#GESTimelineElement:in-point of @child to @internal_time and wanted to +keep the content of @child currently found at the current +#GESTimelineElement:start of @clip at the same timeline position. If +this would be negative, the conversion fails. This is useful for +determining what position to use in a #GES_EDIT_MODE_TRIM if you wish +to trim to a specific point in the internal content, such as a +particular scene in a media file. + +Note that whilst a clip has no time effects, this second return is +equivalent to finding the timeline time at which the content of @child +at @internal_time would be found in the timeline if it had indefinite +extent in both directions. However, with non-linear time effects this +second return will be more distinct. + +In either case, the returned time would be appropriate to use in +ges_timeline_element_edit() for #GES_EDIT_MODE_TRIM, and similar, if +you wish to use a particular internal point as a reference. For +example, you could choose to end a clip at a certain internal +'out-point', similar to the #GESTimelineElement:in-point, by +translating the desired end time into the timeline coordinates, and +using this position to trim the end of a clip. + +See ges_clip_get_internal_time_from_timeline_time(), which performs the +reverse, or ges_clip_get_timeline_time_from_source_frame() which does +the same conversion, but using frame numbers. + + + The time in the timeline coordinates corresponding to +@internal_time, or #GST_CLOCK_TIME_NONE if the conversion could not be +performed. + + + + + A #GESClip + + + + An #GESTrackElement:active child of @clip with a +#GESTrackElement:track + + + + A time in the internal time coordinates of @child + + + + + + Convert the source frame number to a timeline time. This acts the same +as ges_clip_get_timeline_time_from_internal_time() using the core +children of the clip and using the frame number to specify the internal +position, rather than a timestamp. + +The returned timeline time can be used to seek or edit to a specific +frame. + +Note that you can get the frame timestamp of a particular clip asset +with ges_clip_asset_get_frame_time(). + + + The timestamp corresponding to @frame_number in the core +children of @clip, in the timeline coordinates, or #GST_CLOCK_TIME_NONE +if the conversion could not be performed. + + + + + A #GESClip + + + + The frame number to get the corresponding timestamp of +in the timeline coordinates + + + + + + Gets the internal index of an effect in the clip. The index of effects +in a clip will run from 0 to n-1, where n is the total number of +effects. If two effects share the same #GESTrackElement:track, the +effect with the numerically lower index will be applied to the source +data **after** the other effect, i.e. output data will always flow from +a higher index effect to a lower index effect. + + + The index of @effect in @clip, or -1 if something went wrong. + + + + + A #GESClip + + + + The effect we want to get the index of + + + + + + + + + + + + + + + + + + + + Gets the #GESBaseEffect-s that have been added to the clip. The +returned list is ordered by their internal index in the clip. See +ges_clip_get_top_effect_index(). + + + A list of all +#GESBaseEffect-s that have been added to @clip. + + + + + + + A #GESClip + + + + + + See ges_clip_move_to_layer_full(), which also gives an error. + + + %TRUE if @clip was successfully moved to @layer. + + + + + A #GESClip + + + + The new layer + + + + + + Moves a clip to a new layer. If the clip already exists in a layer, it +is first removed from its current layer before being added to the new +layer. + + + %TRUE if @clip was successfully moved to @layer. + + + + + A #GESClip + + + + The new layer + + + + + + Remove a top effect from the clip. + +Note, if the effect is a time effect, this may be refused if the clip +would not be able to adapt itself once the effect is removed. + + + %TRUE if @effect was successfully added to @clip at @index. + + + + + A #GESClip + + + + The top effect to remove + + + + + + Sets the #GESClip:supported-formats of the clip. This should normally +only be called by subclasses, which should be responsible for updating +its value, rather than the user. + + + + + + + A #GESClip + + + + The #GESTrackType-s supported by @clip + + + + + + See ges_clip_set_top_effect_index_full(), which also gives an error. + + + %TRUE if @effect was successfully moved to @newindex. + + + + + A #GESClip + + + + An effect within @clip to move + + + + The index for @effect in @clip + + + + + + Set the index of an effect within the clip. See +ges_clip_get_top_effect_index(). The new index must be an existing +index of the clip. The effect is moved to the new index, and the other +effects may be shifted in index accordingly to otherwise maintain the +ordering. + + + %TRUE if @effect was successfully moved to @newindex. + + + + + A #GESClip + + + + An effect within @clip to move + + + + The index for @effect in @clip + + + + + + + + + + + + + + + + + + + + + + + See ges_clip_split_full(), which also gives an error. + + + The newly created clip resulting +from the splitting @clip, or %NULL if @clip can't be split. + + + + + The #GESClip to split + + + + The timeline position at which to perform the split + + + + + + Splits a clip at the given timeline position into two clips. The clip +must already have a #GESClip:layer. + +The original clip's #GESTimelineElement:duration is reduced such that +its end point matches the split position. Then a new clip is created in +the same layer, whose #GESTimelineElement:start matches the split +position and #GESTimelineElement:duration will be set such that its end +point matches the old end point of the original clip. Thus, the two +clips together will occupy the same positions in the timeline as the +original clip did. + +The children of the new clip will be new copies of the original clip's +children, so it will share the same sources and use the same +operations. + +The new clip will also have its #GESTimelineElement:in-point set so +that any internal data will appear in the timeline at the same time. +Thus, when the timeline is played, the playback of data should +appear the same. This may be complicated by any additional +#GESEffect-s that have been placed on the original clip that depend on +the playback time or change the data consumption rate of sources. This +method will attempt to translate these effects such that the playback +appears the same. In such complex situations, you may get a better +result if you place the clip in a separate sub #GESProject, which only +contains this clip (and its effects), and in the original layer +create two neighbouring #GESUriClip-s that reference this sub-project, +but at a different #GESTimelineElement:in-point. + + + The newly created clip resulting +from the splitting @clip, or %NULL if @clip can't be split. + + + + + The #GESClip to split + + + + The timeline position at which to perform the split, between +the start and end of the clip + + + + + + The maximum #GESTimelineElement:duration that can be *currently* set +for the clip, taking into account the #GESTimelineElement:in-point, +#GESTimelineElement:max-duration, #GESTrackElement:active, and +#GESTrackElement:track properties of its children, as well as any +time effects. If there is no limit, this will be set to +#GST_CLOCK_TIME_NONE. + +Note that whilst a clip has no children in any tracks, the limit will +be unknown, and similarly set to #GST_CLOCK_TIME_NONE. + +If the duration-limit would ever go below the current +#GESTimelineElement:duration of the clip due to a change in the above +variables, its #GESTimelineElement:duration will be set to the new +limit. + + + + The layer this clip lies in. + +If you want to connect to this property's #GObject::notify signal, +you should connect to it with g_signal_connect_after() since the +signal emission may be stopped internally. + + + + The #GESTrackType-s that the clip supports, which it can create +#GESTrackElement-s for. Note that this can be a combination of +#GESTrackType flags to indicate support for several +#GESTrackElement:track-type elements. + + + + + + + + + + + + + + + + The #GESUriClipAsset is a special #GESAsset specilized in #GESClip. +it is mostly used to get information about the #GESTrackType-s the objects extracted +from it can potentialy create #GESTrackElement for. + + + + + + Result: %TRUE if @self has a natural framerate %FALSE otherwise + + + + + + + The object from which to retrieve the natural framerate + + + + The framerate numerator + + + + The framerate denominator + + + + + + Converts the given frame number into a timestamp, using the "natural" frame +rate of the asset. + +You can use this to reference a specific frame in a media file and use this +as, for example, the `in-point` or `max-duration` of a #GESClip. + + + The timestamp corresponding to @frame_number in the element source, given +in internal time coordinates, or #GST_CLOCK_TIME_NONE if the clip asset does not have a +natural frame rate. + + + + + The object for which to compute timestamp for specifed frame + + + + The frame number we want the internal time coordinate timestamp of + + + + + + Result: %TRUE if @self has a natural framerate %FALSE otherwise + + + + + + + The object from which to retrieve the natural framerate + + + + The framerate numerator + + + + The framerate denominator + + + + + + Gets track types for which objects extracted from @self can create #GESTrackElement + + + The track types on which @self will create TrackElement when added to +a layer + + + + + a #GESClipAsset + + + + + + Sets track types for which objects extracted from @self can create #GESTrackElement + + + + + + + a #GESClipAsset + + + + The track types supported by the GESClipAsset + + + + + + The formats supported by the asset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + The object from which to retrieve the natural framerate + + + + The framerate numerator + + + + The framerate denominator + + + + + + + + + + + + + + + + + + + + + Method to create the core #GESTrackElement of +a clip of this class. If a clip of this class may create several track +elements per track type, this should be left as %NULL, and +create_track_elements() should be used instead. Otherwise, you should +implement this class method and leave create_track_elements() as the +default implementation + + + + Method to create the (multiple) core +#GESTrackElement-s of a clip of this class. If create_track_element() +is implemented, this should be kept as the default implementation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESContainer is a timeline element that controls other +#GESTimelineElement-s, which are its children. In particular, it is +responsible for maintaining the relative #GESTimelineElement:start and +#GESTimelineElement:duration times of its children. Therefore, if a +container is temporally adjusted or moved to a new layer, it may +accordingly adjust and move its children. Similarly, a change in one of +its children may prompt the parent to correspondingly change its +siblings. + + + + + Groups the containers into a single container by merging them. The +containers must all belong to the same #GESTimelineElement:timeline. + +If the elements are all #GESClip-s then this method will attempt to +combine them all into a single #GESClip. This should succeed if they: +share the same #GESTimelineElement:start, #GESTimelineElement:duration +and #GESTimelineElement:in-point; exist in the same layer; and all of +the sources share the same #GESAsset. If this fails, or one of the +elements is not a #GESClip, this method will try to create a #GESGroup +instead. + + + The container created by merging +@containers, or %NULL if they could not be merged into a single +container. + + + + + +The #GESContainer-s to group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Edits the container within its timeline. + use #ges_timeline_element_edit instead. + + + %TRUE if the edit of @container completed, %FALSE on failure. + + + + + The #GESContainer to edit + + + + A whitelist of layers +where the edit can be performed, %NULL allows all layers in the +timeline + + + + + + The priority/index of the layer @container should +be moved to. -1 means no move + + + + The edit mode + + + + The edge of @container where the edit should occur + + + + The edit position: a new location for the edge of @container +(in nanoseconds) + + + + + + + + + + + + + + + + + + + + Ungroups the container by splitting it into several containers +containing various children of the original. The rules for how the +container splits depends on the subclass. A #GESGroup will simply split +into its children. A #GESClip will split into one #GESClip per +#GESTrackType it overlaps with (so an audio-video clip will split into +an audio clip and a video clip), where each clip contains all the +#GESTrackElement-s from the original clip with a matching +#GESTrackElement:track-type. + +If @recursive is %TRUE, and the container contains other containers as +children, then they will also be ungrouped, and so on. + + + The list of +new #GESContainer-s created from the splitting of @container. + + + + + + + The container to ungroup + + + + Whether to recursively ungroup @container + + + + + + Adds a timeline element to the container. The element will now be a +child of the container (and the container will be the +#GESTimelineElement:parent of the added element), which means that it +is now controlled by the container. This may change the properties of +the child or the container, depending on the subclass. + +Additionally, the children properties of the newly added element will +be shared with the container, meaning they can also be read and set +using ges_timeline_element_get_child_property() and +ges_timeline_element_set_child_property() on the container. + + + %TRUE if @child was successfully added to @container. + + + + + A #GESContainer + + + + The element to add as a child + + + + + + Edits the container within its timeline. + use #ges_timeline_element_edit instead. + + + %TRUE if the edit of @container completed, %FALSE on failure. + + + + + The #GESContainer to edit + + + + A whitelist of layers +where the edit can be performed, %NULL allows all layers in the +timeline + + + + + + The priority/index of the layer @container should +be moved to. -1 means no move + + + + The edit mode + + + + The edge of @container where the edit should occur + + + + The edit position: a new location for the edge of @container +(in nanoseconds) + + + + + + Get the list of timeline elements contained in the container. If +@recursive is %TRUE, and the container contains other containers as +children, then their children will be added to the list, in addition to +themselves, and so on. + + + The list of +#GESTimelineElement-s contained in @container. + + + + + + + A #GESContainer + + + + Whether to recursively get children in @container + + + + + + Removes a timeline element from the container. The element will no +longer be controlled by the container. + + + %TRUE if @child was successfully removed from @container. + + + + + A #GESContainer + + + + The child to remove + + + + + + Ungroups the container by splitting it into several containers +containing various children of the original. The rules for how the +container splits depends on the subclass. A #GESGroup will simply split +into its children. A #GESClip will split into one #GESClip per +#GESTrackType it overlaps with (so an audio-video clip will split into +an audio clip and a video clip), where each clip contains all the +#GESTrackElement-s from the original clip with a matching +#GESTrackElement:track-type. + +If @recursive is %TRUE, and the container contains other containers as +children, then they will also be ungrouped, and so on. + + + The list of +new #GESContainer-s created from the splitting of @container. + + + + + + + The container to ungroup + + + + Whether to recursively ungroup @container + + + + + + The span of the container's children's #GESTimelineElement:priority +values, which is the number of integers that lie between (inclusive) +the minimum and maximum priorities found amongst the container's +children (maximum - minimum + 1). + + + + + + + The list of +#GESTimelineElement-s controlled by this Container + + + + + + The #GESContainer:height of @obj + + + + + + + + + + + + + + + + + + Will be emitted after a child is added to the container. Usually, +you should connect with g_signal_connect_after() since the signal +may be stopped internally. + + + + + + The child that was added + + + + + + Will be emitted after a child is removed from the container. + + + + + + The child that was removed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The list of +new #GESContainer-s created from the splitting of @container. + + + + + + + The container to ungroup + + + + Whether to recursively ungroup @container + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the edit of @container completed, %FALSE on failure. + + + + + The #GESContainer to edit + + + + A whitelist of layers +where the edit can be performed, %NULL allows all layers in the +timeline + + + + + + The priority/index of the layer @container should +be moved to. -1 means no move + + + + The edit mode + + + + The edge of @container where the edit should occur + + + + The edit position: a new location for the edge of @container +(in nanoseconds) + + + + + + + + + + + + + + + + + + + A function that creates a #GstElement that can be used as a source to +fill the gaps of the track. A gap is a timeline region where the track +has no #GESTrackElement sources. + + + A source #GstElement to fill gaps in @track. + + + + + The #GESTrack + + + + + + A method for creating the core #GESTrackElement of a clip, to be added +to a #GESTrack of the given track type. + +If a clip may produce several track elements per track type, +#GESCreateTrackElementsFunc is more appropriate. + + + The #GESTrackElement created +by @clip, or %NULL if @clip can not provide a track element for the +given @type or an error occurred. + + + + + A #GESClip + + + + A #GESTrackType to create a #GESTrackElement for + + + + + + A method for creating the core #GESTrackElement-s of a clip, to be +added to #GESTrack-s of the given track type. + + + A list of +the #GESTrackElement-s created by @clip for the given @type, or %NULL +if no track elements are created or an error occurred. + + + + + + + A #GESClip + + + + A #GESTrackType to create #GESTrackElement-s for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The edges of an object contain in a #GESTimeline or #GESTrack + + Represents the start of an object. + + + Represents the start of an object. + + + Represents the end of an object. + + + Represents the end of an object. + + + Represent the fact we are not working with any edge of an + object. + + + Represent the fact we are not working with any edge of an + object. + + + + + + + + + + + + + + + When a single timeline element is edited within its timeline at some +position, using ges_timeline_element_edit(), depending on the edit +mode, its #GESTimelineElement:start, #GESTimelineElement:duration or +#GESTimelineElement:in-point will be adjusted accordingly. In addition, +any clips may change #GESClip:layer. + +Each edit can be broken down into a combination of three basic edits: + ++ MOVE: This moves the start of the element to the edit position. ++ START-TRIM: This cuts or grows the start of the element, whilst + maintaining the time at which its internal content appears in the + timeline data output. If the element is made shorter, the data that + appeared at the edit position will still appear in the timeline at + the same time. If the element is made longer, the data that appeared + at the previous start of the element will still appear in the + timeline at the same time. ++ END-TRIM: Similar to START-TRIM, but the end of the element is cut or + grown. + +In particular, when editing a #GESClip: + ++ MOVE: This will set the #GESTimelineElement:start of the clip to the + edit position. ++ START-TRIM: This will set the #GESTimelineElement:start of the clip + to the edit position. To keep the end time the same, the + #GESTimelineElement:duration of the clip will be adjusted in the + opposite direction. In addition, the #GESTimelineElement:in-point of + the clip will be shifted such that the content that appeared at the + new or previous start time, whichever is latest, still appears at the + same timeline time. For example, if a frame appeared at the start of + the clip, and the start of the clip is reduced, the in-point of the + clip will also reduce such that the frame will appear later within + the clip, but at the same timeline position. ++ END-TRIM: This will set the #GESTimelineElement:duration of the clip + such that its end time will match the edit position. + +When editing a #GESGroup: + ++ MOVE: This will set the #GESGroup:start of the clip to the edit + position by shifting all of its children by the same amount. So each + child will maintain their relative positions. ++ START-TRIM: If the group is made shorter, this will START-TRIM any + clips under the group that start after the edit position to the same + edit position. If the group is made longer, this will START-TRIM any + clip under the group whose start matches the start of the group to + the same edit position. ++ END-TRIM: If the group is made shorter, this will END-TRIM any clips + under the group that end after the edit position to the same edit + position. If the group is made longer, this will END-TRIM any clip + under the group whose end matches the end of the group to the same + edit position. + +When editing a #GESTrackElement, if it has a #GESClip parent, this +will be edited instead. Otherwise it is edited in the same way as a +#GESClip. + +The layer priority of a #GESGroup is the lowest layer priority of any +#GESClip underneath it. When a group is edited to a new layer +priority, it will shift all clips underneath it by the same amount, +such that their relative layers stay the same. + +If the #GESTimeline has a #GESTimeline:snapping-distance, then snapping +may occur for some of the edges of the **main** edited element: + ++ MOVE: The start or end edge of *any* #GESSource under the element may + be snapped. ++ START-TRIM: The start edge of a #GESSource whose start edge touches + the start edge of the element may snap. ++ END-TRIM: The end edge of a #GESSource whose end edge touches the end + edge of the element may snap. + +These edges may snap with either the start or end edge of *any* other +#GESSource in the timeline that is not also being moved by the element, +including those in different layers, if they are within the +#GESTimeline:snapping-distance. During an edit, only up to one snap can +occur. This will shift the edit position such that the snapped edges +will touch once the edit has completed. + +Note that snapping can cause an edit to fail where it would have +otherwise succeeded because it may push the edit position such that the +edit would result in an unsupported timeline configuration. Similarly, +snapping can cause an edit to succeed where it would have otherwise +failed. + +For example, in #GES_EDIT_MODE_RIPPLE acting on #GES_EDGE_NONE, the +main element is the MOVED toplevel of the edited element. Any source +under the main MOVED toplevel may have its start or end edge snapped. +Note, these sources cannot snap with each other. The edit may also +push other elements, but any sources under these elements cannot snap, +nor can they be snapped with. If a snap does occur, the MOVE of the +toplevel *and* all other elements pushed by the ripple will be shifted +by the same amount such that the snapped edges will touch. + +You can also find more explanation about the behaviour of those modes at: +[trim, ripple and roll](http://pitivi.org/manual/trimming.html) +and [clip management](http://pitivi.org/manual/usingclips.html). + + The element is edited the normal way (default). + If acting on the element as a whole (#GES_EDGE_NONE), this will MOVE + the element by MOVING its toplevel. When acting on the start of the + element (#GES_EDGE_START), this will only MOVE the element, but not + its toplevel parent. This can allow you to move a #GESClip or + #GESGroup to a new start time or layer within its container group, + without effecting other members of the group. When acting on the end + of the element (#GES_EDGE_END), this will END-TRIM the element, + leaving its toplevel unchanged. + + + The element is edited the normal way (default). + If acting on the element as a whole (#GES_EDGE_NONE), this will MOVE + the element by MOVING its toplevel. When acting on the start of the + element (#GES_EDGE_START), this will only MOVE the element, but not + its toplevel parent. This can allow you to move a #GESClip or + #GESGroup to a new start time or layer within its container group, + without effecting other members of the group. When acting on the end + of the element (#GES_EDGE_END), this will END-TRIM the element, + leaving its toplevel unchanged. + + + The element is edited in ripple mode: moving + itself as well as later elements, keeping their relative times. This + edits the element the same as #GES_EDIT_MODE_NORMAL. In addition, if + acting on the element as a whole, or the start of the element, any + toplevel element in the same timeline (including different layers) + whose start time is later than the *current* start time of the MOVED + element will also be MOVED by the same shift as the edited element. + If acting on the end of the element, any toplevel element whose start + time is later than the *current* end time of the edited element will + also be MOVED by the same shift as the change in the end of the + edited element. These additional elements will also be shifted by + the same shift in layers as the edited element. + + + The element is edited in ripple mode: moving + itself as well as later elements, keeping their relative times. This + edits the element the same as #GES_EDIT_MODE_NORMAL. In addition, if + acting on the element as a whole, or the start of the element, any + toplevel element in the same timeline (including different layers) + whose start time is later than the *current* start time of the MOVED + element will also be MOVED by the same shift as the edited element. + If acting on the end of the element, any toplevel element whose start + time is later than the *current* end time of the edited element will + also be MOVED by the same shift as the change in the end of the + edited element. These additional elements will also be shifted by + the same shift in layers as the edited element. + + + The element is edited in roll mode: swapping its + content for its neighbour's, or vis versa, in the timeline output. + This edits the element the same as #GES_EDIT_MODE_TRIM. In addition, + any neighbours are also TRIMMED at their opposite edge to the same + timeline position. When acting on the start of the element, a + neighbour is any earlier element in the timeline whose end time + matches the *current* start time of the edited element. When acting on + the end of the element, a neighbour is any later element in the + timeline whose start time matches the *current* start time of the + edited element. In addition, a neighbour have a #GESSource at its + end/start edge that shares a track with a #GESSource at the start/end + edge of the edited element. Basically, a neighbour is an element that + can be extended, or cut, to have its content replace, or be replaced + by, the content of the edited element. Acting on the element as a + whole (#GES_EDGE_NONE) is not defined. The element can not shift + layers under this mode. + + + The element is edited in roll mode: swapping its + content for its neighbour's, or vis versa, in the timeline output. + This edits the element the same as #GES_EDIT_MODE_TRIM. In addition, + any neighbours are also TRIMMED at their opposite edge to the same + timeline position. When acting on the start of the element, a + neighbour is any earlier element in the timeline whose end time + matches the *current* start time of the edited element. When acting on + the end of the element, a neighbour is any later element in the + timeline whose start time matches the *current* start time of the + edited element. In addition, a neighbour have a #GESSource at its + end/start edge that shares a track with a #GESSource at the start/end + edge of the edited element. Basically, a neighbour is an element that + can be extended, or cut, to have its content replace, or be replaced + by, the content of the edited element. Acting on the element as a + whole (#GES_EDGE_NONE) is not defined. The element can not shift + layers under this mode. + + + The element is edited in trim mode. When acting + on the start of the element, this will START-TRIM it. When acting on + the end of the element, this will END-TRIM it. Acting on the element + as a whole (#GES_EDGE_NONE) is not defined. + + + The element is edited in trim mode. When acting + on the start of the element, this will START-TRIM it. When acting on + the end of the element, this will END-TRIM it. Acting on the element + as a whole (#GES_EDGE_NONE) is not defined. + + + The element is edited in slide mode (not yet + implemented): moving the element replacing or consuming content on + each end. When acting on the element as a whole, this will MOVE the + element, and TRIM any neighbours on either side. A neighbour is + defined in the same way as in #GES_EDIT_MODE_ROLL, but they may be on + either side of the edited elements. Elements at the end with be + START-TRIMMED to the new end position of the edited element. Elements + at the start will be END-TRIMMED to the new start position of the + edited element. Acting on the start or end of the element + (#GES_EDGE_START and #GES_EDGE_END) is not defined. The element can + not shift layers under this mode. + + + The element is edited in slide mode (not yet + implemented): moving the element replacing or consuming content on + each end. When acting on the element as a whole, this will MOVE the + element, and TRIM any neighbours on either side. A neighbour is + defined in the same way as in #GES_EDIT_MODE_ROLL, but they may be on + either side of the edited elements. Elements at the end with be + START-TRIMMED to the new end position of the edited element. Elements + at the start will be END-TRIMMED to the new start position of the + edited element. Acting on the start or end of the element + (#GES_EDGE_START and #GES_EDGE_END) is not defined. The element can + not shift layers under this mode. + + + Return a string representation of @mode. + + + a string representation of @mode. + + + + + a #GESEditMode + + + + + + + Currently we only support effects with N sinkpads and one single srcpad. +Apart from `gesaudiomixer` and `gescompositor` which can be used as effects +and where sinkpads will be requested as needed based on the timeline topology +GES will always request at most one sinkpad per effect (when required). + +> Note: GES always adds converters (`audioconvert ! audioresample ! +> audioconvert` for audio effects and `videoconvert` for video effects) to +> make it simpler for end users. + + + + + Creates a new #GESEffect from the description of the bin. It should be +possible to determine the type of the effect through the element +'klass' metadata of the GstElements that will be created. +In that corner case, you should use: +#ges_asset_request (GES_TYPE_EFFECT, "audio your ! bin ! description", NULL); +and extract that asset to be in full control. + + + a newly created #GESEffect, or %NULL if something went +wrong. + + + + + The gst-launch like bin description of the effect + + + + + + The description of the effect bin with a gst-launch-style +pipeline description. + +Example: "videobalance saturation=1.5 hue=+0.5" + + + + + + + + + + + + + + + + This asset has a GStreamer bin-description as ID and is able to determine +to what track type the effect should be used in. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + + + + + Register an element that can change the rate at which media is playing. +The property type must be float or double, and must be a factor of the +rate, i.e. a value of 2.0 must mean that the media plays twice as fast. +Several properties may be registered for a single element type, +provided they all contribute to the rate as independent factors. For +example, this is true for the "GstPitch::rate" and "GstPitch::tempo" +properties. These are already registered by default in GES, along with +#videorate:rate for #videorate and #scaletempo:rate for #scaletempo. + +If such a rate property becomes a child property of a #GESEffect upon +its creation (the element is part of its #GESEffect:bin-description), +it will be automatically registered as a time property (see +ges_base_effect_register_time_property()) and will have its time +translation functions set (see +ges_base_effect_set_time_translation_funcs()) to use the overall rate +of the rate properties. Note that if an effect contains a rate +property as well as a non-rate time property, you should ensure to set +the time translation functions to some other methods using +ges_base_effect_set_time_translation_funcs(). + +Note, you can obtain a reference to the GESEffectClass using + +``` + GES_EFFECT_CLASS (g_type_class_ref (GES_TYPE_EFFECT)); +``` + + + %TRUE if the rate property was successfully registered. When +this method returns %FALSE, a warning is emitted with more information. + + + + + Instance of the GESEffectClass + + + + The #GstElementFactory name of the element that changes +the rate + + + + The name of the property that changes the rate + + + + + + + The effect will be applied on the sources that have lower priorities +(higher number) between the inpoint and the end of it. + +The asset ID of an effect clip is in the form: + +``` + "audio ! bin ! description || video ! bin ! description" +``` + + + + + Creates a new #GESEffectClip from the description of the bin. + + + a newly created #GESEffectClip, or +%NULL if something went wrong. + + + + + The gst-launch like bin description of the effect + + + + The gst-launch like bin description of the effect + + + + + + The description of the audio track of the effect bin with a gst-launch-style +pipeline description. This should be used for test purposes. + +Example: "audiopanorama panorama=1.0" + + + + The description of the video track of the effect bin with a gst-launch-style +pipeline description. This should be used for test purposes. + +Example: "videobalance saturation=1.5 hue=+0.5" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The ID passed is malformed + + + An error happened while loading the asset + + + The formatted files was malformed + + + The frame number is invalid + + + The operation would lead to a negative +#GES_TIMELINE_ELEMENT_LAYER_PRIORITY. (Since: 1.18) + + + The operation would lead to a negative time. +E.g. for the #GESTimelineElement:start #GESTimelineElement:duration or +#GESTimelineElement:in-point. (Since: 1.18) + + + Some #GESTimelineElement does +not have a large enough #GESTimelineElement:max-duration to cover the +desired operation. (Since: 1.18) + + + The operation would break one of +the overlap conditions for the #GESTimeline. (Since: 1.18) + + + + + + A #GObject that implements the #GESExtractable interface can be +extracted from a #GESAsset using ges_asset_extract(). + +Each extractable type will have its own way of interpreting the +#GESAsset:id of an asset (or, if it is associated with a specific +subclass of #GESAsset, the asset subclass may handle the +interpretation of the #GESAsset:id). By default, the requested asset +#GESAsset:id will be ignored by a #GESExtractable and will be set to +the type name of the extractable instead. Also by default, when the +requested asset is extracted, the returned object will simply be a +newly created default object of that extractable type. You should check +the documentation for each extractable type to see if they differ from +the default. + +After the object is extracted, it will have a reference to the asset it +came from, which you can retrieve using ges_extractable_get_asset(). + + + + Gets the #GESAsset:id of some associated asset. It may be the case +that the object has no set asset, or even that such an asset does not +yet exist in the GES cache. Instead, this will return the asset +#GESAsset:id that is _compatible_ with the current state of the object, +as determined by the #GESExtractable implementer. If it was indeed +extracted from an asset, this should return the same as its +corresponding asset #GESAsset:id. + + + The #GESAsset:id of some associated #GESAsset +that is compatible with @self's current state. + + + + + A #GESExtractable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the asset that has been set on the extractable object. + + + The asset set on @self, or %NULL +if no asset has been set. + + + + + A #GESExtractable + + + + + + Gets the #GESAsset:id of some associated asset. It may be the case +that the object has no set asset, or even that such an asset does not +yet exist in the GES cache. Instead, this will return the asset +#GESAsset:id that is _compatible_ with the current state of the object, +as determined by the #GESExtractable implementer. If it was indeed +extracted from an asset, this should return the same as its +corresponding asset #GESAsset:id. + + + The #GESAsset:id of some associated #GESAsset +that is compatible with @self's current state. + + + + + A #GESExtractable + + + + + + Sets the asset for this extractable object. + +When an object is extracted from an asset using ges_asset_extract() its +asset will be automatically set. Note that many classes that implement +#GESExtractable will automatically create their objects using assets +when you call their @new methods. However, you can use this method to +associate an object with a compatible asset if it was created by other +means and does not yet have an asset. Or, for some implementations of +#GESExtractable, you can use this to change the asset of the given +extractable object, which will lead to a change in its state to +match the new asset #GESAsset:id. + + + %TRUE if @asset could be successfully set on @self. + + + + + A #GESExtractable + + + + The asset to set + + + + + + + Method for checking that an ID is valid for the given #GESExtractable +type. If the given ID is considered valid, it can be adjusted into some +standard and returned to prevent the creation of separate #GESAsset-s, +with different #GESAsset:id, that would otherwise act the same. + +Returns (transfer full) (nullable): The actual #GESAsset:id to set on +any corresponding assets, based on @id, or %NULL if @id is not valid. + + + + + + + The #GESExtractable type to check @id for + + + + The ID to check + + + + + + + + + + + The subclass type of #GESAsset that should be created when +an asset with the corresponding #GESAsset:extractable-type is +requested. + + + + The method to call to check whether a given ID is valid as +an asset #GESAsset:id for the given #GESAsset:extractable-type. The +returned ID is the actual #GESAsset:id that is set on the asset. The +default implementation will simply always return the type name of the +#GESAsset:extractable-type, even if the received ID is %NULL. As such, +any given ID is considered valid (or is ignored), but only one is +actually ever set on an asset, which means the given +#GESAsset:extractable-type can only have one associated asset. + + + + Whether an object of this class can have its +#GESAsset change over its lifetime. This should be set to %TRUE if one +of the object's parameters that is associated with its ID can change +after construction, which would require an asset with a new ID. Note +that the subclass is required to handle the requesting and setting of +the new asset on the object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GESAsset:id of some associated #GESAsset +that is compatible with @self's current state. + + + + + A #GESExtractable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tests if a given GESFrameNumber represents a valid frame + + + + + + + + Constant to define an undefined frame number + + + + + A function that will be called when the nleobject of a corresponding +track element needs to be filled. + +The implementer of this function shall add the proper #GstElement to @nleobj +using gst_bin_add(). + This method type is no longer used. + + + %TRUE if the implementer successfully filled the @nleobj. + + + + + The #GESClip controlling the track elements + + + + The #GESTrackElement + + + + The nleobject that needs to be filled + + + + + + Base class for timeline data serialization and deserialization. + + + + Checks if there is a #GESFormatter available which can load a #GESTimeline +from the given URI. + + + TRUE if there is a #GESFormatter that can support the given uri +or FALSE if not. + + + + + a #gchar * pointing to the URI + + + + + + Returns TRUE if there is a #GESFormatter available which can save a +#GESTimeline to the given URI. + + + TRUE if the given @uri is supported, else FALSE. + + + + + a #gchar * pointing to a URI + + + + + + Get the default #GESAsset to use as formatter. It will return +the asset for the #GESFormatter that has the highest @rank + + + The #GESAsset for the formatter with highest @rank + + + + + + + + + + + + + + + + + + + Load data from the given URI into timeline. + Use @ges_timeline_load_from_uri + + + TRUE if the timeline data was successfully loaded from the URI, +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + + + Save data from timeline to the given URI. + Use @ges_timeline_save_to_uri + + + TRUE if the timeline data was successfully saved to the URI +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + %TRUE to overwrite file if it exists + + + + + + Load data from the given URI into timeline. + Use @ges_timeline_load_from_uri + + + TRUE if the timeline data was successfully loaded from the URI, +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + + + Save data from timeline to the given URI. + Use @ges_timeline_save_to_uri + + + TRUE if the timeline data was successfully saved to the URI +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + %TRUE to overwrite file if it exists + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GES Formatter class. Override the vmethods to implement the formatter functionnality. + + + the parent class structure + + + + Whether the URI can be loaded + + + + class method to deserialize data from a URI + + + + class method to serialize data to a URI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The class to register metas on + + + + The name of the formatter + + + + The formatter description + + + + A list of coma separated file extensions handled +by the formatter. The order of the extensions should match the +list of the structures inside @caps + + + + The caps the formatter handled, they should match what +gstreamer typefind mechanism will report for the files the formatter +handles. + + + + The version of the formatter + + + + The rank of the formatter + + + + + + + Virtual method for loading a timeline from a given URI. + +Every #GESFormatter subclass needs to implement this method. + + + TRUE if the timeline data was successfully loaded from the URI, +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + + + + + + Virtual method for saving a timeline to a uri. + +Every #GESFormatter subclass needs to implement this method. + + + TRUE if the timeline data was successfully saved to the URI +else FALSE. + + + + + a #GESFormatter + + + + a #GESTimeline + + + + a #gchar * pointing to a URI + + + + %TRUE to overwrite file if it exists + + + + + + A #GESGroup controls one or more #GESContainer-s (usually #GESClip-s, +but it can also control other #GESGroup-s). Its children must share +the same #GESTimeline, but can otherwise lie in separate #GESLayer-s +and have different timings. + +To initialise a group, you may want to use ges_container_group(), +and similarly use ges_container_ungroup() to dispose of it. + +A group will maintain the relative #GESTimelineElement:start times of +its children, as well as their relative layer #GESLayer:priority. +Therefore, if one of its children has its #GESTimelineElement:start +set, all other children will have their #GESTimelineElement:start +shifted by the same amount. Similarly, if one of its children moves to +a new layer, the other children will also change layers to maintain the +difference in their layer priorities. For example, if a child moves +from a layer with #GESLayer:priority 1 to a layer with priority 3, then +another child that was in a layer with priority 0 will move to the +layer with priority 2. + +The #GESGroup:start of a group refers to the earliest start +time of its children. If the group's #GESGroup:start is set, all the +children will be shifted equally such that the earliest start time +will match the set value. The #GESGroup:duration of a group is the +difference between the earliest start time and latest end time of its +children. If the group's #GESGroup:duration is increased, the children +whose end time matches the end of the group will be extended +accordingly. If it is decreased, then any child whose end time exceeds +the new end time will also have their duration decreased accordingly. + +A group may span several layers, but for methods such as +ges_timeline_element_get_layer_priority() and +ges_timeline_element_edit() a group is considered to have a layer +priority that is the highest #GESLayer:priority (numerically, the +smallest) of all the layers it spans. + + + + + Created a new empty group. You may wish to use +ges_container_group() instead, which can return a different +#GESContainer subclass if possible. + + + The new empty group. + + + + + An overwrite of the #GESTimelineElement:duration property. For a +#GESGroup, this is the difference between the earliest +#GESTimelineElement:start time and the latest end time (given by +#GESTimelineElement:start + #GESTimelineElement:duration) amongst +its children. + + + + An overwrite of the #GESTimelineElement:in-point property. This has +no meaning for a group and should not be set. + + + + An overwrite of the #GESTimelineElement:max-duration property. This +has no meaning for a group and should not be set. + + + + An overwrite of the #GESTimelineElement:priority property. +Setting #GESTimelineElement priorities is deprecated as all priority +management is now done by GES itself. + + + + An overwrite of the #GESTimelineElement:start property. For a +#GESGroup, this is the earliest #GESTimelineElement:start time +amongst its children. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Outputs the video stream from a given file as a still frame. The frame chosen +will be determined by the in-point property on the track element. For image +files, do not set the in-point property. + This won't be used anymore and has been replaced by +#GESUriSource instead which now plugs an `imagefreeze` element when +#ges_uri_source_asset_is_image returns %TRUE. + + + + + The location of the file/resource to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GESLayer-s are responsible for collecting and ordering #GESClip-s. + +A layer within a timeline will have an associated priority, +corresponding to their index within the timeline. A layer with the +index/priority 0 will have the highest priority and the layer with the +largest index will have the lowest priority (the order of priorities, +in this sense, is the _reverse_ of the numerical ordering of the +indices). ges_timeline_move_layer() should be used if you wish to +change how layers are prioritised in a timeline. + +Layers with higher priorities will have their content priorities +over content from lower priority layers, similar to how layers are +used in image editing. For example, if two separate layers both +display video content, then the layer with the higher priority will +have its images shown first. The other layer will only have its image +shown if the higher priority layer has no content at the given +playtime, or is transparent in some way. Audio content in separate +layers will simply play in addition. + + + + + Creates a new layer. + + + A new layer. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See ges_layer_add_asset_full(), which also gives an error. + + + The newly created clip. + + + + + The #GESLayer + + + + The asset to extract the new clip from + + + + The #GESTimelineElement:start value to set on the new clip +If `start == #GST_CLOCK_TIME_NONE`, it will be added to the end +of @layer, i.e. it will be set to @layer's duration + + + + The #GESTimelineElement:in-point value to set on the new +clip + + + + The #GESTimelineElement:duration value to set on the new +clip + + + + The #GESClip:supported-formats to set on the the new +clip, or #GES_TRACK_TYPE_UNKNOWN to use the default + + + + + + Extracts a new clip from an asset and adds it to the layer with +the given properties. + + + The newly created clip. + + + + + The #GESLayer + + + + The asset to extract the new clip from + + + + The #GESTimelineElement:start value to set on the new clip +If `start == #GST_CLOCK_TIME_NONE`, it will be added to the end +of @layer, i.e. it will be set to @layer's duration + + + + The #GESTimelineElement:in-point value to set on the new +clip + + + + The #GESTimelineElement:duration value to set on the new +clip + + + + The #GESClip:supported-formats to set on the the new +clip, or #GES_TRACK_TYPE_UNKNOWN to use the default + + + + + + See ges_layer_add_clip_full(), which also gives an error. + + + %TRUE if @clip was properly added to @layer, or %FALSE +if @layer refused to add @clip. + + + + + The #GESLayer + + + + The clip to add + + + + + + Adds the given clip to the layer. If the method succeeds, the layer +will take ownership of the clip. + +This method will fail and return %FALSE if @clip already resides in +some layer. It can also fail if the additional clip breaks some +compositional rules (see #GESTimelineElement). + + + %TRUE if @clip was properly added to @layer, or %FALSE +if @layer refused to add @clip. + + + + + The #GESLayer + + + + The clip to add + + + + + + Gets whether the layer is active for the given track. See +ges_layer_set_active_for_tracks(). + + + %TRUE if @layer is active for @track, or %FALSE otherwise. + + + + + The #GESLayer + + + + The #GESTrack to check if @layer is currently active for + + + + + + Gets the #GESLayer:auto-transition of the layer. + + + %TRUE if transitions are automatically added to @layer. + + + + + The #GESLayer + + + + + + Get the #GESClip-s contained in this layer. + + + A list of clips in +@layer. + + + + + + + The #GESLayer + + + + + + Gets the clips within the layer that appear between @start and @end. + + + A list of #GESClip-s +that intersect the interval `[start, end)` in @layer. + + + + + + + The #GESLayer + + + + Start of the interval + + + + End of the interval + + + + + + Retrieves the duration of the layer, which is the difference +between the start of the layer (always time 0) and the end (which will +be the end time of the final clip). + + + The duration of @layer. + + + + + The layer to get the duration from + + + + + + Get the priority of the layer. When inside a timeline, this is its +index in the timeline. See ges_timeline_move_layer(). + + + The priority of @layer within its timeline. + + + + + The #GESLayer + + + + + + Gets the timeline that the layer is a part of. + + + The timeline that @layer +is currently part of, or %NULL if it is not associated with any +timeline. + + + + + The #GESLayer + + + + + + Convenience method to check if the layer is empty (doesn't contain +any #GESClip), or not. + + + %TRUE if @layer is empty, %FALSE if it contains at least +one clip. + + + + + The #GESLayer to check + + + + + + Removes the given clip from the layer. + + + %TRUE if @clip was removed from @layer, or %FALSE if the +operation failed. + + + + + The #GESLayer + + + + The clip to remove + + + + + + Activate or deactivate track elements in @tracks (or in all tracks if @tracks +is %NULL). + +When a layer is deactivated for a track, all the #GESTrackElement-s in +the track that belong to a #GESClip in the layer will no longer be +active in the track, regardless of their individual +#GESTrackElement:active value. + +Note that by default a layer will be active for all of its +timeline's tracks. + + + %TRUE if the operation worked %FALSE otherwise. + + + + + The #GESLayer + + + + Whether elements in @tracks should be active or not + + + + The list of +tracks @layer should be (de-)active in, or %NULL to include all the tracks +in the @layer's timeline + + + + + + + + Sets #GESLayer:auto-transition for the layer. Use +ges_timeline_set_auto_transition() if you want all layers within a +#GESTimeline to have #GESLayer:auto-transition set to %TRUE. Use this +method if you want different values for different layers (and make sure +to keep #GESTimeline:auto-transition as %FALSE for the corresponding +timeline). + + + + + + + The #GESLayer + + + + Whether transitions should be automatically added to +the layer + + + + + + Sets the layer to the given priority. See #GESLayer:priority. + use #ges_timeline_move_layer instead. This deprecation means +that you will not need to handle layer priorities at all yourself, GES +will make sure there is never 'gaps' between layer priorities. + + + + + + + The #GESLayer + + + + The priority to set + + + + + + + + + + + + + + + + + + + + Whether to automatically create a #GESTransitionClip whenever two +#GESSource-s that both belong to a #GESClip in the layer overlap. +See #GESTimeline for what counts as an overlap. + +When a layer is added to a #GESTimeline, if this property is left as +%FALSE, but the timeline's #GESTimeline:auto-transition is %TRUE, it +will be set to %TRUE as well. + + + + The priority of the layer in the #GESTimeline. 0 is the highest +priority. Conceptually, a timeline is a stack of layers, +and the priority of the layer represents its position in the stack. Two +layers should not have the same priority within a given GESTimeline. + +Note that the timeline needs to be committed (with #ges_timeline_commit) +for the change to be taken into account. + use #ges_timeline_move_layer instead. This deprecation means +that you will not need to handle layer priorities at all yourself, GES +will make sure there is never 'gaps' between layer priorities. + + + + + + + the #GESTimeline where this layer is being used. + + + + + + + + + + + + + + + + + + Will be emitted whenever the layer is activated or deactivated +for some #GESTrack. See ges_layer_set_active_for_tracks(). + + + + + + Whether @layer has been made active or de-active in the @tracks + + + + A list of #GESTrack +which have been activated or deactivated + + + + + + + + Will be emitted after the clip is added to the layer. + + + + + + The clip that was added + + + + + + Will be emitted after the clip is removed from the layer. + + + + + + The clip that was removed + + + + + + + Subclasses can override the @get_objects if they can provide a more +efficient way of providing the list of contained #GESClip-s. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The description of the object, to be used in various contexts (string). + + + + + The file extension of files produced by a #GESFormatter (string). + + + + + The mimetype used for the file produced by a #GESFormatter (string). + + + + + The name of a formatter, used as the #GESAsset:id for #GESFormatter +assets (string). + + + + + The rank of a #GESFormatter (a #GstRank). + + + + + The version of a #GESFormatter (double). + + + + + The version of the format in which a project is serialized (string). + + + + + The ARGB color of a #GESMarker (an AARRGGBB hex as a uint). + + + + + The volume for a #GESTrack or a #GESLayer (float). + + + + + The default volume for a #GESTrack or a #GESLayer as a float. + + + + + + + + + + + + Current position (in nanoseconds) of the #GESMarker + + + + + + + + + + + A #GESMarker can be colored by setting the #GES_META_MARKER_COLOR meta. + + + Creates a new #GESMarkerList. + + + A new #GESMarkerList + + + + + + + The newly-added marker, the list keeps ownership +of the marker + + + + + + + + The position of the new marker + + + + + + + + a #GList +of the #GESMarker within the GESMarkerList. The user will have +to unref each #GESMarker and free the #GList. + + + + + + + + + + + + Moves a @marker in a @list to a new @position + + + %TRUE if the marker could be moved, %FALSE otherwise + (if the marker was not present in the list for example) + + + + + + + + + + + + + + + + Removes @marker from @list, this decreases the refcount of the +marker by 1. + + + %TRUE if the marker could be removed, %FALSE otherwise + (if the marker was not present in the list for example) + + + + + + + + + + + + + + + The number of markers in @list + + + + + + + + + + Will be emitted after the marker was added to the marker-list. + + + + + + the position of the added marker + + + + the #GESMarker that was added. + + + + + + Will be emitted after the marker was moved to. + + + + + + the previous position of the marker + + + + the new position of the marker + + + + the #GESMarker that was moved. + + + + + + Will be emitted after the marker was removed the marker-list. + + + + + + the #GESMarker that was removed. + + + + + + + + + + + + + A #GObject that implements #GESMetaContainer can have metadata set on +it, that is data that is unimportant to its function within GES, but +may hold some useful information. In particular, +ges_meta_container_set_meta() can be used to store any #GValue under +any generic field (specified by a string key). The same method can also +be used to remove the field by passing %NULL. A number of convenience +methods are also provided to make it easier to set common value types. +The metadata can then be read with ges_meta_container_get_meta() and +similar convenience methods. + +## Registered Fields + +By default, any #GValue can be set for a metadata field. However, you +can register some fields as static, that is they only allow values of a +specific type to be set under them, using +ges_meta_container_register_meta() or +ges_meta_container_register_static_meta(). The set #GESMetaFlag will +determine whether the value can be changed, but even if it can be +changed, it must be changed to a value of the same type. + +Internally, some GES objects will be initialized with static metadata +fields. These will correspond to some standard keys, such as +#GES_META_VOLUME. + + + Deserializes the given string, and adds and sets the found fields and +their values on the container. The string should be the return of +ges_meta_container_metas_to_string(). + + + %TRUE if the fields in @str was successfully deserialized +and added to @container. + + + + + A #GESMetaContainer + + + + A string to deserialize and add to @container + + + + + + Checks whether the specified field has been registered as static, and +gets the registered type and flags of the field, as used in +ges_meta_container_register_meta() and +ges_meta_container_register_static_meta(). + + + %TRUE if the @meta_item field has been registered on +@container. + + + + + A #GESMetaContainer + + + + The key for the @container field to check + + + + A destination to get the registered flags of +the field, or %NULL to ignore + + + + A destination to get the registered type of +the field, or %NULL to ignore + + + + + + Calls the given function on each of the meta container's set metadata +fields. + + + + + + + A #GESMetaContainer + + + + A function to call on each of @container's set +metadata fields + + + + User data to send to @func + + + + + + Gets the current boolean value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the boolean value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current date value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the date value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current date time value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the date time value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current double value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the double value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current float value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the float value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current int value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the int value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current int64 value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the int64 value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current marker list value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + A copy of the marker list value under @key, +or %NULL if it could not be fetched. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + + + Gets the current value of the specified field of the meta container. + + + The value under @key, or %NULL if @container +does not have the field set. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + + + Gets the current string value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + The string value under @meta_item, or %NULL +if it could not be fetched. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + + + Gets the current uint value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the uint value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Gets the current uint64 value of the specified field of the meta +container. If the field does not have a set value, or it is of the +wrong type, the method will fail. + + + %TRUE if the uint64 value under @meta_item was copied +to @dest. + + + + + A #GESMetaContainer + + + + The key for the @container field to get + + + + Destination into which the value under @meta_item +should be copied. + + + + + + Serializes the set metadata fields of the meta container to a string. + + + A serialized @container, or %NULL if an error +occurred. + + + + + A #GESMetaContainer + + + + + + Sets the value of the specified field of the meta container to the +given value, and registers the field to only hold a value of the +same type. After calling this, only values of the same type as @value +can be set for this field. The given flags can be set to make this +field only readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold @value types, with the given @flags, and the +field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given boolean value, and registers the field to only hold a boolean +typed value. After calling this, only boolean values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold boolean typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given date value, and registers the field to only hold a date +typed value. After calling this, only date values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold date typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given date time value, and registers the field to only hold a date time +typed value. After calling this, only date time values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold date time typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given double value, and registers the field to only hold a double +typed value. After calling this, only double values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold double typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given float value, and registers the field to only hold a float +typed value. After calling this, only float values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold float typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given int value, and registers the field to only hold an int +typed value. After calling this, only int values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold int typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given int64 value, and registers the field to only hold an int64 +typed value. After calling this, only int64 values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold int64 typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given string value, and registers the field to only hold a string +typed value. After calling this, only string values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold string typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given uint value, and registers the field to only hold a uint +typed value. After calling this, only uint values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold uint typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given uint64 value, and registers the field to only hold a uint64 +typed value. After calling this, only uint64 values can be set for +this field. The given flags can be set to make this field only +readable after calling this method. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold uint64 typed values, with the given @flags, +and the field was successfully set to @value. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The value to set for the registered field + + + + + + Registers a static metadata field on the container to only hold the +specified type. After calling this, setting a value under this field +can only succeed if its type matches the registered type of the field. + +Unlike ges_meta_container_register_meta(), no (initial) value is set +for this field, which means you can use this method to reserve the +space to be _optionally_ set later. + +Note that if a value has already been set for the field being +registered, then its type must match the registering type, and its +value will be left in place. If the field has no set value, then +you will likely want to include #GES_META_WRITABLE in @flags to allow +the value to be set later. + + + %TRUE if the @meta_item field was successfully registered on +@container to only hold @type values, with the given @flags. + + + + + A #GESMetaContainer + + + + Flags to be used for the registered field + + + + The key for the @container field to register + + + + The required value type for the registered field + + + + + + Sets the value of the specified field of the meta container to the +given boolean value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given date value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given date time value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given double value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given float value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given int value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given int64 value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given marker list value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to a +copy of the given value. If the given @value is %NULL, the field +given by @meta_item is removed and %TRUE is returned. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item, or %NULL to +remove the corresponding field + + + + + + Sets the value of the specified field of the meta container to the +given string value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given uint value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + Sets the value of the specified field of the meta container to the +given uint64 value. + + + %TRUE if @value was set under @meta_item for @container. + + + + + A #GESMetaContainer + + + + The key for the @container field to set + + + + The value to set under @meta_item + + + + + + This is emitted for a meta container whenever the metadata under one +of its fields changes, is set for the first time, or is removed. In +the latter case, @value will be %NULL. + + + + + + The key for the @container field that changed + + + + The new value under @key + + + + + + + + + + + + + + + + + + + The metadata is readable + + + The metadata is writable + + + The metadata is readable and writable + + + + A method to be called on all of a meta container's fields. + + + + + + + A #GESMetaContainer + + + + The key for one of @container's fields + + + + The set value under @key + + + + User data + + + + + + Outputs the video stream from a given image sequence. The start frame chosen +will be determined by the in-point property on the track element. + +This should not be used anymore, the `imagesequence://` protocol should be +used instead. Check the #imagesequencesrc GStreamer element for more +information. + Use #GESUriSource instead + + + + + + + + + + + + + + + + The uri of the file/resource to use. You can set a start index, +a stop index and a sequence pattern. +The format is &lt;multifile://start:stop\@location-pattern&gt;. +The pattern uses printf string formating. + +Example uris: + +multifile:///home/you/image\%03d.jpg + +multifile://20:50@/home/you/sequence/\%04d.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for overlays, transitions, and effects + + + + + + + + + + + + + + + + + + + + + + + + + + + + Operations are any kind of object that both outputs AND consumes data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overlays are objects which modify the underlying layer(s). + +Examples of overlays include text, image watermarks, or audio dubbing. + +Transitions, which change from one source to another over time, are +not considered overlays. + + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + + + + + + + + + + + + + + A #GESPipeline can take an audio-video #GESTimeline and conveniently +link its #GESTrack-s to an internal #playsink element, for +preview/playback, and an internal #encodebin element, for rendering. +You can switch between these modes using ges_pipeline_set_mode(). + +You can choose the specific audio and video sinks used for previewing +the timeline by setting the #GESPipeline:audio-sink and +#GESPipeline:video-sink properties. + +You can set the encoding and save location used in rendering by calling +ges_pipeline_set_render_settings(). + + + + + Creates a new pipeline. + + + The newly created pipeline. + + + + + Gets the #GESPipeline:mode of the pipeline. + + + The current mode of @pipeline. + + + + + A #GESPipeline + + + + + + Gets a sample from the pipeline of the currently displayed image in +preview, in the specified format. + +Note that if you use "ANY" caps for @caps, then the current format of +the image is used. You can retrieve these caps from the returned sample +with gst_sample_get_caps(). + + + A sample of @self's current image preview in +the format given by @caps, or %NULL if an error prevented fetching the +sample. + + + + + A #GESPipeline in #GST_STATE_PLAYING or #GST_STATE_PAUSED + + + + Some caps to specifying the desired format, or +#GST_CAPS_ANY to use the native format + + + + + + Gets a sample from the pipeline of the currently displayed image in +preview, in the 24-bit "RGB" format and of the desired width and +height. + +See ges_pipeline_get_thumbnail(). + + + A sample of @self's current image preview in +the "RGB" format, scaled to @width and @height, or %NULL if an error +prevented fetching the sample. + + + + + A #GESPipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED + + + + The requested pixel width of the image, or -1 to use the native +size + + + + The requested pixel height of the image, or -1 to use the +native size + + + + + + Gets the #GESPipeline:audio-sink of the pipeline. + + + The audio sink used by @self for preview. + + + + + A #GESPipeline + + + + + + Gets the #GESPipeline:video-sink of the pipeline. + + + The video sink used by @self for preview. + + + + + A #GESPipeline + + + + + + Sets the #GESPipeline:audio-sink of the pipeline. + + + + + + + A #GESPipeline in #GST_STATE_NULL + + + + A audio sink for @self to use for preview + + + + + + Sets the #GESPipeline:video-sink of the pipeline. + + + + + + + A #GESPipeline in #GST_STATE_NULL + + + + A video sink for @self to use for preview + + + + + + Saves the currently displayed image of the pipeline in preview to the +given location, in the specified dimensions and format. + + + %TRUE if @self's current image preview was successfully saved +to @location using the given @format, @height and @width. + + + + + A #GESPipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED + + + + The requested pixel width of the image, or -1 to use the native +size + + + + The requested pixel height of the image, or -1 to use the +native size + + + + The desired mime type (for example, "image/jpeg") + + + + The path to save the thumbnail to + + + + + + Sets the #GESPipeline:mode of the pipeline. + +Note that the pipeline will be set to #GST_STATE_NULL during this call to +perform the necessary changes. You will need to set the state again yourself +after calling this. + +> **NOTE**: [Rendering settings](ges_pipeline_set_render_settings) need to be +> set before setting @mode to #GES_PIPELINE_MODE_RENDER or +> #GES_PIPELINE_MODE_SMART_RENDER, the call to this method will fail +> otherwise. + + + %TRUE if the mode of @pipeline was successfully set to @mode. + + + + + A #GESPipeline + + + + The mode to set for @pipeline + + + + + + Specifies the encoding to be used by the pipeline to render its +#GESPipeline:timeline, and where the result should be written to. + +This method **must** be called before setting the pipeline mode to +#GES_PIPELINE_MODE_RENDER. + + + %TRUE if the settings were successfully set on @pipeline. + + + + + A #GESPipeline + + + + The URI to save the #GESPipeline:timeline rendering +result to + + + + The encoding to use for rendering the #GESPipeline:timeline + + + + + + Takes the given timeline and sets it as the #GESPipeline:timeline for +the pipeline. + +Note that you should only call this method once on a given pipeline +because a pipeline can not have its #GESPipeline:timeline changed after +it has been set. + + + %TRUE if @timeline was successfully given to @pipeline. + + + + + A #GESPipeline + + + + The timeline to set for @pipeline + + + + + + The audio filter(s) to apply during playback in preview mode, +immediately before the #GESPipeline:audio-sink. This exposes the +#playsink:audio-filter property of the internal #playsink. + + + + The audio sink used for preview. This exposes the +#playsink:audio-sink property of the internal #playsink. + + + + The pipeline's mode. In preview mode (for audio or video, or both) +the pipeline can display the timeline's content to an end user. In +rendering mode the pipeline can encode the timeline's content and +save it to a file. + + + + The timeline used by this pipeline, whose content it will play and +render, or %NULL if the pipeline does not yet have a timeline. + +Note that after you set the timeline for the first time, subsequent +calls to change the timeline will fail. + + + + The video filter(s) to apply during playback in preview mode, +immediately before the #GESPipeline:video-sink. This exposes the +#playsink:video-filter property of the internal #playsink. + + + + The video sink used for preview. This exposes the +#playsink:video-sink property of the internal #playsink. + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + The various modes a #GESPipeline can be configured to. + + Output the #GESPipeline:timeline's +audio to the soundcard + + + Output the #GESPipeline:timeline's +video to the screen + + + Output both the #GESPipeline:timeline's +audio and video to the soundcard and screen (default) + + + Render the #GESPipeline:timeline with +forced decoding (the underlying #encodebin has its +#encodebin:avoid-reencoding property set to %FALSE) + + + Render the #GESPipeline:timeline, +avoiding decoding/reencoding (the underlying #encodebin has its +#encodebin:avoid-reencoding property set to %TRUE) + + + + + + + + This is a legacy format and you should avoid to use it. The formatter +is really not in good shape and is deprecated. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GESProject is used to control a set of #GESAsset and is a +#GESAsset with `GES_TYPE_TIMELINE` as @extractable_type itself. That +means that you can extract #GESTimeline from a project as followed: + +|[ + GESProject *project; + GESTimeline *timeline; + + project = ges_project_new ("file:///path/to/a/valid/project/uri"); + + // Here you can connect to the various signal to get more infos about + // what is happening and recover from errors if possible + ... + + timeline = ges_asset_extract (GES_ASSET (project)); +]| + +The #GESProject class offers a higher level API to handle #GESAsset-s. +It lets you request new asset, and it informs you about new assets through +a set of signals. Also it handles problem such as missing files/missing +#GstElement and lets you try to recover from those. + +## Subprojects + +In order to add a subproject, the only thing to do is to add the subproject +to the main project: + +``` c +ges_project_add_asset (project, GES_ASSET (subproject)); +``` +then the subproject will be serialized in the project files. To use +the subproject in a timeline, you should use a #GESUriClip with the +same subproject URI. + +When loading a project with subproject, subprojects URIs will be temporary +writable local files. If you want to edit the subproject timeline, +you should retrieve the subproject from the parent project asset list and +extract the timeline with ges_asset_extract() and save it at +the same temporary location. + + + + + + Creates a new #GESProject and sets its uri to @uri if provided. Note that +if @uri is not valid or %NULL, the uri of the project will then be set +the first time you save the project. If you then save the project to +other locations, it will never be updated again and the first valid URI is +the URI it will keep refering to. + + + A newly created #GESProject + + + + + The uri to be set after creating the project. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a #GESAsset to @project, the project will keep a reference on +@asset. + + + %TRUE if the asset could be added %FALSE it was already +in the project + + + + + A #GESProject + + + + A #GESAsset to add to @project + + + + + + Adds @profile to the project. It lets you save in what format +the project has been renders and keep a reference to those formats. +Also, those formats will be saves to the project file when possible. + + + %TRUE if @profile could be added, %FALSE otherwize + + + + + A #GESProject + + + + A #GstEncodingProfile to add to the project. If a profile with +the same name already exists, it will be replaced + + + + + + Adds a formatter as used to load @project + + + + + + + The project to add a formatter to + + + + A formatter used by @project + + + + + + Create and add a #GESAsset to @project. You should connect to the +"asset-added" signal to get the asset when it finally gets added to +@project + + + %TRUE if the asset started to be added %FALSE it was already +in the project + + + + + A #GESProject + + + + The id of the asset to create and add to @project + + + + The #GType of the asset to create + + + + + + Create and add a #GESAsset to @project. You should connect to the +"asset-added" signal to get the asset when it finally gets added to +@project + + + The newly created #GESAsset or %NULL. + + + + + A #GESProject + + + + The id of the asset to create and add to @project + + + + The #GType of the asset to create + + + + + + + + The #GESAsset with +@id or %NULL if no asset with @id as an ID + + + + + A #GESProject + + + + The id of the asset to retrieve + + + + The extractable_type of the asset +to retrieve from @object + + + + + + Get the assets that are being loaded + + + A set of loading asset +that will be added to @project. Note that those Asset are *not* loaded yet, +and thus can not be used + + + + + + + A #GESProject + + + + + + Retrieve the uri that is currently set on @project + + + a newly allocated string representing uri. + + + + + A #GESProject + + + + + + List all @asset contained in @project filtering per extractable_type +as defined by @filter. It copies the asset and thus will not be updated +in time. + + + The list of +#GESAsset the object contains + + + + + + + A #GESProject + + + + Type of assets to list, `GES_TYPE_EXTRACTABLE` will list +all assets + + + + + + Lists the encoding profile that have been set to @project. The first one +is the latest added. + + + The +list of #GstEncodingProfile used in @project + + + + + + + A #GESProject + + + + + + Loads @project into @timeline + + + %TRUE if the project could be loaded %FALSE otherwize. + + + + + A #GESProject that has an @uri set already + + + + A blank timeline to load @project into + + + + + + remove a @asset to from @project. + + + %TRUE if the asset could be removed %FALSE otherwise + + + + + A #GESProject + + + + A #GESAsset to remove from @project + + + + + + Save the timeline of @project to @uri. You should make sure that @timeline +is one of the timelines that have been extracted from @project +(using ges_asset_extract (@project);) + + + %TRUE if the project could be save, %FALSE otherwize + + + + + A #GESProject to save + + + + The #GESTimeline to save, it must have been extracted from @project + + + + The uri where to save @project and @timeline + + + + The formatter asset to +use or %NULL. If %NULL, will try to save in the same format as the one +from which the timeline as been loaded or default to the best formatter +as defined in #ges_find_formatter_for_uri + + + + %TRUE to overwrite file if it exists + + + + + + + + + + + + + + + + + + + + + + + + + The #GESAsset that has been added to @project + + + + + + + + + + + The #GESAsset that started loading + + + + + + + + + + + The #GESAsset that has been removed from @project + + + + + + + + + + + The timeline that failed loading + + + + The #GError defining the error that occured + + + + + + Informs you that a #GESAsset could not be created. In case of +missing GStreamer plugins, the error will be set to #GST_CORE_ERROR +#GST_CORE_ERROR_MISSING_PLUGIN + + + + + + The #GError defining the error that occured, might be %NULL + + + + The @id of the asset that failed loading + + + + The @extractable_type of the asset that +failed loading + + + + + + + + + + + The #GESTimeline that completed loading + + + + + + + + + + + The #GESTimeline that started loading + + + + + + |[ +static gchar +source_moved_cb (GESProject *project, GError *error, GESAsset *asset_with_error) +{ + return g_strdup ("file:///the/new/uri.ogg"); +} + +static int +main (int argc, gchar ** argv) +{ + GESTimeline *timeline; + GESProject *project = ges_project_new ("file:///some/uri.xges"); + + g_signal_connect (project, "missing-uri", source_moved_cb, NULL); + timeline = ges_asset_extract (GES_ASSET (project)); +} +]| + + The new URI of @wrong_asset + + + + + The error that happened + + + + The asset with the wrong ID, you should us it and its content +only to find out what the new location is. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for single-media sources + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GESSourceClip-s are clips whose core elements are #GESSource-s. + +## Effects + +#GESSourceClip-s can also have #GESBaseEffect-s added as non-core +elements. These effects are applied to the core sources of the clip +that they share a #GESTrack with. See #GESClip for how to add and move +these effects from the clip. + + + + + Creates a new #GESSourceClip that renders a time overlay on top + + + The newly created #GESSourceClip, +or %NULL if there was an error. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GESTimelineElement:duration of @obj. + + + + A #GESTimelineElement + + + + + The end position of @obj: #GESTimelineElement:start + +#GESTimelineElement:duration. + + + + A #GESTimelineElement + + + + + The #GESTimelineElement:in-point of @obj. + + + + A #GESTimelineElement + + + + + See #ges_timeline_element_get_layer_priority. + + + + The object to retrieve the layer priority from + + + + + The #GESTimelineElement:max-duration of @obj. + + + + A #GESTimelineElement + + + + + The #GESTimelineElement:name of @obj. + + + + A #GESTimelineElement + + + + + Layer priority when a timeline element is not in any layer. + + + + + The #GESTimelineElement:parent of @obj. + + + + A #GESTimelineElement + + + + + The #GESTimelineElement:priority of @obj. + + + + A #GESTimelineElement + + + + + The #GESTimelineElement:start of @obj. + + + + A #GESTimelineElement + + + + + The #GESTimelineElement:timeline of @obj. + + + + A #GESTimelineElement + + + + + + + + + + + + + + + + + + + What the default #GESTrackElement:has-internal-source value should be +for new elements from this class. + + + + A #GESTrackElementClass + + + + + Useful for testing purposes. + +## Asset + +The default asset ID is GESTestClip, but the framerate and video +size can be overridden using an ID of the form: + +``` +framerate=60/1, width=1920, height=1080, max-duration=5.0 +``` +Note: `max-duration` can be provided in seconds as float, or as GstClockTime +as guint64 or gint. + + + + + Creates a new #GESTestClip. + + + The newly created #GESTestClip, +or %NULL if there was an error. + + + + + Creates a new #GESTestClip for the provided @nick. + + + The newly created #GESTestClip, +or %NULL if there was an error. + + + + + the nickname for which to create the #GESTestClip + + + + + + Get the frequency @self generates. + + + The frequency @self generates. See audiotestsrc element. + + + + + a #GESTestClip + + + + + + Get the volume of the test audio signal applied on @self. + + + The volume of the test audio signal applied on @self. + + + + + a #GESTestClip + + + + + + Get the #GESVideoTestPattern which is applied on @self. + + + The #GESVideoTestPattern which is applied on @self. + + + + + a #GESTestClip + + + + + + Let you know if the audio track of @self is muted or not. + + + Whether the audio track of @self is muted or not. + + + + + a #GESTestClip + + + + + + Sets the frequency to generate. See audiotestsrc element. + + + + + + + the #GESTestClip to set the frequency on + + + + the frequency you want to use on @self + + + + + + Sets whether the audio track of this clip is muted or not. + + + + + + + the #GESTestClip on which to mute or unmute the audio track + + + + %TRUE to mute the audio track, %FALSE to unmute it + + + + + + Sets the volume of the test audio signal. + + + + + + + the #GESTestClip to set the volume on + + + + the volume of the audio signal you want to use on @self + + + + + + Sets which video pattern to display on @self. + + + + + + + the #GESTestClip to set the pattern on + + + + the #GESVideoTestPattern to use on @self + + + + + + The frequency to generate for audio track elements. + + + + Whether the sound will be played or not. + + + + The volume for the audio track elements. + + + + Video pattern to display in video track elements. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Horizontal alignment of the text. + + align text left + + + align text center + + + align text right + + + align text on xpos position + + + + + + + + + + Creates a new #GESTextOverlay. + This should never be called by applications as this will +be created by clips. + + + The newly created #GESTextOverlay or +%NULL if something went wrong. + + + + + Get the color used by @source. + + + The color used by @source. + + + + + a GESTextOverlay + + + + + + Get the pango font description currently set on @source. + + + The pango font description currently set on @source. + + + + + a GESTextOverlay + + + + + + Get the horizontal aligment used by @source. + + + The horizontal aligment used by @source. + + + + + a GESTextOverlay + + + + + + Get the text currently set on @source. + + + The text currently set on @source. + + + + + a GESTextOverlay + + + + + + Get the vertical aligment used by @source. + + + The vertical aligment used by @source. + + + + + a GESTextOverlay + + + + + + Get the horizontal position used by @source. + + + The horizontal position used by @source. + + + + + a GESTextOverlay + + + + + + Get the vertical position used by @source. + + + The vertical position used by @source. + + + + + a GESTextOverlay + + + + + + Sets the color of the text. + + + + + + + the #GESTextOverlay* to set + + + + The color @self is being set to + + + + + + Sets the pango font description of the text this track element +will render. + + + + + + + the #GESTextOverlay + + + + the pango font description + + + + + + Sets the horizontal aligment of the text. + + + + + + + the #GESTextOverlay* to set text on + + + + The #GESTextHAlign defining the horizontal alignment +of the text render by @self. + + + + + + Sets the text this track element will render. + + + + + + + the #GESTextOverlay* to set text on + + + + the text to render. an internal copy of this text will be +made. + + + + + + Sets the vertical aligment of the text. + + + + + + + the #GESTextOverlay* to set text on + + + + The #GESTextVAlign defining the vertical alignment +of the text render by @self. + + + + + + Sets the horizontal position of the text. + + + + + + + the #GESTextOverlay* to set + + + + The horizontal position @self is being set to + + + + + + Sets the vertical position of the text. + + + + + + + the #GESTextOverlay* to set + + + + The vertical position @self is being set to + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Renders text onto the next lower priority stream using textrender. + + + + + Creates a new #GESTextOverlayClip + + + The newly created +#GESTextOverlayClip, or %NULL if there was an error. + + + + + Get the color used by @source. + + + The color used by @source. + + + + + a #GESTextOverlayClip + + + + + + Get the pango font description used by @self. + + + The pango font description used by @self. + + + + + a #GESTextOverlayClip + + + + + + Get the horizontal aligment used by @self. + + + The horizontal aligment used by @self. + + + + + a #GESTextOverlayClip + + + + + + Get the text currently set on @self. + + + The text currently set on @self. + + + + + a #GESTextOverlayClip + + + + + + Get the vertical aligment used by @self. + + + The vertical aligment used by @self. + + + + + a #GESTextOverlayClip + + + + + + Get the horizontal position used by @source. + + + The horizontal position used by @source. + + + + + a #GESTextOverlayClip + + + + + + Get the vertical position used by @source. + + + The vertical position used by @source. + + + + + a #GESTextOverlayClip + + + + + + Sets the color of the text. + + + + + + + the #GESTextOverlayClip* to set + + + + The color @self is being set to + + + + + + Sets the pango font description of the text + + + + + + + the #GESTextOverlayClip* + + + + the pango font description + + + + + + Sets the horizontal aligment of the text. + + + + + + + the #GESTextOverlayClip* to set horizontal alignement of text on + + + + #GESTextHAlign + + + + + + Sets the text this clip will render. + + + + + + + the #GESTextOverlayClip* to set text on + + + + the text to render. an internal copy of this text will be +made. + + + + + + Sets the vertical aligment of the text. + + + + + + + the #GESTextOverlayClip* to set vertical alignement of text on + + + + #GESTextVAlign + + + + + + Sets the horizontal position of the text. + + + + + + + the #GESTextOverlayClip* to set + + + + The horizontal position @self is being set to + + + + + + Sets the vertical position of the text. + + + + + + + the #GESTextOverlayClip* to set + + + + The vertical position @self is being set to + + + + + + The color of the text + + + + Pango font description string + + + + Horizontal alignment of the text + + + + The text to diplay + + + + Vertical alignent of the text + + + + The horizontal position of the text + + + + The vertical position of the text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vertical alignment of the text. + + draw text on the baseline + + + draw text on the bottom + + + draw text on top + + + draw text on ypos position + + + draw text on the center + + + + + + #GESTimeline is the central object for any multimedia timeline. + +A timeline is composed of a set of #GESTrack-s and a set of +#GESLayer-s, which are added to the timeline using +ges_timeline_add_track() and ges_timeline_append_layer(), respectively. + +The contained tracks define the supported types of the timeline +and provide the media output. Essentially, each track provides an +additional source #GstPad. + +Most usage of a timeline will likely only need a single #GESAudioTrack +and/or a single #GESVideoTrack. You can create such a timeline with +ges_timeline_new_audio_video(). After this, you are unlikely to need to +work with the tracks directly. + +A timeline's layers contain #GESClip-s, which in turn control the +creation of #GESTrackElement-s, which are added to the timeline's +tracks. See #GESTimeline::select-tracks-for-object if you wish to have +more control over which track a clip's elements are added to. + +The layers are ordered, with higher priority layers having their +content prioritised in the tracks. This ordering can be changed using +ges_timeline_move_layer(). + +## Editing + +See #GESTimelineElement for the various ways the elements of a timeline +can be edited. + +If you change the timing or ordering of a timeline's +#GESTimelineElement-s, then these changes will not actually be taken +into account in the output of the timeline's tracks until the +ges_timeline_commit() method is called. This allows you to move its +elements around, say, in response to an end user's mouse dragging, with +little expense before finalising their effect on the produced data. + +## Overlaps and Auto-Transitions + +There are certain restrictions placed on how #GESSource-s may overlap +in a #GESTrack that belongs to a timeline. These will be enforced by +GES, so the user will not need to keep track of them, but they should +be aware that certain edits will be refused as a result if the overlap +rules would be broken. + +Consider two #GESSource-s, `A` and `B`, with start times `startA` and +`startB`, and end times `endA` and `endB`, respectively. The start +time refers to their #GESTimelineElement:start, and the end time is +their #GESTimelineElement:start + #GESTimelineElement:duration. These +two sources *overlap* if: + ++ they share the same #GESTrackElement:track (non %NULL), which belongs + to the timeline; ++ they share the same #GES_TIMELINE_ELEMENT_LAYER_PRIORITY; and ++ `startA < endB` and `startB < endA `. + +Note that when `startA = endB` or `startB = endA` then the two sources +will *touch* at their edges, but are not considered overlapping. + +If, in addition, `startA < startB < endA`, then we can say that the +end of `A` overlaps the start of `B`. + +If, instead, `startA <= startB` and `endA >= endB`, then we can say +that `A` fully overlaps `B`. + +The overlap rules for a timeline are that: + +1. One source cannot fully overlap another source. +2. A source can only overlap the end of up to one other source at its + start. +3. A source can only overlap the start of up to one other source at its + end. + +The last two rules combined essentially mean that at any given timeline +position, only up to two #GESSource-s may overlap at that position. So +triple or more overlaps are not allowed. + +If you switch on #GESTimeline:auto-transition, then at any moment when +the end of one source (the first source) overlaps the start of another +(the second source), a #GESTransitionClip will be automatically created +for the pair in the same layer and it will cover their overlap. If the +two elements are edited in a way such that the end of the first source +no longer overlaps the start of the second, the transition will be +automatically removed from the timeline. However, if the two sources +still overlap at the same edges after the edit, then the same +transition object will be kept, but with its timing and layer adjusted +accordingly. + +## Saving + +To save/load a timeline, you can use the ges_timeline_load_from_uri() +and ges_timeline_save_to_uri() methods that use the default format. + +## Playing + +A timeline is a #GstBin with a source #GstPad for each of its +tracks, which you can fetch with ges_timeline_get_pad_for_track(). You +will likely want to link these to some compatible sink #GstElement-s to +be able to play or capture the content of the timeline. + +You can use a #GESPipeline to easily preview/play the timeline's +content, or render it to a file. + + + + + + Creates a new empty timeline. + + + The new timeline. + + + + + Creates a new timeline containing a single #GESAudioTrack and a +single #GESVideoTrack. + + + The new timeline, or %NULL if the tracks +could not be created and added. + + + + + Creates a timeline from the given URI. + + + A new timeline if the uri was loaded +successfully, or %NULL if the uri could not be loaded. + + + + + The URI to load from + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a layer to the timeline. + +If the layer contains #GESClip-s, then this may trigger the creation of +their core track element children for the timeline's tracks, and the +placement of the clip's children in the tracks of the timeline using +#GESTimeline::select-tracks-for-object. Some errors may occur if this +would break one of the configuration rules of the timeline in one of +its tracks. In such cases, some track elements would fail to be added +to their tracks, but this method would still return %TRUE. As such, it +is advised that you only add clips to layers that already part of a +timeline. In such situations, ges_layer_add_clip() is able to fail if +adding the clip would cause such an error. + This method requires you to ensure the layer's +#GESLayer:priority will be unique to the timeline. Use +ges_timeline_append_layer() and ges_timeline_move_layer() instead. + + + %TRUE if @layer was properly added. + + + + + The #GESTimeline + + + + The layer to add + + + + + + Add a track to the timeline. + +If the timeline already contains clips, then this may trigger the +creation of their core track element children for the track, and the +placement of the clip's children in the track of the timeline using +#GESTimeline::select-tracks-for-object. Some errors may occur if this +would break one of the configuration rules for the timeline in the +track. In such cases, some track elements would fail to be added to the +track, but this method would still return %TRUE. As such, it is advised +that you avoid adding tracks to timelines that already contain clips. + + + %TRUE if @track was properly added. + + + + + The #GESTimeline + + + + The track to add + + + + + + Append a newly created layer to the timeline. The layer will +be added at the lowest #GESLayer:priority (numerically, the highest). + + + The newly created layer. + + + + + The #GESTimeline + + + + + + Commit all the pending changes of the clips contained in the +timeline. + +When changes happen in a timeline, they are not immediately executed +internally, in a way that effects the output data of the timeline. You +should call this method when you are done with a set of changes and you +want them to be executed. + +Any pending changes will be executed in the backend. The +#GESTimeline::commited signal will be emitted once this has completed. +You should not try to change the state of the timeline, seek it or add +tracks to it before receiving this signal. You can use +ges_timeline_commit_sync() if you do not want to perform other tasks in +the mean time. + +Note that all the pending changes will automatically be executed when +the timeline goes from #GST_STATE_READY to #GST_STATE_PAUSED, which is +usually triggered by a corresponding state changes in a containing +#GESPipeline. + + + %TRUE if pending changes were committed, or %FALSE if nothing +needed to be committed. + + + + + A #GESTimeline + + + + + + Commit all the pending changes of the clips contained in the +timeline and wait for the changes to complete. + +See ges_timeline_commit(). + + + %TRUE if pending changes were committed, or %FALSE if nothing +needed to be committed. + + + + + A #GESTimeline + + + + + + Gets #GESTimeline:auto-transition for the timeline. + + + The auto-transition of @self. + + + + + The #GESTimeline + + + + + + Get the current #GESTimeline:duration of the timeline + + + The current duration of @timeline. + + + + + The #GESTimeline + + + + + + Gets the element contained in the timeline with the given name. + + + The timeline element in @timeline +with the given @name, or %NULL if it was not found. + + + + + The #GESTimeline + + + + The name of the element to find + + + + + + This method allows you to convert a timeline #GstClockTime into its +corresponding #GESFrameNumber in the timeline's output. + + + The frame number @timestamp corresponds to. + + + + + A #GESTimeline + + + + The timestamp to get the corresponding frame number of + + + + + + This method allows you to convert a timeline output frame number into a +timeline #GstClockTime. For example, this time could be used to seek to a +particular frame in the timeline's output, or as the edit position for +an element within the timeline. + + + The timestamp corresponding to @frame_number in the output of @self. + + + + + The self on which to retrieve the timestamp for @frame_number + + + + The frame number to get the corresponding timestamp of in the + timeline coordinates + + + + + + Get the list of #GESGroup-s present in the timeline. + + + The list of +groups that contain clips present in @timeline's layers. +Must not be changed. + + + + + + + The #GESTimeline + + + + + + Retrieve the layer whose index in the timeline matches the given +priority. + + + The layer with the given +@priority, or %NULL if none was found. + +Since 1.6 + + + + + The #GESTimeline to retrieve a layer from + + + + The priority/index of the layer to find + + + + + + Get the list of #GESLayer-s present in the timeline. + + + The list of +layers present in @timeline sorted by priority. + + + + + + + The #GESTimeline + + + + + + Search for the #GstPad corresponding to the given timeline's track. +You can link to this pad to receive the output data of the given track. + + + The pad corresponding to @track, +or %NULL if there is an error. + + + + + The #GESTimeline + + + + A track + + + + + + Gets the #GESTimeline:snapping-distance for the timeline. + + + The snapping distance (in nanoseconds) of @timeline. + + + + + The #GESTimeline + + + + + + Search for the #GESTrack corresponding to the given timeline's pad. + + + The track corresponding to @pad, +or %NULL if there is an error. + + + + + The #GESTimeline + + + + A pad + + + + + + Get the list of #GESTrack-s used by the timeline. + + + The list of tracks +used by @timeline. + + + + + + + The #GESTimeline + + + + + + Check whether the timeline is empty or not. + + + %TRUE if @timeline is empty. + + + + + The #GESTimeline + + + + + + Loads the contents of URI into the timeline. + + + %TRUE if the timeline was loaded successfully from @uri. + + + + + An empty #GESTimeline into which to load the formatter + + + + The URI to load from + + + + + + Moves a layer within the timeline to the index given by +@new_layer_priority. +An index of 0 corresponds to the layer with the highest priority in a +timeline. If @new_layer_priority is greater than the number of layers +present in the timeline, it will become the lowest priority layer. + + + + + + + A #GESTimeline + + + + A layer within @timeline, whose priority should be changed + + + + The new index for @layer + + + + + + Paste an element inside the timeline. @element **must** be the return of +ges_timeline_element_copy() with `deep=TRUE`, +and it should not be changed before pasting. @element itself is not +placed in the timeline, instead a new element is created, alike to the +originally copied element. Note that the originally copied element must +also lie within @timeline, at both the point of copying and pasting. + +Pasting may fail if it would place the timeline in an unsupported +configuration. + +After calling this function @element should not be used. In particular, +@element can **not** be pasted again. Instead, you can copy the +returned element and paste that copy (although, this is only possible +if the paste was successful). + +See also ges_timeline_element_paste(). + + + The newly created element, or +%NULL if pasting fails. + + + + + The #GESTimeline onto which @element should be pasted + + + + The element to paste + + + + The position in the timeline @element should be pasted to, +i.e. the #GESTimelineElement:start value for the pasted element. + + + + The layer into which the element should be pasted. +-1 means paste to the same layer from which @element has been copied from + + + + + + Removes a layer from the timeline. + + + %TRUE if @layer was properly removed. + + + + + The #GESTimeline + + + + The layer to remove + + + + + + Remove a track from the timeline. + + + %TRUE if @track was properly removed. + + + + + The #GESTimeline + + + + The track to remove + + + + + + Saves the timeline to the given location. If @formatter_asset is %NULL, +the method will attempt to save in the same format the timeline was +loaded from, before defaulting to the formatter with highest rank. + + + %TRUE if @timeline was successfully saved to @uri. + + + + + The #GESTimeline + + + + The location to save to + + + + The formatter asset to use, or %NULL + + + + %TRUE to overwrite file if it exists + + + + + + Sets #GESTimeline:auto-transition for the timeline. This will also set +the corresponding #GESLayer:auto-transition for all of the timeline's +layers to the same value. See ges_layer_set_auto_transition() if you +wish to set the layer's #GESLayer:auto-transition individually. + + + + + + + The #GESTimeline + + + + Whether transitions should be automatically added +to @timeline's layers + + + + + + Sets #GESTimeline:snapping-distance for the timeline. This new value +will only effect future snappings and will not be used to snap the +current element positions within the timeline. + + + + + + + The #GESTimeline + + + + The snapping distance to use (in nanoseconds) + + + + + + Whether to automatically create a transition whenever two +#GESSource-s overlap in a track of the timeline. See +#GESLayer:auto-transition if you want this to only happen in some +layers. + + + + The current duration (in nanoseconds) of the timeline. A timeline +'starts' at time 0, so this is the maximum end time of all of its +#GESTimelineElement-s. + + + + The distance (in nanoseconds) at which a #GESTimelineElement being +moved within the timeline should snap one of its #GESSource-s with +another #GESSource-s edge. See #GESEditMode for which edges can +snap during an edit. 0 means no snapping. + + + + + + + A list of #GESLayer-s sorted by +priority. NOTE: Do not modify. + + + + + + Deprecated:1.10: (element-type GES.Track): This is not thread +safe, use #ges_timeline_get_tracks instead. + + + + + + + + + + + + + + This signal will be emitted once the changes initiated by +ges_timeline_commit() have been executed in the backend. Use +ges_timeline_commit_sync() if you do not want to have to connect +to this signal. + + + + + + Will be emitted after the group is added to to the timeline. This can +happen when grouping with `ges_container_group`, or by adding +containers to a newly created group. + +Note that this should not be emitted whilst a timeline is being +loaded from its #GESProject asset. You should connect to the +project's #GESProject::loaded signal if you want to know which groups +were created for the timeline. + + + + + + The group that was added to @timeline + + + + + + Will be emitted after the group is removed from the timeline through +`ges_container_ungroup`. Note that @group will no longer contain its +former children, these are held in @children. + +Note that if a group is emptied, then it will no longer belong to the +timeline, but this signal will **not** be emitted in such a case. + + + + + + The group that was removed from @timeline + + + + A list +of #GESContainer-s that _were_ the children of the removed @group + + + + + + + + Will be emitted after the layer is added to the timeline. + +Note that this should not be emitted whilst a timeline is being +loaded from its #GESProject asset. You should connect to the +project's #GESProject::loaded signal if you want to know which +layers were created for the timeline. + + + + + + The layer that was added to @timeline + + + + + + Will be emitted after the layer is removed from the timeline. + + + + + + The layer that was removed from @timeline + + + + + + This will be emitted whenever the timeline needs to determine which +tracks a clip's children should be added to. The track element will +be added to each of the tracks given in the return. If a track +element is selected to go into multiple tracks, it will be copied +into the additional tracks, under the same clip. Note that the copy +will *not* keep its properties or state in sync with the original. + +Connect to this signal once if you wish to control which element +should be added to which track. Doing so will overwrite the default +behaviour, which adds @track_element to all tracks whose +#GESTrack:track-type includes the @track_element's +#GESTrackElement:track-type. + +Note that under the default track selection, if a clip would produce +multiple core children of the same #GESTrackType, it will choose +one of the core children arbitrarily to place in the corresponding +tracks, with a warning for the other core children that are not +placed in the track. For example, this would happen for a #GESUriClip +that points to a file that contains multiple audio streams. If you +wish to choose the stream, you could connect to this signal, and use, +say, ges_uri_source_asset_get_stream_info() to choose which core +source to add. + +When a clip is first added to a timeline, its core elements will +be created for the current tracks in the timeline if they have not +already been created. Then this will be emitted for each of these +core children to select which tracks, if any, they should be added +to. It will then be called for any non-core children in the clip. + +In addition, if a new track element is ever added to a clip in a +timeline (and it is not already part of a track) this will be emitted +to select which tracks the element should be added to. + +Finally, as a special case, if a track is added to the timeline +*after* it already contains clips, then it will request the creation +of the clips' core elements of the corresponding type, if they have +not already been created, and this signal will be emitted for each of +these newly created elements. In addition, this will also be released +for all other track elements in the timeline's clips that have not +yet been assigned a track. However, in this final case, the timeline +will only check whether the newly added track appears in the track +list. If it does appear, the track element will be added to the newly +added track. All other tracks in the returned track list are ignored. + +In this latter case, track elements that are already part of a track +will not be asked if they want to be copied into the new track. If +you wish to do this, you can use ges_clip_add_child_to_track(). + +Note that the returned #GPtrArray should own a new reference to each +of its contained #GESTrack. The timeline will set the #GDestroyNotify +free function on the #GPtrArray to dereference the elements. + + An array of +#GESTrack-s that @track_element should be added to, or %NULL to +not add the element to any track. + + + + + + + The clip that @track_element is being added to + + + + The element being added + + + + + + Will be emitted whenever a snapping event ends. After a snap event +has started (see #GESTimeline::snapping-started), it can later end +because either another timeline edit has occurred (which may or may +not have created a new snapping event), or because the timeline has +been committed. + + + + + + The first element that was snapping + + + + The second element that was snapping + + + + The position where the two objects were to be snapped to + + + + + + Will be emitted whenever an element's movement invokes a snapping +event during an edit (usually of one of its ancestors) because its +start or end point lies within the #GESTimeline:snapping-distance of +another element's start or end point. + +See #GESEditMode to see what can snap during an edit. + +Note that only up to one snapping-started signal will be emitted per +element edit within a timeline. + + + + + + The first element that is snapping + + + + The second element that is snapping + + + + The position where the two objects will snap to + + + + + + Will be emitted after the track is added to the timeline. + +Note that this should not be emitted whilst a timeline is being +loaded from its #GESProject asset. You should connect to the +project's #GESProject::loaded signal if you want to know which +tracks were created for the timeline. + + + + + + The track that was added to @timeline + + + + + + Will be emitted after the track is removed from the timeline. + + + + + + The track that was removed from @timeline + + + + + + + + + parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESTimelineElement will have some temporal extent in its +corresponding #GESTimelineElement:timeline, controlled by its +#GESTimelineElement:start and #GESTimelineElement:duration. This +determines when its content will be displayed, or its effect applied, +in the timeline. Several objects may overlap within a given +#GESTimeline, in which case their #GESTimelineElement:priority is used +to determine their ordering in the timeline. Priority is mostly handled +internally by #GESLayer-s and #GESClip-s. + +A timeline element can have a #GESTimelineElement:parent, +such as a #GESClip, which is responsible for controlling its timing. + +## Editing + +Elements can be moved around in their #GESTimelineElement:timeline by +setting their #GESTimelineElement:start and +#GESTimelineElement:duration using ges_timeline_element_set_start() +and ges_timeline_element_set_duration(). Additionally, which parts of +the underlying content are played in the timeline can be adjusted by +setting the #GESTimelineElement:in-point using +ges_timeline_element_set_inpoint(). The library also provides +ges_timeline_element_edit(), with various #GESEditMode-s, which can +adjust these properties in a convenient way, as well as introduce +similar changes in neighbouring or later elements in the timeline. + +However, a timeline may refuse a change in these properties if they +would place the timeline in an unsupported configuration. See +#GESTimeline for its overlap rules. + +Additionally, an edit may be refused if it would place one of the +timing properties out of bounds (such as a negative time value for +#GESTimelineElement:start, or having insufficient internal +content to last for the desired #GESTimelineElement:duration). + +## Time Coordinates + +There are three main sets of time coordinates to consider when using +timeline elements: + ++ Timeline coordinates: these are the time coordinates used in the + output of the timeline in its #GESTrack-s. Each track share the same + coordinates, so there is only one set of coordinates for the + timeline. These extend indefinitely from 0. The times used for + editing (including setting #GESTimelineElement:start and + #GESTimelineElement:duration) use these coordinates, since these + define when an element is present and for how long the element lasts + for in the timeline. ++ Internal source coordinates: these are the time coordinates used + internally at the element's output. This is only really defined for + #GESTrackElement-s, where it refers to time coordinates used at the + final source pad of the wrapped #GstElement-s. However, these + coordinates may also be used in a #GESClip in reference to its + children. In particular, these are the coordinates used for + #GESTimelineElement:in-point and #GESTimelineElement:max-duration. ++ Internal sink coordinates: these are the time coordinates used + internally at the element's input. A #GESSource has no input, so + these would be undefined. Otherwise, for most #GESTrackElement-s + these will be the same set of coordinates as the internal source + coordinates because the element does not change the timing + internally. Only #GESBaseEffect can support elements where these + are different. See #GESBaseEffect for more information. + +You can determine the timeline time for a given internal source time +in a #GESTrack in a #GESClip using +ges_clip_get_timeline_time_from_internal_time(), and vice versa using +ges_clip_get_internal_time_from_timeline_time(), for the purposes of +editing and setting timings properties. + +## Children Properties + +If a timeline element owns another #GstObject and wishes to expose +some of its properties, it can do so by registering the property as one +of the timeline element's children properties using +ges_timeline_element_add_child_property(). The registered property of +the child can then be read and set using the +ges_timeline_element_get_child_property() and +ges_timeline_element_set_child_property() methods, respectively. Some +sub-classed objects will be created with pre-registered children +properties; for example, to expose part of an underlying #GstElement +that is used internally. The registered properties can be listed with +ges_timeline_element_list_children_properties(). + + + + + + + + + + + + + + + + + + + Gets the priority of the layer the element is in. A #GESGroup may span +several layers, so this would return the highest priority (numerically, +the smallest) amongst them. + + + The priority of the layer @self is in, or +#GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY if @self does not exist in a +layer. + + + + + A #GESTimelineElement + + + + + + Get the "natural" framerate of @self. This is to say, for example +for a #GESVideoUriSource the framerate of the source. + +Note that a #GESAudioSource may also have a natural framerate if it derives +from the same #GESSourceClip asset as a #GESVideoSource, and its value will +be that of the video source. For example, if the uri of a #GESUriClip points +to a file that contains both a video and audio stream, then the corresponding +#GESAudioUriSource will share the natural framerate of the corresponding +#GESVideoUriSource. + + + Whether @self has a natural framerate or not, @framerate_n +and @framerate_d will be set to, respectively, 0 and -1 if it is +not the case. + + + + + The #GESTimelineElement to get "natural" framerate from + + + + The framerate numerator + + + + The framerate denominator + + + + + + Gets the track types that the element can interact with, i.e. the type +of #GESTrack it can exist in, or will create #GESTrackElement-s for. + + + The track types that @self supports. + + + + + A #GESTimelineElement + + + + + + + + + + + + + + + + + + + + Looks up a child property of the element. + +@prop_name can either be in the format "prop-name" or +"TypeName::prop-name", where "prop-name" is the name of the property +to look up (as used in g_object_get()), and "TypeName" is the type name +of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is +useful when two children of different types share the same property +name. + +The first child found with the given "prop-name" property that was +registered with ges_timeline_element_add_child_property() (and of the +type "TypeName", if it was given) will be passed to @child, and the +registered specification of this property will be passed to @pspec. + + + %TRUE if a child corresponding to the property was found, in +which case @child and @pspec are set. + + + + + A #GESTimelineElement + + + + The name of a child property + + + + The return location for the +found child + + + + The return location for the +specification of the child property + + + + + + + + + + + + + + + + + + + + + + + Edits the start time of an element within its timeline in ripple mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and +#GES_EDGE_NONE. + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new start time of @self in ripple mode + + + + + + Edits the end time of an element within its timeline in ripple mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and +#GES_EDGE_END. + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new end time of @self in ripple mode + + + + + + Edits the end time of an element within its timeline in roll mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and +#GES_EDGE_END. + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new end time of @self in roll mode + + + + + + Edits the start time of an element within its timeline in roll mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and +#GES_EDGE_START. + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new start time of @self in roll mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets #GESTimelineElement:duration for the element. + +Whilst the element is part of a #GESTimeline, this is the same as +editing the element with ges_timeline_element_edit() under +#GES_EDIT_MODE_TRIM with #GES_EDGE_END. In particular, the +#GESTimelineElement:duration of the element may be snapped to a +different timeline time difference from the one given. In addition, +setting may fail if it would place the timeline in an unsupported +configuration, or the element does not have enough internal content to +last the desired duration. + + + %TRUE if @duration could be set for @self. + + + + + A #GESTimelineElement + + + + The desired duration in its timeline + + + + + + Sets #GESTimelineElement:in-point for the element. If the new in-point +is above the current #GESTimelineElement:max-duration of the element, +this method will fail. + + + %TRUE if @inpoint could be set for @self. + + + + + A #GESTimelineElement + + + + The in-point, in internal time coordinates + + + + + + Sets #GESTimelineElement:max-duration for the element. If the new +maximum duration is below the current #GESTimelineElement:in-point of +the element, this method will fail. + + + %TRUE if @maxduration could be set for @self. + + + + + A #GESTimelineElement + + + + The maximum duration, in internal time coordinates + + + + + + Sets the #GESTimelineElement:parent for the element. + +This is used internally and you should normally not call this. A +#GESContainer will set the #GESTimelineElement:parent of its children +in ges_container_add() and ges_container_remove(). + +Note, if @parent is not %NULL, @self must not already have a parent +set. Therefore, if you wish to switch parents, you will need to call +this function twice: first to set the parent to %NULL, and then to the +new parent. + +If @parent is not %NULL, you must ensure it already has a +(non-floating) reference to @self before calling this. + + + %TRUE if @parent could be set for @self. + + + + + A #GESTimelineElement +@parent (nullable): New parent of @self + + + + + + + + + Sets the priority of the element within the containing layer. + All priority management is done by GES itself now. +To set #GESEffect priorities #ges_clip_set_top_effect_index should +be used. + + + %TRUE if @priority could be set for @self. + + + + + A #GESTimelineElement + + + + The priority + + + + + + Sets #GESTimelineElement:start for the element. If the element has a +parent, this will also move its siblings with the same shift. + +Whilst the element is part of a #GESTimeline, this is the same as +editing the element with ges_timeline_element_edit() under +#GES_EDIT_MODE_NORMAL with #GES_EDGE_NONE. In particular, the +#GESTimelineElement:start of the element may be snapped to a different +timeline time from the one given. In addition, setting may fail if it +would place the timeline in an unsupported configuration. + + + %TRUE if @start could be set for @self. + + + + + A #GESTimelineElement + + + + The desired start position of the element in its timeline + + + + + + Edits the start time of an element within its timeline in trim mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_TRIM and +#GES_EDGE_START. + + + %TRUE if the trim edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to trim + + + + The new start time of @self in trim mode + + + + + + Register a property of a child of the element to allow it to be +written with ges_timeline_element_set_child_property() and read with +ges_timeline_element_get_child_property(). A change in the property +will also appear in the #GESTimelineElement::deep-notify signal. + +@pspec should be unique from other children properties that have been +registered on @self. + + + %TRUE if the property was successfully registered. + + + + + A #GESTimelineElement + + + + The specification for the property to add + + + + The #GstObject who the property belongs to + + + + + + Create a copy of @self. All the properties of @self are copied into +a new element, with the exception of #GESTimelineElement:parent, +#GESTimelineElement:timeline and #GESTimelineElement:name. Other data, +such the list of a #GESContainer's children, is **not** copied. + +If @deep is %TRUE, then the new element is prepared so that it can be +used in ges_timeline_element_paste() or ges_timeline_paste_element(). +In the case of copying a #GESContainer, this ensures that the children +of @self will also be pasted. The new element should not be used for +anything else and can only be used **once** in a pasting operation. In +particular, the new element itself is not an actual 'deep' copy of +@self, but should be thought of as an intermediate object used for a +single paste operation. + + + The newly create element, +copied from @self. + + + + + The #GESTimelineElement to copy + + + + Whether the copy is needed for pasting + + + + + + See ges_timeline_element_edit_full(), which also gives an error. + +Note that the @layers argument is currently ignored, so you should +just pass %NULL. + + + %TRUE if the edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to edit + + + + A whitelist of layers +where the edit can be performed, %NULL allows all layers in the +timeline. + + + + + + The priority/index of the layer @self should be +moved to. -1 means no move + + + + The edit mode + + + + The edge of @self where the edit should occur + + + + The edit position: a new location for the edge of @self +(in nanoseconds) in the timeline coordinates + + + + + + Edits the element within its timeline by adjusting its +#GESTimelineElement:start, #GESTimelineElement:duration or +#GESTimelineElement:in-point, and potentially doing the same for +other elements in the timeline. See #GESEditMode for details about each +edit mode. An edit may fail if it would place one of these properties +out of bounds, or if it would place the timeline in an unsupported +configuration. + +Note that if you act on a #GESTrackElement, this will edit its parent +#GESClip instead. Moreover, for any #GESTimelineElement, if you select +#GES_EDGE_NONE for #GES_EDIT_MODE_NORMAL or #GES_EDIT_MODE_RIPPLE, this +will edit the toplevel instead, but still in such a way as to make the +#GESTimelineElement:start of @self reach the edit @position. + +Note that if the element's timeline has a +#GESTimeline:snapping-distance set, then the edit position may be +snapped to the edge of some element under the edited element. + +@new_layer_priority can be used to switch @self, and other elements +moved by the edit, to a new layer. New layers may be be created if the +the corresponding layer priority/index does not yet exist for the +timeline. + + + %TRUE if the edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to edit + + + + The priority/index of the layer @self should be +moved to. -1 means no move + + + + The edit mode + + + + The edge of @self where the edit should occur + + + + The edit position: a new location for the edge of @self +(in nanoseconds) in the timeline coordinates + + + + + + Gets several of the children properties of the element. See +ges_timeline_element_get_child_property(). + + + + + + + A #GESTimelineElement + + + + The name of the first child property to get + + + + The return location for the first property, followed +optionally by more name/return location pairs, followed by %NULL + + + + + + Gets the property of a child of the element. + +@property_name can either be in the format "prop-name" or +"TypeName::prop-name", where "prop-name" is the name of the property +to get (as used in g_object_get()), and "TypeName" is the type name of +the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is +useful when two children of different types share the same property +name. + +The first child found with the given "prop-name" property that was +registered with ges_timeline_element_add_child_property() (and of the +type "TypeName", if it was given) will have the corresponding +property copied into @value. + +Note that ges_timeline_element_get_child_properties() may be more +convenient for C programming. + + + %TRUE if the property was found and copied to @value. + + + + + A #GESTimelineElement + + + + The name of the child property to get + + + + The return location for the value + + + + + + Gets the property of a child of the element. Specifically, the property +corresponding to the @pspec used in +ges_timeline_element_add_child_property() is copied into @value. + + + + + + + A #GESTimelineElement + + + + The specification of a registered child property to get + + + + The return location for the value + + + + + + Gets several of the children properties of the element. See +ges_timeline_element_get_child_property(). + + + + + + + A #GESTimelineElement + + + + The name of the first child property to get + + + + The return location for the first property, followed +optionally by more name/return location pairs, followed by %NULL + + + + + + Gets the #GESTimelineElement:duration for the element. + + + The duration of @self (in nanoseconds). + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:in-point for the element. + + + The in-point of @self (in nanoseconds). + + + + + A #GESTimelineElement + + + + + + Gets the priority of the layer the element is in. A #GESGroup may span +several layers, so this would return the highest priority (numerically, +the smallest) amongst them. + + + The priority of the layer @self is in, or +#GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY if @self does not exist in a +layer. + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:max-duration for the element. + + + The max-duration of @self (in nanoseconds). + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:name for the element. + + + The name of @self. + + + + + A #GESTimelineElement + + + + + + Get the "natural" framerate of @self. This is to say, for example +for a #GESVideoUriSource the framerate of the source. + +Note that a #GESAudioSource may also have a natural framerate if it derives +from the same #GESSourceClip asset as a #GESVideoSource, and its value will +be that of the video source. For example, if the uri of a #GESUriClip points +to a file that contains both a video and audio stream, then the corresponding +#GESAudioUriSource will share the natural framerate of the corresponding +#GESVideoUriSource. + + + Whether @self has a natural framerate or not, @framerate_n +and @framerate_d will be set to, respectively, 0 and -1 if it is +not the case. + + + + + The #GESTimelineElement to get "natural" framerate from + + + + The framerate numerator + + + + The framerate denominator + + + + + + Gets the #GESTimelineElement:parent for the element. + + + The parent of @self, or %NULL if +@self has no parent. + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:priority for the element. + + + The priority of @self. + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:start for the element. + + + The start of @self (in nanoseconds). + + + + + A #GESTimelineElement + + + + + + Gets the #GESTimelineElement:timeline for the element. + + + The timeline of @self, or %NULL +if @self has no timeline. + + + + + A #GESTimelineElement + + + + + + Gets the toplevel #GESTimelineElement:parent of the element. + + + The toplevel parent of @self. + + + + + The #GESTimelineElement to get the toplevel parent from + + + + + + Gets the track types that the element can interact with, i.e. the type +of #GESTrack it can exist in, or will create #GESTrackElement-s for. + + + The track types that @self supports. + + + + + A #GESTimelineElement + + + + + + Get a list of children properties of the element, which is a list of +all the specifications passed to +ges_timeline_element_add_child_property(). + + + An array of +#GParamSpec corresponding to the child properties of @self, or %NULL if +something went wrong. + + + + + + + A #GESTimelineElement + + + + The return location for the length of the +returned array + + + + + + Looks up a child property of the element. + +@prop_name can either be in the format "prop-name" or +"TypeName::prop-name", where "prop-name" is the name of the property +to look up (as used in g_object_get()), and "TypeName" is the type name +of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is +useful when two children of different types share the same property +name. + +The first child found with the given "prop-name" property that was +registered with ges_timeline_element_add_child_property() (and of the +type "TypeName", if it was given) will be passed to @child, and the +registered specification of this property will be passed to @pspec. + + + %TRUE if a child corresponding to the property was found, in +which case @child and @pspec are set. + + + + + A #GESTimelineElement + + + + The name of a child property + + + + The return location for the +found child + + + + The return location for the +specification of the child property + + + + + + Paste an element inside the same timeline and layer as @self. @self +**must** be the return of ges_timeline_element_copy() with `deep=TRUE`, +and it should not be changed before pasting. +@self is not placed in the timeline, instead a new element is created, +alike to the originally copied element. Note that the originally +copied element must stay within the same timeline and layer, at both +the point of copying and pasting. + +Pasting may fail if it would place the timeline in an unsupported +configuration. + +After calling this function @element should not be used. In particular, +@element can **not** be pasted again. Instead, you can copy the +returned element and paste that copy (although, this is only possible +if the paste was successful). + +See also ges_timeline_paste_element(). + + + The newly created element, or +%NULL if pasting fails. + + + + + The #GESTimelineElement to paste + + + + The position in the timeline @element should be pasted +to, i.e. the #GESTimelineElement:start value for the pasted element. + + + + + + Remove a child property from the element. @pspec should be a +specification that was passed to +ges_timeline_element_add_child_property(). The corresponding property +will no longer be registered as a child property for the element. + + + %TRUE if the property was successfully un-registered for @self. + + + + + A #GESTimelineElement + + + + The specification for the property to remove + + + + + + Edits the start time of an element within its timeline in ripple mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and +#GES_EDGE_NONE. + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new start time of @self in ripple mode + + + + + + Edits the end time of an element within its timeline in ripple mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and +#GES_EDGE_END. + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new end time of @self in ripple mode + + + + + + Edits the end time of an element within its timeline in roll mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and +#GES_EDGE_END. + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new end time of @self in roll mode + + + + + + Edits the start time of an element within its timeline in roll mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and +#GES_EDGE_START. + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new start time of @self in roll mode + + + + + + Sets several of the children properties of the element. See +ges_timeline_element_set_child_property(). + + + + + + + A #GESTimelineElement + + + + The name of the first child property to set + + + + The value for the first property, followed optionally by more +name/value pairs, followed by %NULL + + + + + + See ges_timeline_element_set_child_property_full(), which also gives an +error. + +Note that ges_timeline_element_set_child_properties() may be more +convenient for C programming. + + + %TRUE if the property was found and set. + + + + + A #GESTimelineElement + + + + The name of the child property to set + + + + The value to set the property to + + + + + + Sets the property of a child of the element. Specifically, the property +corresponding to the @pspec used in +ges_timeline_element_add_child_property() is set to @value. + + + + + + + A #GESTimelineElement + + + + The specification of a registered child property to set + + + + The value to set the property to + + + + + + Sets the property of a child of the element. + +@property_name can either be in the format "prop-name" or +"TypeName::prop-name", where "prop-name" is the name of the property +to set (as used in g_object_set()), and "TypeName" is the type name of +the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is +useful when two children of different types share the same property +name. + +The first child found with the given "prop-name" property that was +registered with ges_timeline_element_add_child_property() (and of the +type "TypeName", if it was given) will have the corresponding +property set to @value. Other children that may have also matched the +property name (and type name) are left unchanged! + + + %TRUE if the property was found and set. + + + + + A #GESTimelineElement + + + + The name of the child property to set + + + + The value to set the property to + + + + + + Sets several of the children properties of the element. See +ges_timeline_element_set_child_property(). + + + + + + + A #GESTimelineElement + + + + The name of the first child property to set + + + + The value for the first property, followed optionally by more +name/value pairs, followed by %NULL + + + + + + Sets #GESTimelineElement:duration for the element. + +Whilst the element is part of a #GESTimeline, this is the same as +editing the element with ges_timeline_element_edit() under +#GES_EDIT_MODE_TRIM with #GES_EDGE_END. In particular, the +#GESTimelineElement:duration of the element may be snapped to a +different timeline time difference from the one given. In addition, +setting may fail if it would place the timeline in an unsupported +configuration, or the element does not have enough internal content to +last the desired duration. + + + %TRUE if @duration could be set for @self. + + + + + A #GESTimelineElement + + + + The desired duration in its timeline + + + + + + Sets #GESTimelineElement:in-point for the element. If the new in-point +is above the current #GESTimelineElement:max-duration of the element, +this method will fail. + + + %TRUE if @inpoint could be set for @self. + + + + + A #GESTimelineElement + + + + The in-point, in internal time coordinates + + + + + + Sets #GESTimelineElement:max-duration for the element. If the new +maximum duration is below the current #GESTimelineElement:in-point of +the element, this method will fail. + + + %TRUE if @maxduration could be set for @self. + + + + + A #GESTimelineElement + + + + The maximum duration, in internal time coordinates + + + + + + Sets the #GESTimelineElement:name for the element. If %NULL is given +for @name, then the library will instead generate a new name based on +the type name of the element, such as the name "uriclip3" for a +#GESUriClip, and will set that name instead. + +If @self already has a #GESTimelineElement:timeline, you should not +call this function with @name set to %NULL. + +You should ensure that, within each #GESTimeline, every element has a +unique name. If you call this function with @name as %NULL, then +the library should ensure that the set generated name is unique from +previously **generated** names. However, if you choose a @name that +interferes with the naming conventions of the library, the library will +attempt to ensure that the generated names will not conflict with the +chosen name, which may lead to a different name being set instead, but +the uniqueness between generated and user-chosen names is not +guaranteed. + + + %TRUE if @name or a generated name for @self could be set. + + + + + A #GESTimelineElement + + + + The name @self should take + + + + + + Sets the #GESTimelineElement:parent for the element. + +This is used internally and you should normally not call this. A +#GESContainer will set the #GESTimelineElement:parent of its children +in ges_container_add() and ges_container_remove(). + +Note, if @parent is not %NULL, @self must not already have a parent +set. Therefore, if you wish to switch parents, you will need to call +this function twice: first to set the parent to %NULL, and then to the +new parent. + +If @parent is not %NULL, you must ensure it already has a +(non-floating) reference to @self before calling this. + + + %TRUE if @parent could be set for @self. + + + + + A #GESTimelineElement +@parent (nullable): New parent of @self + + + + + + + + + Sets the priority of the element within the containing layer. + All priority management is done by GES itself now. +To set #GESEffect priorities #ges_clip_set_top_effect_index should +be used. + + + %TRUE if @priority could be set for @self. + + + + + A #GESTimelineElement + + + + The priority + + + + + + Sets #GESTimelineElement:start for the element. If the element has a +parent, this will also move its siblings with the same shift. + +Whilst the element is part of a #GESTimeline, this is the same as +editing the element with ges_timeline_element_edit() under +#GES_EDIT_MODE_NORMAL with #GES_EDGE_NONE. In particular, the +#GESTimelineElement:start of the element may be snapped to a different +timeline time from the one given. In addition, setting may fail if it +would place the timeline in an unsupported configuration. + + + %TRUE if @start could be set for @self. + + + + + A #GESTimelineElement + + + + The desired start position of the element in its timeline + + + + + + Sets the #GESTimelineElement:timeline of the element. + +This is used internally and you should normally not call this. A +#GESClip will have its #GESTimelineElement:timeline set through its +#GESLayer. A #GESTrack will similarly take care of setting the +#GESTimelineElement:timeline of its #GESTrackElement-s. A #GESGroup +will adopt the same #GESTimelineElement:timeline as its children. + +If @timeline is %NULL, this will stop its current +#GESTimelineElement:timeline from tracking it, otherwise @timeline will +start tracking @self. Note, in the latter case, @self must not already +have a timeline set. Therefore, if you wish to switch timelines, you +will need to call this function twice: first to set the timeline to +%NULL, and then to the new timeline. + + + %TRUE if @timeline could be set for @self. + + + + + A #GESTimelineElement +@timeline (nullable): The #GESTimeline @self should be in + + + + + + + + + Edits the start time of an element within its timeline in trim mode. +See ges_timeline_element_edit() with #GES_EDIT_MODE_TRIM and +#GES_EDGE_START. + + + %TRUE if the trim edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to trim + + + + The new start time of @self in trim mode + + + + + + The duration that the element is in effect for in the timeline (a +time difference in nanoseconds using the time coordinates of the +timeline). For example, for a source element, this would determine +for how long it should output its internal content for. For an +operation element, this would determine for how long its effect +should be applied to any source content. + + + + The initial offset to use internally when outputting content (in +nanoseconds, but in the time coordinates of the internal content). + +For example, for a #GESVideoUriSource that references some media +file, the "internal content" is the media file data, and the +in-point would correspond to some timestamp in the media file. +When playing the timeline, and when the element is first reached at +timeline-time #GESTimelineElement:start, it will begin outputting the +data from the timestamp in-point **onwards**, until it reaches the +end of its #GESTimelineElement:duration in the timeline. + +For elements that have no internal content, this should be kept +as 0. + + + + The full duration of internal content that is available (a time +difference in nanoseconds using the time coordinates of the internal +content). + +This will act as a cap on the #GESTimelineElement:in-point of the +element (which is in the same time coordinates), and will sometimes +be used to limit the #GESTimelineElement:duration of the element in +the timeline. + +For example, for a #GESVideoUriSource that references some media +file, this would be the length of the media file. + +For elements that have no internal content, or whose content is +indefinite, this should be kept as #GST_CLOCK_TIME_NONE. + + + + The name of the element. This should be unique within its timeline. + + + + The parent container of the element. + + + + The priority of the element. + Priority management is now done by GES itself. + + + + Whether the element should be serialized. + + + + The starting position of the element in the timeline (in nanoseconds +and in the time coordinates of the timeline). For example, for a +source element, this would determine the time at which it should +start outputting its internal content. For an operation element, this +would determine the time at which it should start applying its effect +to any source content. + + + + The timeline that the element lies within. + + + + + + + The #GESTimelineElement:parent of the element + + + + The #GESAsset from which the object has been extracted + + + + The #GESTimelineElement:start of the element + + + + The #GESTimelineElement:in-point of the element + + + + The #GESTimelineElement:duration of the element + + + + The #GESTimelineElement:max-duration of the element + + + + The #GESTimelineElement:priority of the element + + + + The #GESTimelineElement:timeline of the element + + + + The #GESTimelineElement:name of the element + + + + + + + + + + + + Emitted when the element has a new child property registered. See +ges_timeline_element_add_child_property(). + +Note that some GES elements will be automatically created with +pre-registered children properties. You can use +ges_timeline_element_list_children_properties() to list these. + + + + + + The child whose property has been registered + + + + The specification for the property that has been registered + + + + + + Emitted when the element has a child property unregistered. See +ges_timeline_element_remove_child_property(). + + + + + + The child whose property has been unregistered + + + + The specification for the property that has been unregistered + + + + + + Emitted when a child of the element has one of its registered +properties set. See ges_timeline_element_add_child_property(). +Note that unlike #GObject::notify, a child property name can not be +used as a signal detail. + + + + + + The child whose property has been set + + + + The specification for the property that been set + + + + + + + The #GESTimelineElement base class. Subclasses should override at least +@set_start @set_inpoint @set_duration @ripple @ripple_end @roll_start +@roll_end and @trim. + +Vmethods in subclasses should apply all the operation they need to but +the real method implementation is in charge of setting the proper field, +and emitting the notify signal. + + + + + + + + + %TRUE if @parent could be set for @self. + + + + + A #GESTimelineElement +@parent (nullable): New parent of @self + + + + + + + + + + + + + %TRUE if @start could be set for @self. + + + + + A #GESTimelineElement + + + + The desired start position of the element in its timeline + + + + + + + + + + %TRUE if @inpoint could be set for @self. + + + + + A #GESTimelineElement + + + + The in-point, in internal time coordinates + + + + + + + + + + %TRUE if @duration could be set for @self. + + + + + A #GESTimelineElement + + + + The desired duration in its timeline + + + + + + + + + + %TRUE if @maxduration could be set for @self. + + + + + A #GESTimelineElement + + + + The maximum duration, in internal time coordinates + + + + + + + + + + %TRUE if @priority could be set for @self. + + + + + A #GESTimelineElement + + + + The priority + + + + + + + + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new start time of @self in ripple mode + + + + + + + + + + %TRUE if the ripple edit of @self completed, %FALSE on +failure. + + + + + The #GESTimelineElement to ripple + + + + The new end time of @self in ripple mode + + + + + + + + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new start time of @self in roll mode + + + + + + + + + + %TRUE if the roll edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to roll + + + + The new end time of @self in roll mode + + + + + + + + + + %TRUE if the trim edit of @self completed, %FALSE on failure. + + + + + The #GESTimelineElement to trim + + + + The new start time of @self in trim mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if a child corresponding to the property was found, in +which case @child and @pspec are set. + + + + + A #GESTimelineElement + + + + The name of a child property + + + + The return location for the +found child + + + + The return location for the +specification of the child property + + + + + + + + + + The track types that @self supports. + + + + + A #GESTimelineElement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The priority of the layer @self is in, or +#GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY if @self does not exist in a +layer. + + + + + A #GESTimelineElement + + + + + + + + + + Whether @self has a natural framerate or not, @framerate_n +and @framerate_d will be set to, respectively, 0 and -1 if it is +not the case. + + + + + The #GESTimelineElement to get "natural" framerate from + + + + The framerate numerator + + + + The framerate denominator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Renders the given text in the specified font, at specified position, and +with the specified background pattern. + + + + + Creates a new #GESTitleClip + + + The newly created #GESTitleClip, +or %NULL if there was an error. + + + + + Get the background used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The color used by @self. + + + + + a #GESTitleClip + + + + + + Get the pango font description used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The pango font description used by @self. + + + + + a #GESTitleClip + + + + + + Get the horizontal aligment used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The horizontal aligment used by @self. + + + + + a #GESTitleClip + + + + + + Get the text currently set on @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The text currently set on @self. + + + + + a #GESTitleClip + + + + + + Get the color used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The color used by @self. + + + + + a #GESTitleClip + + + + + + Get the vertical aligment used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The vertical aligment used by @self. + + + + + a #GESTitleClip + + + + + + Get the horizontal position used by @self. + use #ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + The horizontal position used by @self. + + + + + a #GESTitleClip + + + + + + Get the vertical position used by @self. + use #ges_timeline_element_get_children_property instead + + + The vertical position used by @self. + + + + + a #GESTitleClip + + + + + + Sets the background of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set + + + + The color @self is being set to + + + + + + Sets the color of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set + + + + The color @self is being set to + + + + + + Sets the pango font description of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* + + + + the pango font description + + + + + + Sets the horizontal aligment of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set horizontal alignement of text on + + + + #GESTextHAlign + + + + + + Sets the text this clip will render. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set text on + + + + the text to render. an internal copy of this text will be +made. + + + + + + Sets the vertical aligment of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set vertical alignement of text on + + + + #GESTextVAlign + + + + + + Sets the horizontal position of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set + + + + The horizontal position @self is being set to + + + + + + Sets the vertical position of the text. + use #ges_timeline_element_set_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + the #GESTitleClip* to set + + + + The vertical position @self is being set to + + + + + + The background of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + The color of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + Pango font description string + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + Horizontal alignment of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + The text to diplay + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + Vertical alignent of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + The horizontal position of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + The vertical position of the text + use #ges_timeline_element_set_children_properties or +#ges_timeline_element_get_children_properties instead. +See #GESTitleSource for more information about exposed properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GESTitleSource is a GESTimelineElement that implements the notion +of titles in GES. + + + + + Get the background used by @source. + + + The background used by @source. + + + + + a #GESTitleSource + + + + + + Get the pango font description used by @source. + Use ges_timeline_element_get_child_property instead +(this actually returns a newly allocated string) + + + The pango font description used by this +@source. + + + + + a #GESTitleSource + + + + + + Get the horizontal aligment used by @source. + + + The horizontal aligment used by @source. + + + + + a #GESTitleSource + + + + + + Get the text currently set on the @source. + Use ges_timeline_element_get_child_property instead +(this actually returns a newly allocated string) + + + The text currently set on the @source. + + + + + a #GESTitleSource + + + + + + Get the color used by @source. + + + The color used by @source. + + + + + a #GESTitleSource + + + + + + Get the vertical aligment used by @source. + + + The vertical aligment used by @source. + + + + + a #GESTitleSource + + + + + + Get the horizontal position used by @source. + + + The horizontal position used by @source. + + + + + a #GESTitleSource + + + + + + Get the vertical position used by @source. + + + The vertical position used by @source. + + + + + a #GESTitleSource + + + + + + Sets the color of the background + + + + + + + the #GESTitleSource* to set + + + + the color @self is being set to + + + + + + Set the pango font description this source will use to render +the text. + + + + + + + the #GESTitleSource + + + + the pango font description + + + + + + Sets the vertical aligment of the text. + + + + + + + the #GESTitleSource* to set text on + + + + #GESTextHAlign + + + + + + Sets the text this track element will render. + use ges_track_element_get/set_children_properties on the +GESTrackElement instead + + + + + + + the #GESTitleSource* to set text on + + + + the text to render. an internal copy of this text will be +made. + + + + + + Sets the color of the text. + + + + + + + the #GESTitleSource* to set + + + + the color @self is being set to + + + + + + Sets the vertical aligment of the text. + + + + + + + the #GESTitleSource* to set text on + + + + #GESTextVAlign + + + + + + Sets the horizontal position of the text. + + + + + + + the #GESTitleSource* to set + + + + the horizontal position @self is being set to + + + + + + Sets the vertical position of the text. + + + + + + + the #GESTitleSource* to set + + + + the color @self is being set to + + + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + + + + A #GESTrack acts an output source for a #GESTimeline. Each one +essentially provides an additional #GstPad for the timeline, with +#GESTrack:restriction-caps capabilities. Internally, a track +wraps an #nlecomposition filtered by a #capsfilter. + +A track will contain a number of #GESTrackElement-s, and its role is +to select and activate these elements according to their timings when +the timeline in played. For example, a track would activate a +#GESSource when its #GESTimelineElement:start is reached by outputting +its data for its #GESTimelineElement:duration. Similarly, a +#GESOperation would be activated by applying its effect to the source +data, starting from its #GESTimelineElement:start time and lasting for +its #GESTimelineElement:duration. + +For most users, it will usually be sufficient to add newly created +tracks to a timeline, but never directly add an element to a track. +Whenever a #GESClip is added to a timeline, the clip adds its +elements to the timeline's tracks and assumes responsibility for +updating them. + + + + + Creates a new track with the given track-type and caps. + +If @type is #GES_TRACK_TYPE_VIDEO, and @caps is a subset of +"video/x-raw(ANY)", then a #GESVideoTrack is created. This will +automatically choose a gap creation method suitable for video data. You +will likely want to set #GESTrack:restriction-caps separately. You may +prefer to use the ges_video_track_new() method instead. + +If @type is #GES_TRACK_TYPE_AUDIO, and @caps is a subset of +"audio/x-raw(ANY)", then a #GESAudioTrack is created. This will +automatically choose a gap creation method suitable for audio data, and +will set the #GESTrack:restriction-caps to the default for +#GESAudioTrack. You may prefer to use the ges_audio_track_new() method +instead. + +Otherwise, a plain #GESTrack is returned. You will likely want to set +the #GESTrack:restriction-caps and call +ges_track_set_create_element_for_gap_func() on the returned track. + + + A new track. + + + + + The #GESTrack:track-type for the track + + + + The #GESTrack:caps for the track + + + + + + + + + + + + + + + + + See ges_track_add_element(), which also gives an error. + + + %TRUE if @object was successfully added to @track. + + + + + A #GESTrack + + + + The element to add + + + + + + Adds the given track element to the track, which takes ownership of the +element. + +Note that this can fail if it would break a configuration rule of the +track's #GESTimeline. + +Note that a #GESTrackElement can only be added to one track. + + + %TRUE if @object was successfully added to @track. + + + + + A #GESTrack + + + + The element to add + + + + + + Commits all the pending changes for the elements contained in the +track. + +When changes are made to the timing or priority of elements within a +track, they are not directly executed for the underlying +#nlecomposition and its children. This method will finally execute +these changes so they are reflected in the data output of the track. + +Any pending changes will be executed in the backend. The +#GESTimeline::commited signal will be emitted once this has completed. + +Note that ges_timeline_commit() will call this method on all of its +tracks, so you are unlikely to need to use this directly. + + + %TRUE if pending changes were committed, or %FALSE if nothing +needed to be committed. + + + + + A #GESTrack + + + + + + Get the #GESTrack:caps of the track. + + + The caps of @track. + + + + + A #GESTrack + + + + + + Gets the track elements contained in the track. The returned list is +sorted by the element's #GESTimelineElement:priority and +#GESTimelineElement:start. + + + A list of +all the #GESTrackElement-s in @track. + + + + + + + A #GESTrack + + + + + + Gets the #GESTrack:mixing of the track. + + + Whether @track is mixing. + + + + + A #GESTrack + + + + + + Gets the #GESTrack:restriction-caps of the track. + + + The restriction-caps of @track. + + + + + A #GESTrack + + + + + + Get the timeline this track belongs to. + + + The timeline that @track belongs to, or %NULL if +it does not belong to a timeline. + + + + + A #GESTrack + + + + + + See ges_track_remove_element_full(), which also returns an error. + + + %TRUE if @object was successfully removed from @track. + + + + + A #GESTrack + + + + The element to remove + + + + + + Removes the given track element from the track, which revokes +ownership of the element. + + + %TRUE if @object was successfully removed from @track. + + + + + A #GESTrack + + + + The element to remove + + + + + + Sets the function that will be used to create a #GstElement that can be +used as a source to fill the gaps of the track. A gap is a timeline +region where the track has no #GESTrackElement sources. Therefore, you +are likely to want the #GstElement returned by the function to always +produce 'empty' content, defined relative to the stream type, such as +transparent frames for a video, or mute samples for audio. + +#GESAudioTrack and #GESVideoTrack objects are created with such a +function already set appropriately. + + + + + + + A #GESTrack + + + + The function to be used to create a source +#GstElement that can fill gaps in @track + + + + + + Sets the #GESTrack:mixing for the track. + + + + + + + A #GESTrack + + + + Whether @track should be mixing + + + + + + Sets the #GESTrack:restriction-caps for the track. + + + + + + + A #GESTrack + + + + The new restriction-caps for @track + + + + + + Informs the track that it belongs to the given timeline. Calling this +does not actually add the track to the timeline. For that, you should +use ges_timeline_add_track(), which will also take care of informing +the track that it belongs to the timeline. As such, there is no need +for you to call this method. + + + + + + + A #GESTrack +@timeline (nullable): A #GESTimeline + + + + + + + + + Updates the #GESTrack:restriction-caps of the track using the fields +found in the given caps. Each of the #GstStructure-s in @caps is +compared against the existing structure with the same index in the +current #GESTrack:restriction-caps. If there is no corresponding +existing structure at that index, then the new structure is simply +copied to that index. Otherwise, any fields in the new structure are +copied into the existing structure. This will replace existing values, +and may introduce new ones, but any fields 'missing' in the new +structure are left unchanged in the existing structure. + +For example, if the existing #GESTrack:restriction-caps are +"video/x-raw, width=480, height=360", and the updating caps is +"video/x-raw, format=I420, width=500; video/x-bayer, width=400", then +the new #GESTrack:restriction-caps after calling this will be +"video/x-raw, width=500, height=360, format=I420; video/x-bayer, +width=400". + + + + + + + A #GESTrack + + + + The caps to update the restriction-caps with + + + + + + The capabilities used to choose the output of the #GESTrack's +elements. Internally, this is used to select output streams when +several may be available, by determining whether its #GstPad is +compatible (see #nlecomposition:caps for #nlecomposition). As such, +this is used as a weaker indication of the desired output type of the +track, **before** the #GESTrack:restriction-caps is applied. +Therefore, this should be set to a *generic* superset of the +#GESTrack:restriction-caps, such as "video/x-raw(ANY)". In addition, +it should match with the track's #GESTrack:track-type. + +Note that when you set this property, the #GstCapsFeatures of all its +#GstStructure-s will be automatically set to #GST_CAPS_FEATURES_ANY. + +Once a track has been added to a #GESTimeline, you should not change +this. + +Default value: #GST_CAPS_ANY. + + + + Current duration of the track + +Default value: O + + + + The #nlecomposition:id of the underlying #nlecomposition. + + + + Whether the track should support the mixing of #GESLayer data, such +as composing the video data of each layer (when part of the video +data is transparent, the next layer will become visible) or adding +together the audio data. As such, for audio and video tracks, you'll +likely want to keep this set to %TRUE. + + + + The capabilities that specifies the final output format of the +#GESTrack. For example, for a video track, it would specify the +height, width, framerate and other properties of the stream. + +You may change this property after the track has been added to a +#GESTimeline, but it must remain compatible with the track's +#GESTrack:caps. + +Default value: #GST_CAPS_ANY. + + + + The track type of the track. This controls the type of +#GESTrackElement-s that can be added to the track. This should +match with the track's #GESTrack:caps. + +Once a track has been added to a #GESTimeline, you should not change +this. + + + + + + + The #GESTrack:track-type of the track + + + + + + + + + + + + This signal will be emitted once the changes initiated by +ges_track_commit() have been executed in the backend. In particular, +this will be emitted whenever the underlying #nlecomposition has been +committed (see #nlecomposition::commited). + + + + + + Will be emitted after a track element is added to the track. + + + + + + The element that was added + + + + + + Will be emitted after a track element is removed from the track. + + + + + + The element that was removed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESTrackElement is a #GESTimelineElement that specifically belongs +to a single #GESTrack of its #GESTimelineElement:timeline. Its +#GESTimelineElement:start and #GESTimelineElement:duration specify its +temporal extent in the track. Specifically, a track element wraps some +nleobject, such as an #nlesource or #nleoperation, which can be +retrieved with ges_track_element_get_nleobject(), and its +#GESTimelineElement:start, #GESTimelineElement:duration, +#GESTimelineElement:in-point, #GESTimelineElement:priority and +#GESTrackElement:active properties expose the corresponding nleobject +properties. When a track element is added to a track, its nleobject is +added to the corresponding #nlecomposition that the track wraps. + +Most users will not have to work directly with track elements since a +#GESClip will automatically create track elements for its timeline's +tracks and take responsibility for updating them. The only track +elements that are not automatically created by clips, but a user is +likely to want to create, are #GESEffect-s. + +## Control Bindings for Children Properties + +You can set up control bindings for a track element child property +using ges_track_element_set_control_source(). A +#GstTimedValueControlSource should specify the timed values using the +internal source coordinates (see #GESTimelineElement). By default, +these will be updated to lie between the #GESTimelineElement:in-point +and out-point of the element. This can be switched off by setting +#GESTrackElement:auto-clamp-control-sources to %FALSE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Looks up which @element and @pspec would be effected by the given @name. If various +contained elements have this property name you will get the first one, unless you +specify the class name in @name. + Use #ges_timeline_element_lookup_child + + + TRUE if @element and @pspec could be found. FALSE otherwise. In that +case the values for @pspec and @element are not modified. Unref @element after +usage. + + + + + Object to lookup the property in + + + + Name of the property to look up. You can specify the name of the + class as such: "ClassName::property-name", to guarantee that you get the + proper GParamSpec in case various GstElement-s contain the same property + name. If you don't do so, you will get the first element found, having + this property and the and the corresponding GParamSpec. + + + + pointer to a #GstElement that + takes the real object to set property on + + + + pointer to take the specification + describing the property + + + + + + Adds all the properties of a #GstElement that match the criteria as +children properties of the track element. If the name of @element's +#GstElementFactory is not in @blacklist, and the factory's +#GST_ELEMENT_METADATA_KLASS contains at least one member of +@wanted_categories (e.g. #GST_ELEMENT_FACTORY_KLASS_DECODER), then +all the properties of @element that are also in @whitelist are added as +child properties of @self using +ges_timeline_element_add_child_property(). + +This is intended to be used by subclasses when constructing. + + + + + + + A #GESTrackElement + + + + The child object to retrieve properties from + + + + +An array of element factory "klass" categories to whitelist, or %NULL +to accept all categories + + + + + + A +blacklist of element factory names, or %NULL to not blacklist any +element factory + + + + + + A +whitelist of element property names, or %NULL to whitelist all +writeable properties + + + + + + + + Clamp the #GstTimedValueControlSource for the specified child property +to lie between the #GESTimelineElement:in-point and out-point of the +element. The out-point is the #GES_TIMELINE_ELEMENT_END of the element +translated from the timeline coordinates to the internal source +coordinates of the element. + +If the property does not have a #GstTimedValueControlSource set by +ges_track_element_set_control_source(), nothing happens. Otherwise, if +a timed value for the control source lies before the in-point of the +element, or after its out-point, then it will be removed. At the +in-point and out-point times, a new interpolated value will be placed. + + + + + + + A #GESTrackElement + + + + The name of the child property to clamp the control +source of + + + + + + Edits the element within its track. + use #ges_timeline_element_edit instead. + + + %TRUE if the edit of @object completed, %FALSE on failure. + + + + + The #GESTrackElement to edit + + + + A whitelist of layers +where the edit can be performed, %NULL allows all layers in the +timeline + + + + + + The edit mode + + + + The edge of @object where the edit should occur + + + + The edit position: a new location for the edge of @object +(in nanoseconds) + + + + + + Get all the control bindings that have been created for the children +properties of the track element using +ges_track_element_set_control_source(). The keys used in the returned +hash table are the child property names that were passed to +ges_track_element_set_control_source(), and their values are the +corresponding created #GstControlBinding. + + + A +hash table containing all child-property-name/control-binding pairs +for @trackelement. + + + + + + + + A #GESTrackElement + + + + + + Gets #GESTrackElement:auto-clamp-control-sources. + + + Whether the control sources for the child properties of +@object are automatically clamped. + + + + + A #GESTrackElement + + + + + + Gets properties of a child of @object. + Use #ges_timeline_element_get_child_properties + + + + + + + The origin #GESTrackElement + + + + The name of the first property to get + + + + return location for the first property, followed optionally by more +name/return location pairs, followed by NULL + + + + + + In general, a copy is made of the property contents and +the caller is responsible for freeing the memory by calling +g_value_unset(). + +Gets a property of a GstElement contained in @object. + +Note that #ges_track_element_get_child_property is really +intended for language bindings, #ges_track_element_get_child_properties +is much more convenient for C programming. + Use #ges_timeline_element_get_child_property + + + %TRUE if the property was found, %FALSE otherwise. + + + + + The origin #GESTrackElement + + + + The name of the property + + + + return location for the property value, it will +be initialized if it is initialized with 0 + + + + + + Gets a property of a child of @object. + Use #ges_timeline_element_get_child_property_by_pspec + + + + + + + A #GESTrackElement + + + + The #GParamSpec that specifies the property you want to get + + + + return location for the value + + + + + + Gets a property of a child of @object. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + Use #ges_timeline_element_get_child_property_valist + + + + + + + The #GESTrackElement parent object + + + + The name of the first property to get + + + + Value for the first property, followed optionally by more +name/return location pairs, followed by NULL + + + + + + Gets the control binding that was created for the specified child +property of the track element using +ges_track_element_set_control_source(). The given @property_name must +be the same name of the child property that was passed to +ges_track_element_set_control_source(). + + + The control binding that was +created for the specified child property of @object, or %NULL if +@property_name does not correspond to any control binding. + + + + + A #GESTrackElement + + + + The name of the child property to return the control +binding of + + + + + + Get the #GstElement that the track element's underlying nleobject +controls. + + + The #GstElement being controlled by the +nleobject that @object wraps. + + + + + A #GESTrackElement + + + + + + Get the GNonLin object this object is controlling. + use #ges_track_element_get_nleobject instead. + + + The GNonLin object this object is controlling. + + + + + A #GESTrackElement + + + + + + Get the nleobject that this element wraps. + + + The nleobject that @object wraps. + + + + + A #GESTrackElement + + + + + + Get the #GESTrackElement:track for the element. + + + The track that @object belongs to, +or %NULL if it does not belong to a track. + + + + + A #GESTrackElement + + + + + + Gets the #GESTrackElement:track-type for the element. + + + The track-type of @object. + + + + + A #GESTrackElement + + + + + + Gets #GESTrackElement:has-internal-source for the element. + + + %TRUE if @object can have its 'internal time' properties set. + + + + + A #GESTrackElement + + + + + + Gets #GESTrackElement:active for the element. + + + %TRUE if @object is active in its track. + + + + + A #GESTrackElement + + + + + + Get whether the given track element is a core track element. That is, +it was created by the @create_track_elements #GESClipClass method for +some #GESClip. + +Note that such a track element can only be added to a clip that shares +the same #GESAsset as the clip that created it. For example, you are +allowed to move core children between clips that resulted from +ges_container_ungroup(), but you could not move the core child from a +#GESUriClip to a #GESTitleClip or another #GESUriClip with a different +#GESUriClip:uri. + +Moreover, if a core track element is added to a clip, it will always be +added as a core child. Therefore, if this returns %TRUE, then @element +will be a core child of its parent clip. + + + %TRUE if @element is a core track element. + + + + + A #GESTrackElement + + + + + + Gets an array of #GParamSpec* for all configurable properties of the +children of @object. + Use #ges_timeline_element_list_children_properties + + + An array of #GParamSpec* which should be freed after use or +%NULL if something went wrong. + + + + + + + The #GESTrackElement to get the list of children properties from + + + + return location for the length of the returned array + + + + + + Looks up which @element and @pspec would be effected by the given @name. If various +contained elements have this property name you will get the first one, unless you +specify the class name in @name. + Use #ges_timeline_element_lookup_child + + + TRUE if @element and @pspec could be found. FALSE otherwise. In that +case the values for @pspec and @element are not modified. Unref @element after +usage. + + + + + Object to lookup the property in + + + + Name of the property to look up. You can specify the name of the + class as such: "ClassName::property-name", to guarantee that you get the + proper GParamSpec in case various GstElement-s contain the same property + name. If you don't do so, you will get the first element found, having + this property and the and the corresponding GParamSpec. + + + + pointer to a #GstElement that + takes the real object to set property on + + + + pointer to take the specification + describing the property + + + + + + Removes the #GstControlBinding that was created for the specified child +property of the track element using +ges_track_element_set_control_source(). The given @property_name must +be the same name of the child property that was passed to +ges_track_element_set_control_source(). + + + %TRUE if the control binding was removed from the specified +child property of @object, or %FALSE if an error occurred. + + + + + A #GESTrackElement + + + + The name of the child property to remove the control +binding from + + + + + + Sets #GESTrackElement:active for the element. + + + %TRUE if the property was *toggled*. + + + + + A #GESTrackElement + + + + Whether @object should be active in its track + + + + + + Sets #GESTrackElement:auto-clamp-control-sources. If set to %TRUE, this +will immediately clamp all the control sources. + + + + + + + A #GESTrackElement + + + + Whether to automatically clamp the control sources for the +child properties of @object + + + + + + Sets a property of a child of @object. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + Use #ges_timeline_element_set_child_properties + + + + + + + The #GESTrackElement parent object + + + + The name of the first property to set + + + + value for the first property, followed optionally by more +name/return location pairs, followed by NULL + + + + + + Sets a property of a GstElement contained in @object. + +Note that #ges_track_element_set_child_property is really +intended for language bindings, #ges_track_element_set_child_properties +is much more convenient for C programming. + use #ges_timeline_element_set_child_property instead + + + %TRUE if the property was set, %FALSE otherwise. + + + + + The origin #GESTrackElement + + + + The name of the property + + + + The value + + + + + + Sets a property of a child of @object. + Use #ges_timeline_element_set_child_property_by_spec + + + + + + + A #GESTrackElement + + + + The #GParamSpec that specifies the property you want to set + + + + The value + + + + + + Sets a property of a child of @object. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + Use #ges_timeline_element_set_child_property_valist + + + + + + + The #GESTrackElement parent object + + + + The name of the first property to set + + + + Value for the first property, followed optionally by more +name/return location pairs, followed by NULL + + + + + + Creates a #GstControlBinding for the specified child property of the +track element using the given control source. The given @property_name +should refer to an existing child property of the track element, as +used in ges_timeline_element_lookup_child(). + +If @binding_type is "direct", then the control binding is created with +gst_direct_control_binding_new() using the given control source. If +@binding_type is "direct-absolute", it is created with +gst_direct_control_binding_new_absolute() instead. + + + %TRUE if the specified child property could be bound to +@source, or %FALSE if an error occurred. + + + + + A #GESTrackElement + + + + The control source to bind the child property to + + + + The name of the child property to control + + + + The type of binding to create ("direct" or +"direct-absolute") + + + + + + Sets #GESTrackElement:has-internal-source for the element. If this is +set to %FALSE, this method will also set the +#GESTimelineElement:in-point of the element to 0 and its +#GESTimelineElement:max-duration to #GST_CLOCK_TIME_NONE. + + + %FALSE if @has_internal_source is forbidden for @object and +%TRUE in any other case. + + + + + A #GESTrackElement + + + + Whether the @object should be allowed to have its +'internal time' properties set. + + + + + + Sets the #GESTrackElement:track-type for the element. + + + + + + + A #GESTrackElement + + + + The new track-type for @object + + + + + + Whether the effect of the element should be applied in its +#GESTrackElement:track. If set to %FALSE, it will not be used in +the output of the track. + + + + Whether the control sources on the element (see +ges_track_element_set_control_source()) will be automatically +updated whenever the #GESTimelineElement:in-point or out-point of the +element change in value. + +See ges_track_element_clamp_control_source() for how this is done +per control source. + +Default value: %TRUE + + + + This property is used to determine whether the 'internal time' +properties of the element have any meaning. In particular, unless +this is set to %TRUE, the #GESTimelineElement:in-point and +#GESTimelineElement:max-duration can not be set to any value other +than the default 0 and #GST_CLOCK_TIME_NONE, respectively. + +If an element has some *internal* *timed* source #GstElement that it +reads stream data from as part of its function in a #GESTrack, then +you'll likely want to set this to %TRUE to allow the +#GESTimelineElement:in-point and #GESTimelineElement:max-duration to +be set. + +The default value is determined by the #GESTrackElementClass +@default_has_internal_source class property. For most +#GESSourceClass-es, this will be %TRUE, with the exception of those +that have a potentially *static* source, such as #GESImageSourceClass +and #GESTitleSourceClass. Otherwise, this will usually be %FALSE. + +For most #GESOperation-s you will likely want to leave this set to +%FALSE. The exception may be for an operation that reads some stream +data from some private internal source as part of manipulating the +input data from the usual linked upstream #GESTrackElement. + +For example, you may want to set this to %TRUE for a +#GES_TRACK_TYPE_VIDEO operation that wraps a #textoverlay that reads +from a subtitle file and places its text on top of the received video +data. The #GESTimelineElement:in-point of the element would be used +to shift the initial seek time on the #textoverlay away from 0, and +the #GESTimelineElement:max-duration could be set to reflect the +time at which the subtitle file runs out of data. + +Note that GES can not support track elements that have both internal +content and manipulate the timing of their data streams (time +effects). + + + + The track that this element belongs to, or %NULL if it does not +belong to a track. + + + + The track type of the element, which determines the type of track the +element can be added to (see #GESTrack:track-type). This should +correspond to the type of data that the element can produce or +process. + + + + + + + + + + + + + + + + + + + + + This is emitted when a control binding is added to a child property +of the track element. + + + + + + The control binding that has been added + + + + + + This is emitted when a control binding is removed from a child +property of the track element. + + + + + + The control binding that has been removed + + + + + + + + + + + + Result: %TRUE if @self has a natural framerate %FALSE otherwise + + + + + + + A #GESAsset + + + + The framerate numerator + + + + The framerate denominator + + + + + + Result: %TRUE if @self has a natural framerate %FALSE otherwise + + + + + + + A #GESAsset + + + + The framerate numerator + + + + The framerate denominator + + + + + + Get the GESAssetTrackType the #GESTrackElement extracted from @self +should get into + + + a #GESTrackType + + + + + A #GESAsset + + + + + + Set the #GESTrackType the #GESTrackElement extracted from @self +should get into + + + + + + + A #GESAsset + + + + A #GESTrackType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESAsset + + + + The framerate numerator + + + + The framerate denominator + + + + + + + + + + + + + + + + + + + + + The name of the #GstElementFactory to use to +create the underlying nleobject of a track element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TRUE if @element and @pspec could be found. FALSE otherwise. In that +case the values for @pspec and @element are not modified. Unref @element after +usage. + + + + + Object to lookup the property in + + + + Name of the property to look up. You can specify the name of the + class as such: "ClassName::property-name", to guarantee that you get the + proper GParamSpec in case various GstElement-s contain the same property + name. If you don't do so, you will get the first element found, having + this property and the and the corresponding GParamSpec. + + + + pointer to a #GstElement that + takes the real object to set property on + + + + pointer to take the specification + describing the property + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Types of content handled by a track. If the content is not one of +@GES_TRACK_TYPE_AUDIO, @GES_TRACK_TYPE_VIDEO or @GES_TRACK_TYPE_TEXT, +the user of the #GESTrack must set the type to @GES_TRACK_TYPE_CUSTOM. + +@GES_TRACK_TYPE_UNKNOWN is for internal purposes and should not be used +by users + + A track of unknown type (i.e. invalid) + + + An audio track + + + A video track + + + A text (subtitle) track + + + A custom-content track + + + + + + + + + + + + + + + Base class for media transitions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates an object that mixes together the two underlying objects, A and B. +The A object is assumed to have a higher prioirity (lower number) than the +B object. At the transition in point, only A will be visible, and by the +end only B will be visible. + +The shape of the video transition depends on the value of the "vtype" +property. The default value is "crossfade". For audio, only "crossfade" is +supported. + +The ID of the ExtractableType is the nickname of the vtype property value. Note +that this value can be changed after creation and the GESExtractable.asset value +will be updated when needed. + + + + + Creates a new #GESTransitionClip. + + + a newly created #GESTransitionClip, +or %NULL if something went wrong. + + + + + the type of transition to create + + + + + + Creates a new #GESTransitionClip for the provided @nick. + + + The newly created #GESTransitionClip, +or %NULL if something went wrong + + + + + a string representing the type of transition to create + + + + + + a #GESVideoStandardTransitionType representing the wipe to use + + + + + + + a #GESVideoStandardTransitionType indicating the type of video transition +to apply. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents all the output streams from a particular uri. It is assumed that +the URI points to a file of some type. + + + + + Creates a new #GESUriClip for the provided @uri. + +> **WARNING**: This function might 'discover` @uri **synchrounously**, it is +> an IO and processing intensive task that you probably don't want to run in +> an application mainloop. Have a look at #ges_asset_request_async to see how +> to make that operation happen **asynchronously**. + + + The newly created #GESUriClip, or +%NULL if there was an error. + + + + + the URI the source should control + + + + + + Get the location of the resource. + + + The location of the resource. + + + + + the #GESUriClip + + + + + + Lets you know if @self is an image or not. + + + %TRUE if @self is a still image %FALSE otherwise. + + + + + the #GESUriClip + + + + + + Lets you know if the audio track of @self is muted or not. + + + %TRUE if the audio track of @self is muted, %FALSE otherwise. + + + + + the #GESUriClip + + + + + + Sets whether the clip is a still image or not. + + + + + + + the #GESUriClip + + + + %TRUE if @self is a still image, %FALSE otherwise + + + + + + Sets whether the audio track of this clip is muted or not. + + + + + + + the #GESUriClip on which to mute or unmute the audio track + + + + %TRUE to mute @self audio track, %FALSE to unmute it + + + + + + Whether this uri clip represents a still image or not. This must be set +before create_track_elements is called. + + + + Whether the sound will be played or not. + + + + + + + The location of the file/resource to use. + + + + + + + + + + + + + + + + + + + + + Finalize the request of an async #GESUriClipAsset + + + The #GESUriClipAsset previously requested + + + + + The #GAsyncResult from which to get the newly created #GESUriClipAsset + + + + + + Creates a #GESUriClipAsset for @uri + +Example of request of a GESUriClipAsset: +|[ +// The request callback +static void +filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data) +{ + GError *error = NULL; + GESUriClipAsset *filesource_asset; + + filesource_asset = ges_uri_clip_asset_finish (res, &error); + if (filesource_asset) { + g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT, + ges_asset_get_id (GES_ASSET (filesource_asset)) + ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not", + GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset)); + } else { + g_print ("The file: %s is *not* usable as a FileSource because: %s", + ges_asset_get_id (source), error->message); + } + + gst_object_unref (mfs); +} + +// The request: +ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data); +]| + + + + + + + The URI of the file for which to create a #GESUriClipAsset + + + + optional %GCancellable object, %NULL to ignore. + + + + a #GAsyncReadyCallback to call when the initialization is finished + + + + The user data to pass when @callback is called + + + + + + Creates a #GESUriClipAsset for @uri syncronously. You should avoid +to use it in application, and rather create #GESUriClipAsset asynchronously + + + A reference to the requested asset or %NULL if +an error happened + + + + + The URI of the file for which to create a #GESUriClipAsset. +You can also use multi file uris for #GESMultiFileSource. + + + + + + Gets duration of the file represented by @self + + + The duration of @self + + + + + a #GESUriClipAsset + + + + + + Gets #GstDiscovererInfo about the file + + + #GstDiscovererInfo of specified asset + + + + + Target asset + + + + + + Gets maximum duration of the file represented by @self, +it is usually the same as GESUriClipAsset::duration, +but in the case of nested timelines, for example, they +are different as those can be extended 'infinitely'. + + + The maximum duration of @self + + + + + a #GESUriClipAsset + + + + + + Get the GESUriSourceAsset @self containes + + + a +#GList of #GESUriSourceAsset + + + + + + + A #GESUriClipAsset + + + + + + Gets Whether the file represented by @self is an image or not + + + Whether the file represented by @self is an image or not + + + + + a #GESUriClipAsset + + + + + + The duration (in nanoseconds) of the media file + + + + The duration (in nanoseconds) of the media file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the timeout of #GESUriClipAsset loading + + + + + + + The #GESUriClipAssetClass on which to set the discoverer timeout + + + + The timeout to set + + + + + + + + + + + + + + + + + + + + + + + + Asset to create a stream specific #GESSource for a media file. + +NOTE: You should never request such a #GESAsset as they will be created automatically +by #GESUriClipAsset-s. + + + + + + Get the #GESUriClipAsset @self is contained in + + + a #GESUriClipAsset + + + + + A #GESUriClipAsset + + + + + + Get the #GstDiscovererStreamInfo user by @asset + + + a #GESUriClipAsset + + + + + A #GESUriClipAsset + + + + + + + + + + + + + + + + + Check if @asset contains a single image + + + %TRUE if the video stream corresponds to an image (i.e. only +contains one frame) + + + + + A #GESUriClipAsset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for video sources + + + + + Retrieves the natural size of the video stream. The natural size, is +the size at which it will be displayed if no scaling is being applied. + +NOTE: The sources take into account the potential video rotation applied +by the #videoflip element that is inside the source, effects applied on +the clip which potentially also rotate the element are not taken into +account. + + + %TRUE if the object has a natural size, %FALSE otherwise. + + + + + A #GESVideoSource + + + + The natural width of the underlying source + + + + The natural height of the underlying source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Transition type has not been set, + + + A bar moves from left to right, + + + A bar moves from top to bottom, + + + A box expands from the upper-left corner to the lower-right corner, + + + A box expands from the upper-right corner to the lower-left corner, + + + A box expands from the lower-right corner to the upper-left corner, + + + A box expands from the lower-left corner to the upper-right corner, + + + A box shape expands from each of the four corners toward the center, + + + A box shape expands from the center of each quadrant toward the corners of each quadrant, + + + A central, vertical line splits and expands toward the left and right edges, + + + A central, horizontal line splits and expands toward the top and bottom edges, + + + A box expands from the top edge's midpoint to the bottom corners, + + + A box expands from the right edge's midpoint to the left corners, + + + A box expands from the bottom edge's midpoint to the top corners, + + + A box expands from the left edge's midpoint to the right corners, + + + A diagonal line moves from the upper-left corner to the lower-right corner, + + + A diagonal line moves from the upper right corner to the lower-left corner, + + + Two wedge shapes slide in from the top and bottom edges toward the center, + + + Two wedge shapes slide in from the left and right edges toward the center, + + + A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners, + + + A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners, + + + Four wedge shapes split from the center and retract toward the four edges, + + + A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges, + + + A wedge shape moves from top to bottom, + + + A wedge shape moves from right to left, + + + A wedge shape moves from bottom to top, + + + A wedge shape moves from left to right, + + + A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + + + A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + + + A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + + + A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + + + A rectangle expands from the center., + + + A radial hand sweeps clockwise from the twelve o'clock position, + + + A radial hand sweeps clockwise from the three o'clock position, + + + A radial hand sweeps clockwise from the six o'clock position, + + + A radial hand sweeps clockwise from the nine o'clock position, + + + Two radial hands sweep clockwise from the twelve and six o'clock positions, + + + Two radial hands sweep clockwise from the nine and three o'clock positions, + + + Four radial hands sweep clockwise, + + + A fan unfolds from the top edge, the fan axis at the center, + + + A fan unfolds from the right edge, the fan axis at the center, + + + Two fans, their axes at the center, unfold from the top and bottom, + + + Two fans, their axes at the center, unfold from the left and right, + + + A radial hand sweeps clockwise from the top edge's midpoint, + + + A radial hand sweeps clockwise from the right edge's midpoint, + + + A radial hand sweeps clockwise from the bottom edge's midpoint, + + + A radial hand sweeps clockwise from the left edge's midpoint, + + + Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints, + + + Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints, + + + Two radial hands attached at the top and bottom edges' midpoints sweep from right to left, + + + Two radial hands attached at the left and right edges' midpoints sweep from top to bottom, + + + A fan unfolds from the bottom, the fan axis at the top edge's midpoint, + + + A fan unfolds from the left, the fan axis at the right edge's midpoint, + + + A fan unfolds from the top, the fan axis at the bottom edge's midpoint, + + + A fan unfolds from the right, the fan axis at the left edge's midpoint, + + + Two fans, their axes at the top and bottom, unfold from the center, + + + Two fans, their axes at the left and right, unfold from the center, + + + A radial hand sweeps clockwise from the upper-left corner, + + + A radial hand sweeps counter-clockwise from the lower-left corner., + + + A radial hand sweeps clockwise from the lower-right corner, + + + A radial hand sweeps counter-clockwise from the upper-right corner, + + + Two radial hands attached at the upper-left and lower-right corners sweep down and up, + + + Two radial hands attached at the lower-left and upper-right corners sweep down and up, + + + Two radial hands attached at the upper-left and upper-right corners sweep down, + + + Two radial hands attached at the upper-left and lower-left corners sweep to the right, + + + Two radial hands attached at the lower-left and lower-right corners sweep up, + + + Two radial hands attached at the upper-right and lower-right corners sweep to the left, + + + Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left, + + + Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom, + + + Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top, + + + Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left, + + + Crossfade + + + + The test pattern to produce + + A standard SMPTE test pattern + + + Random noise + + + A black image + + + A white image + + + A red image + + + A green image + + + A blue image + + + Checkers pattern (1px) + + + Checkers pattern (2px) + + + Checkers pattern (4px) + + + Checkers pattern (8px) + + + Circular pattern + + + Alternate between black and white + + + SMPTE test pattern (75% color bars) + + + Zone plate + + + Gamut checkers + + + Chroma zone plate + + + Solid color + + + + ### Children Properties + + {{ libs/GESVideoTestSource-children-props.md }} + + + + + Get the video pattern used by the @source. + + + The video pattern used by the @source. + + + + + a #GESVideoTestPattern + + + + + + Sets the source to use the given @pattern. + + + + + + + a #GESVideoTestSource + + + + a #GESVideoTestPattern + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GESVideoTrack is a default video #GESTrack, with a +#GES_TRACK_TYPE_VIDEO #GESTrack:track-type and "video/x-raw(ANY)" +#GESTrack:caps. + +By default, a video track will have its #GESTrack:restriction-caps +set to "video/x-raw" with the following properties: + +- width: 1280 +- height: 720 +- framerate: 30/1 + +These fields are needed for negotiation purposes, but you can change +their values if you wish. It is advised that you do so using +ges_track_update_restriction_caps() with new values for the fields you +wish to change, and any additional fields you may want to add. Unlike +using ges_track_set_restriction_caps(), this will ensure that these +default fields will at least have some value set. + + + + + Creates a new video track, with a #GES_TRACK_TYPE_VIDEO +#GESTrack:track-type and "video/x-raw(ANY)" #GESTrack:caps, and +"video/x-raw" #GESTrack:restriction-caps with the properties: + +- width: 1280 +- height: 720 +- framerate: 30/1 + +You should use ges_track_update_restriction_caps() if you wish to +modify these fields, or add additional ones. + + + The newly created video track. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the border property of @self, this value represents +the border width of the transition. + + + The border values of @self or -1 if not meaningful +(this will happen when not using a smpte transition). + + + + + The #GESVideoTransition to get the border from + + + + + + Get the transition type used by @trans. + + + The transition type used by @trans. + + + + + a #GESVideoTransition + + + + + + Get the invert property of @self, this value represents +the direction of the transition. + + + The invert value of @self + + + + + The #GESVideoTransition to get the inversion from + + + + + + Set the border property of @self, this value represents +the border width of the transition. In case this value does +not make sense for the current transition type, it is cached +for later use. + + + + + + + The #GESVideoTransition to set the border to + + + + The value of the border to set on @object + + + + + + Set the invert property of @self, this value represents +the direction of the transition. In case this value does +not make sense for the current transition type, it is cached +for later use. + + + + + + + The #GESVideoTransition to set invert on + + + + %TRUE if the transition should be inverted %FALSE otherwise + + + + + + Sets the transition being used to @type. + + + %TRUE if the transition type was properly changed, else %FALSE. + + + + + a #GESVideoTransition + + + + a #GESVideoStandardTransitionType + + + + + + This value represents the border width of the transition. + + + + This value represents the direction of the transition. + + + + + + + + + + + + + + + + + + + + + parent class + + + + + + + + + + + + + ### Children Properties + + {{ libs/GESVideoUriSource-children-props.md }} + + + + + The location of the file/resource to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Clean up any resources created by GES in ges_init(). + +It is normally not needed to call this function in a normal application as the +resources will automatically be freed when the program terminates. +This function is therefore mostly used by testsuites and other memory profiling tools. +This function should be called from the thread where ges_init() was called. + +After this call GES should not be used until another ges_init() call. + + + + + + + + + + + + + + + + + + Return a string representation of @mode. + + + a string representation of @mode. + + + + + a #GESEditMode + + + + + + Get the best formatter for @uri. It tries to find a formatter +compatible with @uri extension, if none is found, it returns the default +formatter asset. + + + The #GESAsset for the best formatter to save to @uri + + + + + + + + + + Initialize the GStreamer Editing Service. Call this before any usage of +GES. You should take care of initilizing GStreamer before calling this +function. + +MT safety. +GStreamer Editing Services do not guarantee MT safety. +An application is required to use GES APIs (including ges_deinit()) +in the thread where ges_init() was called. + + + + + + + Initializes the GStreamer Editing Services library, setting up internal path lists, +and loading evrything needed. + +This function will return %FALSE if GES could not be initialized +for some reason. + + + %TRUE if GES could be initialized. + + + + + pointer to application's argc + + + + pointer to application's argv + + + + + + + + Returns a #GOptionGroup with GES's argument specifications. The +group is set up to use standard GOption callbacks, so when using this +group in combination with GOption parsing methods, all argument parsing +and initialization is automated. + +This function is useful if you want to integrate GES with other +libraries that use GOption (see g_option_context_add_group() ). + +If you use this function, you should make sure you initialise the GStreamer +as one of the very first things in your program. That means you need to +use gst_init_get_option_group() and add it to the option context before +using the ges_init_get_option_group() result. + + + a pointer to GES's option group. + + + + + Use this function to check if GES has been initialized with ges_init() +or ges_init_check(). + + + %TRUE if initialization has been done, %FALSE otherwise. + + + + + List all the assets in the current cache whose +#GESAsset:extractable-type are of the given type (including +subclasses). + +Note that, since only a #GESExtractable can be extracted from an asset, +using `GES_TYPE_EXTRACTABLE` as @filter will return all the assets in +the current cache. + + + A list of all +#GESAsset-s currently in the cache whose #GESAsset:extractable-type is +of the @filter type. + + + + + + + The type of object that can be extracted from the asset + + + + + + Get the last buffer @playsink showed + Use the "convert-sample" action signal of +#playsink instead. + + + A #GstSample containing the last frame from +@playsink in the format defined by the @caps + + + + + The playsink to get last frame from + + + + The caps defining the format the return value will have + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper macro to retrieve the project from which @obj was extracted + + + + The #GESTimeline from which to retrieve the project + + + + + + + + + + + + + + + + + + + + + + Gets the version number of the GStreamer Editing Services library. + + + + + + + pointer to a guint to store the major version number + + + + pointer to a guint to store the minor version number + + + + pointer to a guint to store the micro version number + + + + pointer to a guint to store the nano version number + + + + + + diff --git a/girs/Gst-1.0.gir b/girs/Gst-1.0.gir new file mode 100644 index 0000000000..9c00ee001c --- /dev/null +++ b/girs/Gst-1.0.gir @@ -0,0 +1,79314 @@ + + + + + + + + + + + A datatype to hold the handle to an outstanding sync or async clock callback. + + + + + A datatype to hold a time, measured in nanoseconds. + + + + + A datatype to hold a time difference, measured in nanoseconds. + + + + + A type defining the type of an element factory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The allocator name for the default system memory allocator + + + + + Parameters to control the allocation of memory + + + flags to control allocation + + + + the desired alignment of the memory + + + + the desired prefix + + + + the desired padding + + + + + + + + + Create a copy of @params. + +Free-function: gst_allocation_params_free + + + a new ##GstAllocationParams, free with +gst_allocation_params_free(). + + + + + a #GstAllocationParams + + + + + + Free @params + + + + + + + a #GstAllocationParams + + + + + + Initialize @params to its default values + + + + + + + a #GstAllocationParams + + + + + + + Memory is usually created by allocators with a gst_allocator_alloc() +method call. When %NULL is used as the allocator, the default allocator will +be used. + +New allocators can be registered with gst_allocator_register(). +Allocators are identified by name and can be retrieved with +gst_allocator_find(). gst_allocator_set_default() can be used to change the +default allocator. + +New memory can be created with gst_memory_new_wrapped() that wraps the memory +allocated elsewhere. + + + Find a previously registered allocator with @name. When @name is %NULL, the +default allocator will be returned. + + + a #GstAllocator or %NULL when +the allocator with @name was not registered. Use gst_object_unref() +to release the allocator after usage. + + + + + the name of the allocator + + + + + + Registers the memory @allocator with @name. This function takes ownership of +@allocator. + + + + + + + the name of the allocator + + + + #GstAllocator + + + + + + Use @allocator to allocate a new memory block with memory that is at least +@size big. + +The optional @params can specify the prefix and padding for the memory. If +%NULL is passed, no flags, no extra prefix/padding and a default alignment is +used. + +The prefix/padding will be filled with 0 if flags contains +#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. + +When @allocator is %NULL, the default allocator will be used. + +The alignment in @params is given as a bitmask so that @align + 1 equals +the amount of bytes to align to. For example, to align to 8 bytes, +use an alignment of 7. + + + a new #GstMemory. + + + + + a #GstAllocator to use + + + + size of the visible memory area + + + + optional parameters + + + + + + Free @memory that was previously allocated with gst_allocator_alloc(). + + + + + + + a #GstAllocator to use + + + + the memory to free + + + + + + Use @allocator to allocate a new memory block with memory that is at least +@size big. + +The optional @params can specify the prefix and padding for the memory. If +%NULL is passed, no flags, no extra prefix/padding and a default alignment is +used. + +The prefix/padding will be filled with 0 if flags contains +#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. + +When @allocator is %NULL, the default allocator will be used. + +The alignment in @params is given as a bitmask so that @align + 1 equals +the amount of bytes to align to. For example, to align to 8 bytes, +use an alignment of 7. + + + a new #GstMemory. + + + + + a #GstAllocator to use + + + + size of the visible memory area + + + + optional parameters + + + + + + Free @memory that was previously allocated with gst_allocator_alloc(). + + + + + + + a #GstAllocator to use + + + + the memory to free + + + + + + Set the default allocator. This function takes ownership of @allocator. + + + + + + + a #GstAllocator + + + + + + + + + + + + the implementation of the GstMemoryMapFunction + + + + the implementation of the GstMemoryUnmapFunction + + + + the implementation of the GstMemoryCopyFunction + + + + the implementation of the GstMemoryShareFunction + + + + the implementation of the GstMemoryIsSpanFunction + + + + the implementation of the GstMemoryMapFullFunction. + Will be used instead of @mem_map if present. (Since: 1.6) + + + + the implementation of the GstMemoryUnmapFullFunction. + Will be used instead of @mem_unmap if present. (Since: 1.6) + + + + + + + + + + + + + The #GstAllocator is used to create new memory. + + + Object parent class + + + + + + + a new #GstMemory. + + + + + a #GstAllocator to use + + + + size of the visible memory area + + + + optional parameters + + + + + + + + + + + + + + a #GstAllocator to use + + + + the memory to free + + + + + + + + + + + + + Flags for allocators. + + The allocator has a custom alloc function. + + + first flag that can be used for custom purposes + + + + + + + The #GstAtomicQueue object implements a queue that can be used from multiple +threads without performing any blocking operations. + + + Create a new atomic queue instance. @initial_size will be rounded up to the +nearest power of 2 and used as the initial size of the queue. + + + a new #GstAtomicQueue + + + + + initial queue size + + + + + + Get the amount of items in the queue. + + + the number of elements in the queue. + + + + + a #GstAtomicQueue + + + + + + Peek the head element of the queue without removing it from the queue. + + + the head element of @queue or +%NULL when the queue is empty. + + + + + a #GstAtomicQueue + + + + + + Get the head element of the queue. + + + the head element of @queue or %NULL when +the queue is empty. + + + + + a #GstAtomicQueue + + + + + + Append @data to the tail of the queue. + + + + + + + a #GstAtomicQueue + + + + the data + + + + + + Increase the refcount of @queue. + + + + + + + a #GstAtomicQueue + + + + + + Unref @queue and free the memory when the refcount reaches 0. + + + + + + + a #GstAtomicQueue + + + + + + + + + + + + + + + + + + + + + Gets the list with children in a bin. + + + + a #GstBin + + + + + Gets the children cookie that watches the children list. + + + + a #GstBin + + + + + + + + + + + + + + + + + + + Check if @bin will resync its state change when elements are added and +removed. + + + + A #GstBin + + + + + Gets the number of children in a bin. + + + + a #GstBin + + + + + + + + + + + + + + + + + + + Combination of all possible fields that can be copied with +gst_buffer_copy_into(). + + + + + Combination of all possible metadata fields that can be copied with +gst_buffer_copy_into(). + + + + + The decoding timestamp (dts) in nanoseconds (as a #GstClockTime) +of the data in the buffer. This is the timestamp when the media should be +decoded or processed otherwise. +Value will be %GST_CLOCK_TIME_NONE if the dts is unknown. + + + + a #GstBuffer.: + + + + + Tests if the dts is known. + + + + a #GstBuffer + + + + + Returns the buffer decoding timestamp (dts) if valid, else the buffer +presentation time (pts) + + + + a #GstBuffer.: + + + + + The duration in nanoseconds (as a #GstClockTime) of the data in the buffer. +Value will be %GST_CLOCK_TIME_NONE if the duration is unknown. + + + + a #GstBuffer. + + + + + Tests if the duration is known. + + + + a #GstBuffer + + + + + A flags word containing #GstBufferFlags flags set on this buffer. + + + + a #GstBuffer. + + + + + Gives the status of a specific flag on a buffer. + + + + a #GstBuffer. + + + the #GstBufferFlags flag to check. + + + + + Sets a buffer flag on a buffer. + + + + a #GstBuffer. + + + the #GstBufferFlags flag to set. + + + + + Clears a buffer flag. + + + + a #GstBuffer. + + + the #GstBufferFlags flag to clear. + + + + + Tests if the buffer marks a discontinuity in the stream. + + + + a #GstBuffer + + + + + + + + + + + + + + + + + + + The offset in the source file of the beginning of this buffer. + + + + a #GstBuffer. + + + + + The offset in the source file of the end of this buffer. + + + + a #GstBuffer. + + + + + Tests if the end offset is known. + + + + a #GstBuffer + + + + + Tests if the start offset is known. + + + + a #GstBuffer + + + + + Constant for no-offset return results. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Check if the bufferpool is flushing. Subclasses might want to check the +state of the pool in the acquire function. + + + + a GstBufferPool + + + + + The presentation timestamp (pts) in nanoseconds (as a #GstClockTime) +of the data in the buffer. This is the timestamp when the media should be +presented to the user. +Value will be %GST_CLOCK_TIME_NONE if the pts is unknown. + + + + a #GstBuffer.: + + + + + Tests if the pts is known. + + + + a #GstBuffer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstBin is an element that can contain other #GstElement, allowing them to be +managed as a group. +Pads from the child elements can be ghosted to the bin, see #GstGhostPad. +This makes the bin look like any other elements and enables creation of +higher-level abstraction elements. + +A new #GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you +want to create a toplevel bin because a normal bin doesn't have a bus or +handle clock distribution of its own. + +After the bin has been created you will typically add elements to it with +gst_bin_add(). You can remove elements with gst_bin_remove(). + +An element can be retrieved from a bin with gst_bin_get_by_name(), using the +elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal +purposes and will query the parent bins when the element is not found in the +current bin. + +An iterator of elements in a bin can be retrieved with +gst_bin_iterate_elements(). Various other iterators exist to retrieve the +elements in a bin. + +gst_object_unref() is used to drop your reference to the bin. + +The #GstBin::element-added signal is fired whenever a new element is added to +the bin. Likewise the #GstBin::element-removed signal is fired whenever an +element is removed from the bin. + +## Notes + +A #GstBin internally intercepts every #GstMessage posted by its children and +implements the following default behaviour for each of them: + +* GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING +state. If all sinks posted the EOS message, this bin will post and EOS +message upwards. + +* GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. +The messages are used to decide when all elements have completed playback +of their segment. + +* GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted +a SEGMENT_START have posted a SEGMENT_DONE. + +* GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change +in the stream duration. The duration change is posted to the +application so that it can refetch the new duration with a duration +query. Note that these messages can be posted before the bin is +prerolled, in which case the duration query might fail. Note also that +there might be a discrepancy (due to internal buffering/queueing) between the +stream being currently displayed and the returned duration query. +Applications might want to also query for duration (and changes) by +listening to the GST_MESSAGE_STREAM_START message, signaling the active start +of a (new) stream. + +* GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it +can no longer provide a clock. The default bin behaviour is to +check if the lost clock was the one provided by the bin. If so and +the bin is currently in the PLAYING state, the message is forwarded to +the bin parent. +This message is also generated when a clock provider is removed from +the bin. If this message is received by the application, it should +PAUSE the pipeline and set it back to PLAYING to force a new clock +distribution. + +* GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element +can provide a clock. This mostly happens when a new clock +provider is added to the bin. The default behaviour of the bin is to +mark the currently selected clock as dirty, which will perform a clock +recalculation the next time the bin is asked to provide a clock. +This message is never sent tot the application but is forwarded to +the parent of the bin. + +* OTHERS: posted upwards. + +A #GstBin implements the following default behaviour for answering to a +#GstQuery: + +* GST_QUERY_DURATION: The bin will forward the query to all sink +elements contained within and will return the maximum value. +If no sinks are available in the bin, the query fails. + +* GST_QUERY_POSITION:The query is sent to all sink elements in the bin and the +MAXIMUM of all values is returned. If no sinks are available in the bin, +the query fails. + +* OTHERS:the query is forwarded to all sink elements, the result +of the first sink that answers the query successfully is returned. If no +sink is in the bin, the query fails. + +A #GstBin will by default forward any event sent to it to all sink +(#GST_EVENT_TYPE_DOWNSTREAM) or source (#GST_EVENT_TYPE_UPSTREAM) elements +depending on the event type. +If all the elements return %TRUE, the bin will also return %TRUE, else %FALSE +is returned. If no elements of the required type are in the bin, the event +handler will return %TRUE. + + + + Creates a new bin with the given name. + + + a new #GstBin + + + + + the name of the new bin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds the given element to the bin. Sets the element's parent, and thus +takes ownership of the element. An element can only be added to one bin. + +If the element's pads are linked to other pads, the pads will be unlinked +before the element is added to the bin. + +> When you add an element to an already-running pipeline, you will have to +> take care to set the state of the newly-added element to the desired +> state (usually PLAYING or PAUSED, same you set the pipeline to originally) +> with gst_element_set_state(), or use gst_element_sync_state_with_parent(). +> The bin or pipeline will not take care of this for you. + +MT safe. + + + %TRUE if the element could be added, %FALSE if +the bin does not want to accept the element. + + + + + a #GstBin + + + + the #GstElement to add + + + + + + Adds a %NULL-terminated list of elements to a bin. This function is +equivalent to calling gst_bin_add() for each member of the list. The return +value of each gst_bin_add() is ignored. + + + + + + + a #GstBin + + + + the #GstElement element to add to the bin + + + + additional elements to add to the bin + + + + + + Recursively looks for elements with an unlinked pad of the given +direction within the specified bin and returns an unlinked pad +if one is found, or %NULL otherwise. If a pad is found, the caller +owns a reference to it and should use gst_object_unref() on the +pad when it is not needed any longer. + + + unlinked pad of the given +direction, %NULL. + + + + + bin in which to look for elements with unlinked pads + + + + whether to look for an unlinked source or sink pad + + + + + + Looks for an element inside the bin that implements the given +interface. If such an element is found, it returns the element. +You can cast this element to the given interface afterwards. If you want +all elements that implement the interface, use +gst_bin_iterate_all_by_interface(). This function recurses into child bins. + +MT safe. Caller owns returned reference. + + + A #GstElement inside the bin +implementing the interface + + + + + a #GstBin + + + + the #GType of an interface + + + + + + Gets the element with the given name from a bin. This +function recurses into child bins. + +Returns %NULL if no element with the given name is found in the bin. + +MT safe. Caller owns returned reference. + + + the #GstElement with the given +name, or %NULL + + + + + a #GstBin + + + + the element name to search for + + + + + + Gets the element with the given name from this bin. If the +element is not found, a recursion is performed on the parent bin. + +Returns %NULL if: +- no element with the given name is found in the bin + +MT safe. Caller owns returned reference. + + + the #GstElement with the given +name, or %NULL + + + + + a #GstBin + + + + the element name to search for + + + + + + Return the suppressed flags of the bin. + +MT safe. + + + the bin's suppressed #GstElementFlags. + + + + + a #GstBin + + + + + + Looks for all elements inside the bin with the given element factory name. +The function recurses inside child bins. The iterator will yield a series of +#GstElement that should be unreffed after use. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement + for all elements in the bin with the given element factory name, + or %NULL. + + + + + a #GstBin + + + + the name of the #GstElementFactory + + + + + + Looks for all elements inside the bin that implements the given +interface. You can safely cast all returned elements to the given interface. +The function recurses inside child bins. The iterator will yield a series +of #GstElement that should be unreffed after use. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement + for all elements in the bin implementing the given interface, + or %NULL + + + + + a #GstBin + + + + the #GType of an interface + + + + + + Gets an iterator for the elements in this bin. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement, +or %NULL + + + + + a #GstBin + + + + + + Gets an iterator for the elements in this bin. +This iterator recurses into GstBin children. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement, +or %NULL + + + + + a #GstBin + + + + + + Gets an iterator for all elements in the bin that have the +#GST_ELEMENT_FLAG_SINK flag set. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement, +or %NULL + + + + + a #GstBin + + + + + + Gets an iterator for the elements in this bin in topologically +sorted order. This means that the elements are returned from +the most downstream elements (sinks) to the sources. + +This function is used internally to perform the state changes +of the bin elements and for clock selection. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement, +or %NULL + + + + + a #GstBin + + + + + + Gets an iterator for all elements in the bin that have the +#GST_ELEMENT_FLAG_SOURCE flag set. + +MT safe. Caller owns returned value. + + + a #GstIterator of #GstElement, +or %NULL + + + + + a #GstBin + + + + + + Query @bin for the current latency using and reconfigures this latency to all the +elements with a LATENCY event. + +This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY +is posted on the bus. + +This function simply emits the 'do-latency' signal so any custom latency +calculations will be performed. + + + %TRUE if the latency could be queried and reconfigured. + + + + + a #GstBin + + + + + + Removes the element from the bin, unparenting it as well. +Unparenting the element means that the element will be dereferenced, +so if the bin holds the only reference to the element, the element +will be freed in the process of removing it from the bin. If you +want the element to still exist after removing, you need to call +gst_object_ref() before removing it from the bin. + +If the element's pads are linked to other pads, the pads will be unlinked +before the element is removed from the bin. + +MT safe. + + + %TRUE if the element could be removed, %FALSE if +the bin does not want to remove the element. + + + + + a #GstBin + + + + the #GstElement to remove + + + + + + Remove a list of elements from a bin. This function is equivalent +to calling gst_bin_remove() with each member of the list. + + + + + + + a #GstBin + + + + the first #GstElement to remove from the bin + + + + %NULL-terminated list of elements to remove from the bin + + + + + + Suppress the given flags on the bin. #GstElementFlags of a +child element are propagated when it is added to the bin. +When suppressed flags are set, those specified flags will +not be propagated to the bin. + +MT safe. + + + + + + + a #GstBin + + + + the #GstElementFlags to suppress + + + + + + Synchronizes the state of every child of @bin with the state +of @bin. See also gst_element_sync_state_with_parent(). + + + %TRUE if syncing the state was successful for all children, + otherwise %FALSE. + + + + + a #GstBin + + + + + + If set to %TRUE, the bin will handle asynchronous state changes. +This should be used only if the bin subclass is modifying the state +of its children on its own. + + + + Forward all children messages, even those that would normally be filtered by +the bin. This can be interesting when one wants to be notified of the EOS +state of individual elements, for example. + +The messages are converted to an ELEMENT message with the bin as the +source. The structure of the message is named 'GstBinForwarded' and contains +a field named 'message' of type GST_TYPE_MESSAGE that contains the original +forwarded message. + + + + + + + the number of children in this bin + + + + the list of children in this bin + + + + + + updated whenever @children changes + + + + internal bus for handling child messages + + + + queued and cached messages + + + + + + the bin is currently calculating its state + + + + the bin needs to recalculate its state (deprecated) + + + + the bin needs to select a new clock + + + + the last clock selected + + + + the element that provided @provided_clock + + + + + + + + + + + + Will be emitted after the element was added to sub_bin. + + + + + + the #GstBin the element was added to + + + + the #GstElement that was added to @sub_bin + + + + + + Will be emitted after the element was removed from sub_bin. + + + + + + the #GstBin the element was removed from + + + + the #GstElement that was removed from @sub_bin + + + + + + Will be emitted when the bin needs to perform latency calculations. This +signal is only emitted for toplevel bins or when async-handling is +enabled. + +Only one signal handler is invoked. If no signals are connected, the +default handler is invoked, which will query and distribute the lowest +possible latency to all sinks. + +Connect to this signal if the default latency calculations are not +sufficient, like when you need different latencies for different sinks in +the same pipeline. + + + + + + Will be emitted after the element was added to the bin. + + + + + + the #GstElement that was added to the bin + + + + + + Will be emitted after the element was removed from the bin. + + + + + + the #GstElement that was removed from the bin + + + + + + + Subclasses can override the @add_element and @remove_element to +update the list of children in the bin. + +The @handle_message method can be overridden to implement custom +message handling. @handle_message takes ownership of the message, just like +#gst_element_post_message. + +The @deep_element_added vfunc will be called when a new element has been +added to any bin inside this bin, so it will also be called if a new child +was added to a sub-bin of this bin. #GstBin implementations that override +this message should chain up to the parent class implementation so the +#GstBin::deep-element-added signal is emitted on all parents. + + + bin parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GstBinFlags are a set of flags specific to bins. Most are set/used +internally. They can be checked using the GST_OBJECT_FLAG_IS_SET () macro, +and (un)set using GST_OBJECT_FLAG_SET () and GST_OBJECT_FLAG_UNSET (). + + don't resync a state change when elements are + added or linked in the bin (Since: 1.0.5) + + + Indicates whether the bin can handle elements + that add/remove source pads at any point in time without + first posting a no-more-pads signal (Since: 1.10) + + + the last enum in the series of flags for bins. +Derived classes can use this as first value in a list of flags. + + + + + + + A fundamental type that describes a 64-bit bitmask + + + Buffers are the basic unit of data transfer in GStreamer. They contain the +timing and offset along with other arbitrary metadata that is associated +with the #GstMemory blocks that the buffer contains. + +Buffers are usually created with gst_buffer_new(). After a buffer has been +created one will typically allocate memory for it and add it to the buffer. +The following example creates a buffer that can hold a given video frame +with a given width, height and bits per plane. +|[<!-- language="C" --> + GstBuffer *buffer; + GstMemory *memory; + gint size, width, height, bpp; + ... + size = width * height * bpp; + buffer = gst_buffer_new (); + memory = gst_allocator_alloc (NULL, size, NULL); + gst_buffer_insert_memory (buffer, -1, memory); + ... +]| + +Alternatively, use gst_buffer_new_allocate() to create a buffer with +preallocated data of a given size. + +Buffers can contain a list of #GstMemory objects. You can retrieve how many +memory objects with gst_buffer_n_memory() and you can get a pointer +to memory with gst_buffer_peek_memory() + +A buffer will usually have timestamps, and a duration, but neither of these +are guaranteed (they may be set to #GST_CLOCK_TIME_NONE). Whenever a +meaningful value can be given for these, they should be set. The timestamps +and duration are measured in nanoseconds (they are #GstClockTime values). + +The buffer DTS refers to the timestamp when the buffer should be decoded and +is usually monotonically increasing. The buffer PTS refers to the timestamp when +the buffer content should be presented to the user and is not always +monotonically increasing. + +A buffer can also have one or both of a start and an end offset. These are +media-type specific. For video buffers, the start offset will generally be +the frame number. For audio buffers, it will be the number of samples +produced so far. For compressed data, it could be the byte offset in a +source or destination file. Likewise, the end offset will be the offset of +the end of the buffer. These can only be meaningfully interpreted if you +know the media type of the buffer (the preceding CAPS event). Either or both +can be set to #GST_BUFFER_OFFSET_NONE. + +gst_buffer_ref() is used to increase the refcount of a buffer. This must be +done when you want to keep a handle to the buffer after pushing it to the +next element. The buffer refcount determines the writability of the buffer, a +buffer is only writable when the refcount is exactly 1, i.e. when the caller +has the only reference to the buffer. + +To efficiently create a smaller buffer out of an existing one, you can +use gst_buffer_copy_region(). This method tries to share the memory objects +between the two buffers. + +If a plug-in wants to modify the buffer data or metadata in-place, it should +first obtain a buffer that is safe to modify by using +gst_buffer_make_writable(). This function is optimized so that a copy will +only be made when it is necessary. + +Several flags of the buffer can be set and unset with the +GST_BUFFER_FLAG_SET() and GST_BUFFER_FLAG_UNSET() macros. Use +GST_BUFFER_FLAG_IS_SET() to test if a certain #GstBufferFlags flag is set. + +Buffers can be efficiently merged into a larger buffer with +gst_buffer_append(). Copying of memory will only be done when absolutely +needed. + +Arbitrary extra metadata can be set on a buffer with gst_buffer_add_meta(). +Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta + +An element should either unref the buffer or push it out on a src pad +using gst_pad_push() (see #GstPad). + +Buffers are usually freed by unreffing them with gst_buffer_unref(). When +the refcount drops to 0, any memory and metadata pointed to by the buffer is +unreffed as well. Buffers allocated from a #GstBufferPool will be returned to +the pool when the refcount drops to 0. + +The #GstParentBufferMeta is a meta which can be attached to a #GstBuffer +to hold a reference to another buffer that is only released when the child +#GstBuffer is released. + +Typically, #GstParentBufferMeta is used when the child buffer is directly +using the #GstMemory of the parent buffer, and wants to prevent the parent +buffer from being returned to a buffer pool until the #GstMemory is available +for re-use. (Since: 1.6) + + + the parent structure + + + + pointer to the pool owner of the buffer + + + + presentation timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the + pts is not known or relevant. The pts contains the timestamp when the + media should be presented to the user. + + + + decoding timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the + dts is not known or relevant. The dts contains the timestamp when the + media should be processed. + + + + duration in time of the buffer data, can be #GST_CLOCK_TIME_NONE + when the duration is not known or relevant. + + + + a media specific offset for the buffer data. + For video frames, this is the frame number of this buffer. + For audio samples, this is the offset of the first sample in this buffer. + For file data or compressed data this is the byte offset of the first + byte in this buffer. + + + + the last offset contained in this buffer. It has the same + format as @offset. + + + + Creates a newly allocated buffer without any data. + +MT safe. + + + the new #GstBuffer. + + + + + Tries to create a newly allocated buffer with data of the given size and +extra parameters from @allocator. If the requested amount of memory can't be +allocated, %NULL will be returned. The allocated buffer memory is not cleared. + +When @allocator is %NULL, the default memory allocator will be used. + +Note that when @size == 0, the buffer will not have memory associated with it. + +MT safe. + + + a new #GstBuffer, or %NULL if + the memory couldn't be allocated. + + + + + the #GstAllocator to use, or %NULL to use the + default allocator + + + + the size in bytes of the new buffer's data. + + + + optional parameters + + + + + + Creates a new buffer that wraps the given @data. The memory will be freed +with g_free and will be marked writable. + +MT safe. + + + a new #GstBuffer + + + + + data to wrap + + + + + + allocated size of @data + + + + + + Creates a new #GstBuffer that wraps the given @bytes. The data inside +@bytes cannot be %NULL and the resulting buffer will be marked as read only. + +MT safe. + + + a new #GstBuffer wrapping @bytes + + + + + a #GBytes to wrap + + + + + + Allocate a new buffer that wraps the given memory. @data must point to +@maxsize of memory, the wrapped buffer will have the region from @offset and +@size visible. + +When the buffer is destroyed, @notify will be called with @user_data. + +The prefix/padding must be filled with 0 if @flags contains +#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. + + + a new #GstBuffer + + + + + #GstMemoryFlags + + + + data to wrap + + + + + + allocated size of @data + + + + offset in @data + + + + size of valid data + + + + user_data + + + + called with @user_data when the memory is freed + + + + + + Creates and adds a #GstCustomMeta for the desired @name. @name must have +been successfully registered with gst_meta_register_custom(). + + + The #GstCustomMeta that was added to the buffer + + + + + a #GstBuffer + + + + the registered name of the desired custom meta + + + + + + Add metadata for @info to @buffer using the parameters in @params. + + + the metadata for the api in @info on @buffer. + + + + + a #GstBuffer + + + + a #GstMetaInfo + + + + params for @info + + + + + + Add a #GstParentBufferMeta to @buffer that holds a reference on +@ref until the buffer is freed. + + + The #GstParentBufferMeta that was added to the buffer + + + + + a #GstBuffer + + + + a #GstBuffer to ref + + + + + + Attaches protection metadata to a #GstBuffer. + + + a pointer to the added #GstProtectionMeta if successful; %NULL if +unsuccessful. + + + + + #GstBuffer holding an encrypted sample, to which protection + metadata should be added. + + + + a #GstStructure holding cryptographic + information relating to the sample contained in @buffer. This + function takes ownership of @info. + + + + + + Add a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and +optionally @duration based on a specific timestamp @reference. See the +documentation of #GstReferenceTimestampMeta for details. + + + The #GstReferenceTimestampMeta that was added to the buffer + + + + + a #GstBuffer + + + + identifier for the timestamp reference. + + + + timestamp + + + + duration, or %GST_CLOCK_TIME_NONE + + + + + + Append all the memory from @buf2 to @buf1. The result buffer will contain a +concatenation of the memory of @buf1 and @buf2. + + + the new #GstBuffer that contains the memory + of the two source buffers. + + + + + the first source #GstBuffer to append. + + + + the second source #GstBuffer to append. + + + + + + Append the memory block @mem to @buffer. This function takes +ownership of @mem and thus doesn't increase its refcount. + +This function is identical to gst_buffer_insert_memory() with an index of -1. +See gst_buffer_insert_memory() for more details. + + + + + + + a #GstBuffer. + + + + a #GstMemory. + + + + + + Append @size bytes at @offset from @buf2 to @buf1. The result buffer will +contain a concatenation of the memory of @buf1 and the requested region of +@buf2. + + + the new #GstBuffer that contains the memory + of the two source buffers. + + + + + the first source #GstBuffer to append. + + + + the second source #GstBuffer to append. + + + + the offset in @buf2 + + + + the size or -1 of @buf2 + + + + + + Create a copy of the given buffer. This will only copy the buffer's +data to a newly allocated memory if needed (if the type of memory +requires it), otherwise the underlying data is just referenced. +Check gst_buffer_copy_deep() if you want to force the data +to be copied to newly allocated memory. + + + a new copy of @buf. + + + + + a #GstBuffer. + + + + + + Create a copy of the given buffer. This will make a newly allocated +copy of the data the source buffer contains. + + + a new copy of @buf. + + + + + a #GstBuffer. + + + + + + Copies the information from @src into @dest. + +If @dest already contains memory and @flags contains GST_BUFFER_COPY_MEMORY, +the memory from @src will be appended to @dest. + +@flags indicate which fields will be copied. + + + %TRUE if the copying succeeded, %FALSE otherwise. + + + + + a destination #GstBuffer + + + + a source #GstBuffer + + + + flags indicating what metadata fields should be copied. + + + + offset to copy from + + + + total size to copy. If -1, all data is copied. + + + + + + Creates a sub-buffer from @parent at @offset and @size. +This sub-buffer uses the actual memory space of the parent buffer. +This function will copy the offset and timestamp fields when the +offset is 0. If not, they will be set to #GST_CLOCK_TIME_NONE and +#GST_BUFFER_OFFSET_NONE. +If @offset equals 0 and @size equals the total size of @buffer, the +duration and offset end fields are also copied. If not they will be set +to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. + +MT safe. + + + the new #GstBuffer or %NULL if the arguments were + invalid. + + + + + a #GstBuffer. + + + + the #GstBufferCopyFlags + + + + the offset into parent #GstBuffer at which the new sub-buffer + begins. + + + + the size of the new #GstBuffer sub-buffer, in bytes. If -1, all + data is copied. + + + + + + Copy @size bytes starting from @offset in @buffer to @dest. + + + The amount of bytes extracted. This value can be lower than @size + when @buffer did not contain enough data. + + + + + a #GstBuffer. + + + + the offset to extract + + + + + the destination address + + + + + + the size to extract + + + + + + Extracts a copy of at most @size bytes the data at @offset into +newly-allocated memory. @dest must be freed using g_free() when done. + + + + + + + a #GstBuffer + + + + the offset to extract + + + + the size to extract + + + + A pointer where + the destination array will be written. Might be %NULL if the size is 0. + + + + + + A location where the size of @dest can be written + + + + + + Copy @size bytes from @src to @buffer at @offset. + + + The amount of bytes copied. This value can be lower than @size + when @buffer did not contain enough data. + + + + + a #GstBuffer. + + + + the offset to fill + + + + the source address + + + + + + the size to fill + + + + + + Find the memory blocks that span @size bytes starting from @offset +in @buffer. + +When this function returns %TRUE, @idx will contain the index of the first +memory block where the byte for @offset can be found and @length contains the +number of memory blocks containing the @size remaining bytes. @skip contains +the number of bytes to skip in the memory block at @idx to get to the byte +for @offset. + +@size can be -1 to get all the memory blocks after @idx. + + + %TRUE when @size bytes starting from @offset could be found in +@buffer and @idx, @length and @skip will be filled. + + + + + a #GstBuffer. + + + + an offset + + + + a size + + + + pointer to index + + + + pointer to length + + + + pointer to skip + + + + + + Call @func with @user_data for each meta in @buffer. + +@func can modify the passed meta pointer or its contents. The return value +of @func define if this function returns or if the remaining metadata items +in the buffer should be skipped. + + + %FALSE when @func returned %FALSE for one of the metadata. + + + + + a #GstBuffer + + + + a #GstBufferForeachMetaFunc to call + + + + user data passed to @func + + + + + + Get all the memory block in @buffer. The memory blocks will be merged +into one large #GstMemory. + + + a #GstMemory that contains the merged memory. +Use gst_memory_unref () after usage. + + + + + a #GstBuffer. + + + + + + Find the first #GstCustomMeta on @buffer for the desired @name. + + + the #GstCustomMeta or %NULL when there +is no such metadata on @buffer. + + + + + a #GstBuffer + + + + the registered name of the custom meta to retrieve. + + + + + + Get the #GstBufferFlags flags set on this buffer. + + + the flags set on this buffer. + + + + + a #GstBuffer + + + + + + Get the memory block at index @idx in @buffer. + + + a #GstMemory that contains the data of the +memory block at @idx. Use gst_memory_unref () after usage. + + + + + a #GstBuffer. + + + + an index + + + + + + Get @length memory blocks in @buffer starting at @idx. The memory blocks will +be merged into one large #GstMemory. + +If @length is -1, all memory starting from @idx is merged. + + + a #GstMemory that contains the merged data of @length + blocks starting at @idx. Use gst_memory_unref () after usage. + + + + + a #GstBuffer. + + + + an index + + + + a length + + + + + + Get the metadata for @api on buffer. When there is no such metadata, %NULL is +returned. If multiple metadata with the given @api are attached to this +buffer only the first one is returned. To handle multiple metadata with a +given API use gst_buffer_iterate_meta() or gst_buffer_foreach_meta() instead +and check the meta->info.api member for the API type. + + + the metadata for @api on +@buffer. + + + + + a #GstBuffer + + + + the #GType of an API + + + + + + + + number of metas of type @api_type on @buffer. + + + + + a #GstBuffer + + + + the #GType of an API + + + + + + Find the first #GstReferenceTimestampMeta on @buffer that conforms to +@reference. Conformance is tested by checking if the meta's reference is a +subset of @reference. + +Buffers can contain multiple #GstReferenceTimestampMeta metadata items. + + + the #GstReferenceTimestampMeta or %NULL when there +is no such metadata on @buffer. + + + + + a #GstBuffer + + + + a reference #GstCaps + + + + + + Get the total size of the memory blocks in @buffer. + + + total size of the memory blocks in @buffer. + + + + + a #GstBuffer. + + + + + + Get the total size of the memory blocks in @b. + +When not %NULL, @offset will contain the offset of the data in the +first memory block in @buffer and @maxsize will contain the sum of +the size and @offset and the amount of extra padding on the last +memory block. @offset and @maxsize can be used to resize the +buffer memory blocks with gst_buffer_resize(). + + + total size of the memory blocks in @buffer. + + + + + a #GstBuffer. + + + + a pointer to the offset + + + + a pointer to the maxsize + + + + + + Get the total size of @length memory blocks stating from @idx in @buffer. + +When not %NULL, @offset will contain the offset of the data in the +memory block in @buffer at @idx and @maxsize will contain the sum of the size +and @offset and the amount of extra padding on the memory block at @idx + +@length -1. +@offset and @maxsize can be used to resize the buffer memory blocks with +gst_buffer_resize_range(). + + + total size of @length memory blocks starting at @idx in @buffer. + + + + + a #GstBuffer. + + + + an index + + + + a length + + + + a pointer to the offset + + + + a pointer to the maxsize + + + + + + Gives the status of a specific flag on a buffer. + + + %TRUE if all flags in @flags are found on @buffer. + + + + + a #GstBuffer + + + + the #GstBufferFlags flag to check. + + + + + + Insert the memory block @mem to @buffer at @idx. This function takes ownership +of @mem and thus doesn't increase its refcount. + +Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is +added, existing memory blocks will automatically be merged to make room for +the new memory. + + + + + + + a #GstBuffer. + + + + the index to add the memory at, or -1 to append it to the end + + + + a #GstMemory. + + + + + + Check if all memory blocks in @buffer are writable. + +Note that this function does not check if @buffer is writable, use +gst_buffer_is_writable() to check that if needed. + + + %TRUE if all memory blocks in @buffer are writable + + + + + a #GstBuffer. + + + + + + Check if @length memory blocks in @buffer starting from @idx are writable. + +@length can be -1 to check all the memory blocks after @idx. + +Note that this function does not check if @buffer is writable, use +gst_buffer_is_writable() to check that if needed. + + + %TRUE if the memory range is writable + + + + + a #GstBuffer. + + + + an index + + + + a length should not be 0 + + + + + + Retrieve the next #GstMeta after @current. If @state points +to %NULL, the first metadata is returned. + +@state will be updated with an opaque state pointer + + + The next #GstMeta or %NULL +when there are no more items. + + + + + a #GstBuffer + + + + an opaque state pointer + + + + + + Retrieve the next #GstMeta of type @meta_api_type after the current one +according to @state. If @state points to %NULL, the first metadata of +type @meta_api_type is returned. + +@state will be updated with an opaque state pointer + + + The next #GstMeta of type +@meta_api_type or %NULL when there are no more items. + + + + + a #GstBuffer + + + + an opaque state pointer + + + + only return #GstMeta of this type + + + + + + This function fills @info with the #GstMapInfo of all merged memory +blocks in @buffer. + +@flags describe the desired access of the memory. When @flags is +#GST_MAP_WRITE, @buffer should be writable (as returned from +gst_buffer_is_writable()). + +When @buffer is writable but the memory isn't, a writable copy will +automatically be created and returned. The readonly copy of the +buffer memory will then also be replaced with this writable copy. + +The memory in @info should be unmapped with gst_buffer_unmap() after +usage. + + + %TRUE if the map succeeded and @info contains valid data. + + + + + a #GstBuffer. + + + + info about the mapping + + + + flags for the mapping + + + + + + This function fills @info with the #GstMapInfo of @length merged memory blocks +starting at @idx in @buffer. When @length is -1, all memory blocks starting +from @idx are merged and mapped. + +@flags describe the desired access of the memory. When @flags is +#GST_MAP_WRITE, @buffer should be writable (as returned from +gst_buffer_is_writable()). + +When @buffer is writable but the memory isn't, a writable copy will +automatically be created and returned. The readonly copy of the buffer memory +will then also be replaced with this writable copy. + +The memory in @info should be unmapped with gst_buffer_unmap() after usage. + + + %TRUE if the map succeeded and @info contains valid +data. + + + + + a #GstBuffer. + + + + an index + + + + a length + + + + info about the mapping + + + + flags for the mapping + + + + + + Compare @size bytes starting from @offset in @buffer with the memory in @mem. + + + 0 if the memory is equal. + + + + + a #GstBuffer. + + + + the offset in @buffer + + + + the memory to compare + + + + + + the size to compare + + + + + + Fill @buf with @size bytes with @val starting from @offset. + + + The amount of bytes filled. This value can be lower than @size + when @buffer did not contain enough data. + + + + + a #GstBuffer. + + + + the offset in @buffer + + + + the value to set + + + + the size to set + + + + + + Get the amount of memory blocks that this buffer has. This amount is never +larger than what gst_buffer_get_max_memory() returns. + + + the number of memory blocks this buffer is made of. + + + + + a #GstBuffer. + + + + + + Get the memory block at @idx in @buffer. The memory block stays valid until +the memory block in @buffer is removed, replaced or merged, typically with +any call that modifies the memory in @buffer. + + + the #GstMemory at @idx. + + + + + a #GstBuffer. + + + + an index + + + + + + Prepend the memory block @mem to @buffer. This function takes +ownership of @mem and thus doesn't increase its refcount. + +This function is identical to gst_buffer_insert_memory() with an index of 0. +See gst_buffer_insert_memory() for more details. + + + + + + + a #GstBuffer. + + + + a #GstMemory. + + + + + + Increases the refcount of the given buffer by one. + +Note that the refcount affects the writability +of @buf and its metadata, see gst_buffer_is_writable(). +It is important to note that keeping additional references to +GstBuffer instances can potentially increase the number +of memcpy operations in a pipeline. + + + @buf + + + + + a #GstBuffer. + + + + + + Remove all the memory blocks in @buffer. + + + + + + + a #GstBuffer. + + + + + + Remove the memory block in @b at index @i. + + + + + + + a #GstBuffer. + + + + an index + + + + + + Remove @length memory blocks in @buffer starting from @idx. + +@length can be -1, in which case all memory starting from @idx is removed. + + + + + + + a #GstBuffer. + + + + an index + + + + a length + + + + + + Remove the metadata for @meta on @buffer. + + + %TRUE if the metadata existed and was removed, %FALSE if no such +metadata was on @buffer. + + + + + a #GstBuffer + + + + a #GstMeta + + + + + + Replaces all memory in @buffer with @mem. + + + + + + + a #GstBuffer. + + + + a #GstMemory + + + + + + Replaces the memory block at index @idx in @buffer with @mem. + + + + + + + a #GstBuffer. + + + + an index + + + + a #GstMemory + + + + + + Replaces @length memory blocks in @buffer starting at @idx with @mem. + +If @length is -1, all memory starting from @idx will be removed and +replaced with @mem. + +@buffer should be writable. + + + + + + + a #GstBuffer. + + + + an index + + + + a length should not be 0 + + + + a #GstMemory + + + + + + Set the offset and total size of the memory blocks in @buffer. + + + + + + + a #GstBuffer. + + + + the offset adjustment + + + + the new size or -1 to just adjust the offset + + + + + + Set the total size of the @length memory blocks starting at @idx in +@buffer + + + %TRUE if resizing succeeded, %FALSE otherwise. + + + + + a #GstBuffer. + + + + an index + + + + a length + + + + the offset adjustment + + + + the new size or -1 to just adjust the offset + + + + + + Sets one or more buffer flags on a buffer. + + + %TRUE if @flags were successfully set on buffer. + + + + + a #GstBuffer + + + + the #GstBufferFlags to set. + + + + + + Set the total size of the memory blocks in @buffer. + + + + + + + a #GstBuffer. + + + + the new size + + + + + + Release the memory previously mapped with gst_buffer_map(). + + + + + + + a #GstBuffer. + + + + a #GstMapInfo + + + + + + Decreases the refcount of the buffer. If the refcount reaches 0, the buffer +with the associated metadata and memory will be freed. + + + + + + + a #GstBuffer. + + + + + + Clears one or more buffer flags. + + + true if @flags is successfully cleared from buffer. + + + + + a #GstBuffer + + + + the #GstBufferFlags to clear + + + + + + Get the maximum amount of memory blocks that a buffer can hold. This is a +compile time constant that can be queried with the function. + +When more memory blocks are added, existing memory blocks will be merged +together to make room for the new block. + + + the maximum amount of memory blocks that a buffer can hold. + + + + + Modifies a pointer to a #GstBuffer to point to a different #GstBuffer. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +buffer is unreffed, the new is reffed). + +Either @nbuf or the #GstBuffer pointed to by @obuf may be %NULL. + + + %TRUE when @obuf was different from @nbuf. + + + + + pointer to a pointer to + a #GstBuffer to be replaced. + + + + pointer to a #GstBuffer that will + replace the buffer pointed to by @obuf. + + + + + + + A set of flags that can be provided to the gst_buffer_copy_into() +function to specify which items should be copied. + + copy nothing + + + flag indicating that buffer flags should be copied + + + flag indicating that buffer pts, dts, + duration, offset and offset_end should be copied + + + flag indicating that buffer meta should be + copied + + + flag indicating that buffer memory should be reffed + and appended to already existing memory. Unless the memory is marked as + NO_SHARE, no actual copy of the memory is made but it is simply reffed. + Add @GST_BUFFER_COPY_DEEP to force a real copy. + + + flag indicating that buffer memory should be + merged + + + flag indicating that memory should always be + copied instead of reffed (Since: 1.2) + + + + A set of buffer flags used to describe properties of a #GstBuffer. + + the buffer is live data and should be discarded in + the PAUSED state. + + + the buffer contains data that should be dropped + because it will be clipped against the segment + boundaries or because it does not contain data + that should be shown to the user. + + + the buffer marks a data discontinuity in the stream. + This typically occurs after a seek or a dropped buffer + from a live or network source. + + + the buffer timestamps might have a discontinuity + and this buffer is a good point to resynchronize. + + + the buffer data is corrupted. + + + the buffer contains a media specific marker. for + video this is the end of a frame boundary, for audio + this is the start of a talkspurt. + + + the buffer contains header information that is + needed to decode the following data. + + + the buffer has been created to fill a gap in the + stream and contains media neutral data (elements can + switch to optimized code path that ignores the buffer + content). + + + the buffer can be dropped without breaking the + stream, for example to reduce bandwidth. + + + this unit cannot be decoded independently. + + + this flag is set when memory of the buffer + is added/removed + + + Elements which write to disk or permanent + storage should ensure the data is synced after + writing the contents of this buffer. (Since: 1.6) + + + This buffer is important and should not be dropped. + This can be used to mark important buffers, e.g. to flag + RTP packets carrying keyframes or codec setup data for RTP + Forward Error Correction purposes, or to prevent still video + frames from being dropped by elements due to QoS. (Since: 1.14) + + + additional media specific flags can be added starting from + this flag. + + + + A function that will be called from gst_buffer_foreach_meta(). The @meta +field will point to a the reference of the meta. + +@buffer should not be modified from this callback. + +When this function returns %TRUE, the next meta will be +returned. When %FALSE is returned, gst_buffer_foreach_meta() will return. + +When @meta is set to %NULL, the item will be removed from the buffer. + + + %FALSE when gst_buffer_foreach_meta() should stop + + + + + a #GstBuffer + + + + a pointer to a #GstMeta + + + + user data passed to gst_buffer_foreach_meta() + + + + + + Buffer lists are an object containing a list of buffers. + +Buffer lists are created with gst_buffer_list_new() and filled with data +using a gst_buffer_list_insert(). + +Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is +interesting when multiple buffers need to be pushed in one go because it +can reduce the amount of overhead for pushing each buffer individually. + + + Creates a new, empty #GstBufferList. The caller is responsible for unreffing +the returned #GstBufferList. + +Free-function: gst_buffer_list_unref + + + the new #GstBufferList. gst_buffer_list_unref() + after usage. + + + + + Creates a new, empty #GstBufferList. The caller is responsible for unreffing +the returned #GstBufferList. The list will have @size space preallocated so +that memory reallocations can be avoided. + +Free-function: gst_buffer_list_unref + + + the new #GstBufferList. gst_buffer_list_unref() + after usage. + + + + + an initial reserved size + + + + + + Calculates the size of the data contained in buffer list by adding the +size of all buffers. + + + the size of the data contained in buffer list in bytes. + + + + + a #GstBufferList + + + + + + Create a shallow copy of the given buffer list. This will make a newly +allocated copy of the source list with copies of buffer pointers. The +refcount of buffers pointed to will be increased by one. + + + a new copy of @list. + + + + + a #GstBufferList + + + + + + Create a copy of the given buffer list. This will make a newly allocated +copy of the buffer that the source buffer list contains. + + + a new copy of @list. + + + + + a #GstBufferList + + + + + + Call @func with @data for each buffer in @list. + +@func can modify the passed buffer pointer or its contents. The return value +of @func define if this function returns or if the remaining buffers in +the list should be skipped. + + + %TRUE when @func returned %TRUE for each buffer in @list or when +@list is empty. + + + + + a #GstBufferList + + + + a #GstBufferListFunc to call + + + + user data passed to @func + + + + + + Get the buffer at @idx. + +You must make sure that @idx does not exceed the number of +buffers available. + + + the buffer at @idx in @group + or %NULL when there is no buffer. The buffer remains valid as + long as @list is valid and buffer is not removed from the list. + + + + + a #GstBufferList + + + + the index + + + + + + Gets the buffer at @idx, ensuring it is a writable buffer. + +You must make sure that @idx does not exceed the number of +buffers available. + + + the buffer at @idx in @group. + The returned buffer remains valid as long as @list is valid and + the buffer is not removed from the list. + + + + + a (writable) #GstBufferList + + + + the index + + + + + + Insert @buffer at @idx in @list. Other buffers are moved to make room for +this new buffer. + +A -1 value for @idx will append the buffer at the end. + + + + + + + a #GstBufferList + + + + the index + + + + a #GstBuffer + + + + + + Returns the number of buffers in @list. + + + the number of buffers in the buffer list + + + + + a #GstBufferList + + + + + + Increases the refcount of the given buffer list by one. + +Note that the refcount affects the writability of @list and its data, see +gst_buffer_list_make_writable(). It is important to note that keeping +additional references to GstBufferList instances can potentially increase +the number of memcpy operations in a pipeline. + + + @list + + + + + a #GstBufferList + + + + + + Remove @length buffers starting from @idx in @list. The following buffers +are moved to close the gap. + + + + + + + a #GstBufferList + + + + the index + + + + the amount to remove + + + + + + Decreases the refcount of the buffer list. If the refcount reaches 0, the +buffer list will be freed. + + + + + + + a #GstBufferList + + + + + + + A function that will be called from gst_buffer_list_foreach(). The @buffer +field will point to a the reference of the buffer at @idx. + +When this function returns %TRUE, the next buffer will be +returned. When %FALSE is returned, gst_buffer_list_foreach() will return. + +When @buffer is set to %NULL, the item will be removed from the bufferlist. +When @buffer has been made writable, the new buffer reference can be assigned +to @buffer. This function is responsible for unreffing the old buffer when +removing or modifying. + + + %FALSE when gst_buffer_list_foreach() should stop + + + + + pointer the buffer + + + + the index of @buffer + + + + user data passed to gst_buffer_list_foreach() + + + + + + A #GstBufferPool is an object that can be used to pre-allocate and recycle +buffers of the same size and with the same properties. + +A #GstBufferPool is created with gst_buffer_pool_new(). + +Once a pool is created, it needs to be configured. A call to +gst_buffer_pool_get_config() returns the current configuration structure from +the pool. With gst_buffer_pool_config_set_params() and +gst_buffer_pool_config_set_allocator() the bufferpool parameters and +allocator can be configured. Other properties can be configured in the pool +depending on the pool implementation. + +A bufferpool can have extra options that can be enabled with +gst_buffer_pool_config_add_option(). The available options can be retrieved +with gst_buffer_pool_get_options(). Some options allow for additional +configuration properties to be set. + +After the configuration structure has been configured, +gst_buffer_pool_set_config() updates the configuration in the pool. This can +fail when the configuration structure is not accepted. + +After the a pool has been configured, it can be activated with +gst_buffer_pool_set_active(). This will preallocate the configured resources +in the pool. + +When the pool is active, gst_buffer_pool_acquire_buffer() can be used to +retrieve a buffer from the pool. + +Buffers allocated from a bufferpool will automatically be returned to the +pool with gst_buffer_pool_release_buffer() when their refcount drops to 0. + +The bufferpool can be deactivated again with gst_buffer_pool_set_active(). +All further gst_buffer_pool_acquire_buffer() calls will return an error. When +all buffers are returned to the pool they will be freed. + +Use gst_object_unref() to release the reference to a bufferpool. If the +refcount of the pool reaches 0, the pool will be freed. + + + Creates a new #GstBufferPool instance. + + + a new #GstBufferPool instance + + + + + Enabled the option in @config. This will instruct the @bufferpool to enable +the specified option on the buffers that it allocates. + +The supported options by @pool can be retrieved with gst_buffer_pool_get_options(). + + + + + + + a #GstBufferPool configuration + + + + an option to add + + + + + + Get the @allocator and @params from @config. + + + %TRUE, if the values are set. + + + + + a #GstBufferPool configuration + + + + a #GstAllocator, or %NULL + + + + #GstAllocationParams, or %NULL + + + + + + Parse an available @config and get the option at @index of the options API +array. + + + a #gchar of the option at @index. + + + + + a #GstBufferPool configuration + + + + position in the option array to read + + + + + + Get the configuration values from @config. + + + %TRUE if all parameters could be fetched. + + + + + a #GstBufferPool configuration + + + + the caps of buffers + + + + the size of each buffer, not including prefix and padding + + + + the minimum amount of buffers to allocate. + + + + the maximum amount of buffers to allocate or 0 for unlimited. + + + + + + Check if @config contains @option. + + + %TRUE if the options array contains @option. + + + + + a #GstBufferPool configuration + + + + an option + + + + + + Retrieve the number of values currently stored in the options array of the +@config structure. + + + the options array size as a #guint. + + + + + a #GstBufferPool configuration + + + + + + Set the @allocator and @params on @config. + +One of @allocator and @params can be %NULL, but not both. When @allocator +is %NULL, the default allocator of the pool will use the values in @param +to perform its allocation. When @param is %NULL, the pool will use the +provided @allocator with its default #GstAllocationParams. + +A call to gst_buffer_pool_set_config() can update the allocator and params +with the values that it is able to do. Some pools are, for example, not able +to operate with different allocators or cannot allocate with the values +specified in @params. Use gst_buffer_pool_get_config() to get the currently +used values. + + + + + + + a #GstBufferPool configuration + + + + a #GstAllocator + + + + #GstAllocationParams + + + + + + Configure @config with the given parameters. + + + + + + + a #GstBufferPool configuration + + + + caps for the buffers + + + + the size of each buffer, not including prefix and padding + + + + the minimum amount of buffers to allocate. + + + + the maximum amount of buffers to allocate or 0 for unlimited. + + + + + + Validate that changes made to @config are still valid in the context of the +expected parameters. This function is a helper that can be used to validate +changes made by a pool to a config when gst_buffer_pool_set_config() +returns %FALSE. This expects that @caps haven't changed and that +@min_buffers aren't lower then what we initially expected. +This does not check if options or allocator parameters are still valid, +won't check if size have changed, since changing the size is valid to adapt +padding. + + + %TRUE, if the parameters are valid in this context. + + + + + a #GstBufferPool configuration + + + + the excepted caps of buffers + + + + the expected size of each buffer, not including prefix and padding + + + + the expected minimum amount of buffers to allocate. + + + + the expect maximum amount of buffers to allocate or 0 for unlimited. + + + + + + Acquire a buffer from @pool. @buffer should point to a memory location that +can hold a pointer to the new buffer. + +@params can be %NULL or contain optional parameters to influence the +allocation. + + + a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is +inactive. + + + + + a #GstBufferPool + + + + a location for a #GstBuffer + + + + parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get a %NULL terminated array of string with supported bufferpool options for +@pool. An option would typically be enabled with +gst_buffer_pool_config_add_option(). + + + a %NULL terminated array + of strings. + + + + + + + a #GstBufferPool + + + + + + Release @buffer to @pool. @buffer should have previously been allocated from +@pool with gst_buffer_pool_acquire_buffer(). + +This function is usually called automatically when the last ref on @buffer +disappears. + + + + + + + a #GstBufferPool + + + + a #GstBuffer + + + + + + + + + + + + + + + + + + + + Set the configuration of the pool. If the pool is already configured, and +the configuration haven't change, this function will return %TRUE. If the +pool is active, this method will return %FALSE and active configuration +will remain. Buffers allocated form this pool must be returned or else this +function will do nothing and return %FALSE. + +@config is a #GstStructure that contains the configuration parameters for +the pool. A default and mandatory set of parameters can be configured with +gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() +and gst_buffer_pool_config_add_option(). + +If the parameters in @config can not be set exactly, this function returns +%FALSE and will try to update as much state as possible. The new state can +then be retrieved and refined with gst_buffer_pool_get_config(). + +This function takes ownership of @config. + + + %TRUE when the configuration could be set. + + + + + a #GstBufferPool + + + + a #GstStructure + + + + + + + + + + + + + + + + + + + + + + + + + + + + Acquire a buffer from @pool. @buffer should point to a memory location that +can hold a pointer to the new buffer. + +@params can be %NULL or contain optional parameters to influence the +allocation. + + + a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is +inactive. + + + + + a #GstBufferPool + + + + a location for a #GstBuffer + + + + parameters. + + + + + + Get a copy of the current configuration of the pool. This configuration +can either be modified and used for the gst_buffer_pool_set_config() call +or it must be freed after usage. + + + a copy of the current configuration of @pool. use +gst_structure_free() after usage or gst_buffer_pool_set_config(). + + + + + a #GstBufferPool + + + + + + Get a %NULL terminated array of string with supported bufferpool options for +@pool. An option would typically be enabled with +gst_buffer_pool_config_add_option(). + + + a %NULL terminated array + of strings. + + + + + + + a #GstBufferPool + + + + + + Check if the bufferpool supports @option. + + + %TRUE if the buffer pool contains @option. + + + + + a #GstBufferPool + + + + an option + + + + + + Check if @pool is active. A pool can be activated with the +gst_buffer_pool_set_active() call. + + + %TRUE when the pool is active. + + + + + a #GstBufferPool + + + + + + Release @buffer to @pool. @buffer should have previously been allocated from +@pool with gst_buffer_pool_acquire_buffer(). + +This function is usually called automatically when the last ref on @buffer +disappears. + + + + + + + a #GstBufferPool + + + + a #GstBuffer + + + + + + Control the active state of @pool. When the pool is inactive, new calls to +gst_buffer_pool_acquire_buffer() will return with %GST_FLOW_FLUSHING. + +Activating the bufferpool will preallocate all resources in the pool based on +the configuration of the pool. + +Deactivating will free the resources again when there are no outstanding +buffers. When there are outstanding buffers, they will be freed as soon as +they are all returned to the pool. + + + %FALSE when the pool was not configured or when preallocation of the +buffers failed. + + + + + a #GstBufferPool + + + + the new active state + + + + + + Set the configuration of the pool. If the pool is already configured, and +the configuration haven't change, this function will return %TRUE. If the +pool is active, this method will return %FALSE and active configuration +will remain. Buffers allocated form this pool must be returned or else this +function will do nothing and return %FALSE. + +@config is a #GstStructure that contains the configuration parameters for +the pool. A default and mandatory set of parameters can be configured with +gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() +and gst_buffer_pool_config_add_option(). + +If the parameters in @config can not be set exactly, this function returns +%FALSE and will try to update as much state as possible. The new state can +then be retrieved and refined with gst_buffer_pool_get_config(). + +This function takes ownership of @config. + + + %TRUE when the configuration could be set. + + + + + a #GstBufferPool + + + + a #GstStructure + + + + + + Enable or disable the flushing state of a @pool without freeing or +allocating buffers. + + + + + + + a #GstBufferPool + + + + whether to start or stop flushing + + + + + + + + + + + + + + + + + + + + + Additional flags to control the allocation of a buffer + + no flags + + + buffer is keyframe + + + when the bufferpool is empty, acquire_buffer +will by default block until a buffer is released into the pool again. Setting +this flag makes acquire_buffer return #GST_FLOW_EOS instead of blocking. + + + buffer is discont + + + last flag, subclasses can use private flags + starting from this value. + + + + Parameters passed to the gst_buffer_pool_acquire_buffer() function to control the +allocation of the buffer. + +The default implementation ignores the @start and @stop members but other +implementations can use this extra information to decide what buffer to +return. + + + the format of @start and @stop + + + + the start position + + + + the stop position + + + + additional flags + + + + + + + + + + The GstBufferPool class. + + + Object parent class + + + + + + + a %NULL terminated array + of strings. + + + + + + + a #GstBufferPool + + + + + + + + + + %TRUE when the configuration could be set. + + + + + a #GstBufferPool + + + + a #GstStructure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is +inactive. + + + + + a #GstBufferPool + + + + a location for a #GstBuffer + + + + parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstBufferPool + + + + a #GstBuffer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The different types of buffering methods. + + a small amount of data is buffered + + + the stream is being downloaded + + + the stream is being downloaded in a ringbuffer + + + the stream is a live stream + + + + The #GstBus is an object responsible for delivering #GstMessage packets in +a first-in first-out way from the streaming threads (see #GstTask) to the +application. + +Since the application typically only wants to deal with delivery of these +messages from one thread, the GstBus will marshall the messages between +different threads. This is important since the actual streaming of media +is done in another thread than the application. + +The GstBus provides support for #GSource based notifications. This makes it +possible to handle the delivery in the glib mainloop. + +The #GSource callback function gst_bus_async_signal_func() can be used to +convert all bus messages into signal emissions. + +A message is posted on the bus with the gst_bus_post() method. With the +gst_bus_peek() and gst_bus_pop() methods one can look at or retrieve a +previously posted message. + +The bus can be polled with the gst_bus_poll() method. This methods blocks +up to the specified timeout value until one of the specified messages types +is posted on the bus. The application can then gst_bus_pop() the messages +from the bus to handle them. +Alternatively the application can register an asynchronous bus function +using gst_bus_add_watch_full() or gst_bus_add_watch(). This function will +install a #GSource in the default glib main loop and will deliver messages +a short while after they have been posted. Note that the main loop should +be running for the asynchronous callbacks. + +It is also possible to get messages from the bus without any thread +marshalling with the gst_bus_set_sync_handler() method. This makes it +possible to react to a message in the same thread that posted the +message on the bus. This should only be used if the application is able +to deal with messages from different threads. + +Every #GstPipeline has one bus. + +Note that a #GstPipeline will set its bus into flushing state when changing +from READY to NULL state. + + + Creates a new #GstBus instance. + + + a new #GstBus instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a bus signal watch to the default main context with the default priority +(%G_PRIORITY_DEFAULT). It is also possible to use a non-default +main context set up using g_main_context_push_thread_default() (before +one had to create a bus watch source and attach it to the desired main +context 'manually'). + +After calling this statement, the bus will emit the "message" signal for each +message posted on the bus. + +This function may be called multiple times. To clean up, the caller is +responsible for calling gst_bus_remove_signal_watch() as many times as this +function is called. + +MT safe. + + + + + + + a #GstBus on which you want to receive the "message" signal + + + + + + Adds a bus signal watch to the default main context with the given @priority +(e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main +context set up using g_main_context_push_thread_default() +(before one had to create a bus watch source and attach it to the desired +main context 'manually'). + +After calling this statement, the bus will emit the "message" signal for each +message posted on the bus when the main loop is running. + +This function may be called multiple times. To clean up, the caller is +responsible for calling gst_bus_remove_signal_watch() as many times as this +function is called. + +There can only be a single bus watch per bus, you must remove any signal +watch before you can set another type of watch. + +MT safe. + + + + + + + a #GstBus on which you want to receive the "message" signal + + + + The priority of the watch. + + + + + + Adds a bus watch to the default main context with the default priority +(%G_PRIORITY_DEFAULT). It is also possible to use a non-default main +context set up using g_main_context_push_thread_default() (before +one had to create a bus watch source and attach it to the desired main +context 'manually'). + +This function is used to receive asynchronous messages in the main loop. +There can only be a single bus watch per bus, you must remove it before you +can set a new one. + +The bus watch will only work if a GLib main loop is being run. + +The watch can be removed using gst_bus_remove_watch() or by returning %FALSE +from @func. If the watch was added to the default main context it is also +possible to remove the watch using g_source_remove(). + +The bus watch will take its own reference to the @bus, so it is safe to unref +@bus using gst_object_unref() after setting the bus watch. + +MT safe. + + + The event source id or 0 if @bus already got an event source. + + + + + a #GstBus to create the watch for + + + + A function to call when a message is received. + + + + user data passed to @func. + + + + + + Adds a bus watch to the default main context with the given @priority (e.g. +%G_PRIORITY_DEFAULT). It is also possible to use a non-default main +context set up using g_main_context_push_thread_default() (before +one had to create a bus watch source and attach it to the desired main +context 'manually'). + +This function is used to receive asynchronous messages in the main loop. +There can only be a single bus watch per bus, you must remove it before you +can set a new one. + +The bus watch will only work if a GLib main loop is being run. + +When @func is called, the message belongs to the caller; if you want to +keep a copy of it, call gst_message_ref() before leaving @func. + +The watch can be removed using gst_bus_remove_watch() or by returning %FALSE +from @func. If the watch was added to the default main context it is also +possible to remove the watch using g_source_remove(). + +The bus watch will take its own reference to the @bus, so it is safe to unref +@bus using gst_object_unref() after setting the bus watch. + +MT safe. + + + The event source id or 0 if @bus already got an event source. + + + + + a #GstBus to create the watch for. + + + + The priority of the watch. + + + + A function to call when a message is received. + + + + user data passed to @func. + + + + the function to call when the source is removed. + + + + + + A helper #GstBusFunc that can be used to convert all asynchronous messages +into signals. + + + %TRUE + + + + + a #GstBus + + + + the #GstMessage received + + + + user data + + + + + + Create watch for this bus. The GSource will be dispatched whenever +a message is on the bus. After the GSource is dispatched, the +message is popped off the bus and unreffed. + + + a #GSource that can be added to a mainloop. + + + + + a #GstBus to create the watch for + + + + + + Instructs GStreamer to stop emitting the "sync-message" signal for this bus. +See gst_bus_enable_sync_message_emission() for more information. + +In the event that multiple pieces of code have called +gst_bus_enable_sync_message_emission(), the sync-message emissions will only +be stopped after all calls to gst_bus_enable_sync_message_emission() were +"cancelled" by calling this function. In this way the semantics are exactly +the same as gst_object_ref() that which calls enable should also call +disable. + +MT safe. + + + + + + + a #GstBus on which you previously called +gst_bus_enable_sync_message_emission() + + + + + + Instructs GStreamer to emit the "sync-message" signal after running the bus's +sync handler. This function is here so that code can ensure that they can +synchronously receive messages without having to affect what the bin's sync +handler is. + +This function may be called multiple times. To clean up, the caller is +responsible for calling gst_bus_disable_sync_message_emission() as many times +as this function is called. + +While this function looks similar to gst_bus_add_signal_watch(), it is not +exactly the same -- this function enables *synchronous* emission of +signals when messages arrive; gst_bus_add_signal_watch() adds an idle callback +to pop messages off the bus *asynchronously*. The sync-message signal +comes from the thread of whatever object posted the message; the "message" +signal is marshalled to the main thread via the main loop. + +MT safe. + + + + + + + a #GstBus on which you want to receive the "sync-message" signal + + + + + + Gets the file descriptor from the bus which can be used to get notified about +messages being available with functions like g_poll(), and allows integration +into other event loops based on file descriptors. +Whenever a message is available, the POLLIN / %G_IO_IN event is set. + +Warning: NEVER read or write anything to the returned fd but only use it +for getting notifications via g_poll() or similar and then use the normal +GstBus API, e.g. gst_bus_pop(). + + + + + + + A #GstBus + + + + A GPollFD to fill + + + + + + Check if there are pending messages on the bus that +should be handled. + + + %TRUE if there are messages on the bus to be handled, %FALSE +otherwise. + +MT safe. + + + + + a #GstBus to check + + + + + + Peek the message on the top of the bus' queue. The message will remain +on the bus' message queue. A reference is returned, and needs to be unreffed +by the caller. + + + the #GstMessage that is on the + bus, or %NULL if the bus is empty. + +MT safe. + + + + + a #GstBus + + + + + + Poll the bus for messages. Will block while waiting for messages to come. +You can specify a maximum time to poll with the @timeout parameter. If +@timeout is negative, this function will block indefinitely. + +All messages not in @events will be popped off the bus and will be ignored. +It is not possible to use message enums beyond #GST_MESSAGE_EXTENDED in the +@events mask + +Because poll is implemented using the "message" signal enabled by +gst_bus_add_signal_watch(), calling gst_bus_poll() will cause the "message" +signal to be emitted for every message that poll sees. Thus a "message" +signal handler will see the same messages that this function sees -- neither +will steal messages from the other. + +This function will run a main loop from the default main context when +polling. + +You should never use this function, since it is pure evil. This is +especially true for GUI applications based on Gtk+ or Qt, but also for any +other non-trivial application that uses the GLib main loop. As this function +runs a GLib main loop, any callback attached to the default GLib main +context may be invoked. This could be timeouts, GUI events, I/O events etc.; +even if gst_bus_poll() is called with a 0 timeout. Any of these callbacks +may do things you do not expect, e.g. destroy the main application window or +some other resource; change other application state; display a dialog and +run another main loop until the user clicks it away. In short, using this +function may add a lot of complexity to your code through unexpected +re-entrancy and unexpected changes to your application's state. + +For 0 timeouts use gst_bus_pop_filtered() instead of this function; for +other short timeouts use gst_bus_timed_pop_filtered(); everything else is +better handled by setting up an asynchronous bus watch and doing things +from there. + + + the message that was received, + or %NULL if the poll timed out. The message is taken from the + bus and needs to be unreffed with gst_message_unref() after + usage. + + + + + a #GstBus + + + + a mask of #GstMessageType, representing the set of message types to +poll for (note special handling of extended message types below) + + + + the poll timeout, as a #GstClockTime, or #GST_CLOCK_TIME_NONE to poll +indefinitely. + + + + + + Get a message from the bus. + + + the #GstMessage that is on the + bus, or %NULL if the bus is empty. The message is taken from + the bus and needs to be unreffed with gst_message_unref() after + usage. + +MT safe. + + + + + a #GstBus to pop + + + + + + Get a message matching @type from the bus. Will discard all messages on +the bus that do not match @type and that have been posted before the first +message that does match @type. If there is no message matching @type on +the bus, all messages will be discarded. It is not possible to use message +enums beyond #GST_MESSAGE_EXTENDED in the @events mask. + + + the next #GstMessage matching + @type that is on the bus, or %NULL if the bus is empty or there + is no message matching @type. The message is taken from the bus + and needs to be unreffed with gst_message_unref() after usage. + +MT safe. + + + + + a #GstBus to pop + + + + message types to take into account + + + + + + Post a message on the given bus. Ownership of the message +is taken by the bus. + + + %TRUE if the message could be posted, %FALSE if the bus is flushing. + +MT safe. + + + + + a #GstBus to post on + + + + the #GstMessage to post + + + + + + Removes a signal watch previously added with gst_bus_add_signal_watch(). + +MT safe. + + + + + + + a #GstBus you previously added a signal watch to + + + + + + Removes an installed bus watch from @bus. + + + %TRUE on success or %FALSE if @bus has no event source. + + + + + a #GstBus to remove the watch from. + + + + + + If @flushing, flush out and unref any messages queued in the bus. Releases +references to the message origin objects. Will flush future messages until +gst_bus_set_flushing() sets @flushing to %FALSE. + +MT safe. + + + + + + + a #GstBus + + + + whether or not to flush the bus + + + + + + Sets the synchronous handler on the bus. The function will be called +every time a new message is posted on the bus. Note that the function +will be called in the same thread context as the posting object. This +function is usually only called by the creator of the bus. Applications +should handle messages asynchronously using the gst_bus watch and poll +functions. + +Before 1.16.3 it was not possible to replace an existing handler and +clearing an existing handler with %NULL was not thread-safe. + + + + + + + a #GstBus to install the handler on + + + + The handler function to install + + + + User data that will be sent to the handler function. + + + + called when @user_data becomes unused + + + + + + A helper GstBusSyncHandler that can be used to convert all synchronous +messages into signals. + + + GST_BUS_PASS + + + + + a #GstBus + + + + the #GstMessage received + + + + user data + + + + + + Get a message from the bus, waiting up to the specified timeout. + +If @timeout is 0, this function behaves like gst_bus_pop(). If @timeout is +#GST_CLOCK_TIME_NONE, this function will block forever until a message was +posted on the bus. + + + the #GstMessage that is on the + bus after the specified timeout or %NULL if the bus is empty + after the timeout expired. The message is taken from the bus + and needs to be unreffed with gst_message_unref() after usage. + +MT safe. + + + + + a #GstBus to pop + + + + a timeout + + + + + + Get a message from the bus whose type matches the message type mask @types, +waiting up to the specified timeout (and discarding any messages that do not +match the mask provided). + +If @timeout is 0, this function behaves like gst_bus_pop_filtered(). If +@timeout is #GST_CLOCK_TIME_NONE, this function will block forever until a +matching message was posted on the bus. + + + a #GstMessage matching the + filter in @types, or %NULL if no matching message was found on + the bus until the timeout expired. The message is taken from + the bus and needs to be unreffed with gst_message_unref() after + usage. + +MT safe. + + + + + a #GstBus to pop from + + + + a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever + + + + message types to take into account, GST_MESSAGE_ANY for any type + + + + + + + + + + + + + + + + + + + + A message has been posted on the bus. This signal is emitted from a +GSource added to the mainloop. this signal will only be emitted when +there is a mainloop running. + + + + + + the message that has been posted asynchronously + + + + + + A message has been posted on the bus. This signal is emitted from the +thread that posted the message so one has to be careful with locking. + +This signal will not be emitted by default, you have to call +gst_bus_enable_sync_message_emission() before. + + + + + + the message that has been posted synchronously + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The standard flags that a bus may have. + + The bus is currently dropping all messages + + + offset to define more flags + + + + Specifies the type of function passed to gst_bus_add_watch() or +gst_bus_add_watch_full(), which is called from the mainloop when a message +is available on the bus. + +The message passed to the function will be unreffed after execution of this +function so it should not be freed in the function. + +Note that this function is used as a GSourceFunc which means that returning +%FALSE will remove the GSource from the mainloop. + + + %FALSE if the event source should be removed. + + + + + the #GstBus that sent the message + + + + the #GstMessage + + + + user data that has been given, when registering the handler + + + + + + + + + Handler will be invoked synchronously, when a new message has been injected +into the bus. This function is mostly used internally. Only one sync handler +can be attached to a given bus. + +If the handler returns GST_BUS_DROP, it should unref the message, else the +message should not be unreffed by the sync handler. + + + #GstBusSyncReply stating what to do with the message + + + + + the #GstBus that sent the message + + + + the #GstMessage + + + + user data that has been given, when registering the handler + + + + + + The result values for a GstBusSyncHandler. + + drop the message + + + pass the message to the async queue + + + pass message to async queue, continue if message is handled + + + + Just call the parent handler. This assumes that there is a variable +named parent_class that points to the (duh!) parent class. Note that +this macro is not to be used with things that return something, use +the _WITH_DEFAULT version for that + + + + the name of the class cast macro for the parent type + + + name of the function to call + + + arguments enclosed in '( )' + + + + + Same as GST_CALL_PARENT(), but in case there is no implementation, it +evaluates to @def_return. + + + + the name of the class cast macro for the parent type + + + name of the function to call + + + arguments enclosed in '( )' + + + default result + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A flags word containing #GstCapsFlags flags set on this caps. + + + + a #GstCaps. + + + + + Gives the status of a specific flag on a caps. + + + + a #GstCaps. + + + the #GstCapsFlags to check. + + + + + Sets a caps flag on a caps. + + + + a #GstCaps. + + + the #GstCapsFlags to set. + + + + + Clears a caps flag. + + + + a #GstCaps. + + + the #GstCapsFlags to clear. + + + + + Convenience macro that checks if the number of structures in the given caps +is exactly one. + + + + the #GstCaps instance to check + + + + + Get access to the reference count field of the caps + + + + a #GstCaps + + + + + Get the reference count value of the caps. + + + + a #GstCaps + + + + + Output a hexdump of @data in the given category. + +There is no need to finish the end of the message string with a newline +character, a newline character will be added automatically. + + + + category to use + + + message string to log with the data + + + pointer to the data to output + + + length of the data to output + + + + + Output a hexdump of @data relating to the given object in the given +category. + +There is no need to finish the end of the message string with a newline +character, a newline character will be added automatically. + + + + category to use + + + the #GObject the message belongs to + + + message string to log with the data + + + pointer to the data to output + + + length of the data to output + + + + + Check whether a GStreamer version equal to or greater than +major.minor.micro is present. + + + + a number indicating the major version + + + a number indicating the minor version + + + a number indicating the micro version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Calculate a difference between two clock times as a #GstClockTimeDiff. +The difference is calculated as @e - @s. + + + + the first time + + + the second time + + + + + Cast to a clock entry + + + + the entry to cast + + + + + Get the owner clock of the entry + Use gst_clock_id_get_clock() instead. + + + + the entry to query + + + + + Get the interval of this periodic entry + + + + the entry to query + + + + + The status of the entry + + + + the entry to query + + + + + Get the requested time of this entry + + + + the entry to query + + + + + Get the type of the clock entry + + + + the entry to query + + + + + Gets the #GstClockFlags clock flags. + + + + the clock to query + + + + + + + + + + + + Tests if a given #GstClockTimeDiff of #gint64 represents a valid defined time. + + + + signed clock time to validate + + + + + Tests if a given #GstClockTime represents a valid defined time. + + + + clock time to validate + + + + + Constant to define an undefined clock time. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Caps (capabilities) are lightweight refcounted objects describing media types. +They are composed of an array of #GstStructure. + +Caps are exposed on #GstPadTemplate to describe all possible types a +given pad can handle. They are also stored in the #GstRegistry along with +a description of the #GstElement. + +Caps are exposed on the element pads using the gst_pad_query_caps() pad +function. This function describes the possible types that the pad can +handle or produce at runtime. + +A #GstCaps can be constructed with the following code fragment: +|[<!-- language="C" --> + GstCaps *caps = gst_caps_new_simple ("video/x-raw", + "format", G_TYPE_STRING, "I420", + "framerate", GST_TYPE_FRACTION, 25, 1, + "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, + "width", G_TYPE_INT, 320, + "height", G_TYPE_INT, 240, + NULL); +]| + +A #GstCaps is fixed when it has no properties with ranges or lists. Use +gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a +caps event to notify downstream elements of the current media type. + +Various methods exist to work with the media types such as subtracting +or intersecting. + +Be aware that the current #GstCaps / #GstStructure serialization into string +has limited support for nested #GstCaps / #GstStructure fields. It can only +support one level of nesting. Using more levels will lead to unexpected +behavior when using serialization features, such as gst_caps_to_string() or +gst_value_serialize() and their counterparts. + + + the parent type + + + + Creates a new #GstCaps that indicates that it is compatible with +any media format. + + + the new #GstCaps + + + + + Creates a new #GstCaps that is empty. That is, the returned +#GstCaps contains no media formats. +The #GstCaps is guaranteed to be writable. +Caller is responsible for unreffing the returned caps. + + + the new #GstCaps + + + + + Creates a new #GstCaps that contains one #GstStructure with name +@media_type. +Caller is responsible for unreffing the returned caps. + + + the new #GstCaps + + + + + the media type of the structure + + + + + + Creates a new #GstCaps and adds all the structures listed as +arguments. The list must be %NULL-terminated. The structures +are not copied; the returned #GstCaps owns the structures. + + + the new #GstCaps + + + + + the first structure to add + + + + additional structures to add + + + + + + Creates a new #GstCaps and adds all the structures listed as +arguments. The list must be %NULL-terminated. The structures +are not copied; the returned #GstCaps owns the structures. + + + the new #GstCaps + + + + + the first structure to add + + + + additional structures to add + + + + + + Creates a new #GstCaps that contains one #GstStructure. The +structure is defined by the arguments, which have the same format +as gst_structure_new(). +Caller is responsible for unreffing the returned caps. + + + the new #GstCaps + + + + + the media type of the structure + + + + first field to set + + + + additional arguments + + + + + + Appends the structures contained in @caps2 to @caps1. The structures in +@caps2 are not copied -- they are transferred to @caps1, and then @caps2 is +freed. If either caps is ANY, the resulting caps will be ANY. + + + + + + + the #GstCaps that will be appended to + + + + the #GstCaps to append + + + + + + Appends @structure to @caps. The structure is not copied; @caps +becomes the owner of @structure. + + + + + + + the #GstCaps that will be appended to + + + + the #GstStructure to append + + + + + + Appends @structure with @features to @caps. The structure is not copied; @caps +becomes the owner of @structure. + + + + + + + the #GstCaps that will be appended to + + + + the #GstStructure to append + + + + the #GstCapsFeatures to append + + + + + + Tries intersecting @caps1 and @caps2 and reports whether the result would not +be empty + + + %TRUE if intersection would be not empty + + + + + a #GstCaps to intersect + + + + a #GstCaps to intersect + + + + + + Creates a new #GstCaps as a copy of the old @caps. The new caps will have a +refcount of 1, owned by the caller. The structures are copied as well. + +Note that this function is the semantic equivalent of a gst_caps_ref() +followed by a gst_caps_make_writable(). If you only want to hold on to a +reference to the data, you should use gst_caps_ref(). + +When you are finished with the caps, call gst_caps_unref() on it. + + + the new #GstCaps + + + + + a #GstCaps. + + + + + + Creates a new #GstCaps and appends a copy of the nth structure +contained in @caps. + + + the new #GstCaps + + + + + the #GstCaps to copy + + + + the nth structure to copy + + + + + + Calls the provided function once for each structure and caps feature in the +#GstCaps. In contrast to gst_caps_foreach(), the function may modify the +structure and features. In contrast to gst_caps_filter_and_map_in_place(), +the structure and features are removed from the caps if %FALSE is returned +from the function. +The caps must be mutable. + + + + + + + a #GstCaps + + + + a function to call for each field + + + + private data + + + + + + Modifies the given @caps into a representation with only fixed +values. First the caps will be truncated and then the first structure will be +fixated with gst_structure_fixate(). + +This function takes ownership of @caps and will call gst_caps_make_writable() +on it so you must not use @caps afterwards unless you keep an additional +reference to it with gst_caps_ref(). + +Note that it is not guaranteed that the returned caps have exactly one +structure. If @caps are empty caps then then returned caps will be +the empty too and contain no structure at all. + +Calling this function with any caps is not allowed. + + + the fixated caps + + + + + a #GstCaps to fixate + + + + + + Calls the provided function once for each structure and caps feature in the +#GstCaps. The function must not modify the fields. +Also see gst_caps_map_in_place() and gst_caps_filter_and_map_in_place(). + + + %TRUE if the supplied function returns %TRUE for each call, +%FALSE otherwise. + + + + + a #GstCaps + + + + a function to call for each field + + + + private data + + + + + + Finds the features in @caps that has the index @index, and +returns it. + +WARNING: This function takes a const GstCaps *, but returns a +non-const GstCapsFeatures *. This is for programming convenience -- +the caller should be aware that structures inside a constant +#GstCaps should not be modified. However, if you know the caps +are writable, either because you have just copied them or made +them writable with gst_caps_make_writable(), you may modify the +features returned in the usual way, e.g. with functions like +gst_caps_features_add(). + +You do not need to free or unref the structure returned, it +belongs to the #GstCaps. + + + a pointer to the #GstCapsFeatures + corresponding to @index + + + + + a #GstCaps + + + + the index of the structure + + + + + + Gets the number of structures contained in @caps. + + + the number of structures that @caps contains + + + + + a #GstCaps + + + + + + Finds the structure in @caps that has the index @index, and +returns it. + +WARNING: This function takes a const GstCaps *, but returns a +non-const GstStructure *. This is for programming convenience -- +the caller should be aware that structures inside a constant +#GstCaps should not be modified. However, if you know the caps +are writable, either because you have just copied them or made +them writable with gst_caps_make_writable(), you may modify the +structure returned in the usual way, e.g. with functions like +gst_structure_set(). + +You do not need to free or unref the structure returned, it +belongs to the #GstCaps. + + + a pointer to the #GstStructure corresponding + to @index + + + + + a #GstCaps + + + + the index of the structure + + + + + + Creates a new #GstCaps that contains all the formats that are common +to both @caps1 and @caps2. Defaults to %GST_CAPS_INTERSECT_ZIG_ZAG mode. + + + the new #GstCaps + + + + + a #GstCaps to intersect + + + + a #GstCaps to intersect + + + + + + Creates a new #GstCaps that contains all the formats that are common +to both @caps1 and @caps2, the order is defined by the #GstCapsIntersectMode +used. + + + the new #GstCaps + + + + + a #GstCaps to intersect + + + + a #GstCaps to intersect + + + + The intersection algorithm/mode to use + + + + + + A given #GstCaps structure is always compatible with another if +every media format that is in the first is also contained in the +second. That is, @caps1 is a subset of @caps2. + + + %TRUE if @caps1 is a subset of @caps2. + + + + + the #GstCaps to test + + + + the #GstCaps to test + + + + + + Determines if @caps represents any media format. + + + %TRUE if @caps represents any format. + + + + + the #GstCaps to test + + + + + + Determines if @caps represents no media formats. + + + %TRUE if @caps represents no formats. + + + + + the #GstCaps to test + + + + + + Checks if the given caps represent the same set of caps. + + + %TRUE if both caps are equal. + + + + + a #GstCaps + + + + another #GstCaps + + + + + + Tests if two #GstCaps are equal. This function only works on fixed +#GstCaps. + + + %TRUE if the arguments represent the same format + + + + + the #GstCaps to test + + + + the #GstCaps to test + + + + + + Fixed #GstCaps describe exactly one format, that is, they have exactly +one structure, and each field in the structure describes a fixed type. +Examples of non-fixed types are GST_TYPE_INT_RANGE and GST_TYPE_LIST. + + + %TRUE if @caps is fixed + + + + + the #GstCaps to test + + + + + + Checks if the given caps are exactly the same set of caps. + + + %TRUE if both caps are strictly equal. + + + + + a #GstCaps + + + + another #GstCaps + + + + + + Checks if all caps represented by @subset are also represented by @superset. + + + %TRUE if @subset is a subset of @superset + + + + + a #GstCaps + + + + a potentially greater #GstCaps + + + + + + Checks if @structure is a subset of @caps. See gst_caps_is_subset() +for more information. + + + %TRUE if @structure is a subset of @caps + + + + + a #GstCaps + + + + a potential #GstStructure subset of @caps + + + + + + Checks if @structure is a subset of @caps. See gst_caps_is_subset() +for more information. + + + %TRUE if @structure is a subset of @caps + + + + + a #GstCaps + + + + a potential #GstStructure subset of @caps + + + + a #GstCapsFeatures for @structure + + + + + + Calls the provided function once for each structure and caps feature in the +#GstCaps. In contrast to gst_caps_foreach(), the function may modify but not +delete the structures and features. The caps must be mutable. + + + %TRUE if the supplied function returns %TRUE for each call, +%FALSE otherwise. + + + + + a #GstCaps + + + + a function to call for each field + + + + private data + + + + + + Appends the structures contained in @caps2 to @caps1 if they are not yet +expressed by @caps1. The structures in @caps2 are not copied -- they are +transferred to a writable copy of @caps1, and then @caps2 is freed. +If either caps is ANY, the resulting caps will be ANY. + + + the merged caps. + + + + + the #GstCaps that will take the new entries + + + + the #GstCaps to merge in + + + + + + Appends @structure to @caps if its not already expressed by @caps. + + + the merged caps. + + + + + the #GstCaps to merge into + + + + the #GstStructure to merge + + + + + + Appends @structure with @features to @caps if its not already expressed by @caps. + + + the merged caps. + + + + + the #GstCaps to merge into + + + + the #GstStructure to merge + + + + the #GstCapsFeatures to merge + + + + + + Returns a #GstCaps that represents the same set of formats as +@caps, but contains no lists. Each list is expanded into separate +@GstStructures. + +This function takes ownership of @caps and will call gst_caps_make_writable() +on it so you must not use @caps afterwards unless you keep an additional +reference to it with gst_caps_ref(). + + + the normalized #GstCaps + + + + + a #GstCaps to normalize + + + + + + Add a reference to a #GstCaps object. + +From this point on, until the caller calls gst_caps_unref() or +gst_caps_make_writable(), it is guaranteed that the caps object will not +change. This means its structures won't change, etc. To use a #GstCaps +object, you must always have a refcount on it -- either the one made +implicitly by e.g. gst_caps_new_simple(), or via taking one explicitly with +this function. + + + the same #GstCaps object. + + + + + the #GstCaps to reference + + + + + + removes the structure with the given index from the list of structures +contained in @caps. + + + + + + + the #GstCaps to remove from + + + + Index of the structure to remove + + + + + + Sets the #GstCapsFeatures @features for the structure at @index. + + + + + + + a #GstCaps + + + + the index of the structure + + + + the #GstCapsFeatures to set + + + + + + Sets the #GstCapsFeatures @features for all the structures of @caps. + + + + + + + a #GstCaps + + + + the #GstCapsFeatures to set + + + + + + Sets fields in a #GstCaps. The arguments must be passed in the same +manner as gst_structure_set(), and be %NULL-terminated. + + + + + + + the #GstCaps to set + + + + first field to set + + + + additional parameters + + + + + + Sets fields in a #GstCaps. The arguments must be passed in the same +manner as gst_structure_set(), and be %NULL-terminated. + + + + + + + the #GstCaps to set + + + + first field to set + + + + additional parameters + + + + + + Sets the given @field on all structures of @caps to the given @value. +This is a convenience function for calling gst_structure_set_value() on +all structures of @caps. + + + + + + + a writable caps + + + + name of the field to set + + + + value to set the field to + + + + + + Converts the given @caps into a representation that represents the +same set of formats, but in a simpler form. Component structures that are +identical are merged. Component structures that have values that can be +merged are also merged. + +This function takes ownership of @caps and will call gst_caps_make_writable() +on it if necessary, so you must not use @caps afterwards unless you keep an +additional reference to it with gst_caps_ref(). + +This method does not preserve the original order of @caps. + + + The simplified caps. + + + + + a #GstCaps to simplify + + + + + + Retrieves the structure with the given index from the list of structures +contained in @caps. The caller becomes the owner of the returned structure. + + + a pointer to the #GstStructure + corresponding to @index. + + + + + the #GstCaps to retrieve from + + + + Index of the structure to retrieve + + + + + + Subtracts the @subtrahend from the @minuend. +> This function does not work reliably if optional properties for caps +> are included on one caps and omitted on the other. + + + the resulting caps + + + + + #GstCaps to subtract from + + + + #GstCaps to subtract + + + + + + Converts @caps to a string representation. This string representation +can be converted back to a #GstCaps by gst_caps_from_string(). + +For debugging purposes its easier to do something like this: +|[<!-- language="C" --> +GST_LOG ("caps are %" GST_PTR_FORMAT, caps); +]| +This prints the caps in human readable form. + +The current implementation of serialization will lead to unexpected results +when there are nested #GstCaps / #GstStructure deeper than one level. + + + a newly allocated string representing @caps. + + + + + a #GstCaps + + + + + + Discard all but the first structure from @caps. Useful when +fixating. + +This function takes ownership of @caps and will call gst_caps_make_writable() +on it if necessary, so you must not use @caps afterwards unless you keep an +additional reference to it with gst_caps_ref(). + +Note that it is not guaranteed that the returned caps have exactly one +structure. If @caps is any or empty caps then then returned caps will be +the same and contain no structure at all. + + + truncated caps + + + + + the #GstCaps to truncate + + + + + + Unref a #GstCaps and and free all its structures and the +structures' values when the refcount reaches 0. + + + + + + + a #GstCaps. + + + + + + Converts @caps from a string representation. + +The current implementation of serialization will lead to unexpected results +when there are nested #GstCaps / #GstStructure deeper than one level. + + + a newly allocated #GstCaps + + + + + a string to convert to #GstCaps + + + + + + Modifies a pointer to a #GstCaps to point to a different #GstCaps. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +caps is unreffed, the new is reffed). + +Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL. + + + %TRUE if @new_caps was different from @old_caps + + + + + pointer to a pointer + to a #GstCaps to be replaced. + + + + pointer to a #GstCaps that will + replace the caps pointed to by @old_caps. + + + + + + Modifies a pointer to a #GstCaps to point to a different #GstCaps. This +function is similar to gst_caps_replace() except that it takes ownership +of @new_caps. + + + %TRUE if @new_caps was different from @old_caps + + + + + pointer to a pointer to a #GstCaps to be + replaced. + + + + pointer to a #GstCaps that will + replace the caps pointed to by @old_caps. + + + + + + + #GstCapsFeatures can optionally be set on a #GstCaps to add requirements +for additional features for a specific #GstStructure. Caps structures with +the same name but with a non-equal set of caps features are not compatible. +If a pad supports multiple sets of features it has to add multiple equal +structures with different feature sets to the caps. + +Empty #GstCapsFeatures are equivalent with the #GstCapsFeatures that only +contain #GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANY #GstCapsFeatures as +created by gst_caps_features_new_any() are equal to any other #GstCapsFeatures +and can be used to specify that any #GstCapsFeatures would be supported, e.g. +for elements that don't touch buffer memory. #GstCaps with ANY #GstCapsFeatures +are considered non-fixed and during negotiation some #GstCapsFeatures have +to be selected. + +Examples for caps features would be the requirement of a specific #GstMemory +types or the requirement of having a specific #GstMeta on the buffer. Features +are given as a string of the format "memory:GstMemoryTypeName" or +"meta:GstMetaAPIName". + + + Creates a new #GstCapsFeatures with the given features. +The last argument must be %NULL. + +Free-function: gst_caps_features_free + + + a new, empty #GstCapsFeatures + + + + + name of first feature to set + + + + additional features + + + + + + Creates a new, ANY #GstCapsFeatures. This will be equal +to any other #GstCapsFeatures but caps with these are +unfixed. + +Free-function: gst_caps_features_free + + + a new, ANY #GstCapsFeatures + + + + + Creates a new, empty #GstCapsFeatures. + +Free-function: gst_caps_features_free + + + a new, empty #GstCapsFeatures + + + + + Creates a new #GstCapsFeatures with the given features. +The last argument must be 0. + +Free-function: gst_caps_features_free + + + a new, empty #GstCapsFeatures + + + + + name of first feature to set + + + + additional features + + + + + + Creates a new #GstCapsFeatures with the given features. + +Free-function: gst_caps_features_free + + + a new, empty #GstCapsFeatures + + + + + name of first feature to set + + + + variable argument list + + + + + + Creates a new #GstCapsFeatures with the given features. + +Free-function: gst_caps_features_free + + + a new, empty #GstCapsFeatures + + + + + name of first feature to set + + + + variable argument list + + + + + + Adds @feature to @features. + + + + + + + a #GstCapsFeatures. + + + + a feature. + + + + + + Adds @feature to @features. + + + + + + + a #GstCapsFeatures. + + + + a feature. + + + + + + Check if @features contains @feature. + + + %TRUE if @features contains @feature. + + + + + a #GstCapsFeatures. + + + + a feature + + + + + + Check if @features contains @feature. + + + %TRUE if @features contains @feature. + + + + + a #GstCapsFeatures. + + + + a feature + + + + + + Duplicates a #GstCapsFeatures and all its values. + +Free-function: gst_caps_features_free + + + a new #GstCapsFeatures. + + + + + a #GstCapsFeatures to duplicate + + + + + + Frees a #GstCapsFeatures and all its values. The caps features must not +have a parent when this function is called. + + + + + + + the #GstCapsFeatures to free + + + + + + Returns the @i-th feature of @features. + + + The @i-th feature of @features. + + + + + a #GstCapsFeatures. + + + + index of the feature + + + + + + Returns the @i-th feature of @features. + + + The @i-th feature of @features. + + + + + a #GstCapsFeatures. + + + + index of the feature + + + + + + Returns the number of features in @features. + + + The number of features in @features. + + + + + a #GstCapsFeatures. + + + + + + Check if @features is %GST_CAPS_FEATURES_ANY. + + + %TRUE if @features is %GST_CAPS_FEATURES_ANY. + + + + + a #GstCapsFeatures. + + + + + + Check if @features1 and @features2 are equal. + + + %TRUE if @features1 and @features2 are equal. + + + + + a #GstCapsFeatures. + + + + a #GstCapsFeatures. + + + + + + Removes @feature from @features. + + + + + + + a #GstCapsFeatures. + + + + a feature. + + + + + + Removes @feature from @features. + + + + + + + a #GstCapsFeatures. + + + + a feature. + + + + + + Sets the parent_refcount field of #GstCapsFeatures. This field is used to +determine whether a caps features is mutable or not. This function should only be +called by code implementing parent objects of #GstCapsFeatures, as described in +the MT Refcounting section of the design documents. + + + %TRUE if the parent refcount could be set. + + + + + a #GstCapsFeatures + + + + a pointer to the parent's refcount + + + + + + Converts @features to a human-readable string representation. + +For debugging purposes its easier to do something like this: +|[<!-- language="C" --> +GST_LOG ("features is %" GST_PTR_FORMAT, features); +]| +This prints the features in human readable form. + +Free-function: g_free + + + a pointer to string allocated by g_malloc(). + g_free() after usage. + + + + + a #GstCapsFeatures + + + + + + Creates a #GstCapsFeatures from a string representation. + +Free-function: gst_caps_features_free + + + a new #GstCapsFeatures or + %NULL when the string could not be parsed. Free with + gst_caps_features_free() after use. + + + + + a string representation of a #GstCapsFeatures. + + + + + + + A function that will be called in gst_caps_filter_and_map_in_place(). +The function may modify @features and @structure, and both will be +removed from the caps if %FALSE is returned. + + + %TRUE if the features and structure should be preserved, +%FALSE if it should be removed. + + + + + the #GstCapsFeatures + + + + the #GstStructure + + + + user data + + + + + + Extra flags for a caps. + + Caps has no specific content, but can contain + anything. + + + + A function that will be called in gst_caps_foreach(). The function may +not modify @features or @structure. + + + %TRUE if the foreach operation should continue, %FALSE if +the foreach operation should stop with %FALSE. + + + + + the #GstCapsFeatures + + + + the #GstStructure + + + + user data + + + + + + Modes of caps intersection + +@GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps +by iterating on the caps' structures as the following matrix shows: +|[ + caps1 + +------------- + | 1 2 4 7 +caps2 | 3 5 8 10 + | 6 9 11 12 +]| +Used when there is no explicit precedence of one caps over the other. e.g. +tee's sink pad getcaps function, it will probe its src pad peers' for their +caps and intersect them with this mode. + +@GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve +another element's caps priority order when intersecting with its own caps. +Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result +would be [A, B], maintaining the first caps priority on the intersection. + + Zig-zags over both caps. + + + Keeps the first caps order. + + + + A function that will be called in gst_caps_map_in_place(). The function +may modify @features and @structure. + + + %TRUE if the map operation should continue, %FALSE if +the map operation should stop with %FALSE. + + + + + the #GstCapsFeatures + + + + the #GstStructure + + + + user data + + + + + + This interface abstracts handling of property sets for elements with +children. Imagine elements such as mixers or polyphonic generators. They all +have multiple #GstPad or some kind of voice objects. Another use case are +container elements like #GstBin. +The element implementing the interface acts as a parent for those child +objects. + +By implementing this interface the child properties can be accessed from the +parent element by using gst_child_proxy_get() and gst_child_proxy_set(). + +Property names are written as "child-name::property-name". The whole naming +scheme is recursive. Thus "child1::child2::property" is valid too, if +"child1" and "child2" implement the #GstChildProxy interface. + + + Emits the "child-added" signal. + + + + + + + the parent object + + + + the newly added child + + + + the name of the new child + + + + + + Emits the "child-removed" signal. + + + + + + + the parent object + + + + the removed child + + + + the name of the old child + + + + + + Fetches a child by its number. + + + the child object or %NULL if + not found (index too high). Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's position in the child list + + + + + + Looks up a child element by the given name. + +This virtual method has a default implementation that uses #GstObject +together with gst_object_get_name(). If the interface is to be used with +#GObjects, this methods needs to be overridden. + + + the child object or %NULL if + not found. Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's name + + + + + + Gets the number of child objects this parent contains. + + + the number of child objects + +MT safe. + + + + + the parent object + + + + + + Emits the "child-added" signal. + + + + + + + the parent object + + + + the newly added child + + + + the name of the new child + + + + + + Emits the "child-removed" signal. + + + + + + + the parent object + + + + the removed child + + + + the name of the old child + + + + + + Gets properties of the parent object and its children. + + + + + + + the parent object + + + + name of the first property to get + + + + return location for the first property, followed optionally by more name/return location pairs, followed by %NULL + + + + + + Fetches a child by its number. + + + the child object or %NULL if + not found (index too high). Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's position in the child list + + + + + + Looks up a child element by the given name. + +This virtual method has a default implementation that uses #GstObject +together with gst_object_get_name(). If the interface is to be used with +#GObjects, this methods needs to be overridden. + + + the child object or %NULL if + not found. Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's name + + + + + + Gets the number of child objects this parent contains. + + + the number of child objects + +MT safe. + + + + + the parent object + + + + + + Gets a single property using the GstChildProxy mechanism. +You are responsible for freeing it by calling g_value_unset() + + + + + + + object to query + + + + name of the property + + + + a #GValue that should take the result. + + + + + + Gets properties of the parent object and its children. + + + + + + + the object to query + + + + name of the first property to get + + + + return location for the first property, followed optionally by more name/return location pairs, followed by %NULL + + + + + + Looks up which object and #GParamSpec would be effected by the given @name. + +MT safe. + + + %TRUE if @target and @pspec could be found. %FALSE otherwise. In that +case the values for @pspec and @target are not modified. Unref @target after +usage. For plain GObjects @target is the same as @object. + + + + + child proxy object to lookup the property in + + + + name of the property to look up + + + + pointer to a #GObject that + takes the real object to set property on + + + + pointer to take the #GParamSpec + describing the property + + + + + + Sets properties of the parent object and its children. + + + + + + + the parent object + + + + name of the first property to set + + + + value for the first property, followed optionally by more name/value pairs, followed by %NULL + + + + + + Sets a single property using the GstChildProxy mechanism. + + + + + + + the parent object + + + + name of the property to set + + + + new #GValue for the property + + + + + + Sets properties of the parent object and its children. + + + + + + + the parent object + + + + name of the first property to set + + + + value for the first property, followed optionally by more name/value pairs, followed by %NULL + + + + + + Will be emitted after the @object was added to the @child_proxy. + + + + + + the #GObject that was added + + + + the name of the new child + + + + + + Will be emitted after the @object was removed from the @child_proxy. + + + + + + the #GObject that was removed + + + + the name of the old child + + + + + + + #GstChildProxy interface. + + + parent interface type. + + + + + + + the child object or %NULL if + not found. Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's name + + + + + + + + + + the child object or %NULL if + not found (index too high). Unref after usage. + +MT safe. + + + + + the parent object to get the child from + + + + the child's position in the child list + + + + + + + + + + the number of child objects + +MT safe. + + + + + the parent object + + + + + + + + + + + + + + the parent object + + + + the newly added child + + + + the name of the new child + + + + + + + + + + + + + + the parent object + + + + the removed child + + + + the name of the old child + + + + + + + + + + + + + GStreamer uses a global clock to synchronize the plugins in a pipeline. +Different clock implementations are possible by implementing this abstract +base class or, more conveniently, by subclassing #GstSystemClock. + +The #GstClock returns a monotonically increasing time with the method +gst_clock_get_time(). Its accuracy and base time depend on the specific +clock implementation but time is always expressed in nanoseconds. Since the +baseline of the clock is undefined, the clock time returned is not +meaningful in itself, what matters are the deltas between two clock times. +The time returned by a clock is called the absolute time. + +The pipeline uses the clock to calculate the running time. Usually all +renderers synchronize to the global clock using the buffer timestamps, the +newsegment events and the element's base time, see #GstPipeline. + +A clock implementation can support periodic and single shot clock +notifications both synchronous and asynchronous. + +One first needs to create a #GstClockID for the periodic or single shot +notification using gst_clock_new_single_shot_id() or +gst_clock_new_periodic_id(). + +To perform a blocking wait for the specific time of the #GstClockID use the +gst_clock_id_wait(). To receive a callback when the specific time is reached +in the clock use gst_clock_id_wait_async(). Both these calls can be +interrupted with the gst_clock_id_unschedule() call. If the blocking wait is +unscheduled a return value of #GST_CLOCK_UNSCHEDULED is returned. + +Periodic callbacks scheduled async will be repeatedly called automatically +until it is unscheduled. To schedule a sync periodic callback, +gst_clock_id_wait() should be called repeatedly. + +The async callbacks can happen from any thread, either provided by the core +or from a streaming thread. The application should be prepared for this. + +A #GstClockID that has been unscheduled cannot be used again for any wait +operation, a new #GstClockID should be created and the old unscheduled one +should be destroyed with gst_clock_id_unref(). + +It is possible to perform a blocking wait on the same #GstClockID from +multiple threads. However, registering the same #GstClockID for multiple +async notifications is not possible, the callback will only be called for +the thread registering the entry last. + +None of the wait operations unref the #GstClockID, the owner is responsible +for unreffing the ids itself. This holds for both periodic and single shot +notifications. The reason being that the owner of the #GstClockID has to +keep a handle to the #GstClockID to unblock the wait on FLUSHING events or +state changes and if the entry would be unreffed automatically, the handle +might become invalid without any notification. + +These clock operations do not operate on the running time, so the callbacks +will also occur when not in PLAYING state as if the clock just keeps on +running. Some clocks however do not progress when the element that provided +the clock is not PLAYING. + +When a clock has the #GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be +slaved to another #GstClock with the gst_clock_set_master(). The clock will +then automatically be synchronized to this master clock by repeatedly +sampling the master clock and the slave clock and recalibrating the slave +clock with gst_clock_set_calibration(). This feature is mostly useful for +plugins that have an internal clock but must operate with another clock +selected by the #GstPipeline. They can track the offset and rate difference +of their internal clock relative to the master clock by using the +gst_clock_get_calibration() function. + +The master/slave synchronisation can be tuned with the #GstClock:timeout, +#GstClock:window-size and #GstClock:window-threshold properties. +The #GstClock:timeout property defines the interval to sample the master +clock and run the calibration functions. #GstClock:window-size defines the +number of samples to use when calibrating and #GstClock:window-threshold +defines the minimum number of samples before the calibration is performed. + + + Compares the two #GstClockID instances. This function can be used +as a GCompareFunc when sorting ids. + + + negative value if a < b; zero if a = b; positive value if a > b + +MT safe. + + + + + A #GstClockID + + + + A #GstClockID to compare with + + + + + + This function returns the underlying clock. + + + a #GstClock or %NULL when the + underlying clock has been freed. Unref after usage. + +MT safe. + + + + + a #GstClockID + + + + + + Get the time of the clock ID + + + the time of the given clock id. + +MT safe. + + + + + The #GstClockID to query + + + + + + Increase the refcount of given @id. + + + The same #GstClockID with increased refcount. + +MT safe. + + + + + The #GstClockID to ref + + + + + + Unref given @id. When the refcount reaches 0 the +#GstClockID will be freed. + +MT safe. + + + + + + + The #GstClockID to unref + + + + + + Cancel an outstanding request with @id. This can either +be an outstanding async notification or a pending sync notification. +After this call, @id cannot be used anymore to receive sync or +async notifications, you need to create a new #GstClockID. + +MT safe. + + + + + + + The id to unschedule + + + + + + This function returns whether @id uses @clock as the underlying clock. +@clock can be NULL, in which case the return value indicates whether +the underlying clock has been freed. If this is the case, the @id is +no longer usable and should be freed. + + + whether the clock @id uses the same underlying #GstClock @clock. + +MT safe. + + + + + a #GstClockID to check + + + + a #GstClock to compare against + + + + + + Perform a blocking wait on @id. +@id should have been created with gst_clock_new_single_shot_id() +or gst_clock_new_periodic_id() and should not have been unscheduled +with a call to gst_clock_id_unschedule(). + +If the @jitter argument is not %NULL and this function returns #GST_CLOCK_OK +or #GST_CLOCK_EARLY, it will contain the difference +against the clock and the time of @id when this method was +called. +Positive values indicate how late @id was relative to the clock +(in which case this function will return #GST_CLOCK_EARLY). +Negative values indicate how much time was spent waiting on the clock +before this function returned. + + + the result of the blocking wait. #GST_CLOCK_EARLY will be returned +if the current clock time is past the time of @id, #GST_CLOCK_OK if +@id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was +unscheduled with gst_clock_id_unschedule(). + +MT safe. + + + + + The #GstClockID to wait on + + + + a pointer that will contain the jitter, + can be %NULL. + + + + + + Register a callback on the given #GstClockID @id with the given +function and user_data. When passing a #GstClockID with an invalid +time to this function, the callback will be called immediately +with a time set to GST_CLOCK_TIME_NONE. The callback will +be called when the time of @id has been reached. + +The callback @func can be invoked from any thread, either provided by the +core or from a streaming thread. The application should be prepared for this. + + + the result of the non blocking wait. + +MT safe. + + + + + a #GstClockID to wait on + + + + The callback function + + + + User data passed in the callback + + + + #GDestroyNotify for user_data + + + + + + + + + + + + + + + + + + + + + + + Gets the current internal time of the given clock. The time is returned +unadjusted for the offset and the rate. + + + the internal time of the clock. Or GST_CLOCK_TIME_NONE when +given invalid input. + +MT safe. + + + + + a #GstClock to query + + + + + + Get the accuracy of the clock. The accuracy of the clock is the granularity +of the values returned by gst_clock_get_time(). + + + the resolution of the clock in units of #GstClockTime. + +MT safe. + + + + + a #GstClock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The time @master of the master clock and the time @slave of the slave +clock are added to the list of observations. If enough observations +are available, a linear regression algorithm is run on the +observations and @clock is recalibrated. + +If this functions returns %TRUE, @r_squared will contain the +correlation coefficient of the interpolation. A value of 1.0 +means a perfect regression was performed. This value can +be used to control the sampling frequency of the master and slave +clocks. + + + %TRUE if enough observations were added to run the +regression algorithm. + +MT safe. + + + + + a #GstClock + + + + a time on the slave + + + + a time on the master + + + + a pointer to hold the result + + + + + + Add a clock observation to the internal slaving algorithm the same as +gst_clock_add_observation(), and return the result of the master clock +estimation, without updating the internal calibration. + +The caller can then take the results and call gst_clock_set_calibration() +with the values, or some modified version of them. + + + + + + + a #GstClock + + + + a time on the slave + + + + a time on the master + + + + a pointer to hold the result + + + + a location to store the internal time + + + + a location to store the external time + + + + a location to store the rate numerator + + + + a location to store the rate denominator + + + + + + Converts the given @internal clock time to the external time, adjusting for the +rate and reference time set with gst_clock_set_calibration() and making sure +that the returned time is increasing. This function should be called with the +clock's OBJECT_LOCK held and is mainly used by clock subclasses. + +This function is the reverse of gst_clock_unadjust_unlocked(). + + + the converted time of the clock. + + + + + a #GstClock to use + + + + a clock time + + + + + + Converts the given @internal_target clock time to the external time, +using the passed calibration parameters. This function performs the +same calculation as gst_clock_adjust_unlocked() when called using the +current calibration parameters, but doesn't ensure a monotonically +increasing result as gst_clock_adjust_unlocked() does. + +Note: The @clock parameter is unused and can be NULL + + + the converted time of the clock. + + + + + a #GstClock to use + + + + a clock time + + + + a reference internal time + + + + a reference external time + + + + the numerator of the rate of the clock relative to its + internal time + + + + the denominator of the rate of the clock + + + + + + Gets the internal rate and reference time of @clock. See +gst_clock_set_calibration() for more information. + +@internal, @external, @rate_num, and @rate_denom can be left %NULL if the +caller is not interested in the values. + +MT safe. + + + + + + + a #GstClock + + + + a location to store the internal time + + + + a location to store the external time + + + + a location to store the rate numerator + + + + a location to store the rate denominator + + + + + + Gets the current internal time of the given clock. The time is returned +unadjusted for the offset and the rate. + + + the internal time of the clock. Or GST_CLOCK_TIME_NONE when +given invalid input. + +MT safe. + + + + + a #GstClock to query + + + + + + Get the master clock that @clock is slaved to or %NULL when the clock is +not slaved to any master clock. + + + a master #GstClock or %NULL + when this clock is not slaved to a master clock. Unref after + usage. + +MT safe. + + + + + a #GstClock + + + + + + Get the accuracy of the clock. The accuracy of the clock is the granularity +of the values returned by gst_clock_get_time(). + + + the resolution of the clock in units of #GstClockTime. + +MT safe. + + + + + a #GstClock + + + + + + Gets the current time of the given clock. The time is always +monotonically increasing and adjusted according to the current +offset and rate. + + + the time of the clock. Or GST_CLOCK_TIME_NONE when +given invalid input. + +MT safe. + + + + + a #GstClock to query + + + + + + Get the amount of time that master and slave clocks are sampled. + + + the interval between samples. + + + + + a #GstClock + + + + + + Checks if the clock is currently synced. + +This returns if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is not set on the clock. + + + %TRUE if the clock is currently synced + + + + + a GstClock + + + + + + Get an ID from @clock to trigger a periodic notification. +The periodic notifications will start at time @start_time and +will then be fired with the given @interval. @id should be unreffed +after usage. + +Free-function: gst_clock_id_unref + + + a #GstClockID that can be used to request the + time notification. + +MT safe. + + + + + The #GstClockID to get a periodic notification id from + + + + the requested start time + + + + the requested interval + + + + + + Get a #GstClockID from @clock to trigger a single shot +notification at the requested time. The single shot id should be +unreffed after usage. + +Free-function: gst_clock_id_unref + + + a #GstClockID that can be used to request the + time notification. + +MT safe. + + + + + The #GstClockID to get a single shot notification from + + + + the requested time + + + + + + Reinitializes the provided periodic @id to the provided start time and +interval. Does not modify the reference count. + + + %TRUE if the GstClockID could be reinitialized to the provided +@time, else %FALSE. + + + + + a #GstClock + + + + a #GstClockID + + + + the requested start time + + + + the requested interval + + + + + + Adjusts the rate and time of @clock. A rate of 1/1 is the normal speed of +the clock. Values bigger than 1/1 make the clock go faster. + +@internal and @external are calibration parameters that arrange that +gst_clock_get_time() should have been @external at internal time @internal. +This internal time should not be in the future; that is, it should be less +than the value of gst_clock_get_internal_time() when this function is called. + +Subsequent calls to gst_clock_get_time() will return clock times computed as +follows: + +|[ + time = (internal_time - internal) * rate_num / rate_denom + external +]| + +This formula is implemented in gst_clock_adjust_unlocked(). Of course, it +tries to do the integer arithmetic as precisely as possible. + +Note that gst_clock_get_time() always returns increasing values so when you +move the clock backwards, gst_clock_get_time() will report the previous value +until the clock catches up. + +MT safe. + + + + + + + a #GstClock to calibrate + + + + a reference internal time + + + + a reference external time + + + + the numerator of the rate of the clock relative to its + internal time + + + + the denominator of the rate of the clock + + + + + + Set @master as the master clock for @clock. @clock will be automatically +calibrated so that gst_clock_get_time() reports the same time as the +master clock. + +A clock provider that slaves its clock to a master can get the current +calibration values with gst_clock_get_calibration(). + +@master can be %NULL in which case @clock will not be slaved anymore. It will +however keep reporting its time adjusted with the last configured rate +and time offsets. + + + %TRUE if the clock is capable of being slaved to a master clock. +Trying to set a master on a clock without the +#GST_CLOCK_FLAG_CAN_SET_MASTER flag will make this function return %FALSE. + +MT safe. + + + + + a #GstClock + + + + a master #GstClock + + + + + + Set the accuracy of the clock. Some clocks have the possibility to operate +with different accuracy at the expense of more resource usage. There is +normally no need to change the default resolution of a clock. The resolution +of a clock can only be changed if the clock has the +#GST_CLOCK_FLAG_CAN_SET_RESOLUTION flag set. + + + the new resolution of the clock. + + + + + a #GstClock + + + + The resolution to set + + + + + + Sets @clock to synced and emits the GstClock::synced signal, and wakes up any +thread waiting in gst_clock_wait_for_sync(). + +This function must only be called if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC +is set on the clock, and is intended to be called by subclasses only. + + + + + + + a GstClock + + + + if the clock is synced + + + + + + Set the amount of time, in nanoseconds, to sample master and slave +clocks + + + + + + + a #GstClock + + + + a timeout + + + + + + Reinitializes the provided single shot @id to the provided time. Does not +modify the reference count. + + + %TRUE if the GstClockID could be reinitialized to the provided +@time, else %FALSE. + + + + + a #GstClock + + + + a #GstClockID + + + + The requested time. + + + + + + Converts the given @external clock time to the internal time of @clock, +using the rate and reference time set with gst_clock_set_calibration(). +This function should be called with the clock's OBJECT_LOCK held and +is mainly used by clock subclasses. + +This function is the reverse of gst_clock_adjust_unlocked(). + + + the internal time of the clock corresponding to @external. + + + + + a #GstClock to use + + + + an external clock time + + + + + + Converts the given @external_target clock time to the internal time, +using the passed calibration parameters. This function performs the +same calculation as gst_clock_unadjust_unlocked() when called using the +current calibration parameters. + +Note: The @clock parameter is unused and can be NULL + + + the converted time of the clock. + + + + + a #GstClock to use + + + + a clock time + + + + a reference internal time + + + + a reference external time + + + + the numerator of the rate of the clock relative to its + internal time + + + + the denominator of the rate of the clock + + + + + + Waits until @clock is synced for reporting the current time. If @timeout +is %GST_CLOCK_TIME_NONE it will wait forever, otherwise it will time out +after @timeout nanoseconds. + +For asynchronous waiting, the GstClock::synced signal can be used. + +This returns immediately with TRUE if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC +is not set on the clock, or if the clock is already synced. + + + %TRUE if waiting was successful, or %FALSE on timeout + + + + + a GstClock + + + + timeout for waiting or %GST_CLOCK_TIME_NONE + + + + + + + + + + + + + + + + + + + + + + + + + + Signaled on clocks with GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC set once +the clock is synchronized, or when it completely lost synchronization. +This signal will not be emitted on clocks without the flag. + +This signal will be emitted from an arbitrary thread, most likely not +the application's main thread. + + + + + + if the clock is synced now + + + + + + + The function prototype of the callback. + + + %TRUE or %FALSE (currently unused) + + + + + The clock that triggered the callback + + + + The time it was triggered + + + + The #GstClockID that expired + + + + user data passed in the gst_clock_id_wait_async() function + + + + + + GStreamer clock class. Override the vmethods to implement the clock +functionality. + + + the parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + the resolution of the clock in units of #GstClockTime. + +MT safe. + + + + + a #GstClock + + + + + + + + + + the internal time of the clock. Or GST_CLOCK_TIME_NONE when +given invalid input. + +MT safe. + + + + + a #GstClock to query + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All pending timeouts or periodic notifies are converted into +an entry. +Note that GstClockEntry should be treated as an opaque structure. It must +not be extended or allocated using a custom allocator. + + + reference counter (read-only) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The type of the clock entry + + a single shot timeout + + + a periodic timeout request + + + + The capabilities of this clock + + clock can do a single sync timeout request + + + clock can do a single async timeout request + + + clock can do sync periodic timeout requests + + + clock can do async periodic timeout callbacks + + + clock's resolution can be changed + + + clock can be slaved to a master clock + + + clock needs to be synced before it can be used + (Since: 1.6) + + + subclasses can add additional flags starting from this flag + + + + + + + The return value of a clock operation. + + The operation succeeded. + + + The operation was scheduled too late. + + + The clockID was unscheduled + + + The ClockID is busy + + + A bad time was provided to a function. + + + An error occurred + + + Operation is not supported + + + The ClockID is done waiting + + + + The different kind of clocks. + + time since Epoch + + + monotonic time since some unspecified starting + point + + + some other time source is used (Since: 1.0.5) + + + time since Epoch, but using International Atomic Time + as reference (Since: 1.18) + + + + #GstContext is a container object used to store contexts like a device +context, a display server connection and similar concepts that should +be shared between multiple elements. + +Applications can set a context on a complete pipeline by using +gst_element_set_context(), which will then be propagated to all +child elements. Elements can handle these in #GstElementClass.set_context() +and merge them with the context information they already have. + +When an element needs a context it will do the following actions in this +order until one step succeeds: +1. Check if the element already has a context +2. Query downstream with GST_QUERY_CONTEXT for the context +3. Query upstream with GST_QUERY_CONTEXT for the context +4. Post a GST_MESSAGE_NEED_CONTEXT message on the bus with the required + context types and afterwards check if a usable context was set now +5. Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT message + on the bus. + +Bins will catch GST_MESSAGE_NEED_CONTEXT messages and will set any previously +known context on the element that asks for it if possible. Otherwise the +application should provide one if it can. + +#GstContext<!-- -->s can be persistent. +A persistent #GstContext is kept in elements when they reach +%GST_STATE_NULL, non-persistent ones will be removed. +Also, a non-persistent context won't override a previous persistent +context set to an element. + + + Create a new context. + + + The new context. + + + + + Context type + + + + Persistent context + + + + + + Get the type of @context. + + + The type of the context. + + + + + The #GstContext. + + + + + + Access the structure of the context. + + + The structure of the context. The structure is +still owned by the context, which means that you should not modify it, +free it and that the pointer becomes invalid when you free the context. + + + + + The #GstContext. + + + + + + Checks if @context has @context_type. + + + %TRUE if @context has @context_type. + + + + + The #GstContext. + + + + Context type to check. + + + + + + Check if @context is persistent. + + + %TRUE if the context is persistent. + + + + + The #GstContext. + + + + + + Get a writable version of the structure. + + + The structure of the context. The structure is still +owned by the context, which means that you should not free it and +that the pointer becomes invalid when you free the context. +This function checks if @context is writable. + + + + + The #GstContext. + + + + + + + A base class for value mapping objects that attaches control sources to gobject +properties. Such an object is taking one or more #GstControlSource instances, +combines them and maps the resulting value to the type and value range of the +bound property. + + + Gets a number of #GValues for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +#GValue. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + Gets the value for the given controlled property at the requested time. + + + the GValue of the property at the given time, +or %NULL if the property isn't controlled. + + + + + the control binding + + + + the time the control-change should be read from + + + + + + Gets a number of values for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +the same type as the objects property's type. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + +The values are unboxed and ready to be used. The similar function +gst_control_binding_get_g_value_array() returns the array as #GValues and is +more suitable for bindings. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + Sets the property of the @object, according to the #GstControlSources that +handle them and for the given timestamp. + +If this function fails, it is most likely the application developers fault. +Most probably the control sources are not setup correctly. + + + %TRUE if the controller value could be applied to the object +property, %FALSE otherwise + + + + + the control binding + + + + the object that has controlled properties + + + + the time that should be processed + + + + the last time this was called + + + + + + Gets a number of #GValues for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +#GValue. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + Gets the value for the given controlled property at the requested time. + + + the GValue of the property at the given time, +or %NULL if the property isn't controlled. + + + + + the control binding + + + + the time the control-change should be read from + + + + + + Gets a number of values for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +the same type as the objects property's type. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + +The values are unboxed and ready to be used. The similar function +gst_control_binding_get_g_value_array() returns the array as #GValues and is +more suitable for bindings. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + Check if the control binding is disabled. + + + %TRUE if the binding is inactive + + + + + the control binding + + + + + + This function is used to disable a control binding for some time, i.e. +gst_object_sync_values() will do nothing. + + + + + + + the control binding + + + + boolean that specifies whether to disable the controller +or not. + + + + + + Sets the property of the @object, according to the #GstControlSources that +handle them and for the given timestamp. + +If this function fails, it is most likely the application developers fault. +Most probably the control sources are not setup correctly. + + + %TRUE if the controller value could be applied to the object +property, %FALSE otherwise + + + + + the control binding + + + + the object that has controlled properties + + + + the time that should be processed + + + + the last time this was called + + + + + + + + + + + + + + + name of the property of this binding + + + + #GParamSpec for this property + + + + + + + + + + + + + + + + + + + + + + + + + The class structure of #GstControlBinding. + + + Parent class + + + + + + + %TRUE if the controller value could be applied to the object +property, %FALSE otherwise + + + + + the control binding + + + + the object that has controlled properties + + + + the time that should be processed + + + + the last time this was called + + + + + + + + + + the GValue of the property at the given time, +or %NULL if the property isn't controlled. + + + + + the control binding + + + + the time the control-change should be read from + + + + + + + + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + + + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the control binding + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + + + + + + + + + FIXME(2.0): remove, this is unused + + + + + + + + + + + + + + + + + + + + + The #GstControlSource is a base class for control value sources that could +be used to get timestamp-value pairs. A control source essentially is a +function over time. + +A #GstControlSource is used by first getting an instance of a specific +control-source, creating a binding for the control-source to the target property +of the element and then adding the binding to the element. The binding will +convert the data types and value range to fit to the bound property. + +For implementing a new #GstControlSource one has to implement +#GstControlSourceGetValue and #GstControlSourceGetValueArray functions. +These are then used by gst_control_source_get_value() and +gst_control_source_get_value_array() to get values for specific timestamps. + + + Gets the value for this #GstControlSource at a given timestamp. + + + %FALSE if the value couldn't be returned, %TRUE otherwise. + + + + + the #GstControlSource object + + + + the time for which the value should be returned + + + + the value + + + + + + Gets an array of values for for this #GstControlSource. Values that are +undefined contain NANs. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the #GstControlSource object + + + + the first timestamp + + + + the time steps + + + + the number of values to fetch + + + + array to put control-values in + + + + + + + + + + + Function for returning a value for a given timestamp + + + + Function for returning a values array for a given timestamp + + + + + + + + + + The class structure of #GstControlSource. + + + Parent class + + + + + + + + + + Function for returning a value for a given timestamp. + + + %TRUE if the value was successfully calculated. + + + + + the #GstControlSource instance + + + + timestamp for which a value should be calculated + + + + a value which will be set to the result. + + + + + + Function for returning an array of values for starting at a given timestamp. + + + %TRUE if the values were successfully calculated. + + + + + the #GstControlSource instance + + + + timestamp for which a value should be calculated + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + Core errors are errors inside the core GStreamer library. + + a general error which doesn't fit in any other +category. Make sure you add a custom message to the error call. + + + do not use this except as a placeholder for +deciding where to go while developing code. + + + use this when you do not want to implement +this functionality yet. + + + used for state change errors. + + + used for pad-related errors. + + + used for thread-related errors. + + + used for negotiation-related errors. + + + used for event-related errors. + + + used for seek-related errors. + + + used for caps-related errors. + + + used for negotiation-related errors. + + + used if a plugin is missing. + + + used for clock related errors. + + + used if functionality has been disabled at + compile time. + + + the number of core error types. + + + + + + + + + + Simple typing wrapper around #GstMeta + + + + + + Retrieve the #GstStructure backing a custom meta, the structure's mutability +is conditioned to the writability of the #GstBuffer @meta is attached to. + + + the #GstStructure backing @meta + + + + + + + + + + Checks whether the name of the custom meta is @name + + + Whether @name is the name of the custom meta + + + + + + + + + + + + + + Function called for each @meta in @buffer as a result of performing a +transformation on @transbuf. Additional @type specific transform data +is passed to the function as @data. + +Implementations should check the @type of the transform and parse +additional type specific fields in @data that should be used to update +the metadata on @transbuf. + + + %TRUE if the transform could be performed + + + + + a #GstBuffer + + + + a #GstCustomMeta + + + + a #GstBuffer + + + + the transform type + + + + transform specific data. + + + + user data passed when registering the meta + + + + + + + + + + To aid debugging applications one can use this method to write out the whole +network of gstreamer elements that form the pipeline into an dot file. +This file can be processed with graphviz to get an image, like this: +|[ + dot -Tpng -oimage.png graph_lowlevel.dot +]| +There is also a utility called xdot which allows you to view the dot file +directly without converting it first. + +The macro is only active if the environment variable GST_DEBUG_DUMP_DOT_DIR +is set to a basepath (e.g. /tmp), and the GStreamer debugging subsystem is +enabled (i.e., no use of `./configure --disable-gst-debug') + + + + the top-level pipeline that should be analyzed + + + details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or + one or more other #GstDebugGraphDetails flags. + + + output base filename (e.g. "myplayer") + + + + + This works like GST_DEBUG_BIN_TO_DOT_FILE(), but adds the current timestamp +to the filename, so that it can be used to take multiple snapshots. + + + + the top-level pipeline that should be analyzed + + + details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or + one or more other #GstDebugGraphDetails flags. + + + output base filename (e.g. "myplayer") + + + + + Defines a GstDebugCategory variable. +This macro expands to nothing if debugging is disabled. + + + + the category + + + + + Declares a GstDebugCategory variable as extern. Use in header files. +This macro expands to nothing if debugging is disabled. + + + + the category + + + + + Looks up an existing #GstDebugCategory by its @name and sets @cat. If the +category is not found, but GST_CAT_DEFAULT is defined, that is assigned to +@cat. Otherwise @cat will be %NULL. + +|[<!-- language="C" --> +GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug); +#define GST_CAT_DEFAULT gst_myplugin_debug +GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); +... +GST_DEBUG_CATEGORY_INIT (gst_myplugin_debug, "myplugin", 0, "nice element"); +GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE"); +]| + + + + the category to initialize. + + + log category name + + + + + Initializes a new #GstDebugCategory with the given properties and set to +the default threshold. + +> This macro expands to nothing if debugging is disabled. +> +> When naming your category, please follow the following conventions to ensure +> that the pattern matching for categories works as expected. It is not +> earth-shattering if you don't follow these conventions, but it would be nice +> for everyone. +> +> If you define a category for a plugin or a feature of it, name the category +> like the feature. So if you wanted to write a "filesrc" element, you would +> name the category "filesrc". Use lowercase letters only. +> If you define more than one category for the same element, append an +> underscore and an identifier to your categories, like this: "filesrc_cache" +> +> If you create a library or an application using debugging categories, use a +> common prefix followed by an underscore for all your categories. GStreamer +> uses the GST prefix so GStreamer categories look like "GST_STATES". Be sure +> to include uppercase letters. + + + + the category to initialize. + + + the name of the category. + + + the colors to use for a color representation or 0 for no color. + + + optional description of the category. + + + + + Defines a static GstDebugCategory variable. +This macro expands to nothing if debugging is disabled. + + + + the category + + + + + + + + + + + + + Register a pointer to a function with its name, so it can later be used by +GST_DEBUG_FUNCPTR_NAME(). + + + + pointer to the function to register + + + + + Retrieves the name of the function, if it was previously registered with +GST_DEBUG_FUNCPTR(). If not, it returns a description of the pointer. + +This macro returns a constant string which must not be modified or +freed by the caller. + + + + address of the function of which to look up the name + + + + + Evaluates to 2 strings, that describe the pad. Often used in debugging +statements. + + + + The pad to debug. + + + + + Register a pointer to a function with its name, so it can later be used by +GST_DEBUG_FUNCPTR_NAME(). + +Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr. + + + + pointer to the function to register + + + + + Define a new mini-object type with the given name + + + + name of the new type in CamelCase + + + name of the new type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Struct to store date, time and timezone information altogether. +#GstDateTime is refcounted and immutable. + +Date information is handled using the proleptic Gregorian calendar. + +Provides basic creation functions and accessor functions to its fields. + + + Creates a new #GstDateTime using the date and times in the gregorian calendar +in the supplied timezone. + +@year should be from 1 to 9999, @month should be from 1 to 12, @day from +1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. + +Note that @tzoffset is a float and was chosen so for being able to handle +some fractional timezones, while it still keeps the readability of +representing it in hours for most timezones. + +If value is -1 then all over value will be ignored. For example +if @month == -1, then #GstDateTime will created only for @year. If +@day == -1, then #GstDateTime will created for @year and @month and +so on. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + Offset from UTC in hours. + + + + the gregorian year + + + + the gregorian month + + + + the day of the gregorian month + + + + the hour of the day + + + + the minute of the hour + + + + the second of the minute + + + + + + Creates a new #GstDateTime from a #GDateTime object. + +Free-function: gst_date_time_unref + + + a newly created #GstDateTime, +or %NULL on error + + + + + the #GDateTime. The new #GstDateTime takes ownership. + + + + + + Tries to parse common variants of ISO-8601 datetime strings into a +#GstDateTime. Possible input formats are (for example): +2012-06-30T22:46:43Z, 2012, 2012-06, 2012-06-30, 2012-06-30T22:46:43-0430, +2012-06-30T22:46Z, 2012-06-30T22:46-0430, 2012-06-30 22:46, +2012-06-30 22:46:43, 2012-06-00, 2012-00-00, 2012-00-30, 22:46:43Z, 22:46Z, +22:46:43-0430, 22:46-0430, 22:46:30, 22:46 +If no date is provided, it is assumed to be "today" in the timezone +provided (if any), otherwise UTC. + +Free-function: gst_date_time_unref + + + a newly created #GstDateTime, +or %NULL on error + + + + + ISO 8601-formatted datetime string. + + + + + + Creates a new #GstDateTime using the time since Jan 1, 1970 specified by +@secs. The #GstDateTime is in the local timezone. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + seconds from the Unix epoch + + + + + + Creates a new #GstDateTime using the time since Jan 1, 1970 specified by +@usecs. The #GstDateTime is in the local timezone. + + + a newly created #GstDateTime + + + + + microseconds from the Unix epoch + + + + + + Creates a new #GstDateTime using the time since Jan 1, 1970 specified by +@secs. The #GstDateTime is in the UTC timezone. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + seconds from the Unix epoch + + + + + + Creates a new #GstDateTime using the time since Jan 1, 1970 specified by +@usecs. The #GstDateTime is in UTC. + + + a newly created #GstDateTime + + + + + microseconds from the Unix epoch + + + + + + Creates a new #GstDateTime using the date and times in the gregorian calendar +in the local timezone. + +@year should be from 1 to 9999, @month should be from 1 to 12, @day from +1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. + +If @month is -1, then the #GstDateTime created will only contain @year, +and all other fields will be considered not set. + +If @day is -1, then the #GstDateTime created will only contain @year and +@month and all other fields will be considered not set. + +If @hour is -1, then the #GstDateTime created will only contain @year and +@month and @day, and the time fields will be considered not set. In this +case @minute and @seconds should also be -1. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + the gregorian year + + + + the gregorian month, or -1 + + + + the day of the gregorian month, or -1 + + + + the hour of the day, or -1 + + + + the minute of the hour, or -1 + + + + the second of the minute, or -1 + + + + + + Creates a new #GstDateTime representing the current date and time. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime which should + be freed with gst_date_time_unref(). + + + + + Creates a new #GstDateTime that represents the current instant at Universal +coordinated time. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime which should + be freed with gst_date_time_unref(). + + + + + Creates a new #GstDateTime using the date and times in the gregorian calendar +in the local timezone. + +@year should be from 1 to 9999. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + the gregorian year + + + + + + Creates a new #GstDateTime using the date and times in the gregorian calendar +in the local timezone. + +@year should be from 1 to 9999, @month should be from 1 to 12. + +If value is -1 then all over value will be ignored. For example +if @month == -1, then #GstDateTime will created only for @year. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + the gregorian year + + + + the gregorian month + + + + + + Creates a new #GstDateTime using the date and times in the gregorian calendar +in the local timezone. + +@year should be from 1 to 9999, @month should be from 1 to 12, @day from +1 to 31. + +If value is -1 then all over value will be ignored. For example +if @month == -1, then #GstDateTime will created only for @year. If +@day == -1, then #GstDateTime will created for @year and @month and +so on. + +Free-function: gst_date_time_unref + + + the newly created #GstDateTime + + + + + the gregorian year + + + + the gregorian month + + + + the day of the gregorian month + + + + + + Returns the day of the month of this #GstDateTime. +Call gst_date_time_has_day() before, to avoid warnings. + + + The day of this #GstDateTime + + + + + a #GstDateTime + + + + + + Retrieves the hour of the day represented by @datetime in the gregorian +calendar. The return is in the range of 0 to 23. +Call gst_date_time_has_time() before, to avoid warnings. + + + the hour of the day + + + + + a #GstDateTime + + + + + + Retrieves the fractional part of the seconds in microseconds represented by +@datetime in the gregorian calendar. + + + the microsecond of the second + + + + + a #GstDateTime + + + + + + Retrieves the minute of the hour represented by @datetime in the gregorian +calendar. +Call gst_date_time_has_time() before, to avoid warnings. + + + the minute of the hour + + + + + a #GstDateTime + + + + + + Returns the month of this #GstDateTime. January is 1, February is 2, etc.. +Call gst_date_time_has_month() before, to avoid warnings. + + + The month of this #GstDateTime + + + + + a #GstDateTime + + + + + + Retrieves the second of the minute represented by @datetime in the gregorian +calendar. +Call gst_date_time_has_time() before, to avoid warnings. + + + the second represented by @datetime + + + + + a #GstDateTime + + + + + + Retrieves the offset from UTC in hours that the timezone specified +by @datetime represents. Timezones ahead (to the east) of UTC have positive +values, timezones before (to the west) of UTC have negative values. +If @datetime represents UTC time, then the offset is zero. + + + the offset from UTC in hours + + + + + a #GstDateTime + + + + + + Returns the year of this #GstDateTime +Call gst_date_time_has_year() before, to avoid warnings. + + + The year of this #GstDateTime + + + + + a #GstDateTime + + + + + + + + %TRUE if @datetime<!-- -->'s day field is set, otherwise %FALSE + + + + + a #GstDateTime + + + + + + + + %TRUE if @datetime<!-- -->'s month field is set, otherwise %FALSE + + + + + a #GstDateTime + + + + + + + + %TRUE if @datetime<!-- -->'s second field is set, otherwise %FALSE + + + + + a #GstDateTime + + + + + + + + %TRUE if @datetime<!-- -->'s hour and minute fields are set, + otherwise %FALSE + + + + + a #GstDateTime + + + + + + + + %TRUE if @datetime<!-- -->'s year field is set (which should always + be the case), otherwise %FALSE + + + + + a #GstDateTime + + + + + + Atomically increments the reference count of @datetime by one. + + + the reference @datetime + + + + + a #GstDateTime + + + + + + Creates a new #GDateTime from a fully defined #GstDateTime object. + +Free-function: g_date_time_unref + + + a newly created #GDateTime, or +%NULL on error + + + + + GstDateTime. + + + + + + Create a minimal string compatible with ISO-8601. Possible output formats +are (for example): 2012, 2012-06, 2012-06-23, 2012-06-23T23:30Z, +2012-06-23T23:30+0100, 2012-06-23T23:30:59Z, 2012-06-23T23:30:59+0100 + + + a newly allocated string formatted according + to ISO 8601 and only including the datetime fields that are + valid, or %NULL in case there was an error. The string should + be freed with g_free(). + + + + + GstDateTime. + + + + + + Atomically decrements the reference count of @datetime by one. When the +reference count reaches zero, the structure is freed. + + + + + + + a #GstDateTime + + + + + + + This is the struct that describes the categories. Once initialized with +#GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore. + + + + + + + + + + + + + + + Removes and frees the category and all associated resources. + This function can easily cause memory corruption, don't use it. + + + + + + + #GstDebugCategory to free. + + + + + + Returns the color of a debug category used when printing output in this +category. + + + the color of the category. + + + + + a #GstDebugCategory to get the color of. + + + + + + Returns the description of a debug category. + + + the description of the category. + + + + + a #GstDebugCategory to get the description of. + + + + + + Returns the name of a debug category. + + + the name of the category. + + + + + a #GstDebugCategory to get name of. + + + + + + Returns the threshold of a #GstDebugCategory. + + + the #GstDebugLevel that is used as threshold. + + + + + a #GstDebugCategory to get threshold of. + + + + + + Resets the threshold of the category to the default level. Debug information +will only be output if the threshold is lower or equal to the level of the +debugging message. +Use this function to set the threshold back to where it was after using +gst_debug_category_set_threshold(). + + + + + + + a #GstDebugCategory to reset threshold of. + + + + + + Sets the threshold of the category to the given level. Debug information will +only be output if the threshold is lower or equal to the level of the +debugging message. +> Do not use this function in production code, because other functions may +> change the threshold of categories as side effect. It is however a nice +> function to use when debugging (even from gdb). + + + + + + + a #GstDebugCategory to set threshold of. + + + + the #GstDebugLevel threshold to set. + + + + + + + These are some terminal style flags you can use when creating your +debugging categories to make them stand out in debugging output. + + Use black as foreground color. + + + Use red as foreground color. + + + Use green as foreground color. + + + Use yellow as foreground color. + + + Use blue as foreground color. + + + Use magenta as foreground color. + + + Use cyan as foreground color. + + + Use white as foreground color. + + + Use black as background color. + + + Use red as background color. + + + Use green as background color. + + + Use yellow as background color. + + + Use blue as background color. + + + Use magenta as background color. + + + Use cyan as background color. + + + Use white as background color. + + + Make the output bold. + + + Underline the output. + + + + + Do not use colors in logs. + + + Paint logs in a platform-specific way. + + + Paint logs with UNIX terminal color codes + no matter what platform GStreamer is running on. + + + + + we define this to avoid a compiler warning regarding a cast from a function +pointer to a void pointer +(see https://bugzilla.gnome.org/show_bug.cgi?id=309253) + + + + + + + Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() +and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(). + + show caps-name on edges + + + show caps-details on edges + + + show modified parameters on + elements + + + show element states + + + show full element parameter values even + if they are very long + + + show all the typical details that one might want + + + show all details regardless of how large or + verbose they make the resulting output + + + + The level defines the importance of a debugging message. The more important a +message is, the greater the probability that the debugging system outputs it. + + No debugging level specified or desired. Used to deactivate + debugging output. + + + Error messages are to be used only when an error occurred + that stops the application from keeping working correctly. + An examples is gst_element_error, which outputs a message with this priority. + It does not mean that the application is terminating as with g_error. + + + Warning messages are to inform about abnormal behaviour + that could lead to problems or weird behaviour later on. An example of this + would be clocking issues ("your computer is pretty slow") or broken input + data ("Can't synchronize to stream.") + + + Fixme messages are messages that indicate that something + in the executed code path is not fully implemented or handled yet. Note + that this does not replace proper error handling in any way, the purpose + of this message is to make it easier to spot incomplete/unfinished pieces + of code when reading the debug log. + + + Informational messages should be used to keep the developer + updated about what is happening. + Examples where this should be used are when a typefind function has + successfully determined the type of the stream or when an mp3 plugin detects + the format to be used. ("This file has mono sound.") + + + Debugging messages should be used when something common + happens that is not the expected default behavior, or something that's + useful to know but doesn't happen all the time (ie. per loop iteration or + buffer processed or event handled). + An example would be notifications about state changes or receiving/sending + of events. + + + Log messages are messages that are very common but might be + useful to know. As a rule of thumb a pipeline that is running as expected + should never output anything else but LOG messages whilst processing data. + Use this log level to log recurring information in chain functions and + loop functions, for example. + + + Tracing-related messages. + Examples for this are referencing/dereferencing of objects. + + + memory dump messages are used to log (small) chunks of + data as memory dumps in the log. They will be displayed as hexdump with + ASCII characters. + + + The number of defined debugging levels. + + + Get the string representation of a debugging level + + + the name + + + + + the level to get the name for + + + + + + + + + Gets the string representation of a #GstDebugMessage. This function is used +in debug handlers to extract the message. + + + the string representation of a #GstDebugMessage. + + + + + a debug message + + + + + + + #GstDevice are objects representing a device, they contain +relevant metadata about the device, such as its class and the #GstCaps +representing the media types it can produce or handle. + +#GstDevice are created by #GstDeviceProvider objects which can be +aggregated by #GstDeviceMonitor objects. + + + Creates the element with all of the required parameters set to use +this device. + + + a new #GstElement configured to use +this device + + + + + a #GstDevice + + + + name of new element, or %NULL to automatically +create a unique name. + + + + + + Tries to reconfigure an existing element to use the device. If this +function fails, then one must destroy the element and create a new one +using gst_device_create_element(). + +Note: This should only be implemented for elements can change their +device in the PLAYING state. + + + %TRUE if the element could be reconfigured to use this device, +%FALSE otherwise. + + + + + a #GstDevice + + + + a #GstElement + + + + + + Creates the element with all of the required parameters set to use +this device. + + + a new #GstElement configured to use +this device + + + + + a #GstDevice + + + + name of new element, or %NULL to automatically +create a unique name. + + + + + + Getter for the #GstCaps that this device supports. + + + The #GstCaps supported by this device. Unref with +gst_caps_unref() when done. + + + + + a #GstDevice + + + + + + Gets the "class" of a device. This is a "/" separated list of +classes that represent this device. They are a subset of the +classes of the #GstDeviceProvider that produced this device. + + + The device class. Free with g_free() after use. + + + + + a #GstDevice + + + + + + Gets the user-friendly name of the device. + + + The device name. Free with g_free() after use. + + + + + a #GstDevice + + + + + + Gets the extra properties of a device. + + + The extra properties or %NULL when there are none. + Free with gst_structure_free() after use. + + + + + a #GstDevice + + + + + + Check if @device matches all of the given classes + + + %TRUE if @device matches. + + + + + a #GstDevice + + + + a "/"-separated list of device classes to match, only match if + all classes are matched + + + + + + Check if @factory matches all of the given classes + + + %TRUE if @device matches. + + + + + a #GstDevice + + + + a %NULL terminated array of classes + to match, only match if all classes are matched + + + + + + + + Tries to reconfigure an existing element to use the device. If this +function fails, then one must destroy the element and create a new one +using gst_device_create_element(). + +Note: This should only be implemented for elements can change their +device in the PLAYING state. + + + %TRUE if the element could be reconfigured to use this device, +%FALSE otherwise. + + + + + a #GstDevice + + + + a #GstElement + + + + + + + + + + + + + + + + + + The parent #GstObject structure. + + + + + + + + + + + + + + + + + + The class structure for a #GstDevice object. + + + The parent #GstObjectClass structure. + + + + + + + a new #GstElement configured to use +this device + + + + + a #GstDevice + + + + name of new element, or %NULL to automatically +create a unique name. + + + + + + + + + + %TRUE if the element could be reconfigured to use this device, +%FALSE otherwise. + + + + + a #GstDevice + + + + a #GstElement + + + + + + + + + + + + + Applications should create a #GstDeviceMonitor when they want +to probe, list and monitor devices of a specific type. The +#GstDeviceMonitor will create the appropriate +#GstDeviceProvider objects and manage them. It will then post +messages on its #GstBus for devices that have been added and +removed. + +The device monitor will monitor all devices matching the filters that +the application has set. + +The basic use pattern of a device monitor is as follows: +|[ + static gboolean + my_bus_func (GstBus * bus, GstMessage * message, gpointer user_data) + { + GstDevice *device; + gchar *name; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_DEVICE_ADDED: + gst_message_parse_device_added (message, &device); + name = gst_device_get_display_name (device); + g_print("Device added: %s\n", name); + g_free (name); + gst_object_unref (device); + break; + case GST_MESSAGE_DEVICE_REMOVED: + gst_message_parse_device_removed (message, &device); + name = gst_device_get_display_name (device); + g_print("Device removed: %s\n", name); + g_free (name); + gst_object_unref (device); + break; + default: + break; + } + + return G_SOURCE_CONTINUE; + } + + GstDeviceMonitor * + setup_raw_video_source_device_monitor (void) { + GstDeviceMonitor *monitor; + GstBus *bus; + GstCaps *caps; + + monitor = gst_device_monitor_new (); + + bus = gst_device_monitor_get_bus (monitor); + gst_bus_add_watch (bus, my_bus_func, NULL); + gst_object_unref (bus); + + caps = gst_caps_new_empty_simple ("video/x-raw"); + gst_device_monitor_add_filter (monitor, "Video/Source", caps); + gst_caps_unref (caps); + + gst_device_monitor_start (monitor); + + return monitor; + } +]| + + + Create a new #GstDeviceMonitor + + + a new device monitor. + + + + + Adds a filter for which #GstDevice will be monitored, any device that matches +all these classes and the #GstCaps will be returned. + +If this function is called multiple times to add more filters, each will be +matched independently. That is, adding more filters will not further restrict +what devices are matched. + +The #GstCaps supported by the device as returned by gst_device_get_caps() are +not intersected with caps filters added using this function. + +Filters must be added before the #GstDeviceMonitor is started. + + + The id of the new filter or 0 if no provider matched the filter's + classes. + + + + + a device monitor + + + + device classes to use as filter or %NULL for any class + + + + the #GstCaps to filter or %NULL for ANY + + + + + + Gets the #GstBus of this #GstDeviceMonitor + + + a #GstBus + + + + + a #GstDeviceProvider + + + + + + Gets a list of devices from all of the relevant monitors. This may actually +probe the hardware if the monitor is not currently started. + + + a #GList of + #GstDevice + + + + + + + A #GstDeviceProvider + + + + + + Get a list of the currently selected device provider factories. + +This + + + + A list of device provider factory names that are currently being + monitored by @monitor or %NULL when nothing is being monitored. + + + + + + + a #GstDeviceMonitor + + + + + + Get if @monitor is currently showing all devices, even those from hidden +providers. + + + %TRUE when all devices will be shown. + + + + + a #GstDeviceMonitor + + + + + + Removes a filter from the #GstDeviceMonitor using the id that was returned +by gst_device_monitor_add_filter(). + + + %TRUE of the filter id was valid, %FALSE otherwise + + + + + a device monitor + + + + the id of the filter + + + + + + Set if all devices should be visible, even those devices from hidden +providers. Setting @show_all to true might show some devices multiple times. + + + + + + + a #GstDeviceMonitor + + + + show all devices + + + + + + Starts monitoring the devices, one this has succeeded, the +%GST_MESSAGE_DEVICE_ADDED and %GST_MESSAGE_DEVICE_REMOVED messages +will be emitted on the bus when the list of devices changes. + + + %TRUE if the device monitoring could be started + + + + + A #GstDeviceMonitor + + + + + + Stops monitoring the devices. + + + + + + + A #GstDeviceProvider + + + + + + + + + the parent #GstObject structure + + + + + + + + + + + + + Opaque device monitor class structure. + + + the parent #GstObjectClass structure + + + + + + + + + + + + + + + + A #GstDeviceProvider subclass is provided by a plugin that handles devices +if there is a way to programmatically list connected devices. It can also +optionally provide updates to the list of connected devices. + +Each #GstDeviceProvider subclass is a singleton, a plugin should +normally provide a single subclass for all devices. + +Applications would normally use a #GstDeviceMonitor to monitor devices +from all relevant providers. + + + Create a new device providerfactory capable of instantiating objects of the +@type and add the factory to @plugin. + + + %TRUE, if the registering succeeded, %FALSE on error + + + + + #GstPlugin to register the device provider with, or %NULL for + a static device provider. + + + + name of device providers of this type + + + + rank of device provider (higher rank means more importance when autoplugging) + + + + GType of device provider to register + + + + + + + + + + + + + + + + + + + Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED +and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus +when devices are added or removed from the system. + +Since the #GstDeviceProvider is a singleton, +gst_device_provider_start() may already have been called by another +user of the object, gst_device_provider_stop() needs to be called the same +number of times. + +After this function has been called, gst_device_provider_get_devices() will +return the same objects that have been received from the +#GST_MESSAGE_DEVICE_ADDED messages and will no longer probe. + + + %TRUE if the device providering could be started + + + + + A #GstDeviceProvider + + + + + + Decreases the use-count by one. If the use count reaches zero, this +#GstDeviceProvider will stop providering the devices. This needs to be +called the same number of times that gst_device_provider_start() was called. + + + + + + + A #GstDeviceProvider + + + + + + + + + + + + + + + + + Posts a message on the provider's #GstBus to inform applications that +a new device has been added. + +This is for use by subclasses. + +@device's reference count will be incremented, and any floating reference +will be removed (see gst_object_ref_sink()). + + + + + + + a #GstDeviceProvider + + + + a #GstDevice that has been added + + + + + + This function is used when @changed_device was modified into its new form +@device. This will post a `DEVICE_CHANGED` message on the bus to let +the application know that the device was modified. #GstDevice is immutable +for MT. safety purposes so this is an "atomic" way of letting the application +know when a device was modified. + + + + + + + + + + the new version of @changed_device + + + + the old version of the device that has been updated + + + + + + Posts a message on the provider's #GstBus to inform applications that +a device has been removed. + +This is for use by subclasses. + + + + + + + a #GstDeviceProvider + + + + a #GstDevice that has been removed + + + + + + Gets the #GstBus of this #GstDeviceProvider + + + a #GstBus + + + + + a #GstDeviceProvider + + + + + + Gets a list of devices that this provider understands. This may actually +probe the hardware if the provider is not currently started. + +If the provider has been started, this will returned the same #GstDevice +objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages. + + + a #GList of + #GstDevice + + + + + + + A #GstDeviceProvider + + + + + + Retrieves the factory that was used to create this device provider. + + + the #GstDeviceProviderFactory used for + creating this device provider. no refcounting is needed. + + + + + a #GstDeviceProvider to request the device provider factory of. + + + + + + Get the provider factory names of the #GstDeviceProvider instances that +are hidden by @provider. + + + + a list of hidden providers factory names or %NULL when + nothing is hidden by @provider. Free with g_strfreev. + + + + + + + a #GstDeviceProvider + + + + + + Get metadata with @key in @provider. + + + the metadata for @key. + + + + + provider to get metadata for + + + + the key to get + + + + + + Make @provider hide the devices from the factory with @name. + +This function is used when @provider will also provide the devices reported +by provider factory @name. A monitor should stop monitoring the +device provider with @name to avoid duplicate devices. + + + + + + + a #GstDeviceProvider + + + + a provider factory name + + + + + + This function can be used to know if the @provider was successfully started. + + + + + + + a #GstDeviceProvider + + + + + + Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED +and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus +when devices are added or removed from the system. + +Since the #GstDeviceProvider is a singleton, +gst_device_provider_start() may already have been called by another +user of the object, gst_device_provider_stop() needs to be called the same +number of times. + +After this function has been called, gst_device_provider_get_devices() will +return the same objects that have been received from the +#GST_MESSAGE_DEVICE_ADDED messages and will no longer probe. + + + %TRUE if the device providering could be started + + + + + A #GstDeviceProvider + + + + + + Decreases the use-count by one. If the use count reaches zero, this +#GstDeviceProvider will stop providering the devices. This needs to be +called the same number of times that gst_device_provider_start() was called. + + + + + + + A #GstDeviceProvider + + + + + + Make @provider unhide the devices from factory @name. + +This function is used when @provider will no longer provide the devices +reported by provider factory @name. A monitor should start +monitoring the devices from provider factory @name in order to see +all devices again. + + + + + + + a #GstDeviceProvider + + + + a provider factory name + + + + + + The parent #GstObject + + + + a #GList of the #GstDevice objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The structure of the base #GstDeviceProviderClass + + + the parent #GstObjectClass structure + + + + a pointer to the #GstDeviceProviderFactory that creates this + provider + + + + + + + + + + + + + + + + + + + + + + %TRUE if the device providering could be started + + + + + A #GstDeviceProvider + + + + + + + + + + + + + + A #GstDeviceProvider + + + + + + + + + + + + + + + Set @key with @value as metadata in @klass. + + + + + + + class to set metadata for + + + + the key to set + + + + the value to set + + + + + + Set @key with @value as metadata in @klass. + +Same as gst_device_provider_class_add_metadata(), but @value must be a static string +or an inlined string, as it will not be copied. (GStreamer plugins will +be made resident once loaded, so this function can be used even from +dynamically loaded plugins.) + + + + + + + class to set metadata for + + + + the key to set + + + + the value to set + + + + + + Get metadata with @key in @klass. + + + the metadata for @key. + + + + + class to get metadata for + + + + the key to get + + + + + + Sets the detailed information for a #GstDeviceProviderClass. + +> This function is for use in _class_init functions only. + + + + + + + class to set metadata for + + + + The long English name of the device provider. E.g. "File Sink" + + + + String describing the type of device provider, as an + unordered list separated with slashes ('/'). See draft-klass.txt of the + design docs +for more details and common types. E.g: "Sink/File" + + + + Sentence describing the purpose of the device provider. +E.g: "Write stream to a file" + + + + Name and contact details of the author(s). Use \n to separate +multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" + + + + + + Sets the detailed information for a #GstDeviceProviderClass. + +> This function is for use in _class_init functions only. + +Same as gst_device_provider_class_set_metadata(), but @longname, @classification, +@description, and @author must be static strings or inlined strings, as +they will not be copied. (GStreamer plugins will be made resident once +loaded, so this function can be used even from dynamically loaded plugins.) + + + + + + + class to set metadata for + + + + The long English name of the element. E.g. "File Sink" + + + + String describing the type of element, as +an unordered list separated with slashes ('/'). See draft-klass.txt of the +design docs for more details and common types. E.g: "Sink/File" + + + + Sentence describing the purpose of the +element. E.g: "Write stream to a file" + + + + Name and contact details of the author(s). Use \n +to separate multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at +foo.com&gt;" + + + + + + + #GstDeviceProviderFactory is used to create instances of device providers. A +GstDeviceProviderfactory can be added to a #GstPlugin as it is also a +#GstPluginFeature. + +Use the gst_device_provider_factory_find() and +gst_device_provider_factory_get() functions to create device +provider instances or use gst_device_provider_factory_get_by_name() as a +convenient shortcut. + + + Search for an device provider factory of the given name. Refs the returned +device provider factory; caller is responsible for unreffing. + + + #GstDeviceProviderFactory if +found, %NULL otherwise + + + + + name of factory to find + + + + + + Returns the device provider of the type defined by the given device +provider factory. + + + a #GstDeviceProvider or %NULL +if unable to create device provider + + + + + a named factory to instantiate + + + + + + Get a list of factories with a rank greater or equal to @minrank. +The list of factories is returned by decreasing rank. + + + +a #GList of #GstDeviceProviderFactory device providers. Use +gst_plugin_feature_list_free() after usage. + + + + + + + Minimum rank + + + + + + Returns the device provider of the type defined by the given device +providerfactory. + + + the #GstDeviceProvider or %NULL +if the device provider couldn't be created + + + + + factory to instantiate + + + + + + Get the #GType for device providers managed by this factory. The type can +only be retrieved if the device provider factory is loaded, which can be +assured with gst_plugin_feature_load(). + + + the #GType for device providers managed by this factory. + + + + + factory to get managed #GType from + + + + + + Get the metadata on @factory with @key. + + + the metadata with @key on @factory or %NULL +when there was no metadata with the given @key. + + + + + a #GstDeviceProviderFactory + + + + a key + + + + + + Get the available keys for the metadata on @factory. + + + +a %NULL-terminated array of key strings, or %NULL when there is no +metadata. Free with g_strfreev() when no longer needed. + + + + + + + a #GstDeviceProviderFactory + + + + + + Check if @factory matches all of the given @classes + + + %TRUE if @factory matches or if @classes is %NULL. + + + + + a #GstDeviceProviderFactory + + + + a "/" separate list of classes to match, only match + if all classes are matched + + + + + + Check if @factory matches all of the given classes + + + %TRUE if @factory matches. + + + + + a #GstDeviceProviderFactory + + + + a %NULL terminated array + of classes to match, only match if all classes are matched + + + + + + + + + The opaque #GstDeviceProviderFactoryClass data structure. + + + + + + + A fundamental type that describes a #gdouble range + + + #GstDynamicTypeFactory is used to represent a type that can be +automatically loaded the first time it is used. For example, +a non-standard type for use in caps fields. + +In general, applications and plugins don't need to use the factory +beyond registering the type in a plugin init function. Once that is +done, the type is stored in the registry, and ready as soon as the +registry is loaded. + +## Registering a type for dynamic loading + +|[<!-- language="C" --> + +static gboolean +plugin_init (GstPlugin * plugin) +{ + return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD); +} +]| + + + + + + + + + + + + + + + + + + + + + + + + + Get the message bus of this element. This is not thread-safe by default +(i.e. you will have to make sure the object lock is taken yourself). +If in doubt use gst_element_get_bus() instead. + + + + A #GstElement to query + + + + + + + + + + + + + + + + + + + Get the clock of this element.This is not thread-safe by default +(i.e. you will have to make sure it is safe yourself). +If in doubt use gst_element_get_clock() instead. + + + + A #GstElement to query + + + + + Utility function that elements can use in case they encountered a fatal +data processing error. The pipeline will post an error message and the +application will be requested to stop further media processing. + + + + the element that generates the error + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + + + Utility function that elements can use in case they encountered a fatal +data processing error. The pipeline will post an error message and the +application will be requested to stop further media processing. + + + + the element that generates the error + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + optional name, type, value triplets, which will be stored + in the associated GstStructure. NULL terminator required. + Must be enclosed within parentheses. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Elements interacting with hardware devices should specify this classifier in +their metadata. You may need to put the element in "READY" state to test if +the hardware is present in the system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Elements of any of the defined GST_ELEMENT_FACTORY_LIST types + + + + + All sinks handling audio, video or image media types + + + + + All encoders handling audio media types + + + + + All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types + +Note: Do not use this if you wish to not filter against any of the defined +media types. If you wish to do this, simply don't specify any +GST_ELEMENT_FACTORY_TYPE_MEDIA flag. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All encoders handling video or image media types + + + + + Utility function that elements can use in case they encountered a fatal +data processing error due to wrong flow processing. + + + + the element that generates the error + + + the GstFlowReturn leading to that ERROR message + + + + + + + + + + + + Utility function that elements can use in case they want to inform +the application of something noteworthy that is not an error. +The pipeline will post a info message and the +application will be informed. + + + + the element that generates the information + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + + + Utility function that elements can use in case they want to inform +the application of something noteworthy that is not an error. +The pipeline will post a info message and the +application will be informed. +Optional name, type, value triplets may be supplied, and will be stored +in the associated GstStructure. NULL terminator required. + + + + the element that generates the information + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + optional name, type, value triplets, which will be stored + in the associated GstStructure. NULL terminator required. + Must be enclosed within parentheses. + + + + + Check if the element is in the locked state and therefore will ignore state +changes from its parent object. + + + + A #GstElement to query + + + + + + + + + + + + Name and contact details of the author(s). Use \n to separate +multiple author details. +E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" + + + + + Sentence describing the purpose of the element. +E.g: "Write stream to a file" + + + + + Set uri pointing to user documentation. Applications can use this to show +help for e.g. effects to users. + + + + + Elements that bridge to certain other products can include an icon of that +used product. Application can show the icon in menus/selectors to help +identifying specific elements. + + + + + String describing the type of element, as an unordered list +separated with slashes ('/'). See draft-klass.txt of the design docs +for more details and common types. E.g: "Sink/File" + + + + + The long English name of the element. E.g. "File Sink" + + + + + Gets the name of this element. This is not thread-safe by default +(i.e. you will have to make sure the object lock is taken yourself). +If in doubt use gst_element_get_name() instead. + + + + A #GstElement to query + + + + + Get the pads of this elements. + + + + A #GstElement to query + + + + + Get the parent object of this element. This is not thread-safe by default +(i.e. you will have to make sure the object lock is taken yourself). +If in doubt use gst_object_get_parent() instead. + + + + A #GstElement to query + + + + + This macro returns the start_time of the @elem. The start_time is the +running_time of the pipeline when the element went to PAUSED. + + + + a #GstElement to return the start time for. + + + + + Utility function that elements can use in case they encountered a non-fatal +data processing problem. The pipeline will post a warning message and the +application will be informed. + + + + the element that generates the warning + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + + + Utility function that elements can use in case they encountered a non-fatal +data processing problem. The pipeline will post a warning message and the +application will be informed. + + + + the element that generates the warning + + + like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) + + + error code defined for that domain (see [GstGError](gsterror)) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + optional name, type, value triplets, which will be stored + in the associated GstStructure. NULL terminator required. + Must be enclosed within parentheses. + + + + + Builds a string using errno describing the previously failed system +call. To be used as the debug argument in #GST_ELEMENT_ERROR. + + + + + + + + + + + + + + + + + + + Check if an event can travel downstream. + + + + the event to query + + + + + Check if an event is serialized with the data stream. + + + + the event to query + + + + + Check if an event is sticky on the pads. + + + + the event to query + + + + + Check if an event can travel upstream. + + + + the event to query + + + + + when making custom event types, use this macro with the num and +the given flags + + + + the event number to create + + + the event flags + + + + + + + + + The sequence number of @event. + + + + the event to query + + + + + Get the #GstClockTime timestamp of the event. This is the time when the event +was created. + + + + the event to query + + + + + Get the #GstEventType of the event. + + + + the event to query + + + + + The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. + + + + + Get a constant string representation of the #GstEventType of the event. + + + + the event to query + + + + + GstElement is the abstract base class needed to construct an element that +can be used in a GStreamer pipeline. Please refer to the plugin writers +guide for more information on creating #GstElement subclasses. + +The name of a #GstElement can be get with gst_element_get_name() and set with +gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the +core when using the appropriate locking. Do not use this in plug-ins or +applications in order to retain ABI compatibility. + +Elements can have pads (of the type #GstPad). These pads link to pads on +other elements. #GstBuffer flow between these linked pads. +A #GstElement has a #GList of #GstPad structures for all their input (or sink) +and output (or source) pads. +Core and plug-in writers can add and remove pads with gst_element_add_pad() +and gst_element_remove_pad(). + +An existing pad of an element can be retrieved by name with +gst_element_get_static_pad(). A new dynamic pad can be created using +gst_element_request_pad() with a #GstPadTemplate. +An iterator of all pads can be retrieved with gst_element_iterate_pads(). + +Elements can be linked through their pads. +If the link is straightforward, use the gst_element_link() +convenience function to link two elements, or gst_element_link_many() +for more elements in a row. +Use gst_element_link_filtered() to link two elements constrained by +a specified set of #GstCaps. +For finer control, use gst_element_link_pads() and +gst_element_link_pads_filtered() to specify the pads to link on +each element by name. + +Each element has a state (see #GstState). You can get and set the state +of an element with gst_element_get_state() and gst_element_set_state(). +Setting a state triggers a #GstStateChange. To get a string representation +of a #GstState, use gst_element_state_get_name(). + +You can get and set a #GstClock on an element using gst_element_get_clock() +and gst_element_set_clock(). +Some elements can provide a clock for the pipeline if +the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the +gst_element_provide_clock() method one can retrieve the clock provided by +such an element. +Not all elements require a clock to operate correctly. If the +#GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the +element with gst_element_set_clock(). + +Note that clock selection and distribution is normally handled by the +toplevel #GstPipeline so the clock functions are only to be used in very +specific situations. + + + Creates an element for handling the given URI. + + + a new element or %NULL if none +could be created + + + + + Whether to create a source or a sink + + + + URI to create an element for + + + + Name of created element, can be %NULL. + + + + + + Create a new elementfactory capable of instantiating objects of the +@type and add the factory to @plugin. + + + %TRUE, if the registering succeeded, %FALSE on error + + + + + #GstPlugin to register the element with, or %NULL for + a static element. + + + + name of elements of this type + + + + rank of element (higher rank means more importance when autoplugging) + + + + GType of element to register + + + + + + Gets a string representing the given state change result. + + + a string with the name of the state + result. + + + + + a #GstStateChangeReturn to get the name of. + + + + + + Gets a string representing the given state. + + + a string with the name of the state. + + + + + a #GstState to get the name of. + + + + + + Perform @transition on @element. + +This function must be called with STATE_LOCK held and is mainly used +internally. + + + the #GstStateChangeReturn of the state transition. + + + + + a #GstElement + + + + the requested transition + + + + + + Gets the state of the element. + +For elements that performed an ASYNC state change, as reported by +gst_element_set_state(), this function will block up to the +specified timeout value for the state change to complete. +If the element completes the state change or goes into +an error, this function returns immediately with a return value of +%GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively. + +For elements that did not return %GST_STATE_CHANGE_ASYNC, this function +returns the current and pending state immediately. + +This function returns %GST_STATE_CHANGE_NO_PREROLL if the element +successfully changed its state but is not able to provide data yet. +This mostly happens for live sources that only produce data in +%GST_STATE_PLAYING. While the state change return is equivalent to +%GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that +some sink elements might not be able to complete their state change because +an element is not producing data to complete the preroll. When setting the +element to playing, the preroll will complete and playback will start. + + + %GST_STATE_CHANGE_SUCCESS if the element has no more pending state + and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the + element is still performing a state change or + %GST_STATE_CHANGE_FAILURE if the last state change failed. + +MT safe. + + + + + a #GstElement to get the state of. + + + + a pointer to #GstState to hold the state. + Can be %NULL. + + + + a pointer to #GstState to hold the pending + state. Can be %NULL. + + + + a #GstClockTime to specify the timeout for an async + state change or %GST_CLOCK_TIME_NONE for infinite timeout. + + + + + + Use this function to signal that the element does not expect any more pads +to show up in the current pipeline. This function should be called whenever +pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES +pad templates use this in combination with autopluggers to figure out that +the element is done initializing its pads. + +This function emits the #GstElement::no-more-pads signal. + +MT safe. + + + + + + + a #GstElement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Post a message on the element's #GstBus. This function takes ownership of the +message; if you want to access the message after this call, you should add an +additional reference before calling. + + + %TRUE if the message was successfully posted. The function returns +%FALSE if the element did not have a bus. + +MT safe. + + + + + a #GstElement posting the message + + + + a #GstMessage to post + + + + + + Get the clock provided by the given element. +> An element is only required to provide a clock in the PAUSED +> state. Some elements can provide a clock in other states. + + + the GstClock provided by the +element or %NULL if no clock could be provided. Unref after usage. + +MT safe. + + + + + a #GstElement to query + + + + + + Performs a query on the given element. + +For elements that don't implement a query handler, this function +forwards the query to a random srcpad or to the peer of a +random linked sinkpad of this element. + +Please note that some queries might need a running pipeline to work. + + + %TRUE if the query could be performed. + +MT safe. + + + + + a #GstElement to perform the query on. + + + + the #GstQuery. + + + + + + + + + + + + + + + + + + + + Retrieves a request pad from the element according to the provided template. +Pad templates can be looked up using +gst_element_factory_get_static_pad_templates(). + +The pad should be released with gst_element_release_request_pad(). + + + requested #GstPad if found, + otherwise %NULL. Release after usage. + + + + + a #GstElement to find a request pad of. + + + + a #GstPadTemplate of which we want a pad of. + + + + the name of the request #GstPad +to retrieve. Can be %NULL. + + + + the caps of the pad we want to +request. Can be %NULL. + + + + + + Sends an event to an element. If the element doesn't implement an +event handler, the event will be pushed on a random linked sink pad for +downstream events or a random linked source pad for upstream events. + +This function takes ownership of the provided event so you should +gst_event_ref() it if you want to reuse the event after this call. + +MT safe. + + + %TRUE if the event was handled. Events that trigger a preroll (such +as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. + + + + + a #GstElement to send the event to. + + + + the #GstEvent to send to the element. + + + + + + Sets the bus of the element. Increases the refcount on the bus. +For internal use only, unless you're testing elements. + +MT safe. + + + + + + + a #GstElement to set the bus of. + + + + the #GstBus to set. + + + + + + Sets the clock for the element. This function increases the +refcount on the clock. Any previously set clock on the object +is unreffed. + + + %TRUE if the element accepted the clock. An element can refuse a +clock when it, for example, is not able to slave its internal clock to the +@clock or when it requires a specific clock to operate. + +MT safe. + + + + + a #GstElement to set the clock for. + + + + the #GstClock to set for the element. + + + + + + Sets the context of the element. Increases the refcount of the context. + +MT safe. + + + + + + + a #GstElement to set the context of. + + + + the #GstContext to set. + + + + + + Sets the state of the element. This function will try to set the +requested state by going through all the intermediary states and calling +the class's state change function for each. + +This function can return #GST_STATE_CHANGE_ASYNC, in which case the +element will perform the remainder of the state change asynchronously in +another thread. +An application can use gst_element_get_state() to wait for the completion +of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or +%GST_MESSAGE_STATE_CHANGED on the bus. + +State changes to %GST_STATE_READY or %GST_STATE_NULL never return +#GST_STATE_CHANGE_ASYNC. + + + Result of the state change using #GstStateChangeReturn. + +MT safe. + + + + + a #GstElement to change state of. + + + + the element's new #GstState. + + + + + + + + + + + + + + + + + + + + + + + + + + Abort the state change of the element. This function is used +by elements that do asynchronous state changes and find out +something is wrong. + +This function should be called with the STATE_LOCK held. + +MT safe. + + + + + + + a #GstElement to abort the state of. + + + + + + Adds a pad (link point) to @element. @pad's parent will be set to @element; +see gst_object_set_parent() for refcounting information. + +Pads are automatically activated when added in the PAUSED or PLAYING +state. + +The pad and the element should be unlocked when calling this function. + +This function will emit the #GstElement::pad-added signal on the element. + + + %TRUE if the pad could be added. This function can fail when +a pad with the same name already existed or the pad already had another +parent. + +MT safe. + + + + + a #GstElement to add the pad to. + + + + the #GstPad to add to the element. + + + + + + + + a watch id, which can be used in connection with + gst_element_remove_property_notify_watch() to remove the watch again. + + + + + a #GstElement to watch (recursively) for property changes + + + + name of property to watch for changes, or + NULL to watch all properties + + + + whether to include the new property value in the message + + + + + + + + a watch id, which can be used in connection with + gst_element_remove_property_notify_watch() to remove the watch again. + + + + + a #GstElement to watch for property changes + + + + name of property to watch for changes, or + NULL to watch all properties + + + + whether to include the new property value in the message + + + + + + Calls @func from another thread and passes @user_data to it. This is to be +used for cases when a state change has to be performed from a streaming +thread, directly via gst_element_set_state() or indirectly e.g. via SEEK +events. + +Calling those functions directly from the streaming thread will cause +deadlocks in many situations, as they might involve waiting for the +streaming thread to shut down from this very streaming thread. + +MT safe. + + + + + + + a #GstElement + + + + Function to call asynchronously from another thread + + + + Data to pass to @func + + + + GDestroyNotify for @user_data + + + + + + Perform @transition on @element. + +This function must be called with STATE_LOCK held and is mainly used +internally. + + + the #GstStateChangeReturn of the state transition. + + + + + a #GstElement + + + + the requested transition + + + + + + Commit the state change of the element and proceed to the next +pending state if any. This function is used +by elements that do asynchronous state changes. +The core will normally call this method automatically when an +element returned %GST_STATE_CHANGE_SUCCESS from the state change function. + +If after calling this method the element still has not reached +the pending state, the next state change is performed. + +This method is used internally and should normally not be called by plugins +or applications. + +This function must be called with STATE_LOCK held. + + + The result of the commit state change. + +MT safe. + + + + + a #GstElement to continue the state change of. + + + + The previous state return value + + + + + + Creates a pad for each pad template that is always available. +This function is only useful during object initialization of +subclasses of #GstElement. + + + + + + + a #GstElement to create pads for + + + + + + Call @func with @user_data for each of @element's pads. @func will be called +exactly once for each pad that exists at the time of this call, unless +one of the calls to @func returns %FALSE in which case we will stop +iterating pads and return early. If new pads are added or pads are removed +while pads are being iterated, this will not be taken into account until +next time this function is used. + + + %FALSE if @element had no pads or if one of the calls to @func + returned %FALSE. + + + + + a #GstElement to iterate pads of + + + + function to call for each pad + + + + user data passed to @func + + + + + + Call @func with @user_data for each of @element's sink pads. @func will be +called exactly once for each sink pad that exists at the time of this call, +unless one of the calls to @func returns %FALSE in which case we will stop +iterating pads and return early. If new sink pads are added or sink pads +are removed while the sink pads are being iterated, this will not be taken +into account until next time this function is used. + + + %FALSE if @element had no sink pads or if one of the calls to @func + returned %FALSE. + + + + + a #GstElement to iterate sink pads of + + + + function to call for each sink pad + + + + user data passed to @func + + + + + + Call @func with @user_data for each of @element's source pads. @func will be +called exactly once for each source pad that exists at the time of this call, +unless one of the calls to @func returns %FALSE in which case we will stop +iterating pads and return early. If new source pads are added or source pads +are removed while the source pads are being iterated, this will not be taken +into account until next time this function is used. + + + %FALSE if @element had no source pads or if one of the calls + to @func returned %FALSE. + + + + + a #GstElement to iterate source pads of + + + + function to call for each source pad + + + + user data passed to @func + + + + + + Returns the base time of the element. The base time is the +absolute time of the clock when this element was last put to +PLAYING. Subtracting the base time from the clock time gives +the running time of the element. + + + the base time of the element. + +MT safe. + + + + + a #GstElement. + + + + + + Returns the bus of the element. Note that only a #GstPipeline will provide a +bus for the application. + + + the element's #GstBus. unref after +usage. + +MT safe. + + + + + a #GstElement to get the bus of. + + + + + + Gets the currently configured clock of the element. This is the clock as was +last set with gst_element_set_clock(). + +Elements in a pipeline will only have their clock set when the +pipeline is in the PLAYING state. + + + the #GstClock of the element. unref after usage. + +MT safe. + + + + + a #GstElement to get the clock of. + + + + + + Looks for an unlinked pad to which the given pad can link. It is not +guaranteed that linking the pads will work, though it should work in most +cases. + +This function will first attempt to find a compatible unlinked ALWAYS pad, +and if none can be found, it will request a compatible REQUEST pad by looking +at the templates of @element. + + + the #GstPad to which a link + can be made, or %NULL if one cannot be found. gst_object_unref() + after usage. + + + + + a #GstElement in which the pad should be found. + + + + the #GstPad to find a compatible one for. + + + + the #GstCaps to use as a filter. + + + + + + Retrieves a pad template from @element that is compatible with @compattempl. +Pads from compatible templates can be linked together. + + + a compatible #GstPadTemplate, + or %NULL if none was found. No unreferencing is necessary. + + + + + a #GstElement to get a compatible pad template for + + + + the #GstPadTemplate to find a compatible + template for + + + + + + Gets the context with @context_type set on the element or NULL. + +MT safe. + + + A #GstContext or NULL + + + + + a #GstElement to get the context of. + + + + a name of a context to retrieve + + + + + + Gets the context with @context_type set on the element or NULL. + + + A #GstContext or NULL + + + + + a #GstElement to get the context of. + + + + a name of a context to retrieve + + + + + + Gets the contexts set on the element. + +MT safe. + + + List of #GstContext + + + + + + + a #GstElement to set the context of. + + + + + + Returns the current clock time of the element, as in, the time of the +element's clock, or GST_CLOCK_TIME_NONE if there is no clock. + + + the clock time of the element, or GST_CLOCK_TIME_NONE if there is +no clock. + + + + + a #GstElement. + + + + + + Returns the running time of the element. The running time is the +element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE +if the element has no clock, or if its base time has not been set. + + + the running time of the element, or GST_CLOCK_TIME_NONE if the +element has no clock or its base time has not been set. + + + + + a #GstElement. + + + + + + Retrieves the factory that was used to create this element. + + + the #GstElementFactory used for creating this + element or %NULL if element has not been registered (static element). no refcounting is needed. + + + + + a #GstElement to request the element factory of. + + + + + + Get metadata with @key in @klass. + + + the metadata for @key. + + + + + class to get metadata for + + + + the key to get + + + + + + Retrieves a padtemplate from @element with the given name. + + + the #GstPadTemplate with the + given name, or %NULL if none was found. No unreferencing is + necessary. + + + + + a #GstElement to get the pad template of. + + + + the name of the #GstPadTemplate to get. + + + + + + Retrieves a list of the pad templates associated with @element. The +list must not be modified by the calling code. + + + the #GList of + pad templates. + + + + + + + a #GstElement to get pad templates of. + + + + + + Retrieves a pad from the element by name (e.g. "src_\%d"). This version only +retrieves request pads. The pad should be released with +gst_element_release_request_pad(). + +This method is slower than manually getting the pad template and calling +gst_element_request_pad() if the pads should have a specific name (e.g. +@name is "src_1" instead of "src_\%u"). + + + requested #GstPad if found, + otherwise %NULL. Release after usage. + + + + + a #GstElement to find a request pad of. + + + + the name of the request #GstPad to retrieve. + + + + + + Returns the start time of the element. The start time is the +running time of the clock when this element was last put to PAUSED. + +Usually the start_time is managed by a toplevel element such as +#GstPipeline. + +MT safe. + + + the start time of the element. + + + + + a #GstElement. + + + + + + Gets the state of the element. + +For elements that performed an ASYNC state change, as reported by +gst_element_set_state(), this function will block up to the +specified timeout value for the state change to complete. +If the element completes the state change or goes into +an error, this function returns immediately with a return value of +%GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively. + +For elements that did not return %GST_STATE_CHANGE_ASYNC, this function +returns the current and pending state immediately. + +This function returns %GST_STATE_CHANGE_NO_PREROLL if the element +successfully changed its state but is not able to provide data yet. +This mostly happens for live sources that only produce data in +%GST_STATE_PLAYING. While the state change return is equivalent to +%GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that +some sink elements might not be able to complete their state change because +an element is not producing data to complete the preroll. When setting the +element to playing, the preroll will complete and playback will start. + + + %GST_STATE_CHANGE_SUCCESS if the element has no more pending state + and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the + element is still performing a state change or + %GST_STATE_CHANGE_FAILURE if the last state change failed. + +MT safe. + + + + + a #GstElement to get the state of. + + + + a pointer to #GstState to hold the state. + Can be %NULL. + + + + a pointer to #GstState to hold the pending + state. Can be %NULL. + + + + a #GstClockTime to specify the timeout for an async + state change or %GST_CLOCK_TIME_NONE for infinite timeout. + + + + + + Retrieves a pad from @element by name. This version only retrieves +already-existing (i.e. 'static') pads. + + + the requested #GstPad if + found, otherwise %NULL. unref after usage. + +MT safe. + + + + + a #GstElement to find a static pad of. + + + + the name of the static #GstPad to retrieve. + + + + + + Checks if the state of an element is locked. +If the state of an element is locked, state changes of the parent don't +affect the element. +This way you can leave currently unused elements inside bins. Just lock their +state before changing the state from #GST_STATE_NULL. + +MT safe. + + + %TRUE, if the element's state is locked. + + + + + a #GstElement. + + + + + + Retrieves an iterator of @element's pads. The iterator should +be freed after usage. Also more specialized iterators exists such as +gst_element_iterate_src_pads() or gst_element_iterate_sink_pads(). + +The order of pads returned by the iterator will be the order in which +the pads were added to the element. + + + the #GstIterator of #GstPad. + +MT safe. + + + + + a #GstElement to iterate pads of. + + + + + + Retrieves an iterator of @element's sink pads. + +The order of pads returned by the iterator will be the order in which +the pads were added to the element. + + + the #GstIterator of #GstPad. + +MT safe. + + + + + a #GstElement. + + + + + + Retrieves an iterator of @element's source pads. + +The order of pads returned by the iterator will be the order in which +the pads were added to the element. + + + the #GstIterator of #GstPad. + +MT safe. + + + + + a #GstElement. + + + + + + Links @src to @dest. The link must be from source to +destination; the other direction will not be tried. The function looks for +existing pads that aren't linked yet. It will request new pads if necessary. +Such pads need to be released manually when unlinking. +If multiple links are possible, only one is established. + +Make sure you have added your elements to a bin or pipeline with +gst_bin_add() before trying to link them. + + + %TRUE if the elements could be linked, %FALSE otherwise. + + + + + a #GstElement containing the source pad. + + + + the #GstElement containing the destination pad. + + + + + + Links @src to @dest using the given caps as filtercaps. +The link must be from source to +destination; the other direction will not be tried. The function looks for +existing pads that aren't linked yet. It will request new pads if necessary. +If multiple links are possible, only one is established. + +Make sure you have added your elements to a bin or pipeline with +gst_bin_add() before trying to link them. + + + %TRUE if the pads could be linked, %FALSE otherwise. + + + + + a #GstElement containing the source pad. + + + + the #GstElement containing the destination pad. + + + + the #GstCaps to filter the link, + or %NULL for no filter. + + + + + + Chain together a series of elements. Uses gst_element_link(). +Make sure you have added your elements to a bin or pipeline with +gst_bin_add() before trying to link them. + + + %TRUE on success, %FALSE otherwise. + + + + + the first #GstElement in the link chain. + + + + the second #GstElement in the link chain. + + + + the %NULL-terminated list of elements to link in order. + + + + + + Links the two named pads of the source and destination elements. +Side effect is that if one of the pads has no parent, it becomes a +child of the parent of the other element. If they have different +parents, the link fails. + + + %TRUE if the pads could be linked, %FALSE otherwise. + + + + + a #GstElement containing the source pad. + + + + the name of the #GstPad in source element + or %NULL for any pad. + + + + the #GstElement containing the destination pad. + + + + the name of the #GstPad in destination element, +or %NULL for any pad. + + + + + + Links the two named pads of the source and destination elements. Side effect +is that if one of the pads has no parent, it becomes a child of the parent of +the other element. If they have different parents, the link fails. If @caps +is not %NULL, makes sure that the caps of the link is a subset of @caps. + + + %TRUE if the pads could be linked, %FALSE otherwise. + + + + + a #GstElement containing the source pad. + + + + the name of the #GstPad in source element + or %NULL for any pad. + + + + the #GstElement containing the destination pad. + + + + the name of the #GstPad in destination element + or %NULL for any pad. + + + + the #GstCaps to filter the link, + or %NULL for no filter. + + + + + + Links the two named pads of the source and destination elements. +Side effect is that if one of the pads has no parent, it becomes a +child of the parent of the other element. If they have different +parents, the link fails. + +Calling gst_element_link_pads_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT +is the same as calling gst_element_link_pads() and the recommended way of +linking pads with safety checks applied. + +This is a convenience function for gst_pad_link_full(). + + + %TRUE if the pads could be linked, %FALSE otherwise. + + + + + a #GstElement containing the source pad. + + + + the name of the #GstPad in source element + or %NULL for any pad. + + + + the #GstElement containing the destination pad. + + + + the name of the #GstPad in destination element, +or %NULL for any pad. + + + + the #GstPadLinkCheck to be performed when linking pads. + + + + + + Brings the element to the lost state. The current state of the +element is copied to the pending state so that any call to +gst_element_get_state() will return %GST_STATE_CHANGE_ASYNC. + +An ASYNC_START message is posted. If the element was PLAYING, it will +go to PAUSED. The element will be restored to its PLAYING state by +the parent pipeline when it prerolls again. + +This is mostly used for elements that lost their preroll buffer +in the %GST_STATE_PAUSED or %GST_STATE_PLAYING state after a flush, +they will go to their pending state again when a new preroll buffer is +queued. This function can only be called when the element is currently +not in error or an async state change. + +This function is used internally and should normally not be called from +plugins or applications. + + + + + + + a #GstElement the state is lost of + + + + + + Post an error, warning or info message on the bus from inside an element. + +@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or +#GST_MESSAGE_INFO. + +MT safe. + + + + + + + a #GstElement to send message from + + + + the #GstMessageType + + + + the GStreamer GError domain this message belongs to + + + + the GError code belonging to the domain + + + + an allocated text string to be used + as a replacement for the default message connected to code, + or %NULL + + + + an allocated debug message to be + used as a replacement for the default debugging information, + or %NULL + + + + the source code file where the error was generated + + + + the source code function where the error was generated + + + + the source code line where the error was generated + + + + + + Post an error, warning or info message on the bus from inside an element. + +@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or +#GST_MESSAGE_INFO. + + + + + + + a #GstElement to send message from + + + + the #GstMessageType + + + + the GStreamer GError domain this message belongs to + + + + the GError code belonging to the domain + + + + an allocated text string to be used + as a replacement for the default message connected to code, + or %NULL + + + + an allocated debug message to be + used as a replacement for the default debugging information, + or %NULL + + + + the source code file where the error was generated + + + + the source code function where the error was generated + + + + the source code line where the error was generated + + + + optional details structure + + + + + + Use this function to signal that the element does not expect any more pads +to show up in the current pipeline. This function should be called whenever +pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES +pad templates use this in combination with autopluggers to figure out that +the element is done initializing its pads. + +This function emits the #GstElement::no-more-pads signal. + +MT safe. + + + + + + + a #GstElement + + + + + + Post a message on the element's #GstBus. This function takes ownership of the +message; if you want to access the message after this call, you should add an +additional reference before calling. + + + %TRUE if the message was successfully posted. The function returns +%FALSE if the element did not have a bus. + +MT safe. + + + + + a #GstElement posting the message + + + + a #GstMessage to post + + + + + + Get the clock provided by the given element. +> An element is only required to provide a clock in the PAUSED +> state. Some elements can provide a clock in other states. + + + the GstClock provided by the +element or %NULL if no clock could be provided. Unref after usage. + +MT safe. + + + + + a #GstElement to query + + + + + + Performs a query on the given element. + +For elements that don't implement a query handler, this function +forwards the query to a random srcpad or to the peer of a +random linked sinkpad of this element. + +Please note that some queries might need a running pipeline to work. + + + %TRUE if the query could be performed. + +MT safe. + + + + + a #GstElement to perform the query on. + + + + the #GstQuery. + + + + + + Queries an element to convert @src_val in @src_format to @dest_format. + + + %TRUE if the query could be performed. + + + + + a #GstElement to invoke the convert query on. + + + + a #GstFormat to convert from. + + + + a value to convert. + + + + the #GstFormat to convert to. + + + + a pointer to the result. + + + + + + Queries an element (usually top-level pipeline or playbin element) for the +total stream duration in nanoseconds. This query will only work once the +pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application +will receive an ASYNC_DONE message on the pipeline bus when that is the case. + +If the duration changes for some reason, you will get a DURATION_CHANGED +message on the pipeline bus, in which case you should re-query the duration +using this function. + + + %TRUE if the query could be performed. + + + + + a #GstElement to invoke the duration query on. + + + + the #GstFormat requested + + + + A location in which to store the total duration, or %NULL. + + + + + + Queries an element (usually top-level pipeline or playbin element) for the +stream position in nanoseconds. This will be a value between 0 and the +stream duration (if the stream duration is known). This query will usually +only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING +state). The application will receive an ASYNC_DONE message on the pipeline +bus when that is the case. + +If one repeatedly calls this function one can also create a query and reuse +it in gst_element_query(). + + + %TRUE if the query could be performed. + + + + + a #GstElement to invoke the position query on. + + + + the #GstFormat requested + + + + a location in which to store the current + position, or %NULL. + + + + + + Makes the element free the previously requested pad as obtained +with gst_element_request_pad(). + +This does not unref the pad. If the pad was created by using +gst_element_request_pad(), gst_element_release_request_pad() needs to be +followed by gst_object_unref() to free the @pad. + +MT safe. + + + + + + + a #GstElement to release the request pad of. + + + + the #GstPad to release. + + + + + + Removes @pad from @element. @pad will be destroyed if it has not been +referenced elsewhere using gst_object_unparent(). + +This function is used by plugin developers and should not be used +by applications. Pads that were dynamically requested from elements +with gst_element_request_pad() should be released with the +gst_element_release_request_pad() function instead. + +Pads are not automatically deactivated so elements should perform the needed +steps to deactivate the pad in case this pad is removed in the PAUSED or +PLAYING state. See gst_pad_set_active() for more information about +deactivating pads. + +The pad and the element should be unlocked when calling this function. + +This function will emit the #GstElement::pad-removed signal on the element. + + + %TRUE if the pad could be removed. Can return %FALSE if the +pad does not belong to the provided element. + +MT safe. + + + + + a #GstElement to remove pad from. + + + + the #GstPad to remove from the element. + + + + + + + + + + + + a #GstElement being watched for property changes + + + + watch id to remove + + + + + + Retrieves a request pad from the element according to the provided template. +Pad templates can be looked up using +gst_element_factory_get_static_pad_templates(). + +The pad should be released with gst_element_release_request_pad(). + + + requested #GstPad if found, + otherwise %NULL. Release after usage. + + + + + a #GstElement to find a request pad of. + + + + a #GstPadTemplate of which we want a pad of. + + + + the name of the request #GstPad +to retrieve. Can be %NULL. + + + + the caps of the pad we want to +request. Can be %NULL. + + + + + + Sends a seek event to an element. See gst_event_new_seek() for the details of +the parameters. The seek event is sent to the element using +gst_element_send_event(). + +MT safe. + + + %TRUE if the event was handled. Flushing seeks will trigger a +preroll, which will emit %GST_MESSAGE_ASYNC_DONE. + + + + + a #GstElement to send the event to. + + + + The new playback rate + + + + The format of the seek values + + + + The optional seek flags. + + + + The type and flags for the new start position + + + + The value of the new start position + + + + The type and flags for the new stop position + + + + The value of the new stop position + + + + + + Simple API to perform a seek on the given element, meaning it just seeks +to the given position relative to the start of the stream. For more complex +operations like segment seeks (e.g. for looping) or changing the playback +rate or seeking relative to the last configured playback segment you should +use gst_element_seek(). + +In a completely prerolled PAUSED or PLAYING pipeline, seeking is always +guaranteed to return %TRUE on a seekable media type or %FALSE when the media +type is certainly not seekable (such as a live stream). + +Some elements allow for seeking in the READY state, in this +case they will store the seek event and execute it when they are put to +PAUSED. If the element supports seek in READY, it will always return %TRUE when +it receives the event in the READY state. + + + %TRUE if the seek operation succeeded. Flushing seeks will trigger a +preroll, which will emit %GST_MESSAGE_ASYNC_DONE. + + + + + a #GstElement to seek on + + + + a #GstFormat to execute the seek in, such as #GST_FORMAT_TIME + + + + seek options; playback applications will usually want to use + GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here + + + + position to seek to (relative to the start); if you are doing + a seek in #GST_FORMAT_TIME this value is in nanoseconds - + multiply with #GST_SECOND to convert seconds to nanoseconds or + with #GST_MSECOND to convert milliseconds to nanoseconds. + + + + + + Sends an event to an element. If the element doesn't implement an +event handler, the event will be pushed on a random linked sink pad for +downstream events or a random linked source pad for upstream events. + +This function takes ownership of the provided event so you should +gst_event_ref() it if you want to reuse the event after this call. + +MT safe. + + + %TRUE if the event was handled. Events that trigger a preroll (such +as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. + + + + + a #GstElement to send the event to. + + + + the #GstEvent to send to the element. + + + + + + Set the base time of an element. See gst_element_get_base_time(). + +MT safe. + + + + + + + a #GstElement. + + + + the base time to set. + + + + + + Sets the bus of the element. Increases the refcount on the bus. +For internal use only, unless you're testing elements. + +MT safe. + + + + + + + a #GstElement to set the bus of. + + + + the #GstBus to set. + + + + + + Sets the clock for the element. This function increases the +refcount on the clock. Any previously set clock on the object +is unreffed. + + + %TRUE if the element accepted the clock. An element can refuse a +clock when it, for example, is not able to slave its internal clock to the +@clock or when it requires a specific clock to operate. + +MT safe. + + + + + a #GstElement to set the clock for. + + + + the #GstClock to set for the element. + + + + + + Sets the context of the element. Increases the refcount of the context. + +MT safe. + + + + + + + a #GstElement to set the context of. + + + + the #GstContext to set. + + + + + + Locks the state of an element, so state changes of the parent don't affect +this element anymore. + +Note that this is racy if the state lock of the parent bin is not taken. +The parent bin might've just checked the flag in another thread and as the +next step proceed to change the child element's state. + +MT safe. + + + %TRUE if the state was changed, %FALSE if bad parameters were given +or the elements state-locking needed no change. + + + + + a #GstElement + + + + %TRUE to lock the element's state + + + + + + Set the start time of an element. The start time of the element is the +running time of the element when it last went to the PAUSED state. In READY +or after a flushing seek, it is set to 0. + +Toplevel elements like #GstPipeline will manage the start_time and +base_time on its children. Setting the start_time to #GST_CLOCK_TIME_NONE +on such a toplevel element will disable the distribution of the base_time to +the children and can be useful if the application manages the base_time +itself, for example if you want to synchronize capture from multiple +pipelines, and you can also ensure that the pipelines have the same clock. + +MT safe. + + + + + + + a #GstElement. + + + + the base time to set. + + + + + + Sets the state of the element. This function will try to set the +requested state by going through all the intermediary states and calling +the class's state change function for each. + +This function can return #GST_STATE_CHANGE_ASYNC, in which case the +element will perform the remainder of the state change asynchronously in +another thread. +An application can use gst_element_get_state() to wait for the completion +of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or +%GST_MESSAGE_STATE_CHANGED on the bus. + +State changes to %GST_STATE_READY or %GST_STATE_NULL never return +#GST_STATE_CHANGE_ASYNC. + + + Result of the state change using #GstStateChangeReturn. + +MT safe. + + + + + a #GstElement to change state of. + + + + the element's new #GstState. + + + + + + Tries to change the state of the element to the same as its parent. +If this function returns %FALSE, the state of element is undefined. + + + %TRUE, if the element's state could be synced to the parent's state. + +MT safe. + + + + + a #GstElement. + + + + + + Unlinks all source pads of the source element with all sink pads +of the sink element to which they are linked. + +If the link has been made using gst_element_link(), it could have created an +requestpad, which has to be released using gst_element_release_request_pad(). + + + + + + + the source #GstElement to unlink. + + + + the sink #GstElement to unlink. + + + + + + Unlinks a series of elements. Uses gst_element_unlink(). + + + + + + + the first #GstElement in the link chain. + + + + the second #GstElement in the link chain. + + + + the %NULL-terminated list of elements to unlink in order. + + + + + + Unlinks the two named pads of the source and destination elements. + +This is a convenience function for gst_pad_unlink(). + + + + + + + a (transfer none): #GstElement containing the source pad. + + + + the name of the #GstPad in source element. + + + + a #GstElement containing the destination pad. + + + + the name of the #GstPad in destination element. + + + + + + + + + Used to serialize execution of gst_element_set_state() + + + + Used to signal completion of a state change + + + + Used to detect concurrent execution of +gst_element_set_state() and gst_element_get_state() + + + + the target state of an element as set by the application + + + + the current state of an element + + + + the next state of an element, can be #GST_STATE_VOID_PENDING if +the element is in the correct state. + + + + the final state the element should go to, can be +#GST_STATE_VOID_PENDING if the element is in the correct state + + + + the last return value of an element state change + + + + the bus of the element. This bus is provided to the element by the +parent element or the application. A #GstPipeline has a bus of its own. + + + + the clock of the element. This clock is usually provided to the +element by the toplevel #GstPipeline. + + + + the time of the clock right before the element is set to +PLAYING. Subtracting @base_time from the current clock time in the PLAYING +state will yield the running_time against the clock. + + + + the running_time of the last PAUSED state + + + + number of pads of the element, includes both source and sink pads. + + + + list of pads + + + + + + number of source pads of the element. + + + + list of source pads + + + + + + number of sink pads of the element. + + + + list of sink pads + + + + + + updated whenever the a pad is added or removed + + + + list of contexts + + + + + + + + + + + This signals that the element will not generate more dynamic pads. +Note that this signal will usually be emitted from the context of +the streaming thread. + + + + + + a new #GstPad has been added to the element. Note that this signal will +usually be emitted from the context of the streaming thread. Also keep in +mind that if you add new elements to the pipeline in the signal handler +you will need to set them to the desired target state with +gst_element_set_state() or gst_element_sync_state_with_parent(). + + + + + + the pad that has been added + + + + + + a #GstPad has been removed from the element + + + + + + the pad that has been removed + + + + + + + Callback prototype used in #gst_element_call_async + + + + + + + The #GstElement this function has been called against + + + + Data passed in the function where that callback has been passed + + + + + + GStreamer element class. Override the vmethods to implement the element +functionality. + + + the parent class structure + + + + metadata for elements of this class + + + + the #GstElementFactory that creates these elements + + + + a #GList of #GstPadTemplate + + + + + + the number of padtemplates + + + + changed whenever the padtemplates change + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstElement + + + + + + + + + + requested #GstPad if found, + otherwise %NULL. Release after usage. + + + + + a #GstElement to find a request pad of. + + + + a #GstPadTemplate of which we want a pad of. + + + + the name of the request #GstPad +to retrieve. Can be %NULL. + + + + the caps of the pad we want to +request. Can be %NULL. + + + + + + + + + + + + + + + + + + + + + + + + + + %GST_STATE_CHANGE_SUCCESS if the element has no more pending state + and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the + element is still performing a state change or + %GST_STATE_CHANGE_FAILURE if the last state change failed. + +MT safe. + + + + + a #GstElement to get the state of. + + + + a pointer to #GstState to hold the state. + Can be %NULL. + + + + a pointer to #GstState to hold the pending + state. Can be %NULL. + + + + a #GstClockTime to specify the timeout for an async + state change or %GST_CLOCK_TIME_NONE for infinite timeout. + + + + + + + + + + Result of the state change using #GstStateChangeReturn. + +MT safe. + + + + + a #GstElement to change state of. + + + + the element's new #GstState. + + + + + + + + + + the #GstStateChangeReturn of the state transition. + + + + + a #GstElement + + + + the requested transition + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstElement to set the bus of. + + + + the #GstBus to set. + + + + + + + + + + the GstClock provided by the +element or %NULL if no clock could be provided. Unref after usage. + +MT safe. + + + + + a #GstElement to query + + + + + + + + + + %TRUE if the element accepted the clock. An element can refuse a +clock when it, for example, is not able to slave its internal clock to the +@clock or when it requires a specific clock to operate. + +MT safe. + + + + + a #GstElement to set the clock for. + + + + the #GstClock to set for the element. + + + + + + + + + + %TRUE if the event was handled. Events that trigger a preroll (such +as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. + + + + + a #GstElement to send the event to. + + + + the #GstEvent to send to the element. + + + + + + + + + + %TRUE if the query could be performed. + +MT safe. + + + + + a #GstElement to perform the query on. + + + + the #GstQuery. + + + + + + + + + + %TRUE if the message was successfully posted. The function returns +%FALSE if the element did not have a bus. + +MT safe. + + + + + a #GstElement posting the message + + + + a #GstMessage to post + + + + + + + + + + + + + + a #GstElement to set the context of. + + + + the #GstContext to set. + + + + + + + + + + + + Set @key with @value as metadata in @klass. + + + + + + + class to set metadata for + + + + the key to set + + + + the value to set + + + + + + Adds a padtemplate to an element class. This is mainly used in the _class_init +functions of classes. If a pad template with the same name as an already +existing one is added the old one is replaced by the new one. + +@templ's reference count will be incremented, and any floating +reference will be removed (see gst_object_ref_sink()) + + + + + + + the #GstElementClass to add the pad template to. + + + + a #GstPadTemplate to add to the element class. + + + + + + Set @key with @value as metadata in @klass. + +Same as gst_element_class_add_metadata(), but @value must be a static string +or an inlined string, as it will not be copied. (GStreamer plugins will +be made resident once loaded, so this function can be used even from +dynamically loaded plugins.) + + + + + + + class to set metadata for + + + + the key to set + + + + the value to set + + + + + + Adds a pad template to an element class based on the static pad template +@templ. This is mainly used in the _class_init functions of element +implementations. If a pad template with the same name already exists, +the old one is replaced by the new one. + + + + + + + the #GstElementClass to add the pad template to. + + + + #GstStaticPadTemplate to add as pad template to the element class. + + + + + + Adds a pad template to an element class based on the static pad template +@templ. This is mainly used in the _class_init functions of element +implementations. If a pad template with the same name already exists, +the old one is replaced by the new one. + + + + + + + the #GstElementClass to add the pad template to. + + + + #GstStaticPadTemplate to add as pad template to the element class. + + + + The #GType of the pad to create + + + + + + Get metadata with @key in @klass. + + + the metadata for @key. + + + + + class to get metadata for + + + + the key to get + + + + + + Retrieves a padtemplate from @element_class with the given name. +> If you use this function in the #GInstanceInitFunc of an object class +> that has subclasses, make sure to pass the g_class parameter of the +> #GInstanceInitFunc here. + + + the #GstPadTemplate with the + given name, or %NULL if none was found. No unreferencing is + necessary. + + + + + a #GstElementClass to get the pad template of. + + + + the name of the #GstPadTemplate to get. + + + + + + Retrieves a list of the pad templates associated with @element_class. The +list must not be modified by the calling code. +> If you use this function in the #GInstanceInitFunc of an object class +> that has subclasses, make sure to pass the g_class parameter of the +> #GInstanceInitFunc here. + + + the #GList of + pad templates. + + + + + + + a #GstElementClass to get pad templates of. + + + + + + Sets the detailed information for a #GstElementClass. +> This function is for use in _class_init functions only. + + + + + + + class to set metadata for + + + + The long English name of the element. E.g. "File Sink" + + + + String describing the type of element, as an unordered list +separated with slashes ('/'). See draft-klass.txt of the design docs +for more details and common types. E.g: "Sink/File" + + + + Sentence describing the purpose of the element. +E.g: "Write stream to a file" + + + + Name and contact details of the author(s). Use \n to separate +multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" + + + + + + Sets the detailed information for a #GstElementClass. + +> This function is for use in _class_init functions only. + +Same as gst_element_class_set_metadata(), but @longname, @classification, +@description, and @author must be static strings or inlined strings, as +they will not be copied. (GStreamer plugins will be made resident once +loaded, so this function can be used even from dynamically loaded plugins.) + + + + + + + class to set metadata for + + + + The long English name of the element. E.g. "File Sink" + + + + String describing the type of element, as an unordered list +separated with slashes ('/'). See draft-klass.txt of the design docs +for more details and common types. E.g: "Sink/File" + + + + Sentence describing the purpose of the element. +E.g: "Write stream to a file" + + + + Name and contact details of the author(s). Use \n to separate +multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" + + + + + + + #GstElementFactory is used to create instances of elements. A +GstElementFactory can be added to a #GstPlugin as it is also a +#GstPluginFeature. + +Use the gst_element_factory_find() and gst_element_factory_create() +functions to create element instances or use gst_element_factory_make() as a +convenient shortcut. + +The following code example shows you how to create a GstFileSrc element. + +## Using an element factory +|[<!-- language="C" --> + #include &lt;gst/gst.h&gt; + + GstElement *src; + GstElementFactory *srcfactory; + + gst_init (&amp;argc, &amp;argv); + + srcfactory = gst_element_factory_find ("filesrc"); + g_return_if_fail (srcfactory != NULL); + src = gst_element_factory_create (srcfactory, "src"); + g_return_if_fail (src != NULL); + ... +]| + + + Search for an element factory of the given name. Refs the returned +element factory; caller is responsible for unreffing. + + + #GstElementFactory if found, +%NULL otherwise + + + + + name of factory to find + + + + + + Filter out all the elementfactories in @list that can handle @caps in +the given direction. + +If @subsetonly is %TRUE, then only the elements whose pads templates +are a complete superset of @caps will be returned. Else any element +whose pad templates caps can intersect with @caps will be returned. + + + a #GList of + #GstElementFactory elements that match the given requisites. + Use #gst_plugin_feature_list_free after usage. + + + + + + + a #GList of + #GstElementFactory to filter + + + + + + a #GstCaps + + + + a #GstPadDirection to filter on + + + + whether to filter on caps subsets or not. + + + + + + Get a list of factories that match the given @type. Only elements +with a rank greater or equal to @minrank will be returned. +The list of factories is returned by decreasing rank. + + + a #GList of + #GstElementFactory elements. Use gst_plugin_feature_list_free() after + usage. + + + + + + + a #GstElementFactoryListType + + + + Minimum rank + + + + + + Create a new element of the type defined by the given element factory. +If name is %NULL, then the element will receive a guaranteed unique name, +consisting of the element factory name and a number. +If name is given, it will be given the name supplied. + + + new #GstElement or %NULL +if unable to create element + + + + + a named factory to instantiate + + + + name of new element, or %NULL to automatically create + a unique name + + + + + + Checks if the factory can sink all possible capabilities. + + + %TRUE if the caps are fully compatible. + + + + + factory to query + + + + the caps to check + + + + + + Checks if the factory can sink any possible capability. + + + %TRUE if the caps have a common subset. + + + + + factory to query + + + + the caps to check + + + + + + Checks if the factory can src all possible capabilities. + + + %TRUE if the caps are fully compatible. + + + + + factory to query + + + + the caps to check + + + + + + Checks if the factory can src any possible capability. + + + %TRUE if the caps have a common subset. + + + + + factory to query + + + + the caps to check + + + + + + Create a new element of the type defined by the given elementfactory. +It will be given the name supplied, since all elements require a name as +their first argument. + + + new #GstElement or %NULL + if the element couldn't be created + + + + + factory to instantiate + + + + name of new element, or %NULL to automatically create + a unique name + + + + + + Get the #GType for elements managed by this factory. The type can +only be retrieved if the element factory is loaded, which can be +assured with gst_plugin_feature_load(). + + + the #GType for elements managed by this factory or 0 if +the factory is not loaded. + + + + + factory to get managed #GType from + + + + + + Get the metadata on @factory with @key. + + + the metadata with @key on @factory or %NULL +when there was no metadata with the given @key. + + + + + a #GstElementFactory + + + + a key + + + + + + Get the available keys for the metadata on @factory. + + + +a %NULL-terminated array of key strings, or %NULL when there is no +metadata. Free with g_strfreev() when no longer needed. + + + + + + + a #GstElementFactory + + + + + + Gets the number of pad_templates in this factory. + + + the number of pad_templates + + + + + a #GstElementFactory + + + + + + Gets the #GList of #GstStaticPadTemplate for this factory. + + + the + static pad templates + + + + + + + a #GstElementFactory + + + + + + Gets a %NULL-terminated array of protocols this element supports or %NULL if +no protocols are supported. You may not change the contents of the returned +array, as it is still owned by the element factory. Use g_strdupv() to +make a copy of the protocol string array if you need to. + + + the supported protocols + or %NULL + + + + + + + a #GstElementFactory + + + + + + Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none. + + + type of URIs this element supports + + + + + a #GstElementFactory + + + + + + Check if @factory implements the interface with name @interfacename. + + + %TRUE when @factory implement the interface. + + + + + a #GstElementFactory + + + + an interface name + + + + + + Check if @factory is of the given types. + + + %TRUE if @factory is of @type. + + + + + a #GstElementFactory + + + + a #GstElementFactoryListType + + + + + + + + + + The standard flags that an element may have. + + ignore state changes from parent + + + the element is a sink + + + the element is a source. + + + the element can provide a clock + + + the element requires a clock + + + the element can use an index + + + offset to define more flags + + + + Function called for each pad when using gst_element_foreach_sink_pad(), +gst_element_foreach_src_pad(), or gst_element_foreach_pad(). + + + %FALSE to stop iterating pads, %TRUE to continue + + + + + the #GstElement + + + + a #GstPad + + + + user data passed to the foreach function + + + + + + The event class provides factory methods to construct events for sending +and functions to query (parse) received events. + +Events are usually created with gst_event_new_*() which takes event-type +specific parameters as arguments. +To send an event application will usually use gst_element_send_event() and +elements will use gst_pad_send_event() or gst_pad_push_event(). +The event should be unreffed with gst_event_unref() if it has not been sent. + +Events that have been received can be parsed with their respective +gst_event_parse_*() functions. It is valid to pass %NULL for unwanted details. + +Events are passed between elements in parallel to the data stream. Some events +are serialized with buffers, others are not. Some events only travel downstream, +others only upstream. Some events can travel both upstream and downstream. + +The events are used to signal special conditions in the datastream such as +EOS (end of stream) or the start of a new stream-segment. +Events are also used to flush the pipeline of any pending data. + +Most of the event API is used inside plugins. Applications usually only +construct and use seek events. +To do that gst_event_new_seek() is used to create a seek event. It takes +the needed parameters to specify seeking time and mode. +|[<!-- language="C" --> + GstEvent *event; + gboolean result; + ... + // construct a seek event to play the media from second 2 to 5, flush + // the pipeline to decrease latency. + event = gst_event_new_seek (1.0, + GST_FORMAT_TIME, + GST_SEEK_FLAG_FLUSH, + GST_SEEK_TYPE_SET, 2 * GST_SECOND, + GST_SEEK_TYPE_SET, 5 * GST_SECOND); + ... + result = gst_element_send_event (pipeline, event); + if (!result) + g_warning ("seek failed"); + ... +]| + + + the parent structure + + + + the #GstEventType of the event + + + + the timestamp of the event + + + + the sequence number of the event + + + + Create a new buffersize event. The event is sent downstream and notifies +elements that they should provide a buffer of the specified dimensions. + +When the @async flag is set, a thread boundary is preferred. + + + a new #GstEvent + + + + + buffer format + + + + minimum buffer size + + + + maximum buffer size + + + + thread behavior + + + + + + Create a new CAPS event for @caps. The caps event can only travel downstream +synchronized with the buffer flow and contains the format of the buffers +that will follow after the event. + + + the new CAPS event. + + + + + a #GstCaps + + + + + + Create a new custom-typed event. This can be used for anything not +handled by other event-specific functions to pass an event to another +element. + +Make sure to allocate an event type with the #GST_EVENT_MAKE_TYPE macro, +assigning a free number and filling in the correct direction and +serialization flags. + +New custom events can also be created by subclassing the event type if +needed. + + + the new custom event. + + + + + The type of the new event + + + + the structure for the event. The event will + take ownership of the structure. + + + + + + Create a new EOS event. The eos event can only travel downstream +synchronized with the buffer flow. Elements that receive the EOS +event on a pad can return #GST_FLOW_EOS as a #GstFlowReturn +when data after the EOS event arrives. + +The EOS event will travel down to the sink elements in the pipeline +which will then post the #GST_MESSAGE_EOS on the bus after they have +finished playing any buffered data. + +When all sinks have posted an EOS message, an EOS message is +forwarded to the application. + +The EOS event itself will not cause any state transitions of the pipeline. + + + the new EOS event. + + + + + Allocate a new flush start event. The flush start event can be sent +upstream and downstream and travels out-of-bounds with the dataflow. + +It marks pads as being flushing and will make them return +#GST_FLOW_FLUSHING when used for data flow with gst_pad_push(), +gst_pad_chain(), gst_pad_get_range() and gst_pad_pull_range(). +Any event (except a #GST_EVENT_FLUSH_STOP) received +on a flushing pad will return %FALSE immediately. + +Elements should unlock any blocking functions and exit their streaming +functions as fast as possible when this event is received. + +This event is typically generated after a seek to flush out all queued data +in the pipeline so that the new media is played as soon as possible. + + + a new flush start event. + + + + + Allocate a new flush stop event. The flush stop event can be sent +upstream and downstream and travels serialized with the dataflow. +It is typically sent after sending a FLUSH_START event to make the +pads accept data again. + +Elements can process this event synchronized with the dataflow since +the preceding FLUSH_START event stopped the dataflow. + +This event is typically generated to complete a seek and to resume +dataflow. + + + a new flush stop event. + + + + + if time should be reset + + + + + + Create a new GAP event. A gap event can be thought of as conceptually +equivalent to a buffer to signal that there is no data for a certain +amount of time. This is useful to signal a gap to downstream elements +which may wait for data, such as muxers or mixers or overlays, especially +for sparse streams such as subtitle streams. + + + the new GAP event. + + + + + the start time (pts) of the gap + + + + the duration of the gap + + + + + + Create a new instant-rate-change event. This event is sent by seek +handlers (e.g. demuxers) when receiving a seek with the +%GST_SEEK_FLAG_INSTANT_RATE_CHANGE and signals to downstream elements that +the playback rate in the existing segment should be immediately multiplied +by the @rate_multiplier factor. + +The flags provided replace any flags in the existing segment, for the +flags within the %GST_SEGMENT_INSTANT_FLAGS set. Other GstSegmentFlags +are ignored and not transferred in the event. + + + the new instant-rate-change event. + + + + + the multiplier to be applied to the playback rate + + + + A new subset of segment flags to replace in segments + + + + + + Create a new instant-rate-sync-time event. This event is sent by the +pipeline to notify elements handling the instant-rate-change event about +the running-time when the new rate should be applied. The running time +may be in the past when elements handle this event, which can lead to +switching artifacts. The magnitude of those depends on the exact timing +of event delivery to each element and the magnitude of the change in +playback rate being applied. + +The @running_time and @upstream_running_time are the same if this +is the first instant-rate adjustment, but will differ for later ones +to compensate for the accumulated offset due to playing at a rate +different to the one indicated in the playback segments. + + + the new instant-rate-sync-time event. + + + + + the new playback rate multiplier to be applied + + + + Running time when the rate change should be applied + + + + The upstream-centric running-time when the + rate change should be applied. + + + + + + Create a new latency event. The event is sent upstream from the sinks and +notifies elements that they should add an additional @latency to the +running time before synchronising against the clock. + +The latency is mostly used in live sinks and is always expressed in +the time format. + + + a new #GstEvent + + + + + the new latency value + + + + + + Create a new navigation event from the given description. + + + a new #GstEvent + + + + + description of the event. The event will take + ownership of the structure. + + + + + + Creates a new event containing information specific to a particular +protection system (uniquely identified by @system_id), by which that +protection system can acquire key(s) to decrypt a protected stream. + +In order for a decryption element to decrypt media +protected using a specific system, it first needs all the +protection system specific information necessary to acquire the decryption +key(s) for that stream. The functions defined here enable this information +to be passed in events from elements that extract it +(e.g., ISOBMFF demuxers, MPEG DASH demuxers) to protection decrypter +elements that use it. + +Events containing protection system specific information are created using +#gst_event_new_protection, and they can be parsed by downstream elements +using #gst_event_parse_protection. + +In Common Encryption, protection system specific information may be located +within ISOBMFF files, both in movie (moov) boxes and movie fragment (moof) +boxes; it may also be contained in ContentProtection elements within MPEG +DASH MPDs. The events created by #gst_event_new_protection contain data +identifying from which of these locations the encapsulated protection system +specific information originated. This origin information is required as +some protection systems use different encodings depending upon where the +information originates. + +The events returned by gst_event_new_protection() are implemented +in such a way as to ensure that the most recently-pushed protection info +event of a particular @origin and @system_id will +be stuck to the output pad of the sending element. + + + a #GST_EVENT_PROTECTION event, if successful; %NULL +if unsuccessful. + + + + + a string holding a UUID that uniquely +identifies a protection system. + + + + a #GstBuffer holding protection system specific +information. The reference count of the buffer will be incremented by one. + + + + a string indicating where the protection +information carried in the event was extracted from. The allowed values +of this string will depend upon the protection scheme. + + + + + + Allocate a new qos event with the given values. +The QOS event is generated in an element that wants an upstream +element to either reduce or increase its rate because of +high/low CPU load or other resource usage such as network performance or +throttling. Typically sinks generate these events for each buffer +they receive. + +@type indicates the reason for the QoS event. #GST_QOS_TYPE_OVERFLOW is +used when a buffer arrived in time or when the sink cannot keep up with +the upstream datarate. #GST_QOS_TYPE_UNDERFLOW is when the sink is not +receiving buffers fast enough and thus has to drop late buffers. +#GST_QOS_TYPE_THROTTLE is used when the datarate is artificially limited +by the application, for example to reduce power consumption. + +@proportion indicates the real-time performance of the streaming in the +element that generated the QoS event (usually the sink). The value is +generally computed based on more long term statistics about the streams +timestamps compared to the clock. +A value < 1.0 indicates that the upstream element is producing data faster +than real-time. A value > 1.0 indicates that the upstream element is not +producing data fast enough. 1.0 is the ideal @proportion value. The +proportion value can safely be used to lower or increase the quality of +the element. + +@diff is the difference against the clock in running time of the last +buffer that caused the element to generate the QOS event. A negative value +means that the buffer with @timestamp arrived in time. A positive value +indicates how late the buffer with @timestamp was. When throttling is +enabled, @diff will be set to the requested throttling interval. + +@timestamp is the timestamp of the last buffer that cause the element +to generate the QOS event. It is expressed in running time and thus an ever +increasing value. + +The upstream element can use the @diff and @timestamp values to decide +whether to process more buffers. For positive @diff, all buffers with +timestamp <= @timestamp + @diff will certainly arrive late in the sink +as well. A (negative) @diff value so that @timestamp + @diff would yield a +result smaller than 0 is not allowed. + +The application can use general event probes to intercept the QoS +event and implement custom application specific QoS handling. + + + a new QOS event. + + + + + the QoS type + + + + the proportion of the qos message + + + + The time difference of the last Clock sync + + + + The timestamp of the buffer + + + + + + Create a new reconfigure event. The purpose of the reconfigure event is +to travel upstream and make elements renegotiate their caps or reconfigure +their buffer pools. This is useful when changing properties on elements +or changing the topology of the pipeline. + + + a new #GstEvent + + + + + Allocate a new seek event with the given parameters. + +The seek event configures playback of the pipeline between @start to @stop +at the speed given in @rate, also called a playback segment. +The @start and @stop values are expressed in @format. + +A @rate of 1.0 means normal playback rate, 2.0 means double speed. +Negatives values means backwards playback. A value of 0.0 for the +rate is not allowed and should be accomplished instead by PAUSING the +pipeline. + +A pipeline has a default playback segment configured with a start +position of 0, a stop position of -1 and a rate of 1.0. The currently +configured playback segment can be queried with #GST_QUERY_SEGMENT. + +@start_type and @stop_type specify how to adjust the currently configured +start and stop fields in playback segment. Adjustments can be made relative +or absolute to the last configured values. A type of #GST_SEEK_TYPE_NONE +means that the position should not be updated. + +When the rate is positive and @start has been updated, playback will start +from the newly configured start position. + +For negative rates, playback will start from the newly configured stop +position (if any). If the stop position is updated, it must be different from +-1 (#GST_CLOCK_TIME_NONE) for negative rates. + +It is not possible to seek relative to the current playback position, to do +this, PAUSE the pipeline, query the current playback position with +#GST_QUERY_POSITION and update the playback segment current position with a +#GST_SEEK_TYPE_SET to the desired position. + + + a new seek event. + + + + + The new playback rate + + + + The format of the seek values + + + + The optional seek flags + + + + The type and flags for the new start position + + + + The value of the new start position + + + + The type and flags for the new stop position + + + + The value of the new stop position + + + + + + Create a new SEGMENT event for @segment. The segment event can only travel +downstream synchronized with the buffer flow and contains timing information +and playback properties for the buffers that will follow. + +The segment event marks the range of buffers to be processed. All +data not within the segment range is not to be processed. This can be +used intelligently by plugins to apply more efficient methods of skipping +unneeded data. The valid range is expressed with the @start and @stop +values. + +The time value of the segment is used in conjunction with the start +value to convert the buffer timestamps into the stream time. This is +usually done in sinks to report the current stream_time. +@time represents the stream_time of a buffer carrying a timestamp of +@start. @time cannot be -1. + +@start cannot be -1, @stop can be -1. If there +is a valid @stop given, it must be greater or equal the @start, including +when the indicated playback @rate is < 0. + +The @applied_rate value provides information about any rate adjustment that +has already been made to the timestamps and content on the buffers of the +stream. (@rate * @applied_rate) should always equal the rate that has been +requested for playback. For example, if an element has an input segment +with intended playback @rate of 2.0 and applied_rate of 1.0, it can adjust +incoming timestamps and buffer content by half and output a segment event +with @rate of 1.0 and @applied_rate of 2.0 + +After a segment event, the buffer stream time is calculated with: + + time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) + + + the new SEGMENT event. + + + + + a #GstSegment + + + + + + Create a new segment-done event. This event is sent by elements that +finish playback of a segment as a result of a segment seek. + + + a new #GstEvent + + + + + The format of the position being done + + + + The position of the segment being done + + + + + + Allocate a new select-streams event. + +The select-streams event requests the specified @streams to be activated. + +The list of @streams corresponds to the "Stream ID" of each stream to be +activated. Those ID can be obtained via the #GstStream objects present +in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or +#GST_MESSAGE_STREAM_COLLECTION. + +Note: The list of @streams can not be empty. + + + a new select-streams event or %NULL in case of +an error (like an empty streams list). + + + + + the list of streams to +activate + + + + + + + + Create a new sink-message event. The purpose of the sink-message event is +to instruct a sink to post the message contained in the event synchronized +with the stream. + +@name is used to store multiple sticky events on one pad. + + + a new #GstEvent + + + + + a name for the event + + + + the #GstMessage to be posted + + + + + + Create a new step event. The purpose of the step event is to instruct a sink +to skip @amount (expressed in @format) of media. It can be used to implement +stepping through the video frame by frame or for doing fast trick modes. + +A rate of <= 0.0 is not allowed. Pause the pipeline, for the effect of rate += 0.0 or first reverse the direction of playback using a seek event to get +the same effect as rate < 0.0. + +The @flush flag will clear any pending data in the pipeline before starting +the step operation. + +The @intermediate flag instructs the pipeline that this step operation is +part of a larger step operation. + + + a new #GstEvent + + + + + the format of @amount + + + + the amount of data to step + + + + the step rate + + + + flushing steps + + + + intermediate steps + + + + + + Create a new STREAM_COLLECTION event. The stream collection event can only +travel downstream synchronized with the buffer flow. + +Source elements, demuxers and other elements that manage collections +of streams and post #GstStreamCollection messages on the bus also send +this event downstream on each pad involved in the collection, so that +activation of a new collection can be tracked through the downstream +data flow. + + + the new STREAM_COLLECTION event. + + + + + Active collection for this data flow + + + + + + Create a new Stream Group Done event. The stream-group-done event can +only travel downstream synchronized with the buffer flow. Elements +that receive the event on a pad should handle it mostly like EOS, +and emit any data or pending buffers that would depend on more data +arriving and unblock, since there won't be any more data. + +This event is followed by EOS at some point in the future, and is +generally used when switching pads - to unblock downstream so that +new pads can be exposed before sending EOS on the existing pads. + + + the new stream-group-done event. + + + + + the group id of the stream group which is ending + + + + + + Create a new STREAM_START event. The stream start event can only +travel downstream synchronized with the buffer flow. It is expected +to be the first event that is sent for a new stream. + +Source elements, demuxers and other elements that create new streams +are supposed to send this event as the first event of a new stream. It +should not be sent after a flushing seek or in similar situations +and is used to mark the beginning of a new logical stream. Elements +combining multiple streams must ensure that this event is only forwarded +downstream once and not for every single input stream. + +The @stream_id should be a unique string that consists of the upstream +stream-id, / as separator and a unique stream-id for this specific +stream. A new stream-id should only be created for a stream if the upstream +stream is split into (potentially) multiple new streams, e.g. in a demuxer, +but not for every single element in the pipeline. +gst_pad_create_stream_id() or gst_pad_create_stream_id_printf() can be +used to create a stream-id. There are no particular semantics for the +stream-id, though it should be deterministic (to support stream matching) +and it might be used to order streams (besides any information conveyed by +stream flags). + + + the new STREAM_START event. + + + + + Identifier for this stream + + + + + + Generates a metadata tag event from the given @taglist. + +The scope of the taglist specifies if the taglist applies to the +complete medium or only to this specific stream. As the tag event +is a sticky event, elements should merge tags received from +upstream with a given scope with their own tags with the same +scope and create a new tag event from it. + + + a new #GstEvent + + + + + metadata list. The event will take ownership + of the taglist. + + + + + + Generate a TOC event from the given @toc. The purpose of the TOC event is to +inform elements that some kind of the TOC was found. + + + a new #GstEvent. + + + + + #GstToc structure. + + + + whether @toc was updated or not. + + + + + + Generate a TOC select event with the given @uid. The purpose of the +TOC select event is to start playback based on the TOC's entry with the +given @uid. + + + a new #GstEvent. + + + + + UID in the TOC to start playback from. + + + + + + Copy the event using the event specific copy function. + + + the new event + + + + + The event to copy + + + + + + Parses a segment @event and copies the #GstSegment into the location +given by @segment. + + + + + + + The event to parse + + + + a pointer to a #GstSegment + + + + + + Retrieve the accumulated running time offset of the event. + +Events passing through #GstPads that have a running time +offset set via gst_pad_set_offset() will get their offset +adjusted according to the pad's offset. + +If the event contains any information that related to the +running time, this information will need to be updated +before usage with this offset. + + + The event's running time offset + +MT safe. + + + + + A #GstEvent. + + + + + + Retrieve the sequence number of a event. + +Events have ever-incrementing sequence numbers, which may also be set +explicitly via gst_event_set_seqnum(). Sequence numbers are typically used to +indicate that a event corresponds to some other set of events or messages, +for example an EOS event corresponding to a SEEK event. It is considered good +practice to make this correspondence when possible, though it is not +required. + +Note that events and messages share the same sequence number incrementor; +two events or messages will never have the same sequence number unless +that correspondence was made explicitly. + + + The event's sequence number. + +MT safe. + + + + + A #GstEvent. + + + + + + Access the structure of the event. + + + The structure of the event. The +structure is still owned by the event, which means that you should not free +it and that the pointer becomes invalid when you free the event. + +MT safe. + + + + + The #GstEvent. + + + + + + Checks if @event has the given @name. This function is usually used to +check the name of a custom event. + + + %TRUE if @name matches the name of the event structure. + + + + + The #GstEvent. + + + + name to check + + + + + + Checks if @event has the given @name. This function is usually used to +check the name of a custom event. + + + %TRUE if @name matches the name of the event structure. + + + + + The #GstEvent. + + + + name to check as a GQuark + + + + + + Get the format, minsize, maxsize and async-flag in the buffersize event. + + + + + + + The event to query + + + + A pointer to store the format in + + + + A pointer to store the minsize in + + + + A pointer to store the maxsize in + + + + A pointer to store the async-flag in + + + + + + Get the caps from @event. The caps remains valid as long as @event remains +valid. + + + + + + + The event to parse + + + + A pointer to the caps + + + + + + Parse the FLUSH_STOP event and retrieve the @reset_time member. + + + + + + + The event to parse + + + + if time should be reset + + + + + + Extract timestamp and duration from a new GAP event. + + + + + + + a #GstEvent of type #GST_EVENT_GAP + + + + location where to store the + start time (pts) of the gap, or %NULL + + + + location where to store the duration of + the gap, or %NULL + + + + + + Retrieve the gap flags that may have been set on a gap event with +gst_event_set_gap_flags(). + + + + + + + a #GstEvent of type #GST_EVENT_GAP + + + + a #GstGapFlags or %NULL + + + + + + + + %TRUE if a group id was set on the event and could be parsed, + %FALSE otherwise. + + + + + a stream-start event + + + + address of variable where to store the group id + + + + + + Extract rate and flags from an instant-rate-change event. + + + + + + + a #GstEvent of type #GST_EVENT_INSTANT_RATE_CHANGE + + + + location in which to store the rate + multiplier of the instant-rate-change event, or %NULL + + + + location in which to store the new + segment flags of the instant-rate-change event, or %NULL + + + + + + Extract the rate multiplier and running times from an instant-rate-sync-time event. + + + + + + + a #GstEvent of type #GST_EVENT_INSTANT_RATE_CHANGE + + + + location where to store the rate of + the instant-rate-sync-time event, or %NULL + + + + location in which to store the running time + of the instant-rate-sync-time event, or %NULL + + + + location in which to store the + upstream running time of the instant-rate-sync-time event, or %NULL + + + + + + Get the latency in the latency event. + + + + + + + The event to query + + + + A pointer to store the latency in. + + + + + + Parses an event containing protection system specific information and stores +the results in @system_id, @data and @origin. The data stored in @system_id, +@origin and @data are valid until @event is released. + + + + + + + a #GST_EVENT_PROTECTION event. + + + + pointer to store the UUID +string uniquely identifying a content protection system. + + + + pointer to store a #GstBuffer +holding protection system specific information. + + + + pointer to store a value that +indicates where the protection information carried by @event was extracted +from. + + + + + + Get the type, proportion, diff and timestamp in the qos event. See +gst_event_new_qos() for more information about the different QoS values. + +@timestamp will be adjusted for any pad offsets of pads it was passing through. + + + + + + + The event to query + + + + A pointer to store the QoS type in + + + + A pointer to store the proportion in + + + + A pointer to store the diff in + + + + A pointer to store the timestamp in + + + + + + Parses a seek @event and stores the results in the given result locations. + + + + + + + a seek event + + + + result location for the rate + + + + result location for the stream format + + + + result location for the #GstSeekFlags + + + + result location for the #GstSeekType of the start position + + + + result location for the start position expressed in @format + + + + result location for the #GstSeekType of the stop position + + + + result location for the stop position expressed in @format + + + + + + Retrieve the trickmode interval that may have been set on a +seek event with gst_event_set_seek_trickmode_interval(). + + + + + + + + + + + + + + + Parses a segment @event and stores the result in the given @segment location. +@segment remains valid only until the @event is freed. Don't modify the segment +and make a copy if you want to modify it or store it for later use. + + + + + + + The event to parse + + + + a pointer to a #GstSegment + + + + + + Extracts the position and format from the segment done message. + + + + + + + A valid #GstEvent of type GST_EVENT_SEGMENT_DONE. + + + + Result location for the format, or %NULL + + + + Result location for the position, or %NULL + + + + + + Parse the SELECT_STREAMS event and retrieve the contained streams. + + + + + + + The event to parse + + + + the streams + + + + + + + + Parse the sink-message event. Unref @msg after usage. + + + + + + + The event to query + + + + a pointer to store the #GstMessage in. + + + + + + Parse the step event. + + + + + + + The event to query + + + + a pointer to store the format in + + + + a pointer to store the amount in + + + + a pointer to store the rate in + + + + a pointer to store the flush boolean in + + + + a pointer to store the intermediate + boolean in + + + + + + Parse a stream-start @event and extract the #GstStream from it. + + + + + + + a stream-start event + + + + address of variable to store the stream + + + + + + Retrieve new #GstStreamCollection from STREAM_COLLECTION event @event. + + + + + + + a stream-collection event + + + + pointer to store the collection + + + + + + + + + + + + a stream-start event + + + + address of variable where to store the stream flags + + + + + + Parse a stream-group-done @event and store the result in the given +@group_id location. + + + + + + + a stream-group-done event. + + + + address of variable to store the group id into + + + + + + Parse a stream-id @event and store the result in the given @stream_id +location. The string stored in @stream_id must not be modified and will +remain valid only until @event gets freed. Make a copy if you want to +modify it or store it for later use. + + + + + + + a stream-start event. + + + + pointer to store the stream-id + + + + + + Parses a tag @event and stores the results in the given @taglist location. +No reference to the taglist will be returned, it remains valid only until +the @event is freed. Don't modify or free the taglist, make a copy if you +want to modify it or store it for later use. + + + + + + + a tag event + + + + pointer to metadata list + + + + + + Parse a TOC @event and store the results in the given @toc and @updated locations. + + + + + + + a TOC event. + + + + pointer to #GstToc structure. + + + + pointer to store TOC updated flag. + + + + + + Parse a TOC select @event and store the results in the given @uid location. + + + + + + + a TOC select event. + + + + storage for the selection UID. + + + + + + Increase the refcount of this event. + + + @event (for convenience when doing assignments) + + + + + The event to refcount + + + + + + Sets @flags on @event to give additional information about the reason for +the #GST_EVENT_GAP. + + + + + + + a #GstEvent of type #GST_EVENT_GAP + + + + a #GstGapFlags + + + + + + All streams that have the same group id are supposed to be played +together, i.e. all streams inside a container file should have the +same group id but different stream ids. The group id should change +each time the stream is started, resulting in different group ids +each time a file is played for example. + +Use gst_util_group_id_next() to get a new group id. + + + + + + + a stream-start event + + + + the group id to set + + + + + + Set the running time offset of a event. See +gst_event_get_running_time_offset() for more information. + +MT safe. + + + + + + + A #GstEvent. + + + + A the new running time offset + + + + + + Sets a trickmode interval on a (writable) seek event. Elements +that support TRICKMODE_KEY_UNITS seeks SHOULD use this as the minimal +interval between each frame they may output. + + + + + + + + + + + + + + + Set the sequence number of a event. + +This function might be called by the creator of a event to indicate that the +event relates to other events or messages. See gst_event_get_seqnum() for +more information. + +MT safe. + + + + + + + A #GstEvent. + + + + A sequence number. + + + + + + Set the @stream on the stream-start @event + + + + + + + a stream-start event + + + + the stream object to set + + + + + + + + + + + + a stream-start event + + + + the stream flags to set + + + + + + Decrease the refcount of an event, freeing it if the refcount reaches 0. + + + + + + + the event to refcount + + + + + + Get a writable version of the structure. + + + The structure of the event. The structure +is still owned by the event, which means that you should not free +it and that the pointer becomes invalid when you free the event. +This function checks if @event is writable and will never return +%NULL. + +MT safe. + + + + + The #GstEvent. + + + + + + Modifies a pointer to a #GstEvent to point to a different #GstEvent. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +event is unreffed, the new one is reffed). + +Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + + + %TRUE if @new_event was different from @old_event + + + + + pointer to a + pointer to a #GstEvent to be replaced. + + + + pointer to a #GstEvent that will + replace the event pointed to by @old_event. + + + + + + Atomically replace the #GstEvent pointed to by @old_event with %NULL and +return the original event. + + + the #GstEvent that was in @old_event + + + + + pointer to a + pointer to a #GstEvent to be stolen. + + + + + + Modifies a pointer to a #GstEvent to point to a different #GstEvent. This +function is similar to gst_event_replace() except that it takes ownership of +@new_event. + +Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + + + %TRUE if @new_event was different from @old_event + + + + + pointer to a + pointer to a #GstEvent to be stolen. + + + + pointer to a #GstEvent that will + replace the event pointed to by @old_event. + + + + + + + #GstEventType lists the standard event types that can be sent in a pipeline. + +The custom event types can be used for private messages between elements +that can't be expressed using normal +GStreamer buffer passing semantics. Custom events carry an arbitrary +#GstStructure. +Specific custom events are distinguished by the name of the structure. + + unknown event. + + + Start a flush operation. This event clears all data + from the pipeline and unblock all streaming threads. + + + Stop a flush operation. This event resets the + running-time of the pipeline. + + + Event to mark the start of a new stream. Sent before any + other serialized event and only sent at the start of a new stream, + not after flushing seeks. + + + #GstCaps event. Notify the pad of a new media type. + + + A new media segment follows in the dataflow. The + segment events contains information for clipping buffers and + converting buffer timestamps to running-time and + stream-time. + + + A new #GstStreamCollection is available (Since: 1.10) + + + A new set of metadata tags has been found in the stream. + + + Notification of buffering requirements. Currently not + used yet. + + + An event that sinks turn into a message. Used to + send messages that should be emitted in sync with + rendering. + + + Indicates that there is no more data for + the stream group ID in the message. Sent before EOS + in some instances and should be handled mostly the same. (Since: 1.10) + + + End-Of-Stream. No more data is to be expected to follow + without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT + event. + + + An event which indicates that a new table of contents (TOC) + was found or updated. + + + An event which indicates that new or updated + encryption information has been found in the stream. + + + Marks the end of a segment playback. + + + Marks a gap in the datastream. + + + Notify downstream that a playback rate override + should be applied as soon as possible. (Since: 1.18) + + + A quality message. Used to indicate to upstream elements + that the downstream elements should adjust their processing + rate. + + + A request for a new playback position and rate. + + + Navigation events are usually used for communicating + user requests, such as mouse or keyboard movements, + to upstream elements. + + + Notification of new latency adjustment. Sinks will use + the latency information to adjust their synchronisation. + + + A request for stepping through the media. Sinks will usually + execute the step operation. + + + A request for upstream renegotiating caps and reconfiguring. + + + A request for a new playback position based on TOC + entry's UID. + + + A request to select one or more streams (Since: 1.10) + + + Sent by the pipeline to notify elements that handle the + instant-rate-change event about the running-time when + the rate multiplier should be applied (or was applied). (Since: 1.18) + + + Upstream custom event + + + Downstream custom event that travels in the + data flow. + + + Custom out-of-band downstream event. + + + Custom sticky downstream event. + + + Custom upstream or downstream event. + In-band when travelling downstream. + + + Custom upstream or downstream out-of-band event. + + + Gets the #GstEventTypeFlags associated with @type. + + + a #GstEventTypeFlags. + + + + + a #GstEventType + + + + + + Get a printable name for the given event type. Do not modify or free. + + + a reference to the static name of the event. + + + + + the event type + + + + + + Get the unique quark for the given event type. + + + the quark associated with the event type + + + + + the event type + + + + + + + #GstEventTypeFlags indicate the aspects of the different #GstEventType +values. You can get the type flags of a #GstEventType with the +gst_event_type_get_flags() function. + + Set if the event can travel upstream. + + + Set if the event can travel downstream. + + + Set if the event should be serialized with data + flow. + + + Set if the event is sticky on the pads. + + + Multiple sticky events can be on a pad, each + identified by the event name. + + + + A mask value with all bits set, for use as a +GstFlagSet mask where all flag bits must match +exactly + + + + + The PERCENT format is between 0 and this value + + + + + The value used to scale down the reported PERCENT format value to +its real value. + + + + + Can be used together with #GST_FOURCC_FORMAT to properly output a +#guint32 fourcc value in a printf\()-style text message. + + + + a #guint32 fourcc value to output + + + + + Can be used together with #GST_FOURCC_ARGS to properly output a +#guint32 fourcc value in a printf\()-style text message. + +|[ +printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); +]| + + + + + A fundamental type that describes a 32-bit flag bitfield, with 32-bit +mask indicating which of the bits in the field are explicitly set. + + Create a new sub-class of #GST_TYPE_FLAG_SET +which will pretty-print the human-readable flags +when serializing, for easier debugging. + + + + + + + a #GType of a #G_TYPE_FLAGS type. + + + + + + + The result of passing data to a pad. + +Note that the custom return values should not be exposed outside of the +element scope. + + Pre-defined custom success code. + + + Pre-defined custom success code (define your + custom success code to this to avoid compiler + warnings). + + + Elements can use values starting from + this (and higher) to define custom success + codes. + + + Data passing was ok. + + + Pad is not linked. + + + Pad is flushing. + + + Pad is EOS. + + + Pad is not negotiated. + + + Some (fatal) error occurred. Element generating + this error should post an error message using + GST_ELEMENT_ERROR() with more details. + + + This operation is not supported. + + + Elements can use values starting from + this (and lower) to define custom error codes. + + + Pre-defined custom error code (define your + custom error code to this to avoid compiler + warnings). + + + Pre-defined custom error code. + + + + Standard predefined formats + + undefined format + + + the default format of the pad/element. This can be + samples for raw audio, frames/fields for raw video (some, but not all, + elements support this; use @GST_FORMAT_TIME if you don't have a good + reason to query for samples/frames) + + + bytes + + + time in nanoseconds + + + buffers (few, if any, elements implement this as of + May 2009) + + + percentage of stream (few, if any, elements implement + this as of May 2009) + + + Return the format registered with the given nick. + + + The format with @nick or GST_FORMAT_UNDEFINED +if the format was not registered. + + + + + The nick of the format + + + + + + Get details about the given format. + + + The #GstFormatDefinition for @format or %NULL +on failure. + +MT safe. + + + + + The format to get details of + + + + + + Get a printable name for the given format. Do not modify or free. + + + a reference to the static name of the format +or %NULL if the format is unknown. + + + + + a #GstFormat + + + + + + Iterate all the registered formats. The format definition is read +only. + + + a GstIterator of #GstFormatDefinition. + + + + + Create a new GstFormat based on the nick or return an +already registered format with that nick. + + + A new GstFormat or an already registered format +with the same nick. + +MT safe. + + + + + The nick of the new format + + + + The description of the new format + + + + + + Get the unique quark for the given format. + + + the quark associated with the format or 0 if the format +is unknown. + + + + + a #GstFormat + + + + + + + A format definition + + + The unique id of this format + + + + A short nick of the format + + + + A longer description of the format + + + + A quark for the nick + + + + + A fundamental type that describes a fraction of an integer numerator +over an integer denominator + + + A fundamental type that describes a #GstFractionRange range + + + + + + + + + + + + + + + + + + + + + + + + A value which is guaranteed to never be returned by +gst_util_group_id_next(). + +Can be used as a default value in variables used to store group_id. + + + + + The different flags that can be set on #GST_EVENT_GAP events. See +gst_event_set_gap_flags() for details. + + The #GST_EVENT_GAP signals missing data, + for example because of packet loss. + + + + GhostPads are useful when organizing pipelines with #GstBin like elements. +The idea here is to create hierarchical element graphs. The bin element +contains a sub-graph. Now one would like to treat the bin-element like any +other #GstElement. This is where GhostPads come into play. A GhostPad acts as +a proxy for another pad. Thus the bin can have sink and source ghost-pads +that are associated with sink and source pads of the child elements. + +If the target pad is known at creation time, gst_ghost_pad_new() is the +function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target() +to create the ghost-pad and use gst_ghost_pad_set_target() to establish the +association later on. + +Note that GhostPads add overhead to the data processing of a pipeline. + + + Create a new ghostpad with @target as the target. The direction will be taken +from the target pad. @target must be unlinked. + +Will ref the target. + + + a new #GstPad, or %NULL in +case of an error. + + + + + the name of the new pad, or %NULL to assign a default name + + + + the pad to ghost. + + + + + + Create a new ghostpad with @target as the target. The direction will be taken +from the target pad. The template used on the ghostpad will be @template. + +Will ref the target. + + + a new #GstPad, or %NULL in +case of an error. + + + + + the name of the new pad, or %NULL to assign a default name. + + + + the pad to ghost. + + + + the #GstPadTemplate to use on the ghostpad. + + + + + + Create a new ghostpad without a target with the given direction. +A target can be set on the ghostpad later with the +gst_ghost_pad_set_target() function. + +The created ghostpad will not have a padtemplate. + + + a new #GstPad, or %NULL in +case of an error. + + + + + the name of the new pad, or %NULL to assign a default name. + + + + the direction of the ghostpad + + + + + + Create a new ghostpad based on @templ, without setting a target. The +direction will be taken from the @templ. + + + a new #GstPad, or %NULL in +case of an error. + + + + + the name of the new pad, or %NULL to assign a default name + + + + the #GstPadTemplate to create the ghostpad from. + + + + + + Invoke the default activate mode function of a ghost pad. + + + %TRUE if the operation was successful. + + + + + the #GstPad to activate or deactivate. + + + + the parent of @pad or %NULL + + + + the requested activation mode + + + + whether the pad should be active or not. + + + + + + Invoke the default activate mode function of a proxy pad that is +owned by a ghost pad. + + + %TRUE if the operation was successful. + + + + + the #GstPad to activate or deactivate. + + + + the parent of @pad or %NULL + + + + the requested activation mode + + + + whether the pad should be active or not. + + + + + + Finish initialization of a newly allocated ghost pad. + +This function is most useful in language bindings and when subclassing +#GstGhostPad; plugin and application developers normally will not call this +function. Call this function directly after a call to g_object_new +(GST_TYPE_GHOST_PAD, "direction", @dir, ..., NULL). + This function is deprecated since 1.18 and does nothing +anymore. + + + %TRUE if the construction succeeds, %FALSE otherwise. + + + + + the newly allocated ghost pad + + + + + + Get the target pad of @gpad. Unref target pad after usage. + + + the target #GstPad, can be +%NULL if the ghostpad has no target set. Unref target pad after +usage. + + + + + the #GstGhostPad + + + + + + Set the new target of the ghostpad @gpad. Any existing target +is unlinked and links to the new target are established. if @newtarget is +%NULL the target will be cleared. + + + %TRUE if the new target could be set. This function + can return %FALSE when the internal pads could not be linked. + + + + + the #GstGhostPad + + + + the new pad target + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Macro to cast to a #GstIterator + + + + the #GstIterator value + + + + + Macro to get the cookie of a #GstIterator. The cookie of the +iterator is the value of the master cookie when the iterator +was created. +Whenever the iterator is iterated, the value is compared to the +value of the master cookie. If they are different, a concurrent +modification happened to the iterator and a resync is needed. + + + + the #GstIterator to get the cookie of + + + + + Macro to get the lock protecting the datastructure being iterated. + + + + the #GstIterator to get the lock of + + + + + Macro to get a pointer to where the master cookie is stored. The +master cookie protects the structure being iterated and gets updated +whenever the datastructure changes. + + + + the #GstIterator to get the master cookie of + + + + + A fundamental type that describes a #gint64 range + + + A fundamental type that describes a #gint range + + + A GstIterator is used to retrieve multiple objects from another object in +a threadsafe way. + +Various GStreamer objects provide access to their internal structures using +an iterator. + +Note that if calling a GstIterator function results in your code receiving +a refcounted object (with, say, g_value_get_object()), the refcount for that +object will not be increased. Your code is responsible for taking a reference +if it wants to continue using it later. + +The basic use pattern of an iterator is as follows: +|[<!-- language="C" --> + GstIterator *it = _get_iterator(object); + GValue item = G_VALUE_INIT; + done = FALSE; + while (!done) { + switch (gst_iterator_next (it, &amp;item)) { + case GST_ITERATOR_OK: + ...get/use/change item here... + g_value_reset (&amp;item); + break; + case GST_ITERATOR_RESYNC: + ...rollback changes to items... + gst_iterator_resync (it); + break; + case GST_ITERATOR_ERROR: + ...wrong parameters were given... + done = TRUE; + break; + case GST_ITERATOR_DONE: + done = TRUE; + break; + } + } + g_value_unset (&amp;item); + gst_iterator_free (it); +]| + + + The function to copy the iterator + + + + The function to get the next item in the iterator + + + + The function to be called for each item retrieved + + + + The function to call when a resync is needed. + + + + The function to call when the iterator is freed + + + + The iterator that is currently pushed with gst_iterator_push() + + + + The type of the object that this iterator will return + + + + The lock protecting the data structure and the cookie. + + + + The cookie; the value of the master_cookie when this iterator was + created. + + + + A pointer to the master cookie. + + + + the size of the iterator + + + + + + + + + Create a new iterator. This function is mainly used for objects +implementing the next/resync/free function to iterate a data structure. + +For each item retrieved, the @item function is called with the lock +held. The @free function is called when the iterator is freed. + + + the new #GstIterator. + +MT safe. + + + + + the size of the iterator structure + + + + #GType of children + + + + pointer to a #GMutex. + + + + pointer to a guint32 that is changed when the items in the + iterator changed. + + + + copy function + + + + function to get next item + + + + function to call on each item retrieved + + + + function to resync the iterator + + + + function to free the iterator + + + + + + Create a new iterator designed for iterating @list. + +The list you iterate is usually part of a data structure @owner and is +protected with @lock. + +The iterator will use @lock to retrieve the next item of the list and it +will then call the @item function before releasing @lock again. + +When a concurrent update to the list is performed, usually by @owner while +holding @lock, @master_cookie will be updated. The iterator implementation +will notice the update of the cookie and will return %GST_ITERATOR_RESYNC to +the user of the iterator in the next call to gst_iterator_next(). + + + the new #GstIterator for @list. + +MT safe. + + + + + #GType of elements + + + + pointer to a #GMutex protecting the list. + + + + pointer to a guint32 that is incremented when the list + is changed. + + + + pointer to the list + + + + + + object owning the list + + + + function to call on each item retrieved + + + + + + This #GstIterator is a convenient iterator for the common +case where a #GstIterator needs to be returned but only +a single object has to be considered. This happens often +for the #GstPadIterIntLinkFunction. + + + the new #GstIterator for @object. + + + + + #GType of the passed object + + + + object that this iterator should return + + + + + + Copy the iterator and its state. + + + a new copy of @it. + + + + + a #GstIterator + + + + + + Create a new iterator from an existing iterator. The new iterator +will only return those elements that match the given compare function @func. +The first parameter that is passed to @func is the #GValue of the current +iterator element and the second parameter is @user_data. @func should +return 0 for elements that should be included in the filtered iterator. + +When this iterator is freed, @it will also be freed. + + + a new #GstIterator. + +MT safe. + + + + + The #GstIterator to filter + + + + the compare function to select elements + + + + user data passed to the compare function + + + + + + Find the first element in @it that matches the compare function @func. +@func should return 0 when the element is found. The first parameter +to @func will be the current element of the iterator and the +second parameter will be @user_data. +The result will be stored in @elem if a result is found. + +The iterator will not be freed. + +This function will return %FALSE if an error happened to the iterator +or if the element wasn't found. + + + Returns %TRUE if the element was found, else %FALSE. + +MT safe. + + + + + The #GstIterator to iterate + + + + the compare function to use + + + + pointer to a #GValue where to store the result + + + + user data passed to the compare function + + + + + + Folds @func over the elements of @iter. That is to say, @func will be called +as @func (object, @ret, @user_data) for each object in @it. The normal use +of this procedure is to accumulate the results of operating on the objects in +@ret. + +This procedure can be used (and is used internally) to implement the +gst_iterator_foreach() and gst_iterator_find_custom() operations. + +The fold will proceed as long as @func returns %TRUE. When the iterator has no +more arguments, %GST_ITERATOR_DONE will be returned. If @func returns %FALSE, +the fold will stop, and %GST_ITERATOR_OK will be returned. Errors or resyncs +will cause fold to return %GST_ITERATOR_ERROR or %GST_ITERATOR_RESYNC as +appropriate. + +The iterator will not be freed. + + + A #GstIteratorResult, as described above. + +MT safe. + + + + + The #GstIterator to fold over + + + + the fold function + + + + the seed value passed to the fold function + + + + user data passed to the fold function + + + + + + Iterate over all element of @it and call the given function @func for +each element. + + + the result call to gst_iterator_fold(). The iterator will not be +freed. + +MT safe. + + + + + The #GstIterator to iterate + + + + the function to call for each element. + + + + user data passed to the function + + + + + + Free the iterator. + +MT safe. + + + + + + + The #GstIterator to free + + + + + + Get the next item from the iterator in @elem. + +Only when this function returns %GST_ITERATOR_OK, @elem will contain a valid +value. @elem must have been initialized to the type of the iterator or +initialized to zeroes with g_value_unset(). The caller is responsible for +unsetting or resetting @elem with g_value_unset() or g_value_reset() +after usage. + +When this function returns %GST_ITERATOR_DONE, no more elements can be +retrieved from @it. + +A return value of %GST_ITERATOR_RESYNC indicates that the element list was +concurrently updated. The user of @it should call gst_iterator_resync() to +get the newly updated list. + +A return value of %GST_ITERATOR_ERROR indicates an unrecoverable fatal error. + + + The result of the iteration. Unset @elem after usage. + +MT safe. + + + + + The #GstIterator to iterate + + + + pointer to hold next element + + + + + + Pushes @other iterator onto @it. All calls performed on @it are +forwarded to @other. If @other returns %GST_ITERATOR_DONE, it is +popped again and calls are handled by @it again. + +This function is mainly used by objects implementing the iterator +next function to recurse into substructures. + +When gst_iterator_resync() is called on @it, @other will automatically be +popped. + +MT safe. + + + + + + + The #GstIterator to use + + + + The #GstIterator to push + + + + + + Resync the iterator. this function is mostly called +after gst_iterator_next() returned %GST_ITERATOR_RESYNC. + +When an iterator was pushed on @it, it will automatically be popped again +with this function. + +MT safe. + + + + + + + The #GstIterator to resync + + + + + + + This function will be called when creating a copy of @it and should +create a copy of all custom iterator fields or increase their +reference counts. + + + + + + + The original iterator + + + + The copied iterator + + + + + + A function to be passed to gst_iterator_fold(). + + + %TRUE if the fold should continue, %FALSE if it should stop. + + + + + the item to fold + + + + a #GValue collecting the result + + + + data passed to gst_iterator_fold() + + + + + + A function that is called by gst_iterator_foreach() for every element. + + + + + + + The item + + + + User data + + + + + + This function will be called when the iterator is freed. + +Implementors of a #GstIterator should implement this +function and pass it to the constructor of the custom iterator. +The function will be called with the iterator lock held. + + + + + + + the iterator + + + + + + The result of a #GstIteratorItemFunction. + + Skip this item + + + Return item + + + Stop after this item. + + + + The function that will be called after the next item of the iterator +has been retrieved. This function can be used to skip items or stop +the iterator. + +The function will be called with the iterator lock held. + + + the result of the operation. + + + + + the iterator + + + + the item being retrieved. + + + + + + The function that will be called when the next element of the iterator +should be retrieved. + +Implementors of a #GstIterator should implement this +function and pass it to the constructor of the custom iterator. +The function will be called with the iterator lock held. + + + the result of the operation. + + + + + the iterator + + + + a pointer to hold the next item + + + + + + The result of gst_iterator_next(). + + No more items in the iterator + + + An item was retrieved + + + Datastructure changed while iterating + + + An error happened + + + + This function will be called whenever a concurrent update happened +to the iterated datastructure. The implementor of the iterator should +restart the iterator from the beginning and clean up any state it might +have. + +Implementors of a #GstIterator should implement this +function and pass it to the constructor of the custom iterator. +The function will be called with the iterator lock held. + + + + + + + the iterator + + + + + + To be used in GST_PLUGIN_DEFINE if unsure about the licence. + + + + + GstLockFlags value alias for GST_LOCK_FLAG_READ | GST_LOCK_FLAG_WRITE + + + + + Library errors are for errors from the library being used by elements +(initializing, finalizing, settings, ...) + + a general error which doesn't fit in any other +category. Make sure you add a custom message to the error call. + + + do not use this except as a placeholder for +deciding where to go while developing code. + + + used when the library could not be opened. + + + used when the library could not be closed. + + + used when the library doesn't accept settings. + + + used when the library generated an encoding error. + + + the number of library error types. + + + + + + + + + + Flags used when locking miniobjects + + lock for read access + + + lock for write access + + + lock for exclusive access + + + first flag that can be used for custom purposes + + + + Function prototype for a logging function that can be registered with +gst_debug_add_log_function(). +Use G_GNUC_NO_INSTRUMENT on that function. + + + + + + + a #GstDebugCategory + + + + a #GstDebugLevel + + + + file name + + + + function name + + + + line number + + + + a #GObject + + + + the message + + + + user data for the log function + + + + + + Transform four characters into a #guint32 fourcc value with host +endianness. + +|[ +guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G'); +]| + + + + the first character + + + the second character + + + the third character + + + the fourth character + + + + + GstMapFlags value alias for GST_MAP_READ | GST_MAP_WRITE + + + + + Output a hexdump of @data. + +There is no need to finish the end of the message string with a newline +character, a newline character will be added automatically. + + + + message string to log with the data + + + pointer to the data to output + + + length of the data to output + + + + + Output a logging message belonging to the given object in the default category. + +There is no need to finish the end of the message string with a newline +character, a newline character will be added automatically. + + + + the #GObject the message belongs to + + + message string to log with the data + + + pointer to the data to output + + + length of the data to output + + + + + + + + + + + + A flags word containing #GstMemoryFlags flags set on @mem + + + + a #GstMemory. + + + + + Gives the status of a specific flag on a @mem. + + + + a #GstMemory. + + + the #GstMemoryFlags to check. + + + + + Clear a specific flag on a @mem. + + + + a #GstMemory. + + + the #GstMemoryFlags to clear. + + + + + Check if @mem can't be mapped via gst_memory_map() without any preconditions + + + + a #GstMemory. + + + + + Check if @mem cannot be shared between buffers + + + + a #GstMemory. + + + + + Check if @mem is physically contiguous. + + + + a #GstMemory. + + + + + Check if @mem is readonly. + + + + a #GstMemory. + + + + + Check if the padding in @mem is 0 filled. + + + + a #GstMemory. + + + + + Check if the prefix in @mem is 0 filled. + + + + a #GstMemory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the sequence number of @message. + + + + a #GstMessage + + + + + + + + + + + + Get the object that posted @message. + + + + a #GstMessage + + + + + Get the name of the object that posted @message. Returns "(NULL)" if +the message has no source object set. + + + + a #GstMessage + + + + + Get the timestamp of @message. This is the timestamp when the message +was created. + + + + a #GstMessage + + + + + Get the #GstMessageType of @message. + + + + a #GstMessage + + + + + Check if the message is in the extended message group + + + + a #GstMessage + + + + + Get a constant string representation of the #GstMessageType of @message. + + + + a #GstMessage + + + + + + + + + + + + + + + + + + + + + + + + + + A flags word containing #GstMetaFlags flags set on @meta + + + + a #GstMeta. + + + + + Gives the status of a specific flag on a metadata. + + + + a #GstMeta. + + + the #GstMetaFlags to check. + + + + + Sets a metadata flag on a metadata. + + + + a #GstMeta. + + + the #GstMetaFlags to set. + + + + + Clears a metadata flag. + + + + a #GstMeta. + + + the #GstMetaFlags to clear. + + + + + This metadata stays relevant as long as memory layout is unchanged. + + + + + Check if the transform type is a copy transform + + + + a transform type + + + + + + + + + + + + + + + + + + + + + + + + + + This macro returns the entire set of flags for the mini-object. + + + + MiniObject to return flags for. + + + + + This macro checks to see if the given flag is set. + + + + MiniObject to check for flags. + + + Flag to check for + + + + + This macro sets the given bits. + + + + MiniObject to set flag in. + + + Flag to set, can by any number of bits in guint32. + + + + + This macro unsets the given bits. + + + + MiniObject to unset flag in. + + + Flag to set, must be a single bit in guint32. + + + + + Check if @obj is lockable. A lockable object can be locked and unlocked with +gst_mini_object_lock() and gst_mini_object_unlock(). + + + + a #GstMiniObject + + + + + Get access to the reference count field of the mini-object. + + + + a #GstMiniObject + + + + + Get the reference count value of the mini-object. + + + + a #GstMiniObject + + + + + This macro returns the type of the mini-object. + + + + MiniObject to return type for. + + + + + Constant that defines one GStreamer millisecond. + + + + + Flags used when mapping memory + + map for read access + + + map for write access + + + first flag that can be used for custom purposes + + + + A structure containing the result of a map operation such as +gst_memory_map(). It contains the data and size. + + + a pointer to the mapped memory + + + + flags used when mapping the memory + + + + a pointer to the mapped data + + + + + + the valid size in @data + + + + the maximum bytes in @data + + + + extra private user_data that the implementation of the memory + can use to store extra info. + + + + + + + + + + + + GstMemory is a lightweight refcounted object that wraps a region of memory. +They are typically used to manage the data of a #GstBuffer. + +A GstMemory object has an allocated region of memory of maxsize. The maximum +size does not change during the lifetime of the memory object. The memory +also has an offset and size property that specifies the valid range of memory +in the allocated region. + +Memory is usually created by allocators with a gst_allocator_alloc() +method call. When %NULL is used as the allocator, the default allocator will +be used. + +New allocators can be registered with gst_allocator_register(). +Allocators are identified by name and can be retrieved with +gst_allocator_find(). gst_allocator_set_default() can be used to change the +default allocator. + +New memory can be created with gst_memory_new_wrapped() that wraps the memory +allocated elsewhere. + +Refcounting of the memory block is performed with gst_memory_ref() and +gst_memory_unref(). + +The size of the memory can be retrieved and changed with +gst_memory_get_sizes() and gst_memory_resize() respectively. + +Getting access to the data of the memory is performed with gst_memory_map(). +The call will return a pointer to offset bytes into the region of memory. +After the memory access is completed, gst_memory_unmap() should be called. + +Memory can be copied with gst_memory_copy(), which will return a writable +copy. gst_memory_share() will create a new memory block that shares the +memory with an existing memory block at a custom offset and with a custom +size. + +Memory can be efficiently merged when gst_memory_is_span() returns %TRUE. + + + parent structure + + + + pointer to the #GstAllocator + + + + parent memory block + + + + the maximum size allocated + + + + the alignment of the memory + + + + the offset where valid data starts + + + + the size of valid data + + + + Allocate a new memory block that wraps the given @data. + +The prefix/padding must be filled with 0 if @flags contains +#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. + + + a new #GstMemory. + + + + + #GstMemoryFlags + + + + data to + wrap + + + + + + allocated size of @data + + + + offset in @data + + + + size of valid data + + + + user_data + + + + called with @user_data when the memory is freed + + + + + + Return a copy of @size bytes from @mem starting from @offset. This copy is +guaranteed to be writable. @size can be set to -1 to return a copy +from @offset to the end of the memory region. + + + a new #GstMemory. + + + + + a #GstMemory + + + + offset to copy from + + + + size to copy, or -1 to copy to the end of the memory region + + + + + + Get the current @size, @offset and @maxsize of @mem. + + + the current size of @mem + + + + + a #GstMemory + + + + pointer to offset + + + + pointer to maxsize + + + + + + Initializes a newly allocated @mem with the given parameters. This function +will call gst_mini_object_init() with the default memory parameters. + + + + + + + a #GstMemory + + + + #GstMemoryFlags + + + + the #GstAllocator + + + + the parent of @mem + + + + the total size of the memory + + + + the alignment of the memory + + + + The offset in the memory + + + + the size of valid data in the memory + + + + + + Check if @mem1 and mem2 share the memory with a common parent memory object +and that the memory is contiguous. + +If this is the case, the memory of @mem1 and @mem2 can be merged +efficiently by performing gst_memory_share() on the parent object from +the returned @offset. + + + %TRUE if the memory is contiguous and of a common parent. + + + + + a #GstMemory + + + + a #GstMemory + + + + a pointer to a result offset + + + + + + Check if @mem if allocated with an allocator for @mem_type. + + + %TRUE if @mem was allocated from an allocator for @mem_type. + + + + + a #GstMemory + + + + a memory type + + + + + + Create a #GstMemory object that is mapped with @flags. If @mem is mappable +with @flags, this function returns the mapped @mem directly. Otherwise a +mapped copy of @mem is returned. + +This function takes ownership of old @mem and returns a reference to a new +#GstMemory. + + + a #GstMemory object mapped +with @flags or %NULL when a mapping is not possible. + + + + + a #GstMemory + + + + pointer for info + + + + mapping flags + + + + + + Fill @info with the pointer and sizes of the memory in @mem that can be +accessed according to @flags. + +This function can return %FALSE for various reasons: +- the memory backed by @mem is not accessible with the given @flags. +- the memory was already mapped with a different mapping. + +@info and its contents remain valid for as long as @mem is valid and +until gst_memory_unmap() is called. + +For each gst_memory_map() call, a corresponding gst_memory_unmap() call +should be done. + + + %TRUE if the map operation was successful. + + + + + a #GstMemory + + + + pointer for info + + + + mapping flags + + + + + + Increase the refcount of this memory. + + + @memory (for convenience when doing assignments) + + + + + The memory to refcount + + + + + + Resize the memory region. @mem should be writable and offset + size should be +less than the maxsize of @mem. + +#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED will be +cleared when offset or padding is increased respectively. + + + + + + + a #GstMemory + + + + a new offset + + + + a new size + + + + + + Return a shared copy of @size bytes from @mem starting from @offset. No +memory copy is performed and the memory region is simply shared. The result +is guaranteed to be non-writable. @size can be set to -1 to return a shared +copy from @offset to the end of the memory region. + + + a new #GstMemory. + + + + + a #GstMemory + + + + offset to share from + + + + size to share, or -1 to share to the end of the memory region + + + + + + Release the memory obtained with gst_memory_map() + + + + + + + a #GstMemory + + + + a #GstMapInfo + + + + + + Decrease the refcount of a memory, freeing it if the refcount reaches 0. + + + + + + + the memory to refcount + + + + + + + Copy @size bytes from @mem starting at @offset and return them wrapped in a +new GstMemory object. +If @size is set to -1, all bytes starting at @offset are copied. + + + a new #GstMemory object wrapping a copy of the requested region in +@mem. + + + + + a #GstMemory + + + + an offset + + + + a size or -1 + + + + + + Flags for wrapped memory. + + memory is readonly. It is not allowed to map the +memory with #GST_MAP_WRITE. + + + memory must not be shared. Copies will have to be +made when this memory needs to be shared between buffers. (DEPRECATED: +do not use in new code, instead you should create a custom GstAllocator for +memory pooling instead of relying on the GstBuffer they were originally +attached to.) + + + the memory prefix is filled with 0 bytes + + + the memory padding is filled with 0 bytes + + + the memory is physically +contiguous. (Since: 1.2) + + + the memory can't be mapped via +gst_memory_map() without any preconditions. (Since: 1.2) + + + first flag that can be used for custom purposes + + + + Check if @mem1 and @mem2 occupy contiguous memory and return the offset of +@mem1 in the parent buffer in @offset. + + + %TRUE if @mem1 and @mem2 are in contiguous memory. + + + + + a #GstMemory + + + + a #GstMemory + + + + a result offset + + + + + + Get the memory of @mem that can be accessed according to the mode specified +in @info's flags. The function should return a pointer that contains at least +@maxsize bytes. + + + a pointer to memory of which at least @maxsize bytes can be +accessed according to the access pattern in @info's flags. + + + + + a #GstMemory + + + + the #GstMapInfo to map with + + + + size to map + + + + + + Get the memory of @mem that can be accessed according to the mode specified +in @flags. The function should return a pointer that contains at least +@maxsize bytes. + + + a pointer to memory of which at least @maxsize bytes can be +accessed according to the access pattern in @flags. + + + + + a #GstMemory + + + + size to map + + + + access mode for the memory + + + + + + Share @size bytes from @mem starting at @offset and return them wrapped in a +new GstMemory object. If @size is set to -1, all bytes starting at @offset are +shared. This function does not make a copy of the bytes in @mem. + + + a new #GstMemory object sharing the requested region in @mem. + + + + + a #GstMemory + + + + an offset + + + + a size or -1 + + + + + + Release the pointer previously retrieved with gst_memory_map() with @info. + + + + + + + a #GstMemory + + + + a #GstMapInfo + + + + + + Release the pointer previously retrieved with gst_memory_map(). + + + + + + + a #GstMemory + + + + + + Messages are implemented as a subclass of #GstMiniObject with a generic +#GstStructure as the content. This allows for writing custom messages without +requiring an API change while allowing a wide range of different types +of messages. + +Messages are posted by objects in the pipeline and are passed to the +application using the #GstBus. + +The basic use pattern of posting a message on a #GstBus is as follows: +|[<!-- language="C" --> + gst_bus_post (bus, gst_message_new_eos()); +]| + +A #GstElement usually posts messages on the bus provided by the parent +container using gst_element_post_message(). + + + the parent structure + + + + the #GstMessageType of the message + + + + the timestamp of the message + + + + the src of the message + + + + the sequence number of the message + + + + + + + + + + Create a new application-typed message. GStreamer will never create these +messages; they are a gift from us to you. Enjoy. + + + The new application message. + +MT safe. + + + + + The object originating the message. + + + + the structure for the message. The message + will take ownership of the structure. + + + + + + The message is posted when elements completed an ASYNC state change. +@running_time contains the time of the desired running_time when this +elements goes to PLAYING. A value of #GST_CLOCK_TIME_NONE for @running_time +means that the element has no clock interaction and thus doesn't care about +the running_time of the pipeline. + + + The new async_done message. + +MT safe. + + + + + The object originating the message. + + + + the desired running_time + + + + + + This message is posted by elements when they start an ASYNC state change. + + + The new async_start message. + +MT safe. + + + + + The object originating the message. + + + + + + Create a new buffering message. This message can be posted by an element that +needs to buffer data before it can continue processing. @percent should be a +value between 0 and 100. A value of 100 means that the buffering completed. + +When @percent is < 100 the application should PAUSE a PLAYING pipeline. When +@percent is 100, the application can set the pipeline (back) to PLAYING. +The application must be prepared to receive BUFFERING messages in the +PREROLLING state and may only set the pipeline to PLAYING after receiving a +message with @percent set to 100, which can happen after the pipeline +completed prerolling. + +MT safe. + + + The new buffering message. + + + + + The object originating the message. + + + + The buffering percent + + + + + + Create a clock lost message. This message is posted whenever the +clock is not valid anymore. + +If this message is posted by the pipeline, the pipeline will +select a new clock again when it goes to PLAYING. It might therefore +be needed to set the pipeline to PAUSED and PLAYING again. + + + The new clock lost message. + +MT safe. + + + + + The object originating the message. + + + + the clock that was lost + + + + + + Create a clock provide message. This message is posted whenever an +element is ready to provide a clock or lost its ability to provide +a clock (maybe because it paused or became EOS). + +This message is mainly used internally to manage the clock +selection. + + + the new provide clock message. + +MT safe. + + + + + The object originating the message. + + + + the clock it provides + + + + %TRUE if the sender can provide a clock + + + + + + Create a new custom-typed message. This can be used for anything not +handled by other message-specific functions to pass a message to the +app. The structure field can be %NULL. + + + The new message. + +MT safe. + + + + + The #GstMessageType to distinguish messages + + + + The object originating the message. + + + + the structure for the + message. The message will take ownership of the structure. + + + + + + Creates a new device-added message. The device-added message is produced by +#GstDeviceProvider or a #GstDeviceMonitor. They announce the appearance +of monitored devices. + + + a newly allocated #GstMessage + + + + + The #GstObject that created the message + + + + The new #GstDevice + + + + + + Creates a new device-changed message. The device-changed message is produced +by #GstDeviceProvider or a #GstDeviceMonitor. They announce that a device +properties has changed and @device represent the new modified version of @changed_device. + + + a newly allocated #GstMessage + + + + + The #GstObject that created the message + + + + The newly created device representing @replaced_device + with its new configuration. + + + + + + + + + Creates a new device-removed message. The device-removed message is produced +by #GstDeviceProvider or a #GstDeviceMonitor. They announce the +disappearance of monitored devices. + + + a newly allocated #GstMessage + + + + + The #GstObject that created the message + + + + The removed #GstDevice + + + + + + Create a new duration changed message. This message is posted by elements +that know the duration of a stream when the duration changes. This message +is received by bins and is used to calculate the total duration of a +pipeline. + + + The new duration-changed message. + +MT safe. + + + + + The object originating the message. + + + + + + Create a new element-specific message. This is meant as a generic way of +allowing one-way communication from an element to an application, for example +"the firewire cable was unplugged". The format of the message should be +documented in the element's documentation. The structure field can be %NULL. + + + The new element message. + +MT safe. + + + + + The object originating the message. + + + + The structure for the + message. The message will take ownership of the structure. + + + + + + Create a new eos message. This message is generated and posted in +the sink elements of a GstBin. The bin will only forward the EOS +message to the application if all sinks have posted an EOS message. + + + The new eos message. + +MT safe. + + + + + The object originating the message. + + + + + + Create a new error message. The message will copy @error and +@debug. This message is posted by element when a fatal event +occurred. The pipeline will probably (partially) stop. The application +receiving this message should stop the pipeline. + + + the new error message. + +MT safe. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + + + Create a new error message. The message will copy @error and +@debug. This message is posted by element when a fatal event +occurred. The pipeline will probably (partially) stop. The application +receiving this message should stop the pipeline. + + + the new error message. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + A GstStructure with details + + + + + + This message is posted when an element has a new local #GstContext. + + + The new have-context message. + +MT safe. + + + + + The object originating the message. + + + + the context + + + + + + Create a new info message. The message will make copies of @error and +@debug. + + + the new info message. + +MT safe. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + + + Create a new info message. The message will make copies of @error and +@debug. + + + the new warning message. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + A GstStructure with details + + + + + + Creates a new instant-rate-request message. Elements handling the +instant-rate-change event must post this message. The message is +handled at the pipeline, and allows the pipeline to select the +running time when the rate change should happen and to send an +@GST_EVENT_INSTANT_RATE_SYNC_TIME event to notify the elements +in the pipeline. + + + a newly allocated #GstMessage + + + + + The #GstObject that posted the message + + + + the rate multiplier factor that should be applied + + + + + + This message can be posted by elements when their latency requirements have +changed. + + + The new latency message. + +MT safe. + + + + + The object originating the message. + + + + + + This message is posted when an element needs a specific #GstContext. + + + The new need-context message. + +MT safe. + + + + + The object originating the message. + + + + The context type that is needed + + + + + + Create a new clock message. This message is posted whenever the +pipeline selects a new clock for the pipeline. + + + The new new clock message. + +MT safe. + + + + + The object originating the message. + + + + the new selected clock + + + + + + Progress messages are posted by elements when they use an asynchronous task +to perform actions triggered by a state change. + +@code contains a well defined string describing the action. +@text should contain a user visible string detailing the current action. + + + The new qos message. + + + + + The object originating the message. + + + + a #GstProgressType + + + + a progress code + + + + free, user visible text describing the progress + + + + + + + + a newly allocated #GstMessage + + + + + The #GstObject whose property changed (may or may not be a #GstElement) + + + + name of the property that changed + + + + new property value, or %NULL + + + + + + A QOS message is posted on the bus whenever an element decides to drop a +buffer because of QoS reasons or whenever it changes its processing strategy +because of QoS reasons (quality adjustments such as processing at lower +accuracy). + +This message can be posted by an element that performs synchronisation against the +clock (live) or it could be dropped by an element that performs QoS because of QOS +events received from a downstream element (!live). + +@running_time, @stream_time, @timestamp, @duration should be set to the +respective running-time, stream-time, timestamp and duration of the (dropped) +buffer that generated the QoS event. Values can be left to +GST_CLOCK_TIME_NONE when unknown. + + + The new qos message. + +MT safe. + + + + + The object originating the message. + + + + if the message was generated by a live element + + + + the running time of the buffer that generated the message + + + + the stream time of the buffer that generated the message + + + + the timestamps of the buffer that generated the message + + + + the duration of the buffer that generated the message + + + + + + Creates a new redirect message and adds a new entry to it. Redirect messages +are posted when an element detects that the actual data has to be retrieved +from a different location. This is useful if such a redirection cannot be +handled inside a source element, for example when HTTP 302/303 redirects +return a non-HTTP URL. + +The redirect message can hold multiple entries. The first one is added +when the redirect message is created, with the given location, tag_list, +entry_struct arguments. Use gst_message_add_redirect_entry() to add more +entries. + +Each entry has a location, a tag list, and a structure. All of these are +optional. The tag list and structure are useful for additional metadata, +such as bitrate statistics for the given location. + +By default, message recipients should treat entries in the order they are +stored. The recipient should therefore try entry \#0 first, and if this +entry is not acceptable or working, try entry \#1 etc. Senders must make +sure that they add entries in this order. However, recipients are free to +ignore the order and pick an entry that is "best" for them. One example +would be a recipient that scans the entries for the one with the highest +bitrate tag. + +The specified location string is copied. However, ownership over the tag +list and structure are transferred to the message. + + + a newly allocated #GstMessage + + + + + The #GstObject whose property changed (may or may not be a #GstElement) + + + + location string for the new entry + + + + tag list for the new entry + + + + structure for the new entry + + + + + + This message can be posted by elements when they want to have their state +changed. A typical use case would be an audio server that wants to pause the +pipeline because a higher priority stream is being played. + + + the new request state message. + +MT safe. + + + + + The object originating the message. + + + + The new requested state + + + + + + This message is posted when the pipeline running-time should be reset to +@running_time, like after a flushing seek. + + + The new reset_time message. + +MT safe. + + + + + The object originating the message. + + + + the requested running-time + + + + + + Create a new segment done message. This message is posted by elements that +finish playback of a segment as a result of a segment seek. This message +is received by the application after all elements that posted a segment_start +have posted the segment_done. + + + the new segment done message. + +MT safe. + + + + + The object originating the message. + + + + The format of the position being done + + + + The position of the segment being done + + + + + + Create a new segment message. This message is posted by elements that +start playback of a segment as a result of a segment seek. This message +is not received by the application but is used for maintenance reasons in +container elements. + + + the new segment start message. + +MT safe. + + + + + The object originating the message. + + + + The format of the position being played + + + + The position of the segment being played + + + + + + Create a state change message. This message is posted whenever an element +changed its state. + + + the new state change message. + +MT safe. + + + + + The object originating the message. + + + + the previous state + + + + the new (current) state + + + + the pending (target) state + + + + + + Create a state dirty message. This message is posted whenever an element +changed its state asynchronously and is used internally to update the +states of container objects. + + + the new state dirty message. + +MT safe. + + + + + The object originating the message + + + + + + This message is posted by elements when they complete a part, when @intermediate set +to %TRUE, or a complete step operation. + +@duration will contain the amount of time (in GST_FORMAT_TIME) of the stepped +@amount of media in format @format. + + + the new step_done message. + +MT safe. + + + + + The object originating the message. + + + + the format of @amount + + + + the amount of stepped data + + + + the rate of the stepped amount + + + + is this an flushing step + + + + is this an intermediate step + + + + the duration of the data + + + + the step caused EOS + + + + + + This message is posted by elements when they accept or activate a new step +event for @amount in @format. + +@active is set to %FALSE when the element accepted the new step event and has +queued it for execution in the streaming threads. + +@active is set to %TRUE when the element has activated the step operation and +is now ready to start executing the step in the streaming thread. After this +message is emitted, the application can queue a new step operation in the +element. + + + The new step_start message. + +MT safe. + + + + + The object originating the message. + + + + if the step is active or queued + + + + the format of @amount + + + + the amount of stepped data + + + + the rate of the stepped amount + + + + is this an flushing step + + + + is this an intermediate step + + + + + + Creates a new stream-collection message. The message is used to announce new +#GstStreamCollection + + + a newly allocated #GstMessage + + + + + The #GstObject that created the message + + + + The #GstStreamCollection + + + + + + Create a new stream_start message. This message is generated and posted in +the sink elements of a GstBin. The bin will only forward the STREAM_START +message to the application if all sinks have posted an STREAM_START message. + + + The new stream_start message. + +MT safe. + + + + + The object originating the message. + + + + + + Create a new stream status message. This message is posted when a streaming +thread is created/destroyed or when the state changed. + + + the new stream status message. + +MT safe. + + + + + The object originating the message. + + + + The stream status type. + + + + the owner element of @src. + + + + + + Creates a new steams-selected message. The message is used to announce +that an array of streams has been selected. This is generally in response +to a #GST_EVENT_SELECT_STREAMS event, or when an element (such as decodebin3) +makes an initial selection of streams. + +The message also contains the #GstStreamCollection to which the various streams +belong to. + +Users of gst_message_new_streams_selected() can add the selected streams with +gst_message_streams_selected_add(). + + + a newly allocated #GstMessage + + + + + The #GstObject that created the message + + + + The #GstStreamCollection + + + + + + Create a new structure change message. This message is posted when the +structure of a pipeline is in the process of being changed, for example +when pads are linked or unlinked. + +@src should be the sinkpad that unlinked or linked. + + + the new structure change message. + +MT safe. + + + + + The object originating the message. + + + + The change type. + + + + The owner element of @src. + + + + Whether the structure change is busy. + + + + + + Create a new tag message. The message will take ownership of the tag list. +The message is posted by elements that discovered a new taglist. + + + the new tag message. + +MT safe. + + + + + The object originating the message. + + + + the tag list for the message. + + + + + + Create a new TOC message. The message is posted by elements +that discovered or updated a TOC. + + + a new TOC message. + +MT safe. + + + + + the object originating the message. + + + + #GstToc structure for the message. + + + + whether TOC was updated or not. + + + + + + Create a new warning message. The message will make copies of @error and +@debug. + + + the new warning message. + +MT safe. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + + + Create a new warning message. The message will make copies of @error and +@debug. + + + the new warning message. + + + + + The object originating the message. + + + + The GError for this message. + + + + A debugging string. + + + + A GstStructure with details + + + + + + Creates and appends a new entry. + +The specified location string is copied. However, ownership over the tag +list and structure are transferred to the message. + + + + + + + a #GstMessage of type %GST_MESSAGE_REDIRECT + + + + location string for the new entry + + + + tag list for the new entry + + + + structure for the new entry + + + + + + Creates a copy of the message. Returns a copy of the message. + + + a new copy of @msg. + +MT safe + + + + + the message to copy + + + + + + + + the number of entries stored in the message + + + + + a #GstMessage of type %GST_MESSAGE_REDIRECT + + + + + + Retrieve the sequence number of a message. + +Messages have ever-incrementing sequence numbers, which may also be set +explicitly via gst_message_set_seqnum(). Sequence numbers are typically used +to indicate that a message corresponds to some other set of messages or +events, for example a SEGMENT_DONE message corresponding to a SEEK event. It +is considered good practice to make this correspondence when possible, though +it is not required. + +Note that events and messages share the same sequence number incrementor; +two events or messages will never have the same sequence number unless +that correspondence was made explicitly. + + + The message's sequence number. + +MT safe. + + + + + A #GstMessage. + + + + + + Extracts the object managing the streaming thread from @message. + + + a GValue containing the object that manages the +streaming thread. This object is usually of type GstTask but other types can +be added in the future. The object remains valid as long as @message is +valid. + + + + + A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. + + + + + + Access the structure of the message. + + + The structure of the message. The +structure is still owned by the message, which means that you should not +free it and that the pointer becomes invalid when you free the message. + +MT safe. + + + + + The #GstMessage. + + + + + + Checks if @message has the given @name. This function is usually used to +check the name of a custom message. + + + %TRUE if @name matches the name of the message structure. + + + + + The #GstMessage. + + + + name to check + + + + + + Extract the running_time from the async_done message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_ASYNC_DONE. + + + + Result location for the running_time or %NULL + + + + + + Extracts the buffering percent from the GstMessage. see also +gst_message_new_buffering(). + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_BUFFERING. + + + + Return location for the percent. + + + + + + Extracts the buffering stats values from @message. + + + + + + + A valid #GstMessage of type GST_MESSAGE_BUFFERING. + + + + a buffering mode, or %NULL + + + + the average input rate, or %NULL + + + + the average output rate, or %NULL + + + + amount of buffering time left in + milliseconds, or %NULL + + + + + + Extracts the lost clock from the GstMessage. +The clock object returned remains valid until the message is freed. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_CLOCK_LOST. + + + + a pointer to hold the lost clock + + + + + + Extracts the clock and ready flag from the GstMessage. +The clock object returned remains valid until the message is freed. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_CLOCK_PROVIDE. + + + + a pointer to hold a clock + object, or %NULL + + + + a pointer to hold the ready flag, or %NULL + + + + + + Parse a context type from an existing GST_MESSAGE_NEED_CONTEXT message. + + + a #gboolean indicating if the parsing succeeded. + + + + + a GST_MESSAGE_NEED_CONTEXT type message + + + + the context type, or %NULL + + + + + + Parses a device-added message. The device-added message is produced by +#GstDeviceProvider or a #GstDeviceMonitor. It announces the appearance +of monitored devices. + + + + + + + a #GstMessage of type %GST_MESSAGE_DEVICE_ADDED + + + + A location where to store a + pointer to the new #GstDevice, or %NULL + + + + + + Parses a device-changed message. The device-changed message is produced by +#GstDeviceProvider or a #GstDeviceMonitor. It announces the +disappearance of monitored devices. * It announce that a device properties has +changed and @device represents the new modified version of @changed_device. + + + + + + + a #GstMessage of type %GST_MESSAGE_DEVICE_CHANGED + + + + A location where to store a + pointer to the updated version of the #GstDevice, or %NULL + + + + A location where to store a + pointer to the old version of the #GstDevice, or %NULL + + + + + + Parses a device-removed message. The device-removed message is produced by +#GstDeviceProvider or a #GstDeviceMonitor. It announces the +disappearance of monitored devices. + + + + + + + a #GstMessage of type %GST_MESSAGE_DEVICE_REMOVED + + + + A location where to store a + pointer to the removed #GstDevice, or %NULL + + + + + + Extracts the GError and debug string from the GstMessage. The values returned +in the output arguments are copies; the caller must free them when done. + +Typical usage of this function might be: +|[<!-- language="C" --> + ... + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_ERROR: { + GError *err = NULL; + gchar *dbg_info = NULL; + + gst_message_parse_error (msg, &amp;err, &amp;dbg_info); + g_printerr ("ERROR from element %s: %s\n", + GST_OBJECT_NAME (msg->src), err->message); + g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); + g_error_free (err); + g_free (dbg_info); + break; + } + ... + } + ... +]| + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_ERROR. + + + + location for the GError + + + + location for the debug message, + or %NULL + + + + + + Returns the optional details structure, may be NULL if none. +The returned structure must not be freed. + + + + + + + The message object + + + + A pointer to the returned details + + + + + + Extract the group from the STREAM_START message. + + + %TRUE if the message had a group id set, %FALSE otherwise + +MT safe. + + + + + A valid #GstMessage of type GST_MESSAGE_STREAM_START. + + + + Result location for the group id or + %NULL + + + + + + Extract the context from the HAVE_CONTEXT message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_HAVE_CONTEXT. + + + + Result location for the + context or %NULL + + + + + + Extracts the GError and debug string from the GstMessage. The values returned +in the output arguments are copies; the caller must free them when done. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_INFO. + + + + location for the GError + + + + location for the debug message, + or %NULL + + + + + + Returns the optional details structure, may be NULL if none +The returned structure must not be freed. + + + + + + + The message object + + + + A pointer to the returned details structure + + + + + + Parses the rate_multiplier from the instant-rate-request message. + + + + + + + a #GstMessage of type %GST_MESSAGE_INSTANT_RATE_REQUEST + + + + return location for the rate, or %NULL + + + + + + Extracts the new clock from the GstMessage. +The clock object returned remains valid until the message is freed. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_NEW_CLOCK. + + + + a pointer to hold the selected + new clock + + + + + + Parses the progress @type, @code and @text. + + + + + + + A valid #GstMessage of type GST_MESSAGE_PROGRESS. + + + + location for the type + + + + location for the code + + + + location for the text + + + + + + Parses a property-notify message. These will be posted on the bus only +when set up with gst_element_add_property_notify_watch() or +gst_element_add_property_deep_notify_watch(). + + + + + + + a #GstMessage of type %GST_MESSAGE_PROPERTY_NOTIFY + + + + location where to store a + pointer to the object whose property got changed, or %NULL + + + + return location for + the name of the property that got changed, or %NULL + + + + return location for + the new value of the property that got changed, or %NULL. This will + only be set if the property notify watch was told to include the value + when it was set up + + + + + + Extract the timestamps and live status from the QoS message. + +The returned values give the running_time, stream_time, timestamp and +duration of the dropped buffer. Values of GST_CLOCK_TIME_NONE mean unknown +values. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_QOS. + + + + if the message was generated by a live element + + + + the running time of the buffer that + generated the message + + + + the stream time of the buffer that + generated the message + + + + the timestamps of the buffer that + generated the message + + + + the duration of the buffer that + generated the message + + + + + + Extract the QoS stats representing the history of the current continuous +pipeline playback period. + +When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are +invalid. Values of -1 for either @processed or @dropped mean unknown values. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_QOS. + + + + Units of the 'processed' and 'dropped' fields. + Video sinks and video filters will use GST_FORMAT_BUFFERS (frames). + Audio sinks and audio filters will likely use GST_FORMAT_DEFAULT + (samples). + + + + Total number of units correctly processed + since the last state change to READY or a flushing operation. + + + + Total number of units dropped since the last + state change to READY or a flushing operation. + + + + + + Extract the QoS values that have been calculated/analysed from the QoS data + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_QOS. + + + + The difference of the running-time against + the deadline. + + + + Long term prediction of the ideal rate + relative to normal rate to get optimal quality. + + + + An element dependent integer value that + specifies the current quality level of the element. The default + maximum quality is 1000000. + + + + + + Parses the location and/or structure from the entry with the given index. +The index must be between 0 and gst_message_get_num_redirect_entries() - 1. +Returned pointers are valid for as long as this message exists. + + + + + + + a #GstMessage of type %GST_MESSAGE_REDIRECT + + + + index of the entry to parse + + + + return location for + the pointer to the entry's location string, or %NULL + + + + return location for + the pointer to the entry's tag list, or %NULL + + + + return location + for the pointer to the entry's structure, or %NULL + + + + + + Extract the requested state from the request_state message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_REQUEST_STATE. + + + + Result location for the requested state or %NULL + + + + + + Extract the running-time from the RESET_TIME message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_RESET_TIME. + + + + Result location for the running_time or + %NULL + + + + + + Extracts the position and format from the segment done message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_SEGMENT_DONE. + + + + Result location for the format, or %NULL + + + + Result location for the position, or %NULL + + + + + + Extracts the position and format from the segment start message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_SEGMENT_START. + + + + Result location for the format, or %NULL + + + + Result location for the position, or %NULL + + + + + + Extracts the old and new states from the GstMessage. + +Typical usage of this function might be: +|[<!-- language="C" --> + ... + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_STATE_CHANGED: { + GstState old_state, new_state; + + gst_message_parse_state_changed (msg, &amp;old_state, &amp;new_state, NULL); + g_print ("Element %s changed state from %s to %s.\n", + GST_OBJECT_NAME (msg->src), + gst_element_state_get_name (old_state), + gst_element_state_get_name (new_state)); + break; + } + ... + } + ... +]| + +MT safe. + + + + + + + a valid #GstMessage of type GST_MESSAGE_STATE_CHANGED + + + + the previous state, or %NULL + + + + the new (current) state, or %NULL + + + + the pending (target) state, or %NULL + + + + + + Extract the values the step_done message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_STEP_DONE. + + + + result location for the format + + + + result location for the amount + + + + result location for the rate + + + + result location for the flush flag + + + + result location for the intermediate flag + + + + result location for the duration + + + + result location for the EOS flag + + + + + + Extract the values from step_start message. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_STEP_DONE. + + + + result location for the active flag + + + + result location for the format + + + + result location for the amount + + + + result location for the rate + + + + result location for the flush flag + + + + result location for the intermediate flag + + + + + + Parses a stream-collection message. + + + + + + + a #GstMessage of type %GST_MESSAGE_STREAM_COLLECTION + + + + A location where to store a + pointer to the #GstStreamCollection, or %NULL + + + + + + Extracts the stream status type and owner the GstMessage. The returned +owner remains valid for as long as the reference to @message is valid and +should thus not be unreffed. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. + + + + A pointer to hold the status type + + + + The owner element of the message source + + + + + + Parses a streams-selected message. + + + + + + + a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED + + + + A location where to store a + pointer to the #GstStreamCollection, or %NULL + + + + + + Extracts the change type and completion status from the GstMessage. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_STRUCTURE_CHANGE. + + + + A pointer to hold the change type + + + + The owner element of the + message source + + + + a pointer to hold whether the change is in + progress or has been completed + + + + + + Extracts the tag list from the GstMessage. The tag list returned in the +output argument is a copy; the caller must free it when done. + +Typical usage of this function might be: +|[<!-- language="C" --> + ... + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_TAG: { + GstTagList *tags = NULL; + + gst_message_parse_tag (msg, &amp;tags); + g_print ("Got tags from element %s\n", GST_OBJECT_NAME (msg->src)); + handle_tags (tags); + gst_tag_list_unref (tags); + break; + } + ... + } + ... +]| + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_TAG. + + + + return location for the tag-list. + + + + + + Extract the TOC from the #GstMessage. The TOC returned in the +output argument is a copy; the caller must free it with +gst_toc_unref() when done. + +MT safe. + + + + + + + a valid #GstMessage of type GST_MESSAGE_TOC. + + + + return location for the TOC. + + + + return location for the updated flag. + + + + + + Extracts the GError and debug string from the GstMessage. The values returned +in the output arguments are copies; the caller must free them when done. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_WARNING. + + + + location for the GError + + + + location for the debug message, + or %NULL + + + + + + Returns the optional details structure, may be NULL if none +The returned structure must not be freed. + + + + + + + The message object + + + + A pointer to the returned details structure + + + + + + Convenience macro to increase the reference count of the message. + + + @msg (for convenience when doing assignments) + + + + + the message to ref + + + + + + Configures the buffering stats values in @message. + + + + + + + A valid #GstMessage of type GST_MESSAGE_BUFFERING. + + + + a buffering mode + + + + the average input rate + + + + the average output rate + + + + amount of buffering time left in milliseconds + + + + + + Sets the group id on the stream-start message. + +All streams that have the same group id are supposed to be played +together, i.e. all streams inside a container file should have the +same group id but different stream ids. The group id should change +each time the stream is started, resulting in different group ids +each time a file is played for example. + +MT safe. + + + + + + + the message + + + + the group id + + + + + + Set the QoS stats representing the history of the current continuous pipeline +playback period. + +When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are +invalid. Values of -1 for either @processed or @dropped mean unknown values. + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_QOS. + + + + Units of the 'processed' and 'dropped' fields. Video sinks and video +filters will use GST_FORMAT_BUFFERS (frames). Audio sinks and audio filters +will likely use GST_FORMAT_DEFAULT (samples). + + + + Total number of units correctly processed since the last state +change to READY or a flushing operation. + + + + Total number of units dropped since the last state change to READY +or a flushing operation. + + + + + + Set the QoS values that have been calculated/analysed from the QoS data + +MT safe. + + + + + + + A valid #GstMessage of type GST_MESSAGE_QOS. + + + + The difference of the running-time against the deadline. + + + + Long term prediction of the ideal rate relative to normal rate +to get optimal quality. + + + + An element dependent integer value that specifies the current +quality level of the element. The default maximum quality is 1000000. + + + + + + Set the sequence number of a message. + +This function might be called by the creator of a message to indicate that +the message relates to other messages or events. See gst_message_get_seqnum() +for more information. + +MT safe. + + + + + + + A #GstMessage. + + + + A sequence number. + + + + + + Configures the object handling the streaming thread. This is usually a +GstTask object but other objects might be added in the future. + + + + + + + A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. + + + + the object controlling the streaming + + + + + + Adds the @stream to the @message. + + + + + + + a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED + + + + a #GstStream to add to @message + + + + + + Returns the number of streams contained in the @message. + + + The number of streams contained within. + + + + + a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED + + + + + + Retrieves the #GstStream with index @index from the @message. + + + A #GstStream + + + + + a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED + + + + Index of the stream to retrieve + + + + + + Convenience macro to decrease the reference count of the message, possibly +freeing it. + + + + + + + the message to unref + + + + + + Get a writable version of the structure. + + + The structure of the message. The structure +is still owned by the message, which means that you should not free +it and that the pointer becomes invalid when you free the message. +This function checks if @message is writable and will never return +%NULL. + +MT safe. + + + + + The #GstMessage. + + + + + + Modifies a pointer to a #GstMessage to point to a different #GstMessage. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +message is unreffed, the new one is reffed). + +Either @new_message or the #GstMessage pointed to by @old_message may be %NULL. + + + %TRUE if @new_message was different from @old_message + + + + + pointer to a + pointer to a #GstMessage to be replaced. + + + + pointer to a #GstMessage that will + replace the message pointed to by @old_message. + + + + + + + The different message types that are available. + + an undefined message + + + end-of-stream reached in a pipeline. The application will +only receive this message in the PLAYING state and every time it sets a +pipeline to PLAYING that is in the EOS state. The application can perform a +flushing seek in the pipeline, which will undo the EOS state again. + + + an error occurred. When the application receives an error +message it should stop playback of the pipeline and not assume that more +data will be played. It is possible to specify a redirection url to the error +messages by setting a `redirect-location` field into the error message, application +or high level bins might use the information as required. + + + a warning occurred. + + + an info message occurred + + + a tag was found. + + + the pipeline is buffering. When the application +receives a buffering message in the PLAYING state for a non-live pipeline it +must PAUSE the pipeline until the buffering completes, when the percentage +field in the message is 100%. For live pipelines, no action must be +performed and the buffering percentage can be used to inform the user about +the progress. + + + a state change happened + + + an element changed state in a streaming thread. +This message is deprecated. + + + a stepping operation finished. + + + an element notifies its capability of providing + a clock. This message is used internally and + never forwarded to the application. + + + The current clock as selected by the pipeline became + unusable. The pipeline will select a new clock on + the next PLAYING state change. The application + should set the pipeline to PAUSED and back to + PLAYING when this message is received. + + + a new clock was selected in the pipeline. + + + the structure of the pipeline changed. This +message is used internally and never forwarded to the application. + + + status about a stream, emitted when it starts, + stops, errors, etc.. + + + message posted by the application, possibly + via an application-specific element. + + + element-specific message, see the specific element's + documentation + + + pipeline started playback of a segment. This +message is used internally and never forwarded to the application. + + + pipeline completed playback of a segment. This +message is forwarded to the application after all elements that posted +@GST_MESSAGE_SEGMENT_START posted a GST_MESSAGE_SEGMENT_DONE message. + + + The duration of a pipeline changed. The +application can get the new duration with a duration query. + + + Posted by elements when their latency changes. The +application should recalculate and distribute a new latency. + + + Posted by elements when they start an ASYNC +#GstStateChange. This message is not forwarded to the application but is used +internally. + + + Posted by elements when they complete an ASYNC +#GstStateChange. The application will only receive this message from the toplevel +pipeline. + + + Posted by elements when they want the pipeline to +change state. This message is a suggestion to the application which can +decide to perform the state change on (part of) the pipeline. + + + A stepping operation was started. + + + A buffer was dropped or an element changed its processing +strategy for Quality of Service reasons. + + + A progress message. + + + A new table of contents (TOC) was found or previously found TOC +was updated. + + + Message to request resetting the pipeline's + running time from the pipeline. This is an internal message which + applications will likely never receive. + + + Message indicating start of a new stream. Useful + e.g. when using playbin in gapless playback mode, to get notified when + the next title actually starts playing (which will be some time after + the URI for the next title has been set). + + + Message indicating that an element wants a specific context (Since: 1.2) + + + Message indicating that an element created a context (Since: 1.2) + + + Message is an extended message type (see below). + These extended message IDs can't be used directly with mask-based API + like gst_bus_poll() or gst_bus_timed_pop_filtered(), but you can still + filter for GST_MESSAGE_EXTENDED and then check the result for the + specific type. (Since: 1.4) + + + Message indicating a #GstDevice was added to + a #GstDeviceProvider (Since: 1.4) + + + Message indicating a #GstDevice was removed + from a #GstDeviceProvider (Since: 1.4) + + + Message indicating a #GObject property has + changed (Since: 1.10) + + + Message indicating a new #GstStreamCollection + is available (Since: 1.10) + + + Message indicating the active selection of + #GstStreams has changed (Since: 1.10) + + + Message indicating to request the application to + try to play the given URL(s). Useful if for example a HTTP 302/303 + response is received with a non-HTTP URL inside. (Since: 1.10) + + + Message indicating a #GstDevice was changed + a #GstDeviceProvider (Since: 1.16) + + + Message sent by elements to request the + running time from the pipeline when an instant rate change should + be applied (which may be in the past when the answer arrives). (Since: 1.18) + + + mask for all of the above messages. + + + Get a printable name for the given message type. Do not modify or free. + + + a reference to the static name of the message. + + + + + the message type + + + + + + Get the unique quark for the given message type. + + + the quark associated with the message type + + + + + the message type + + + + + + + The #GstMeta structure should be included as the first member of a #GstBuffer +metadata structure. The structure defines the API of the metadata and should +be accessible to all elements using the metadata. + +A metadata API is registered with gst_meta_api_type_register() which takes a +name for the metadata API and some tags associated with the metadata. +With gst_meta_api_type_has_tag() one can check if a certain metadata API +contains a given tag. + +Multiple implementations of a metadata API can be registered. +To implement a metadata API, gst_meta_register() should be used. This +function takes all parameters needed to create, free and transform metadata +along with the size of the metadata. The function returns a #GstMetaInfo +structure that contains the information for the implementation of the API. + +A specific implementation can be retrieved by name with gst_meta_get_info(). + +See #GstBuffer for how the metadata can be added, retrieved and removed from +buffers. + + + extra flags for the metadata + + + + pointer to the #GstMetaInfo + + + + Meta sequence number compare function. Can be used as #GCompareFunc +or a #GCompareDataFunc. + + + a negative number if @meta1 comes before @meta2, 0 if both metas + have an equal sequence number, or a positive integer if @meta1 comes + after @meta2. + + + + + a #GstMeta + + + + a #GstMeta + + + + + + Gets seqnum for this meta. + + + + + + + a #GstMeta + + + + + + + + an array of tags as strings. + + + + + + + an API + + + + + + Check if @api was registered with @tag. + + + %TRUE if @api was registered with @tag. + + + + + an API + + + + the tag to check + + + + + + Register and return a GType for the @api and associate it with +@tags. + + + a unique GType for @api. + + + + + an API to register + + + + tags for @api + + + + + + + + Lookup a previously registered meta info structure by its implementation name +@impl. + + + a #GstMetaInfo with @impl, or +%NULL when no such metainfo exists. + + + + + the name + + + + + + Register a new #GstMeta implementation. + +The same @info can be retrieved later with gst_meta_get_info() by using +@impl as the key. + + + a #GstMetaInfo that can be used to +access metadata. + + + + + the type of the #GstMeta API + + + + the name of the #GstMeta implementation + + + + the size of the #GstMeta structure + + + + a #GstMetaInitFunction + + + + a #GstMetaFreeFunction + + + + a #GstMetaTransformFunction + + + + + + Register a new custom #GstMeta implementation, backed by an opaque +structure holding a #GstStructure. + +The registered info can be retrieved later with gst_meta_get_info() by using +@name as the key. + +The backing #GstStructure can be retrieved with +gst_custom_meta_get_structure(), its mutability is conditioned by the +writability of the buffer the meta is attached to. + +When @transform_func is %NULL, the meta and its backing #GstStructure +will always be copied when the transform operation is copy, other operations +are discarded, copy regions are ignored. + + + a #GstMetaInfo that can be used to +access metadata. + + + + + the name of the #GstMeta implementation + + + + tags for @api + + + + + + a #GstMetaTransformFunction + + + + user data passed to @transform_func + + + + #GDestroyNotify for user_data + + + + + + + Extra metadata flags. + + no flags + + + metadata should not be modified + + + metadata is managed by a bufferpool + + + metadata should not be removed + + + additional flags can be added starting from this flag. + + + + Function called when @meta is freed in @buffer. + + + + + + + a #GstMeta + + + + a #GstBuffer + + + + + + The #GstMetaInfo provides information about a specific metadata +structure. + + + tag identifying the metadata structure and api + + + + type identifying the implementor of the api + + + + size of the metadata + + + + function for initializing the metadata + + + + function for freeing the metadata + + + + function for transforming the metadata + + + + + + whether @info was registered as a #GstCustomMeta with + gst_meta_register_custom() + + + + + + + + + + + Function called when @meta is initialized in @buffer. + + + + + + + a #GstMeta + + + + parameters passed to the init function + + + + a #GstBuffer + + + + + + Extra data passed to a "gst-copy" transform #GstMetaTransformFunction. + + + %TRUE if only region is copied + + + + the offset to copy, 0 if @region is %FALSE, otherwise > 0 + + + + the size to copy, -1 or the buffer size when @region is %FALSE + + + + + Function called for each @meta in @buffer as a result of performing a +transformation on @transbuf. Additional @type specific transform data +is passed to the function as @data. + +Implementations should check the @type of the transform and parse +additional type specific fields in @data that should be used to update +the metadata on @transbuf. + + + %TRUE if the transform could be performed + + + + + a #GstBuffer + + + + a #GstMeta + + + + a #GstBuffer + + + + the transform type + + + + transform specific data. + + + + + + #GstMiniObject is a simple structure that can be used to implement refcounted +types. + +Subclasses will include #GstMiniObject as the first member in their structure +and then call gst_mini_object_init() to initialize the #GstMiniObject fields. + +gst_mini_object_ref() and gst_mini_object_unref() increment and decrement the +refcount respectively. When the refcount of a mini-object reaches 0, the +dispose function is called first and when this returns %TRUE, the free +function of the miniobject is called. + +A copy can be made with gst_mini_object_copy(). + +gst_mini_object_is_writable() will return %TRUE when the refcount of the +object is exactly 1 and there is no parent or a single parent exists and is +writable itself, meaning the current caller has the only reference to the +object. gst_mini_object_make_writable() will return a writable version of +the object, which might be a new copy when the refcount was not 1. + +Opaque data can be associated with a #GstMiniObject with +gst_mini_object_set_qdata() and gst_mini_object_get_qdata(). The data is +meant to be specific to the particular object and is not automatically copied +with gst_mini_object_copy() or similar methods. + +A weak reference can be added and remove with gst_mini_object_weak_ref() +and gst_mini_object_weak_unref() respectively. + + + the GType of the object + + + + atomic refcount + + + + atomic state of the locks + + + + extra flags. + + + + a copy function + + + + a dispose function + + + + the free function + + + + + + + + + + This adds @parent as a parent for @object. Having one ore more parents affects the +writability of @object: if a @parent is not writable, @object is also not +writable, regardless of its refcount. @object is only writable if all +the parents are writable and its own refcount is exactly 1. + +Note: This function does not take ownership of @parent and also does not +take an additional reference. It is the responsibility of the caller to +remove the parent again at a later time. + + + + + + + a #GstMiniObject + + + + a parent #GstMiniObject + + + + + + Creates a copy of the mini-object. + +MT safe + + + the new mini-object if copying is +possible, %NULL otherwise. + + + + + the mini-object to copy + + + + + + This function gets back user data pointers stored via +gst_mini_object_set_qdata(). + + + The user data pointer set, or +%NULL + + + + + The GstMiniObject to get a stored user data pointer from + + + + A #GQuark, naming the user data pointer + + + + + + Initializes a mini-object with the desired type and copy/dispose/free +functions. + + + + + + + a #GstMiniObject + + + + initial #GstMiniObjectFlags + + + + the #GType of the mini-object to create + + + + the copy function, or %NULL + + + + the dispose function, or %NULL + + + + the free function or %NULL + + + + + + If @mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE +lock on @object is the only one, this means that changes to the object will +not be visible to any other object. + +If the LOCKABLE flag is not set, check if the refcount of @mini_object is +exactly 1, meaning that no other reference exists to the object and that the +object is therefore writable. + +Modification of a mini-object should only be done after verifying that it +is writable. + + + %TRUE if the object is writable. + + + + + the mini-object to check + + + + + + Lock the mini-object with the specified access mode in @flags. + + + %TRUE if @object could be locked. + + + + + the mini-object to lock + + + + #GstLockFlags + + + + + + Checks if a mini-object is writable. If not, a writable copy is made and +returned. This gives away the reference to the original mini object, +and returns a reference to the new object. + +MT safe + + + a mini-object (possibly the same pointer) that + is writable. + + + + + the mini-object to make writable + + + + + + Increase the reference count of the mini-object. + +Note that the refcount affects the writability +of @mini-object, see gst_mini_object_is_writable(). It is +important to note that keeping additional references to +GstMiniObject instances can potentially increase the number +of memcpy operations in a pipeline, especially if the miniobject +is a #GstBuffer. + + + the mini-object. + + + + + the mini-object + + + + + + This removes @parent as a parent for @object. See +gst_mini_object_add_parent(). + + + + + + + a #GstMiniObject + + + + a parent #GstMiniObject + + + + + + This sets an opaque, named pointer on a miniobject. +The name is specified through a #GQuark (retrieved e.g. via +g_quark_from_static_string()), and the pointer +can be gotten back from the @object with gst_mini_object_get_qdata() +until the @object is disposed. +Setting a previously set user data pointer, overrides (frees) +the old pointer set, using %NULL as pointer essentially +removes the data stored. + +@destroy may be specified which is called with @data as argument +when the @object is disposed, or the data is being overwritten by +a call to gst_mini_object_set_qdata() with the same @quark. + + + + + + + a #GstMiniObject + + + + A #GQuark, naming the user data pointer + + + + An opaque user data pointer + + + + Function to invoke with @data as argument, when @data + needs to be freed + + + + + + This function gets back user data pointers stored via gst_mini_object_set_qdata() +and removes the data from @object without invoking its `destroy()` function (if +any was set). + + + The user data pointer set, or +%NULL + + + + + The GstMiniObject to get a stored user data pointer from + + + + A #GQuark, naming the user data pointer + + + + + + Unlock the mini-object with the specified access mode in @flags. + + + + + + + the mini-object to unlock + + + + #GstLockFlags + + + + + + Decreases the reference count of the mini-object, possibly freeing +the mini-object. + + + + + + + the mini-object + + + + + + Adds a weak reference callback to a mini object. Weak references are +used for notification when a mini object is finalized. They are called +"weak references" because they allow you to safely hold a pointer +to the mini object without calling gst_mini_object_ref() +(gst_mini_object_ref() adds a strong reference, that is, forces the object +to stay alive). + + + + + + + #GstMiniObject to reference weakly + + + + callback to invoke before the mini object is freed + + + + extra data to pass to notify + + + + + + Removes a weak reference callback from a mini object. + + + + + + + #GstMiniObject to remove a weak reference from + + + + callback to search for + + + + data to search for + + + + + + Atomically modifies a pointer to point to a new mini-object. +The reference count of @olddata is decreased and the reference count of +@newdata is increased. + +Either @newdata and the value pointed to by @olddata may be %NULL. + + + %TRUE if @newdata was different from @olddata + + + + + pointer to a pointer to a + mini-object to be replaced + + + + pointer to new mini-object + + + + + + Replace the current #GstMiniObject pointer to by @olddata with %NULL and +return the old value. + + + the #GstMiniObject at @oldata + + + + + pointer to a pointer to a mini-object to + be stolen + + + + + + Modifies a pointer to point to a new mini-object. The modification +is done atomically. This version is similar to gst_mini_object_replace() +except that it does not increase the refcount of @newdata and thus +takes ownership of @newdata. + +Either @newdata and the value pointed to by @olddata may be %NULL. + + + %TRUE if @newdata was different from @olddata + + + + + pointer to a pointer to a mini-object to + be replaced + + + + pointer to new mini-object + + + + + + + Function prototype for methods to create copies of instances. + + + reference to cloned instance. + + + + + MiniObject to copy + + + + + + Function prototype for when a miniobject has lost its last refcount. +Implementation of the mini object are allowed to revive the +passed object by doing a gst_mini_object_ref(). If the object is not +revived after the dispose function, the function should return %TRUE +and the memory associated with the object is freed. + + + %TRUE if the object should be cleaned up. + + + + + MiniObject to dispose + + + + + + Flags for the mini object + + the object can be locked and unlocked with +gst_mini_object_lock() and gst_mini_object_unlock(). + + + the object is permanently locked in +READONLY mode. Only read locks can be performed on the object. + + + the object is expected to stay alive +even after gst_deinit() has been called and so should be ignored by leak +detection tools. (Since: 1.10) + + + first flag that can be used by subclasses. + + + + Virtual function prototype for methods to free resources used by +mini-objects. + + + + + + + MiniObject to free + + + + + + A #GstMiniObjectNotify function can be added to a mini object as a +callback that gets triggered when gst_mini_object_unref() drops the +last ref and @obj is about to be freed. + + + + + + + data that was provided when the notify was added + + + + the mini object + + + + + + Constant that defines one GStreamer nanosecond + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This macro returns the entire set of flags for the object. + + + + a #GstObject + + + + + This macro checks to see if the given flag is set. + + + + a #GstObject + + + Flag to check for + + + + + This macro sets the given bits. + + + + a #GstObject + + + Flag to set + + + + + This macro unsets the given bits. + + + + a #GstObject + + + Flag to set + + + + + + + + + + + + Acquire a reference to the mutex of this object. + + + + a #GstObject + + + + + This macro will obtain a lock on the object, making serialization possible. +It blocks until the lock can be obtained. + + + + a #GstObject to lock + + + + + Get the name of this object. This is not thread-safe by default +(i.e. you will have to make sure the object lock is taken yourself). +If in doubt use gst_object_get_name() instead. + + + + a #GstObject + + + + + Get the parent of this object. This is not thread-safe by default +(i.e. you will have to make sure the object lock is taken yourself). +If in doubt use gst_object_get_parent() instead. + + + + a #GstObject + + + + + Get access to the reference count field of the object. + + + + a #GstObject + + + + + Get the reference count value of the object. + + + + a #GstObject + + + + + This macro will try to obtain a lock on the object, but will return with +%FALSE if it can't get it immediately. + + + + a #GstObject. + + + + + This macro releases a lock on the object. + + + + a #GstObject to unlock. + + + + + #GstObject provides a root for the object hierarchy tree filed in by the +GStreamer library. It is currently a thin wrapper on top of +#GInitiallyUnowned. It is an abstract class that is not very usable on its own. + +#GstObject gives us basic refcounting, parenting functionality and locking. +Most of the functions are just extended for special GStreamer needs and can be +found under the same name in the base class of #GstObject which is #GObject +(e.g. g_object_ref() becomes gst_object_ref()). + +Since #GstObject derives from #GInitiallyUnowned, it also inherits the +floating reference. Be aware that functions such as gst_bin_add() and +gst_element_add_pad() take ownership of the floating reference. + +In contrast to #GObject instances, #GstObject adds a name property. The functions +gst_object_set_name() and gst_object_get_name() are used to set/get the name +of the object. + +## controlled properties + +Controlled properties offers a lightweight way to adjust gobject properties +over stream-time. It works by using time-stamped value pairs that are queued +for element-properties. At run-time the elements continuously pull value +changes for the current stream-time. + +What needs to be changed in a #GstElement? +Very little - it is just two steps to make a plugin controllable! + + * mark gobject-properties paramspecs that make sense to be controlled, + by GST_PARAM_CONTROLLABLE. + + * when processing data (get, chain, loop function) at the beginning call + gst_object_sync_values(element,timestamp). + This will make the controller update all GObject properties that are + under its control with the current values based on the timestamp. + +What needs to be done in applications? Again it's not a lot to change. + + * create a #GstControlSource. + csource = gst_interpolation_control_source_new (); + g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); + + * Attach the #GstControlSource on the controller to a property. + gst_object_add_control_binding (object, gst_direct_control_binding_new (object, "prop1", csource)); + + * Set the control values + gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,0 * GST_SECOND, value1); + gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,1 * GST_SECOND, value2); + + * start your pipeline + + + Checks to see if there is any object named @name in @list. This function +does not do any locking of any kind. You might want to protect the +provided list with the lock of the owner of the list. This function +will lock each #GstObject in the list to compare the name, so be +careful when passing a list with a locked object. + + + %TRUE if a #GstObject named @name does not appear in @list, +%FALSE if it does. + +MT safe. Grabs and releases the LOCK of each object in the list. + + + + + a list of #GstObject to + check through + + + + + + the name to search for + + + + + + A default deep_notify signal callback for an object. The user data +should contain a pointer to an array of strings that should be excluded +from the notify. The default handler will print the new value of the property +using g_print. + +MT safe. This function grabs and releases @object's LOCK for getting its + path string. + + + + + + + the #GObject that signalled the notify. + + + + a #GstObject that initiated the notify. + + + + a #GParamSpec of the property. + + + + + a set of user-specified properties to exclude or %NULL to show + all changes. + + + + + + + + Increase the reference count of @object, and possibly remove the floating +reference, if @object has a floating reference. + +In other words, if the object is floating, then this call "assumes ownership" +of the floating reference, converting it to a normal reference by clearing +the floating flag while leaving the reference count unchanged. If the object +is not floating, then this call adds a new normal reference increasing the +reference count by one. + +For more background on "floating references" please see the #GObject +documentation. + + + + + + + a #GstObject to sink + + + + + + Atomically modifies a pointer to point to a new object. +The reference count of @oldobj is decreased and the reference count of +@newobj is increased. + +Either @newobj and the value pointed to by @oldobj may be %NULL. + + + %TRUE if @newobj was different from @oldobj + + + + + pointer to a place of + a #GstObject to replace + + + + a new #GstObject + + + + + + + + + + + + + + + + + + + + + + + Attach the #GstControlBinding to the object. If there already was a +#GstControlBinding for this property it will be replaced. + +The object's reference count will be incremented, and any floating +reference will be removed (see gst_object_ref_sink()) + + + %FALSE if the given @binding has not been setup for this object or +has been setup for a non suitable property, %TRUE otherwise. + + + + + the controller object + + + + the #GstControlBinding that should be used + + + + + + A default error function that uses g_printerr() to display the error message +and the optional debug string.. + +The default handler will simply print the error string using g_print. + + + + + + + the #GstObject that initiated the error. + + + + the GError. + + + + an additional debug information string, or %NULL + + + + + + Gets the corresponding #GstControlBinding for the property. This should be +unreferenced again after use. + + + the #GstControlBinding for +@property_name or %NULL if the property is not controlled. + + + + + the object + + + + name of the property + + + + + + Obtain the control-rate for this @object. Audio processing #GstElement +objects will use this rate to sub-divide their processing loop and call +gst_object_sync_values() in between. The length of the processing segment +should be up to @control-rate nanoseconds. + +If the @object is not under property control, this will return +%GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing. + +The control-rate is not expected to change if the element is in +%GST_STATE_PAUSED or %GST_STATE_PLAYING. + + + the control rate in nanoseconds + + + + + the object that has controlled properties + + + + + + Gets a number of #GValues for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +#GValue. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the object that has controlled properties + + + + the name of the property to get + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + + + Returns a copy of the name of @object. +Caller should g_free() the return value after usage. +For a nameless object, this returns %NULL, which you can safely g_free() +as well. + +Free-function: g_free + + + the name of @object. g_free() +after usage. + +MT safe. This function grabs and releases @object's LOCK. + + + + + a #GstObject + + + + + + Returns the parent of @object. This function increases the refcount +of the parent object so you should gst_object_unref() it after usage. + + + parent of @object, this can be + %NULL if @object has no parent. unref after usage. + +MT safe. Grabs and releases @object's LOCK. + + + + + a #GstObject + + + + + + Generates a string describing the path of @object in +the object hierarchy. Only useful (or used) for debugging. + +Free-function: g_free + + + a string describing the path of @object. You must + g_free() the string after usage. + +MT safe. Grabs and releases the #GstObject's LOCK for all objects + in the hierarchy. + + + + + a #GstObject + + + + + + Gets the value for the given controlled property at the requested time. + + + the GValue of the property at the given time, +or %NULL if the property isn't controlled. + + + + + the object that has controlled properties + + + + the name of the property to get + + + + the time the control-change should be read from + + + + + + Gets a number of values for the given controlled property starting at the +requested time. The array @values need to hold enough space for @n_values of +the same type as the objects property's type. + +This function is useful if one wants to e.g. draw a graph of the control +curve or apply a control curve sample by sample. + +The values are unboxed and ready to be used. The similar function +gst_object_get_g_value_array() returns the array as #GValues and is +better suites for bindings. + + + %TRUE if the given array could be filled, %FALSE otherwise + + + + + the object that has controlled properties + + + + the name of the property to get + + + + the time that should be processed + + + + the time spacing between subsequent values + + + + the number of values + + + + array to put control-values in + + + + + + Check if the @object has active controlled properties. + + + %TRUE if the object has active controlled properties + + + + + the object that has controlled properties + + + + + + Check if @object has an ancestor @ancestor somewhere up in +the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. + Use gst_object_has_as_ancestor() instead. + +MT safe. Grabs and releases @object's locks. + + + %TRUE if @ancestor is an ancestor of @object. + + + + + a #GstObject to check + + + + a #GstObject to check as ancestor + + + + + + Check if @object has an ancestor @ancestor somewhere up in +the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. + + + %TRUE if @ancestor is an ancestor of @object. + +MT safe. Grabs and releases @object's locks. + + + + + a #GstObject to check + + + + a #GstObject to check as ancestor + + + + + + Check if @parent is the parent of @object. +E.g. a #GstElement can check if it owns a given #GstPad. + + + %FALSE if either @object or @parent is %NULL. %TRUE if @parent is + the parent of @object. Otherwise %FALSE. + +MT safe. Grabs and releases @object's locks. + + + + + a #GstObject to check + + + + a #GstObject to check as parent + + + + + + Increments the reference count on @object. This function +does not take the lock on @object because it relies on +atomic refcounting. + +This object returns the input parameter to ease writing +constructs like : + result = gst_object_ref (object->parent); + + + A pointer to @object + + + + + a #GstObject to reference + + + + + + Removes the corresponding #GstControlBinding. If it was the +last ref of the binding, it will be disposed. + + + %TRUE if the binding could be removed. + + + + + the object + + + + the binding + + + + + + This function is used to disable the control bindings on a property for +some time, i.e. gst_object_sync_values() will do nothing for the +property. + + + + + + + the object that has controlled properties + + + + property to disable + + + + boolean that specifies whether to disable the controller +or not. + + + + + + This function is used to disable all controlled properties of the @object for +some time, i.e. gst_object_sync_values() will do nothing. + + + + + + + the object that has controlled properties + + + + boolean that specifies whether to disable the controller +or not. + + + + + + Change the control-rate for this @object. Audio processing #GstElement +objects will use this rate to sub-divide their processing loop and call +gst_object_sync_values() in between. The length of the processing segment +should be up to @control-rate nanoseconds. + +The control-rate should not change if the element is in %GST_STATE_PAUSED or +%GST_STATE_PLAYING. + + + + + + + the object that has controlled properties + + + + the new control-rate in nanoseconds. + + + + + + Sets the name of @object, or gives @object a guaranteed unique +name (if @name is %NULL). +This function makes a copy of the provided name, so the caller +retains ownership of the name it sent. + + + %TRUE if the name could be set. Since Objects that have +a parent cannot be renamed, this function returns %FALSE in those +cases. + +MT safe. This function grabs and releases @object's LOCK. + + + + + a #GstObject + + + + new name of object + + + + + + Sets the parent of @object to @parent. The object's reference count will +be incremented, and any floating reference will be removed (see gst_object_ref_sink()). + + + %TRUE if @parent could be set or %FALSE when @object +already had a parent or @object and @parent are the same. + +MT safe. Grabs and releases @object's LOCK. + + + + + a #GstObject + + + + new parent of object + + + + + + Returns a suggestion for timestamps where buffers should be split +to get best controller results. + + + Returns the suggested timestamp or %GST_CLOCK_TIME_NONE +if no control-rate was set. + + + + + the object that has controlled properties + + + + + + Sets the properties of the object, according to the #GstControlSources that +(maybe) handle them and for the given timestamp. + +If this function fails, it is most likely the application developers fault. +Most probably the control sources are not setup correctly. + + + %TRUE if the controller values could be applied to the object +properties, %FALSE otherwise + + + + + the object that has controlled properties + + + + the time that should be processed + + + + + + Clear the parent of @object, removing the associated reference. +This function decreases the refcount of @object. + +MT safe. Grabs and releases @object's lock. + + + + + + + a #GstObject to unparent + + + + + + Decrements the reference count on @object. If reference count hits +zero, destroy @object. This function does not take the lock +on @object as it relies on atomic refcounting. + +The unref method should never be called with the LOCK held since +this might deadlock the dispose function. + + + + + + + a #GstObject to unreference + + + + + + + + + The parent of the object. Please note, that when changing the 'parent' +property, we don't emit #GObject::notify and #GstObject::deep-notify +signals due to locking issues. In some cases one can use +#GstBin::element-added or #GstBin::element-removed signals on the parent to +achieve a similar effect. + + + + + + + object LOCK + + + + The name of the object + + + + this object's parent, weak ref + + + + flags for this object + + + + + + + + + + + + + + + + + + The deep notify signal is used to be notified of property changes. It is +typically attached to the toplevel bin to receive notifications from all +the elements contained in that bin. + + + + + + the object that originated the signal + + + + the property that changed + + + + + + + GStreamer base object class. + + + parent + + + + separator used by gst_object_get_path_string() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The standard flags that an gstobject may have. + + the object is expected to stay alive even +after gst_deinit() has been called and so should be ignored by leak +detection tools. (Since: 1.10) + + + subclasses can add additional flags starting from this flag + + + + + + + + + + + Get the #GstPadActivateFunction from @pad. + + + + a #GstPad + + + + + Get the #GstPadActivateModeFunction from the given @pad. + + + + a #GstPad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the #GstPadChainFunction from the given @pad. + + + + a #GstPad + + + + + Get the #GstPadChainListFunction from the given @pad. + + + + a #GstPad + + + + + + + + + + + + Get the #GstPadDirection of the given @pad. Accessor macro, use +gst_pad_get_direction() instead. + + + + a #GstPad + + + + + Get the private data of @pad, which is usually some pad- or stream-specific +structure created by the element and set on the pad when creating it. +No locking is performed in this function. + + + + a #GstPad + + + + + Get the #GstPadEventFullFunction from the given @pad, which +is the function that handles events on the pad. You can +use this to set your own event handling function on a pad +after you create it. If your element derives from a base +class, use the base class's virtual functions instead. + + + + a #GstPad + + + + + Get the #GstPadEventFunction from the given @pad, which +is the function that handles events on the pad. You can +use this to set your own event handling function on a pad +after you create it. If your element derives from a base +class, use the base class's virtual functions instead. + + + + a #GstPad + + + + + Get the #GstPadGetRangeFunction from the given @pad. + + + + a #GstPad + + + + + Get the stream lock of @pad. The stream lock is protecting the +resources used in the data processing functions of @pad. Accessor +macro, use GST_PAD_STREAM_LOCK() and GST_PAD_STREAM_UNLOCK() instead +to take/release the pad's stream lock. + + + + a #GstPad + + + + + Check if the given @pad has pending events. This is used internally by +GStreamer. + + + + a #GstPad + + + + + Check if the pad's accept intersect flag is set. The default accept-caps +handler will check if the caps intersect the query-caps result instead of +checking for a subset. This is interesting for parser elements that can +accept incompletely specified caps. + + + + a #GstPad + + + + + Check if the pad's accept caps operation will use the pad template caps. +The default accept-caps will do a query caps to get the caps, which might +be querying downstream causing unnecessary overhead. It is recommended to +implement a proper accept-caps query handler or to use this flag to prevent +recursive accept-caps handling. + + + + a #GstPad + + + + + + + + a #GstPad + + + + + Check if the dataflow on a @pad is blocked. Use gst_pad_is_blocked() instead. + + + + a #GstPad + + + + + Check if the @pad is currently blocking on a buffer or event. Use +gst_pad_is_blocking() instead. + + + + a #GstPad + + + + + Check if the @pad is in EOS state. + + + + a #GstPad + + + + + Check if the given @pad is using fixed caps, which means that +once the caps are set on the @pad, the caps query function will +only return those caps. See gst_pad_use_fixed_caps(). + + + + a #GstPad + + + + + Check if the given @pad is flushing. + + + + a #GstPad + + + + + + + + a #GstPad + + + + + Check if the given @pad is set as proxy allocation which means +that the default query handler will forward allocation queries to the +internally linked @pads instead of discarding them. + + + + a #GstPad + + + + + Check if the given @pad is set to proxy caps. This means that the default +event and query handler will forward all events and queries to the +internally linked @pads instead of discarding them. + + + + a #GstPad + + + + + Check if the given @pad is set to proxy scheduling queries, which means that +the default query handler will forward scheduling queries to the internally +linked @pads instead of discarding them. + + + + a #GstPad + + + + + + + + a #GstPad + + + + + + + + a #GstPad + + + + + Get the #GstPadIterIntLinkFunction from the given @pad. + + + + a #GstPad + + + + + Gets the last flow return on this pad + + + + a #GstPad + + + + + Get the #GstPadLinkFunction for the given @pad. + + + + a #GstPad + + + + + Macro to test if the given #GstPadLinkReturn value indicates a failed +link step. + + + + the #GstPadLinkReturn value + + + + + Macro to test if the given #GstPadLinkReturn value indicates a successful +link step. + + + + the #GstPadLinkReturn value + + + + + Get the #GstPadMode of pad, which will be GST_PAD_MODE_NONE if the pad +has not been activated yet, and otherwise either GST_PAD_MODE_PUSH or +GST_PAD_MODE_PULL depending on which mode the pad was activated in. + + + + a #GstPad + + + + + Get name of the given pad. +No locking is performed in this function, use gst_pad_get_name() instead. + + + + a #GstPad + + + + + Check if there is a parent object before calling into the @pad callbacks. +This is used internally by GStreamer. + + + + a #GstPad + + + + + Check if the @pad should be reconfigured/renegotiated. +The flag has to be unset manually after reconfiguration happened. +Use gst_pad_needs_reconfigure() or gst_pad_check_reconfigure() instead. + + + + a #GstPad + + + + + Get the @pad #GstPadTemplate. It describes the possible media types +a @pad or an element factory can handle. + + + + a #GstPad + + + + + Get the @pad parent. +No locking is performed in this function, use gst_pad_get_parent() instead. + + + + a #GstPad + + + + + Return the pad's peer member. This member is a pointer to the linked @pad. +No locking is performed in this function, use gst_pad_get_peer() instead. + + + + a #GstPad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the #GstPadQueryFunction from @pad, which is the function +that handles queries on the pad. You can use this to set your +own query handling function on a pad after you create it. If your +element derives from a base class, use the base class's virtual +functions instead. + + + + a #GstPad + + + + + Set @pad to by default accept caps by intersecting the result instead of +checking for a subset. This is interesting for parser elements that can +accept incompletely specified caps. + + + + a #GstPad + + + + + Set @pad to by default use the pad template caps to compare with +the accept caps instead of using a caps query result. + + + + a #GstPad + + + + + Set the given @pad to flushing state, which means it will not accept any +more events, queries or buffers, and return GST_FLOW_FLUSHING if any buffers +are pushed on it. This usually happens when the pad is shut down or when +a flushing seek happens. This is used inside GStreamer when flush start/stop +events pass through pads, or when an element state is changed and pads are +activated or deactivated. + + + + a #GstPad + + + + + Set @pad to proxy allocation queries, which means that the default query +handler will forward allocation queries to the internally linked @pads +instead of discarding them. +Set this if the element always outputs data in the exact same format as it +receives as input. This is just for convenience to avoid implementing some +standard query handling code in an element. + + + + a #GstPad + + + + + Set @pad to proxy caps, so that all caps-related events and queries are +proxied down- or upstream to the other side of the element automatically. +Set this if the element always outputs data in the exact same format as it +receives as input. This is just for convenience to avoid implementing some +standard event and query handling code in an element. + + + + a #GstPad + + + + + Set @pad to proxy scheduling queries, which means that the default query +handler will forward scheduling queries to the internally linked @pads +instead of discarding them. You will usually want to handle scheduling +queries explicitly if your element supports multiple scheduling modes. + + + + a #GstPad + + + + + Take the pad's stream lock. The stream lock is recursive and will be taken +when buffers or serialized downstream events are pushed on a pad. + + + + a #GstPad + + + + + Try to take the pad's stream lock, and return %TRUE if the lock could be +taken, and otherwise %FALSE. + + + + a #GstPad + + + + + Release the pad's stream lock. + + + + a #GstPad + + + + + Get the #GstTask of @pad. Accessor macro used by GStreamer. Use the +gst_pad_start_task(), gst_pad_stop_task() and gst_pad_pause_task() +functions instead. + + + + a #GstPad + + + + + + + + + + + + Get a handle to the padtemplate #GstCaps + + + + the template to query + + + + + + + + + + + + Get the #GstPadDirection of the padtemplate. + + + + the template to query + + + + + Get the #GType of the padtemplate + + + + the template to query + + + + + Check if the properties of the padtemplate are fixed + + + + the template to query + + + + + Get the nametemplate of the padtemplate. + + + + the template to query + + + + + Get the #GstPadPresence of the padtemplate. + + + + the template to query + + + + + Get the #GstPadUnlinkFunction from the given @pad. + + + + a #GstPad + + + + + Unset accept intersect flag. + + + + a #GstPad + + + + + Unset accept template flag. + + + + a #GstPad + + + + + Unset the flushing flag. + + + + a #GstPad + + + + + Unset proxy allocation flag. + + + + a #GstPad + + + + + Unset proxy caps flag. + + + + a #GstPad + + + + + Unset proxy scheduling flag. + + + + a #GstPad + + + + + Use this flag on GObject properties of GstObject to indicate that +they might not be available depending on environment such as OS, device, etc, +so such properties will be installed conditionally only if the GstObject is +able to support it. + + + + + Use this flag on GObject properties to signal they can make sense to be. +controlled over time. This hint is used by the GstController. + + + + + Use this flag on GObject properties of GstObject to indicate that +during `gst-inspect` and friends, the default value should be used +as default instead of the current value. + + + + + Use this flag on GObject properties of GstElements to indicate that +they can be changed when the element is in the PAUSED or lower state. +This flag implies GST_PARAM_MUTABLE_READY. + + + + + Use this flag on GObject properties of GstElements to indicate that +they can be changed when the element is in the PLAYING or lower state. +This flag implies GST_PARAM_MUTABLE_PAUSED. + + + + + Use this flag on GObject properties of GstElements to indicate that +they can be changed when the element is in the READY or lower state. + + + + + + + + + + + + + + + + + + + Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This macro needs to be used to define the entry point and meta data of a +plugin. One would use this macro to export a plugin, so that it can be used +by other applications. + +The macro uses a define named PACKAGE for the #GstPluginDesc,source field. +When using autoconf, this is usually set automatically via the AC_INIT +macro, and set in config.h. If you are not using autoconf, you will need to +define PACKAGE yourself and set it to a short mnemonic string identifying +your application/package, e.g. 'someapp' or 'my-plugins-foo. + +If defined, the GST_PACKAGE_RELEASE_DATETIME will also be used for the +#GstPluginDesc,release_datetime field. + + + + major version number of the gstreamer-core that plugin was compiled for + + + minor version number of the gstreamer-core that plugin was compiled for + + + short, but unique name of the plugin + + + information about the purpose of the plugin + + + function pointer to the plugin_init method with the signature of <code>static gboolean plugin_init (GstPlugin * plugin)</code>. + + + full version string (e.g. VERSION from config.h) + + + under which licence the package has been released, e.g. GPL, LGPL. + + + the package-name (e.g. PACKAGE_NAME from config.h) + + + a description from where the package comes from (e.g. the homepage URL) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Debug the plugin feature names in @list. + + + + a #GList of + plugin features + + + + + + + + + + + + This macro can be used to initialize statically linked plugins. It is +necessary to call this macro before the plugin can be used. +It has to be used in combination with GST_PLUGIN_STATIC_REGISTER +and must be placed outside any block to declare the plugin initialization +function. + + + + short, but unique name of the plugin + + + + + This macro can be used to initialize statically linked plugins. It is +necessary to call this macro before the plugin can be used. +It has to be used in combination with GST_PLUGIN_STATIC_DECLARE and +calls the plugin initialization function. + + + + short, but unique name of the plugin + + + + + + + + + + + + + + + + + + + + + + + + + + The field name in a GstCaps that is used to signal the UUID of the protection +system. + + + + + The protection system value of the unspecified UUID. +In some cases the system protection ID is not present in the contents or in their +metadata, as encrypted WebM. +This define is used to set the value of the "system_id" field in GstProtectionEvent, +with this value, the application will use an external information to choose which +protection system to use. + +Example: The matroskademux uses this value in the case of encrypted WebM, +the application will choose the appropriate protection system based on the information +received through EME API. + + + + + + + + + + + + + + + + + + + printf format type used to debug GStreamer types. You can use this in +combination with GStreamer's debug logging system as well as the functions +gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() +to pretty-print the following types: #GstCaps, #GstStructure, +#GstCapsFeatures, #GstTagList, #GstDateTime, #GstBuffer, #GstBufferList, +#GstMessage, #GstEvent, #GstQuery, #GstContext, #GstPad, #GstObject. All +#GObject types will be printed as typename plus pointer, and everything +else will simply be printed as pointer address. + +This can only be used on types whose size is >= sizeof(gpointer). + + + + + A #GstElement is linked to other elements via "pads", which are extremely +light-weight generic link points. + +Pads have a #GstPadDirection, source pads produce data, sink pads consume +data. + +Pads are typically created from a #GstPadTemplate with +gst_pad_new_from_template() and are then added to a #GstElement. This usually +happens when the element is created but it can also happen dynamically based +on the data that the element is processing or based on the pads that the +application requests. + +Pads without pad templates can be created with gst_pad_new(), +which takes a direction and a name as an argument. If the name is %NULL, +then a guaranteed unique name will be assigned to it. + +A #GstElement creating a pad will typically use the various +gst_pad_set_*_function\() calls to register callbacks for events, queries or +dataflow on the pads. + +gst_pad_get_parent() will retrieve the #GstElement that owns the pad. + +After two pads are retrieved from an element by gst_element_get_static_pad(), +the pads can be linked with gst_pad_link(). (For quick links, +you can also use gst_element_link(), which will make the obvious +link for you if it's straightforward.). Pads can be unlinked again with +gst_pad_unlink(). gst_pad_get_peer() can be used to check what the pad is +linked to. + +Before dataflow is possible on the pads, they need to be activated with +gst_pad_set_active(). + +gst_pad_query() and gst_pad_peer_query() can be used to query various +properties of the pad and the stream. + +To send a #GstEvent on a pad, use gst_pad_send_event() and +gst_pad_push_event(). Some events will be sticky on the pad, meaning that +after they pass on the pad they can be queried later with +gst_pad_get_sticky_event() and gst_pad_sticky_events_foreach(). +gst_pad_get_current_caps() and gst_pad_has_current_caps() are convenience +functions to query the current sticky CAPS event on a pad. + +GstElements will use gst_pad_push() and gst_pad_pull_range() to push out +or pull in a buffer. + +The dataflow, events and queries that happen on a pad can be monitored with +probes that can be installed with gst_pad_add_probe(). gst_pad_is_blocked() +can be used to check if a block probe is installed on the pad. +gst_pad_is_blocking() checks if the blocking probe is currently blocking the +pad. gst_pad_remove_probe() is used to remove a previously installed probe +and unblock blocking probes if any. + +Pad have an offset that can be retrieved with gst_pad_get_offset(). This +offset will be applied to the running_time of all data passing over the pad. +gst_pad_set_offset() can be used to change the offset. + +Convenience functions exist to start, pause and stop the task on a pad with +gst_pad_start_task(), gst_pad_pause_task() and gst_pad_stop_task() +respectively. + + + Creates a new pad with the given name in the given direction. +If name is %NULL, a guaranteed unique name (across all pads) +will be assigned. +This function makes a copy of the name so you can safely free the name. + + + a new #GstPad. + +MT safe. + + + + + the name of the new pad. + + + + the #GstPadDirection of the pad. + + + + + + Creates a new pad with the given name from the given static template. +If name is %NULL, a guaranteed unique name (across all pads) +will be assigned. +This function makes a copy of the name so you can safely free the name. + + + a new #GstPad. + + + + + the #GstStaticPadTemplate to use + + + + the name of the pad + + + + + + Creates a new pad with the given name from the given template. +If name is %NULL, a guaranteed unique name (across all pads) +will be assigned. +This function makes a copy of the name so you can safely free the name. + + + a new #GstPad. + + + + + the pad template to use + + + + the name of the pad + + + + + + Gets a string representing the given pad-link return. + + + a static string with the name of the pad-link return. + + + + + a #GstPadLinkReturn to get the name of. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Activates or deactivates the given pad in @mode via dispatching to the +pad's activatemodefunc. For use from within pad activation functions only. + +If you don't know what this is, you probably don't want to call it. + + + %TRUE if the operation was successful. + +MT safe. + + + + + the #GstPad to activate or deactivate. + + + + the requested activation mode + + + + whether or not the pad should be active. + + + + + + Be notified of different states of pads. The provided callback is called for +every state that matches @mask. + +Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are +called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only +exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called +immediately if the pad is already idle while calling gst_pad_add_probe(). +In each of the groups, probes are called in the order in which they were +added. + + + an id or 0 if no probe is pending. The id can be used to remove the +probe with gst_pad_remove_probe(). When using GST_PAD_PROBE_TYPE_IDLE it can +happen that the probe can be run immediately and if the probe returns +GST_PAD_PROBE_REMOVE this functions returns 0. + +MT safe. + + + + + the #GstPad to add the probe to + + + + the probe mask + + + + #GstPadProbeCallback that will be called with notifications of + the pad state + + + + user data passed to the callback + + + + #GDestroyNotify for user_data + + + + + + Checks if the source pad and the sink pad are compatible so they can be +linked. + + + %TRUE if the pads can be linked. + + + + + the source #GstPad. + + + + the sink #GstPad. + + + + + + Chain a buffer to @pad. + +The function returns #GST_FLOW_FLUSHING if the pad was flushing. + +If the buffer type is not acceptable for @pad (as negotiated with a +preceding GST_EVENT_CAPS event), this function returns +#GST_FLOW_NOT_NEGOTIATED. + +The function proceeds calling the chain function installed on @pad (see +gst_pad_set_chain_function()) and the return value of that function is +returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no +chain function. + +In all cases, success or failure, the caller loses its reference to @buffer +after calling this function. + + + a #GstFlowReturn from the pad. + +MT safe. + + + + + a sink #GstPad, returns GST_FLOW_ERROR if not. + + + + the #GstBuffer to send, return GST_FLOW_ERROR + if not. + + + + + + Chain a bufferlist to @pad. + +The function returns #GST_FLOW_FLUSHING if the pad was flushing. + +If @pad was not negotiated properly with a CAPS event, this function +returns #GST_FLOW_NOT_NEGOTIATED. + +The function proceeds calling the chainlist function installed on @pad (see +gst_pad_set_chain_list_function()) and the return value of that function is +returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no +chainlist function. + +In all cases, success or failure, the caller loses its reference to @list +after calling this function. + +MT safe. + + + a #GstFlowReturn from the pad. + + + + + a sink #GstPad, returns GST_FLOW_ERROR if not. + + + + the #GstBufferList to send, return GST_FLOW_ERROR + if not. + + + + + + Check and clear the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE +if the flag was set. + + + %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @pad. + + + + + the #GstPad to check + + + + + + Creates a stream-id for the source #GstPad @pad by combining the +upstream information with the optional @stream_id of the stream +of @pad. @pad must have a parent #GstElement and which must have zero +or one sinkpad. @stream_id can only be %NULL if the parent element +of @pad has only a single source pad. + +This function generates an unique stream-id by getting the upstream +stream-start event stream ID and appending @stream_id to it. If the +element has no sinkpad it will generate an upstream stream-id by +doing an URI query on the element and in the worst case just uses +a random number. Source elements that don't implement the URI +handler interface should ideally generate a unique, deterministic +stream-id manually instead. + +Since stream IDs are sorted alphabetically, any numbers in the +stream ID should be printed with a fixed number of characters, +preceded by 0's, such as by using the format \%03u instead of \%u. + + + A stream-id for @pad. g_free() after usage. + + + + + A source #GstPad + + + + Parent #GstElement of @pad + + + + The stream-id + + + + + + Creates a stream-id for the source #GstPad @pad by combining the +upstream information with the optional @stream_id of the stream +of @pad. @pad must have a parent #GstElement and which must have zero +or one sinkpad. @stream_id can only be %NULL if the parent element +of @pad has only a single source pad. + +This function generates an unique stream-id by getting the upstream +stream-start event stream ID and appending @stream_id to it. If the +element has no sinkpad it will generate an upstream stream-id by +doing an URI query on the element and in the worst case just uses +a random number. Source elements that don't implement the URI +handler interface should ideally generate a unique, deterministic +stream-id manually instead. + + + A stream-id for @pad. g_free() after usage. + + + + + A source #GstPad + + + + Parent #GstElement of @pad + + + + The stream-id + + + + parameters for the @stream_id format string + + + + + + Creates a stream-id for the source #GstPad @pad by combining the +upstream information with the optional @stream_id of the stream +of @pad. @pad must have a parent #GstElement and which must have zero +or one sinkpad. @stream_id can only be %NULL if the parent element +of @pad has only a single source pad. + +This function generates an unique stream-id by getting the upstream +stream-start event stream ID and appending @stream_id to it. If the +element has no sinkpad it will generate an upstream stream-id by +doing an URI query on the element and in the worst case just uses +a random number. Source elements that don't implement the URI +handler interface should ideally generate a unique, deterministic +stream-id manually instead. + + + A stream-id for @pad. g_free() after usage. + + + + + A source #GstPad + + + + Parent #GstElement of @pad + + + + The stream-id + + + + parameters for the @stream_id format string + + + + + + Invokes the default event handler for the given pad. + +The EOS event will pause the task associated with @pad before it is forwarded +to all internally linked pads, + +The event is sent to all pads internally linked to @pad. This function +takes ownership of @event. + + + %TRUE if the event was sent successfully. + + + + + a #GstPad to call the default event handler on. + + + + the parent of @pad or %NULL + + + + the #GstEvent to handle. + + + + + + Calls @forward for all internally linked pads of @pad. This function deals with +dynamically changing internal pads and will make sure that the @forward +function is only called once for each pad. + +When @forward returns %TRUE, no further pads will be processed. + + + %TRUE if one of the dispatcher functions returned %TRUE. + + + + + a #GstPad + + + + a #GstPadForwardFunction + + + + user data passed to @forward + + + + + + Gets the capabilities of the allowed media types that can flow through +@pad and its peer. + +The allowed capabilities is calculated as the intersection of the results of +calling gst_pad_query_caps() on @pad and its peer. The caller owns a reference +on the resulting caps. + + + the allowed #GstCaps of the + pad link. Unref the caps when you no longer need it. This + function returns %NULL when @pad has no peer. + +MT safe. + + + + + a #GstPad. + + + + + + Gets the capabilities currently configured on @pad with the last +#GST_EVENT_CAPS event. + + + the current caps of the pad with +incremented ref-count or %NULL when pad has no caps. Unref after usage. + + + + + a #GstPad to get the current capabilities of. + + + + + + Gets the direction of the pad. The direction of the pad is +decided at construction time so this function does not take +the LOCK. + + + the #GstPadDirection of the pad. + +MT safe. + + + + + a #GstPad to get the direction of. + + + + + + Gets the private data of a pad. +No locking is performed in this function. + + + a #gpointer to the private data. + + + + + the #GstPad to get the private data of. + + + + + + Gets the #GstFlowReturn return from the last data passed by this pad. + + + + + + + the #GstPad + + + + + + Get the offset applied to the running time of @pad. @pad has to be a source +pad. + + + the offset. + + + + + a #GstPad + + + + + + Gets the template for @pad. + + + the #GstPadTemplate from which + this pad was instantiated, or %NULL if this pad has no + template. Unref after usage. + + + + + a #GstPad. + + + + + + Gets the capabilities for @pad's template. + + + the #GstCaps of this pad template. +Unref after usage. + + + + + a #GstPad to get the template capabilities from. + + + + + + Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or +its parent is not an element, return %NULL. + + + the parent of the pad. The +caller has a reference on the parent, so unref when you're finished +with it. + +MT safe. + + + + + a pad + + + + + + Gets the peer of @pad. This function refs the peer pad so +you need to unref it after use. + + + the peer #GstPad. Unref after usage. + +MT safe. + + + + + a #GstPad to get the peer of. + + + + + + When @pad is flushing this function returns #GST_FLOW_FLUSHING +immediately and @buffer is %NULL. + +Calls the getrange function of @pad, see #GstPadGetRangeFunction for a +description of a getrange function. If @pad has no getrange function +installed (see gst_pad_set_getrange_function()) this function returns +#GST_FLOW_NOT_SUPPORTED. + +If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be +placed in @buffer when this function returns #GST_FLOW_OK. The new buffer +must be freed with gst_buffer_unref() after usage. + +When @buffer points to a variable that points to a valid #GstBuffer, the +buffer will be filled with the result data when this function returns +#GST_FLOW_OK. If the provided buffer is larger than @size, only +@size bytes will be filled in the result buffer and its size will be updated +accordingly. + +Note that less than @size bytes can be returned in @buffer when, for example, +an EOS condition is near or when @buffer is not large enough to hold @size +bytes. The caller should check the result buffer size to get the result size. + +When this function returns any other result value than #GST_FLOW_OK, @buffer +will be unchanged. + +This is a lowlevel function. Usually gst_pad_pull_range() is used. + + + a #GstFlowReturn from the pad. + +MT safe. + + + + + a src #GstPad, returns #GST_FLOW_ERROR if not. + + + + The start offset of the buffer + + + + The length of the buffer + + + + a pointer to hold the #GstBuffer, + returns #GST_FLOW_ERROR if %NULL. + + + + + + If there is a single internal link of the given pad, this function will +return it. Otherwise, it will return NULL. + + + a #GstPad, or %NULL if @pad has none +or more than one internal links. Unref returned pad with +gst_object_unref(). + + + + + the #GstPad to get the internal link of. + + + + + + Returns a new reference of the sticky event of type @event_type +from the event. + + + a #GstEvent of type +@event_type or %NULL when no event of @event_type was on +@pad. Unref after usage. + + + + + the #GstPad to get the event from. + + + + the #GstEventType that should be retrieved. + + + + the index of the event + + + + + + Returns the current #GstStream for the @pad, or %NULL if none has been +set yet, i.e. the pad has not received a stream-start event yet. + +This is a convenience wrapper around gst_pad_get_sticky_event() and +gst_event_parse_stream(). + + + the current #GstStream for @pad, or %NULL. + unref the returned stream when no longer needed. + + + + + A source #GstPad + + + + + + Returns the current stream-id for the @pad, or %NULL if none has been +set yet, i.e. the pad has not received a stream-start event yet. + +This is a convenience wrapper around gst_pad_get_sticky_event() and +gst_event_parse_stream_start(). + +The returned stream-id string should be treated as an opaque string, its +contents should not be interpreted. + + + a newly-allocated copy of the stream-id for + @pad, or %NULL. g_free() the returned string when no longer + needed. + + + + + A source #GstPad + + + + + + Get @pad task state. If no task is currently +set, #GST_TASK_STOPPED is returned. + + + The current state of @pad's task. + + + + + the #GstPad to get task state from + + + + + + Check if @pad has caps set on it with a #GST_EVENT_CAPS event. + + + %TRUE when @pad has caps associated with it. + + + + + a #GstPad to check + + + + + + Query if a pad is active + + + %TRUE if the pad is active. + +MT safe. + + + + + the #GstPad to query + + + + + + Checks if the pad is blocked or not. This function returns the +last requested state of the pad. It is not certain that the pad +is actually blocking at this point (see gst_pad_is_blocking()). + + + %TRUE if the pad is blocked. + +MT safe. + + + + + the #GstPad to query + + + + + + Checks if the pad is blocking or not. This is a guaranteed state +of whether the pad is actually blocking on a #GstBuffer or a #GstEvent. + + + %TRUE if the pad is blocking. + +MT safe. + + + + + the #GstPad to query + + + + + + Checks if a @pad is linked to another pad or not. + + + %TRUE if the pad is linked, %FALSE otherwise. + +MT safe. + + + + + pad to check + + + + + + Gets an iterator for the pads to which the given pad is linked to inside +of the parent element. + +Each #GstPad element yielded by the iterator will have its refcount increased, +so unref after use. + +Free-function: gst_iterator_free + + + a new #GstIterator of #GstPad + or %NULL when the pad does not have an iterator function + configured. Use gst_iterator_free() after usage. + + + + + the GstPad to get the internal links of. + + + + + + Iterate the list of pads to which the given pad is linked to inside of +the parent element. +This is the default handler, and thus returns an iterator of all of the +pads inside the parent element with opposite direction. + +The caller must free this iterator after use with gst_iterator_free(). + + + a #GstIterator of #GstPad, or %NULL if @pad +has no parent. Unref each returned pad with gst_object_unref(). + + + + + the #GstPad to get the internal links of. + + + + the parent of @pad or %NULL + + + + + + Links the source pad and the sink pad. + + + A result code indicating if the connection worked or + what went wrong. + +MT Safe. + + + + + the source #GstPad to link. + + + + the sink #GstPad to link. + + + + + + Links the source pad and the sink pad. + +This variant of #gst_pad_link provides a more granular control on the +checks being done when linking. While providing some considerable speedups +the caller of this method must be aware that wrong usage of those flags +can cause severe issues. Refer to the documentation of #GstPadLinkCheck +for more information. + +MT Safe. + + + A result code indicating if the connection worked or + what went wrong. + + + + + the source #GstPad to link. + + + + the sink #GstPad to link. + + + + the checks to validate when linking + + + + + + Links @src to @sink, creating any #GstGhostPad's in between as necessary. + +This is a convenience function to save having to create and add intermediate +#GstGhostPad's as required for linking across #GstBin boundaries. + +If @src or @sink pads don't have parent elements or do not share a common +ancestor, the link will fail. + + + whether the link succeeded. + + + + + a #GstPad + + + + a #GstPad + + + + + + Links @src to @sink, creating any #GstGhostPad's in between as necessary. + +This is a convenience function to save having to create and add intermediate +#GstGhostPad's as required for linking across #GstBin boundaries. + +If @src or @sink pads don't have parent elements or do not share a common +ancestor, the link will fail. + +Calling gst_pad_link_maybe_ghosting_full() with +@flags == %GST_PAD_LINK_CHECK_DEFAULT is the recommended way of linking +pads with safety checks applied. + + + whether the link succeeded. + + + + + a #GstPad + + + + a #GstPad + + + + some #GstPadLinkCheck flags + + + + + + Mark a pad for needing reconfiguration. The next call to +gst_pad_check_reconfigure() will return %TRUE after this call. + + + + + + + the #GstPad to mark + + + + + + Check the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE +if the flag was set. + + + %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on @pad. + + + + + the #GstPad to check + + + + + + Pause the task of @pad. This function will also wait until the +function executed by the task is finished if this function is not +called from the task function. + + + a %TRUE if the task could be paused or %FALSE when the pad +has no task. + + + + + the #GstPad to pause the task of + + + + + + Performs gst_pad_query() on the peer of @pad. + +The caller is responsible for both the allocation and deallocation of +the query structure. + + + %TRUE if the query could be performed. This function returns %FALSE +if @pad has no peer. + + + + + a #GstPad to invoke the peer query on. + + + + the #GstQuery to perform. + + + + + + Check if the peer of @pad accepts @caps. If @pad has no peer, this function +returns %TRUE. + + + %TRUE if the peer of @pad can accept the caps or @pad has no peer. + + + + + a #GstPad to check the peer of + + + + a #GstCaps to check on the pad + + + + + + Gets the capabilities of the peer connected to this pad. Similar to +gst_pad_query_caps(). + +When called on srcpads @filter contains the caps that +upstream could produce in the order preferred by upstream. When +called on sinkpads @filter contains the caps accepted by +downstream in the preferred order. @filter might be %NULL but +if it is not %NULL the returned caps will be a subset of @filter. + + + the caps of the peer pad with incremented +ref-count. When there is no peer pad, this function returns @filter or, +when @filter is %NULL, ANY caps. + + + + + a #GstPad to get the capabilities of. + + + + a #GstCaps filter, or %NULL. + + + + + + Queries the peer pad of a given sink pad to convert @src_val in @src_format +to @dest_format. + + + %TRUE if the query could be performed. + + + + + a #GstPad, on whose peer pad to invoke the convert query on. + Must be a sink pad. + + + + a #GstFormat to convert from. + + + + a value to convert. + + + + the #GstFormat to convert to. + + + + a pointer to the result. + + + + + + Queries the peer pad of a given sink pad for the total stream duration. + + + %TRUE if the query could be performed. + + + + + a #GstPad on whose peer pad to invoke the duration query on. + Must be a sink pad. + + + + the #GstFormat requested + + + + a location in which to store the total + duration, or %NULL. + + + + + + Queries the peer of a given sink pad for the stream position. + + + %TRUE if the query could be performed. + + + + + a #GstPad on whose peer to invoke the position query on. + Must be a sink pad. + + + + the #GstFormat requested + + + + a location in which to store the current + position, or %NULL. + + + + + + Checks if all internally linked pads of @pad accepts the caps in @query and +returns the intersection of the results. + +This function is useful as a default accept caps query function for an element +that can handle any stream format, but requires caps that are acceptable for +all opposite pads. + + + %TRUE if @query could be executed + + + + + a #GstPad to proxy. + + + + an ACCEPT_CAPS #GstQuery. + + + + + + Calls gst_pad_query_caps() for all internally linked pads of @pad and returns +the intersection of the results. + +This function is useful as a default caps query function for an element +that can handle any stream format, but requires all its pads to have +the same caps. Two such elements are tee and adder. + + + %TRUE if @query could be executed + + + + + a #GstPad to proxy. + + + + a CAPS #GstQuery. + + + + + + Pulls a @buffer from the peer pad or fills up a provided buffer. + +This function will first trigger the pad block signal if it was +installed. + +When @pad is not linked #GST_FLOW_NOT_LINKED is returned else this +function returns the result of gst_pad_get_range() on the peer pad. +See gst_pad_get_range() for a list of return values and for the +semantics of the arguments of this function. + +If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be +placed in @buffer when this function returns #GST_FLOW_OK. The new buffer +must be freed with gst_buffer_unref() after usage. When this function +returns any other result value, @buffer will still point to %NULL. + +When @buffer points to a variable that points to a valid #GstBuffer, the +buffer will be filled with the result data when this function returns +#GST_FLOW_OK. When this function returns any other result value, +@buffer will be unchanged. If the provided buffer is larger than @size, only +@size bytes will be filled in the result buffer and its size will be updated +accordingly. + +Note that less than @size bytes can be returned in @buffer when, for example, +an EOS condition is near or when @buffer is not large enough to hold @size +bytes. The caller should check the result buffer size to get the result size. + + + a #GstFlowReturn from the peer pad. + +MT safe. + + + + + a sink #GstPad, returns GST_FLOW_ERROR if not. + + + + The start offset of the buffer + + + + The length of the buffer + + + + a pointer to hold the #GstBuffer, returns + GST_FLOW_ERROR if %NULL. + + + + + + Pushes a buffer to the peer of @pad. + +This function will call installed block probes before triggering any +installed data probes. + +The function proceeds calling gst_pad_chain() on the peer pad and returns +the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will +be returned. + +In all cases, success or failure, the caller loses its reference to @buffer +after calling this function. + + + a #GstFlowReturn from the peer pad. + +MT safe. + + + + + a source #GstPad, returns #GST_FLOW_ERROR if not. + + + + the #GstBuffer to push returns GST_FLOW_ERROR + if not. + + + + + + Sends the event to the peer of the given pad. This function is +mainly used by elements to send events to their peer +elements. + +This function takes ownership of the provided event so you should +gst_event_ref() it if you want to reuse the event after this call. + + + %TRUE if the event was handled. + +MT safe. + + + + + a #GstPad to push the event to. + + + + the #GstEvent to send to the pad. + + + + + + Pushes a buffer list to the peer of @pad. + +This function will call installed block probes before triggering any +installed data probes. + +The function proceeds calling the chain function on the peer pad and returns +the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will +be returned. If the peer pad does not have any installed chainlist function +every group buffer of the list will be merged into a normal #GstBuffer and +chained via gst_pad_chain(). + +In all cases, success or failure, the caller loses its reference to @list +after calling this function. + + + a #GstFlowReturn from the peer pad. + +MT safe. + + + + + a source #GstPad, returns #GST_FLOW_ERROR if not. + + + + the #GstBufferList to push returns GST_FLOW_ERROR + if not. + + + + + + Dispatches a query to a pad. The query should have been allocated by the +caller via one of the type-specific allocation functions. The element that +the pad belongs to is responsible for filling the query with an appropriate +response, which should then be parsed with a type-specific query parsing +function. + +Again, the caller is responsible for both the allocation and deallocation of +the query structure. + +Please also note that some queries might need a running pipeline to work. + + + %TRUE if the query could be performed. + + + + + a #GstPad to invoke the default query on. + + + + the #GstQuery to perform. + + + + + + Check if the given pad accepts the caps. + + + %TRUE if the pad can accept the caps. + + + + + a #GstPad to check + + + + a #GstCaps to check on the pad + + + + + + Gets the capabilities this pad can produce or consume. +Note that this method doesn't necessarily return the caps set by sending a +gst_event_new_caps() - use gst_pad_get_current_caps() for that instead. +gst_pad_query_caps returns all possible caps a pad can operate with, using +the pad's CAPS query function, If the query fails, this function will return +@filter, if not %NULL, otherwise ANY. + +When called on sinkpads @filter contains the caps that +upstream could produce in the order preferred by upstream. When +called on srcpads @filter contains the caps accepted by +downstream in the preferred order. @filter might be %NULL but +if it is not %NULL the returned caps will be a subset of @filter. + +Note that this function does not return writable #GstCaps, use +gst_caps_make_writable() before modifying the caps. + + + the caps of the pad with incremented ref-count. + + + + + a #GstPad to get the capabilities of. + + + + suggested #GstCaps, or %NULL + + + + + + Queries a pad to convert @src_val in @src_format to @dest_format. + + + %TRUE if the query could be performed. + + + + + a #GstPad to invoke the convert query on. + + + + a #GstFormat to convert from. + + + + a value to convert. + + + + the #GstFormat to convert to. + + + + a pointer to the result. + + + + + + Invokes the default query handler for the given pad. +The query is sent to all pads internally linked to @pad. Note that +if there are many possible sink pads that are internally linked to +@pad, only one will be sent the query. +Multi-sinkpad elements should implement custom query handlers. + + + %TRUE if the query was performed successfully. + + + + + a #GstPad to call the default query handler on. + + + + the parent of @pad or %NULL + + + + the #GstQuery to handle. + + + + + + Queries a pad for the total stream duration. + + + %TRUE if the query could be performed. + + + + + a #GstPad to invoke the duration query on. + + + + the #GstFormat requested + + + + a location in which to store the total + duration, or %NULL. + + + + + + Queries a pad for the stream position. + + + %TRUE if the query could be performed. + + + + + a #GstPad to invoke the position query on. + + + + the #GstFormat requested + + + + A location in which to store the current position, or %NULL. + + + + + + Remove the probe with @id from @pad. + +MT safe. + + + + + + + the #GstPad with the probe + + + + the probe id to remove + + + + + + Sends the event to the pad. This function can be used +by applications to send events in the pipeline. + +If @pad is a source pad, @event should be an upstream event. If @pad is a +sink pad, @event should be a downstream event. For example, you would not +send a #GST_EVENT_EOS on a src pad; EOS events only propagate downstream. +Furthermore, some downstream events have to be serialized with data flow, +like EOS, while some can travel out-of-band, like #GST_EVENT_FLUSH_START. If +the event needs to be serialized with data flow, this function will take the +pad's stream lock while calling its event function. + +To find out whether an event type is upstream, downstream, or downstream and +serialized, see #GstEventTypeFlags, gst_event_type_get_flags(), +#GST_EVENT_IS_UPSTREAM, #GST_EVENT_IS_DOWNSTREAM, and +#GST_EVENT_IS_SERIALIZED. Note that in practice that an application or +plugin doesn't need to bother itself with this information; the core handles +all necessary locks and checks. + +This function takes ownership of the provided event so you should +gst_event_ref() it if you want to reuse the event after this call. + + + %TRUE if the event was handled. + + + + + a #GstPad to send the event to. + + + + the #GstEvent to send to the pad. + + + + + + Sets the given activate function for @pad. The activate function will +dispatch to gst_pad_activate_mode() to perform the actual activation. +Only makes sense to set on sink pads. + +Call this function if your sink pad can start a pull-based task. + + + + + + + a #GstPad. + + + + the #GstPadActivateFunction to set. + + + + user_data passed to @notify + + + + notify called when @activate will not be used anymore. + + + + + + Sets the given activate_mode function for the pad. An activate_mode function +prepares the element for data passing. + + + + + + + a #GstPad. + + + + the #GstPadActivateModeFunction to set. + + + + user_data passed to @notify + + + + notify called when @activatemode will not be used anymore. + + + + + + Activates or deactivates the given pad. +Normally called from within core state change functions. + +If @active, makes sure the pad is active. If it is already active, either in +push or pull mode, just return. Otherwise dispatches to the pad's activate +function to perform the actual activation. + +If not @active, calls gst_pad_activate_mode() with the pad's current mode +and a %FALSE argument. + + + %TRUE if the operation was successful. + +MT safe. + + + + + the #GstPad to activate or deactivate. + + + + whether or not the pad should be active. + + + + + + Sets the given chain function for the pad. The chain function is called to +process a #GstBuffer input buffer. see #GstPadChainFunction for more details. + + + + + + + a sink #GstPad. + + + + the #GstPadChainFunction to set. + + + + user_data passed to @notify + + + + notify called when @chain will not be used anymore. + + + + + + Sets the given chain list function for the pad. The chainlist function is +called to process a #GstBufferList input buffer list. See +#GstPadChainListFunction for more details. + + + + + + + a sink #GstPad. + + + + the #GstPadChainListFunction to set. + + + + user_data passed to @notify + + + + notify called when @chainlist will not be used anymore. + + + + + + Set the given private data gpointer on the pad. +This function can only be used by the element that owns the pad. +No locking is performed in this function. + + + + + + + the #GstPad to set the private data of. + + + + The private data to attach to the pad. + + + + + + Sets the given event handler for the pad. + + + + + + + a #GstPad of either direction. + + + + the #GstPadEventFullFunction to set. + + + + user_data passed to @notify + + + + notify called when @event will not be used anymore. + + + + + + Sets the given event handler for the pad. + + + + + + + a #GstPad of either direction. + + + + the #GstPadEventFunction to set. + + + + user_data passed to @notify + + + + notify called when @event will not be used anymore. + + + + + + Sets the given getrange function for the pad. The getrange function is +called to produce a new #GstBuffer to start the processing pipeline. see +#GstPadGetRangeFunction for a description of the getrange function. + + + + + + + a source #GstPad. + + + + the #GstPadGetRangeFunction to set. + + + + user_data passed to @notify + + + + notify called when @get will not be used anymore. + + + + + + Sets the given internal link iterator function for the pad. + + + + + + + a #GstPad of either direction. + + + + the #GstPadIterIntLinkFunction to set. + + + + user_data passed to @notify + + + + notify called when @iterintlink will not be used anymore. + + + + + + Sets the given link function for the pad. It will be called when +the pad is linked with another pad. + +The return value #GST_PAD_LINK_OK should be used when the connection can be +made. + +The return value #GST_PAD_LINK_REFUSED should be used when the connection +cannot be made for some reason. + +If @link is installed on a source pad, it should call the #GstPadLinkFunction +of the peer sink pad, if present. + + + + + + + a #GstPad. + + + + the #GstPadLinkFunction to set. + + + + user_data passed to @notify + + + + notify called when @link will not be used anymore. + + + + + + Set the offset that will be applied to the running time of @pad. + + + + + + + a #GstPad + + + + the offset + + + + + + Set the given query function for the pad. + + + + + + + a #GstPad of either direction. + + + + the #GstPadQueryFunction to set. + + + + user_data passed to @notify + + + + notify called when @query will not be used anymore. + + + + + + Sets the given unlink function for the pad. It will be called +when the pad is unlinked. + +Note that the pad's lock is already held when the unlink +function is called, so most pad functions cannot be called +from within the callback. + + + + + + + a #GstPad. + + + + the #GstPadUnlinkFunction to set. + + + + user_data passed to @notify + + + + notify called when @unlink will not be used anymore. + + + + + + Starts a task that repeatedly calls @func with @user_data. This function +is mostly used in pad activation functions to start the dataflow. +The #GST_PAD_STREAM_LOCK of @pad will automatically be acquired +before @func is called. + + + a %TRUE if the task could be started. + + + + + the #GstPad to start the task of + + + + the task function to call + + + + user data passed to the task function + + + + called when @user_data is no longer referenced + + + + + + Iterates all sticky events on @pad and calls @foreach_func for every +event. If @foreach_func returns %FALSE the iteration is immediately stopped. + + + + + + + the #GstPad that should be used for iteration. + + + + the #GstPadStickyEventsForeachFunction that + should be called for every event. + + + + the optional user data. + + + + + + Stop the task of @pad. This function will also make sure that the +function executed by the task will effectively stop if not called +from the GstTaskFunction. + +This function will deadlock if called from the GstTaskFunction of +the task. Use gst_task_pause() instead. + +Regardless of whether the pad has a task, the stream lock is acquired and +released so as to ensure that streaming through this pad has finished. + + + a %TRUE if the task could be stopped or %FALSE on error. + + + + + the #GstPad to stop the task of + + + + + + Store the sticky @event on @pad + + + #GST_FLOW_OK on success, #GST_FLOW_FLUSHING when the pad +was flushing or #GST_FLOW_EOS when the pad was EOS. + + + + + a #GstPad + + + + a #GstEvent + + + + + + Unlinks the source pad from the sink pad. Will emit the #GstPad::unlinked +signal on both pads. + + + %TRUE if the pads were unlinked. This function returns %FALSE if +the pads were not linked together. + +MT safe. + + + + + the source #GstPad to unlink. + + + + the sink #GstPad to unlink. + + + + + + A helper function you can use that sets the FIXED_CAPS flag +This way the default CAPS query will always return the negotiated caps +or in case the pad is not negotiated, the padtemplate caps. + +The negotiated caps are the caps of the last CAPS event that passed on the +pad. Use this function on a pad that, once it negotiated to a CAPS, cannot +be renegotiated to something else. + + + + + + + the pad to use + + + + + + + + + + + + The offset that will be applied to the running time of the pad. + + + + + + + + + + private data owned by the parent element + + + + padtemplate for this pad + + + + the direction of the pad, cannot change after creating + the pad. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signals that a pad has been linked to the peer pad. + + + + + + the peer pad that has been connected + + + + + + Signals that a pad has been unlinked from the peer pad. + + + + + + the peer pad that has been disconnected + + + + + + + This function is called when the pad is activated during the element +READY to PAUSED state change. By default this function will call the +activate function that puts the pad in push mode but elements can +override this function to activate the pad in pull mode if they wish. + + + %TRUE if the pad could be activated. + + + + + a #GstPad + + + + the parent of @pad + + + + + + The prototype of the push and pull activate functions. + + + %TRUE if the pad could be activated or deactivated. + + + + + a #GstPad + + + + the parent of @pad + + + + the requested activation mode of @pad + + + + activate or deactivate the pad. + + + + + + A function that will be called on sinkpads when chaining buffers. +The function typically processes the data contained in the buffer and +either consumes the data or passes it on to the internally linked pad(s). + +The implementer of this function receives a refcount to @buffer and should +gst_buffer_unref() when the buffer is no longer needed. + +When a chain function detects an error in the data stream, it must post an +error on the bus and return an appropriate #GstFlowReturn value. + + + #GST_FLOW_OK for success + + + + + the sink #GstPad that performed the chain. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the #GstBuffer that is chained, not %NULL. + + + + + + A function that will be called on sinkpads when chaining buffer lists. +The function typically processes the data contained in the buffer list and +either consumes the data or passes it on to the internally linked pad(s). + +The implementer of this function receives a refcount to @list and +should gst_buffer_list_unref() when the list is no longer needed. + +When a chainlist function detects an error in the data stream, it must +post an error on the bus and return an appropriate #GstFlowReturn value. + + + #GST_FLOW_OK for success + + + + + the sink #GstPad that performed the chain. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the #GstBufferList that is chained, not %NULL. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The direction of a pad. + + direction is unknown. + + + the pad is a source pad. + + + the pad is a sink pad. + + + + Function signature to handle an event for the pad. + +This variant is for specific elements that will take into account the +last downstream flow return (from a pad push), in which case they can +return it. + + + %GST_FLOW_OK if the event was handled properly, or any other +#GstFlowReturn dependent on downstream state. + + + + + the #GstPad to handle the event. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the #GstEvent to handle. + + + + + + Function signature to handle an event for the pad. + + + %TRUE if the pad could handle the event. + + + + + the #GstPad to handle the event. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the #GstEvent to handle. + + + + + + Pad state flags + + is dataflow on a pad blocked + + + is pad flushing + + + is pad in EOS state + + + is pad currently blocking on a buffer or event + + + ensure that there is a parent object before calling + into the pad callbacks. + + + the pad should be reconfigured/renegotiated. + The flag has to be unset manually after + reconfiguration happened. + + + the pad has pending events + + + the pad is using fixed caps. This means that + once the caps are set on the pad, the default caps query function + will only return those caps. + + + the default event and query handler will forward + all events and queries to the internally linked pads + instead of discarding them. + + + the default query handler will forward + allocation queries to the internally linked pads + instead of discarding them. + + + the default query handler will forward + scheduling queries to the internally linked pads + instead of discarding them. + + + the default accept-caps handler will check + it the caps intersect the query-caps result instead + of checking for a subset. This is interesting for + parsers that can accept incompletely specified caps. + + + the default accept-caps handler will use + the template pad caps instead of query caps to + compare with the accept caps. Use this in combination + with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since: 1.6) + + + offset to define more flags + + + + A forward function is called for all internally linked pads, see +gst_pad_forward(). + + + %TRUE if the dispatching procedure has to be stopped. + + + + + the #GstPad that is forwarded. + + + + the gpointer to optional user data. + + + + + + This function will be called on source pads when a peer element +request a buffer at the specified @offset and @length. If this function +returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The +contents of @buffer is invalid for any other return value. + +This function is installed on a source pad with +gst_pad_set_getrange_function() and can only be called on source pads after +they are successfully activated with gst_pad_activate_mode() with the +#GST_PAD_MODE_PULL. + +@offset and @length are always given in byte units. @offset must normally be a value +between 0 and the length in bytes of the data available on @pad. The +length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION or with a +#GST_QUERY_SEEKING. + +Any @offset larger or equal than the length will make the function return +#GST_FLOW_EOS, which corresponds to EOS. In this case @buffer does not +contain a valid buffer. + +The buffer size of @buffer will only be smaller than @length when @offset is +near the end of the stream. In all other cases, the size of @buffer must be +exactly the requested size. + +It is allowed to call this function with a 0 @length and valid @offset, in +which case @buffer will contain a 0-sized buffer and the function returns +#GST_FLOW_OK. + +When this function is called with a -1 @offset, the sequentially next buffer +of length @length in the stream is returned. + +When this function is called with a -1 @length, a buffer with a default +optimal length is returned in @buffer. The length might depend on the value +of @offset. + + + #GST_FLOW_OK for success and a valid buffer in @buffer. Any other +return value leaves @buffer undefined. + + + + + the src #GstPad to perform the getrange on. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the offset of the range + + + + the length of the range + + + + a memory location to hold the result buffer, cannot be %NULL. + + + + + + The signature of the internal pad link iterator function. + + + a new #GstIterator that will iterate over all pads that are +linked to the given pad on the inside of the parent element. + +the caller must call gst_iterator_free() after usage. + + + + + The #GstPad to query. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + + + The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS +and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are +specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed. + +> Only disable some of the checks if you are 100% certain you know the link +> will not fail because of hierarchy/caps compatibility failures. If uncertain, +> use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular methods +> for linking the pads. + + Don't check hierarchy or caps compatibility. + + + Check the pads have same parents/grandparents. + Could be omitted if it is already known that the two elements that own the + pads are in the same bin. + + + Check if the pads are compatible by using + their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but + would be unsafe e.g. if one pad has %GST_CAPS_ANY. + + + Check if the pads are compatible by comparing the + caps returned by gst_pad_query_caps(). + + + Disables pushing a reconfigure event when pads are + linked. + + + The default checks done when linking + pads (i.e. the ones used by gst_pad_link()). + + + + Function signature to handle a new link on the pad. + + + the result of the link with the specified peer. + + + + + the #GstPad that is linked. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the peer #GstPad of the link + + + + + + Result values from gst_pad_link and friends. + + link succeeded + + + pads have no common grandparent + + + pad was already linked + + + pads have wrong direction + + + pads do not have common format + + + pads cannot cooperate in scheduling + + + refused for some reason + + + + The status of a GstPad. After activating a pad, which usually happens when the +parent element goes from READY to PAUSED, the GstPadMode defines if the +pad operates in push or pull mode. + + Pad will not handle dataflow + + + Pad handles dataflow in downstream push mode + + + Pad handles dataflow in upstream pull mode + + + Return the name of a pad mode, for use in debug messages mostly. + + + short mnemonic for pad mode @mode + + + + + the pad mode + + + + + + + Indicates when this pad will become available. + + the pad is always available + + + the pad will become available depending on the media stream + + + the pad is only available on request with + gst_element_request_pad(). + + + + + + + Callback used by gst_pad_add_probe(). Gets called to notify about the current +blocking type. + +The callback is allowed to modify the data pointer in @info. + + + a #GstPadProbeReturn + + + + + the #GstPad that is blocked + + + + #GstPadProbeInfo + + + + the gpointer to optional user data. + + + + + + Info passed in the #GstPadProbeCallback. + + + the current probe type + + + + the id of the probe + + + + type specific data, check the @type field to know the + datatype. This field can be %NULL. + + + + offset of pull probe, this field is valid when @type contains + #GST_PAD_PROBE_TYPE_PULL + + + + size of pull probe, this field is valid when @type contains + #GST_PAD_PROBE_TYPE_PULL + + + + + + + + + + + + + + + + + + + + The #GstBuffer from the probe + + + + + a #GstPadProbeInfo + + + + + + + + The #GstBufferList from the probe + + + + + a #GstPadProbeInfo + + + + + + + + The #GstEvent from the probe + + + + + a #GstPadProbeInfo + + + + + + + + The #GstQuery from the probe + + + + + a #GstPadProbeInfo + + + + + + + Different return values for the #GstPadProbeCallback. + + drop data in data probes. For push mode this means that + the data item is not sent downstream. For pull mode, it means that + the data item is not passed upstream. In both cases, no other probes + are called for this item and %GST_FLOW_OK or %TRUE is returned to the + caller. + + + normal probe return value. This leaves the probe in + place, and defers decisions about dropping or passing data to other + probes, if any. If there are no other probes, the default behaviour + for the probe type applies ('block' for blocking probes, + and 'pass' for non-blocking probes). + + + remove this probe. + + + pass the data item in the block probe and block on the + next item. + + + Data has been handled in the probe and will not be + forwarded further. For events and buffers this is the same behaviour as + %GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer + or event yourself). For queries it will also return %TRUE to the caller. + The probe can also modify the #GstFlowReturn value by using the + #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. + Note that the resulting query must contain valid entries. + Since: 1.6 + + + + The different probing types that can occur. When either one of +@GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a +blocking probe. + + invalid probe type + + + probe idle pads and block while the callback is called + + + probe and block pads + + + probe buffers + + + probe buffer lists + + + probe downstream events + + + probe upstream events + + + probe flush events. This probe has to be + explicitly enabled and is not included in the + @@GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or + @@GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. + + + probe downstream queries + + + probe upstream queries + + + probe push + + + probe pull + + + probe and block at the next opportunity, at data flow or when idle + + + probe downstream data (buffers, buffer lists, and events) + + + probe upstream data (events) + + + probe upstream and downstream data (buffers, buffer lists, and events) + + + probe and block downstream data (buffers, buffer lists, and events) + + + probe and block upstream data (events) + + + probe upstream and downstream events + + + probe upstream and downstream queries + + + probe upstream events and queries and downstream buffers, buffer lists, events and queries + + + probe push and pull + + + + The signature of the query function. + + + %TRUE if the query could be performed. + + + + + the #GstPad to query. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + the #GstQuery object to execute + + + + + + Callback used by gst_pad_sticky_events_foreach(). + +When this function returns %TRUE, the next event will be +returned. When %FALSE is returned, gst_pad_sticky_events_foreach() will return. + +When @event is set to %NULL, the item will be removed from the list of sticky events. +@event can be replaced by assigning a new reference to it. +This function is responsible for unreffing the old event when +removing or modifying. + + + %TRUE if the iteration should continue + + + + + the #GstPad. + + + + a sticky #GstEvent. + + + + the #gpointer to optional user data. + + + + + + Padtemplates describe the possible media types a pad or an elementfactory can +handle. This allows for both inspection of handled types before loading the +element plugin as well as identifying pads on elements that are not yet +created (request or sometimes pads). + +Pad and PadTemplates have #GstCaps attached to it to describe the media type +they are capable of dealing with. gst_pad_template_get_caps() or +GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not +possible to modify the caps of a padtemplate after creation. + +PadTemplates have a #GstPadPresence property which identifies the lifetime +of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also +the direction of the pad can be retrieved from the #GstPadTemplate with +GST_PAD_TEMPLATE_DIRECTION(). + +The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads +because it has to be used as the name in the gst_element_get_request_pad() +call to instantiate a pad from this template. + +Padtemplates can be created with gst_pad_template_new() or with +gst_static_pad_template_get (), which creates a #GstPadTemplate from a +#GstStaticPadTemplate that can be filled with the +convenient GST_STATIC_PAD_TEMPLATE() macro. + +A padtemplate can be used to create a pad (see gst_pad_new_from_template() +or gst_pad_new_from_static_template ()) or to add to an element class +(see gst_element_class_add_static_pad_template ()). + +The following code example shows the code to create a pad from a padtemplate. +|[<!-- language="C" --> + GstStaticPadTemplate my_template = + GST_STATIC_PAD_TEMPLATE ( + "sink", // the name of the pad + GST_PAD_SINK, // the direction of the pad + GST_PAD_ALWAYS, // when this pad will be present + GST_STATIC_CAPS ( // the capabilities of the padtemplate + "audio/x-raw, " + "channels = (int) [ 1, 6 ]" + ) + ); + void + my_method (void) + { + GstPad *pad; + pad = gst_pad_new_from_static_template (&amp;my_template, "sink"); + ... + } +]| + +The following example shows you how to add the padtemplate to an +element class, this is usually done in the class_init of the class: +|[<!-- language="C" --> + static void + my_element_class_init (GstMyElementClass *klass) + { + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_static_pad_template (gstelement_class, &amp;my_template); + } +]| + + + Creates a new pad template with a name according to the given template +and with the given arguments. + + + a new #GstPadTemplate. + + + + + the name template. + + + + the #GstPadDirection of the template. + + + + the #GstPadPresence of the pad. + + + + a #GstCaps set for the template. + + + + + + Converts a #GstStaticPadTemplate into a #GstPadTemplate with a type. + + + a new #GstPadTemplate. + + + + + the static pad template + + + + The #GType of the pad to create + + + + + + Creates a new pad template with a name according to the given template +and with the given arguments. + + + a new #GstPadTemplate. + + + + + the name template. + + + + the #GstPadDirection of the template. + + + + the #GstPadPresence of the pad. + + + + a #GstCaps set for the template. + + + + The #GType of the pad to create + + + + + + Emit the pad-created signal for this template when created by this pad. + + + + + + + a #GstPadTemplate that has been created + + + + the #GstPad that created it + + + + + + Gets the capabilities of the pad template. + + + the #GstCaps of the pad template. +Unref after usage. + + + + + a #GstPadTemplate to get capabilities of. + + + + + + See gst_pad_template_set_documentation_caps(). + + + The caps to document. For convenience, this will return + gst_pad_template_get_caps() when no documentation caps were set. + + + + + the pad template to get documented capabilities on + + + + + + Emit the pad-created signal for this template when created by this pad. + + + + + + + a #GstPadTemplate that has been created + + + + the #GstPad that created it + + + + + + Certain elements will dynamically construct the caps of their +pad templates. In order not to let environment-specific information +into the documentation, element authors should use this method to +expose "stable" caps to the reader. + + + + + + + the pad template to set documented capabilities on + + + + the documented capabilities + + + + + + The capabilities of the pad described by the pad template. + + + + The direction of the pad described by the pad template. + + + + The type of the pad described by the pad template. + + + + The name template of the pad template. + + + + When the pad described by the pad template will become available. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This signal is fired when an element creates a pad from this template. + + + + + + the pad that was created. + + + + + + + + + + + + + + + + + + + a #GstPadTemplate that has been created + + + + the #GstPad that created it + + + + + + + + + + + + + Flags for the padtemplate + + first flag that can be used by subclasses. + + + + Function signature to handle a unlinking the pad prom its peer. + +The pad's lock is already held when the unlink function is called, so most +pad functions cannot be called from within the callback. + + + + + + + the #GstPad that is linked. + + + + the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + flag is set, @parent is guaranteed to be not-%NULL and remain valid + during the execution of this function. + + + + + + A fundamental type that describes a #GParamSpec for arrays of +values + + + A fundamental type that describes a #GParamSpec for fractional +properties + + + A GParamSpec derived structure for arrays of values. + + + super class + + + + the #GParamSpec of the type of values in the array + + + + + A GParamSpec derived structure that contains the meta data for fractional +properties. + + + super class + + + + minimal numerator + + + + minimal denominator + + + + maximal numerator + + + + maximal denominator + + + + default numerator + + + + default denominator + + + + + The #GstParentBufferMeta is a #GstMeta which can be attached to a #GstBuffer +to hold a reference to another buffer that is only released when the child +#GstBuffer is released. + +Typically, #GstParentBufferMeta is used when the child buffer is directly +using the #GstMemory of the parent buffer, and wants to prevent the parent +buffer from being returned to a buffer pool until the #GstMemory is available +for re-use. + + + the parent #GstMeta structure + + + + the #GstBuffer on which a reference is being held. + + + + Get the global #GstMetaInfo describing the #GstParentBufferMeta meta. + + + The #GstMetaInfo + + + + + + Opaque structure. + + + Allocates a parse context for use with gst_parse_launch_full() or +gst_parse_launchv_full(). + +Free-function: gst_parse_context_free + + + a newly-allocated parse context. Free + with gst_parse_context_free() when no longer needed. + + + + + Copies the @context. + + + A copied #GstParseContext + + + + + a #GstParseContext + + + + + + Frees a parse context previously allocated with gst_parse_context_new(). + + + + + + + a #GstParseContext + + + + + + Retrieve missing elements from a previous run of gst_parse_launch_full() +or gst_parse_launchv_full(). Will only return results if an error code +of %GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned. + + + a + %NULL-terminated array of element factory name strings of missing + elements. Free with g_strfreev() when no longer needed. + + + + + + + a #GstParseContext + + + + + + + The different parsing errors that can occur. + + A syntax error occurred. + + + The description contained an unknown element + + + An element did not have a specified property + + + There was an error linking two pads. + + + There was an error setting a property + + + An empty bin was specified. + + + An empty description was specified + + + A delayed link did not get resolved. + + + Get the error quark used by the parsing subsystem. + + the quark of the parse errors. + + + + + + Parsing options. + + Do not use any special parsing options. + + + Always return %NULL when an error occurs + (default behaviour is to return partially constructed bins or elements + in some cases) + + + If a bin only has a single element, + just return the element. + + + If more than one toplevel element is described + by the pipeline description string, put them in a #GstBin instead of a + #GstPipeline. (Since: 1.10) + + + + A #GstPipeline is a special #GstBin used as the toplevel container for +the filter graph. The #GstPipeline will manage the selection and +distribution of a global #GstClock as well as provide a #GstBus to the +application. + +gst_pipeline_new() is used to create a pipeline. when you are done with +the pipeline, use gst_object_unref() to free its resources including all +added #GstElement objects (if not otherwise referenced). + +Elements are added and removed from the pipeline using the #GstBin +methods like gst_bin_add() and gst_bin_remove() (see #GstBin). + +Before changing the state of the #GstPipeline (see #GstElement) a #GstBus +can be retrieved with gst_pipeline_get_bus(). This bus can then be +used to receive #GstMessage from the elements in the pipeline. + +By default, a #GstPipeline will automatically flush the pending #GstBus +messages when going to the NULL state to ensure that no circular +references exist when no messages are read from the #GstBus. This +behaviour can be changed with gst_pipeline_set_auto_flush_bus(). + +When the #GstPipeline performs the PAUSED to PLAYING state change it will +select a clock for the elements. The clock selection algorithm will by +default select a clock provided by an element that is most upstream +(closest to the source). For live pipelines (ones that return +#GST_STATE_CHANGE_NO_PREROLL from the gst_element_set_state() call) this +will select the clock provided by the live source. For normal pipelines +this will select a clock provided by the sinks (most likely the audio +sink). If no element provides a clock, a default #GstSystemClock is used. + +The clock selection can be controlled with the gst_pipeline_use_clock() +method, which will enforce a given clock on the pipeline. With +gst_pipeline_auto_clock() the default clock selection algorithm can be +restored. + +A #GstPipeline maintains a running time for the elements. The running +time is defined as the difference between the current clock time and +the base time. When the pipeline goes to READY or a flushing seek is +performed on it, the running time is reset to 0. When the pipeline is +set from PLAYING to PAUSED, the current clock time is sampled and used to +configure the base time for the elements when the pipeline is set +to PLAYING again. The effect is that the running time (as the difference +between the clock time and the base time) will count how much time was spent +in the PLAYING state. This default behaviour can be changed with the +gst_element_set_start_time() method. + + + + Create a new pipeline with the given name. + + + newly created GstPipeline + +MT safe. + + + + + name of new pipeline + + + + + + Let @pipeline select a clock automatically. This is the default +behaviour. + +Use this function if you previous forced a fixed clock with +gst_pipeline_use_clock() and want to restore the default +pipeline clock selection algorithm. + +MT safe. + + + + + + + a #GstPipeline + + + + + + Check if @pipeline will automatically flush messages when going to +the NULL state. + + + whether the pipeline will automatically flush its bus when +going from READY to NULL state or not. + +MT safe. + + + + + a #GstPipeline + + + + + + Gets the #GstBus of @pipeline. The bus allows applications to receive +#GstMessage packets. + + + a #GstBus, unref after usage. + +MT safe. + + + + + a #GstPipeline + + + + + + Gets the current clock used by @pipeline. Users of object +oriented languages should use gst_pipeline_get_pipeline_clock() +to avoid confusion with gst_element_get_clock() which has a different behavior. + +Unlike gst_element_get_clock(), this function will always return a +clock, even if the pipeline is not in the PLAYING state. + + + a #GstClock, unref after usage. + + + + + a #GstPipeline + + + + + + Get the configured delay (see gst_pipeline_set_delay()). + + + The configured delay. + +MT safe. + + + + + a #GstPipeline + + + + + + Gets the latency that should be configured on the pipeline. See +gst_pipeline_set_latency(). + + + Latency to configure on the pipeline or GST_CLOCK_TIME_NONE + + + + + a #GstPipeline + + + + + + Gets the current clock used by @pipeline. + +Unlike gst_element_get_clock(), this function will always return a +clock, even if the pipeline is not in the PLAYING state. + + + a #GstClock, unref after usage. + + + + + a #GstPipeline + + + + + + Usually, when a pipeline goes from READY to NULL state, it automatically +flushes all pending messages on the bus, which is done for refcounting +purposes, to break circular references. + +This means that applications that update state using (async) bus messages +(e.g. do certain things when a pipeline goes from PAUSED to READY) might +not get to see messages when the pipeline is shut down, because they might +be flushed before they can be dispatched in the main thread. This behaviour +can be disabled using this function. + +It is important that all messages on the bus are handled when the +automatic flushing is disabled else memory leaks will be introduced. + +MT safe. + + + + + + + a #GstPipeline + + + + whether or not to automatically flush the bus when +the pipeline goes from READY to NULL state + + + + + + Set the clock for @pipeline. The clock will be distributed +to all the elements managed by the pipeline. + + + %TRUE if the clock could be set on the pipeline. %FALSE if + some element did not accept the clock. + +MT safe. + + + + + a #GstPipeline + + + + the clock to set + + + + + + Set the expected delay needed for all elements to perform the +PAUSED to PLAYING state change. @delay will be added to the +base time of the elements so that they wait an additional @delay +amount of time before starting to process buffers and cannot be +#GST_CLOCK_TIME_NONE. + +This option is used for tuning purposes and should normally not be +used. + +MT safe. + + + + + + + a #GstPipeline + + + + the delay + + + + + + Sets the latency that should be configured on the pipeline. Setting +GST_CLOCK_TIME_NONE will restore the default behaviour of using the minimum +latency from the LATENCY query. Setting this is usually not required and +the pipeline will figure out an appropriate latency automatically. + +Setting a too low latency, especially lower than the minimum latency from +the LATENCY query, will most likely cause the pipeline to fail. + + + + + + + a #GstPipeline + + + + latency to configure + + + + + + Force @pipeline to use the given @clock. The pipeline will +always use the given clock even if new clock providers are added +to this pipeline. + +If @clock is %NULL all clocking will be disabled which will make +the pipeline run as fast as possible. + +MT safe. + + + + + + + a #GstPipeline + + + + the clock to use + + + + + + Whether or not to automatically flush all messages on the +pipeline's bus when going from READY to NULL state. Please see +gst_pipeline_set_auto_flush_bus() for more information on this option. + + + + The expected delay needed for elements to spin up to the +PLAYING state expressed in nanoseconds. +see gst_pipeline_set_delay() for more information on this option. + + + + Latency to configure on the pipeline. See gst_pipeline_set_latency(). + + + + + + + The fixed clock of the pipeline, used when + GST_PIPELINE_FLAG_FIXED_CLOCK is set. + + + + The stream time of the pipeline. A better name for this + property would be the running_time, the total time spent in the + PLAYING state without being flushed. (deprecated, use the start_time + on GstElement). + + + + Extra delay added to base_time to compensate for computing delays + when setting elements to PLAYING. + + + + + + + + + + + + + + + + + + + + + + + + Pipeline flags + + this pipeline works with a fixed clock + + + offset to define more flags + + + + + + + GStreamer is extensible, so #GstElement instances can be loaded at runtime. +A plugin system can provide one or more of the basic GStreamer +#GstPluginFeature subclasses. + +A plugin should export a symbol `gst_plugin_desc` that is a +struct of type #GstPluginDesc. +the plugin loader will check the version of the core library the plugin was +linked against and will create a new #GstPlugin. It will then call the +#GstPluginInitFunc function that was provided in the +`gst_plugin_desc`. + +Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you +can add any object that subclasses #GstPluginFeature. + +Usually plugins are always automatically loaded so you don't need to call +gst_plugin_load() explicitly to bring it into memory. There are options to +statically link plugins to an app or even use GStreamer without a plugin +repository in which case gst_plugin_load() can be needed to bring the plugin +into memory. + + + Unrefs each member of @list, then frees the list. + + + + + + + list of #GstPlugin + + + + + + + + Load the named plugin. Refs the plugin. + + + a reference to a loaded plugin, or +%NULL on error. + + + + + name of plugin to load + + + + + + Loads the given plugin and refs it. Caller needs to unref after use. + + + a reference to the existing loaded GstPlugin, a +reference to the newly-loaded GstPlugin, or %NULL if an error occurred. + + + + + the plugin filename to load + + + + + + Registers a static plugin, ie. a plugin which is private to an application +or library and contained within the application or library (as opposed to +being shipped as a separate module file). + +You must make sure that GStreamer has been initialised (with gst_init() or +via gst_init_get_option_group()) before calling this function. + + + %TRUE if the plugin was registered correctly, otherwise %FALSE. + + + + + the major version number of the GStreamer core that the + plugin was compiled for, you can just use GST_VERSION_MAJOR here + + + + the minor version number of the GStreamer core that the + plugin was compiled for, you can just use GST_VERSION_MINOR here + + + + a unique name of the plugin (ideally prefixed with an application- or + library-specific namespace prefix in order to avoid name conflicts in + case a similar plugin with the same name ever gets added to GStreamer) + + + + description of the plugin + + + + pointer to the init function of this plugin. + + + + version string of the plugin + + + + effective license of plugin. Must be one of the approved licenses + (see #GstPluginDesc above) or the plugin will not be registered. + + + + source module plugin belongs to + + + + shipped package plugin belongs to + + + + URL to provider of plugin + + + + + + Registers a static plugin, ie. a plugin which is private to an application +or library and contained within the application or library (as opposed to +being shipped as a separate module file) with a #GstPluginInitFullFunc +which allows user data to be passed to the callback function (useful +for bindings). + +You must make sure that GStreamer has been initialised (with gst_init() or +via gst_init_get_option_group()) before calling this function. + + + %TRUE if the plugin was registered correctly, otherwise %FALSE. + + + + + the major version number of the GStreamer core that the + plugin was compiled for, you can just use GST_VERSION_MAJOR here + + + + the minor version number of the GStreamer core that the + plugin was compiled for, you can just use GST_VERSION_MINOR here + + + + a unique name of the plugin (ideally prefixed with an application- or + library-specific namespace prefix in order to avoid name conflicts in + case a similar plugin with the same name ever gets added to GStreamer) + + + + description of the plugin + + + + pointer to the init function with user data + of this plugin. + + + + version string of the plugin + + + + effective license of plugin. Must be one of the approved licenses + (see #GstPluginDesc above) or the plugin will not be registered. + + + + source module plugin belongs to + + + + shipped package plugin belongs to + + + + URL to provider of plugin + + + + gpointer to user data + + + + + + Make GStreamer aware of external dependencies which affect the feature +set of this plugin (ie. the elements or typefinders associated with it). + +GStreamer will re-inspect plugins with external dependencies whenever any +of the external dependencies change. This is useful for plugins which wrap +other plugin systems, e.g. a plugin which wraps a plugin-based visualisation +library and makes visualisations available as GStreamer elements, or a +codec loader which exposes elements and/or caps dependent on what external +codec libraries are currently installed. + + + + + + + a #GstPlugin + + + + %NULL-terminated array of environment variables affecting the + feature set of the plugin (e.g. an environment variable containing + paths where to look for additional modules/plugins of a library), + or %NULL. Environment variable names may be followed by a path component + which will be added to the content of the environment variable, e.g. + "HOME/.mystuff/plugins". + + + + + + %NULL-terminated array of directories/paths where dependent files + may be, or %NULL. + + + + + + %NULL-terminated array of file names (or file name suffixes, + depending on @flags) to be used in combination with the paths from + @paths and/or the paths extracted from the environment variables in + @env_vars, or %NULL. + + + + + + optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE + + + + + + Make GStreamer aware of external dependencies which affect the feature +set of this plugin (ie. the elements or typefinders associated with it). + +GStreamer will re-inspect plugins with external dependencies whenever any +of the external dependencies change. This is useful for plugins which wrap +other plugin systems, e.g. a plugin which wraps a plugin-based visualisation +library and makes visualisations available as GStreamer elements, or a +codec loader which exposes elements and/or caps dependent on what external +codec libraries are currently installed. + +Convenience wrapper function for gst_plugin_add_dependency() which +takes simple strings as arguments instead of string arrays, with multiple +arguments separated by predefined delimiters (see above). + + + + + + + the #GstPlugin + + + + one or more environment variables (separated by ':', ';' or ','), + or %NULL. Environment variable names may be followed by a path component + which will be added to the content of the environment variable, e.g. + "HOME/.mystuff/plugins:MYSTUFF_PLUGINS_PATH" + + + + one ore more directory paths (separated by ':' or ';' or ','), + or %NULL. Example: "/usr/lib/mystuff/plugins" + + + + one or more file names or file name suffixes (separated by commas), + or %NULL + + + + optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE + + + + + + Gets the plugin specific data cache. If it is %NULL there is no cached data +stored. This is the case when the registry is getting rebuilt. + + + The cached data as a +#GstStructure or %NULL. + + + + + a plugin + + + + + + Get the long descriptive name of the plugin + + + the long name of the plugin + + + + + plugin to get long name of + + + + + + get the filename of the plugin + + + the filename of the plugin + + + + + plugin to get the filename of + + + + + + get the license of the plugin + + + the license of the plugin + + + + + plugin to get the license of + + + + + + Get the short name of the plugin + + + the name of the plugin + + + + + plugin to get the name of + + + + + + get the URL where the plugin comes from + + + the origin of the plugin + + + + + plugin to get the origin of + + + + + + get the package the plugin belongs to. + + + the package of the plugin + + + + + plugin to get the package of + + + + + + Get the release date (and possibly time) in form of a string, if available. + +For normal GStreamer plugin releases this will usually just be a date in +the form of "YYYY-MM-DD", while pre-releases and builds from git may contain +a time component after the date as well, in which case the string will be +formatted like "YYYY-MM-DDTHH:MMZ" (e.g. "2012-04-30T09:30Z"). + +There may be plugins that do not have a valid release date set on them. + + + the date string of the plugin, or %NULL if not +available. + + + + + plugin to get the release date of + + + + + + get the source module the plugin belongs to. + + + the source of the plugin + + + + + plugin to get the source of + + + + + + get the version of the plugin + + + the version of the plugin + + + + + plugin to get the version of + + + + + + queries if the plugin is loaded into memory + + + %TRUE is loaded, %FALSE otherwise + + + + + plugin to query + + + + + + Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is +untouched. The normal use pattern of this function goes like this: + +|[ +GstPlugin *loaded_plugin; +loaded_plugin = gst_plugin_load (plugin); +// presumably, we're no longer interested in the potentially-unloaded plugin +gst_object_unref (plugin); +plugin = loaded_plugin; +]| + + + a reference to a loaded plugin, or +%NULL on error. + + + + + plugin to load + + + + + + Adds plugin specific data to cache. Passes the ownership of the structure to +the @plugin. + +The cache is flushed every time the registry is rebuilt. + + + + + + + a plugin + + + + a structure containing the data to cache + + + + + + + + Ignore enum members when generating + the plugins cache. This is useful if the members of the enum are generated + dynamically, in order not to expose incorrect documentation to the end user. + + + + + + + Flags used in connection with gst_plugin_add_dependency(). + + no special flags + + + recurse into subdirectories + + + use paths + argument only if none of the environment variables is set + + + interpret + filename argument as filter suffix and check all matching files in + the directory + + + interpret + filename argument as filter prefix and check all matching files in + the directory. Since: 1.8. + + + interpret + non-absolute paths as relative to the main executable directory. Since + 1.14. + + + + A plugin should export a variable of this type called plugin_desc. The plugin +loader will use the data provided there to initialize the plugin. + +The @licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL, +BSD, MIT/X11, Proprietary, unknown. + + + the major version number of core that plugin was compiled for + + + + the minor version number of core that plugin was compiled for + + + + a unique name of the plugin + + + + description of plugin + + + + pointer to the init function of this plugin. + + + + version of the plugin + + + + effective license of plugin + + + + source module plugin belongs to + + + + shipped package plugin belongs to + + + + URL to provider of plugin + + + + date time string in ISO 8601 + format (or rather, a subset thereof), or %NULL. Allowed are the + following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with + 'T' a separator and 'Z' indicating UTC/Zulu time). This field + should be set via the GST_PACKAGE_RELEASE_DATETIME + preprocessor macro. + + + + + + + + + + The plugin loading errors + + The plugin could not be loaded + + + The plugin has unresolved dependencies + + + The plugin has already be loaded from a different file + + + Get the error quark. + + The error quark used in GError messages + + + + + + This is a base class for anything that can be added to a #GstPlugin. + + + Copies the list of features. Caller should call @gst_plugin_feature_list_free +when done with the list. + + + a copy of @list, + with each feature's reference count incremented. + + + + + + + list + of #GstPluginFeature + + + + + + + + Debug the plugin feature names in @list. + + + + + + + a #GList of + plugin features + + + + + + + + Unrefs each member of @list, then frees the list. + + + + + + + list + of #GstPluginFeature + + + + + + + + Compares the two given #GstPluginFeature instances. This function can be +used as a #GCompareFunc when sorting by rank and then by name. + + + negative value if the rank of p1 > the rank of p2 or the ranks are +equal but the name of p1 comes before the name of p2; zero if the rank +and names are equal; positive value if the rank of p1 < the rank of p2 or the +ranks are equal but the name of p2 comes before the name of p1 + + + + + a #GstPluginFeature + + + + a #GstPluginFeature + + + + + + Checks whether the given plugin feature is at least + the required version + + + %TRUE if the plugin feature has at least + the required version, otherwise %FALSE. + + + + + a feature + + + + minimum required major version + + + + minimum required minor version + + + + minimum required micro version + + + + + + Get the plugin that provides this feature. + + + the plugin that provides this + feature, or %NULL. Unref with gst_object_unref() when no + longer needed. + + + + + a feature + + + + + + Get the name of the plugin that provides this feature. + + + the name of the plugin that provides this + feature, or %NULL if the feature is not associated with a + plugin. + + + + + a feature + + + + + + Gets the rank of a plugin feature. + + + The rank of the feature + + + + + a feature + + + + + + Loads the plugin containing @feature if it's not already loaded. @feature is +unaffected; use the return value instead. + +Normally this function is used like this: +|[<!-- language="C" --> +GstPluginFeature *loaded_feature; + +loaded_feature = gst_plugin_feature_load (feature); +// presumably, we're no longer interested in the potentially-unloaded feature +gst_object_unref (feature); +feature = loaded_feature; +]| + + + a reference to the loaded +feature, or %NULL on error + + + + + the plugin feature to check + + + + + + Specifies a rank for a plugin feature, so that autoplugging uses +the most appropriate feature. + + + + + + + feature to rank + + + + rank value - higher number means more priority rank + + + + + + + + + + A function that can be used with e.g. gst_registry_feature_filter() +to get a list of pluginfeature that match certain criteria. + + + %TRUE for a positive match, %FALSE otherwise + + + + + the pluginfeature to check + + + + the user_data that has been passed on e.g. + gst_registry_feature_filter() + + + + + + A function that can be used with e.g. gst_registry_plugin_filter() +to get a list of plugins that match certain criteria. + + + %TRUE for a positive match, %FALSE otherwise + + + + + the plugin to check + + + + the user_data that has been passed on e.g. gst_registry_plugin_filter() + + + + + + The plugin loading state + + Temporarily loaded plugins + + + The plugin won't be scanned (again) + + + + A plugin should provide a pointer to a function of either #GstPluginInitFunc +or this type in the plugin_desc struct. +The function will be called by the loader at startup. One would then +register each #GstPluginFeature. This version allows +user data to be passed to init function (useful for bindings). + + + %TRUE if plugin initialised successfully + + + + + The plugin object + + + + extra data + + + + + + A plugin should provide a pointer to a function of this type in the +plugin_desc struct. +This function will be called by the loader at startup. One would then +register each #GstPluginFeature. + + + %TRUE if plugin initialised successfully + + + + + The plugin object + + + + + + A #GstPoll keeps track of file descriptors much like fd_set (used with +select ()) or a struct pollfd array (used with poll ()). Once created with +gst_poll_new(), the set can be used to wait for file descriptors to be +readable and/or writable. It is possible to make this wait be controlled +by specifying %TRUE for the @controllable flag when creating the set (or +later calling gst_poll_set_controllable()). + +New file descriptors are added to the set using gst_poll_add_fd(), and +removed using gst_poll_remove_fd(). Controlling which file descriptors +should be waited for to become readable and/or writable are done using +gst_poll_fd_ctl_read(), gst_poll_fd_ctl_write() and gst_poll_fd_ctl_pri(). + +Use gst_poll_wait() to wait for the file descriptors to actually become +readable and/or writable, or to timeout if no file descriptor is available +in time. The wait can be controlled by calling gst_poll_restart() and +gst_poll_set_flushing(). + +Once the file descriptor set has been waited for, one can use +gst_poll_fd_has_closed() to see if the file descriptor has been closed, +gst_poll_fd_has_error() to see if it has generated an error, +gst_poll_fd_can_read() to see if it is possible to read from the file +descriptor, and gst_poll_fd_can_write() to see if it is possible to +write to it. + + + Add a file descriptor to the file descriptor set. + + + %TRUE if the file descriptor was successfully added to the set. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Check if @fd in @set has data to be read. + + + %TRUE if the descriptor has data to be read. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Check if @fd in @set can be used for writing. + + + %TRUE if the descriptor can be used for writing. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Control whether the descriptor @fd in @set will be monitored for +exceptional conditions (POLLPRI). + +Not implemented on Windows (will just return %FALSE there). + + + %TRUE if the descriptor was successfully updated. + + + + + a file descriptor set. + + + + a file descriptor. + + + + a new status. + + + + + + Control whether the descriptor @fd in @set will be monitored for +readability. + + + %TRUE if the descriptor was successfully updated. + + + + + a file descriptor set. + + + + a file descriptor. + + + + a new status. + + + + + + Control whether the descriptor @fd in @set will be monitored for +writability. + + + %TRUE if the descriptor was successfully updated. + + + + + a file descriptor set. + + + + a file descriptor. + + + + a new status. + + + + + + Check if @fd in @set has closed the connection. + + + %TRUE if the connection was closed. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Check if @fd in @set has an error. + + + %TRUE if the descriptor has an error. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Check if @fd in @set has an exceptional condition (POLLPRI). + +Not implemented on Windows (will just return %FALSE there). + + + %TRUE if the descriptor has an exceptional condition. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Mark @fd as ignored so that the next call to gst_poll_wait() will yield +the same result for @fd as last time. This function must be called if no +operation (read/write/recv/send/etc.) will be performed on @fd before +the next call to gst_poll_wait(). + +The reason why this is needed is because the underlying implementation +might not allow querying the fd more than once between calls to one of +the re-enabling operations. + + + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Free a file descriptor set. + + + + + + + a file descriptor set. + + + + + + Get a GPollFD for the reading part of the control socket. This is useful when +integrating with a GSource and GMainLoop. + + + + + + + a #GstPoll + + + + a #GPollFD + + + + + + Read a byte from the control socket of the controllable @set. + +This function only works for timer #GstPoll objects created with +gst_poll_new_timer(). + + + %TRUE on success. %FALSE when when there was no byte to read or +reading the byte failed. If there was no byte to read, and only then, errno +will contain EWOULDBLOCK or EAGAIN. For all other values of errno this always signals a +critical error. + + + + + a #GstPoll. + + + + + + Remove a file descriptor from the file descriptor set. + + + %TRUE if the file descriptor was successfully removed from the set. + + + + + a file descriptor set. + + + + a file descriptor. + + + + + + Restart any gst_poll_wait() that is in progress. This function is typically +used after adding or removing descriptors to @set. + +If @set is not controllable, then this call will have no effect. + +This function only works for non-timer #GstPoll objects created with +gst_poll_new(). + + + + + + + a #GstPoll. + + + + + + When @controllable is %TRUE, this function ensures that future calls to +gst_poll_wait() will be affected by gst_poll_restart() and +gst_poll_set_flushing(). + +This function only works for non-timer #GstPoll objects created with +gst_poll_new(). + + + %TRUE if the controllability of @set could be updated. + + + + + a #GstPoll. + + + + new controllable state. + + + + + + When @flushing is %TRUE, this function ensures that current and future calls +to gst_poll_wait() will return -1, with errno set to EBUSY. + +Unsetting the flushing state will restore normal operation of @set. + +This function only works for non-timer #GstPoll objects created with +gst_poll_new(). + + + + + + + a #GstPoll. + + + + new flushing state. + + + + + + Wait for activity on the file descriptors in @set. This function waits up to +the specified @timeout. A timeout of #GST_CLOCK_TIME_NONE waits forever. + +For #GstPoll objects created with gst_poll_new(), this function can only be +called from a single thread at a time. If called from multiple threads, +-1 will be returned with errno set to EPERM. + +This is not true for timer #GstPoll objects created with +gst_poll_new_timer(), where it is allowed to have multiple threads waiting +simultaneously. + + + The number of #GstPollFD in @set that have activity or 0 when no +activity was detected after @timeout. If an error occurs, -1 is returned +and errno is set. + + + + + a #GstPoll. + + + + a timeout in nanoseconds. + + + + + + Write a byte to the control socket of the controllable @set. +This function is mostly useful for timer #GstPoll objects created with +gst_poll_new_timer(). + +It will make any current and future gst_poll_wait() function return with +1, meaning the control socket is set. After an equal amount of calls to +gst_poll_read_control() have been performed, calls to gst_poll_wait() will +block again until their timeout expired. + +This function only works for timer #GstPoll objects created with +gst_poll_new_timer(). + + + %TRUE on success. %FALSE when when the byte could not be written. +errno contains the detailed error code but will never be EAGAIN, EINTR or +EWOULDBLOCK. %FALSE always signals a critical error. + + + + + a #GstPoll. + + + + + + Create a new file descriptor set. If @controllable, it +is possible to restart or flush a call to gst_poll_wait() with +gst_poll_restart() and gst_poll_set_flushing() respectively. + +Free-function: gst_poll_free + + + a new #GstPoll, or %NULL in + case of an error. Free with gst_poll_free(). + + + + + whether it should be possible to control a wait. + + + + + + Create a new poll object that can be used for scheduling cancellable +timeouts. + +A timeout is performed with gst_poll_wait(). Multiple timeouts can be +performed from different threads. + +Free-function: gst_poll_free + + + a new #GstPoll, or %NULL in + case of an error. Free with gst_poll_free(). + + + + + + A file descriptor object. + + + a file descriptor + + + + + + + Initializes @fd. Alternatively you can initialize it with +#GST_POLL_FD_INIT. + + + + + + + a #GstPollFD + + + + + + + This interface offers methods to query and manipulate parameter preset sets. +A preset is a bunch of property settings, together with meta data and a name. +The name of a preset serves as key for subsequent method calls to manipulate +single presets. +All instances of one type will share the list of presets. The list is created +on demand, if presets are not used, the list is not created. + +The interface comes with a default implementation that serves most plugins. +Wrapper plugins will override most methods to implement support for the +native preset format of those wrapped plugins. +One method that is useful to be overridden is gst_preset_get_property_names(). +With that one can control which properties are saved and in which order. +When implementing support for read-only presets, one should set the vmethods +for gst_preset_save_preset() and gst_preset_delete_preset() to %NULL. +Applications can use gst_preset_is_editable() to check for that. + +The default implementation supports presets located in a system directory, +application specific directory and in the users home directory. When getting +a list of presets individual presets are read and overlaid in 1) system, +2) application and 3) user order. Whenever an earlier entry is newer, the +later entries will be updated. Since 1.8 you can also provide extra paths +where to find presets through the GST_PRESET_PATH environment variable. +Presets found in those paths will be considered as "app presets". + + + Gets the directory for application specific presets if set by the +application. + + + the directory or %NULL, don't free or modify +the string + + + + + Sets an extra directory as an absolute path that should be considered when +looking for presets. Any presets in the application dir will shadow the +system presets. + + + %TRUE for success, %FALSE if the dir already has been set + + + + + the application specific preset dir + + + + + + Delete the given preset. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to remove + + + + + + Gets the @value for an existing meta data @tag. Meta data @tag names can be +something like e.g. "comment". Returned values need to be released when done. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name +or no value for the given @tag + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + value + + + + + + Get a copy of preset names as a %NULL terminated string array. + + + + list with names, use g_strfreev() after usage. + + + + + + + a #GObject that implements #GstPreset + + + + + + Get a the names of the GObject properties that can be used for presets. + + + an + array of property names which should be freed with g_strfreev() after use. + + + + + + + a #GObject that implements #GstPreset + + + + + + Load the given preset. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to load + + + + + + Renames a preset. If there is already a preset by the @new_name it will be +overwritten. + + + %TRUE for success, %FALSE if e.g. there is no preset with @old_name + + + + + a #GObject that implements #GstPreset + + + + current preset name + + + + new preset name + + + + + + Save the current object settings as a preset under the given name. If there +is already a preset by this @name it will be overwritten. + + + %TRUE for success, %FALSE + + + + + a #GObject that implements #GstPreset + + + + preset name to save + + + + + + Sets a new @value for an existing meta data item or adds a new item. Meta +data @tag names can be something like e.g. "comment". Supplying %NULL for the +@value will unset an existing value. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + new value + + + + + + Delete the given preset. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to remove + + + + + + Gets the @value for an existing meta data @tag. Meta data @tag names can be +something like e.g. "comment". Returned values need to be released when done. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name +or no value for the given @tag + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + value + + + + + + Get a copy of preset names as a %NULL terminated string array. + + + + list with names, use g_strfreev() after usage. + + + + + + + a #GObject that implements #GstPreset + + + + + + Get a the names of the GObject properties that can be used for presets. + + + an + array of property names which should be freed with g_strfreev() after use. + + + + + + + a #GObject that implements #GstPreset + + + + + + Check if one can add new presets, change existing ones and remove presets. + + + %TRUE if presets are editable or %FALSE if they are static + + + + + a #GObject that implements #GstPreset + + + + + + Load the given preset. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to load + + + + + + Renames a preset. If there is already a preset by the @new_name it will be +overwritten. + + + %TRUE for success, %FALSE if e.g. there is no preset with @old_name + + + + + a #GObject that implements #GstPreset + + + + current preset name + + + + new preset name + + + + + + Save the current object settings as a preset under the given name. If there +is already a preset by this @name it will be overwritten. + + + %TRUE for success, %FALSE + + + + + a #GObject that implements #GstPreset + + + + preset name to save + + + + + + Sets a new @value for an existing meta data item or adds a new item. Meta +data @tag names can be something like e.g. "comment". Supplying %NULL for the +@value will unset an existing value. + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + new value + + + + + + + #GstPreset interface. + + + parent interface type. + + + + + + + + list with names, use g_strfreev() after usage. + + + + + + + a #GObject that implements #GstPreset + + + + + + + + + + an + array of property names which should be freed with g_strfreev() after use. + + + + + + + a #GObject that implements #GstPreset + + + + + + + + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to load + + + + + + + + + + %TRUE for success, %FALSE + + + + + a #GObject that implements #GstPreset + + + + preset name to save + + + + + + + + + + %TRUE for success, %FALSE if e.g. there is no preset with @old_name + + + + + a #GObject that implements #GstPreset + + + + current preset name + + + + new preset name + + + + + + + + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name to remove + + + + + + + + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + new value + + + + + + + + + + %TRUE for success, %FALSE if e.g. there is no preset with that @name +or no value for the given @tag + + + + + a #GObject that implements #GstPreset + + + + preset name + + + + meta data item name + + + + value + + + + + + + + + + + + + The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the +application of the status of asynchronous tasks. + + A new task started. + + + A task completed and a new one continues. + + + A task completed. + + + A task was canceled. + + + A task caused an error. An error message is also + posted on the bus. + + + + The #GstPromise object implements the container for values that may +be available later. i.e. a Future or a Promise in +<https://en.wikipedia.org/wiki/Futures_and_promises>. +As with all Future/Promise-like functionality, there is the concept of the +producer of the value and the consumer of the value. + +A #GstPromise is created with gst_promise_new() by the consumer and passed +to the producer to avoid thread safety issues with the change callback. +A #GstPromise can be replied to with a value (or an error) by the producer +with gst_promise_reply(). The exact value returned is defined by the API +contract of the producer and %NULL may be a valid reply. +gst_promise_interrupt() is for the consumer to +indicate to the producer that the value is not needed anymore and producing +that value can stop. The @GST_PROMISE_RESULT_EXPIRED state set by a call +to gst_promise_expire() indicates to the consumer that a value will never +be produced and is intended to be called by a third party that implements +some notion of message handling such as #GstBus. +A callback can also be installed at #GstPromise creation for +result changes with gst_promise_new_with_change_func(). +The change callback can be used to chain #GstPromises's together as in the +following example. +|[<!-- language="C" --> +const GstStructure *reply; +GstPromise *p; +if (gst_promise_wait (promise) != GST_PROMISE_RESULT_REPLIED) + return; // interrupted or expired value +reply = gst_promise_get_reply (promise); +if (error in reply) + return; // propagate error +p = gst_promise_new_with_change_func (another_promise_change_func, user_data, notify); +pass p to promise-using API +]| + +Each #GstPromise starts out with a #GstPromiseResult of +%GST_PROMISE_RESULT_PENDING and only ever transitions once +into one of the other #GstPromiseResult's. + +In order to support multi-threaded code, gst_promise_reply(), +gst_promise_interrupt() and gst_promise_expire() may all be from +different threads with some restrictions and the final result of the promise +is whichever call is made first. There are two restrictions on ordering: + +1. That gst_promise_reply() and gst_promise_interrupt() cannot be called +after gst_promise_expire() +2. That gst_promise_reply() and gst_promise_interrupt() +cannot be called twice. + +The change function set with gst_promise_new_with_change_func() is +called directly from either the gst_promise_reply(), +gst_promise_interrupt() or gst_promise_expire() and can be called +from an arbitrary thread. #GstPromise using APIs can restrict this to +a single thread or a subset of threads but that is entirely up to the API +that uses #GstPromise. + + + parent #GstMiniObject + + + + + + a new #GstPromise + + + + + @func will be called exactly once when transitioning out of +%GST_PROMISE_RESULT_PENDING into any of the other #GstPromiseResult +states. + + + a new #GstPromise + + + + + a #GstPromiseChangeFunc to call + + + + argument to call @func with + + + + notification function that @user_data is no longer needed + + + + + + Expire a @promise. This will wake up any waiters with +%GST_PROMISE_RESULT_EXPIRED. Called by a message loop when the parent +message is handled and/or destroyed (possibly unanswered). + + + + + + + a #GstPromise + + + + + + Retrieve the reply set on @promise. @promise must be in +%GST_PROMISE_RESULT_REPLIED and the returned structure is owned by @promise + + + The reply set on @promise + + + + + a #GstPromise + + + + + + Interrupt waiting for a @promise. This will wake up any waiters with +%GST_PROMISE_RESULT_INTERRUPTED. Called when the consumer does not want +the value produced anymore. + + + + + + + a #GstPromise + + + + + + Set a reply on @promise. This will wake up any waiters with +%GST_PROMISE_RESULT_REPLIED. Called by the producer of the value to +indicate success (or failure). + +If @promise has already been interrupted by the consumer, then this reply +is not visible to the consumer. + + + + + + + a #GstPromise + + + + a #GstStructure with the the reply contents + + + + + + Wait for @promise to move out of the %GST_PROMISE_RESULT_PENDING state. +If @promise is not in %GST_PROMISE_RESULT_PENDING then it will return +immediately with the current result. + + + the result of the promise + + + + + a #GstPromise + + + + + + + + + + + + + a #GstPromise + + + + user data + + + + + + The result of a #GstPromise + + Initial state. Waiting for transition to any + other state. + + + Interrupted by the consumer as it doesn't + want the value anymore. + + + A producer marked a reply + + + The promise expired (the carrying object + lost all refs) and the promise will never be fulfilled. + + + + Metadata type that holds information about a sample from a protection-protected +track, including the information needed to decrypt it (if it is encrypted). + + + the parent #GstMeta. + + + + the cryptographic information needed to decrypt the sample. + + + + + + + + + + + + + Invoke the default chain function of the proxy pad. + + + a #GstFlowReturn from the pad. + + + + + a sink #GstPad, returns GST_FLOW_ERROR if not. + + + + the parent of @pad or %NULL + + + + the #GstBuffer to send, return GST_FLOW_ERROR + if not. + + + + + + Invoke the default chain list function of the proxy pad. + + + a #GstFlowReturn from the pad. + + + + + a sink #GstPad, returns GST_FLOW_ERROR if not. + + + + the parent of @pad or %NULL + + + + the #GstBufferList to send, return GST_FLOW_ERROR + if not. + + + + + + Invoke the default getrange function of the proxy pad. + + + a #GstFlowReturn from the pad. + + + + + a src #GstPad, returns #GST_FLOW_ERROR if not. + + + + the parent of @pad + + + + The start offset of the buffer + + + + The length of the buffer + + + + a pointer to hold the #GstBuffer, + returns #GST_FLOW_ERROR if %NULL. + + + + + + Invoke the default iterate internal links function of the proxy pad. + + + a #GstIterator of #GstPad, or %NULL if @pad +has no parent. Unref each returned pad with gst_object_unref(). + + + + + the #GstPad to get the internal links of. + + + + the parent of @pad or %NULL + + + + + + Get the internal pad of @pad. Unref target pad after usage. + +The internal pad of a #GstGhostPad is the internally used +pad of opposite direction, which is used to link to the target. + + + the target #GstProxyPad, can +be %NULL. Unref target pad after usage. + + + + + the #GstProxyPad + + + + + + + + + + + + + + + + + + + + + + + + + + + The different types of QoS events that can be given to the +gst_event_new_qos() method. + + The QoS event type that is produced when upstream + elements are producing data too quickly and the element can't keep up + processing the data. Upstream should reduce their production rate. This + type is also used when buffers arrive early or in time. + + + The QoS event type that is produced when upstream + elements are producing data too slowly and need to speed up their + production rate. + + + The QoS event type that is produced when the + application enabled throttling to limit the data rate. + + + + + + + + + + + + + + + + + + Check if an query can travel downstream. + + + + the query to query + + + + + Check if an query is serialized with the data stream. + + + + the query to query + + + + + Check if an query can travel upstream. + + + + the query to query + + + + + when making custom query types, use this macro with the num and +the given flags + + + + the query number to create + + + the query flags + + + + + + + + + Get the #GstQueryType of the query. + + + + the query to query + + + + + The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM. + + + + + Get a constant string representation of the #GstQueryType of the query. + + + + the query to query + + + + + Queries can be performed on pads (gst_pad_query()) and elements +(gst_element_query()). Please note that some queries might need a running +pipeline to work. + +Queries can be created using the gst_query_new_*() functions. +Query values can be set using gst_query_set_*(), and parsed using +gst_query_parse_*() helpers. + +The following example shows how to query the duration of a pipeline: +|[<!-- language="C" --> + GstQuery *query; + gboolean res; + query = gst_query_new_duration (GST_FORMAT_TIME); + res = gst_element_query (pipeline, query); + if (res) { + gint64 duration; + gst_query_parse_duration (query, NULL, &amp;duration); + g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration)); + } else { + g_print ("duration query failed..."); + } + gst_query_unref (query); +]| + + + The parent #GstMiniObject type + + + + the #GstQueryType + + + + Constructs a new query object for querying if @caps are accepted. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + a fixed #GstCaps + + + + + + Constructs a new query object for querying the allocation properties. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the negotiated caps + + + + return a pool + + + + + + Constructs a new query object for querying the bitrate. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Constructs a new query object for querying the buffering status of +a stream. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the default #GstFormat for the new query + + + + + + Constructs a new query object for querying the caps. + +The CAPS query should return the allowable caps for a pad in the context +of the element's state, its link to other elements, and the devices or files +it has opened. These caps must be a subset of the pad template caps. In the +NULL state with no links, the CAPS query should ideally return the same caps +as the pad template. In rare circumstances, an object property can affect +the caps returned by the CAPS query, but this is discouraged. + +For most filters, the caps returned by CAPS query is directly affected by the +allowed caps on other pads. For demuxers and decoders, the caps returned by +the srcpad's getcaps function is directly related to the stream data. Again, +the CAPS query should return the most specific caps it reasonably can, since this +helps with autoplugging. + +The @filter is used to restrict the result caps, only the caps matching +@filter should be returned from the CAPS query. Specifying a filter might +greatly reduce the amount of processing an element needs to do. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + a filter + + + + + + Constructs a new query object for querying the pipeline-local context. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Context type to query + + + + + + Constructs a new convert query object. Use gst_query_unref() +when done with it. A convert query is used to ask for a conversion between +one format and another. + +Free-function: gst_query_unref() + + + a #GstQuery + + + + + the source #GstFormat for the new query + + + + the value to convert + + + + the target #GstFormat + + + + + + Constructs a new custom query object. Use gst_query_unref() +when done with it. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the query type + + + + a structure for the query + + + + + + Constructs a new query object for querying the drain state. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Constructs a new stream duration query object to query in the given format. +Use gst_query_unref() when done with it. A duration query will give the +total length of the stream. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the #GstFormat for this duration query + + + + + + Constructs a new query object for querying formats of +the stream. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Constructs a new latency query object. +Use gst_query_unref() when done with it. A latency query is usually performed +by sinks to compensate for additional latency introduced by elements in the +pipeline. + +Free-function: gst_query_unref() + + + a #GstQuery + + + + + Constructs a new query stream position query object. Use gst_query_unref() +when done with it. A position query is used to query the current position +of playback in the streams, in some format. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the default #GstFormat for the new query + + + + + + Constructs a new query object for querying the scheduling properties. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Constructs a new query object for querying seeking properties of +the stream. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the default #GstFormat for the new query + + + + + + Constructs a new segment query object. Use gst_query_unref() +when done with it. A segment query is used to discover information about the +currently configured segment for playback. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + the #GstFormat for the new query + + + + + + Constructs a new query URI query object. Use gst_query_unref() +when done with it. An URI query is used to query the current URI +that is used by the source or sink. + +Free-function: gst_query_unref() + + + a new #GstQuery + + + + + Add @api with @params as one of the supported metadata API to @query. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + the metadata API + + + + API specific parameters + + + + + + Add @allocator and its @params as a supported memory allocator. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + the memory allocator + + + + a #GstAllocationParams + + + + + + Set the pool parameters in @query. + + + + + + + A valid #GstQuery of type GST_QUERY_ALLOCATION. + + + + the #GstBufferPool + + + + the buffer size + + + + the min buffers + + + + the max buffers + + + + + + Set the buffering-ranges array field in @query. The current last +start position of the array should be inferior to @start. + + + a #gboolean indicating if the range was added or not. + + + + + a GST_QUERY_BUFFERING type query #GstQuery + + + + start position of the range + + + + stop position of the range + + + + + + Add @mode as one of the supported scheduling modes to @query. + + + + + + + a GST_QUERY_SCHEDULING type query #GstQuery + + + + a #GstPadMode + + + + + + Copies the given query using the copy function of the parent #GstStructure. + +Free-function: gst_query_unref + + + a new copy of @q. + + + + + a #GstQuery to copy. + + + + + + Check if @query has metadata @api set. When this function returns %TRUE, +@index will contain the index where the requested API and the parameters +can be found. + + + %TRUE when @api is in the list of metadata. + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + the metadata API + + + + the index + + + + + + Retrieve the number of values currently stored in the +meta API array of the query's structure. + + + the metadata API array size as a #guint. + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + + + Retrieve the number of values currently stored in the +allocator params array of the query's structure. + +If no memory allocator is specified, the downstream element can handle +the default memory allocator. The first memory allocator in the query +should be generic and allow mapping to system memory, all following +allocators should be ordered by preference with the preferred one first. + + + the allocator array size as a #guint. + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + + + Retrieve the number of values currently stored in the +pool array of the query's structure. + + + the pool array size as a #guint. + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + + + Retrieve the number of values currently stored in the +buffered-ranges array of the query's structure. + + + the range array size as a #guint. + + + + + a GST_QUERY_BUFFERING type query #GstQuery + + + + + + Retrieve the number of values currently stored in the +scheduling mode array of the query's structure. + + + the scheduling mode array size as a #guint. + + + + + a GST_QUERY_SCHEDULING type query #GstQuery + + + + + + Get the structure of a query. + + + the #GstStructure of the query. The + structure is still owned by the query and will therefore be freed when the + query is unreffed. + + + + + a #GstQuery + + + + + + Check if @query has scheduling mode set. + +> When checking if upstream supports pull mode, it is usually not +> enough to just check for GST_PAD_MODE_PULL with this function, you +> also want to check whether the scheduling flags returned by +> gst_query_parse_scheduling() have the seeking flag set (meaning +> random access is supported, not only sequential pulls). + + + %TRUE when @mode is in the list of scheduling modes. + + + + + a GST_QUERY_SCHEDULING type query #GstQuery + + + + the scheduling mode + + + + + + Check if @query has scheduling mode set and @flags is set in +query scheduling flags. + + + %TRUE when @mode is in the list of scheduling modes + and @flags are compatible with query flags. + + + + + a GST_QUERY_SCHEDULING type query #GstQuery + + + + the scheduling mode + + + + #GstSchedulingFlags + + + + + + Get the caps from @query. The caps remains valid as long as @query remains +valid. + + + + + + + The query to parse + + + + A pointer to the caps + + + + + + Parse the result from @query and store in @result. + + + + + + + a GST_QUERY_ACCEPT_CAPS type query #GstQuery + + + + location for the result + + + + + + Parse an allocation query, writing the requested caps in @caps and +whether a pool is needed in @need_pool, if the respective parameters +are non-%NULL. + +Pool details can be retrieved using gst_query_get_n_allocation_pools() and +gst_query_parse_nth_allocation_pool(). + + + + + + + a #GstQuery + + + + The #GstCaps + + + + Whether a #GstBufferPool is needed + + + + + + Get the results of a bitrate query. See also gst_query_set_bitrate(). + + + + + + + a GST_QUERY_BITRATE type #GstQuery + + + + The resulting bitrate in bits per second + + + + + + Get the percentage of buffered data. This is a value between 0 and 100. +The @busy indicator is %TRUE when the buffering is in progress. + + + + + + + A valid #GstQuery of type GST_QUERY_BUFFERING. + + + + if buffering is busy, or %NULL + + + + a buffering percent, or %NULL + + + + + + Parse an available query, writing the format into @format, and +other results into the passed parameters, if the respective parameters +are non-%NULL + + + + + + + a GST_QUERY_BUFFERING type query #GstQuery + + + + the format to set for the @segment_start + and @segment_end values, or %NULL + + + + the start to set, or %NULL + + + + the stop to set, or %NULL + + + + estimated total amount of download + time remaining in milliseconds, or %NULL + + + + + + Extracts the buffering stats values from @query. + + + + + + + A valid #GstQuery of type GST_QUERY_BUFFERING. + + + + a buffering mode, or %NULL + + + + the average input rate, or %NULL + + + + the average output rat, or %NULL + + + + amount of buffering time left in + milliseconds, or %NULL + + + + + + Get the filter from the caps @query. The caps remains valid as long as +@query remains valid. + + + + + + + The query to parse + + + + A pointer to the caps filter + + + + + + Get the caps result from @query. The caps remains valid as long as +@query remains valid. + + + + + + + The query to parse + + + + A pointer to the caps + + + + + + Get the context from the context @query. The context remains valid as long as +@query remains valid. + + + + + + + The query to parse + + + + A pointer to store the #GstContext + + + + + + Parse a context type from an existing GST_QUERY_CONTEXT query. + + + a #gboolean indicating if the parsing succeeded. + + + + + a GST_QUERY_CONTEXT type query + + + + the context type, or %NULL + + + + + + Parse a convert query answer. Any of @src_format, @src_value, @dest_format, +and @dest_value may be %NULL, in which case that value is omitted. + + + + + + + a #GstQuery + + + + the storage for the #GstFormat of the + source value, or %NULL + + + + the storage for the source value, or %NULL + + + + the storage for the #GstFormat of the + destination value, or %NULL + + + + the storage for the destination value, + or %NULL + + + + + + Parse a duration query answer. Write the format of the duration into @format, +and the value into @duration, if the respective variables are non-%NULL. + + + + + + + a #GstQuery + + + + the storage for the #GstFormat of the duration + value, or %NULL. + + + + the storage for the total duration, or %NULL. + + + + + + Parse a latency query answer. + + + + + + + a #GstQuery + + + + storage for live or %NULL + + + + the storage for the min latency or %NULL + + + + the storage for the max latency or %NULL + + + + + + Parse the number of formats in the formats @query. + + + + + + + a #GstQuery + + + + the number of formats in this query. + + + + + + Parse an available query and get the metadata API +at @index of the metadata API array. + + + a #GType of the metadata API at @index. + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the metadata API array to read + + + + API specific parameters + + + + + + Parse an available query and get the allocator and its params +at @index of the allocator array. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the allocator array to read + + + + variable to hold the result + + + + parameters for the allocator + + + + + + Get the pool parameters in @query. + +Unref @pool with gst_object_unref() when it's not needed any more. + + + + + + + A valid #GstQuery of type GST_QUERY_ALLOCATION. + + + + index to parse + + + + the #GstBufferPool + + + + the buffer size + + + + the min buffers + + + + the max buffers + + + + + + Parse an available query and get the start and stop values stored +at the @index of the buffered ranges array. + + + a #gboolean indicating if the parsing succeeded. + + + + + a GST_QUERY_BUFFERING type query #GstQuery + + + + position in the buffered-ranges array to read + + + + the start position to set, or %NULL + + + + the stop position to set, or %NULL + + + + + + Parse the format query and retrieve the @nth format from it into +@format. If the list contains less elements than @nth, @format will be +set to GST_FORMAT_UNDEFINED. + + + + + + + a #GstQuery + + + + the nth format to retrieve. + + + + a pointer to store the nth format + + + + + + Parse an available query and get the scheduling mode +at @index of the scheduling modes array. + + + a #GstPadMode of the scheduling mode at @index. + + + + + a GST_QUERY_SCHEDULING type query #GstQuery + + + + position in the scheduling modes array to read + + + + + + Parse a position query, writing the format into @format, and the position +into @cur, if the respective parameters are non-%NULL. + + + + + + + a #GstQuery + + + + the storage for the #GstFormat of the + position values (may be %NULL) + + + + the storage for the current position (may be %NULL) + + + + + + Set the scheduling properties. + + + + + + + A valid #GstQuery of type GST_QUERY_SCHEDULING. + + + + #GstSchedulingFlags + + + + the suggested minimum size of pull requests + + + + the suggested maximum size of pull requests: + + + + the suggested alignment of pull requests + + + + + + Parse a seeking query, writing the format into @format, and +other results into the passed parameters, if the respective parameters +are non-%NULL + + + + + + + a GST_QUERY_SEEKING type query #GstQuery + + + + the format to set for the @segment_start + and @segment_end values, or %NULL + + + + the seekable flag to set, or %NULL + + + + the segment_start to set, or %NULL + + + + the segment_end to set, or %NULL + + + + + + Parse a segment query answer. Any of @rate, @format, @start_value, and +@stop_value may be %NULL, which will cause this value to be omitted. + +See gst_query_set_segment() for an explanation of the function arguments. + + + + + + + a #GstQuery + + + + the storage for the rate of the segment, or %NULL + + + + the storage for the #GstFormat of the values, + or %NULL + + + + the storage for the start value, or %NULL + + + + the storage for the stop value, or %NULL + + + + + + Parse an URI query, writing the URI into @uri as a newly +allocated string, if the respective parameters are non-%NULL. +Free the string with g_free() after usage. + + + + + + + a #GstQuery + + + + the storage for the current URI + (may be %NULL) + + + + + + Parse an URI query, writing the URI into @uri as a newly +allocated string, if the respective parameters are non-%NULL. +Free the string with g_free() after usage. + + + + + + + a #GstQuery + + + + the storage for the redirect URI + (may be %NULL) + + + + + + Parse an URI query, and set @permanent to %TRUE if there is a redirection +and it should be considered permanent. If a redirection is permanent, +applications should update their internal storage of the URI, otherwise +they should make all future requests to the original URI. + + + + + + + a #GstQuery + + + + if the URI redirection is permanent + (may be %NULL) + + + + + + Remove the metadata API at @index of the metadata API array. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the metadata API array to remove + + + + + + Remove the allocation param at @index of the allocation param array. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the allocation param array to remove + + + + + + Remove the allocation pool at @index of the allocation pool array. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the allocation pool array to remove + + + + + + Set @result as the result for the @query. + + + + + + + a GST_QUERY_ACCEPT_CAPS type query #GstQuery + + + + the result to set + + + + + + Set the results of a bitrate query. The nominal bitrate is the average +bitrate expected over the length of the stream as advertised in file +headers (or similar). + + + + + + + a GST_QUERY_BITRATE type #GstQuery + + + + the nominal bitrate in bits per second + + + + + + Set the percentage of buffered data. This is a value between 0 and 100. +The @busy indicator is %TRUE when the buffering is in progress. + + + + + + + A valid #GstQuery of type GST_QUERY_BUFFERING. + + + + if buffering is busy + + + + a buffering percent + + + + + + Set the available query result fields in @query. + + + + + + + a #GstQuery + + + + the format to set for the @start and @stop values + + + + the start to set + + + + the stop to set + + + + estimated total amount of download time remaining in + milliseconds + + + + + + Configures the buffering stats values in @query. + + + + + + + A valid #GstQuery of type GST_QUERY_BUFFERING. + + + + a buffering mode + + + + the average input rate + + + + the average output rate + + + + amount of buffering time left in milliseconds + + + + + + Set the @caps result in @query. + + + + + + + The query to use + + + + A pointer to the caps + + + + + + Answer a context query by setting the requested context. + + + + + + + a #GstQuery with query type GST_QUERY_CONTEXT + + + + the requested #GstContext + + + + + + Answer a convert query by setting the requested values. + + + + + + + a #GstQuery + + + + the source #GstFormat + + + + the source value + + + + the destination #GstFormat + + + + the destination value + + + + + + Answer a duration query by setting the requested value in the given format. + + + + + + + a #GstQuery + + + + the #GstFormat for the duration + + + + the duration of the stream + + + + + + Set the formats query result fields in @query. The number of formats passed +must be equal to @n_formats. + + + + + + + a #GstQuery + + + + the number of formats to set. + + + + A number of @GstFormats equal to @n_formats. + + + + + + Set the formats query result fields in @query. The number of formats passed +in the @formats array must be equal to @n_formats. + + + + + + + a #GstQuery + + + + the number of formats to set. + + + + an array containing @n_formats + @GstFormat values. + + + + + + + + Answer a latency query by setting the requested values in the given format. + + + + + + + a #GstQuery + + + + if there is a live element upstream + + + + the minimal latency of the upstream elements + + + + the maximal latency of the upstream elements + + + + + + Parse an available query and get the allocator and its params +at @index of the allocator array. + + + + + + + a GST_QUERY_ALLOCATION type query #GstQuery + + + + position in the allocator array to set + + + + new allocator to set + + + + parameters for the allocator + + + + + + Set the pool parameters in @query. + + + + + + + A valid #GstQuery of type GST_QUERY_ALLOCATION. + + + + index to modify + + + + the #GstBufferPool + + + + the buffer size + + + + the min buffers + + + + the max buffers + + + + + + Answer a position query by setting the requested value in the given format. + + + + + + + a #GstQuery with query type GST_QUERY_POSITION + + + + the requested #GstFormat + + + + the position to set + + + + + + Set the scheduling properties. + + + + + + + A valid #GstQuery of type GST_QUERY_SCHEDULING. + + + + #GstSchedulingFlags + + + + the suggested minimum size of pull requests + + + + the suggested maximum size of pull requests + + + + the suggested alignment of pull requests + + + + + + Set the seeking query result fields in @query. + + + + + + + a #GstQuery + + + + the format to set for the @segment_start and @segment_end values + + + + the seekable flag to set + + + + the segment_start to set + + + + the segment_end to set + + + + + + Answer a segment query by setting the requested values. The normal +playback segment of a pipeline is 0 to duration at the default rate of +1.0. If a seek was performed on the pipeline to play a different +segment, this query will return the range specified in the last seek. + +@start_value and @stop_value will respectively contain the configured +playback range start and stop values expressed in @format. +The values are always between 0 and the duration of the media and +@start_value <= @stop_value. @rate will contain the playback rate. For +negative rates, playback will actually happen from @stop_value to +@start_value. + + + + + + + a #GstQuery + + + + the rate of the segment + + + + the #GstFormat of the segment values (@start_value and @stop_value) + + + + the start value + + + + the stop value + + + + + + Answer a URI query by setting the requested URI. + + + + + + + a #GstQuery with query type GST_QUERY_URI + + + + the URI to set + + + + + + Answer a URI query by setting the requested URI redirection. + + + + + + + a #GstQuery with query type GST_QUERY_URI + + + + the URI to set + + + + + + Answer a URI query by setting the requested URI redirection +to permanent or not. + + + + + + + a #GstQuery with query type %GST_QUERY_URI + + + + whether the redirect is permanent or not + + + + + + Decreases the refcount of the query. If the refcount reaches 0, the query +will be freed. + + + + + + + a #GstQuery to decrease the refcount of. + + + + + + Get the structure of a query. This method should be called with a writable +@query so that the returned structure is guaranteed to be writable. + + + the #GstStructure of the query. The structure is + still owned by the query and will therefore be freed when the query + is unreffed. + + + + + a #GstQuery + + + + + + Modifies a pointer to a #GstQuery to point to a different #GstQuery. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +query is unreffed, the new one is reffed). + +Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. + + + %TRUE if @new_query was different from @old_query + + + + + pointer to a pointer to a + #GstQuery to be replaced. + + + + pointer to a #GstQuery that will + replace the query pointed to by @old_query. + + + + + + + Standard predefined Query types + + unknown query type + + + current position in stream + + + total duration of the stream + + + latency of stream + + + current jitter of stream + + + current rate of the stream + + + seeking capabilities + + + segment start/stop positions + + + convert values between formats + + + query supported formats for convert + + + query available media for efficient seeking. + + + a custom application or element defined query. + + + query the URI of the source or sink. + + + the buffer allocation properties + + + the scheduling properties + + + the accept caps query + + + the caps query + + + wait till all serialized data is consumed downstream + + + query the pipeline-local context from + downstream or upstream (since 1.2) + + + the bitrate query (since 1.16) + + + Gets the #GstQueryTypeFlags associated with @type. + + + a #GstQueryTypeFlags. + + + + + a #GstQueryType + + + + + + Get a printable name for the given query type. Do not modify or free. + + + a reference to the static name of the query. + + + + + the query type + + + + + + Get the unique quark for the given query type. + + + the quark associated with the query type + + + + + the query type + + + + + + + #GstQueryTypeFlags indicate the aspects of the different #GstQueryType +values. You can get the type flags of a #GstQueryType with the +gst_query_type_get_flags() function. + + Set if the query can travel upstream. + + + Set if the query can travel downstream. + + + Set if the query should be serialized with data + flow. + + + + Read a 16 bit unsigned integer value in big endian format from the memory buffer. + + + + memory location + + + + + Read a 16 bit unsigned integer value in little endian format from the memory buffer. + + + + memory location + + + + + Read a 24 bit unsigned integer value in big endian format from the memory buffer. + + + + memory location + + + + + Read a 24 bit unsigned integer value in little endian format from the memory buffer. + + + + memory location + + + + + Read a 32 bit unsigned integer value in big endian format from the memory buffer. + + + + memory location + + + + + Read a 32 bit unsigned integer value in little endian format from the memory buffer. + + + + memory location + + + + + Read a 64 bit unsigned integer value in big endian format from the memory buffer. + + + + memory location + + + + + Read a 64 bit unsigned integer value in little endian format from the memory buffer. + + + + memory location + + + + + Read an 8 bit unsigned integer value from the memory buffer. + + + + memory location + + + + + + + + + + + + + + + + + + + + + + + + + + Rounds an integer value down to the next multiple of 128. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 16. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 2. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 32. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 4. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 64. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of 8. + + + + integer value to round down + + + + + Rounds an integer value down to the next multiple of @align. @align MUST be a +power of two. + + + + integrer value to round down + + + a power of two to round down to + + + + + Rounds an integer value up to the next multiple of 128. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 16. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 2. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 32. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 4. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 64. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of 8. + + + + integer value to round up + + + + + Rounds an integer value up to the next multiple of @align. @align MUST be a +power of two. + + + + integrer value to round up + + + a power of two to round up to + + + + + Element priority ranks. Defines the order in which the autoplugger (or +similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri()) +will choose this element over an alternative one with the same function. + +These constants serve as a rough guidance for defining the rank of a +#GstPluginFeature. Any value is valid, including values bigger than +@GST_RANK_PRIMARY. + + will be chosen last or not at all + + + unlikely to be chosen + + + likely to be chosen + + + will be chosen first + + + + #GstReferenceTimestampMeta can be used to attach alternative timestamps and +possibly durations to a #GstBuffer. These are generally not according to +the pipeline clock and could be e.g. the NTP timestamp when the media was +captured. + +The reference is stored as a #GstCaps in @reference. Examples of valid +references would be "timestamp/x-drivername-stream" for timestamps that are locally +generated by some driver named "drivername" when generating the stream, +e.g. based on a frame counter, or "timestamp/x-ntp, host=pool.ntp.org, +port=123" for timestamps based on a specific NTP server. + + + the parent #GstMeta structure + + + + identifier for the timestamp reference. + + + + timestamp + + + + duration, or %GST_CLOCK_TIME_NONE + + + + Get the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. + + + The #GstMetaInfo + + + + + + One registry holds the metadata of a set of plugins. + +<emphasis role="bold">Design:</emphasis> + +The #GstRegistry object is a list of plugins and some functions for dealing +with them. Each #GstPlugin is matched 1-1 with a file on disk, and may or may +not be loaded at a given time. + +The primary source, at all times, of plugin information is each plugin file +itself. Thus, if an application wants information about a particular plugin, +or wants to search for a feature that satisfies given criteria, the primary +means of doing so is to load every plugin and look at the resulting +information that is gathered in the default registry. Clearly, this is a time +consuming process, so we cache information in the registry file. The format +and location of the cache file is internal to gstreamer. + +On startup, plugins are searched for in the plugin search path. The following +locations are checked in this order: + +* location from --gst-plugin-path commandline option. +* the GST_PLUGIN_PATH environment variable. +* the GST_PLUGIN_SYSTEM_PATH environment variable. +* default locations (if GST_PLUGIN_SYSTEM_PATH is not set). + Those default locations are: + `$XDG_DATA_HOME/gstreamer-$GST_API_VERSION/plugins/` + and `$prefix/libs/gstreamer-$GST_API_VERSION/`. + [$XDG_DATA_HOME](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) defaults to + `$HOME/.local/share`. + +The registry cache file is loaded from +`$XDG_CACHE_HOME/gstreamer-$GST_API_VERSION/registry-$ARCH.bin` +(where $XDG_CACHE_HOME defaults to `$HOME/.cache`) or the file listed in the `GST_REGISTRY` +env var. One reason to change the registry location is for testing. + +For each plugin that is found in the plugin search path, there could be 3 +possibilities for cached information: + + * the cache may not contain information about a given file. + * the cache may have stale information. + * the cache may have current information. + +In the first two cases, the plugin is loaded and the cache updated. In +addition to these cases, the cache may have entries for plugins that are not +relevant to the current process. These are marked as not available to the +current process. If the cache is updated for whatever reason, it is marked +dirty. + +A dirty cache is written out at the end of initialization. Each entry is +checked to make sure the information is minimally valid. If not, the entry is +simply dropped. + +## Implementation notes: + +The "cache" and "registry" are different concepts and can represent +different sets of plugins. For various reasons, at init time, the cache is +stored in the default registry, and plugins not relevant to the current +process are marked with the %GST_PLUGIN_FLAG_CACHED bit. These plugins are +removed at the end of initialization. + + + By default GStreamer will perform scanning and rebuilding of the +registry file using a helper child process. + +Applications might want to disable this behaviour with the +gst_registry_fork_set_enabled() function, in which case new plugins +are scanned (and loaded) into the application process. + + + %TRUE if GStreamer will use the child helper process when +rebuilding the registry. + + + + + Applications might want to disable/enable spawning of a child helper process +when rebuilding the registry. See gst_registry_fork_is_enabled() for more +information. + + + + + + + whether rebuilding the registry can use a temporary child helper process. + + + + + + Retrieves the singleton plugin registry. The caller does not own a +reference on the registry, as it is alive as long as GStreamer is +initialized. + + + the #GstRegistry. + + + + + Add the feature to the registry. The feature-added signal will be emitted. + +@feature's reference count will be incremented, and any floating +reference will be removed (see gst_object_ref_sink()) + + + %TRUE on success. + +MT safe. + + + + + the registry to add the plugin to + + + + the feature to add + + + + + + Add the plugin to the registry. The plugin-added signal will be emitted. + +@plugin's reference count will be incremented, and any floating +reference will be removed (see gst_object_ref_sink()) + + + %TRUE on success. + +MT safe. + + + + + the registry to add the plugin to + + + + the plugin to add + + + + + + Checks whether a plugin feature by the given name exists in +@registry and whether its version is at least the +version required. + + + %TRUE if the feature could be found and the version is +the same as the required version or newer, and %FALSE otherwise. + + + + + a #GstRegistry + + + + the name of the feature (e.g. "oggdemux") + + + + the minimum major version number + + + + the minimum minor version number + + + + the minimum micro version number + + + + + + Runs a filter against all features of the plugins in the registry +and returns a GList with the results. +If the first flag is set, only the first match is +returned (as a list with a single object). + + + a #GList of + #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. + +MT safe. + + + + + + + registry to query + + + + the filter to use + + + + only return first match + + + + user data passed to the filter function + + + + + + Find the pluginfeature with the given name and type in the registry. + + + the pluginfeature with the + given name and type or %NULL if the plugin was not + found. gst_object_unref() after usage. + +MT safe. + + + + + the registry to search + + + + the pluginfeature name to find + + + + the pluginfeature type to find + + + + + + Find the plugin with the given name in the registry. +The plugin will be reffed; caller is responsible for unreffing. + + + the plugin with the given name + or %NULL if the plugin was not found. gst_object_unref() after + usage. + +MT safe. + + + + + the registry to search + + + + the plugin name to find + + + + + + Retrieves a #GList of #GstPluginFeature of @type. + + + a #GList of + #GstPluginFeature of @type. Use gst_plugin_feature_list_free() after use + +MT safe. + + + + + + + a #GstRegistry + + + + a #GType. + + + + + + Retrieves a #GList of features of the plugin with name @name. + + + a #GList of + #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. + + + + + + + a #GstRegistry. + + + + a plugin name. + + + + + + Returns the registry's feature list cookie. This changes +every time a feature is added or removed from the registry. + + + the feature list cookie. + + + + + the registry + + + + + + Get a copy of all plugins registered in the given registry. The refcount +of each element in the list in incremented. + + + a #GList of #GstPlugin. + Use gst_plugin_list_free() after usage. + +MT safe. + + + + + + + the registry to search + + + + + + Look up a plugin in the given registry with the given filename. +If found, plugin is reffed. + + + the #GstPlugin if found, or + %NULL if not. gst_object_unref() after usage. + + + + + the registry to look up in + + + + the name of the file to look up + + + + + + Find a #GstPluginFeature with @name in @registry. + + + a #GstPluginFeature with its refcount incremented, + use gst_object_unref() after usage. + +MT safe. + + + + + a #GstRegistry + + + + a #GstPluginFeature name + + + + + + Runs a filter against all plugins in the registry and returns a #GList with +the results. If the first flag is set, only the first match is +returned (as a list with a single object). +Every plugin is reffed; use gst_plugin_list_free() after use, which +will unref again. + + + a #GList of #GstPlugin. + Use gst_plugin_list_free() after usage. + +MT safe. + + + + + + + registry to query + + + + the filter to use + + + + only return first match + + + + user data passed to the filter function + + + + + + Remove the feature from the registry. + +MT safe. + + + + + + + the registry to remove the feature from + + + + the feature to remove + + + + + + Remove the plugin from the registry. + +MT safe. + + + + + + + the registry to remove the plugin from + + + + the plugin to remove + + + + + + Scan the given path for plugins to add to the registry. The syntax of the +path is specific to the registry. + + + %TRUE if registry changed + + + + + the registry to add found plugins to + + + + the path to scan + + + + + + + + + + + + Signals that a feature has been added to the registry (possibly +replacing a previously-added one by the same name) + + + + + + the feature that has been added + + + + + + Signals that a plugin has been added to the registry (possibly +replacing a previously-added one by the same name) + + + + + + the plugin that has been added + + + + + + + + + + + + + + + + Resource errors are for any resource used by an element: +memory, files, network connections, process space, ... +They're typically used by source and sink elements. + + a general error which doesn't fit in any other +category. Make sure you add a custom message to the error call. + + + do not use this except as a placeholder for +deciding where to go while developing code. + + + used when the resource could not be found. + + + used when resource is busy. + + + used when resource fails to open for reading. + + + used when resource fails to open for writing. + + + used when resource cannot be opened for +both reading and writing, or either (but unspecified which). + + + used when the resource can't be closed. + + + used when the resource can't be read from. + + + used when the resource can't be written to. + + + used when a seek on the resource fails. + + + used when a synchronize on the resource fails. + + + used when settings can't be manipulated on. + + + used when the resource has no space left. + + + used when the resource can't be opened + due to missing authorization. + (Since: 1.2.4) + + + the number of resource error types. + + + + + + + + + + + + + + + + + + + + + + + + Constant that defines one GStreamer second. + + + + + printf format type used to debug GStreamer segments. You can use this in +combination with GStreamer's debug logging system as well as the functions +gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() +to pretty-print #GstSegment structures. +This can only be used on pointers to GstSegment structures. + + + + + + + + + A value which is guaranteed to never be returned by +gst_util_seqnum_next(). + +Can be used as a default value in variables used to store seqnum. + + + + + + + + + + + + + + + + + + + + + + + + + + This macro returns the current #GstState of the element. + + + + a #GstElement to return state for. + + + + + + + + + + + + Get the conditional used to signal the completion of a state change. + + + + a #GstElement + + + + + Get a reference to the state lock of @elem. +This lock is used by the core. It is taken while getting or setting +the state, during state changes, and while finalizing. + + + + a #GstElement + + + + + Given a current state @cur and a target state @pending, calculate the next (intermediate) +#GstState. + + + + A starting #GstState + + + A target #GstState + + + + + + + + + + + + This macro returns the next #GstState of the element. + + + + a #GstElement to return the next state for. + + + + + This macro returns the currently pending #GstState of the element. + + + + a #GstElement to return the pending state for. + + + + + This macro returns the last #GstStateChangeReturn value. + + + + a #GstElement to return the last state result for. + + + + + + + + + + + + This macro returns the target #GstState of the element. + + + + a #GstElement to return the target state for. + + + + + Given a current state @cur and a next state @next, calculate the associated +#GstStateChange transition. + + + + A current state + + + A next state + + + + + Given a state transition @trans, extract the current #GstState. + + + + A #GstStateChange + + + + + Given a state transition @trans, extract the next #GstState. + + + + A #GstStateChange + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates a new #GstCaps static caps from an input string. +This can be used in pad templates. + + + + the string describing the caps + + + + + Convenience macro to fill the values of a #GstStaticPadTemplate +structure. +Example: +|[<!-- language="C" --> +static GstStaticPadTemplate my_src_template = * GST_STATIC_PAD_TEMPLATE("src", GST_PAD_SRC, GST_PAD_ALWAYS, +, + GST_STATIC_CAPS_ANY); +]| + + + + the name template of the pad + + + the GstPadDirection of the pad + + + the GstPadPresence of the pad + + + the GstStaticCaps of the pad + + + + + printf format type used to debug GStreamer signed time value pointers. You +can use this in combination with GStreamer's debug logging system as well as +the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and +gst_info_strdup_printf() to pretty-print signed time (pointers to +#GstClockTimeDiff or #gint64). + + + + + Format @t for the #GST_STIME_FORMAT format string. Note: @t will be +evaluated more than once. + + + + a #GstClockTimeDiff or #gint64 + + + + + A string that can be used in printf-like format strings to display a signed +#GstClockTimeDiff or #gint64 value in h:m:s format. Use GST_TIME_ARGS() to +construct the matching arguments. + +Example: +|[ +printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts)); +]| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Transform an input string into a #guint32 fourcc value with host +endianness. +Caller is responsible for ensuring the input string consists of at least +four characters. + +|[ +guint32 fourcc = GST_STR_FOURCC ("MJPG"); +]| + + + + a string with at least four characters + + + + + Macro to use when a string must not be %NULL, but may be %NULL. If the string +is %NULL, "(NULL)" is printed instead. +In GStreamer printf string arguments may not be %NULL, because on some +platforms (ie Solaris) the libc crashes in that case. This includes debugging +strings. + + + + The string to check. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GstSample is a small object containing data, a type, timing and +extra arbitrary information. + + + Create a new #GstSample with the provided details. + +Free-function: gst_sample_unref + + + the new #GstSample. gst_sample_unref() + after usage. + + + + + a #GstBuffer, or %NULL + + + + a #GstCaps, or %NULL + + + + a #GstSegment, or %NULL + + + + a #GstStructure, or %NULL + + + + + + Create a copy of the given sample. This will also make a newly allocated +copy of the data the source sample contains. + + + a new copy of @buf. + + + + + a #GstSample. + + + + + + Get the buffer associated with @sample + + + the buffer of @sample or %NULL + when there is no buffer. The buffer remains valid as long as + @sample is valid. If you need to hold on to it for longer than + that, take a ref to the buffer with gst_buffer_ref(). + + + + + a #GstSample + + + + + + Get the buffer list associated with @sample + + + the buffer list of @sample or %NULL + when there is no buffer list. The buffer list remains valid as long as + @sample is valid. If you need to hold on to it for longer than + that, take a ref to the buffer list with gst_mini_object_ref (). + + + + + a #GstSample + + + + + + Get the caps associated with @sample + + + the caps of @sample or %NULL + when there is no caps. The caps remain valid as long as @sample is + valid. If you need to hold on to the caps for longer than that, + take a ref to the caps with gst_caps_ref(). + + + + + a #GstSample + + + + + + Get extra information associated with @sample. + + + the extra info of @sample. + The info remains valid as long as @sample is valid. + + + + + a #GstSample + + + + + + Get the segment associated with @sample + + + the segment of @sample. + The segment remains valid as long as @sample is valid. + + + + + a #GstSample + + + + + + Increases the refcount of the given sample by one. + + + @sample + + + + + a #GstSample + + + + + + Set the buffer associated with @sample. @sample must be writable. + + + + + + + A #GstSample + + + + A #GstBuffer + + + + + + Set the buffer list associated with @sample. @sample must be writable. + + + + + + + a #GstSample + + + + a #GstBufferList + + + + + + Set the caps associated with @sample. @sample must be writable. + + + + + + + A #GstSample + + + + A #GstCaps + + + + + + Set the info structure associated with @sample. @sample must be writable, +and @info must not have a parent set already. + + + + + + + A #GstSample + + + + A #GstStructure + + + + + + Set the segment associated with @sample. @sample must be writable. + + + + + + + A #GstSample + + + + A #GstSegment + + + + + + Decreases the refcount of the sample. If the refcount reaches 0, the +sample will be freed. + + + + + + + a #GstSample + + + + + + + The different scheduling flags. + + if seeking is possible + + + if sequential access is recommended + + + if bandwidth is limited and buffering possible (since 1.2) + + + + The different search modes. + + Only search for exact matches. + + + Search for an exact match or the element just before. + + + Search for an exact match or the element just after. + + + + Flags to be used with gst_element_seek() or gst_event_new_seek(). All flags +can be used together. + +A non flushing seek might take some time to perform as the currently +playing data in the pipeline will not be cleared. + +An accurate seek might be slower for formats that don't have any indexes +or timestamp markers in the stream. Specifying this flag might require a +complete scan of the file in those cases. + +When performing a segment seek: after the playback of the segment completes, +no EOS will be emitted by the element that performed the seek, but a +%GST_MESSAGE_SEGMENT_DONE message will be posted on the bus by the element. +When this message is posted, it is possible to send a new seek event to +continue playback. With this seek method it is possible to perform seamless +looping or simple linear editing. + +When only changing the playback rate and not the direction, the +%GST_SEEK_FLAG_INSTANT_RATE_CHANGE flag can be used for a non-flushing seek +to signal that the rate change should be applied immediately. This requires +special support in the seek handlers (e.g. demuxers) and any elements +synchronizing to the clock, and in general can't work in all cases (for example +UDP streaming where the delivery rate is controlled by a remote server). The +instant-rate-change mode supports changing the trickmode-related GST_SEEK_ flags, +but can't be used in conjunction with other seek flags that affect the new +playback position - as the playback position will not be changing. + +When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode +playback, the %GST_SEEK_FLAG_TRICKMODE flag can be used to instruct decoders +and demuxers to adjust the playback rate by skipping frames. This can improve +performance and decrease CPU usage because not all frames need to be decoded. + +Beyond that, the %GST_SEEK_FLAG_TRICKMODE_KEY_UNITS flag can be used to +request that decoders skip all frames except key units, and +%GST_SEEK_FLAG_TRICKMODE_NO_AUDIO flags can be used to request that audio +decoders do no decoding at all, and simple output silence. + +The %GST_SEEK_FLAG_SNAP_BEFORE flag can be used to snap to the previous +relevant location, and the %GST_SEEK_FLAG_SNAP_AFTER flag can be used to +select the next relevant location. If %GST_SEEK_FLAG_KEY_UNIT is specified, +the relevant location is a keyframe. If both flags are specified, the nearest +of these locations will be selected. If none are specified, the implementation is +free to select whichever it wants. + +The before and after here are in running time, so when playing backwards, +the next location refers to the one that will played in next, and not the +one that is located after in the actual source stream. + +Also see part-seeking.txt in the GStreamer design documentation for more +details on the meaning of these flags and the behaviour expected of +elements that handle them. + + no flag + + + flush pipeline + + + accurate position is requested, this might + be considerably slower for some formats. + + + seek to the nearest keyframe. This might be + faster but less accurate. + + + perform a segment seek. + + + when doing fast forward or fast reverse playback, allow + elements to skip frames instead of generating all + frames. (Since: 1.6) + + + Deprecated backward compatibility flag, replaced + by %GST_SEEK_FLAG_TRICKMODE + + + go to a location before the requested position, + if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at or before + the requested position the one at or before the seek target. + + + go to a location after the requested position, + if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at of after the + requested position. + + + go to a position near the requested position, + if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe closest + to the requested position, if both keyframes are at an equal + distance, behaves like %GST_SEEK_FLAG_SNAP_BEFORE. + + + when doing fast forward or fast reverse + playback, request that elements only decode keyframes + and skip all other content, for formats that have + keyframes. (Since: 1.6) + + + when doing fast forward or fast reverse + playback, request that audio decoder elements skip + decoding and output only gap events or silence. (Since: 1.6) + + + When doing fast forward or fast reverse + playback, request that elements only decode keyframes and + forward predicted frames and skip all other content (for example + B-Frames), for formats that have keyframes and forward predicted + frames. (Since: 1.18) + + + Signals that a rate change should be + applied immediately. Only valid if start/stop position + are GST_CLOCK_TIME_NONE, the playback direction does not change + and the seek is not flushing. (Since: 1.18) + + + + The different types of seek events. When constructing a seek event with +gst_event_new_seek() or when doing gst_segment_do_seek (). + + no change in position is required + + + absolute position is requested + + + relative position to duration is requested + + + + This helper structure holds the relevant values for tracking the region of +interest in a media file, called a segment. + +The structure can be used for two purposes: + + * performing seeks (handling seek events) + * tracking playback regions (handling newsegment events) + +The segment is usually configured by the application with a seek event which +is propagated upstream and eventually handled by an element that performs the seek. + +The configured segment is then propagated back downstream with a newsegment event. +This information is then used to clip media to the segment boundaries. + +A segment structure is initialized with gst_segment_init(), which takes a #GstFormat +that will be used as the format of the segment values. The segment will be configured +with a start value of 0 and a stop/duration of -1, which is undefined. The default +rate and applied_rate is 1.0. + +The public duration field contains the duration of the segment. When using +the segment for seeking, the start and time members should normally be left +to their default 0 value. The stop position is left to -1 unless explicitly +configured to a different value after a seek event. + +The current position in the segment should be set by changing the position +member in the structure. + +For elements that perform seeks, the current segment should be updated with the +gst_segment_do_seek() and the values from the seek event. This method will update +all the segment fields. The position field will contain the new playback position. +If the start_type was different from GST_SEEK_TYPE_NONE, playback continues from +the position position, possibly with updated flags or rate. + +For elements that want to use #GstSegment to track the playback region, +update the segment fields with the information from the newsegment event. +The gst_segment_clip() method can be used to check and clip +the media data to the segment boundaries. + +For elements that want to synchronize to the pipeline clock, gst_segment_to_running_time() +can be used to convert a timestamp to a value that can be used to synchronize +to the clock. This function takes into account the base as well as +any rate or applied_rate conversions. + +For elements that need to perform operations on media data in stream_time, +gst_segment_to_stream_time() can be used to convert a timestamp and the segment +info to stream time (which is always between 0 and the duration of the stream). + + + flags for this segment + + + + the playback rate of the segment is set in response to a seek + event and, without any seek, the value should be `1.0`. This + value is used by elements that synchronize buffer [running + times](additional/design/synchronisation.md#running-time) on + the clock (usually the sink elements), leading to consuming + buffers faster (for a value `> 1.0`) or slower (for `0.0 < + value < 1.0`) than normal playback speed. The rate also + defines the playback direction, meaning that when the value is + lower than `0.0`, the playback happens in reverse, and the + [stream-time](additional/design/synchronisation.md#stream-time) + is going backward. The `rate` value should never be `0.0`. + + + + The applied rate is the rate that has been applied to the stream. + The effective/resulting playback rate of a stream is + `rate * applied_rate`. + The applied rate can be set by source elements when a server is + sending the stream with an already modified playback speed + rate. Filter elements that modify the stream in a way that + modifies the playback speed should also modify the applied + rate. For example the #videorate element when its + #videorate:rate property is set will set the applied rate of + the segment it pushed downstream. Also #scaletempo applies the + input segment rate to the stream and outputs a segment with + rate=1.0 and applied_rate=<inputsegment.rate>. + + + + the unit used for all of the segment's values. + + + + the running time (plus elapsed time, see offset) of the + segment [start](GstSegment.start) ([stop](GstSegment.stop) if + rate < 0.0). + + + + the offset expresses the elapsed time (in buffer timestamps) + before a seek with its start (stop if rate < 0.0) seek type + set to #GST_SEEK_TYPE_NONE, the value is set to the position + of the segment at the time of the seek. + + + + the start time of the segment (in buffer timestamps) + [(PTS)](GstBuffer.pts), that is the timestamp of the first + buffer to output inside the segment (last one during + reverse playback). For example decoders will + [clip](gst_segment_clip) out the buffers before the start + time. + + + + the stop time of the segment (in buffer timestamps) + [(PTS)](GstBuffer.pts), that is the timestamp of the last + buffer to output inside the segment (first one during + reverse playback). For example decoders will + [clip](gst_segment_clip) out buffers after the stop time. + + + + the stream time of the segment [start](GstSegment.start) + ([stop](GstSegment.stop) if rate < 0.0). + + + + the buffer timestamp position in the segment is supposed to be + updated by elements such as sources, demuxers or parsers to + track progress by setting it to the last pushed buffer' end time + ([timestamp](GstBuffer.pts) + #GstBuffer.duration) for that + specific segment. The position is used when reconfiguring the + segment with #gst_segment_do_seek when the seek is only + updating the segment (see [offset](GstSegment.offset)). + + + + the duration of the segment is the maximum absolute difference + between #GstSegment.start and #GstSegment.stop if stop is not + set, otherwise it should be the difference between those + two values. This should be set by elements that know the + overall stream duration (like demuxers) and will be used when + seeking with #GST_SEEK_TYPE_END. + + + + + + + + + Allocate a new #GstSegment structure and initialize it using +gst_segment_init(). + +Free-function: gst_segment_free + + + a new #GstSegment, free with gst_segment_free(). + + + + + Clip the given @start and @stop values to the segment boundaries given +in @segment. @start and @stop are compared and clipped to @segment +start and stop values. + +If the function returns %FALSE, @start and @stop are known to fall +outside of @segment and @clip_start and @clip_stop are not updated. + +When the function returns %TRUE, @clip_start and @clip_stop will be +updated. If @clip_start or @clip_stop are different from @start or @stop +respectively, the region fell partially in the segment. + +Note that when @stop is -1, @clip_stop will be set to the end of the +segment. Depending on the use case, this may or may not be what you want. + + + %TRUE if the given @start and @stop times fall partially or + completely in @segment, %FALSE if the values are completely outside + of the segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the start position in the segment + + + + the stop position in the segment + + + + the clipped start position in the segment + + + + the clipped stop position in the segment + + + + + + Create a copy of given @segment. + +Free-function: gst_segment_free + + + a new #GstSegment, free with gst_segment_free(). + + + + + a #GstSegment + + + + + + Copy the contents of @src into @dest. + + + + + + + a #GstSegment + + + + a #GstSegment + + + + + + Update the segment structure with the field values of a seek event (see +gst_event_new_seek()). + +After calling this method, the segment field position and time will +contain the requested new position in the segment. The new requested +position in the segment depends on @rate and @start_type and @stop_type. + +For positive @rate, the new position in the segment is the new @segment +start field when it was updated with a @start_type different from +#GST_SEEK_TYPE_NONE. If no update was performed on @segment start position +(#GST_SEEK_TYPE_NONE), @start is ignored and @segment position is +unmodified. + +For negative @rate, the new position in the segment is the new @segment +stop field when it was updated with a @stop_type different from +#GST_SEEK_TYPE_NONE. If no stop was previously configured in the segment, the +duration of the segment will be used to update the stop position. +If no update was performed on @segment stop position (#GST_SEEK_TYPE_NONE), +@stop is ignored and @segment position is unmodified. + +The applied rate of the segment will be set to 1.0 by default. +If the caller can apply a rate change, it should update @segment +rate and applied_rate after calling this function. + +@update will be set to %TRUE if a seek should be performed to the segment +position field. This field can be %FALSE if, for example, only the @rate +has been changed but not the playback position. + + + %TRUE if the seek could be performed. + + + + + a #GstSegment structure. + + + + the rate of the segment. + + + + the format of the segment. + + + + the segment flags for the segment + + + + the seek method + + + + the seek start value + + + + the seek method + + + + the seek stop value + + + + boolean holding whether position was updated. + + + + + + Free the allocated segment @segment. + + + + + + + a #GstSegment + + + + + + The start/position fields are set to 0 and the stop/duration +fields are set to -1 (unknown). The default rate of 1.0 and no +flags are set. + +Initialize @segment to its default values. + + + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + + + Checks for two segments being equal. Equality here is defined +as perfect equality, including floating point values. + + + %TRUE if the segments are equal, %FALSE otherwise. + + + + + a #GstSegment structure. + + + + a #GstSegment structure. + + + + + + Adjust the values in @segment so that @offset is applied to all +future running-time calculations. + + + %TRUE if the segment could be updated successfully. If %FALSE is +returned, @offset is not in @segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the offset to apply in the segment + + + + + + Convert @running_time into a position in the segment so that +gst_segment_to_running_time() with that position returns @running_time. + + + the position in the segment for @running_time. This function returns +-1 when @running_time is -1 or when it is not inside @segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the running_time in the segment + + + + + + Translate @running_time to the segment position using the currently configured +segment. Compared to gst_segment_position_from_running_time() this function can +return negative segment position. + +This function is typically used by elements that need to synchronize buffers +against the clock or each other. + +@running_time can be any value and the result of this function for values +outside of the segment is extrapolated. + +When 1 is returned, @running_time resulted in a positive position returned +in @position. + +When this function returns -1, the returned @position was < 0, and the value +in the position variable should be negated to get the real negative segment +position. + + + a 1 or -1 on success, 0 on failure. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the running-time + + + + the resulting position in the segment + + + + + + Convert @stream_time into a position in the segment so that +gst_segment_to_stream_time() with that position returns @stream_time. + + + the position in the segment for @stream_time. This function returns +-1 when @stream_time is -1 or when it is not inside @segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the stream_time in the segment + + + + + + Translate @stream_time to the segment position using the currently configured +segment. Compared to gst_segment_position_from_stream_time() this function can +return negative segment position. + +This function is typically used by elements that need to synchronize buffers +against the clock or each other. + +@stream_time can be any value and the result of this function for values outside +of the segment is extrapolated. + +When 1 is returned, @stream_time resulted in a positive position returned +in @position. + +When this function returns -1, the returned @position should be negated +to get the real negative segment position. + + + a 1 or -1 on success, 0 on failure. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the stream-time + + + + the resulting position in the segment + + + + + + Adjust the start/stop and base values of @segment such that the next valid +buffer will be one with @running_time. + + + %TRUE if the segment could be updated successfully. If %FALSE is +returned, @running_time is -1 or not in @segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the running_time in the segment + + + + + + Convert @running_time into a position in the segment so that +gst_segment_to_running_time() with that position returns @running_time. + Use gst_segment_position_from_running_time() instead. + + + the position in the segment for @running_time. This function returns +-1 when @running_time is -1 or when it is not inside @segment. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the running_time in the segment + + + + + + Translate @position to the total running time using the currently configured +segment. Position is a value between @segment start and stop time. + +This function is typically used by elements that need to synchronize to the +global clock in a pipeline. The running time is a constantly increasing value +starting from 0. When gst_segment_init() is called, this value will reset to +0. + +This function returns -1 if the position is outside of @segment start and stop. + + + the position as the total running time or -1 when an invalid position +was given. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the position in the segment + + + + + + Translate @position to the total running time using the currently configured +segment. Compared to gst_segment_to_running_time() this function can return +negative running-time. + +This function is typically used by elements that need to synchronize buffers +against the clock or each other. + +@position can be any value and the result of this function for values outside +of the segment is extrapolated. + +When 1 is returned, @position resulted in a positive running-time returned +in @running_time. + +When this function returns -1, the returned @running_time should be negated +to get the real negative running time. + + + a 1 or -1 on success, 0 on failure. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the position in the segment + + + + result running-time + + + + + + Translate @position to stream time using the currently configured +segment. The @position value must be between @segment start and +stop value. + +This function is typically used by elements that need to operate on +the stream time of the buffers it receives, such as effect plugins. +In those use cases, @position is typically the buffer timestamp or +clock time that one wants to convert to the stream time. +The stream time is always between 0 and the total duration of the +media stream. + + + the position in stream_time or -1 when an invalid position +was given. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the position in the segment + + + + + + Translate @position to the total stream time using the currently configured +segment. Compared to gst_segment_to_stream_time() this function can return +negative stream-time. + +This function is typically used by elements that need to synchronize buffers +against the clock or each other. + +@position can be any value and the result of this function for values outside +of the segment is extrapolated. + +When 1 is returned, @position resulted in a positive stream-time returned +in @stream_time. + +When this function returns -1, the returned @stream_time should be negated +to get the real negative stream time. + + + a 1 or -1 on success, 0 on failure. + + + + + a #GstSegment structure. + + + + the format of the segment. + + + + the position in the segment + + + + result stream-time + + + + + + + Flags for the GstSegment structure. Currently mapped to the corresponding +values of the seek flags. + + no flags + + + reset the pipeline running_time to the segment + running_time + + + perform skip playback (Since: 1.6) + + + Deprecated backward compatibility flag, replaced + by @GST_SEGMENT_FLAG_TRICKMODE + + + send SEGMENT_DONE instead of EOS + + + Decode only keyframes, where + possible (Since: 1.6) + + + Decode only keyframes or forward + predicted frames, where possible (Since: 1.18) + + + Do not decode any audio, where + possible (Since: 1.6) + + + + The #GstSharedTaskPool object. + + + Create a new shared task pool. The shared task pool will queue tasks on +a maximum number of threads, 1 by default. + +Do not use a #GstSharedTaskPool to manage potentially inter-dependent tasks such +as pad tasks, as having one task waiting on another to return before returning +would cause obvious deadlocks if they happen to share the same thread. + + + a new #GstSharedTaskPool. gst_object_unref() after usage. + + + + + + + the maximum number of threads @pool is configured to spawn + + + + + a #GstSharedTaskPool + + + + + + Update the maximal number of threads the @pool may spawn. When +the maximal number of threads is reduced, existing threads are not +immediately shut down, see g_thread_pool_set_max_threads(). + +Setting @max_threads to 0 effectively freezes the pool. + + + + + + + a #GstSharedTaskPool + + + + Maximum number of threads to spawn. + + + + + + + + + + + + + + + + + + The #GstSharedTaskPoolClass object. + + + + + + + + + + + + + + + + Try to retrieve the minimum information + available, which may be none on some platforms + (Since: 1.18) + + + Try to retrieve as much information as possible, + including source information when getting the + stack trace + + + + The possible states an element can be in. States can be changed using +gst_element_set_state() and checked using gst_element_get_state(). + + no pending state. + + + the NULL state or initial state of an element. + + + the element is ready to go to PAUSED. + + + the element is PAUSED, it is ready to accept and + process data. Sink elements however only accept one + buffer and then block. + + + the element is PLAYING, the #GstClock is running and + the data is flowing. + + + + These are the different state changes an element goes through. +%GST_STATE_NULL &rArr; %GST_STATE_PLAYING is called an upwards state change +and %GST_STATE_PLAYING &rArr; %GST_STATE_NULL a downwards state change. + + state change from NULL to READY. + * The element must check if the resources it needs are available. Device + sinks and -sources typically try to probe the device to constrain their + caps. + * The element opens the device (in case feature need to be probed). + + + state change from READY to PAUSED. + * The element pads are activated in order to receive data in PAUSED. + Streaming threads are started. + * Some elements might need to return %GST_STATE_CHANGE_ASYNC and complete + the state change when they have enough information. It is a requirement + for sinks to return %GST_STATE_CHANGE_ASYNC and complete the state change + when they receive the first buffer or %GST_EVENT_EOS (preroll). + Sinks also block the dataflow when in PAUSED. + * A pipeline resets the running_time to 0. + * Live sources return %GST_STATE_CHANGE_NO_PREROLL and don't generate data. + + + state change from PAUSED to PLAYING. + * Most elements ignore this state change. + * The pipeline selects a #GstClock and distributes this to all the children + before setting them to PLAYING. This means that it is only allowed to + synchronize on the #GstClock in the PLAYING state. + * The pipeline uses the #GstClock and the running_time to calculate the + base_time. The base_time is distributed to all children when performing + the state change. + * Sink elements stop blocking on the preroll buffer or event and start + rendering the data. + * Sinks can post %GST_MESSAGE_EOS in the PLAYING state. It is not allowed + to post %GST_MESSAGE_EOS when not in the PLAYING state. + * While streaming in PAUSED or PLAYING elements can create and remove + sometimes pads. + * Live sources start generating data and return %GST_STATE_CHANGE_SUCCESS. + + + state change from PLAYING to PAUSED. + * Most elements ignore this state change. + * The pipeline calculates the running_time based on the last selected + #GstClock and the base_time. It stores this information to continue + playback when going back to the PLAYING state. + * Sinks unblock any #GstClock wait calls. + * When a sink does not have a pending buffer to play, it returns + #GST_STATE_CHANGE_ASYNC from this state change and completes the state + change when it receives a new buffer or an %GST_EVENT_EOS. + * Any queued %GST_MESSAGE_EOS items are removed since they will be reposted + when going back to the PLAYING state. The EOS messages are queued in + #GstBin containers. + * Live sources stop generating data and return %GST_STATE_CHANGE_NO_PREROLL. + + + state change from PAUSED to READY. + * Sinks unblock any waits in the preroll. + * Elements unblock any waits on devices + * Chain or get_range functions return %GST_FLOW_FLUSHING. + * The element pads are deactivated so that streaming becomes impossible and + all streaming threads are stopped. + * The sink forgets all negotiated formats + * Elements remove all sometimes pads + + + state change from READY to NULL. + * Elements close devices + * Elements reset any internal state. + + + state change from NULL to NULL. (Since: 1.14) + + + state change from READY to READY, +This might happen when going to PAUSED asynchronously failed, in that case +elements should make sure they are in a proper, coherent READY state. (Since: 1.14) + + + state change from PAUSED to PAUSED. +This might happen when elements were in PLAYING state and 'lost state', +they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14) + + + state change from PLAYING to PLAYING. (Since: 1.14) + + + Gets a string representing the given state transition. + + + a string with the name of the state + result. + + + + + a #GstStateChange to get the name of. + + + + + + + The possible return values from a state change function such as +gst_element_set_state(). Only @GST_STATE_CHANGE_FAILURE is a real failure. + + the state change failed + + + the state change succeeded + + + the state change will happen asynchronously + + + the state change succeeded but the element + cannot produce data in %GST_STATE_PAUSED. + This typically happens with live sources. + + + + Datastructure to initialize #GstCaps from a string description usually +used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to +instantiate a #GstCaps. + + + the cached #GstCaps + + + + a string describing a caps + + + + + + + + + Clean up the cached caps contained in @static_caps. + + + + + + + the #GstStaticCaps to clean + + + + + + Converts a #GstStaticCaps to a #GstCaps. + + + a pointer to the #GstCaps. Unref + after usage. Since the core holds an additional ref to the + returned caps, use gst_caps_make_writable() on the returned caps + to modify it. + + + + + the #GstStaticCaps to convert + + + + + + + Structure describing the #GstStaticPadTemplate. + + + the name of the template + + + + the direction of the template + + + + the presence of the template + + + + the caps of the template. + + + + Converts a #GstStaticPadTemplate into a #GstPadTemplate. + + + a new #GstPadTemplate. + + + + + the static pad template + + + + + + Gets the capabilities of the static pad template. + + + the #GstCaps of the static pad template. +Unref after usage. Since the core holds an additional +ref to the returned caps, use gst_caps_make_writable() +on the returned caps to modify it. + + + + + a #GstStaticPadTemplate to get capabilities of. + + + + + + + A high-level object representing a single stream. It might be backed, or +not, by an actual flow of data in a pipeline (#GstPad). + +A #GstStream does not care about data changes (such as decoding, encoding, +parsing,...) as long as the underlying data flow corresponds to the same +high-level flow (ex: a certain audio track). + +A #GstStream contains all the information pertinent to a stream, such as +stream-id, tags, caps, type, ... + +Elements can subclass a #GstStream for internal usage (to contain information +pertinent to streams of data). + + + Create a new #GstStream for the given @stream_id, @caps, @type +and @flags + + + The new #GstStream + + + + + the id for the new stream. If %NULL, +a new one will be automatically generated + + + + the #GstCaps of the stream + + + + the #GstStreamType of the stream + + + + the #GstStreamFlags of the stream + + + + + + Retrieve the caps for @stream, if any + + + The #GstCaps for @stream + + + + + a #GstStream + + + + + + Retrieve the current stream flags for @stream + + + The #GstStreamFlags for @stream + + + + + a #GstStream + + + + + + Returns the stream ID of @stream. + + + the stream ID of @stream. Only valid +during the lifetime of @stream. + + + + + a #GstStream + + + + + + Retrieve the stream type for @stream + + + The #GstStreamType for @stream + + + + + a #GstStream + + + + + + Retrieve the tags for @stream, if any + + + The #GstTagList for @stream + + + + + a #GstStream + + + + + + Set the caps for the #GstStream + + + + + + + a #GstStream + + + + a #GstCaps + + + + + + Set the @flags for the @stream. + + + + + + + a #GstStream + + + + the flags to set on @stream + + + + + + Set the stream type of @stream + + + + + + + a #GstStream + + + + the type to set on @stream + + + + + + Set the tags for the #GstStream + + + + + + + a #GstStream + + + + a #GstTagList + + + + + + The #GstCaps of the #GstStream. + + + + + + + The unique identifier of the #GstStream. Can only be set at construction +time. + + + + The #GstStreamType of the #GstStream. Can only be set at construction time. + + + + The #GstTagList of the #GstStream. + + + + + + + The Stream Identifier for this #GstStream + + + + + + + + + + + + + GstStream class structure + + + the parent class structure + + + + + + + + + + A collection of #GstStream that are available. + +A #GstStreamCollection will be provided by elements that can make those +streams available. Applications can use the collection to show the user +what streams are available by using %gst_stream_collection_get_stream() + +Once posted, a #GstStreamCollection is immutable. Updates are made by sending +a new #GstStreamCollection message, which may or may not share some of +the #GstStream objects from the collection it replaces. The receiver can check +the sender of a stream collection message to know which collection is +obsoleted. + +Several elements in a pipeline can provide #GstStreamCollection. + +Applications can activate streams from a collection by using the +#GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element. + + + Create a new #GstStreamCollection. + + + The new #GstStreamCollection. + + + + + The stream id of the parent stream + + + + + + + + + + + + + + + + + + + + + + + Add the given @stream to the @collection. + + + %TRUE if the @stream was properly added, else %FALSE + + + + + a #GstStreamCollection + + + + the #GstStream to add + + + + + + Get the number of streams this collection contains + + + The number of streams that @collection contains + + + + + a #GstStreamCollection + + + + + + Retrieve the #GstStream with index @index from the collection. + +The caller should not modify the returned #GstStream + + + A #GstStream + + + + + a #GstStreamCollection + + + + Index of the stream to retrieve + + + + + + Returns the upstream id of the @collection. + + + The upstream id + + + + + a #GstStreamCollection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GstStreamCollection class structure + + + the parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stream errors are for anything related to the stream being processed: +format errors, media type errors, ... +They're typically used by decoders, demuxers, converters, ... + + a general error which doesn't fit in any other +category. Make sure you add a custom message to the error call. + + + do not use this except as a placeholder for +deciding where to go while developing code. + + + use this when you do not want to implement +this functionality yet. + + + used when the element doesn't know the +stream's type. + + + used when the element doesn't handle this type +of stream. + + + used when there's no codec to handle the +stream's type. + + + used when decoding fails. + + + used when encoding fails. + + + used when demuxing fails. + + + used when muxing fails. + + + used when the stream is of the wrong format +(for example, wrong caps). + + + used when the stream is encrypted and can't be +decrypted because this is not supported by the element. + + + used when the stream is encrypted and +can't be decrypted because no suitable key is available. + + + the number of stream error types. + + + + + + + + + + + This stream has no special attributes + + + This stream is a sparse stream (e.g. a subtitle + stream), data may flow only in irregular intervals with large gaps in + between. + + + This stream should be selected by default. This + flag may be used by demuxers to signal that a stream should be selected + by default in a playback scenario. + + + This stream should not be selected by default. + This flag may be used by demuxers to signal that a stream should not + be selected by default in a playback scenario, but only if explicitly + selected by the user (e.g. an audio track for the hard of hearing or + a director's commentary track). + + + + + + + The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the +application of new streaming threads and their status. + + A new thread need to be created. + + + a thread entered its loop function + + + a thread left its loop function + + + a thread is destroyed + + + a thread is started + + + a thread is paused + + + a thread is stopped + + + + #GstStreamType describes a high level classification set for +flows of data in #GstStream objects. + +Note that this is a flag, and therefore users should not assume it +will be a single value. Do not use the equality operator for checking +whether a stream is of a certain type. + + The stream is of unknown (unclassified) type. + + + The stream is of audio data + + + The stream carries video data + + + The stream is a muxed container type + + + The stream contains subtitle / subpicture data. + + + Get a descriptive string for a given #GstStreamType + + + A string describing the stream type + + + + + a #GstStreamType + + + + + + + A #GstStructure is a collection of key/value pairs. The keys are expressed as +GQuarks and the values can be of any GType. + +In addition to the key/value pairs, a #GstStructure also has a name. The name +starts with a letter and can be filled by letters, numbers and any of +"/-_.:". + +#GstStructure is used by various GStreamer subsystems to store information in +a flexible and extensible way. A #GstStructure does not have a refcount +because it usually is part of a higher level object such as #GstCaps, +#GstMessage, #GstEvent, #GstQuery. It provides a means to enforce mutability +using the refcount of the parent with the gst_structure_set_parent_refcount() +method. + +A #GstStructure can be created with gst_structure_new_empty() or +gst_structure_new(), which both take a name and an optional set of key/value +pairs along with the types of the values. + +Field values can be changed with gst_structure_set_value() or +gst_structure_set(). + +Field values can be retrieved with gst_structure_get_value() or the more +convenient gst_structure_get_*() functions. + +Fields can be removed with gst_structure_remove_field() or +gst_structure_remove_fields(). + +Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not +allowed. Strings may be %NULL however. + +## The serialization format + +GstStructure serialization format serialize the GstStructure name, +keys/GType/values in a comma separated list with the structure name as first +field without value followed by separated key/value pairs in the form +`key=value`, for example: + +``` +a-structure, key=value +```` + +The values type will be inferred if not explicitly specified with the +`(GTypeName)value` syntax, for example the following struct will have one +field called 'is-string' which has the string 'true' as a value: + +``` +a-struct, field-is-string=(string)true, field-is-boolean=true +``` + +*Note*: without specifying `(string), `field-is-string` type would have been +inferred as boolean. + +*Note*: we specified `(string)` as a type even if `gchararray` is the actual +GType name as for convenience some well known types have been aliased or +abbreviated. + +To avoid specifying the type, you can give some hints to the "type system". +For example to specify a value as a double, you should add a decimal (ie. `1` +is an `int` while `1.0` is a `double`). + +*Note*: when a structure is serialized with #gst_structure_to_string, all +values are explicitly typed. + +Some types have special delimiters: + +- [GstValueArray](GST_TYPE_ARRAY) are inside curly brackets (`{` and `}`). + For example `a-structure, array={1, 2, 3}` +- Ranges are inside brackets (`[` and `]`). For example `a-structure, + range=[1, 6, 2]` 1 being the min value, 6 the maximum and 2 the step. To + specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: + `a-structure, a-int64-range=(gint64) [1, 5]` +- [GstValueList](GST_TYPE_LIST) are inside "less and greater than" (`<` and + `>`). For example `a-structure, list=<1, 2, 3> + +Structures are delimited either by a null character `\0` or a semicolumn `;` +the latter allowing to store multiple structures in the same string (see +#GstCaps). + +Quotes are used as "default" delimiters and can be used around any types that +don't use other delimiters (for example `a-struct, i=(int)"1"`). They are use +to allow adding spaces or special characters (such as delimiters, +semicolumns, etc..) inside strings and you can use backslashes `\` to escape +characters inside them, for example: + +``` +a-struct, special="\"{[(;)]}\" can be used inside quotes" +``` + +They also allow for nested structure, such as: + +``` +a-struct, nested=(GstStructure)"nested-struct, nested=true" +``` + +> *Note*: Be aware that the current #GstCaps / #GstStructure serialization +> into string has limited support for nested #GstCaps / #GstStructure fields. +> It can only support one level of nesting. Using more levels will lead to +> unexpected behavior when using serialization features, such as +> gst_caps_to_string() or gst_value_serialize() and their counterparts. + + + the GType of a structure + + + + + + + Creates a #GstStructure from a string representation. +If end is not %NULL, a pointer to the place inside the given string +where parsing ended will be returned. + +Free-function: gst_structure_free + + + a new #GstStructure or %NULL + when the string could not be parsed. Free with + gst_structure_free() after use. + + + + + a string representation of a #GstStructure. + + + + pointer to store the end of the string in. + + + + + + Creates a new #GstStructure with the given name. Parses the +list of variable arguments and sets fields to the values listed. +Variable arguments should be passed as field name, field type, +and value. Last variable argument should be %NULL. + +Free-function: gst_structure_free + + + a new #GstStructure + + + + + name of new structure + + + + name of first field to set + + + + additional arguments + + + + + + Creates a new, empty #GstStructure with the given @name. + +See gst_structure_set_name() for constraints on the @name parameter. + +Free-function: gst_structure_free + + + a new, empty #GstStructure + + + + + name of new structure + + + + + + Creates a #GstStructure from a string representation. +If end is not %NULL, a pointer to the place inside the given string +where parsing ended will be returned. + +The current implementation of serialization will lead to unexpected results +when there are nested #GstCaps / #GstStructure deeper than one level. + +Free-function: gst_structure_free + + + a new #GstStructure or %NULL + when the string could not be parsed. Free with + gst_structure_free() after use. + + + + + a string representation of a #GstStructure + + + + + + Creates a new #GstStructure with the given name as a GQuark, followed by +fieldname quark, GType, argument(s) "triplets" in the same format as +gst_structure_id_set(). Basically a convenience wrapper around +gst_structure_new_id_empty() and gst_structure_id_set(). + +The last variable argument must be %NULL (or 0). + +Free-function: gst_structure_free + + + a new #GstStructure + + + + + name of new structure + + + + the GQuark for the name of the field to set + + + + variable arguments + + + + + + Creates a new, empty #GstStructure with the given name as a GQuark. + +Free-function: gst_structure_free + + + a new, empty #GstStructure + + + + + name of new structure + + + + + + Creates a new #GstStructure with the given @name. Structure fields +are set according to the varargs in a manner similar to +gst_structure_new(). + +See gst_structure_set_name() for constraints on the @name parameter. + +Free-function: gst_structure_free + + + a new #GstStructure + + + + + name of new structure + + + + name of first field to set + + + + variable argument list + + + + + + Tries intersecting @struct1 and @struct2 and reports whether the result +would not be empty. + + + %TRUE if intersection would not be empty + + + + + a #GstStructure + + + + a #GstStructure + + + + + + Duplicates a #GstStructure and all its fields and values. + +Free-function: gst_structure_free + + + a new #GstStructure. + + + + + a #GstStructure to duplicate + + + + + + Calls the provided function once for each field in the #GstStructure. In +contrast to gst_structure_foreach(), the function may modify the fields. +In contrast to gst_structure_map_in_place(), the field is removed from +the structure if %FALSE is returned from the function. +The structure must be mutable. + + + + + + + a #GstStructure + + + + a function to call for each field + + + + private data + + + + + + Fixate all values in @structure using gst_value_fixate(). +@structure will be modified in-place and should be writable. + + + + + + + a #GstStructure + + + + + + Fixates a #GstStructure by changing the given field with its fixated value. + + + %TRUE if the structure field could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + + + Fixates a #GstStructure by changing the given @field_name field to the given +@target boolean if that field is not fixed yet. + + + %TRUE if the structure could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + the target value of the fixation + + + + + + Fixates a #GstStructure by changing the given field to the nearest +double to @target that is a subset of the existing field. + + + %TRUE if the structure could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + the target value of the fixation + + + + + + Fixates a #GstStructure by changing the given field to the nearest +fraction to @target_numerator/@target_denominator that is a subset +of the existing field. + + + %TRUE if the structure could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + The numerator of the target value of the fixation + + + + The denominator of the target value of the fixation + + + + + + Fixates a #GstStructure by changing the given field to the nearest +integer to @target that is a subset of the existing field. + + + %TRUE if the structure could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + the target value of the fixation + + + + + + Fixates a #GstStructure by changing the given @field_name field to the given +@target string if that field is not fixed yet. + + + %TRUE if the structure could be fixated + + + + + a #GstStructure + + + + a field in @structure + + + + the target value of the fixation + + + + + + Calls the provided function once for each field in the #GstStructure. The +function must not modify the fields. Also see gst_structure_map_in_place() +and gst_structure_filter_and_map_in_place(). + + + %TRUE if the supplied function returns %TRUE For each of the fields, +%FALSE otherwise. + + + + + a #GstStructure + + + + a function to call for each field + + + + private data + + + + + + Frees a #GstStructure and all its fields and values. The structure must not +have a parent when this function is called. + + + + + + + the #GstStructure to free + + + + + + Parses the variable arguments and reads fields from @structure accordingly. +Variable arguments should be in the form field name, field type +(as a GType), pointer(s) to a variable(s) to hold the return value(s). +The last variable argument should be %NULL. + +For refcounted (mini)objects you will receive a new reference which +you must release with a suitable _unref\() when no longer needed. For +strings and boxed types you will receive a copy which you will need to +release with either g_free() or the suitable function for the boxed type. + + + %FALSE if there was a problem reading any of the fields (e.g. + because the field requested did not exist, or was of a type other + than the type specified), otherwise %TRUE. + + + + + a #GstStructure + + + + the name of the first field to read + + + + variable arguments + + + + + + This is useful in language bindings where unknown #GValue types are not +supported. This function will convert the %GST_TYPE_ARRAY into a newly +allocated #GValueArray and return it through @array. Be aware that this is +slower then getting the #GValue directly. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a %GST_TYPE_ARRAY, +this function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GValueArray + + + + + + Sets the boolean pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a boolean, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #gboolean to set + + + + + + Sets the clock time pointed to by @value corresponding to the clock time +of the given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a #GstClockTime, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GstClockTime to set + + + + + + Sets the date pointed to by @value corresponding to the date of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + +On success @value will point to a newly-allocated copy of the date which +should be freed with g_date_free() when no longer needed (note: this is +inconsistent with e.g. gst_structure_get_string() which doesn't return a +copy of the string). + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a data, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GDate to set + + + + + + Sets the datetime pointed to by @value corresponding to the datetime of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + +On success @value will point to a reference of the datetime which +should be unreffed with gst_date_time_unref() when no longer needed +(note: this is inconsistent with e.g. gst_structure_get_string() +which doesn't return a copy of the string). + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a data, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GstDateTime to set + + + + + + Sets the double pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a double, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a gdouble to set + + + + + + Sets the int pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists, +has the correct type and that the enumtype is correct. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain an enum of the given +type, this function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + the enum type of a field + + + + a pointer to an int to set + + + + + + Finds the field with the given name, and returns the type of the +value it contains. If the field is not found, G_TYPE_INVALID is +returned. + + + the #GValue of the field + + + + + a #GstStructure + + + + the name of the field + + + + + + Read the GstFlagSet flags and mask out of the structure into the +provided pointers. + + + %TRUE if the values could be set correctly. If there was no field +with @fieldname or the existing field did not contain a GstFlagSet, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a guint for the flags field + + + + a pointer to a guint for the mask field + + + + + + Sets the integers pointed to by @value_numerator and @value_denominator +corresponding to the value of the given field. Caller is responsible +for making sure the field exists and has the correct type. + + + %TRUE if the values could be set correctly. If there was no field +with @fieldname or the existing field did not contain a GstFraction, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to an int to set + + + + a pointer to an int to set + + + + + + Sets the int pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain an int, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to an int to set + + + + + + Sets the #gint64 pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a #gint64, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #gint64 to set + + + + + + This is useful in language bindings where unknown #GValue types are not +supported. This function will convert the %GST_TYPE_LIST into a newly +allocated GValueArray and return it through @array. Be aware that this is +slower then getting the #GValue directly. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a %GST_TYPE_LIST, this +function returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GValueArray + + + + + + Get the name of @structure as a string. + + + the name of the structure. + + + + + a #GstStructure + + + + + + Get the name of @structure as a GQuark. + + + the quark representing the name of the structure. + + + + + a #GstStructure + + + + + + Finds the field corresponding to @fieldname, and returns the string +contained in the field's value. Caller is responsible for making +sure the field exists and has the correct type. + +The string should not be modified, and remains valid until the next +call to a gst_structure_*() function with the given structure. + + + a pointer to the string or %NULL when the +field did not exist or did not contain a string. + + + + + a #GstStructure + + + + the name of a field + + + + + + Sets the uint pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a uint, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a uint to set + + + + + + Sets the #guint64 pointed to by @value corresponding to the value of the +given field. Caller is responsible for making sure the field exists +and has the correct type. + + + %TRUE if the value could be set correctly. If there was no field +with @fieldname or the existing field did not contain a #guint64, this function +returns %FALSE. + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #guint64 to set + + + + + + Parses the variable arguments and reads fields from @structure accordingly. +valist-variant of gst_structure_get(). Look at the documentation of +gst_structure_get() for more details. + + + %TRUE, or %FALSE if there was a problem reading any of the fields + + + + + a #GstStructure + + + + the name of the first field to read + + + + variable arguments + + + + + + Get the value of the field with name @fieldname. + + + the #GValue corresponding to the field with the given +name. + + + + + a #GstStructure + + + + the name of the field to get + + + + + + Check if @structure contains a field named @fieldname. + + + %TRUE if the structure contains a field with the given name + + + + + a #GstStructure + + + + the name of a field + + + + + + Check if @structure contains a field named @fieldname and with GType @type. + + + %TRUE if the structure contains a field with the given name and type + + + + + a #GstStructure + + + + the name of a field + + + + the type of a value + + + + + + Checks if the structure has the given name + + + %TRUE if @name matches the name of the structure. + + + + + a #GstStructure + + + + structure name to check for + + + + + + Parses the variable arguments and reads fields from @structure accordingly. +Variable arguments should be in the form field id quark, field type +(as a GType), pointer(s) to a variable(s) to hold the return value(s). +The last variable argument should be %NULL (technically it should be a +0 quark, but we require %NULL so compilers that support it can check for +the %NULL terminator and warn if it's not there). + +This function is just like gst_structure_get() only that it is slightly +more efficient since it saves the string-to-quark lookup in the global +quark hashtable. + +For refcounted (mini)objects you will receive a new reference which +you must release with a suitable _unref\() when no longer needed. For +strings and boxed types you will receive a copy which you will need to +release with either g_free() or the suitable function for the boxed type. + + + %FALSE if there was a problem reading any of the fields (e.g. + because the field requested did not exist, or was of a type other + than the type specified), otherwise %TRUE. + + + + + a #GstStructure + + + + the quark of the first field to read + + + + variable arguments + + + + + + Parses the variable arguments and reads fields from @structure accordingly. +valist-variant of gst_structure_id_get(). Look at the documentation of +gst_structure_id_get() for more details. + + + %TRUE, or %FALSE if there was a problem reading any of the fields + + + + + a #GstStructure + + + + the quark of the first field to read + + + + variable arguments + + + + + + Get the value of the field with GQuark @field. + + + the #GValue corresponding to the field with the given +name identifier. + + + + + a #GstStructure + + + + the #GQuark of the field to get + + + + + + Check if @structure contains a field named @field. + + + %TRUE if the structure contains a field with the given name + + + + + a #GstStructure + + + + #GQuark of the field name + + + + + + Check if @structure contains a field named @field and with GType @type. + + + %TRUE if the structure contains a field with the given name and type + + + + + a #GstStructure + + + + #GQuark of the field name + + + + the type of a value + + + + + + Identical to gst_structure_set, except that field names are +passed using the GQuark for the field name. This allows more efficient +setting of the structure if the caller already knows the associated +quark values. +The last variable argument must be %NULL. + + + + + + + a #GstStructure + + + + the GQuark for the name of the field to set + + + + variable arguments + + + + + + va_list form of gst_structure_id_set(). + + + + + + + a #GstStructure + + + + the name of the field to set + + + + variable arguments + + + + + + Sets the field with the given GQuark @field to @value. If the field +does not exist, it is created. If the field exists, the previous +value is replaced and freed. + + + + + + + a #GstStructure + + + + a #GQuark representing a field + + + + the new value of the field + + + + + + Sets the field with the given GQuark @field to @value. If the field +does not exist, it is created. If the field exists, the previous +value is replaced and freed. + + + + + + + a #GstStructure + + + + a #GQuark representing a field + + + + the new value of the field + + + + + + Intersects @struct1 and @struct2 and returns the intersection. + + + Intersection of @struct1 and @struct2 + + + + + a #GstStructure + + + + a #GstStructure + + + + + + Tests if the two #GstStructure are equal. + + + %TRUE if the two structures have the same name and field. + + + + + a #GstStructure. + + + + a #GstStructure. + + + + + + Checks if @subset is a subset of @superset, i.e. has the same +structure name and for all fields that are existing in @superset, +@subset has a value that is a subset of the value in @superset. + + + %TRUE if @subset is a subset of @superset + + + + + a #GstStructure + + + + a potentially greater #GstStructure + + + + + + Calls the provided function once for each field in the #GstStructure. In +contrast to gst_structure_foreach(), the function may modify but not delete the +fields. The structure must be mutable. + + + %TRUE if the supplied function returns %TRUE For each of the fields, +%FALSE otherwise. + + + + + a #GstStructure + + + + a function to call for each field + + + + private data + + + + + + Get the number of fields in the structure. + + + the number of fields in the structure + + + + + a #GstStructure + + + + + + Get the name of the given field number, counting from 0 onwards. + + + the name of the given field number + + + + + a #GstStructure + + + + the index to get the name of + + + + + + Removes all fields in a GstStructure. + + + + + + + a #GstStructure + + + + + + Removes the field with the given name. If the field with the given +name does not exist, the structure is unchanged. + + + + + + + a #GstStructure + + + + the name of the field to remove + + + + + + Removes the fields with the given names. If a field does not exist, the +argument is ignored. + + + + + + + a #GstStructure + + + + the name of the field to remove + + + + %NULL-terminated list of more fieldnames to remove + + + + + + va_list form of gst_structure_remove_fields(). + + + + + + + a #GstStructure + + + + the name of the field to remove + + + + %NULL-terminated list of more fieldnames to remove + + + + + + Parses the variable arguments and sets fields accordingly. Fields that +weren't already part of the structure are added as needed. +Variable arguments should be in the form field name, field type +(as a GType), value(s). The last variable argument should be %NULL. + + + + + + + a #GstStructure + + + + the name of the field to set + + + + variable arguments + + + + + + This is useful in language bindings where unknown GValue types are not +supported. This function will convert a @array to %GST_TYPE_ARRAY and set +the field specified by @fieldname. Be aware that this is slower then using +%GST_TYPE_ARRAY in a #GValue directly. + + + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GValueArray + + + + + + This is useful in language bindings where unknown GValue types are not +supported. This function will convert a @array to %GST_TYPE_LIST and set +the field specified by @fieldname. Be aware that this is slower then using +%GST_TYPE_LIST in a #GValue directly. + + + + + + + a #GstStructure + + + + the name of a field + + + + a pointer to a #GValueArray + + + + + + Sets the name of the structure to the given @name. The string +provided is copied before being used. It must not be empty, start with a +letter and can be followed by letters, numbers and any of "/-_.:". + + + + + + + a #GstStructure + + + + the new name of the structure + + + + + + Sets the parent_refcount field of #GstStructure. This field is used to +determine whether a structure is mutable or not. This function should only be +called by code implementing parent objects of #GstStructure, as described in +the MT Refcounting section of the design documents. + + + %TRUE if the parent refcount could be set. + + + + + a #GstStructure + + + + a pointer to the parent's refcount + + + + + + va_list form of gst_structure_set(). + + + + + + + a #GstStructure + + + + the name of the field to set + + + + variable arguments + + + + + + Sets the field with the given name @field to @value. If the field +does not exist, it is created. If the field exists, the previous +value is replaced and freed. + + + + + + + a #GstStructure + + + + the name of the field to set + + + + the new value of the field + + + + + + Sets the field with the given name @field to @value. If the field +does not exist, it is created. If the field exists, the previous +value is replaced and freed. The function will take ownership of @value. + + + + + + + a #GstStructure + + + + the name of the field to set + + + + the new value of the field + + + + + + Converts @structure to a human-readable string representation. + +For debugging purposes its easier to do something like this: +|[<!-- language="C" --> +GST_LOG ("structure is %" GST_PTR_FORMAT, structure); +]| +This prints the structure in human readable form. + +The current implementation of serialization will lead to unexpected results +when there are nested #GstCaps / #GstStructure deeper than one level. + +Free-function: g_free + + + a pointer to string allocated by g_malloc(). + g_free() after usage. + + + + + a #GstStructure + + + + + + Atomically modifies a pointer to point to a new structure. +The #GstStructure @oldstr_ptr is pointing to is freed and +@newstr is taken ownership over. + +Either @newstr and the value pointed to by @oldstr_ptr may be %NULL. + +It is a programming error if both @newstr and the value pointed to by +@oldstr_ptr refer to the same, non-%NULL structure. + + + %TRUE if @newstr was different from @oldstr_ptr + + + + + pointer to a place of + a #GstStructure to take + + + + a new #GstStructure + + + + + + + The type of a %GST_MESSAGE_STRUCTURE_CHANGE. + + Pad linking is starting or done. + + + Pad unlinking is starting or done. + + + + A function that will be called in gst_structure_filter_and_map_in_place(). +The function may modify @value, and the value will be removed from +the structure if %FALSE is returned. + + + %TRUE if the field should be preserved, %FALSE if it +should be removed. + + + + + the #GQuark of the field name + + + + the #GValue of the field + + + + user data + + + + + + A function that will be called in gst_structure_foreach(). The function may +not modify @value. + + + %TRUE if the foreach operation should continue, %FALSE if +the foreach operation should stop with %FALSE. + + + + + the #GQuark of the field name + + + + the #GValue of the field + + + + user data + + + + + + A function that will be called in gst_structure_map_in_place(). The function +may modify @value. + + + %TRUE if the map operation should continue, %FALSE if +the map operation should stop with %FALSE. + + + + + the #GQuark of the field name + + + + the #GValue of the field + + + + user data + + + + + + The GStreamer core provides a GstSystemClock based on the system time. +Asynchronous callbacks are scheduled from an internal thread. + +Clock implementors are encouraged to subclass this systemclock as it +implements the async notification. + +Subclasses can however override all of the important methods for sync and +async notifications to implement their own callback methods or blocking +wait operations. + + + Get a handle to the default system clock. The refcount of the +clock will be increased so you need to unref the clock after +usage. + + + the default clock. + +MT safe. + + + + + Sets the default system clock that can be obtained with +gst_system_clock_obtain(). + +This is mostly used for testing and debugging purposes when you +want to have control over the time reported by the default system +clock. + +MT safe. + + + + + + + a #GstClock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + album containing this data (string) + +The album name as it should be displayed, e.g. 'The Jazz Guitar' + + + + + The artist of the entire album, as it should be displayed. + + + + + The artist of the entire album, as it should be sorted. + + + + + album gain in db (double) + + + + + peak of the album (double) + + + + + album containing this data, as used for sorting (string) + +The album name as it should be sorted, e.g. 'Jazz Guitar, The' + + + + + count of discs inside collection this disc belongs to (unsigned integer) + + + + + disc number inside a collection (unsigned integer) + + + + + Arbitrary application data (sample) + +Some formats allow applications to add their own arbitrary data +into files. This data is application dependent. + + + + + Name of the application used to create the media (string) + + + + + person(s) responsible for the recording (string) + +The artist name as it should be displayed, e.g. 'Jimi Hendrix' or +'The Guitar Heroes' + + + + + person(s) responsible for the recording, as used for sorting (string) + +The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or +'Guitar Heroes, The' + + + + + generic file attachment (sample) (sample taglist should specify the content +type and if possible set "filename" to the file name of the +attachment) + + + + + codec the audio data is stored in (string) + + + + + number of beats per minute in audio (double) + + + + + exact or average bitrate in bits/s (unsigned integer) + + + + + codec the data is stored in (string) + + + + + free text commenting the data (string) + + + + + person(s) who composed the recording (string) + + + + + The composer's name, used for sorting (string) + + + + + conductor/performer refinement (string) + + + + + contact information (string) + + + + + container format the data is stored in (string) + + + + + copyright notice of the data (string) + + + + + URI to location where copyright details can be found (string) + + + + + date the data was created (#GDate structure) + + + + + date and time the data was created (#GstDateTime structure) + + + + + short text describing the content of the data (string) + + + + + Manufacturer of the device used to create the media (string) + + + + + Model of the device used to create the media (string) + + + + + length in GStreamer time units (nanoseconds) (unsigned 64-bit integer) + + + + + name of the person or organisation that encoded the file. May contain a +copyright message if the person or organisation also holds the copyright +(string) + +Note: do not use this field to describe the encoding application. Use +#GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that. + + + + + encoder used to encode this stream (string) + + + + + version of the encoder used to encode this stream (unsigned integer) + + + + + key/value text commenting the data (string) + +Must be in the form of 'key=comment' or +'key[lc]=comment' where 'lc' is an ISO-639 +language code. + +This tag is used for unknown Vorbis comment tags, +unknown APE tags and certain ID3v2 comment fields. + + + + + + + + + + + + genre this data belongs to (string) + + + + + Indicates the direction the device is pointing to when capturing +a media. It is represented as degrees in floating point representation, +0 means the geographic north, and increases clockwise (double from 0 to 360) + +See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION + + + + + The city (english name) where the media has been produced (string). + + + + + The country (english name) where the media has been produced (string). + + + + + geo elevation of where the media has been recorded or produced in meters +according to WGS84 (zero is average sea level) (double). + + + + + Represents the expected error on the horizontal positioning in +meters (double). + + + + + geo latitude location of where the media has been recorded or produced in +degrees according to WGS84 (zero at the equator, negative values for southern +latitudes) (double). + + + + + geo longitude location of where the media has been recorded or produced in +degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, +negative values for western longitudes). (double). + + + + + Indicates the movement direction of the device performing the capture +of a media. It is represented as degrees in floating point representation, +0 means the geographic north, and increases clockwise (double from 0 to 360) + +See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION + + + + + Speed of the capturing device when performing the capture. +Represented in m/s. (double) + +See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION + + + + + human readable descriptive location of where the media has been recorded or +produced. (string). + + + + + A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better +where the media has been produced. (e.g. the neighborhood) (string). + +This tag has been added as this is how it is handled/named in XMP's +Iptc4xmpcore schema. + + + + + Groups together media that are related and spans multiple tracks. An +example are multiple pieces of a concerto. (string) + + + + + Homepage for this media (i.e. artist or movie homepage) (string) + + + + + image (sample) (sample taglist should specify the content type and preferably +also set "image-type" field as `GstTagImageType`) + + + + + Represents the 'Orientation' tag from EXIF. Defines how the image +should be rotated and mirrored for display. (string) + +This tag has a predefined set of allowed values: + "rotate-0" + "rotate-90" + "rotate-180" + "rotate-270" + "flip-rotate-0" + "flip-rotate-90" + "flip-rotate-180" + "flip-rotate-270" + +The naming is adopted according to a possible transformation to perform +on the image to fix its orientation, obviously equivalent operations will +yield the same result. + +Rotations indicated by the values are in clockwise direction and +'flip' means an horizontal mirroring. + + + + + Information about the people behind a remix and similar +interpretations of another existing piece (string) + + + + + International Standard Recording Code - see http://www.ifpi.org/isrc/ (string) + + + + + comma separated keywords describing the content (string). + + + + + ISO-639-2 or ISO-639-1 code for the language the content is in (string) + +There is utility API in libgsttag in gst-plugins-base to obtain a translated +language name from the language code: `gst_tag_get_language_name()` + + + + + Name of the language the content is in (string) + +Free-form name of the language the content is in, if a language code +is not available. This tag should not be set in addition to a language +code. It is undefined what language or locale the language name is in. + + + + + license of data (string) + + + + + URI to location where license details can be found (string) + + + + + + + + + + + + Origin of media as a URI (location, where the original of the file or stream +is hosted) (string) + + + + + The lyrics of the media (string) + + + + + maximum bitrate in bits/s (unsigned integer) + + + + + [Midi note number](http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name) +of the audio track. This is useful for sample instruments and in particular +for multi-samples. + + + + + minimum bitrate in bits/s (unsigned integer) + + + + + + + + + + + + nominal bitrate in bits/s (unsigned integer). The actual bitrate might be +different from this target bitrate. + + + + + organization (string) + + + + + person(s) performing (string) + + + + + image that is meant for preview purposes, e.g. small icon-sized version +(sample) (sample taglist should specify the content type) + + + + + Any private data that may be contained in tags (sample). + +It is represented by #GstSample in which #GstBuffer contains the +binary data and the sample's info #GstStructure may contain any +extra information that identifies the origin or meaning of the data. + +Private frames in ID3v2 tags ('PRIV' frames) will be represented +using this tag, in which case the GstStructure will be named +"ID3PrivateFrame" and contain a field named "owner" of type string +which contains the owner-identification string from the tag. + + + + + Name of the label or publisher (string) + + + + + reference level of track and album gain values (double) + + + + + serial number of track (unsigned integer) + + + + + + + + + + + + + + + + + + + Number of the episode within a season/show (unsigned integer) + + + + + Name of the show, used for displaying (string) + + + + + Number of the season of a show/series (unsigned integer) + + + + + Name of the show, used for sorting (string) + + + + + codec/format the subtitle data is stored in (string) + + + + + commonly used title (string) + +The title as it should be displayed, e.g. 'The Doll House' + + + + + commonly used title, as used for sorting (string) + +The title as it should be sorted, e.g. 'Doll House, The' + + + + + count of tracks inside collection this track belongs to (unsigned integer) + + + + + track gain in db (double) + + + + + track number inside a collection (unsigned integer) + + + + + peak of the track (double) + + + + + Rating attributed by a person (likely the application user). +The higher the value, the more the user likes this media +(unsigned int from 0 to 100) + + + + + version of this data (string) + + + + + codec the video data is stored in (string) + + + + + + + + + + + + Send a broadcast signal to all waiting task conds + + + + Task to broadcast + + + + + + + + + + + + + + + + + + + + + + + + + + Get access to the cond of the task. + + + + Task to get the cond of + + + + + Get access to the task lock. + + + + Task to get the lock of + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signal the task cond + + + + Task to signal + + + + + Get access to the state of the task. + + + + Task to get the state of + + + + + Wait for the task cond to be signalled + + + + Task to wait for + + + + + printf format type used to debug GStreamer ClockTime pointers. You can use +this in combination with GStreamer's debug logging system as well as the +functions gst_info_vasprintf(), gst_info_strdup_vprintf() and +gst_info_strdup_printf() to pretty-print #GstClockTime pointers. This can +only be used on pointers to GstClockTime values. + + + + + Convert a struct timespec (see man pselect) to a #GstClockTime. + + + + the timespec to convert + + + + + Convert a GTimeVal to a #GstClockTime. + + + + the timeval to convert + + + + + Format @t for the #GST_TIME_FORMAT format string. Note: @t will be +evaluated more than once. + + + + a #GstClockTime + + + + + Convert a #GstClockTime to milliseconds (1/1000 of a second). + + + + the time + + + + + Convert a #GstClockTime to nanoseconds (1/1000000000 of a second). + + + + the time + + + + + Convert a #GstClockTime to seconds. + + + + the time + + + + + Convert a #GstClockTime to microseconds (1/1000000 of a second). + + + + the time + + + + + A string that can be used in printf-like format strings to display a +#GstClockTime value in h:m:s format. Use GST_TIME_ARGS() to construct +the matching arguments. + +Example: +|[<!-- language="C" --> +printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts)); +]| + + + + + Convert a #GstClockTime to a struct timespec (see man pselect) + + + + The #GstClockTime to convert + + + The target timespec + + + + + Convert a #GstClockTime to a GTimeVal + +> on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds, +> which is about 68 years. Expect trouble if you want to schedule stuff +> in your pipeline for 2038. + + + + The #GstClockTime to convert + + + The target timeval + + + + + Checks if @entry_type indicates that its #GstTocEntry is an alternative. + + + + The #GstTocEntryType from a #GstTocEntry + + + + + Checks if @entry_type indicates that its #GstTocEntry is a sequence. + + + + The #GstTocEntryType from a #GstTocEntry + + + + + Special value for the repeat_count set in gst_toc_entry_set_loop() or +returned by gst_toc_entry_set_loop() to indicate infinite looping. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extra tag flags used when registering tags. + + undefined flag + + + tag is meta data + + + tag is encoded + + + tag is decoded + + + number of tag flags + + + + A function that will be called in gst_tag_list_foreach(). The function may +not modify the tag list. + + + + + + + the #GstTagList + + + + a name of a tag in @list + + + + user data + + + + + + List of tags and values used to describe media metadata. + +Strings in structures must be ASCII or UTF-8 encoded. Other encodings are +not allowed. Strings must not be empty or %NULL. + + + the parent type + + + + Creates a new taglist and appends the values for the given tags. It expects +tag-value pairs like gst_tag_list_add(), and a %NULL terminator after the +last pair. The type of the values is implicit and is documented in the API +reference, but can also be queried at runtime with gst_tag_get_type(). It +is an error to pass a value of a type not matching the tag type into this +function. The tag list will make copies of any arguments passed +(e.g. strings, buffers). + +After creation you might also want to set a #GstTagScope on the returned +taglist to signal if the contained tags are global or stream tags. By +default stream scope is assumes. See gst_tag_list_set_scope(). + +Free-function: gst_tag_list_unref + + + a new #GstTagList. Free with gst_tag_list_unref() + when no longer needed. + + + + + tag + + + + %NULL-terminated list of values to set + + + + + + Creates a new empty GstTagList. + +Free-function: gst_tag_list_unref + + + An empty tag list + + + + + Deserializes a tag list. + + + a new #GstTagList, or %NULL in case of an +error. + + + + + a string created with gst_tag_list_to_string() + + + + + + Just like gst_tag_list_new(), only that it takes a va_list argument. +Useful mostly for language bindings. + +Free-function: gst_tag_list_unref + + + a new #GstTagList. Free with gst_tag_list_unref() + when no longer needed. + + + + + tag / value pairs to set + + + + + + Sets the values for the given tags using the specified mode. + + + + + + + list to set tags in + + + + the mode to use + + + + tag + + + + %NULL-terminated list of values to set + + + + + + Sets the values for the given tags using the specified mode. + + + + + + + list to set tags in + + + + the mode to use + + + + tag + + + + tag / value pairs to set + + + + + + Sets the GValues for the given tags using the specified mode. + + + + + + + list to set tags in + + + + the mode to use + + + + tag + + + + tag / GValue pairs to set + + + + + + Sets the GValue for a given tag using the specified mode. + + + + + + + list to set tags in + + + + the mode to use + + + + tag + + + + GValue for this tag + + + + + + Sets the GValues for the given tags using the specified mode. + + + + + + + list to set tags in + + + + the mode to use + + + + tag + + + + GValues to set + + + + + + Creates a new #GstTagList as a copy of the old @taglist. The new taglist +will have a refcount of 1, owned by the caller, and will be writable as +a result. + +Note that this function is the semantic equivalent of a gst_tag_list_ref() +followed by a gst_tag_list_make_writable(). If you only want to hold on to a +reference to the data, you should use gst_tag_list_ref(). + +When you are finished with the taglist, call gst_tag_list_unref() on it. + + + the new #GstTagList + + + + + a #GstTagList. + + + + + + Calls the given function for each tag inside the tag list. Note that if there +is no tag, the function won't be called at all. + + + + + + + list to iterate over + + + + function to be called for each tag + + + + user specified data + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the first date for the given tag in the taglist into the variable +pointed to by @value. Free the date with g_date_free() when it is no longer +needed. + +Free-function: g_date_free + + + %TRUE, if a date was copied, %FALSE if the tag didn't exist in the + given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + address of a GDate pointer + variable to store the result into + + + + + + Gets the date that is at the given index for the given tag in the given +list and copies it into the variable pointed to by @value. Free the date +with g_date_free() when it is no longer needed. + +Free-function: g_date_free + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the first datetime for the given tag in the taglist into the variable +pointed to by @value. Unref the date with gst_date_time_unref() when +it is no longer needed. + +Free-function: gst_date_time_unref + + + %TRUE, if a datetime was copied, %FALSE if the tag didn't exist in + the given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + address of a #GstDateTime + pointer variable to store the result into + + + + + + Gets the datetime that is at the given index for the given tag in the given +list and copies it into the variable pointed to by @value. Unref the datetime +with gst_date_time_unref() when it is no longer needed. + +Free-function: gst_date_time_unref + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Copies the first sample for the given tag in the taglist into the variable +pointed to by @sample. Free the sample with gst_sample_unref() when it is +no longer needed. You can retrieve the buffer from the sample using +gst_sample_get_buffer() and the associated caps (if any) with +gst_sample_get_caps(). + +Free-function: gst_sample_unref + + + %TRUE, if a sample was returned, %FALSE if the tag didn't exist in + the given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + address of a GstSample + pointer variable to store the result into + + + + + + Gets the sample that is at the given index for the given tag in the given +list and copies it into the variable pointed to by @sample. Free the sample +with gst_sample_unref() when it is no longer needed. You can retrieve the +buffer from the sample using gst_sample_get_buffer() and the associated +caps (if any) with gst_sample_get_caps(). + +Free-function: gst_sample_unref + + + %TRUE, if a sample was copied, %FALSE if the tag didn't exist in the + given list or if it was %NULL. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + address of a GstSample + pointer variable to store the result into + + + + + + Gets the scope of @list. + + + The scope of @list + + + + + a #GstTagList + + + + + + Copies the contents for the given tag into the value, possibly merging +multiple values into one if multiple values are associated with the tag. + +Use gst_tag_list_get_string_index (list, tag, 0, value) if you want +to retrieve the first string associated with this tag unmodified. + +The resulting string in @value will be in UTF-8 encoding and should be +freed by the caller using g_free when no longer needed. The +returned string is also guaranteed to be non-%NULL and non-empty. + +Free-function: g_free + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + +The resulting string in @value will be in UTF-8 encoding and should be +freed by the caller using g_free when no longer needed. The +returned string is also guaranteed to be non-%NULL and non-empty. + +Free-function: g_free + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Checks how many value are stored in this tag list for the given tag. + + + The number of tags stored + + + + + a taglist + + + + the tag to query + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Copies the contents for the given tag into the value, merging multiple values +into one if multiple values are associated with the tag. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Gets the value that is at the given index for the given tag in the given +list. + + + The GValue for the specified + entry or %NULL if the tag wasn't available or the tag + doesn't have as many entries + + + + + a #GstTagList + + + + tag to read out + + + + number of entry to read out + + + + + + Inserts the tags of the @from list into the first list using the given mode. + + + + + + + list to merge into + + + + list to merge from + + + + the mode to use + + + + + + Checks if the given taglist is empty. + + + %TRUE if the taglist is empty, otherwise %FALSE. + + + + + A #GstTagList. + + + + + + Checks if the two given taglists are equal. + + + %TRUE if the taglists are equal, otherwise %FALSE + + + + + a #GstTagList. + + + + a #GstTagList. + + + + + + Merges the two given lists into a new list. If one of the lists is %NULL, a +copy of the other is returned. If both lists are %NULL, %NULL is returned. + +Free-function: gst_tag_list_unref + + + the new list + + + + + first list to merge + + + + second list to merge + + + + the mode to use + + + + + + Get the number of tags in @list. + + + The number of tags in @list. + + + + + A #GstTagList. + + + + + + Get the name of the tag in @list at @index. + + + The name of the tag at @index. + + + + + A #GstTagList. + + + + the index + + + + + + Peeks at the value that is at the given index for the given tag in the given +list. + +The resulting string in @value will be in UTF-8 encoding and doesn't need +to be freed by the caller. The returned string is also guaranteed to +be non-%NULL and non-empty. + + + %TRUE, if a value was set, %FALSE if the tag didn't exist in the + given list. + + + + + a #GstTagList to get the tag from + + + + tag to read out + + + + number of entry to read out + + + + location for the result + + + + + + Add a reference to a #GstTagList mini object. + +From this point on, until the caller calls gst_tag_list_unref() or +gst_tag_list_make_writable(), it is guaranteed that the taglist object will +not change. To use a #GstTagList object, you must always have a refcount on +it -- either the one made implicitly by e.g. gst_tag_list_new(), or via +taking one explicitly with this function. + + + the same #GstTagList mini object. + + + + + the #GstTagList to reference + + + + + + Removes the given tag from the taglist. + + + + + + + list to remove tag from + + + + tag to remove + + + + + + Sets the scope of @list to @scope. By default the scope +of a taglist is stream scope. + + + + + + + a #GstTagList + + + + new scope for @list + + + + + + Serializes a tag list to a string. + + + a newly-allocated string, or %NULL in case of + an error. The string must be freed with g_free() when no longer + needed. + + + + + a #GstTagList + + + + + + Unref a #GstTagList, and and free all its memory when the refcount reaches 0. + + + + + + + a #GstTagList. + + + + + + Copies the contents for the given tag into the value, +merging multiple values into one if multiple values are associated +with the tag. +You must g_value_unset() the value after use. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + uninitialized #GValue to copy into + + + + list to get the tag from + + + + tag to read out + + + + + + + A function for merging multiple values of a tag used when registering +tags. + + + + + + + the destination #GValue + + + + the source #GValue + + + + + + The different tag merging modes are basically replace, overwrite and append, +but they can be seen from two directions. Given two taglists: (A) the tags +already in the element and (B) the ones that are supplied to the element ( +e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a +%GST_EVENT_TAG), how are these tags merged? +In the table below this is shown for the cases that a tag exists in the list +(A) or does not exists (!A) and combinations thereof. + +| merge mode | A + B | A + !B | !A + B | !A + !B | +| ----------- | ----- | ------ | ------ | ------- | +| REPLACE_ALL | B | ø | B | ø | +| REPLACE | B | A | B | ø | +| APPEND | A, B | A | B | ø | +| PREPEND | B, A | A | B | ø | +| KEEP | A | A | B | ø | +| KEEP_ALL | A | A | ø | ø | + + undefined merge mode + + + replace all tags (clear list and append) + + + replace tags + + + append tags + + + prepend tags + + + keep existing tags + + + keep all existing tags + + + the number of merge modes + + + + GstTagScope specifies if a taglist applies to the complete +medium or only to one single stream. + + tags specific to this single stream + + + global tags for the complete medium + + + + Element interface that allows setting of media metadata. + +Elements that support changing a stream's metadata will implement this +interface. Examples of such elements are 'vorbisenc', 'theoraenc' and +'id3v2mux'. + +If you just want to retrieve metadata in your application then all you +need to do is watch for tag messages on your pipeline's bus. This +interface is only for setting metadata, not for extracting it. To set tags +from the application, find tagsetter elements and set tags using e.g. +gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). Also consider +setting the #GstTagMergeMode that is used for tag events that arrive at the +tagsetter element (default mode is to keep existing tags). +The application should do that before the element goes to %GST_STATE_PAUSED. + +Elements implementing the #GstTagSetter interface often have to merge +any tags received from upstream and the tags set by the application via +the interface. This can be done like this: + +|[<!-- language="C" --> +GstTagMergeMode merge_mode; +const GstTagList *application_tags; +const GstTagList *event_tags; +GstTagSetter *tagsetter; +GstTagList *result; + +tagsetter = GST_TAG_SETTER (element); + +merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter); +application_tags = gst_tag_setter_get_tag_list (tagsetter); +event_tags = (const GstTagList *) element->event_tags; + +GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = %d", merge_mode); +GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags); +GST_LOG_OBJECT (tagsetter, "set tags: %" GST_PTR_FORMAT, application_tags); + +result = gst_tag_list_merge (application_tags, event_tags, merge_mode); + +GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result); +]| + + + + Adds the given tag / value pairs on the setter using the given merge mode. +The list must be terminated with %NULL. + + + + + + + a #GstTagSetter + + + + the mode to use + + + + tag to set + + + + tag / value pairs to set + + + + + + Adds the given tag / GValue pairs on the setter using the given merge mode. +The list must be terminated with %NULL. + + + + + + + a #GstTagSetter + + + + the mode to use + + + + tag to set + + + + tag / GValue pairs to set + + + + + + Adds the given tag / GValue pair on the setter using the given merge mode. + + + + + + + a #GstTagSetter + + + + the mode to use + + + + tag to set + + + + GValue to set for the tag + + + + + + Adds the given tag / GValue pairs on the setter using the given merge mode. +The list must be terminated with %NULL. + + + + + + + a #GstTagSetter + + + + the mode to use + + + + tag to set + + + + more tag / GValue pairs to set + + + + + + Adds the given tag / value pairs on the setter using the given merge mode. +The list must be terminated with %NULL. + + + + + + + a #GstTagSetter + + + + the mode to use + + + + tag to set + + + + more tag / value pairs to set + + + + + + Returns the current list of tags the setter uses. The list should not be +modified or freed. + +This function is not thread-safe. + + + a current snapshot of the + taglist used in the setter or %NULL if none is used. + + + + + a #GstTagSetter + + + + + + Queries the mode by which tags inside the setter are overwritten by tags +from events + + + the merge mode used inside the element. + + + + + a #GstTagSetter + + + + + + Merges the given list into the setter's list using the given mode. + + + + + + + a #GstTagSetter + + + + a tag list to merge from + + + + the mode to merge with + + + + + + Reset the internal taglist. Elements should call this from within the +state-change handler. + + + + + + + a #GstTagSetter + + + + + + Sets the given merge mode that is used for adding tags from events to tags +specified by this interface. The default is #GST_TAG_MERGE_KEEP, which keeps +the tags set with this interface and discards tags from events. + + + + + + + a #GstTagSetter + + + + The mode with which tags are added + + + + + + + #GstTagSetterInterface interface. + + + parent interface type. + + + + + #GstTask is used by #GstElement and #GstPad to provide the data passing +threads in a #GstPipeline. + +A #GstPad will typically start a #GstTask to push or pull data to/from the +peer pads. Most source elements start a #GstTask to push data. In some cases +a demuxer element can start a #GstTask to pull data from a peer element. This +is typically done when the demuxer can perform random access on the upstream +peer element for improved performance. + +Although convenience functions exist on #GstPad to start/pause/stop tasks, it +might sometimes be needed to create a #GstTask manually if it is not related to +a #GstPad. + +Before the #GstTask can be run, it needs a #GRecMutex that can be set with +gst_task_set_lock(). + +The task can be started, paused and stopped with gst_task_start(), gst_task_pause() +and gst_task_stop() respectively or with the gst_task_set_state() function. + +A #GstTask will repeatedly call the #GstTaskFunction with the user data +that was provided when creating the task with gst_task_new(). While calling +the function it will acquire the provided lock. The provided lock is released +when the task pauses or stops. + +Stopping a task with gst_task_stop() will not immediately make sure the task is +not running anymore. Use gst_task_join() to make sure the task is completely +stopped and the thread is stopped. + +After creating a #GstTask, use gst_object_unref() to free its resources. This can +only be done when the task is not running anymore. + +Task functions can send a #GstMessage to send out-of-band data to the +application. The application can receive messages from the #GstBus in its +mainloop. + +For debugging purposes, the task will configure its object name as the thread +name on Linux. Please note that the object name should be configured before the +task is started; changing the object name after the task has been started, has +no effect on the thread name. + + + Create a new Task that will repeatedly call the provided @func +with @user_data as a parameter. Typically the task will run in +a new thread. + +The function cannot be changed after the task has been created. You +must create a new #GstTask to change the function. + +This function will not yet create and start a thread. Use gst_task_start() or +gst_task_pause() to create and start the GThread. + +Before the task can be used, a #GRecMutex must be configured using the +gst_task_set_lock() function. This lock will always be acquired while +@func is called. + + + A new #GstTask. + +MT safe. + + + + + The #GstTaskFunction to use + + + + User data to pass to @func + + + + the function to call when @user_data is no longer needed. + + + + + + Wait for all tasks to be stopped. This is mainly used internally +to ensure proper cleanup of internal data structures in test suites. + +MT safe. + + + + + + + Get the #GstTaskPool that this task will use for its streaming +threads. + +MT safe. + + + the #GstTaskPool used by @task. gst_object_unref() +after usage. + + + + + a #GstTask + + + + + + Get the current state of the task. + + + The #GstTaskState of the task + +MT safe. + + + + + The #GstTask to query + + + + + + Joins @task. After this call, it is safe to unref the task +and clean up the lock set with gst_task_set_lock(). + +The task will automatically be stopped with this call. + +This function cannot be called from within a task function as this +would cause a deadlock. The function will detect this and print a +g_warning. + + + %TRUE if the task could be joined. + +MT safe. + + + + + The #GstTask to join + + + + + + Pauses @task. This method can also be called on a task in the +stopped state, in which case a thread will be started and will remain +in the paused state. This function does not wait for the task to complete +the paused state. + + + %TRUE if the task could be paused. + +MT safe. + + + + + The #GstTask to pause + + + + + + Resume @task in case it was paused. If the task was stopped, it will +remain in that state and this function will return %FALSE. + + + %TRUE if the task could be resumed. + +MT safe. + + + + + The #GstTask to resume + + + + + + Call @enter_func when the task function of @task is entered. @user_data will +be passed to @enter_func and @notify will be called when @user_data is no +longer referenced. + + + + + + + The #GstTask to use + + + + a #GstTaskThreadFunc + + + + user data passed to @enter_func + + + + called when @user_data is no longer referenced + + + + + + Call @leave_func when the task function of @task is left. @user_data will +be passed to @leave_func and @notify will be called when @user_data is no +longer referenced. + + + + + + + The #GstTask to use + + + + a #GstTaskThreadFunc + + + + user data passed to @leave_func + + + + called when @user_data is no longer referenced + + + + + + Set the mutex used by the task. The mutex will be acquired before +calling the #GstTaskFunction. + +This function has to be called before calling gst_task_pause() or +gst_task_start(). + +MT safe. + + + + + + + The #GstTask to use + + + + The #GRecMutex to use + + + + + + Set @pool as the new GstTaskPool for @task. Any new streaming threads that +will be created by @task will now use @pool. + +MT safe. + + + + + + + a #GstTask + + + + a #GstTaskPool + + + + + + Sets the state of @task to @state. + +The @task must have a lock associated with it using +gst_task_set_lock() when going to GST_TASK_STARTED or GST_TASK_PAUSED or +this function will return %FALSE. + +MT safe. + + + %TRUE if the state could be changed. + + + + + a #GstTask + + + + the new task state + + + + + + Starts @task. The @task must have a lock associated with it using +gst_task_set_lock() or this function will return %FALSE. + + + %TRUE if the task could be started. + +MT safe. + + + + + The #GstTask to start + + + + + + Stops @task. This method merely schedules the task to stop and +will not wait for the task to have completely stopped. Use +gst_task_join() to stop and wait for completion. + + + %TRUE if the task could be stopped. + +MT safe. + + + + + The #GstTask to stop + + + + + + + + + the state of the task + + + + used to pause/resume the task + + + + The lock taken when iterating the task function + + + + the function executed by this task + + + + user_data passed to the task function + + + + GDestroyNotify for @user_data + + + + a flag indicating that the task is running + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A function that will repeatedly be called in the thread created by +a #GstTask. + + + + + + + user data passed to the function + + + + + + This object provides an abstraction for creating threads. The default +implementation uses a regular GThreadPool to start tasks. + +Subclasses can be made to create custom threads. + + + Create a new default task pool. The default task pool will use a regular +GThreadPool for threads. + + + a new #GstTaskPool. gst_object_unref() after usage. + + + + + Wait for all tasks to be stopped. This is mainly used internally +to ensure proper cleanup of internal data structures in test suites. + +MT safe. + + + + + + + a #GstTaskPool + + + + + + Dispose of the handle returned by gst_task_pool_push(). This does +not need to be called with the default implementation as the default +#GstTaskPoolClass::push implementation always returns %NULL. This does not need to be +called either when calling gst_task_pool_join(), but should be called +when joining is not necessary, but gst_task_pool_push() returned a +non-%NULL value. + +This method should only be called with the same @pool instance that provided +@id. + + + + + + + a #GstTaskPool + + + + the id + + + + + + Join a task and/or return it to the pool. @id is the id obtained from +gst_task_pool_push(). The default implementation does nothing, as the +default #GstTaskPoolClass::push implementation always returns %NULL. + +This method should only be called with the same @pool instance that provided +@id. + + + + + + + a #GstTaskPool + + + + the id + + + + + + Prepare the taskpool for accepting gst_task_pool_push() operations. + +MT safe. + + + + + + + a #GstTaskPool + + + + + + Start the execution of a new thread from @pool. + + + a pointer that should be used +for the gst_task_pool_join function. This pointer can be %NULL, you +must check @error to detect errors. If the pointer is not %NULL and +gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() +instead. + + + + + a #GstTaskPool + + + + the function to call + + + + data to pass to @func + + + + + + Wait for all tasks to be stopped. This is mainly used internally +to ensure proper cleanup of internal data structures in test suites. + +MT safe. + + + + + + + a #GstTaskPool + + + + + + Dispose of the handle returned by gst_task_pool_push(). This does +not need to be called with the default implementation as the default +#GstTaskPoolClass::push implementation always returns %NULL. This does not need to be +called either when calling gst_task_pool_join(), but should be called +when joining is not necessary, but gst_task_pool_push() returned a +non-%NULL value. + +This method should only be called with the same @pool instance that provided +@id. + + + + + + + a #GstTaskPool + + + + the id + + + + + + Join a task and/or return it to the pool. @id is the id obtained from +gst_task_pool_push(). The default implementation does nothing, as the +default #GstTaskPoolClass::push implementation always returns %NULL. + +This method should only be called with the same @pool instance that provided +@id. + + + + + + + a #GstTaskPool + + + + the id + + + + + + Prepare the taskpool for accepting gst_task_pool_push() operations. + +MT safe. + + + + + + + a #GstTaskPool + + + + + + Start the execution of a new thread from @pool. + + + a pointer that should be used +for the gst_task_pool_join function. This pointer can be %NULL, you +must check @error to detect errors. If the pointer is not %NULL and +gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() +instead. + + + + + a #GstTaskPool + + + + the function to call + + + + data to pass to @func + + + + + + + + + + + + + + + + + + The #GstTaskPoolClass object. + + + the parent class structure + + + + + + + + + + + a #GstTaskPool + + + + + + + + + + + + + + a #GstTaskPool + + + + + + + + + + a pointer that should be used +for the gst_task_pool_join function. This pointer can be %NULL, you +must check @error to detect errors. If the pointer is not %NULL and +gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() +instead. + + + + + a #GstTaskPool + + + + the function to call + + + + data to pass to @func + + + + + + + + + + + + + + a #GstTaskPool + + + + the id + + + + + + + + + + + + + + a #GstTaskPool + + + + the id + + + + + + + + + + + + + Task function, see gst_task_pool_push(). + + + + + + + user data for the task function + + + + + + + + + The different states a task can be in + + the task is started and running + + + the task is stopped + + + the task is paused + + + + Custom GstTask thread callback functions that can be installed. + + + + + + + The #GstTask + + + + The #GThread + + + + user data + + + + + + Structure for saving a timestamp and a value. + + + timestamp of the value change + + + + the corresponding value + + + + + #GstToc functions are used to create/free #GstToc and #GstTocEntry structures. +Also they are used to convert #GstToc into #GstStructure and vice versa. + +#GstToc lets you to inform other elements in pipeline or application that playing +source has some kind of table of contents (TOC). These may be chapters, editions, +angles or other types. For example: DVD chapters, Matroska chapters or cue sheet +TOC. Such TOC will be useful for applications to display instead of just a +playlist. + +Using TOC is very easy. Firstly, create #GstToc structure which represents root +contents of the source. You can also attach TOC-specific tags to it. Then fill +it with #GstTocEntry entries by appending them to the #GstToc using +gst_toc_append_entry(), and appending subentries to a #GstTocEntry using +gst_toc_entry_append_sub_entry(). + +Note that root level of the TOC can contain only either editions or chapters. You +should not mix them together at the same level. Otherwise you will get serialization +/deserialization errors. Make sure that no one of the entries has negative start and + stop values. + +Use gst_event_new_toc() to create a new TOC #GstEvent, and gst_event_parse_toc() to +parse received TOC event. Use gst_event_new_toc_select() to create a new TOC select #GstEvent, +and gst_event_parse_toc_select() to parse received TOC select event. The same rule for +the #GstMessage: gst_message_new_toc() to create new TOC #GstMessage, and +gst_message_parse_toc() to parse received TOC message. + +TOCs can have global scope or current scope. Global scope TOCs contain +all entries that can possibly be selected using a toc select event, and +are what an application is usually interested in. TOCs with current scope +only contain the parts of the TOC relevant to the currently selected/playing +stream; the current scope TOC is used by downstream elements such as muxers +to write correct TOC entries when transcoding files, for example. When +playing a DVD, the global TOC would contain a hierarchy of all titles, +chapters and angles, for example, while the current TOC would only contain +the chapters for the currently playing title if playback of a specific +title was requested. + +Applications and plugins should not rely on TOCs having a certain kind of +structure, but should allow for different alternatives. For example, a +simple CUE sheet embedded in a file may be presented as a flat list of +track entries, or could have a top-level edition node (or some other +alternative type entry) with track entries underneath that node; or even +multiple top-level edition nodes (or some other alternative type entries) +each with track entries underneath, in case the source file has extracted +a track listing from different sources). + + + Create a new #GstToc structure. + + + newly allocated #GstToc structure, free it + with gst_toc_unref(). + + + + + scope of this TOC + + + + + + Appends the #GstTocEntry @entry to @toc. + + + + + + + A #GstToc instance + + + + A #GstTocEntry + + + + + + + + + + + + + + + + + Find #GstTocEntry with given @uid in the @toc. + + + #GstTocEntry with specified +@uid from the @toc, or %NULL if not found. + + + + + #GstToc to search in. + + + + UID to find #GstTocEntry with. + + + + + + Gets the list of #GstTocEntry of @toc. + + + A #GList of #GstTocEntry for @entry + + + + + + + A #GstToc instance + + + + + + + + scope of @toc + + + + + a #GstToc instance + + + + + + Gets the tags for @toc. + + + A #GstTagList for @entry + + + + + A #GstToc instance + + + + + + Merge @tags into the existing tags of @toc using @mode. + + + + + + + A #GstToc instance + + + + A #GstTagList or %NULL + + + + A #GstTagMergeMode + + + + + + Set a #GstTagList with tags for the complete @toc. + + + + + + + A #GstToc instance + + + + A #GstTagList or %NULL + + + + + + + + + Create new #GstTocEntry structure. + + + newly allocated #GstTocEntry structure, free it with gst_toc_entry_unref(). + + + + + entry type. + + + + unique ID (UID) in the whole TOC. + + + + + + Appends the #GstTocEntry @subentry to @entry. + + + + + + + A #GstTocEntry instance + + + + A #GstTocEntry + + + + + + + + @entry's entry type + + + + + a #GstTocEntry + + + + + + Get @loop_type and @repeat_count values from the @entry and write them into +appropriate storages. Loops are e.g. used by sampled instruments. GStreamer +is not automatically applying the loop. The application can process this +meta data and use it e.g. to send a seek-event to loop a section. + + + %TRUE if all non-%NULL storage pointers were filled with appropriate +values, %FALSE otherwise. + + + + + #GstTocEntry to get values from. + + + + the storage for the loop_type + value, leave %NULL if not need. + + + + the storage for the repeat_count + value, leave %NULL if not need. + + + + + + Gets the parent #GstTocEntry of @entry. + + + The parent #GstTocEntry of @entry + + + + + A #GstTocEntry instance + + + + + + Get @start and @stop values from the @entry and write them into appropriate +storages. + + + %TRUE if all non-%NULL storage pointers were filled with appropriate +values, %FALSE otherwise. + + + + + #GstTocEntry to get values from. + + + + the storage for the start value, leave + %NULL if not need. + + + + the storage for the stop value, leave + %NULL if not need. + + + + + + Gets the sub-entries of @entry. + + + A #GList of #GstTocEntry of @entry + + + + + + + A #GstTocEntry instance + + + + + + Gets the tags for @entry. + + + A #GstTagList for @entry + + + + + A #GstTocEntry instance + + + + + + Gets the parent #GstToc of @entry. + + + The parent #GstToc of @entry + + + + + A #GstTocEntry instance + + + + + + Gets the UID of @entry. + + + The UID of @entry + + + + + A #GstTocEntry instance + + + + + + + + %TRUE if @entry's type is an alternative type, otherwise %FALSE + + + + + a #GstTocEntry + + + + + + + + %TRUE if @entry's type is a sequence type, otherwise %FALSE + + + + + a #GstTocEntry + + + + + + Merge @tags into the existing tags of @entry using @mode. + + + + + + + A #GstTocEntry instance + + + + A #GstTagList or %NULL + + + + A #GstTagMergeMode + + + + + + Set @loop_type and @repeat_count values for the @entry. + + + + + + + #GstTocEntry to set values. + + + + loop_type value to set. + + + + repeat_count value to set. + + + + + + Set @start and @stop values for the @entry. + + + + + + + #GstTocEntry to set values. + + + + start value to set. + + + + stop value to set. + + + + + + Set a #GstTagList with tags for the complete @entry. + + + + + + + A #GstTocEntry instance + + + + A #GstTagList or %NULL + + + + + + + The different types of TOC entries (see #GstTocEntry). + +There are two types of TOC entries: alternatives or parts in a sequence. + + entry is an angle (i.e. an alternative) + + + entry is a version (i.e. alternative) + + + entry is an edition (i.e. alternative) + + + invalid entry type value + + + entry is a title (i.e. a part of a sequence) + + + entry is a track (i.e. a part of a sequence) + + + entry is a chapter (i.e. a part of a sequence) + + + Converts @type to a string representation. + + + Returns a human-readable string for @type. This string is + only for debugging purpose and should not be displayed in a user + interface. + + + + + a #GstTocEntryType. + + + + + + + How a #GstTocEntry should be repeated. By default, entries are played a +single time. + + single forward playback + + + repeat forward + + + repeat backward + + + repeat forward and backward + + + + The scope of a TOC. + + global TOC representing all selectable options + (this is what applications are usually interested in) + + + TOC for the currently active/selected stream + (this is a TOC representing the current stream from start to EOS, + and is what a TOC writer / muxer is usually interested in; it will + usually be a subset of the global TOC, e.g. just the chapters of + the current title, or the chapters selected for playback from the + current title) + + + + Element interface that allows setting of the TOC. + +Elements that support some kind of chapters or editions (or tracks like in +the FLAC cue sheet) will implement this interface. + +If you just want to retrieve the TOC in your application then all you +need to do is watch for TOC messages on your pipeline's bus (or you can +perform TOC query). This interface is only for setting TOC data, not for +extracting it. To set TOC from the application, find proper tocsetter element +and set TOC using gst_toc_setter_set_toc(). + +Elements implementing the #GstTocSetter interface can extend existing TOC +by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it) +with any TOC entries received from downstream. + + + + Return current TOC the setter uses. The TOC should not be +modified without making it writable first. + + + TOC set, or %NULL. Unref with + gst_toc_unref() when no longer needed + + + + + a #GstTocSetter. + + + + + + Reset the internal TOC. Elements should call this from within the +state-change handler. + + + + + + + a #GstTocSetter. + + + + + + Set the given TOC on the setter. Previously set TOC will be +unreffed before setting a new one. + + + + + + + a #GstTocSetter. + + + + a #GstToc to set. + + + + + + + #GstTocSetterInterface interface. + + + parent interface type. + + + + + Tracing modules will subclass #GstTracer and register through +gst_tracer_register(). Modules can attach to various hook-types - see +gst_tracing_register_hook(). When invoked they receive hook specific +contextual data, which they must not modify. + + + Create a new tracer-factory capable of instantiating objects of the +@type and add the factory to @plugin. + + + %TRUE, if the registering succeeded, %FALSE on error + + + + + A #GstPlugin, or %NULL for a static typefind function + + + + The name for registering + + + + GType of tracer to register + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Use gst_tracer_factory_get_list() to get a list of tracer factories known to +GStreamer. + + + Gets the list of all registered tracer factories. You must free the +list using gst_plugin_feature_list_free(). + +The returned factories are sorted by factory name. + +Free-function: gst_plugin_feature_list_free + + + the list of all + registered #GstTracerFactory. + + + + + + + Get the #GType for elements managed by this factory. The type can +only be retrieved if the element factory is loaded, which can be +assured with gst_plugin_feature_load(). + + + the #GType for tracers managed by this factory or 0 if +the factory is not loaded. + + + + + factory to get managed #GType from + + + + + + + + + + + + + Tracing modules will create instances of this class to announce the data they +will log and create a log formatter. + + + Create a new tracer record. The record instance can be used to efficiently +log entries using gst_tracer_record_log(). + +The @name without the ".class" suffix will be used for the log records. +There must be fields for each value that gets logged where the field name is +the value name. The field must be a #GstStructure describing the value. The +sub structure must contain a field called 'type' of %G_TYPE_GTYPE that +contains the GType of the value. The resulting #GstTracerRecord will take +ownership of the field structures. + +The way to deal with optional values is to log an additional boolean before +the optional field, that if %TRUE signals that the optional field is valid +and %FALSE signals that the optional field should be ignored. One must still +log a placeholder value for the optional field though. Please also note, that +pointer type values must not be NULL - the underlying serialisation can not +handle that right now. + +> Please note that this is still under discussion and subject to change. + + + a new #GstTracerRecord + + + + + name of new record, must end on ".class". + + + + name of first field to set + + + + additional arguments + + + + + + Serialzes the trace event into the log. + +Right now this is using the gstreamer debug log with the level TRACE (7) and +the category "GST_TRACER". + +> Please note that this is still under discussion and subject to change. + + + + + + + the tracer-record + + + + the args as described in the spec- + + + + + + + + + + Flag that describe the value. These flags help applications processing the +logs to understand the values. + + no flags + + + the value is optional. When using this flag + one need to have an additional boolean arg before this value in the + var-args list passed to gst_tracer_record_log(). + + + the value is a combined figure, since the + start of tracing. Examples are averages or timestamps. + + + + Tracing record will contain fields that contain a measured value or extra +meta-data. One such meta data are values that tell where a measurement was +taken. This enumerating declares to which scope such a meta data field +relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log +events may contain values for different #GstPads. + + the value is related to the process + + + the value is related to a thread + + + the value is related to an #GstElement + + + the value is related to a #GstPad + + + + The following functions allow you to detect the media type of an unknown +stream. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The data used by the caller of the typefinding function. + + + + + + + + + + + + + + + + + + + + + + Get the length of the data stream. + + + The length of the data stream, or 0 if it is not available. + + + + + The #GstTypeFind the function was called with + + + + + + Returns the @size bytes of the stream to identify beginning at offset. If +offset is a positive number, the offset is relative to the beginning of the +stream, if offset is a negative number the offset is relative to the end of +the stream. The returned memory is valid until the typefinding function +returns and must not be freed. + + + the + requested data, or %NULL if that data is not available. + + + + + + + The #GstTypeFind object the function was called with + + + + The offset + + + + The number of bytes to return + + + + + + If a #GstTypeFindFunction calls this function it suggests the caps with the +given probability. A #GstTypeFindFunction may supply different suggestions +in one call. +It is up to the caller of the #GstTypeFindFunction to interpret these values. + + + + + + + The #GstTypeFind object the function was called with + + + + The probability in percent that the suggestion is right + + + + The fixed #GstCaps to suggest + + + + + + If a #GstTypeFindFunction calls this function it suggests the caps with the +given probability. A #GstTypeFindFunction may supply different suggestions +in one call. It is up to the caller of the #GstTypeFindFunction to interpret +these values. + +This function is similar to gst_type_find_suggest(), only that instead of +passing a #GstCaps argument you can create the caps on the fly in the same +way as you can with gst_caps_new_simple(). + +Make sure you terminate the list of arguments with a %NULL argument and that +the values passed have the correct type (in terms of width in bytes when +passed to the vararg function - this applies particularly to gdouble and +guint64 arguments). + + + + + + + The #GstTypeFind object the function was called with + + + + The probability in percent that the suggestion is right + + + + the media type of the suggested caps + + + + first field of the suggested caps, or %NULL + + + + additional arguments to the suggested caps in the same format as the + arguments passed to gst_structure_new() (ie. triplets of field name, + field GType and field value) + + + + + + Registers a new typefind function to be used for typefinding. After +registering this function will be available for typefinding. +This function is typically called during an element's plugin initialization. + + + %TRUE on success, %FALSE otherwise + + + + + A #GstPlugin, or %NULL for a static typefind function + + + + The name for registering + + + + The rank (or importance) of this typefind function + + + + The #GstTypeFindFunction to use + + + + Optional comma-separated list of extensions + that could belong to this type + + + + Optionally the caps that could be returned when typefinding + succeeds + + + + Optional user data. This user data must be available until the plugin + is unloaded. + + + + a #GDestroyNotify that will be called on @data when the plugin + is unloaded. + + + + + + + These functions allow querying information about registered typefind +functions. How to create and register these functions is described in +the section <link linkend="gstreamer-Writing-typefind-functions"> +"Writing typefind functions"</link>. + +The following example shows how to write a very simple typefinder that +identifies the given data. You can get quite a bit more complicated than +that though. +|[<!-- language="C" --> + typedef struct { + guint8 *data; + guint size; + guint probability; + GstCaps *data; + } MyTypeFind; + static void + my_peek (gpointer data, gint64 offset, guint size) + { + MyTypeFind *find = (MyTypeFind *) data; + if (offset &gt;= 0 &amp;&amp; offset + size &lt;= find->size) { + return find->data + offset; + } + return NULL; + } + static void + my_suggest (gpointer data, guint probability, GstCaps *caps) + { + MyTypeFind *find = (MyTypeFind *) data; + if (probability &gt; find->probability) { + find->probability = probability; + gst_caps_replace (&amp;find->caps, caps); + } + } + static GstCaps * + find_type (guint8 *data, guint size) + { + GList *walk, *type_list; + MyTypeFind find = {data, size, 0, NULL}; + GstTypeFind gst_find = {my_peek, my_suggest, &amp;find, }; + walk = type_list = gst_type_find_factory_get_list (); + while (walk) { + GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (walk->data); + walk = g_list_next (walk) + gst_type_find_factory_call_function (factory, &amp;gst_find); + } + g_list_free (type_list); + return find.caps; + }; +]| + + + Gets the list of all registered typefind factories. You must free the +list using gst_plugin_feature_list_free(). + +The returned factories are sorted by highest rank first, and then by +factory name. + +Free-function: gst_plugin_feature_list_free + + + the list of all + registered #GstTypeFindFactory. + + + + + + + Calls the #GstTypeFindFunction associated with this factory. + + + + + + + A #GstTypeFindFactory + + + + a properly setup #GstTypeFind entry. The get_data + and suggest_type members must be set. + + + + + + Gets the #GstCaps associated with a typefind factory. + + + the #GstCaps associated with this factory + + + + + A #GstTypeFindFactory + + + + + + Gets the extensions associated with a #GstTypeFindFactory. The returned +array should not be changed. If you need to change stuff in it, you should +copy it using g_strdupv(). This function may return %NULL to indicate +a 0-length list. + + + + a %NULL-terminated array of extensions associated with this factory + + + + + + + A #GstTypeFindFactory + + + + + + Check whether the factory has a typefind function. Typefind factories +without typefind functions are a last-effort fallback mechanism to +e.g. assume a certain media type based on the file extension. + + + %TRUE if the factory has a typefind functions set, otherwise %FALSE + + + + + A #GstTypeFindFactory + + + + + + + + + + A function that will be called by typefinding. + + + + + + + A #GstTypeFind structure + + + + optional data to pass to the function + + + + + + The probability of the typefind function. Higher values have more certainty +in doing a reliable typefind. + + type undetected. + + + unlikely typefind. + + + possible type detected. + + + likely a type was detected. + + + nearly certain that a type was detected. + + + very certain a type was detected. + + + + + + + + + + + Different URI-related errors that can occur. + + The protocol is not supported + + + There was a problem with the URI + + + Could not set or change the URI because the + URI handler was in a state where that is not possible or not permitted + + + There was a problem with the entity that + the URI references + + + + + + + + + + The #GstURIHandler is an interface that is implemented by Source and Sink +#GstElement to unify handling of URI. + +An application can use the following functions to quickly get an element +that handles the given URI for reading or writing +(gst_element_make_from_uri()). + +Source and Sink plugins should implement this interface when possible. + + + Gets the currently handled URI. + + + the URI currently handled by + the @handler. Returns %NULL if there are no URI currently + handled. The returned string must be freed with g_free() when no + longer needed. + + + + + A #GstURIHandler + + + + + + Tries to set the URI of the given handler. + + + %TRUE if the URI was set successfully, else %FALSE. + + + + + A #GstURIHandler + + + + URI to set + + + + + + Gets the list of protocols supported by @handler. This list may not be +modified. + + + the + supported protocols. Returns %NULL if the @handler isn't + implemented properly, or the @handler doesn't support any + protocols. + + + + + + + A #GstURIHandler. + + + + + + Gets the currently handled URI. + + + the URI currently handled by + the @handler. Returns %NULL if there are no URI currently + handled. The returned string must be freed with g_free() when no + longer needed. + + + + + A #GstURIHandler + + + + + + Gets the type of the given URI handler + + + the #GstURIType of the URI handler. +Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. + + + + + A #GstURIHandler. + + + + + + Tries to set the URI of the given handler. + + + %TRUE if the URI was set successfully, else %FALSE. + + + + + A #GstURIHandler + + + + URI to set + + + + + + + Any #GstElement using this interface should implement these methods. + + + The parent interface type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the URI currently handled by + the @handler. Returns %NULL if there are no URI currently + handled. The returned string must be freed with g_free() when no + longer needed. + + + + + A #GstURIHandler + + + + + + + + + + %TRUE if the URI was set successfully, else %FALSE. + + + + + A #GstURIHandler + + + + URI to set + + + + + + + + The different types of URI direction. + + The URI direction is unknown + + + The URI is a consumer. + + + The URI is a producer. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Value for #GstUri<!-- -->.port to indicate no port number. + + + + + Tests if the type direction is valid. + + + + A #GstURIType + + + + + Constant that defines one GStreamer microsecond. + + + + + A #GstUri object can be used to parse and split a URI string into its +constituent parts. Two #GstUri objects can be joined to make a new #GstUri +using the algorithm described in RFC3986. + + + Creates a new #GstUri object with the given URI parts. The path and query +strings will be broken down into their elements. All strings should not be +escaped except where indicated. + + + A new #GstUri object. + + + + + The scheme for the new URI. + + + + The user-info for the new URI. + + + + The host name for the new URI. + + + + The port number for the new URI or %GST_URI_NO_PORT. + + + + The path for the new URI with '/' separating path + elements. + + + + The query string for the new URI with '&' separating + query elements. Elements containing '&' characters + should encode them as "&percnt;26". + + + + The fragment name for the new URI. + + + + + + Append a path onto the end of the path in the URI. The path is not +normalized, call #gst_uri_normalize() to normalize the path. + + + %TRUE if the path was appended successfully. + + + + + The #GstUri to modify. + + + + Relative path to append to the end of the current path. + + + + + + Append a single path segment onto the end of the URI path. + + + %TRUE if the path was appended successfully. + + + + + The #GstUri to modify. + + + + The path segment string to append to the URI path. + + + + + + Compares two #GstUri objects to see if they represent the same normalized +URI. + + + %TRUE if the normalized versions of the two URI's would be equal. + + + + + First #GstUri to compare. + + + + Second #GstUri to compare. + + + + + + Like gst_uri_from_string() but also joins with a base URI. + + + A new #GstUri object. + + + + + The base URI to join the new URI with. + + + + The URI string to parse. + + + + + + Get the fragment name from the URI or %NULL if it doesn't exist. +If @uri is %NULL then returns %NULL. + + + The host name from the #GstUri object or %NULL. + + + + + This #GstUri object. + + + + + + Get the host name from the URI or %NULL if it doesn't exist. +If @uri is %NULL then returns %NULL. + + + The host name from the #GstUri object or %NULL. + + + + + This #GstUri object. + + + + + + Get the media fragment table from the URI, as defined by "Media Fragments URI 1.0". +Hash table returned by this API is a list of "key-value" pairs, and the each +pair is generated by splitting "URI fragment" per "&" sub-delims, then "key" +and "value" are split by "=" sub-delims. The "key" returned by this API may +be undefined keyword by standard. +A value may be %NULL to indicate that the key should appear in the fragment +string in the URI, but does not have a value. Free the returned #GHashTable +with #g_hash_table_unref() when it is no longer required. +Modifying this hash table does not affect the fragment in the URI. + +See more about Media Fragments URI 1.0 (W3C) at https://www.w3.org/TR/media-frags/ + + + The + fragment hash table from the URI. + + + + + + + + The #GstUri to get the fragment table from. + + + + + + Extract the path string from the URI object. + + + The path from the URI. Once finished + with the string should be g_free()'d. + + + + + The #GstUri to get the path from. + + + + + + Get a list of path segments from the URI. + + + A #GList of path segment + strings or %NULL if no path segments are available. Free the list + when no longer needed with g_list_free_full(list, g_free). + + + + + + + The #GstUri to get the path from. + + + + + + Extract the path string from the URI object as a percent encoded URI path. + + + The path from the URI. Once finished + with the string should be g_free()'d. + + + + + The #GstUri to get the path from. + + + + + + Get the port number from the URI or %GST_URI_NO_PORT if it doesn't exist. +If @uri is %NULL then returns %GST_URI_NO_PORT. + + + The port number from the #GstUri object or %GST_URI_NO_PORT. + + + + + This #GstUri object. + + + + + + Get a list of the query keys from the URI. + + + A list of keys from + the URI query. Free the list with g_list_free(). + + + + + + + The #GstUri to examine. + + + + + + Get a percent encoded URI query string from the @uri. + + + A percent encoded query string. Use + g_free() when no longer needed. + + + + + The #GstUri to get the query string from. + + + + + + Get the query table from the URI. Keys and values in the table are freed +with g_free when they are deleted. A value may be %NULL to indicate that +the key should appear in the query string in the URI, but does not have a +value. Free the returned #GHashTable with #g_hash_table_unref() when it is +no longer required. Modifying this hash table will modify the query in the +URI. + + + The query + hash table from the URI. + + + + + + + + The #GstUri to get the query table from. + + + + + + Get the value associated with the @query_key key. Will return %NULL if the +key has no value or if the key does not exist in the URI query table. Because +%NULL is returned for both missing keys and keys with no value, you should +use gst_uri_query_has_key() to determine if a key is present in the URI +query. + + + The value for the given key, or %NULL if not found. + + + + + The #GstUri to examine. + + + + The key to lookup. + + + + + + Get the scheme name from the URI or %NULL if it doesn't exist. +If @uri is %NULL then returns %NULL. + + + The scheme from the #GstUri object or %NULL. + + + + + This #GstUri object. + + + + + + Get the userinfo (usually in the form "username:password") from the URI +or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. + + + The userinfo from the #GstUri object or %NULL. + + + + + This #GstUri object. + + + + + + Tests the @uri to see if it is normalized. A %NULL @uri is considered to be +normalized. + + + TRUE if the URI is normalized or is %NULL. + + + + + The #GstUri to test to see if it is normalized. + + + + + + Check if it is safe to write to this #GstUri. + +Check if the refcount of @uri is exactly 1, meaning that no other +reference exists to the #GstUri and that the #GstUri is therefore writable. + +Modification of a #GstUri should only be done after verifying that it is +writable. + + + %TRUE if it is safe to write to the object. + + + + + The #GstUri object to test. + + + + + + Join a reference URI onto a base URI using the method from RFC 3986. +If either URI is %NULL then the other URI will be returned with the ref count +increased. + + + A #GstUri which represents the base + with the reference URI joined on. + + + + + The base URI to join another to. + + + + The reference URI to join onto the + base URI. + + + + + + Make the #GstUri writable. + +Checks if @uri is writable, and if so the original object is returned. If +not, then a writable copy is made and returned. This gives away the +reference to @uri and returns a reference to the new #GstUri. +If @uri is %NULL then %NULL is returned. + + + A writable version of @uri. + + + + + The #GstUri object to make writable. + + + + + + Like gst_uri_new(), but joins the new URI onto a base URI. + + + The new URI joined onto @base. + + + + + The base URI to join the new URI to. + + + + The scheme for the new URI. + + + + The user-info for the new URI. + + + + The host name for the new URI. + + + + The port number for the new URI or %GST_URI_NO_PORT. + + + + The path for the new URI with '/' separating path + elements. + + + + The query string for the new URI with '&' separating + query elements. Elements containing '&' characters + should encode them as "&percnt;26". + + + + The fragment name for the new URI. + + + + + + Normalization will remove extra path segments ("." and "..") from the URI. It +will also convert the scheme and host name to lower case and any +percent-encoded values to uppercase. + +The #GstUri object must be writable. Check with gst_uri_is_writable() or use +gst_uri_make_writable() first. + + + TRUE if the URI was modified. + + + + + The #GstUri to normalize. + + + + + + Check if there is a query table entry for the @query_key key. + + + %TRUE if @query_key exists in the URI query table. + + + + + The #GstUri to examine. + + + + The key to lookup. + + + + + + Remove an entry from the query table by key. + + + %TRUE if the key existed in the table and was removed. + + + + + The #GstUri to modify. + + + + The key to remove. + + + + + + Sets the fragment string in the URI. Use a value of %NULL in @fragment to +unset the fragment string. + + + %TRUE if the fragment was set/unset successfully. + + + + + The #GstUri to modify. + + + + The fragment string to set. + + + + + + Set or unset the host for the URI. + + + %TRUE if the host was set/unset successfully. + + + + + The #GstUri to modify. + + + + The new host string to set or %NULL to unset. + + + + + + Sets or unsets the path in the URI. + + + %TRUE if the path was set successfully. + + + + + The #GstUri to modify. + + + + The new path to set with path segments separated by '/', or use %NULL + to unset the path. + + + + + + Replace the path segments list in the URI. + + + %TRUE if the path segments were set successfully. + + + + + The #GstUri to modify. + + + + The new + path list to set. + + + + + + + + Sets or unsets the path in the URI. + + + %TRUE if the path was set successfully. + + + + + The #GstUri to modify. + + + + The new percent encoded path to set with path segments separated by +'/', or use %NULL to unset the path. + + + + + + Set or unset the port number for the URI. + + + %TRUE if the port number was set/unset successfully. + + + + + The #GstUri to modify. + + + + The new port number to set or %GST_URI_NO_PORT to unset. + + + + + + Sets or unsets the query table in the URI. + + + %TRUE if the query table was set successfully. + + + + + The #GstUri to modify. + + + + The new percent encoded query string to use to populate the query + table, or use %NULL to unset the query table. + + + + + + Set the query table to use in the URI. The old table is unreferenced and a +reference to the new one is used instead. A value if %NULL for @query_table +will remove the query string from the URI. + + + %TRUE if the new table was successfully used for the query table. + + + + + The #GstUri to modify. + + + + The new + query table to use. + + + + + + + + + This inserts or replaces a key in the query table. A @query_value of %NULL +indicates that the key has no associated value, but will still be present in +the query string. + + + %TRUE if the query table was successfully updated. + + + + + The #GstUri to modify. + + + + The key for the query entry. + + + + The value for the key. + + + + + + Set or unset the scheme for the URI. + + + %TRUE if the scheme was set/unset successfully. + + + + + The #GstUri to modify. + + + + The new scheme to set or %NULL to unset the scheme. + + + + + + Set or unset the user information for the URI. + + + %TRUE if the user information was set/unset successfully. + + + + + The #GstUri to modify. + + + + The new user-information string to set or %NULL to unset. + + + + + + Convert the URI to a string. + +Returns the URI as held in this object as a #gchar* nul-terminated string. +The caller should g_free() the string once they are finished with it. +The string is put together as described in RFC 3986. + + + The string version of the URI. + + + + + This #GstUri to convert to a string. + + + + + + Constructs a URI for a given valid protocol and location. + +Free-function: g_free + Use GstURI instead. + + + a new string for this URI. Returns %NULL if the + given URI protocol is not valid, or the given location is %NULL. + + + + + Protocol for URI + + + + Location for URI + + + + + + Parses a URI string into a new #GstUri object. Will return NULL if the URI +cannot be parsed. + + + A new #GstUri object, or NULL. + + + + + The URI string to parse. + + + + + + Parses a URI string into a new #GstUri object. Will return NULL if the URI +cannot be parsed. This is identical to gst_uri_from_string() except that +the userinfo and fragment components of the URI will not be unescaped while +parsing. + +Use this when you need to extract a username and password from the userinfo +such as https://user:password@example.com since either may contain +a URI-escaped ':' character. gst_uri_from_string() will unescape the entire +userinfo component, which will make it impossible to know which ':' +delineates the username and password. + +The same applies to the fragment component of the URI, such as +https://example.com/path#fragment which may contain a URI-escaped '#'. + + + A new #GstUri object, or NULL. + + + + + The URI string to parse. + + + + + + Extracts the location out of a given valid URI, ie. the protocol and "://" +are stripped from the URI, which means that the location returned includes +the hostname if one is specified. The returned string must be freed using +g_free(). + +Free-function: g_free + + + the location for this URI. Returns + %NULL if the URI isn't valid. If the URI does not contain a location, an + empty string is returned. + + + + + A URI string + + + + + + Extracts the protocol out of a given valid URI. The returned string must be +freed using g_free(). + + + The protocol for this URI. + + + + + A URI string + + + + + + Checks if the protocol of a given valid URI matches @protocol. + + + %TRUE if the protocol matches. + + + + + a URI string + + + + a protocol string (e.g. "http") + + + + + + Tests if the given string is a valid URI identifier. URIs start with a valid +scheme followed by ":" and maybe a string identifying the location. + + + %TRUE if the string is a valid URI + + + + + A URI string + + + + + + This is a convenience function to join two URI strings and return the result. +The returned string should be g_free()'d after use. + + + A string representing the percent-encoded join of + the two URIs. + + + + + The percent-encoded base URI. + + + + The percent-encoded reference URI to join to the @base_uri. + + + + + + Checks if an element exists that supports the given URI protocol. Note +that a positive return value does not imply that a subsequent call to +gst_element_make_from_uri() is guaranteed to work. + + + %TRUE + + + + + Whether to check for a source or a sink + + + + Protocol that should be checked for (e.g. "http" or "smb") + + + + + + Tests if the given string is a valid protocol identifier. Protocols +must consist of alphanumeric characters, '+', '-' and '.' and must +start with a alphabetic character. See RFC 3986 Section 3.1. + + + %TRUE if the string is a valid protocol identifier, %FALSE otherwise. + + + + + A string + + + + + + + Indicates that the first value provided to a comparison function +(gst_value_compare()) is equal to the second one. + + + + + Indicates that the first value provided to a comparison function +(gst_value_compare()) is greater than the second one. + + + + + Checks if the given #GValue contains a #GST_TYPE_ARRAY value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_BITMASK value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_BUFFER value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_CAPS value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_CAPS_FEATURES value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_DATE_TIME value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_DOUBLE_RANGE value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_FLAG_SET value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_FRACTION value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_FRACTION_RANGE value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_INT64_RANGE value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_INT_RANGE value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_LIST value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_SAMPLE value. + + + + the #GValue to check + + + + + Checks if the given #GValue contains a #GST_TYPE_STRUCTURE value. + + + + the #GValue to check + + + + + Indicates that the first value provided to a comparison function +(gst_value_compare()) is lesser than the second one. + + + + + Indicates that the comparison function (gst_value_compare()) can not +determine a order for the two provided values. + + + + + The major version of GStreamer at compile time: + + + + + The micro version of GStreamer at compile time: + + + + + The minor version of GStreamer at compile time: + + + + + The nano version of GStreamer at compile time: +Actual releases have 0, GIT versions have 1, prerelease versions have 2-... + + + + + A fundamental type that describes an ordered list of #GValue + + Appends @append_value to the GstValueArray in @value. + + + + + + + a #GValue of type #GST_TYPE_ARRAY + + + + the value to append + + + + + + Appends @append_value to the GstValueArray in @value. + + + + + + + a #GValue of type #GST_TYPE_ARRAY + + + + the value to append + + + + + + Gets the number of values contained in @value. + + + the number of values + + + + + a #GValue of type #GST_TYPE_ARRAY + + + + + + Gets the value that is a member of the array contained in @value and +has the index @index. + + + the value at the given index + + + + + a #GValue of type #GST_TYPE_ARRAY + + + + index of value to get from the array + + + + + + Initializes and pre-allocates a #GValue of type #GST_VALUE_ARRAY. + + + The #GValue structure that has been passed in + + + + + A zero-filled (uninitialized) #GValue structure + + + + The number of entries to pre-allocate in the array + + + + + + Prepends @prepend_value to the GstValueArray in @value. + + + + + + + a #GValue of type #GST_TYPE_ARRAY + + + + the value to prepend + + + + + + + Used together with gst_value_compare() to compare #GValue items. + + + one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN +or GST_VALUE_UNORDERED + + + + + first value for comparison + + + + second value for comparison + + + + + + Used by gst_value_deserialize() to parse a non-binary form into the #GValue. + + + %TRUE for success + + + + + a #GValue + + + + a string + + + + + + Used by gst_value_deserialize_with_pspec() to parse a non-binary form into the #GValue. + + + %TRUE for success + + + + + a #GValue + + + + a string + + + + a #GParamSpec describing the expected value + + + + + + A fundamental type that describes an unordered list of #GValue + + Appends @append_value to the GstValueList in @value. + + + + + + + a #GValue of type #GST_TYPE_LIST + + + + the value to append + + + + + + Appends @append_value to the GstValueList in @value. + + + + + + + a #GValue of type #GST_TYPE_LIST + + + + the value to append + + + + + + Concatenates copies of @value1 and @value2 into a list. Values that are not +of type #GST_TYPE_LIST are treated as if they were lists of length 1. +@dest will be initialized to the type #GST_TYPE_LIST. + + + + + + + an uninitialized #GValue to take the result + + + + a #GValue + + + + a #GValue + + + + + + Gets the number of values contained in @value. + + + the number of values + + + + + a #GValue of type #GST_TYPE_LIST + + + + + + Gets the value that is a member of the list contained in @value and +has the index @index. + + + the value at the given index + + + + + a #GValue of type #GST_TYPE_LIST + + + + index of value to get from the list + + + + + + Initializes and pre-allocates a #GValue of type #GST_VALUE_LIST. + + + The #GValue structure that has been passed in + + + + + A zero-filled (uninitialized) #GValue structure + + + + The number of entries to pre-allocate in the list + + + + + + Merges copies of @value1 and @value2. Values that are not +of type #GST_TYPE_LIST are treated as if they were lists of length 1. + +The result will be put into @dest and will either be a list that will not +contain any duplicates, or a non-list type (if @value1 and @value2 +were equal). + + + + + + + an uninitialized #GValue to take the result + + + + a #GValue + + + + a #GValue + + + + + + Prepends @prepend_value to the GstValueList in @value. + + + + + + + a #GValue of type #GST_TYPE_LIST + + + + the value to prepend + + + + + + + Used by gst_value_serialize() to obtain a non-binary form of the #GValue. + +Free-function: g_free + + + the string representation of the value + + + + + a #GValue + + + + + + VTable for the #GValue @type. + + + a #GType + + + + a #GstValueCompareFunc + + + + a #GstValueSerializeFunc + + + + a #GstValueDeserializeFunc + + + + a #GstValueDeserializeWithPSpecFunc + + + + + + + + + + Store a 16 bit unsigned integer value in big endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 16 bit unsigned integer value in little endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 24 bit unsigned integer value in big endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 24 bit unsigned integer value in little endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 32 bit unsigned integer value in big endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 32 bit unsigned integer value in little endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 64 bit unsigned integer value in big endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store a 64 bit unsigned integer value in little endian format into the memory buffer. + + + + memory location + + + value to store + + + + + Store an 8 bit unsigned integer value into the memory buffer. + + + + memory location + + + value to store + + + + + Get the maximum amount of memory blocks that a buffer can hold. This is a +compile time constant that can be queried with the function. + +When more memory blocks are added, existing memory blocks will be merged +together to make room for the new block. + + + the maximum amount of memory blocks that a buffer can hold. + + + + + Find and return a #GstParentBufferMeta if one exists on the +buffer + + + + a #GstBuffer + + + + + + + + + + + + Tests if you can safely write to a buffer's metadata or its memory array. +It is only safe to change buffer metadata when the current reference is +writable, i.e. nobody can see the modifications you will make. + + + + a #GstBuffer + + + + + Append @b at the end of @l. + + + + a #GstBufferList + + + a #GstBuffer + + + + + Tests if you can safely add buffers and groups into a buffer list. + + + + a #GstBufferList + + + + + Makes a writable buffer list from the given buffer list. If the source buffer +list is already writable, this will simply return the same buffer list. A +copy will otherwise be made using gst_buffer_list_copy(). + + + + a #GstBufferList + + + + + Returns a writable copy of @buf. If the source buffer is +already writable, this will simply return the same buffer. + +Use this function to ensure that a buffer can be safely modified before +making changes to it, including changing the metadata such as PTS/DTS. + +If the reference count of the source buffer @buf is exactly one, the caller +is the sole owner and this function will return the buffer object unchanged. + +If there is more than one reference on the object, a copy will be made using +gst_buffer_copy(). The passed-in @buf will be unreffed in that case, and the +caller will now own a reference to the new returned buffer object. Note +that this just copies the buffer structure itself, the underlying memory is +not copied if it can be shared amongst multiple buffers. + +In short, this function unrefs the buf in the argument and refs the buffer +that it returns. Don't access the argument after calling this function unless +you have an additional reference to it. + + + + a #GstBuffer + + + + + + + + + + + + Modifies a pointer to a #GstBuffer to point to a different #GstBuffer. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +buffer is unreffed, the new is reffed). + +Either @nbuf or the #GstBuffer pointed to by @obuf may be %NULL. + + + %TRUE when @obuf was different from @nbuf. + + + + + pointer to a pointer to + a #GstBuffer to be replaced. + + + + pointer to a #GstBuffer that will + replace the buffer pointed to by @obuf. + + + + + + Calculates the linear regression of the values @xy and places the +result in @m_num, @m_denom, @b and @xbase, representing the function + y(x) = m_num/m_denom * (x - xbase) + b +that has the least-square distance from all points @x and @y. + +@r_squared will contain the remaining error. + +If @temp is not %NULL, it will be used as temporary space for the function, +in which case the function works without any allocation at all. If @temp is +%NULL, an allocation will take place. @temp should have at least the same +amount of memory allocated as @xy, i.e. 2*n*sizeof(GstClockTime). + +> This function assumes (x,y) values with reasonable large differences +> between them. It will not calculate the exact results if the differences +> between neighbouring values are too small due to not being able to +> represent sub-integer values during the calculations. + + + %TRUE if the linear regression was successfully calculated + + + + + Pairs of (x,y) values + + + + Temporary scratch space used by the function + + + + number of (x,y) pairs + + + + numerator of calculated slope + + + + denominator of calculated slope + + + + Offset at Y-axis + + + + Offset at X-axis + + + + R-squared + + + + + + Creates a #GstCapsFeatures from a string representation. + +Free-function: gst_caps_features_free + + + a new #GstCapsFeatures or + %NULL when the string could not be parsed. Free with + gst_caps_features_free() after use. + + + + + a string representation of a #GstCapsFeatures. + + + + + + Converts @caps from a string representation. + +The current implementation of serialization will lead to unexpected results +when there are nested #GstCaps / #GstStructure deeper than one level. + + + a newly allocated #GstCaps + + + + + a string to convert to #GstCaps + + + + + + Tests if you can safely modify @caps. It is only safe to modify caps when +there is only one owner of the caps - ie, the object is writable. + + + + a #GstCaps + + + + + Returns a writable copy of @caps. + +If there is only one reference count on @caps, the caller must be the owner, +and so this function will return the caps object unchanged. If on the other +hand there is more than one reference on the object, a new caps object will +be returned. The caller's reference on @caps will be removed, and instead the +caller will own a reference to the returned object. + +In short, this function unrefs the caps in the argument and refs the caps +that it returns. Don't access the argument after calling this function. See +also: gst_caps_ref(). + + + + a #GstCaps + + + + + Modifies a pointer to a #GstCaps to point to a different #GstCaps. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +caps is unreffed, the new is reffed). + +Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL. + + + %TRUE if @new_caps was different from @old_caps + + + + + pointer to a pointer + to a #GstCaps to be replaced. + + + + pointer to a #GstCaps that will + replace the caps pointed to by @old_caps. + + + + + + Modifies a pointer to a #GstCaps to point to a different #GstCaps. This +function is similar to gst_caps_replace() except that it takes ownership +of @new_caps. + + + %TRUE if @new_caps was different from @old_caps + + + + + pointer to a pointer to a #GstCaps to be + replaced. + + + + pointer to a #GstCaps that will + replace the caps pointed to by @old_caps. + + + + + + Clears a reference to a #GstMiniObject. + +@object_ptr must not be %NULL. + +If the reference is %NULL then this function does nothing. +Otherwise, the reference count of the object is decreased using +gst_mini_object_unref() and the pointer is set to %NULL. + +A macro is also included that allows this function to be used without +pointer casts. + + + + + + + a pointer to a #GstMiniObject reference + + + + + + Clears a reference to a #GstObject. + +@object_ptr must not be %NULL. + +If the reference is %NULL then this function does nothing. +Otherwise, the reference count of the object is decreased using +gst_object_unref() and the pointer is set to %NULL. + +A macro is also included that allows this function to be used without +pointer casts. + + + + + + + a pointer to a #GstObject reference + + + + + + Clears a reference to a #GstStructure. + +@structure_ptr must not be %NULL. + +If the reference is %NULL then this function does nothing. +Otherwise, the structure is free'd using gst_structure_free() and the +pointer is set to %NULL. + +A macro is also included that allows this function to be used without +pointer casts. + + + + + + + a pointer to a #GstStructure reference + + + + + + Tests if you can safely write into a context's structure or validly +modify the seqnum and timestamp fields. + + + + a #GstContext + + + + + Checks if a context is writable. If not, a writable copy is made and +returned. + + + + the context to make writable + + + + + + + + + + + Adds the logging function to the list of logging functions. +Be sure to use #G_GNUC_NO_INSTRUMENT on that function, it is needed. + + + + + + + the function to use + + + + user data + + + + called when @user_data is not used anymore + + + + + + Adds a memory ringbuffer based debug logger that stores up to +@max_size_per_thread bytes of logs per thread and times out threads after +@thread_timeout seconds of inactivity. + +Logs can be fetched with gst_debug_ring_buffer_logger_get_logs() and the +logger can be removed again with gst_debug_remove_ring_buffer_logger(). +Only one logger at a time is possible. + + + + + + + Maximum size of log per thread in bytes + + + + Timeout for threads in seconds + + + + + + To aid debugging applications one can use this method to obtain the whole +network of gstreamer elements that form the pipeline into an dot file. +This data can be processed with graphviz to get an image. + + + a string containing the pipeline in graphviz +dot format. + + + + + the top-level pipeline that should be analyzed + + + + type of #GstDebugGraphDetails to use + + + + + + To aid debugging applications one can use this method to write out the whole +network of gstreamer elements that form the pipeline into an dot file. +This file can be processed with graphviz to get an image. + +``` shell + dot -Tpng -oimage.png graph_lowlevel.dot +``` + + + + + + + the top-level pipeline that should be analyzed + + + + type of #GstDebugGraphDetails to use + + + + output base filename (e.g. "myplayer") + + + + + + This works like gst_debug_bin_to_dot_file(), but adds the current timestamp +to the filename, so that it can be used to take multiple snapshots. + + + + + + + the top-level pipeline that should be analyzed + + + + type of #GstDebugGraphDetails to use + + + + output base filename (e.g. "myplayer") + + + + + + Constructs a string that can be used for getting the desired color in color +terminals. +You need to free the string after use. + + + a string containing the color + definition + + + + + the color info + + + + + + Constructs an integer that can be used for getting the desired color in +windows' terminals (cmd.exe). As there is no mean to underline, we simply +ignore this attribute. + +This function returns 0 on non-windows machines. + + + an integer containing the color definition + + + + + the color info + + + + + + Returns a snapshot of a all categories that are currently in use . This list +may change anytime. +The caller has to free the list after use. + + + the list of + debug categories + + + + + + + Changes the coloring mode for debug output. + + + see @GstDebugColorMode for possible values. + + + + + Returns the default threshold that is used for new categories. + + + the default threshold level + + + + + + + a stack trace, if libunwind or glibc backtrace are +present, else %NULL. + + + + + A set of #GstStackTraceFlags to determine how the stack trace should +look like. Pass #GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace. + + + + + + Checks if debugging output is activated. + + + %TRUE, if debugging is activated + + + + + Checks if the debugging output should be colored. + + + %TRUE, if the debug output should be colored. + + + + + Get the string representation of a debugging level + + + the name + + + + + the level to get the name for + + + + + + Logs the given message using the currently registered debugging handlers. + + + + + + + category to log + + + + level of the message is in + + + + the file that emitted the message, usually the __FILE__ identifier + + + + the function that emitted the message + + + + the line from that the message was emitted, usually __LINE__ + + + + the object this message relates to, + or %NULL if none + + + + a printf style format string + + + + optional arguments for the format + + + + + + The default logging handler used by GStreamer. Logging functions get called +whenever a macro like GST_DEBUG or similar is used. By default this function +is setup to output the message and additional info to stderr (or the log file +specified via the GST_DEBUG_FILE environment variable) as received via +@user_data. + +You can add other handlers by using gst_debug_add_log_function(). +And you can remove this handler by calling +gst_debug_remove_log_function(gst_debug_log_default); + + + + + + + category to log + + + + level of the message + + + + the file that emitted the message, usually the __FILE__ identifier + + + + the function that emitted the message + + + + the line from that the message was emitted, usually __LINE__ + + + + the object this message relates to, + or %NULL if none + + + + the actual message + + + + the FILE* to log to + + + + + + Returns the string representation for the specified debug log message +formatted in the same way as gst_debug_log_default() (the default handler), +without color. The purpose is to make it easy for custom log output +handlers to get a log output that is identical to what the default handler +would write out. + + + + + + + category to log + + + + level of the message + + + + the file that emitted the message, usually the __FILE__ identifier + + + + the function that emitted the message + + + + the line from that the message was emitted, usually __LINE__ + + + + the object this message relates to, + or %NULL if none + + + + the actual message + + + + + + Logs the given message using the currently registered debugging handlers. + + + + + + + category to log + + + + level of the message is in + + + + the file that emitted the message, usually the __FILE__ identifier + + + + the function that emitted the message + + + + the line from that the message was emitted, usually __LINE__ + + + + the object this message relates to, + or %NULL if none + + + + a printf style format string + + + + optional arguments for the format + + + + + + If libunwind, glibc backtrace or DbgHelp are present +a stack trace is printed. + + + + + + + Removes all registered instances of the given logging functions. + + + How many instances of the function were removed + + + + + the log function to remove, or %NULL to + remove the default log function + + + + + + Removes all registered instances of log functions with the given user data. + + + How many instances of the function were removed + + + + + user data of the log function to remove + + + + + + Removes any previously added ring buffer logger with +gst_debug_add_ring_buffer_logger(). + + + + + + + Fetches the current logs per thread from the ring buffer logger. See +gst_debug_add_ring_buffer_logger() for details. + + + NULL-terminated array of +strings with the debug output per thread + + + + + + + If activated, debugging messages are sent to the debugging +handlers. +It makes sense to deactivate it for speed issues. +> This function is not threadsafe. It makes sense to only call it +during initialization. + + + + + + + Whether to use debugging output or not + + + + + + Changes the coloring mode for debug output. + +This function may be called before gst_init(). + + + + + + + The coloring mode for debug output. See @GstDebugColorMode. + + + + + + Changes the coloring mode for debug output. + +This function may be called before gst_init(). + + + + + + + The coloring mode for debug output. One of the following: +"on", "auto", "off", "disable", "unix". + + + + + + Sets or unsets the use of coloured debugging output. +Same as gst_debug_set_color_mode () with the argument being +being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF. + +This function may be called before gst_init(). + + + + + + + Whether to use colored output or not + + + + + + Sets the default threshold to the given level and updates all categories to +use this threshold. + +This function may be called before gst_init(). + + + + + + + level to set + + + + + + Sets all categories which match the given glob style pattern to the given +level. + + + + + + + name of the categories to set + + + + level to set them to + + + + + + Sets the debug logging wanted in the same form as with the GST_DEBUG +environment variable. You can use wildcards such as '*', but note that +the order matters when you use wild cards, e.g. "foosrc:6,*src:3,*:2" sets +everything to log level 2. + + + + + + + comma-separated list of "category:level" pairs to be used + as debug logging levels + + + + %TRUE to clear all previously-set debug levels before setting + new thresholds +%FALSE if adding the threshold described by @list to the one already set. + + + + + + Resets all categories with the given name back to the default level. + + + + + + + name of the categories to set + + + + + + Clean up any resources created by GStreamer in gst_init(). + +It is normally not needed to call this function in a normal application +as the resources will automatically be freed when the program terminates. +This function is therefore mostly used by testsuites and other memory +profiling tools. + +After this call GStreamer (including this method) should not be used anymore. + + + + + + + Registers a new #GstDynamicTypeFactory in the registry + + + + + + + The #GstPlugin to register @dyn_type for + + + + The #GType to register dynamically + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a copy of the name of @elem. +Caller should g_free() the return value after usage. +For a nameless element, this returns %NULL, which you can safely g_free() +as well. + + + + a #GstElement to get the name of @elem. + + + + + Get the parent of an element. + + + + a #GstElement to get the parent of. + + + + + Sets the name of the element, getting rid of the old name if there was one. + + + + a #GstElement to set the name of. + + + the new name + + + + + Sets the parent of an element. + + + + a #GstElement to set the parent of. + + + the new parent #GstObject of the element. + + + + + Get a string describing the error message in the current locale. + + + a newly allocated string describing + the error message (in UTF-8 encoding) + + + + + the GStreamer error domain this error belongs to. + + + + the error code belonging to the domain. + + + + + + Tests if you can safely write data into a event's structure or validly +modify the seqnum and timestamp field. + + + + a #GstEvent + + + + + Makes a writable event from the given event. If the source event is +already writable, this will simply return the same event. A copy will +otherwise be made using gst_event_copy(). + + + + a #GstEvent + + + + + Modifies a pointer to a #GstEvent to point to a different #GstEvent. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +event is unreffed, the new one is reffed). + +Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + + + %TRUE if @new_event was different from @old_event + + + + + pointer to a + pointer to a #GstEvent to be replaced. + + + + pointer to a #GstEvent that will + replace the event pointed to by @old_event. + + + + + + Atomically replace the #GstEvent pointed to by @old_event with %NULL and +return the original event. + + + the #GstEvent that was in @old_event + + + + + pointer to a + pointer to a #GstEvent to be stolen. + + + + + + Modifies a pointer to a #GstEvent to point to a different #GstEvent. This +function is similar to gst_event_replace() except that it takes ownership of +@new_event. + +Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + + + %TRUE if @new_event was different from @old_event + + + + + pointer to a + pointer to a #GstEvent to be stolen. + + + + pointer to a #GstEvent that will + replace the event pointed to by @old_event. + + + + + + Gets the #GstEventTypeFlags associated with @type. + + + a #GstEventTypeFlags. + + + + + a #GstEventType + + + + + + Get a printable name for the given event type. Do not modify or free. + + + a reference to the static name of the event. + + + + + the event type + + + + + + Get the unique quark for the given event type. + + + the quark associated with the event type + + + + + the event type + + + + + + Similar to g_filename_to_uri(), but attempts to handle relative file paths +as well. Before converting @filename into an URI, it will be prefixed by +the current working directory if it is a relative path, and then the path +will be canonicalised so that it doesn't contain any './' or '../' segments. + +On Windows @filename should be in UTF-8 encoding. + + + newly-allocated URI string, or NULL on error. The caller must + free the URI string with g_free() when no longer needed. + + + + + absolute or relative file name path + + + + + + Gets a string representing the given flow return. + + + a static string with the name of the flow return. + + + + + a #GstFlowReturn to get the name of. + + + + + + Get the unique quark for the given GstFlowReturn. + + + the quark associated with the flow return or 0 if an +invalid return was specified. + + + + + a #GstFlowReturn to get the quark of. + + + + + + Return the format registered with the given nick. + + + The format with @nick or GST_FORMAT_UNDEFINED +if the format was not registered. + + + + + The nick of the format + + + + + + Get details about the given format. + + + The #GstFormatDefinition for @format or %NULL +on failure. + +MT safe. + + + + + The format to get details of + + + + + + Get a printable name for the given format. Do not modify or free. + + + a reference to the static name of the format +or %NULL if the format is unknown. + + + + + a #GstFormat + + + + + + Iterate all the registered formats. The format definition is read +only. + + + a GstIterator of #GstFormatDefinition. + + + + + Create a new GstFormat based on the nick or return an +already registered format with that nick. + + + A new GstFormat or an already registered format +with the same nick. + +MT safe. + + + + + The nick of the new format + + + + The description of the new format + + + + + + Get the unique quark for the given format. + + + the quark associated with the format or 0 if the format +is unknown. + + + + + a #GstFormat + + + + + + See if the given format is inside the format array. + + + %TRUE if the format is found inside the array + + + + + The format array to search + + + + + + the format to find + + + + + + Convert @value to a guint64. + + + + the #gdouble value to convert + + + + + This helper is mostly helpful for plugins that need to +inspect the folder of the main executable to determine +their set of features. + +When a plugin is initialized from the gst-plugin-scanner +external process, the returned path will be the same as from the +parent process. + + + The path of the executable that + initialized GStreamer, or %NULL if it could not be determined. + + + + + GStreamer is a framework for constructing graphs of various filters +(termed elements here) that will handle streaming media. Any discrete +(packetizable) media type is supported, with provisions for automatically +determining source type. Formatting/framing information is provided with +a powerful negotiation framework. Plugins are heavily used to provide for +all elements, allowing one to construct plugins outside of the GST +library, even released binary-only if license require (please don't). +GStreamer covers a wide range of use cases including: playback, recording, +editing, serving streams, voice over ip and video calls. + +The `GStreamer` library should be initialized with +gst_init() before it can be used. You should pass pointers to the main argc +and argv variables so that GStreamer can process its own command line +options, as shown in the following example. + +## Initializing the gstreamer library + +|[ <!-- language="C" --> +int +main (int argc, char *argv[]) +{ + // initialize the GStreamer library + gst_init (&amp;argc, &amp;argv); + ... +} +]| + +It's allowed to pass two %NULL pointers to gst_init() in case you don't want +to pass the command line args to GStreamer. + +You can also use GOption to initialize your own parameters as shown in +the next code fragment: + +## Initializing own parameters when initializing gstreamer +|[ <!-- language="C" --> +static gboolean stats = FALSE; +... +int +main (int argc, char *argv[]) +{ + GOptionEntry options[] = { + {"tags", 't', 0, G_OPTION_ARG_NONE, &amp;tags, + N_("Output tags (also known as metadata)"), NULL}, + {NULL} + }; + ctx = g_option_context_new ("[ADDITIONAL ARGUMENTS]"); + g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + if (!g_option_context_parse (ctx, &amp;argc, &amp;argv, &amp;err)) { + g_print ("Error initializing: &percnt;s\n", GST_STR_NULL (err->message)); + exit (1); + } + g_option_context_free (ctx); +... +} +]| + +Use gst_version() to query the library version at runtime or use the +GST_VERSION_* macros to find the version at compile time. Optionally +gst_version_string() returns a printable string. + +The gst_deinit() call is used to clean up all internal resources used +by GStreamer. It is mostly used in unit tests to check for leaks. + + + Please do not use these in new code. +These symbols are only available by defining GST_DISABLE_DEPRECATED. +This can be done in CFLAGS for compiling old code. + + + GStreamer elements can throw non-fatal warnings and fatal errors. +Higher-level elements and applications can programmatically filter +the ones they are interested in or can recover from, +and have a default handler handle the rest of them. + +The rest of this section will use the term "error" +to mean both (non-fatal) warnings and (fatal) errors; they are treated +similarly. + +Errors from elements are the combination of a #GError and a debug string. +The #GError contains: +- a domain type: CORE, LIBRARY, RESOURCE or STREAM +- a code: an enum value specific to the domain +- a translated, human-readable message +- a non-translated additional debug string, which also contains +- file and line information + +Elements do not have the context required to decide what to do with +errors. As such, they should only inform about errors, and stop their +processing. In short, an element doesn't know what it is being used for. + +It is the application or compound element using the given element that +has more context about the use of the element. Errors can be received by +listening to the #GstBus of the element/pipeline for #GstMessage objects with +the type %GST_MESSAGE_ERROR or %GST_MESSAGE_WARNING. The thrown errors should +be inspected, and filtered if appropriate. + +An application is expected to, by default, present the user with a +dialog box (or an equivalent) showing the error message. The dialog +should also allow a way to get at the additional debug information, +so the user can provide bug reporting information. + +A compound element is expected to forward errors by default higher up +the hierarchy; this is done by default in the same way as for other types +of #GstMessage. + +When applications or compound elements trigger errors that they can +recover from, they can filter out these errors and take appropriate action. +For example, an application that gets an error from xvimagesink +that indicates all XVideo ports are taken, the application can attempt +to use another sink instead. + +Elements throw errors using the #GST_ELEMENT_ERROR convenience macro: + +## Throwing an error + + |[ + GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, + (_("No file name specified for reading.")), (NULL)); + ]| + +Things to keep in mind: + + * Don't go off inventing new error codes. The ones + currently provided should be enough. If you find your type of error + does not fit the current codes, you should use FAILED. + * Don't provide a message if the default one suffices. + this keeps messages more uniform. Use (%NULL) - not forgetting the + parentheses. + * If you do supply a custom message, it should be + marked for translation. The message should start with a capital + and end with a period. The message should describe the error in short, + in a human-readable form, and without any complex technical terms. + A user interface will present this message as the first thing a user + sees. Details, technical info, ... should go in the debug string. + + * The debug string can be as you like. Again, use (%NULL) + if there's nothing to add - file and line number will still be + passed. #GST_ERROR_SYSTEM can be used as a shortcut to give + debug information on a system call error. + + + GstFormats functions are used to register a new format to the gstreamer +core. Formats can be used to perform seeking or conversions/query +operations. + + + GStreamer's debugging subsystem is an easy way to get information about what +the application is doing. It is not meant for programming errors. Use GLib +methods (g_warning and friends) for that. + +The debugging subsystem works only after GStreamer has been initialized +- for example by calling gst_init(). + +The debugging subsystem is used to log informational messages while the +application runs. Each messages has some properties attached to it. Among +these properties are the debugging category, the severity (called "level" +here) and an optional #GObject it belongs to. Each of these messages is sent +to all registered debugging handlers, which then handle the messages. +GStreamer attaches a default handler on startup, which outputs requested +messages to stderr. + +Messages are output by using shortcut macros like #GST_DEBUG, +#GST_CAT_ERROR_OBJECT or similar. These all expand to calling gst_debug_log() +with the right parameters. +The only thing a developer will probably want to do is define his own +categories. This is easily done with 3 lines. At the top of your code, +declare +the variables and set the default category. +|[<!-- language="C" --> + GST_DEBUG_CATEGORY_STATIC (my_category); // define category (statically) + #define GST_CAT_DEFAULT my_category // set as default +]| +After that you only need to initialize the category. +|[<!-- language="C" --> + GST_DEBUG_CATEGORY_INIT (my_category, "my category", + 0, "This is my very own"); +]| +Initialization must be done before the category is used first. +Plugins do this +in their plugin_init function, libraries and applications should do that +during their initialization. + +The whole debugging subsystem can be disabled at build time with passing the +--disable-gst-debug switch to configure. If this is done, every function, +macro and even structs described in this file evaluate to default values or +nothing at all. +So don't take addresses of these functions or use other tricks. +If you must do that for some reason, there is still an option. +If the debugging +subsystem was compiled out, GST_DISABLE_GST_DEBUG is defined in +&lt;gst/gst.h&gt;, +so you can check that before doing your trick. +Disabling the debugging subsystem will give you a slight (read: unnoticeable) +speed increase and will reduce the size of your compiled code. The GStreamer +library itself becomes around 10% smaller. + +Please note that there are naming conventions for the names of debugging +categories. These are explained at GST_DEBUG_CATEGORY_INIT(). + + + GParamSpec implementations specific to GStreamer. + + + These function allow to create a pipeline based on the syntax used in the +gst-launch-1.0 utility (see man-page for syntax documentation). + +Please note that these functions take several measures to create +somewhat dynamic pipelines. Due to that such pipelines are not always +reusable (set the state to NULL and back to PLAYING). + + + The GstProtectionMeta class enables the information needed to decrypt a +#GstBuffer to be attached to that buffer. + +Typically, a demuxer element would attach GstProtectionMeta objects +to the buffers that it pushes downstream. The demuxer would parse the +protection information for a video/audio frame from its input data and use +this information to populate the #GstStructure @info field, +which is then encapsulated in a GstProtectionMeta object and attached to +the corresponding output buffer using the gst_buffer_add_protection_meta() +function. The information in this attached GstProtectionMeta would be +used by a downstream decrypter element to recover the original unencrypted +frame. + + + A #GstStream is a high-level object defining a stream of data which is, or +can be, present in a #GstPipeline. + +It is defined by a unique identifier, a "Stream ID". A #GstStream does not +automatically imply the stream is present within a pipeline or element. + +Any element that can introduce new streams in a pipeline should create the +appropriate #GstStream object, and can convey that object via the +%GST_EVENT_STREAM_START event and/or the #GstStreamCollection. + +Elements that do not modify the nature of the stream can add extra information +on it (such as enrich the #GstCaps, or #GstTagList). This is typically done +by parsing elements. + + + GValue implementations specific to GStreamer. + +Note that operations on the same #GValue from multiple threads may lead to +undefined behaviour. + + + Use the GST_VERSION_* macros e.g. when defining own plugins. The GStreamer +runtime checks if these plugin and core version match and refuses to use a +plugin compiled against a different version of GStreamer. +You can also use the macros to keep the GStreamer version information in +your application. + +Use the gst_version() function if you want to know which version of +GStreamer you are currently linked against. + +The version macros get defined by including "gst/gst.h". + + + Convert @value to a gdouble. + + + + the #guint64 value to convert + + + + + Allocates, fills and returns a 0-terminated string from the printf style +@format string and corresponding arguments. + +See gst_info_vasprintf() for when this function is required. + +Free with g_free(). + + + a newly allocated null terminated string or %NULL on any error + + + + + a printf style format string + + + + the printf arguments for @format + + + + + + Allocates, fills and returns a null terminated string from the printf style +@format string and @args. + +See gst_info_vasprintf() for when this function is required. + +Free with g_free(). + + + a newly allocated null terminated string or %NULL on any error + + + + + a printf style format string + + + + the va_list of printf arguments for @format + + + + + + Allocates and fills a string large enough (including the terminating null +byte) to hold the specified printf style @format and @args. + +This function deals with the GStreamer specific printf specifiers +#GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. If you do not have these specifiers +in your @format string, you do not need to use this function and can use +alternatives such as g_vasprintf(). + +Free @result with g_free(). + + + the length of the string allocated into @result or -1 on any error + + + + + the resulting string + + + + a printf style format string + + + + the va_list of printf arguments for @format + + + + + + Initializes the GStreamer library, setting up internal path lists, +registering built-in elements, and loading standard plugins. + +Unless the plugin registry is disabled at compile time, the registry will be +loaded. By default this will also check if the registry cache needs to be +updated and rescan all plugins if needed. See gst_update_registry() for +details and section +<link linkend="gst-running">Running GStreamer Applications</link> +for how to disable automatic registry updates. + +> This function will terminate your program if it was unable to initialize +> GStreamer for some reason. If you want your program to fall back, +> use gst_init_check() instead. + +WARNING: This function does not work in the same way as corresponding +functions in other glib-style libraries, such as gtk_init\(\). In +particular, unknown command line options cause this function to +abort program execution. + + + + + + + pointer to application's argc + + + + pointer to application's argv + + + + + + + + Initializes the GStreamer library, setting up internal path lists, +registering built-in elements, and loading standard plugins. + +This function will return %FALSE if GStreamer could not be initialized +for some reason. If you want your program to fail fatally, +use gst_init() instead. + + + %TRUE if GStreamer could be initialized. + + + + + pointer to application's argc + + + + pointer to application's argv + + + + + + + + Returns a #GOptionGroup with GStreamer's argument specifications. The +group is set up to use standard GOption callbacks, so when using this +group in combination with GOption parsing methods, all argument parsing +and initialization is automated. + +This function is useful if you want to integrate GStreamer with other +libraries that use GOption (see g_option_context_add_group() ). + +If you use this function, you should make sure you initialise the GLib +threading system as one of the very first things in your program +(see the example at the beginning of this section). + + + a pointer to GStreamer's option group. + + + + + Checks if @obj is a #GstCapsFeatures + + + %TRUE if @obj is a #GstCapsFeatures %FALSE otherwise + + + + + + + + + + Use this function to check if GStreamer has been initialized with gst_init() +or gst_init_check(). + + + %TRUE if initialization has been done, %FALSE otherwise. + + + + + + + + + + + Create a #GstStructure to be used with #gst_element_message_full_with_details + + + + + + + Name of the first field to set + + + + variable arguments in the same form as #GstStructure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tests if you can safely write into a message's structure or validly +modify the seqnum and timestamp fields. + + + + a #GstMessage + + + + + Checks if a message is writable. If not, a writable copy is made and +returned. + + + + the message to make writable + + + + + + + + + + + + + + + + + + + + + + + + + + + Modifies a pointer to a #GstMessage to point to a different #GstMessage. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +message is unreffed, the new one is reffed). + +Either @new_message or the #GstMessage pointed to by @old_message may be %NULL. + + + %TRUE if @new_message was different from @old_message + + + + + pointer to a + pointer to a #GstMessage to be replaced. + + + + pointer to a #GstMessage that will + replace the message pointed to by @old_message. + + + + + + Get a printable name for the given message type. Do not modify or free. + + + a reference to the static name of the message. + + + + + the message type + + + + + + Get the unique quark for the given message type. + + + the quark associated with the message type + + + + + the message type + + + + + + + + an array of tags as strings. + + + + + + + an API + + + + + + Check if @api was registered with @tag. + + + %TRUE if @api was registered with @tag. + + + + + an API + + + + the tag to check + + + + + + Register and return a GType for the @api and associate it with +@tags. + + + a unique GType for @api. + + + + + an API to register + + + + tags for @api + + + + + + + + Lookup a previously registered meta info structure by its implementation name +@impl. + + + a #GstMetaInfo with @impl, or +%NULL when no such metainfo exists. + + + + + the name + + + + + + Register a new #GstMeta implementation. + +The same @info can be retrieved later with gst_meta_get_info() by using +@impl as the key. + + + a #GstMetaInfo that can be used to +access metadata. + + + + + the type of the #GstMeta API + + + + the name of the #GstMeta implementation + + + + the size of the #GstMeta structure + + + + a #GstMetaInitFunction + + + + a #GstMetaFreeFunction + + + + a #GstMetaTransformFunction + + + + + + Register a new custom #GstMeta implementation, backed by an opaque +structure holding a #GstStructure. + +The registered info can be retrieved later with gst_meta_get_info() by using +@name as the key. + +The backing #GstStructure can be retrieved with +gst_custom_meta_get_structure(), its mutability is conditioned by the +writability of the buffer the meta is attached to. + +When @transform_func is %NULL, the meta and its backing #GstStructure +will always be copied when the transform operation is copy, other operations +are discarded, copy regions are ignored. + + + a #GstMetaInfo that can be used to +access metadata. + + + + + the name of the #GstMeta implementation + + + + tags for @api + + + + + + a #GstMetaTransformFunction + + + + user data passed to @transform_func + + + + #GDestroyNotify for user_data + + + + + + Atomically modifies a pointer to point to a new mini-object. +The reference count of @olddata is decreased and the reference count of +@newdata is increased. + +Either @newdata and the value pointed to by @olddata may be %NULL. + + + %TRUE if @newdata was different from @olddata + + + + + pointer to a pointer to a + mini-object to be replaced + + + + pointer to new mini-object + + + + + + Replace the current #GstMiniObject pointer to by @olddata with %NULL and +return the old value. + + + the #GstMiniObject at @oldata + + + + + pointer to a pointer to a mini-object to + be stolen + + + + + + Modifies a pointer to point to a new mini-object. The modification +is done atomically. This version is similar to gst_mini_object_replace() +except that it does not increase the refcount of @newdata and thus +takes ownership of @newdata. + +Either @newdata and the value pointed to by @olddata may be %NULL. + + + %TRUE if @newdata was different from @olddata + + + + + pointer to a pointer to a mini-object to + be replaced + + + + pointer to new mini-object + + + + + + + + + + + + + Get a copy of the name of the pad. g_free() after usage. + +MT safe. + + + + the pad to get the name from + + + + + Get the parent of @pad. This function increases the refcount +of the parent object so you should gst_object_unref() it after usage. +Can return %NULL if the pad did not have a parent. + +MT safe. + + + + the pad to get the parent of + + + + + Return the name of a pad mode, for use in debug messages mostly. + + + short mnemonic for pad mode @mode + + + + + the pad mode + + + + + + + + + + + + + Calls gst_pad_set_activate_function_full() with %NULL for the user_data and +notify. + + + + a #GstPad. + + + the #GstPadActivateFunction to set. + + + + + Calls gst_pad_set_activatemode_function_full() with %NULL for the user_data and +notify. + + + + a #GstPad. + + + the #GstPadActivateModeFunction to set. + + + + + Calls gst_pad_set_chain_function_full() with %NULL for the user_data and +notify. + + + + a sink #GstPad. + + + the #GstPadChainFunction to set. + + + + + Calls gst_pad_set_chain_list_function_full() with %NULL for the user_data and +notify. + + + + a sink #GstPad. + + + the #GstPadChainListFunction to set. + + + + + Calls gst_pad_set_event_full_function_full() with %NULL for the user_data and +notify. + + + + a #GstPad of either direction. + + + the #GstPadEventFullFunction to set. + + + + + Calls gst_pad_set_event_function_full() with %NULL for the user_data and +notify. + + + + a #GstPad of either direction. + + + the #GstPadEventFunction to set. + + + + + Calls gst_pad_set_getrange_function_full() with %NULL for the user_data and +notify. + + + + a source #GstPad. + + + the #GstPadGetRangeFunction to set. + + + + + Calls gst_pad_set_iterate_internal_links_function_full() with %NULL +for the user_data and notify. + + + + a #GstPad of either direction. + + + the #GstPadIterIntLinkFunction to set. + + + + + Calls gst_pad_set_link_function_full() with %NULL +for the user_data and notify. + + + + a #GstPad. + + + the #GstPadLinkFunction to set. + + + + + Calls gst_pad_set_query_function_full() with %NULL for the user_data and +notify. + + + + a #GstPad of either direction. + + + the #GstPadQueryFunction to set. + + + + + Calls gst_pad_set_unlink_function_full() with %NULL +for the user_data and notify. + + + + a #GstPad. + + + the #GstPadUnlinkFunction to set. + + + + + This function creates a GstArray GParamSpec for use by objects/elements +that want to expose properties of GstArray type. This function is +typically * used in connection with g_object_class_install_property() in a +GObjects's instance_init function. + + + a newly created parameter specification + + + + + canonical name of the property specified + + + + nick name for the property specified + + + + description of the property specified + + + + GParamSpec of the array + + + + flags for the property specified + + + + + + This function creates a fraction GParamSpec for use by objects/elements +that want to expose properties of fraction type. This function is typically +used in connection with g_object_class_install_property() in a GObjects's +instance_init function. + + + a newly created parameter specification + + + + + canonical name of the property specified + + + + nick name for the property specified + + + + description of the property specified + + + + minimum value (fraction numerator) + + + + minimum value (fraction denominator) + + + + maximum value (fraction numerator) + + + + maximum value (fraction denominator) + + + + default value (fraction numerator) + + + + default value (fraction denominator) + + + + flags for the property specified + + + + + + + + + + + + + Get the global #GstMetaInfo describing the #GstParentBufferMeta meta. + + + The #GstMetaInfo + + + + + This is a convenience wrapper around gst_parse_launch() to create a +#GstBin from a gst-launch-style pipeline description. See +gst_parse_launch() and the gst-launch man page for details about the +syntax. Ghost pads on the bin for unlinked source or sink pads +within the bin can automatically be created (but only a maximum of +one ghost pad for each direction will be created; if you expect +multiple unlinked source pads or multiple unlinked sink pads +and want them all ghosted, you will have to create the ghost pads +yourself). + + + a + newly-created bin, or %NULL if an error occurred. + + + + + command line describing the bin + + + + whether to automatically create ghost pads + for unlinked source or sink pads within the bin + + + + + + This is a convenience wrapper around gst_parse_launch() to create a +#GstBin from a gst-launch-style pipeline description. See +gst_parse_launch() and the gst-launch man page for details about the +syntax. Ghost pads on the bin for unlinked source or sink pads +within the bin can automatically be created (but only a maximum of +one ghost pad for each direction will be created; if you expect +multiple unlinked source pads or multiple unlinked sink pads +and want them all ghosted, you will have to create the ghost pads +yourself). + + + a newly-created + element, which is guaranteed to be a bin unless + #GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or %NULL if an error + occurred. + + + + + command line describing the bin + + + + whether to automatically create ghost pads + for unlinked source or sink pads within the bin + + + + a parse context allocated with + gst_parse_context_new(), or %NULL + + + + parsing options, or #GST_PARSE_FLAG_NONE + + + + + + Get the error quark used by the parsing subsystem. + + the quark of the parse errors. + + + + + Create a new pipeline based on command line syntax. +Please note that you might get a return value that is not %NULL even though +the @error is set. In this case there was a recoverable parsing error and you +can try to play the pipeline. + +To create a sub-pipeline (bin) for embedding into an existing pipeline +use gst_parse_bin_from_description(). + + + a new element on success, %NULL on + failure. If more than one toplevel element is specified by the + @pipeline_description, all elements are put into a #GstPipeline, which + than is returned. + + + + + the command line describing the pipeline + + + + + + Create a new pipeline based on command line syntax. +Please note that you might get a return value that is not %NULL even though +the @error is set. In this case there was a recoverable parsing error and you +can try to play the pipeline. + +To create a sub-pipeline (bin) for embedding into an existing pipeline +use gst_parse_bin_from_description_full(). + + + a new element on success, %NULL on + failure. If more than one toplevel element is specified by the + @pipeline_description, all elements are put into a #GstPipeline, which + then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in + which case they are put in a #GstBin instead). + + + + + the command line describing the pipeline + + + + a parse context allocated with + gst_parse_context_new(), or %NULL + + + + parsing options, or #GST_PARSE_FLAG_NONE + + + + + + Create a new element based on command line syntax. +@error will contain an error message if an erroneous pipeline is specified. +An error does not mean that the pipeline could not be constructed. + + + a new element on success and %NULL +on failure. + + + + + null-terminated array of arguments + + + + + + + + Create a new element based on command line syntax. +@error will contain an error message if an erroneous pipeline is specified. +An error does not mean that the pipeline could not be constructed. + + + a new element on success; on + failure, either %NULL or a partially-constructed bin or element will be + returned and @error will be set (unless you passed + #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then %NULL will always be returned + on failure) + + + + + null-terminated array of arguments + + + + + + a parse context allocated with + gst_parse_context_new(), or %NULL + + + + parsing options, or #GST_PARSE_FLAG_NONE + + + + + + Get the error quark. + + The error quark used in GError messages + + + + + Returns the name of @feature. +For a nameless plugin feature, this returns %NULL. + + + + a #GstPluginFeature to get the name of @feature. + + + + + Sets the name of the plugin feature, getting rid of the old name if there was one. + + + + a #GstPluginFeature to set the name of. + + + the new name + + + + + Create a new file descriptor set. If @controllable, it +is possible to restart or flush a call to gst_poll_wait() with +gst_poll_restart() and gst_poll_set_flushing() respectively. + +Free-function: gst_poll_free + + + a new #GstPoll, or %NULL in + case of an error. Free with gst_poll_free(). + + + + + whether it should be possible to control a wait. + + + + + + Create a new poll object that can be used for scheduling cancellable +timeouts. + +A timeout is performed with gst_poll_wait(). Multiple timeouts can be +performed from different threads. + +Free-function: gst_poll_free + + + a new #GstPoll, or %NULL in + case of an error. Free with gst_poll_free(). + + + + + Gets the directory for application specific presets if set by the +application. + + + the directory or %NULL, don't free or modify +the string + + + + + Sets an extra directory as an absolute path that should be considered when +looking for presets. Any presets in the application dir will shadow the +system presets. + + + %TRUE for success, %FALSE if the dir already has been set + + + + + the application specific preset dir + + + + + + Outputs a formatted message via the GLib print handler. The default print +handler simply outputs the message to stdout. + +This function will not append a new-line character at the end, unlike +gst_println() which will. + +All strings must be in ASCII or UTF-8 encoding. + +This function differs from g_print() in that it supports all the additional +printf specifiers that are supported by GStreamer's debug logging system, +such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. + +This function is primarily for printing debug output. + + + + + + + a printf style format string + + + + the printf arguments for @format + + + + + + Outputs a formatted message via the GLib error message handler. The default +handler simply outputs the message to stderr. + +This function will not append a new-line character at the end, unlike +gst_printerrln() which will. + +All strings must be in ASCII or UTF-8 encoding. + +This function differs from g_printerr() in that it supports the additional +printf specifiers that are supported by GStreamer's debug logging system, +such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. + +This function is primarily for printing debug output. + + + + + + + a printf style format string + + + + the printf arguments for @format + + + + + + Outputs a formatted message via the GLib error message handler. The default +handler simply outputs the message to stderr. + +This function will append a new-line character at the end, unlike +gst_printerr() which will not. + +All strings must be in ASCII or UTF-8 encoding. + +This function differs from g_printerr() in that it supports the additional +printf specifiers that are supported by GStreamer's debug logging system, +such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. + +This function is primarily for printing debug output. + + + + + + + a printf style format string + + + + the printf arguments for @format + + + + + + Outputs a formatted message via the GLib print handler. The default print +handler simply outputs the message to stdout. + +This function will append a new-line character at the end, unlike +gst_print() which will not. + +All strings must be in ASCII or UTF-8 encoding. + +This function differs from g_print() in that it supports all the additional +printf specifiers that are supported by GStreamer's debug logging system, +such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. + +This function is primarily for printing debug output. + + + + + + + a printf style format string + + + + the printf arguments for @format + + + + + + Iterates the supplied list of UUIDs and checks the GstRegistry for +all the decryptors supporting one of the supplied UUIDs. + + + +A null terminated array containing all +the @system_identifiers supported by the set of available decryptors, or +%NULL if no matches were found. + + + + + + + +A null terminated array of strings that contains the UUID values of each +protection system that is to be checked. + + + + + + + + + + + + + + + + + + + + + Iterates the supplied list of UUIDs and checks the GstRegistry for +an element that supports one of the supplied UUIDs. If more than one +element matches, the system ID of the highest ranked element is selected. + + + One of the strings from +@system_identifiers that indicates the highest ranked element that +implements the protection system indicated by that system ID, or %NULL if no +element has been found. + + + + + A null terminated array of strings +that contains the UUID values of each protection system that is to be +checked. + + + + + + + + Tests if you can safely write data into a query's structure. + + + + a #GstQuery + + + + + Makes a writable query from the given query. + + + + a #GstQuery to make writable + + + + + Modifies a pointer to a #GstQuery to point to a different #GstQuery. The +modification is done atomically (so this is useful for ensuring thread safety +in some cases), and the reference counts are updated appropriately (the old +query is unreffed, the new one is reffed). + +Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. + + + %TRUE if @new_query was different from @old_query + + + + + pointer to a pointer to a + #GstQuery to be replaced. + + + + pointer to a #GstQuery that will + replace the query pointed to by @old_query. + + + + + + Gets the #GstQueryTypeFlags associated with @type. + + + a #GstQueryTypeFlags. + + + + + a #GstQueryType + + + + + + Get a printable name for the given query type. Do not modify or free. + + + a reference to the static name of the query. + + + + + the query type + + + + + + Get the unique quark for the given query type. + + + the quark associated with the query type + + + + + the query type + + + + + + + + + + + + + Get the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. + + + The #GstMetaInfo + + + + + + + + + + + Tests if you can safely set the buffer and / or buffer list of @sample. + + + + A #GstSample + + + + + Returns a writable copy of @sample. If the source sample is +already writable, this will simply return the same sample. + +Use this function to ensure that a sample can be safely modified before +making changes to it, for example before calling gst_sample_set_buffer() + +If the reference count of the source sample @sample is exactly one, the caller +is the sole owner and this function will return the sample object unchanged. + +If there is more than one reference on the object, a copy will be made using +gst_sample_copy(). The passed-in @sample will be unreffed in that case, and the +caller will now own a reference to the new returned sample object. + +In short, this function unrefs the sample in the argument and refs the sample +that it returns. Don't access the argument after calling this function unless +you have an additional reference to it. + + + + A #GstSample + + + + + Some functions in the GStreamer core might install a custom SIGSEGV handler +to better catch and report errors to the application. Currently this feature +is enabled by default when loading plugins. + +Applications might want to disable this behaviour with the +gst_segtrap_set_enabled() function. This is typically done if the application +wants to install its own handler without GStreamer interfering. + + + %TRUE if GStreamer is allowed to install a custom SIGSEGV handler. + + + + + Applications might want to disable/enable the SIGSEGV handling of +the GStreamer core. See gst_segtrap_is_enabled() for more information. + + + + + + + whether a custom SIGSEGV handler should be installed. + + + + + + Gets a string representing the given state transition. + + + a string with the name of the state + result. + + + + + a #GstStateChange to get the name of. + + + + + + + + + + + + + + + + + + + + + + + + + + Get a descriptive string for a given #GstStreamType + + + A string describing the stream type + + + + + a #GstStreamType + + + + + + Atomically modifies a pointer to point to a new structure. +The #GstStructure @oldstr_ptr is pointing to is freed and +@newstr is taken ownership over. + +Either @newstr and the value pointed to by @oldstr_ptr may be %NULL. + +It is a programming error if both @newstr and the value pointed to by +@oldstr_ptr refer to the same, non-%NULL structure. + + + %TRUE if @newstr was different from @oldstr_ptr + + + + + pointer to a place of + a #GstStructure to take + + + + a new #GstStructure + + + + + + Checks if the given type is already registered. + + + %TRUE if the type is already registered + + + + + name of the tag + + + + + + Returns the human-readable description of this tag, You must not change or +free this string. + + + the human-readable description of this tag + + + + + the tag + + + + + + Gets the flag of @tag. + + + the flag of this tag. + + + + + the tag + + + + + + Returns the human-readable name of this tag, You must not change or free +this string. + + + the human-readable name of this tag + + + + + the tag + + + + + + Gets the #GType used for this tag. + + + the #GType of this tag + + + + + the tag + + + + + + Checks if the given tag is fixed. A fixed tag can only contain one value. +Unfixed tags can contain lists of values. + + + %TRUE, if the given tag is fixed. + + + + + tag to check + + + + + + Copies the contents for the given tag into the value, +merging multiple values into one if multiple values are associated +with the tag. +You must g_value_unset() the value after use. + + + %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + given list. + + + + + uninitialized #GValue to copy into + + + + list to get the tag from + + + + tag to read out + + + + + + + + + + + + + Tests if you can safely modify @taglist. It is only safe to modify taglist +when there is only one owner of the taglist - ie, the refcount is 1. + + + + a #GstTagList + + + + + Returns a writable copy of @taglist. + +If there is only one reference count on @taglist, the caller must be the +owner, and so this function will return the taglist object unchanged. If on +the other hand there is more than one reference on the object, a new taglist +object will be returned (which will be a copy of @taglist). The caller's +reference on @taglist will be removed, and instead the caller will own a +reference to the returned object. + +In short, this function unrefs the taglist in the argument and refs the +taglist that it returns. Don't access the argument after calling this +function. See also: gst_tag_list_ref(). + + + + a #GstTagList + + + + + This is a convenience function for the func argument of gst_tag_register(). +It concatenates all given strings using a comma. The tag must be registered +as a G_TYPE_STRING or this function will fail. + + + + + + + uninitialized GValue to store result in + + + + GValue to copy from + + + + + + This is a convenience function for the func argument of gst_tag_register(). +It creates a copy of the first value from the list. + + + + + + + uninitialized GValue to store result in + + + + GValue to copy from + + + + + + Registers a new tag type for the use with GStreamer's type system. If a type +with that name is already registered, that one is used. +The old registration may have used a different type however. So don't rely +on your supplied values. + +Important: if you do not supply a merge function the implication will be +that there can only be one single value for this tag in a tag list and +any additional values will silently be discarded when being added (unless +#GST_TAG_MERGE_REPLACE, #GST_TAG_MERGE_REPLACE_ALL, or +#GST_TAG_MERGE_PREPEND is used as merge mode, in which case the new +value will replace the old one in the list). + +The merge function will be called from gst_tag_list_copy_value() when +it is required that one or more values for a tag be condensed into +one single value. This may happen from gst_tag_list_get_string(), +gst_tag_list_get_int(), gst_tag_list_get_double() etc. What will happen +exactly in that case depends on how the tag was registered and if a +merge function was supplied and if so which one. + +Two default merge functions are provided: gst_tag_merge_use_first() and +gst_tag_merge_strings_with_comma(). + + + + + + + the name or identifier string + + + + a flag describing the type of tag info + + + + the type this data is in + + + + human-readable name + + + + a human-readable description about this tag + + + + function for merging multiple values of this tag, or %NULL + + + + + + Registers a new tag type for the use with GStreamer's type system. + +Same as gst_tag_register(), but @name, @nick, and @blurb must be +static strings or inlined strings, as they will not be copied. (GStreamer +plugins will be made resident once loaded, so this function can be used +even from dynamically loaded plugins.) + + + + + + + the name or identifier string (string constant) + + + + a flag describing the type of tag info + + + + the type this data is in + + + + human-readable name or short description (string constant) + + + + a human-readable description for this tag (string constant) + + + + function for merging multiple values of this tag, or %NULL + + + + + + Copy #GstToc with all subentries (deep copy). + + + + #GstToc to copy. + + + + + Copy #GstTocEntry with all subentries (deep copy). + + + + #GstTocEntry to copy. + + + + + + + + + + + + + + + + + + + Converts @type to a string representation. + + + Returns a human-readable string for @type. This string is + only for debugging purpose and should not be displayed in a user + interface. + + + + + a #GstTocEntryType. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get a list of all active tracer objects owned by the tracing framework for +the entirety of the run-time of the process or till gst_deinit() is called. + + + A #GList of +#GstTracer objects + + + + + + + Register @func to be called when the trace hook @detail is getting invoked. +Use %NULL for @detail to register to all hooks. + + + + + + + the tracer + + + + the detailed hook + + + + the callback + + + + + + + + + + + + + Registers a new typefind function to be used for typefinding. After +registering this function will be available for typefinding. +This function is typically called during an element's plugin initialization. + + + %TRUE on success, %FALSE otherwise + + + + + A #GstPlugin, or %NULL for a static typefind function + + + + The name for registering + + + + The rank (or importance) of this typefind function + + + + The #GstTypeFindFunction to use + + + + Optional comma-separated list of extensions + that could belong to this type + + + + Optionally the caps that could be returned when typefinding + succeeds + + + + Optional user data. This user data must be available until the plugin + is unloaded. + + + + a #GDestroyNotify that will be called on @data when the plugin + is unloaded. + + + + + + Checks if @type is plugin API. See gst_type_mark_as_plugin_api() for +details. + + + %TRUE if @type is plugin API or %FALSE otherwise. + + + + + a GType + + + + What #GstPluginAPIFlags the plugin was marked with + + + + + + Marks @type as plugin API. This should be called in `class_init` of +elements that expose new types (i.e. enums, flags or internal GObjects) via +properties, signals or pad templates. + +Types exposed by plugins are not automatically added to the documentation +as they might originate from another library and should in that case be +documented via that library instead. + +By marking a type as plugin API it will be included in the documentation of +the plugin that defines it. + + + + + + + a GType + + + + a set of #GstPluginAPIFlags to further inform cache generation. + + + + + + Forces GStreamer to re-scan its plugin paths and update the default +plugin registry. + +Applications will almost never need to call this function, it is only +useful if the application knows new plugins have been installed (or old +ones removed) since the start of the application (or, to be precise, the +first call to gst_init()) and the application wants to make use of any +newly-installed plugins without restarting the application. + +Applications should assume that the registry update is neither atomic nor +thread-safe and should therefore not have any dynamic pipelines running +(including the playbin and decodebin elements) and should also not create +any elements or access the GStreamer registry while the update is in +progress. + +Note that this function may block for a significant amount of time. + + + %TRUE if the registry has been updated successfully (does not + imply that there were changes), otherwise %FALSE. + + + + + Constructs a URI for a given valid protocol and location. + +Free-function: g_free + Use GstURI instead. + + + a new string for this URI. Returns %NULL if the + given URI protocol is not valid, or the given location is %NULL. + + + + + Protocol for URI + + + + Location for URI + + + + + + + + + + + + Parses a URI string into a new #GstUri object. Will return NULL if the URI +cannot be parsed. + + + A new #GstUri object, or NULL. + + + + + The URI string to parse. + + + + + + Parses a URI string into a new #GstUri object. Will return NULL if the URI +cannot be parsed. This is identical to gst_uri_from_string() except that +the userinfo and fragment components of the URI will not be unescaped while +parsing. + +Use this when you need to extract a username and password from the userinfo +such as https://user:password@example.com since either may contain +a URI-escaped ':' character. gst_uri_from_string() will unescape the entire +userinfo component, which will make it impossible to know which ':' +delineates the username and password. + +The same applies to the fragment component of the URI, such as +https://example.com/path#fragment which may contain a URI-escaped '#'. + + + A new #GstUri object, or NULL. + + + + + The URI string to parse. + + + + + + Extracts the location out of a given valid URI, ie. the protocol and "://" +are stripped from the URI, which means that the location returned includes +the hostname if one is specified. The returned string must be freed using +g_free(). + +Free-function: g_free + + + the location for this URI. Returns + %NULL if the URI isn't valid. If the URI does not contain a location, an + empty string is returned. + + + + + A URI string + + + + + + Extracts the protocol out of a given valid URI. The returned string must be +freed using g_free(). + + + The protocol for this URI. + + + + + A URI string + + + + + + Checks if the protocol of a given valid URI matches @protocol. + + + %TRUE if the protocol matches. + + + + + a URI string + + + + a protocol string (e.g. "http") + + + + + + Tests if the given string is a valid URI identifier. URIs start with a valid +scheme followed by ":" and maybe a string identifying the location. + + + %TRUE if the string is a valid URI + + + + + A URI string + + + + + + This is a convenience function to join two URI strings and return the result. +The returned string should be g_free()'d after use. + + + A string representing the percent-encoded join of + the two URIs. + + + + + The percent-encoded base URI. + + + + The percent-encoded reference URI to join to the @base_uri. + + + + + + Checks if an element exists that supports the given URI protocol. Note +that a positive return value does not imply that a subsequent call to +gst_element_make_from_uri() is guaranteed to work. + + + %TRUE + + + + + Whether to check for a source or a sink + + + + Protocol that should be checked for (e.g. "http" or "smb") + + + + + + Tests if the given string is a valid protocol identifier. Protocols +must consist of alphanumeric characters, '+', '-' and '.' and must +start with a alphabetic character. See RFC 3986 Section 3.1. + + + %TRUE if the string is a valid protocol identifier, %FALSE otherwise. + + + + + A string + + + + + + Searches inside @array for @search_data by using the comparison function +@search_func. @array must be sorted ascending. + +As @search_data is always passed as second argument to @search_func it's +not required that @search_data has the same type as the array elements. + +The complexity of this search function is O(log (num_elements)). + + + The address of the found +element or %NULL if nothing was found + + + + + the sorted input array + + + + number of elements in the array + + + + size of every element in bytes + + + + function to compare two elements, @search_data will always be passed as second argument + + + + search mode that should be used + + + + element that should be found + + + + data to pass to @search_func + + + + + + Transforms a #gdouble to a fraction and simplifies +the result. + + + + + + + #gdouble to transform + + + + pointer to a #gint to hold the result numerator + + + + pointer to a #gint to hold the result denominator + + + + + + Dumps the buffer memory into a hex representation. Useful for debugging. + + + + + + + a #GstBuffer whose memory to dump + + + + + + Dumps the memory block into a hex representation. Useful for debugging. + + + + + + + a pointer to the memory to dump + + + + + + the size of the memory block to dump + + + + + + Adds the fractions @a_n/@a_d and @b_n/@b_d and stores +the result in @res_n and @res_d. + + + %FALSE on overflow, %TRUE otherwise. + + + + + Numerator of first value + + + + Denominator of first value + + + + Numerator of second value + + + + Denominator of second value + + + + Pointer to #gint to hold the result numerator + + + + Pointer to #gint to hold the result denominator + + + + + + Compares the fractions @a_n/@a_d and @b_n/@b_d and returns +-1 if a < b, 0 if a = b and 1 if a > b. + + + -1 if a < b; 0 if a = b; 1 if a > b. + + + + + Numerator of first value + + + + Denominator of first value + + + + Numerator of second value + + + + Denominator of second value + + + + + + Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores +the result in @res_n and @res_d. + + + %FALSE on overflow, %TRUE otherwise. + + + + + Numerator of first value + + + + Denominator of first value + + + + Numerator of second value + + + + Denominator of second value + + + + Pointer to #gint to hold the result numerator + + + + Pointer to #gint to hold the result denominator + + + + + + Transforms a fraction to a #gdouble. + + + + + + + Fraction numerator as #gint + + + + Fraction denominator #gint + + + + pointer to a #gdouble for the result + + + + + + + + @value casted to #guint64 + + + + + The #gdouble value to convert guint64 double + + + + + + Get a property of type %GST_TYPE_ARRAY and transform it into a +#GValueArray. This allow language bindings to get GST_TYPE_ARRAY +properties which are otherwise not an accessible type. + + + + + + + the object to set the array to + + + + the name of the property to set + + + + a return #GValueArray + + + + + + Get a timestamp as GstClockTime to be used for interval measurements. +The timestamp should not be interpreted in any other way. + + + the timestamp + + + + + Calculates the greatest common divisor of @a +and @b. + + + Greatest common divisor of @a and @b + + + + + First value as #gint + + + + Second value as #gint + + + + + + Calculates the greatest common divisor of @a +and @b. + + + Greatest common divisor of @a and @b + + + + + First value as #gint64 + + + + Second value as #gint64 + + + + + + Return a constantly incrementing group id. + +This function is used to generate a new group-id for the +stream-start event. + +This function never returns %GST_GROUP_ID_INVALID (which is 0) + + + A constantly incrementing unsigned integer, which might +overflow back to 0 at some point. + + + + + + + @value casted to #gdouble + + + + + The #guint64 value to convert to double + + + + + + Compare two sequence numbers, handling wraparound. + +The current implementation just returns (gint32)(@s1 - @s2). + + + A negative number if @s1 is before @s2, 0 if they are equal, or a +positive number if @s1 is after @s2. + + + + + A sequence number. + + + + Another sequence number. + + + + + + Return a constantly incrementing sequence number. + +This function is used internally to GStreamer to be able to determine which +events and messages are "the same". For example, elements may set the seqnum +on a segment-done message to be the same as that of the last seek event, to +indicate that event and the message correspond to the same segment. + +This function never returns %GST_SEQNUM_INVALID (which is 0). + + + A constantly incrementing 32-bit unsigned integer, which might +overflow at some point. Use gst_util_seqnum_compare() to make sure +you handle wraparound correctly. + + + + + Converts the string value to the type of the objects argument and +sets the argument with it. + +Note that this function silently returns if @object has no property named +@name or when @value cannot be converted to the type of the property. + + + + + + + the object to set the argument of + + + + the name of the argument to set + + + + the string value to set + + + + + + Transfer a #GValueArray to %GST_TYPE_ARRAY and set this value on the +specified property name. This allow language bindings to set GST_TYPE_ARRAY +properties which are otherwise not an accessible type. + + + + + + + the object to set the array to + + + + the name of the property to set + + + + a #GValueArray containing the values + + + + + + Converts the string to the type of the value and +sets the value with it. + +Note that this function is dangerous as it does not return any indication +if the conversion worked or not. + + + + + + + the value to set + + + + the string to get the value from + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. + +This function can potentially be very slow if val and num are both +greater than G_MAXUINT32. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer it is truncated. See also +gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(), +gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), +gst_util_uint64_scale_int_ceil(). + + + + + the number to scale + + + + the numerator of the scale ratio + + + + the denominator of the scale ratio + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. + +This function can potentially be very slow if val and num are both +greater than G_MAXUINT32. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer, it is rounded up. See also +gst_util_uint64_scale(), gst_util_uint64_scale_round(), +gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), +gst_util_uint64_scale_int_ceil(). + + + + + the number to scale + + + + the numerator of the scale ratio + + + + the denominator of the scale ratio + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. @num must be non-negative and +@denom must be positive. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer, it is truncated. See also +gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(), +gst_util_uint64_scale(), gst_util_uint64_scale_round(), +gst_util_uint64_scale_ceil(). + + + + + guint64 (such as a #GstClockTime) to scale. + + + + numerator of the scale factor. + + + + denominator of the scale factor. + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. @num must be non-negative and +@denom must be positive. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer, it is rounded up. See also +gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), +gst_util_uint64_scale(), gst_util_uint64_scale_round(), +gst_util_uint64_scale_ceil(). + + + + + guint64 (such as a #GstClockTime) to scale. + + + + numerator of the scale factor. + + + + denominator of the scale factor. + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. @num must be non-negative and +@denom must be positive. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer, it is rounded to the nearest integer +(half-way cases are rounded up). See also gst_util_uint64_scale_int(), +gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), +gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(). + + + + + guint64 (such as a #GstClockTime) to scale. + + + + numerator of the scale factor. + + + + denominator of the scale factor. + + + + + + Scale @val by the rational number @num / @denom, avoiding overflows and +underflows and without loss of precision. + +This function can potentially be very slow if val and num are both +greater than G_MAXUINT32. + + + @val * @num / @denom. In the case of an overflow, this +function returns G_MAXUINT64. If the result is not exactly +representable as an integer, it is rounded to the nearest integer +(half-way cases are rounded up). See also gst_util_uint64_scale(), +gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), +gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(). + + + + + the number to scale + + + + the numerator of the scale ratio + + + + the denominator of the scale ratio + + + + + + Determines if @value1 and @value2 can be compared. + + + %TRUE if the values can be compared + + + + + a value to compare + + + + another value to compare + + + + + + Determines if intersecting two values will produce a valid result. +Two values will produce a valid intersection if they have the same +type. + + + %TRUE if the values can intersect + + + + + a value to intersect + + + + another value to intersect + + + + + + Checks if it's possible to subtract @subtrahend from @minuend. + + + %TRUE if a subtraction is possible + + + + + the value to subtract from + + + + the value to subtract + + + + + + Determines if @value1 and @value2 can be non-trivially unioned. +Any two values can be trivially unioned by adding both of them +to a GstValueList. However, certain types have the possibility +to be unioned in a simpler way. For example, an integer range +and an integer can be unioned if the integer is a subset of the +integer range. If there is the possibility that two values can +be unioned, this function returns %TRUE. + + + %TRUE if there is a function allowing the two values to +be unioned. + + + + + a value to union + + + + another value to union + + + + + + Compares @value1 and @value2. If @value1 and @value2 cannot be +compared, the function returns GST_VALUE_UNORDERED. Otherwise, +if @value1 is greater than @value2, GST_VALUE_GREATER_THAN is returned. +If @value1 is less than @value2, GST_VALUE_LESS_THAN is returned. +If the values are equal, GST_VALUE_EQUAL is returned. + + + comparison result + + + + + a value to compare + + + + another value to compare + + + + + + Tries to deserialize a string into the type specified by the given GValue. +If the operation succeeds, %TRUE is returned, %FALSE otherwise. + + + %TRUE on success + + + + + #GValue to fill with contents of + deserialization + + + + string to deserialize + + + + + + Tries to deserialize a string into the type specified by the given GValue. +@pspec may be used to guide the deserializing of nested members. +If the operation succeeds, %TRUE is returned, %FALSE otherwise. + + + %TRUE on success + + + + + #GValue to fill with contents of + deserialization + + + + string to deserialize + + + + the #GParamSpec describing the expected value + + + + + + Fixate @src into a new value @dest. +For ranges, the first element is taken. For lists and arrays, the +first item is fixated and returned. +If @src is already fixed, this function returns %FALSE. + + + %TRUE if @dest contains a fixated version of @src. + + + + + the #GValue destination + + + + the #GValue to fixate + + + + + + Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets +@product to the product of the two fractions. + + + %FALSE in case of an error (like integer overflow), %TRUE otherwise. + + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + + + Subtracts the @subtrahend from the @minuend and sets @dest to the result. + + + %FALSE in case of an error (like integer overflow), %TRUE otherwise. + + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + + + Gets the bitmask specified by @value. + + + the bitmask. + + + + + a GValue initialized to #GST_TYPE_BITMASK + + + + + + Receives a #GstBuffer as the value of @v. Does not return a reference to +the buffer, so the pointer is only valid for as long as the caller owns +a reference to @v. + + + + a #GValue to query + + + + + Gets the contents of @value. The reference count of the returned +#GstCaps will not be modified, therefore the caller must take one +before getting rid of the @value. + + + the contents of @value + + + + + a GValue initialized to GST_TYPE_CAPS + + + + + + Gets the contents of @value. + + + the contents of @value + + + + + a GValue initialized to GST_TYPE_CAPS_FEATURES + + + + + + Gets the maximum of the range specified by @value. + + + the maximum of the range + + + + + a GValue initialized to GST_TYPE_DOUBLE_RANGE + + + + + + Gets the minimum of the range specified by @value. + + + the minimum of the range + + + + + a GValue initialized to GST_TYPE_DOUBLE_RANGE + + + + + + Retrieve the flags field of a GstFlagSet @value. + + + the flags field of the flagset instance. + + + + + a GValue initialized to #GST_TYPE_FLAG_SET + + + + + + Retrieve the mask field of a GstFlagSet @value. + + + the mask field of the flagset instance. + + + + + a GValue initialized to #GST_TYPE_FLAG_SET + + + + + + Gets the denominator of the fraction specified by @value. + + + the denominator of the fraction. + + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + + + Gets the numerator of the fraction specified by @value. + + + the numerator of the fraction. + + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + + + Gets the maximum of the range specified by @value. + + + the maximum of the range + + + + + a GValue initialized to GST_TYPE_FRACTION_RANGE + + + + + + Gets the minimum of the range specified by @value. + + + the minimum of the range + + + + + a GValue initialized to GST_TYPE_FRACTION_RANGE + + + + + + Gets the maximum of the range specified by @value. + + + the maximum of the range + + + + + a GValue initialized to GST_TYPE_INT64_RANGE + + + + + + Gets the minimum of the range specified by @value. + + + the minimum of the range + + + + + a GValue initialized to GST_TYPE_INT64_RANGE + + + + + + Gets the step of the range specified by @value. + + + the step of the range + + + + + a GValue initialized to GST_TYPE_INT64_RANGE + + + + + + Gets the maximum of the range specified by @value. + + + the maximum of the range + + + + + a GValue initialized to GST_TYPE_INT_RANGE + + + + + + Gets the minimum of the range specified by @value. + + + the minimum of the range + + + + + a GValue initialized to GST_TYPE_INT_RANGE + + + + + + Gets the step of the range specified by @value. + + + the step of the range + + + + + a GValue initialized to GST_TYPE_INT_RANGE + + + + + + Receives a #GstSample as the value of @v. Does not return a reference to +the sample, so the pointer is only valid for as long as the caller owns +a reference to @v. + + + + a #GValue to query + + + + + Gets the contents of @value. + + + the contents of @value + + + + + a GValue initialized to GST_TYPE_STRUCTURE + + + + + + Initialises the target value to be of the same type as source and then copies +the contents from source to target. + + + + + + + the target value + + + + the source value + + + + + + Calculates the intersection of two values. If the values have +a non-empty intersection, the value representing the intersection +is placed in @dest, unless %NULL. If the intersection is non-empty, +@dest is not modified. + + + %TRUE if the intersection is non-empty + + + + + + a uninitialized #GValue that will hold the calculated + intersection value. May be %NULL if the resulting set if not + needed. + + + + a value to intersect + + + + another value to intersect + + + + + + Tests if the given GValue, if available in a GstStructure (or any other +container) contains a "fixed" (which means: one value) or an "unfixed" +(which means: multiple possible values, such as data lists or data +ranges) value. + + + true if the value is "fixed". + + + + + the #GValue to check + + + + + + Check that @value1 is a subset of @value2. + + + %TRUE is @value1 is a subset of @value2 + + + + + a #GValue + + + + a #GValue + + + + + + Registers functions to perform calculations on #GValue items of a given +type. Each type can only be added once. + + + + + + + structure containing functions to register + + + + + + tries to transform the given @value into a string representation that allows +getting back this string later on using gst_value_deserialize(). + +Free-function: g_free + + + the serialization for @value +or %NULL if none exists + + + + + a #GValue to serialize + + + + + + Sets @value to the bitmask specified by @bitmask. + + + + + + + a GValue initialized to #GST_TYPE_BITMASK + + + + the bitmask + + + + + + Sets @b as the value of @v. Caller retains reference to buffer. + + + + a #GValue to receive the data + + + a #GstBuffer to assign to the GstValue + + + + + Sets the contents of @value to @caps. A reference to the +provided @caps will be taken by the @value. + + + + + + + a GValue initialized to GST_TYPE_CAPS + + + + the caps to set the value to + + + + + + Sets the contents of @value to @features. + + + + + + + a GValue initialized to GST_TYPE_CAPS_FEATURES + + + + the features to set the value to + + + + + + Sets @value to the range specified by @start and @end. + + + + + + + a GValue initialized to GST_TYPE_DOUBLE_RANGE + + + + the start of the range + + + + the end of the range + + + + + + Sets @value to the flags and mask values provided in @flags and @mask. +The @flags value indicates the values of flags, the @mask represents +which bits in the flag value have been set, and which are "don't care" + + + + + + + a GValue initialized to %GST_TYPE_FLAG_SET + + + + The value of the flags set or unset + + + + The mask indicate which flags bits must match for comparisons + + + + + + Sets @value to the fraction specified by @numerator over @denominator. +The fraction gets reduced to the smallest numerator and denominator, +and if necessary the sign is moved to the numerator. + + + + + + + a GValue initialized to #GST_TYPE_FRACTION + + + + the numerator of the fraction + + + + the denominator of the fraction + + + + + + Sets @value to the range specified by @start and @end. + + + + + + + a GValue initialized to GST_TYPE_FRACTION_RANGE + + + + the start of the range (a GST_TYPE_FRACTION GValue) + + + + the end of the range (a GST_TYPE_FRACTION GValue) + + + + + + Sets @value to the range specified by @numerator_start/@denominator_start +and @numerator_end/@denominator_end. + + + + + + + a GValue initialized to GST_TYPE_FRACTION_RANGE + + + + the numerator start of the range + + + + the denominator start of the range + + + + the numerator end of the range + + + + the denominator end of the range + + + + + + Sets @value to the range specified by @start and @end. + + + + + + + a GValue initialized to GST_TYPE_INT64_RANGE + + + + the start of the range + + + + the end of the range + + + + + + Sets @value to the range specified by @start, @end and @step. + + + + + + + a GValue initialized to GST_TYPE_INT64_RANGE + + + + the start of the range + + + + the end of the range + + + + the step of the range + + + + + + Sets @value to the range specified by @start and @end. + + + + + + + a GValue initialized to GST_TYPE_INT_RANGE + + + + the start of the range + + + + the end of the range + + + + + + Sets @value to the range specified by @start, @end and @step. + + + + + + + a GValue initialized to GST_TYPE_INT_RANGE + + + + the start of the range + + + + the end of the range + + + + the step of the range + + + + + + Sets @b as the value of @v. Caller retains reference to sample. + + + + a #GValue to receive the data + + + a #GstSample to assign to the GstValue + + + + + Sets the contents of @value to @structure. + + + + + + + a GValue initialized to GST_TYPE_STRUCTURE + + + + the structure to set the value to + + + + + + Subtracts @subtrahend from @minuend and stores the result in @dest. +Note that this means subtraction as in sets, not as in mathematics. + + + %TRUE if the subtraction is not empty + + + + + the destination value + for the result if the subtraction is not empty. May be %NULL, + in which case the resulting set will not be computed, which can + give a fair speedup. + + + + the value to subtract from + + + + the value to subtract + + + + + + Sets @b as the value of @v. Caller gives away reference to buffer. + + + + a #GValue to receive the data + + + a #GstBuffer to assign to the GstValue + + + + + Sets @b as the value of @v. Caller gives away reference to sample. + + + + a #GValue to receive the data + + + a #GstSample to assign to the GstValue + + + + + Creates a GValue corresponding to the union of @value1 and @value2. + + + %TRUE if the union succeeded. + + + + + the destination value + + + + a value to union + + + + another value to union + + + + + + Gets the version number of the GStreamer library. + + + + + + + pointer to a guint to store the major version number + + + + pointer to a guint to store the minor version number + + + + pointer to a guint to store the micro version number + + + + pointer to a guint to store the nano version number + + + + + + This function returns a string that is useful for describing this version +of GStreamer to the outside world: user agent strings, logging, ... + + + a newly allocated string describing this version + of GStreamer. + + + + + diff --git a/girs/GstApp-1.0.gir b/girs/GstApp-1.0.gir new file mode 100644 index 0000000000..dc7023befa --- /dev/null +++ b/girs/GstApp-1.0.gir @@ -0,0 +1,2538 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Appsink is a sink plugin that supports many different methods for making +the application get a handle on the GStreamer data in a pipeline. Unlike +most GStreamer elements, Appsink provides external API functions. + +appsink can be used by linking to the gstappsink.h header file to access the +methods or by using the appsink action signals and properties. + +The normal way of retrieving samples from appsink is by using the +gst_app_sink_pull_sample() and gst_app_sink_pull_preroll() methods. +These methods block until a sample becomes available in the sink or when the +sink is shut down or reaches EOS. There are also timed variants of these +methods, gst_app_sink_try_pull_sample() and gst_app_sink_try_pull_preroll(), +which accept a timeout parameter to limit the amount of time to wait. + +Appsink will internally use a queue to collect buffers from the streaming +thread. If the application is not pulling samples fast enough, this queue +will consume a lot of memory over time. The "max-buffers" property can be +used to limit the queue size. The "drop" property controls whether the +streaming thread blocks or if older buffers are dropped when the maximum +queue size is reached. Note that blocking the streaming thread can negatively +affect real-time performance and should be avoided. + +If a blocking behaviour is not desirable, setting the "emit-signals" property +to %TRUE will make appsink emit the "new-sample" and "new-preroll" signals +when a sample can be pulled without blocking. + +The "caps" property on appsink can be used to control the formats that +appsink can receive. This property can contain non-fixed caps, the format of +the pulled samples can be obtained by getting the sample caps. + +If one of the pull-preroll or pull-sample methods return %NULL, the appsink +is stopped or in the EOS state. You can check for the EOS state with the +"eos" property or with the gst_app_sink_is_eos() method. + +The eos signal can also be used to be informed when the EOS state is reached +to avoid polling. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample(). + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + +This function blocks until a preroll sample or EOS is received or the appsink +element is set to the READY/NULL state. + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered buffers will be put in a queue so that the application +can pull samples at its own rate. Note that when the application does not +pull samples fast enough, the queued buffers could consume a lot of memory, +especially when dealing with raw video frames. + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample(). + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS +condition. + +This function blocks until a preroll sample or EOS is received, the appsink +element is set to the READY/NULL state, or the timeout expires. + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for the preroll sample + + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state or the timeout expires. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered buffers will be put in a queue so that the application +can pull samples at its own rate. Note that when the application does not +pull samples fast enough, the queued buffers could consume a lot of memory, +especially when dealing with raw video frames. + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS +condition. + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. +Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for a sample + + + + + + Check if @appsink supports buffer lists. + + + %TRUE if @appsink supports buffer lists. + + + + + a #GstAppSink + + + + + + Get the configured caps on @appsink. + + + the #GstCaps accepted by the sink. gst_caps_unref() after usage. + + + + + a #GstAppSink + + + + + + Check if @appsink will drop old buffers when the maximum amount of queued +buffers is reached. + + + %TRUE if @appsink is dropping old buffers when the queue is +filled. + + + + + a #GstAppSink + + + + + + Check if appsink will emit the "new-preroll" and "new-sample" signals. + + + %TRUE if @appsink is emitting the "new-preroll" and "new-sample" +signals. + + + + + a #GstAppSink + + + + + + Get the maximum amount of buffers that can be queued in @appsink. + + + The maximum amount of buffers that can be queued. + + + + + a #GstAppSink + + + + + + Check if @appsink will wait for all buffers to be consumed when an EOS is +received. + + + %TRUE if @appsink will wait for all buffers to be consumed when an +EOS is received. + + + + + a #GstAppSink + + + + + + Check if @appsink is EOS, which is when no more samples can be pulled because +an EOS event was received. + +This function also returns %TRUE when the appsink is not in the PAUSED or +PLAYING state. + + + %TRUE if no more samples can be pulled and the appsink is EOS. + + + + + a #GstAppSink + + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample(). + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + +This function blocks until a preroll sample or EOS is received or the appsink +element is set to the READY/NULL state. + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered buffers will be put in a queue so that the application +can pull samples at its own rate. Note that when the application does not +pull samples fast enough, the queued buffers could consume a lot of memory, +especially when dealing with raw video frames. + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + Instruct @appsink to enable or disable buffer list support. + +For backwards-compatibility reasons applications need to opt in +to indicate that they will be able to handle buffer lists. + + + + + + + a #GstAppSink + + + + enable or disable buffer list support + + + + + + Set callbacks which will be executed for each new preroll, new sample and eos. +This is an alternative to using the signals, it has lower overhead and is thus +less expensive, but also less flexible. + +If callbacks are installed, no signals will be emitted for performance +reasons. + +Before 1.16.3 it was not possible to change the callbacks in a thread-safe +way. + + + + + + + a #GstAppSink + + + + the callbacks + + + + a user_data argument for the callbacks + + + + a destroy notify function + + + + + + Set the capabilities on the appsink element. This function takes +a copy of the caps structure. After calling this method, the sink will only +accept caps that match @caps. If @caps is non-fixed, or incomplete, +you must check the caps on the samples to get the actual used caps. + + + + + + + a #GstAppSink + + + + caps to set + + + + + + Instruct @appsink to drop old buffers when the maximum amount of queued +buffers is reached. + + + + + + + a #GstAppSink + + + + the new state + + + + + + Make appsink emit the "new-preroll" and "new-sample" signals. This option is +by default disabled because signal emission is expensive and unneeded when +the application prefers to operate in pull mode. + + + + + + + a #GstAppSink + + + + the new state + + + + + + Set the maximum amount of buffers that can be queued in @appsink. After this +amount of buffers are queued in appsink, any more buffers will block upstream +elements until a sample is pulled from @appsink. + + + + + + + a #GstAppSink + + + + the maximum number of buffers to queue + + + + + + Instruct @appsink to wait for all buffers to be consumed when an EOS is received. + + + + + + + a #GstAppSink + + + + the new state + + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample(). + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS +condition. + +This function blocks until a preroll sample or EOS is received, the appsink +element is set to the READY/NULL state, or the timeout expires. + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for the preroll sample + + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state or the timeout expires. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered buffers will be put in a queue so that the application +can pull samples at its own rate. Note that when the application does not +pull samples fast enough, the queued buffers could consume a lot of memory, +especially when dealing with raw video frames. + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS +condition. + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. +Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for a sample + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signal that the end-of-stream has been reached. This signal is emitted from +the streaming thread. + + + + + + Signal that a new preroll sample is available. + +This signal is emitted from the streaming thread and only when the +"emit-signals" property is %TRUE. + +The new preroll sample can be retrieved with the "pull-preroll" action +signal or gst_app_sink_pull_preroll() either from this signal callback +or from any other thread. + +Note that this signal is only emitted when the "emit-signals" property is +set to %TRUE, which it is not by default for performance reasons. + + + + + + Signal that a new sample is available. + +This signal is emitted from the streaming thread and only when the +"emit-signals" property is %TRUE. + +The new sample can be retrieved with the "pull-sample" action +signal or gst_app_sink_pull_sample() either from this signal callback +or from any other thread. + +Note that this signal is only emitted when the "emit-signals" property is +set to %TRUE, which it is not by default for performance reasons. + + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample() or the "pull-sample" action signal. + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + +This function blocks until a preroll sample or EOS is received or the appsink +element is set to the READY/NULL state. + + a #GstSample or NULL when the appsink is stopped or EOS. + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered samples will be put in a queue so that the application +can pull samples at its own rate. + +Note that when the application does not pull samples fast enough, the +queued samples could consume a lot of memory, especially when dealing with +raw video frames. It's possible to control the behaviour of the queue with +the "drop" and "max-buffers" properties. + +If an EOS event was received before any buffers, this function returns +%NULL. Use gst_app_sink_is_eos () to check for the EOS condition. + + a #GstSample or NULL when the appsink is stopped or EOS. + + + + + Get the last preroll sample in @appsink. This was the sample that caused the +appsink to preroll in the PAUSED state. + +This function is typically used when dealing with a pipeline in the PAUSED +state. Calling this function after doing a seek will give the sample right +after the seek position. + +Calling this function will clear the internal reference to the preroll +buffer. + +Note that the preroll sample will also be returned as the first sample +when calling gst_app_sink_pull_sample() or the "pull-sample" action signal. + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS +condition. + +This function blocks until a preroll sample or EOS is received, the appsink +element is set to the READY/NULL state, or the timeout expires. + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. + + + + + the maximum amount of time to wait for the preroll sample + + + + + + This function blocks until a sample or EOS becomes available or the appsink +element is set to the READY/NULL state or the timeout expires. + +This function will only return samples when the appsink is in the PLAYING +state. All rendered samples will be put in a queue so that the application +can pull samples at its own rate. + +Note that when the application does not pull samples fast enough, the +queued samples could consume a lot of memory, especially when dealing with +raw video frames. It's possible to control the behaviour of the queue with +the "drop" and "max-buffers" properties. + +If an EOS event was received before any buffers or the timeout expires, +this function returns %NULL. Use gst_app_sink_is_eos () to check +for the EOS condition. + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. + + + + + the maximum amount of time to wait for a sample + + + + + + + A set of callbacks that can be installed on the appsink with +gst_app_sink_set_callbacks(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + + + + + a #GstSample or NULL when the appsink is stopped or EOS. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + + + + + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. + Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for the preroll sample + + + + + + + + + + a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. +Call gst_sample_unref() after usage. + + + + + a #GstAppSink + + + + the maximum amount of time to wait for a sample + + + + + + + + + + + + + + + + The appsrc element can be used by applications to insert data into a +GStreamer pipeline. Unlike most GStreamer elements, appsrc provides +external API functions. + +appsrc can be used by linking with the libgstapp library to access the +methods directly or by using the appsrc action signals. + +Before operating appsrc, the caps property must be set to fixed caps +describing the format of the data that will be pushed with appsrc. An +exception to this is when pushing buffers with unknown caps, in which case no +caps should be set. This is typically true of file-like sources that push raw +byte buffers. If you don't want to explicitly set the caps, you can use +gst_app_src_push_sample. This method gets the caps associated with the +sample and sets them on the appsrc replacing any previously set caps (if +different from sample's caps). + +The main way of handing data to the appsrc element is by calling the +gst_app_src_push_buffer() method or by emitting the push-buffer action signal. +This will put the buffer onto a queue from which appsrc will read from in its +streaming thread. It is important to note that data transport will not happen +from the thread that performed the push-buffer call. + +The "max-bytes" property controls how much data can be queued in appsrc +before appsrc considers the queue full. A filled internal queue will always +signal the "enough-data" signal, which signals the application that it should +stop pushing data into appsrc. The "block" property will cause appsrc to +block the push-buffer method until free data becomes available again. + +When the internal queue is running out of data, the "need-data" signal is +emitted, which signals the application that it should start pushing more data +into appsrc. + +In addition to the "need-data" and "enough-data" signals, appsrc can emit the +"seek-data" signal when the "stream-mode" property is set to "seekable" or +"random-access". The signal argument will contain the new desired position in +the stream expressed in the unit set with the "format" property. After +receiving the seek-data signal, the application should push-buffers from the +new position. + +These signals allow the application to operate the appsrc in two different +ways: + +The push mode, in which the application repeatedly calls the push-buffer/push-sample +method with a new buffer/sample. Optionally, the queue size in the appsrc +can be controlled with the enough-data and need-data signals by respectively +stopping/starting the push-buffer/push-sample calls. This is a typical +mode of operation for the stream-type "stream" and "seekable". Use this +mode when implementing various network protocols or hardware devices. + +The pull mode, in which the need-data signal triggers the next push-buffer call. +This mode is typically used in the "random-access" stream-type. Use this +mode for file access or other randomly accessible sources. In this mode, a +buffer of exactly the amount of bytes given by the need-data signal should be +pushed into appsrc. + +In all modes, the size property on appsrc should contain the total stream +size in bytes. Setting this property is mandatory in the random-access mode. +For the stream and seekable modes, setting this property is optional but +recommended. + +When the application has finished pushing data into appsrc, it should call +gst_app_src_end_of_stream() or emit the end-of-stream action signal. After +this call, no more buffers can be pushed into appsrc until a flushing seek +occurs or the state of the appsrc has gone through READY. + + + + Indicates to the appsrc element that the last buffer queued in the +element is the last buffer of the stream. + + + #GST_FLOW_OK when the EOS was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. + + + + + a #GstAppSrc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a buffer to the queue of buffers that the appsrc element will +push to its source pad. This function takes ownership of the buffer. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBuffer to push + + + + + + Adds a buffer list to the queue of buffers and buffer lists that the +appsrc element will push to its source pad. This function takes ownership +of @buffer_list. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer list was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBufferList to push + + + + + + Extract a buffer from the provided sample and adds it to the queue of +buffers that the appsrc element will push to its source pad. Any +previous caps that were set on appsrc will be replaced by the caps +associated with the sample if not equal. + +This function does not take ownership of the +sample so the sample needs to be unreffed after calling this function. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstSample from which buffer and caps may be +extracted + + + + + + + + + + + + + + + + + + + + Indicates to the appsrc element that the last buffer queued in the +element is the last buffer of the stream. + + + #GST_FLOW_OK when the EOS was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. + + + + + a #GstAppSrc + + + + + + Get the configured caps on @appsrc. + + + the #GstCaps produced by the source. gst_caps_unref() after usage. + + + + + a #GstAppSrc + + + + + + Get the number of currently queued bytes inside @appsrc. + + + The number of currently queued bytes. + + + + + a #GstAppSrc + + + + + + Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is +not known. + + + the duration of the stream previously set with gst_app_src_set_duration(); + + + + + a #GstAppSrc + + + + + + Check if appsrc will emit the "new-preroll" and "new-buffer" signals. + + + %TRUE if @appsrc is emitting the "new-preroll" and "new-buffer" +signals. + + + + + a #GstAppSrc + + + + + + Retrieve the min and max latencies in @min and @max respectively. + + + + + + + a #GstAppSrc + + + + the min latency + + + + the max latency + + + + + + Get the maximum amount of bytes that can be queued in @appsrc. + + + The maximum amount of bytes that can be queued. + + + + + a #GstAppSrc + + + + + + Get the size of the stream in bytes. A value of -1 means that the size is +not known. + + + the size of the stream previously set with gst_app_src_set_size(); + + + + + a #GstAppSrc + + + + + + Get the stream type. Control the stream type of @appsrc +with gst_app_src_set_stream_type(). + + + the stream type. + + + + + a #GstAppSrc + + + + + + Adds a buffer to the queue of buffers that the appsrc element will +push to its source pad. This function takes ownership of the buffer. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBuffer to push + + + + + + Adds a buffer list to the queue of buffers and buffer lists that the +appsrc element will push to its source pad. This function takes ownership +of @buffer_list. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer list was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBufferList to push + + + + + + Extract a buffer from the provided sample and adds it to the queue of +buffers that the appsrc element will push to its source pad. Any +previous caps that were set on appsrc will be replaced by the caps +associated with the sample if not equal. + +This function does not take ownership of the +sample so the sample needs to be unreffed after calling this function. + +When the block property is TRUE, this function can block until free +space becomes available in the queue. + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstSample from which buffer and caps may be +extracted + + + + + + Set callbacks which will be executed when data is needed, enough data has +been collected or when a seek should be performed. +This is an alternative to using the signals, it has lower overhead and is thus +less expensive, but also less flexible. + +If callbacks are installed, no signals will be emitted for performance +reasons. + +Before 1.16.3 it was not possible to change the callbacks in a thread-safe +way. + + + + + + + a #GstAppSrc + + + + the callbacks + + + + a user_data argument for the callbacks + + + + a destroy notify function + + + + + + Set the capabilities on the appsrc element. This function takes +a copy of the caps structure. After calling this method, the source will +only produce caps that match @caps. @caps must be fixed and the caps on the +buffers must match the caps or left NULL. + + + + + + + a #GstAppSrc + + + + caps to set + + + + + + Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is +not known. + + + + + + + a #GstAppSrc + + + + the duration to set + + + + + + Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is +by default disabled because signal emission is expensive and unneeded when +the application prefers to operate in pull mode. + + + + + + + a #GstAppSrc + + + + the new state + + + + + + Configure the @min and @max latency in @src. If @min is set to -1, the +default latency calculations for pseudo-live sources will be used. + + + + + + + a #GstAppSrc + + + + the min latency + + + + the max latency + + + + + + Set the maximum amount of bytes that can be queued in @appsrc. +After the maximum amount of bytes are queued, @appsrc will emit the +"enough-data" signal. + + + + + + + a #GstAppSrc + + + + the maximum number of bytes to queue + + + + + + Set the size of the stream in bytes. A value of -1 means that the size is +not known. + + + + + + + a #GstAppSrc + + + + the size to set + + + + + + Set the stream type on @appsrc. For seekable streams, the "seek" signal must +be connected to. + +A stream_type stream + + + + + + + a #GstAppSrc + + + + the new state + + + + + + When max-bytes are queued and after the enough-data signal has been emitted, +block any further push-buffer calls until the amount of queued bytes drops +below the max-bytes limit. + + + + The GstCaps that will negotiated downstream and will be put +on outgoing buffers. + + + + The number of currently queued bytes inside appsrc. + + + + The total duration in nanoseconds of the data stream. If the total duration is known, it +is recommended to configure it with this property. + + + + Make appsrc emit the "need-data", "enough-data" and "seek-data" signals. +This option is by default enabled for backwards compatibility reasons but +can disabled when needed because signal emission is expensive. + + + + The format to use for segment events. When the source is producing +timestamped buffers this property should be set to GST_FORMAT_TIME. + + + + When enabled, appsrc will check GstSegment in GstSample which was +pushed via gst_app_src_push_sample() or "push-sample" signal action. +If a GstSegment is changed, corresponding segment event will be followed +by next data flow. + +FIXME: currently only GST_FORMAT_TIME format is supported and therefore +GstAppSrc::format should be time. However, possibly #GstAppSrc can support +other formats. + + + + Instruct the source to behave like a live source. This includes that it +will only push out buffers in the PLAYING state. + + + + The maximum amount of bytes that can be queued internally. +After the maximum amount of bytes are queued, appsrc will emit the +"enough-data" signal. + + + + + + + The minimum latency of the source. A value of -1 will use the default +latency calculations of #GstBaseSrc. + + + + Make appsrc emit the "need-data" signal when the amount of bytes in the +queue drops below this percentage of max-bytes. + + + + The total size in bytes of the data stream. If the total size is known, it +is recommended to configure it with this property. + + + + The type of stream that this source is producing. For seekable streams the +application should connect to the seek-data signal. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A set of callbacks that can be installed on the appsrc with +gst_app_src_set_callbacks(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBuffer to push + + + + + + + + + + #GST_FLOW_OK when the EOS was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. + + + + + a #GstAppSrc + + + + + + + + + + #GST_FLOW_OK when the buffer was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstSample from which buffer and caps may be +extracted + + + + + + + + + + #GST_FLOW_OK when the buffer list was successfully queued. +#GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. +#GST_FLOW_EOS when EOS occurred. + + + + + a #GstAppSrc + + + + a #GstBufferList to push + + + + + + + + + + + + + + + + The stream type. + + No seeking is supported in the stream, such as a +live stream. + + + The stream is seekable but seeking might not +be very fast, such as data from a webserver. + + + The stream is seekable and seeking is fast, +such as in a local file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/girs/GstAudio-1.0.gir b/girs/GstAudio-1.0.gir new file mode 100644 index 0000000000..5ff07b769e --- /dev/null +++ b/girs/GstAudio-1.0.gir @@ -0,0 +1,15495 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the #GstClock of @obj. + + + + a #GstAudioBaseSink + + + + + + + + + + + + Get the sink #GstPad of @obj. + + + + a #GstAudioBaseSink + + + + + + + + + + + + + + + + + + + + + + + + + + Get the #GstClock of @obj. + + + + a #GstAudioBaseSrc + + + + + + + + + + + + Get the source #GstPad of @obj. + + + + a #GstAudioBaseSrc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic caps string for audio, for use in pad templates. + + + + string format that describes the sample layout, as string + (e.g. "S16LE", "S8", etc.) + + + + + + + + + + + + + + + + + + + + + + + + + + Maximum range of allowed channels, for use in template caps strings. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioDitherMethod, The dither method to use when +changing bit depth. +Default is #GST_AUDIO_DITHER_NONE. + + + + + #GST_TYPE_LIST, The channel mapping matrix. + +The matrix coefficients must be between -1 and 1: the number of rows is equal +to the number of output channels and the number of columns is equal to the +number of input channels. + +## Example matrix generation code +To generate the matrix using code: + +|[ +GValue v = G_VALUE_INIT; +GValue v2 = G_VALUE_INIT; +GValue v3 = G_VALUE_INIT; + +g_value_init (&v2, GST_TYPE_ARRAY); +g_value_init (&v3, G_TYPE_DOUBLE); +g_value_set_double (&v3, 1); +gst_value_array_append_value (&v2, &v3); +g_value_unset (&v3); +[ Repeat for as many double as your input channels - unset and reinit v3 ] +g_value_init (&v, GST_TYPE_ARRAY); +gst_value_array_append_value (&v, &v2); +g_value_unset (&v2); +[ Repeat for as many v2's as your output channels - unset and reinit v2] +g_object_set_property (G_OBJECT (audiomixmatrix), "matrix", &v); +g_value_unset (&v); +]| + + + + + #GstAudioNoiseShapingMethod, The noise shaping method to use +to mask noise from quantization errors. +Default is #GST_AUDIO_NOISE_SHAPING_NONE. + + + + + #G_TYPE_UINT, The quantization amount. Components will be +quantized to multiples of this value. +Default is 1 + + + + + #GstAudioResamplerMethod, The resampler method to use when +changing sample rates. +Default is #GST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL. + + + + + + + + + + + + + + + + + + + + + + + + + + Utility function that audio decoder elements can use in case they encountered +a data processing error that may be fatal for the current "data unit" but +need not prevent subsequent decoding. Such errors are counted and if there +are too many, as configured in the context's max_errors, the pipeline will +post an error message and the application will be requested to stop further +media processing. Otherwise, it is considered a "glitch" and only a warning +is logged. In either case, @ret is set to the proper value to +return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK). + + + + the base audio decoder element that generates the error + + + element defined weight of the error, added to error count + + + like CORE, LIBRARY, RESOURCE or STREAM (see #gstreamer-GstGError) + + + error code defined for that domain (see #gstreamer-GstGError) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + variable to receive return value + + + + + + + + + + + + Gives the input segment of the element. + + + + audio decoder instance + + + + + Default maximum number of errors tolerated before signaling error. + + + + + Gives the output segment of the element. + + + + audio decoder instance + + + + + The name of the templates for the sink pad. + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + base audio codec instance + + + + + The name of the templates for the source pad. + + + + + Gives the pointer to the source #GstPad object of the element. + + + + base audio codec instance + + + + + + + + + + + + + + + + + + + Standard number of channels used in consumer audio. + + + + + Standard format used in consumer audio. + + + + + Standard sampling rate used in consumer audio. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gives the input segment of the element. + + + + base parse instance + + + + + Gives the output segment of the element. + + + + base parse instance + + + + + the name of the templates for the sink pad + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + audio encoder instance + + + + + the name of the templates for the source pad + + + + + Gives the pointer to the source #GstPad object of the element. + + + + audio encoder instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of all audio formats, for use in template caps strings. + +Formats are sorted by decreasing "quality", using these criteria by priority: + - depth + - width + - Float > Signed > Unsigned + - native endianness preferred + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Turns audio format string @s into the format string for native endianness. + + + + format string without endianness marker + + + + + Turns audio format string @s into the format string for other endianness. + + + + format string without endianness marker + + + + + Maximum range of allowed sample rates, for use in template caps strings. + + + + + G_TYPE_DOUBLE, B parameter of the cubic filter. +Values between 0.0 and 2.0 are accepted. 1.0 is the default. + +Below are some values of popular filters: + B C +Hermite 0.0 0.0 +Spline 1.0 0.0 +Catmull-Rom 0.0 1/2 + + + + + G_TYPE_DOUBLE, C parameter of the cubic filter. +Values between 0.0 and 2.0 are accepted. 0.0 is the default. + +See #GST_AUDIO_RESAMPLER_OPT_CUBIC_B for some more common values + + + + + G_TYPE_DOUBLE, Cutoff parameter for the filter. 0.940 is the default. + + + + + GST_TYPE_AUDIO_RESAMPLER_INTERPOLATION: how the filter coefficients should be + interpolated. +GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC is default. + + + + + GST_TYPE_AUDIO_RESAMPLER_FILTER_MODE: how the filter tables should be +constructed. +GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO is the default. + + + + + G_TYPE_UINT: the amount of memory to use for full filter tables before +switching to interpolated filter tables. +1048576 is the default. + + + + + G_TYPE_UINT, oversampling to use when interpolating filters +8 is the default. + + + + + G_TYPE_DOUBLE: The maximum allowed phase error when switching sample +rates. +0.1 is the default. + + + + + G_TYPE_INT: the number of taps to use for the filter. +0 is the default and selects the taps automatically. + + + + + G_TYPE_DOUBLE, stopband attenuation in decibels. The attenuation +after the stopband for the kaiser window. 85 dB is the default. + + + + + G_TYPE_DOUBLE, transition bandwidth. The width of the +transition band for the kaiser window. 0.087 is the default. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses must use (a subclass of) #GstAudioAggregatorPad for both +their source and sink pads, +gst_element_class_add_static_pad_template_with_gtype() is a convenient +helper. + +#GstAudioAggregator can perform conversion on the data arriving +on its sink pads, based on the format expected downstream: in order +to enable that behaviour, the GType of the sink pads must either be +a (subclass of) #GstAudioAggregatorConvertPad to use the default +#GstAudioConverter implementation, or a subclass of #GstAudioAggregatorPad +implementing #GstAudioAggregatorPadClass.convert_buffer. + +To allow for the output caps to change, the mechanism is the same as +above, with the GType of the source pad. + +See #GstAudioMixer for an example. + +When conversion is enabled, #GstAudioAggregator will accept +any type of raw audio caps and perform conversion +on the data arriving on its sink pads, with whatever downstream +expects as the target format. + +In case downstream caps are not fully fixated, it will use +the first configured sink pad to finish fixating its source pad +caps. + +A notable exception for now is the sample rate, sink pads must +have the same sample rate as either the downstream requirement, +or the first configured pad, or a combination of both (when +downstream specifies a range or a set of acceptable rates). + +The #GstAggregator::samples-selected signal is provided with some +additional information about the output buffer: +- "offset" G_TYPE_UINT64 Offset in samples since segment start + for the position that is next to be filled in the output buffer. +- "frames" G_TYPE_UINT Number of frames per output buffer. + +In addition the gst_aggregator_peek_next_sample() function returns +additional information in the info #GstStructure of the returned sample: +- "output-offset" G_TYPE_UINT64 Sample offset in output segment relative to + the output segment's start where the current position of this input + buffer would be placed +- "position" G_TYPE_UINT current position in the input buffer in samples +- "size" G_TYPE_UINT size of the input buffer in samples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Output block size in nanoseconds, expressed as a fraction. + + + + + + + The caps set by the subclass + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation of GstPad that can be used with #GstAudioAggregator. + +See #GstAudioAggregator for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The default implementation of GstPad used with #GstAudioAggregator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The audio info for this pad set from the incoming caps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is the base class for audio sinks. Subclasses need to implement the +::create_ringbuffer vmethod. This base class will then take care of +writing samples to the ringbuffer, synchronisation, clipping and flushing. + + + Create and return the #GstAudioRingBuffer for @sink. This function will +call the ::create_ringbuffer vmethod and will set @sink as the parent of +the returned buffer (see gst_object_set_parent()). + + + The new ringbuffer of @sink. + + + + + a #GstAudioBaseSink. + + + + + + + + + + + + + + + + + + + + Create and return the #GstAudioRingBuffer for @sink. This function will +call the ::create_ringbuffer vmethod and will set @sink as the parent of +the returned buffer (see gst_object_set_parent()). + + + The new ringbuffer of @sink. + + + + + a #GstAudioBaseSink. + + + + + + Get the current alignment threshold, in nanoseconds, used by @sink. + + + The current alignment threshold used by @sink. + + + + + a #GstAudioBaseSink + + + + + + Get the current discont wait, in nanoseconds, used by @sink. + + + The current discont wait used by @sink. + + + + + a #GstAudioBaseSink + + + + + + Get the current drift tolerance, in microseconds, used by @sink. + + + The current drift tolerance used by @sink. + + + + + a #GstAudioBaseSink + + + + + + Queries whether @sink will provide a clock or not. See also +gst_audio_base_sink_set_provide_clock. + + + %TRUE if @sink will provide a clock. + + + + + a #GstAudioBaseSink + + + + + + Get the current slave method used by @sink. + + + The current slave method used by @sink. + + + + + a #GstAudioBaseSink + + + + + + Informs this base class that the audio output device has failed for +some reason, causing a discontinuity (for example, because the device +recovered from the error, but lost all contents of its ring buffer). +This function is typically called by derived classes, and is useful +for the custom slave method. + + + + + + + a #GstAudioBaseSink + + + + + + Controls the sink's alignment threshold. + + + + + + + a #GstAudioBaseSink + + + + the new alignment threshold in nanoseconds + + + + + + Sets the custom slaving callback. This callback will +be invoked if the slave-method property is set to +GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink +receives and plays samples. + +Setting the callback to NULL causes the sink to +behave as if the GST_AUDIO_BASE_SINK_SLAVE_NONE +method were used. + + + + + + + a #GstAudioBaseSink + + + + a #GstAudioBaseSinkCustomSlavingCallback + + + + user data passed to the callback + + + + called when user_data becomes unused + + + + + + Controls how long the sink will wait before creating a discontinuity. + + + + + + + a #GstAudioBaseSink + + + + the new discont wait in nanoseconds + + + + + + Controls the sink's drift tolerance. + + + + + + + a #GstAudioBaseSink + + + + the new drift tolerance in microseconds + + + + + + Controls whether @sink will provide a clock or not. If @provide is %TRUE, +gst_element_provide_clock() will return a clock that reflects the datarate +of @sink. If @provide is %FALSE, gst_element_provide_clock() will return +NULL. + + + + + + + a #GstAudioBaseSink + + + + new state + + + + + + Controls how clock slaving will be performed in @sink. + + + + + + + a #GstAudioBaseSink + + + + the new slave method + + + + + + + + + + + + + + + A window of time in nanoseconds to wait before creating a discontinuity as +a result of breaching the drift-tolerance. + + + + Controls the amount of time in microseconds that clocks are allowed +to drift before resynchronisation happens. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioBaseSink class. Override the vmethod to implement +functionality. + + + the parent class. + + + + + + + The new ringbuffer of @sink. + + + + + a #GstAudioBaseSink. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function is set with gst_audio_base_sink_set_custom_slaving_callback() +and is called during playback. It receives the current time of external and +internal clocks, which the callback can then use to apply any custom +slaving/synchronization schemes. + +The external clock is the sink's element clock, the internal one is the +internal audio clock. The internal audio clock's calibration is applied to +the timestamps before they are passed to the callback. The difference between +etime and itime is the skew; how much internal and external clock lie apart +from each other. A skew of 0 means both clocks are perfectly in sync. +itime > etime means the external clock is going slower, while itime < etime +means it is going faster than the internal clock. etime and itime are always +valid timestamps, except for when a discontinuity happens. + +requested_skew is an output value the callback can write to. It informs the +sink of whether or not it should move the playout pointer, and if so, by how +much. This pointer is only NULL if a discontinuity occurs; otherwise, it is +safe to write to *requested_skew. The default skew is 0. + +The sink may experience discontinuities. If one happens, discont is TRUE, +itime, etime are set to GST_CLOCK_TIME_NONE, and requested_skew is NULL. +This makes it possible to reset custom clock slaving algorithms when a +discontinuity happens. + + + + + + + a #GstAudioBaseSink + + + + external clock time + + + + internal clock time + + + + skew amount requested by the callback + + + + reason for discontinuity (if any) + + + + user data + + + + + + Different possible reasons for discontinuities. This enum is useful for the custom +slave method. + + No discontinuity occurred + + + New caps are set, causing renegotiotion + + + Samples have been flushed + + + Sink was synchronized to the estimated latency (occurs during initialization) + + + Aligning buffers failed because the timestamps are too discontinuous + + + Audio output device experienced and recovered from an error but introduced latency in the process (see also @gst_audio_base_sink_report_device_failure()) + + + + + + + Different possible clock slaving algorithms used when the internal audio +clock is not selected as the pipeline master clock. + + Resample to match the master clock + + + Adjust playout pointer when master clock +drifts too much. + + + No adjustment is done. + + + Use custom clock slaving algorithm (Since: 1.6) + + + + This is the base class for audio sources. Subclasses need to implement the +::create_ringbuffer vmethod. This base class will then take care of +reading samples from the ringbuffer, synchronisation and flushing. + + + Create and return the #GstAudioRingBuffer for @src. This function will call +the ::create_ringbuffer vmethod and will set @src as the parent of the +returned buffer (see gst_object_set_parent()). + + + The new ringbuffer of @src. + + + + + a #GstAudioBaseSrc. + + + + + + Create and return the #GstAudioRingBuffer for @src. This function will call +the ::create_ringbuffer vmethod and will set @src as the parent of the +returned buffer (see gst_object_set_parent()). + + + The new ringbuffer of @src. + + + + + a #GstAudioBaseSrc. + + + + + + Queries whether @src will provide a clock or not. See also +gst_audio_base_src_set_provide_clock. + + + %TRUE if @src will provide a clock. + + + + + a #GstAudioBaseSrc + + + + + + Get the current slave method used by @src. + + + The current slave method used by @src. + + + + + a #GstAudioBaseSrc + + + + + + Controls whether @src will provide a clock or not. If @provide is %TRUE, +gst_element_provide_clock() will return a clock that reflects the datarate +of @src. If @provide is %FALSE, gst_element_provide_clock() will return NULL. + + + + + + + a #GstAudioBaseSrc + + + + new state + + + + + + Controls how clock slaving will be performed in @src. + + + + + + + a #GstAudioBaseSrc + + + + the new slave method + + + + + + Actual configured size of audio buffer in microseconds. + + + + Actual configured audio latency in microseconds. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioBaseSrc class. Override the vmethod to implement +functionality. + + + the parent class. + + + + + + + The new ringbuffer of @src. + + + + + a #GstAudioBaseSrc. + + + + + + + + + + + + + + + + Different possible clock slaving algorithms when the internal audio clock was +not selected as the pipeline clock. + + Resample to match the master clock. + + + Retimestamp output buffers with master +clock time. + + + Adjust capture pointer when master clock +drifts too much. + + + No adjustment is done. + + + + A structure containing the result of an audio buffer map operation, +which is executed with gst_audio_buffer_map(). For non-interleaved (planar) +buffers, the beginning of each channel in the buffer has its own pointer in +the @planes array. For interleaved buffers, the @planes array only contains +one item, which is the pointer to the beginning of the buffer, and @n_planes +equals 1. + +The different channels in @planes are always in the GStreamer channel order. + + + a #GstAudioInfo describing the audio properties of this buffer + + + + the size of the buffer in samples + + + + the number of planes available + + + + an array of @n_planes pointers pointing to the start of each + plane in the mapped buffer + + + + the mapped buffer + + + + + + + + + + + + + + + + + + + + + + Maps an audio @gstbuffer so that it can be read or written and stores the +result of the map operation in @buffer. + +This is especially useful when the @gstbuffer is in non-interleaved (planar) +layout, in which case this function will use the information in the +@gstbuffer's attached #GstAudioMeta in order to map each channel in a +separate "plane" in #GstAudioBuffer. If a #GstAudioMeta is not attached +on the @gstbuffer, then it must be in interleaved layout. + +If a #GstAudioMeta is attached, then the #GstAudioInfo on the meta is checked +against @info. Normally, they should be equal, but in case they are not, +a g_critical will be printed and the #GstAudioInfo from the meta will be +used. + +In non-interleaved buffers, it is possible to have each channel on a separate +#GstMemory. In this case, each memory will be mapped separately to avoid +copying their contents in a larger memory area. Do note though that it is +not supported to have a single channel spanning over two or more different +#GstMemory objects. Although the map operation will likely succeed in this +case, it will be highly sub-optimal and it is recommended to merge all the +memories in the buffer before calling this function. + +Note: The actual #GstBuffer is not ref'ed, but it is required to stay valid +as long as it's mapped. + + + %TRUE if the map operation succeeded or %FALSE on failure + + + + + pointer to a #GstAudioBuffer + + + + the audio properties of the buffer + + + + the #GstBuffer to be mapped + + + + the access mode for the memory + + + + + + Unmaps an audio buffer that was previously mapped with +gst_audio_buffer_map(). + + + + + + + the #GstAudioBuffer to unmap + + + + + + Clip the buffer to the given %GstSegment. + +After calling this function the caller does not own a reference to +@buffer anymore. + + + %NULL if the buffer is completely outside the configured segment, +otherwise the clipped buffer is returned. + +If the buffer has no timestamp, it is assumed to be inside the segment and +is not clipped + + + + + The buffer to clip. + + + + Segment in %GST_FORMAT_TIME or %GST_FORMAT_DEFAULT to which + the buffer should be clipped. + + + + sample rate. + + + + size of one audio frame in bytes. This is the size of one sample * +number of channels. + + + + + + Reorders @buffer from the channel positions @from to the channel +positions @to. @from and @to must contain the same number of +positions and the same positions, only in a different order. +@buffer must be writable. + + + %TRUE if the reordering was possible. + + + + + The buffer to reorder. + + + + The %GstAudioFormat of the buffer. + + + + The number of channels. + + + + The channel positions in the buffer. + + + + + + The channel positions to convert to. + + + + + + + + Truncate the buffer to finally have @samples number of samples, removing +the necessary amount of samples from the end and @trim number of samples +from the beginning. + +After calling this function the caller does not own a reference to +@buffer anymore. + + + the truncated buffer or %NULL if the arguments + were invalid + + + + + The buffer to truncate. + + + + size of one audio frame in bytes. This is the size of one sample * +number of channels. + + + + the number of samples to remove from the beginning of the buffer + + + + the final number of samples that should exist in this buffer or -1 +to use all the remaining samples if you are only removing samples from the +beginning. + + + + + + + Provides a base class for CD digital audio (CDDA) sources, which handles +things like seeking, querying, discid calculation, tags, and buffer +timestamping. + +## Using GstAudioCdSrc-based elements in applications + +GstAudioCdSrc registers two #GstFormat<!-- -->s of its own, namely +the "track" format and the "sector" format. Applications will usually +only find the "track" format interesting. You can retrieve that #GstFormat +for use in seek events or queries with gst_format_get_by_nick("track"). + +In order to query the number of tracks, for example, an application would +set the CDDA source element to READY or PAUSED state and then query the +the number of tracks via gst_element_query_duration() using the track +format acquired above. Applications can query the currently playing track +in the same way. + +Alternatively, applications may retrieve the currently playing track and +the total number of tracks from the taglist that will posted on the bus +whenever the CD is opened or the currently playing track changes. The +taglist will contain GST_TAG_TRACK_NUMBER and GST_TAG_TRACK_COUNT tags. + +Applications playing back CD audio using playbin and cdda://n URIs should +issue a seek command in track format to change between tracks, rather than +setting a new cdda://n+1 URI on playbin (as setting a new URI on playbin +involves closing and re-opening the CD device, which is much much slower). + +## Tags and meta-information + +CDDA sources will automatically emit a number of tags, details about which +can be found in the libgsttag documentation. Those tags are: +#GST_TAG_CDDA_CDDB_DISCID, #GST_TAG_CDDA_CDDB_DISCID_FULL, +#GST_TAG_CDDA_MUSICBRAINZ_DISCID, #GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL, +among others. + +## Tracks and Table of Contents (TOC) + +Applications will be informed of the available tracks via a TOC message +on the pipeline's #GstBus. The #GstToc will contain a #GstTocEntry for +each track, with information about each track. The duration for each +track can be retrieved via the #GST_TAG_DURATION tag from each entry's +tag list, or calculated via gst_toc_entry_get_start_stop_times(). +The track entries in the TOC will be sorted by track number. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CDDA sources use this function from their start vfunc to announce the +available data and audio tracks to the base source class. The caller +should allocate @track on the stack, the base source will do a shallow +copy of the structure (and take ownership of the taglist if there is one). + + + FALSE on error, otherwise TRUE. + + + + + a #GstAudioCdSrc + + + + address of #GstAudioCdSrcTrack to add + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Audio CD source base class. + + + the parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mode in which the CD audio source operates. Influences timestamping, +EOS handling and seeking. + + each single track is a stream + + + the entire disc is a single stream + + + + + + + CD track abstraction to communicate TOC entries to the base class. + +This structure is only for use by sub-classed in connection with +gst_audio_cd_src_add_track(). + +Applications will be informed of the available tracks via a TOC message +on the pipeline's #GstBus instead. + + + Whether this is an audio track + + + + Track number in TOC (usually starts from 1, but not always) + + + + The first sector of this track (LBA) + + + + The last sector of this track (LBA) + + + + Track-specific tags (e.g. from cd-text information), or NULL + + + + + + + + + + + + + + + + + Free memory allocated by @mix. + + + + + + + a #GstAudioChannelMixer + + + + + + Check if @mix is in passthrough. + +Only N x N mix identity matrices are considered passthrough, +this is determined by comparing the contents of the matrix +with 0.0 and 1.0. + +As this is floating point comparisons, if the values have been +generated, they should be rounded up or down by explicit +assignment of 0.0 or 1.0 to values within a user-defined +epsilon, this code doesn't make assumptions as to what may +constitute an appropriate epsilon. + + + %TRUE is @mix is passthrough. + + + + + a #GstAudioChannelMixer + + + + + + In case the samples are interleaved, @in and @out must point to an +array with a single element pointing to a block of interleaved samples. + +If non-interleaved samples are used, @in and @out must point to an +array with pointers to memory blocks, one for each channel. + +Perform channel mixing on @in_data and write the result to @out_data. +@in_data and @out_data need to be in @format and @layout. + + + + + + + a #GstAudioChannelMixer + + + + input samples + + + + output samples + + + + number of samples + + + + + + Create a new channel mixer object for the given parameters. + + + a new #GstAudioChannelMixer object, or %NULL if @format isn't supported. + Free with gst_audio_channel_mixer_free() after usage. + + + + + #GstAudioChannelMixerFlags + + + + + + + number of input channels + + + + positions of input channels + + + + number of output channels + + + + positions of output channels + + + + + + Create a new channel mixer object for the given parameters. + + + a new #GstAudioChannelMixer object, or %NULL if @format isn't supported, + @matrix is invalid, or @matrix is %NULL and @in_channels != @out_channels. + Free with gst_audio_channel_mixer_free() after usage. + + + + + #GstAudioChannelMixerFlags + + + + + + + number of input channels + + + + number of output channels + + + + channel conversion matrix, m[@in_channels][@out_channels]. + If identity matrix, passthrough applies. If %NULL, a (potentially truncated) + identity matrix is generated. + + + + + + + Flags passed to gst_audio_channel_mixer_new() + + no flag + + + input channels are not interleaved + + + output channels are not interleaved + + + input channels are explicitly unpositioned + + + output channels are explicitly unpositioned + + + + Audio channel positions. + +These are the channels defined in SMPTE 2036-2-2008 +Table 1 for 22.2 audio systems with the Surround and Wide channels from +DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the +actual channel layout is expressed with a channel count and a channel mask, +which describes the existing channels. The positions in the bit mask correspond +to the enum values. +For negotiation it is allowed to have more bits set in the channel mask than +the number of channels to specify the allowed channel positions but this is +not allowed in negotiated caps. It is not allowed in any situation other +than the one mentioned below to have less bits set in the channel mask than +the number of channels. + +@GST_AUDIO_CHANNEL_POSITION_MONO can only be used with a single mono channel that +has no direction information and would be mixed into all directional channels. +This is expressed in caps by having a single channel and no channel mask. + +@GST_AUDIO_CHANNEL_POSITION_NONE can only be used if all channels have this position. +This is expressed in caps by having a channel mask with no bits set. + +As another special case it is allowed to have two channels without a channel mask. +This implicitly means that this is a stereo stream with a front left and front right +channel. + + used for position-less channels, e.g. + from a sound card that records 1024 channels; mutually exclusive with + any other channel position + + + Mono without direction; + can only be used with 1 channel + + + invalid position + + + Front left + + + Front right + + + Front center + + + Low-frequency effects 1 (subwoofer) + + + Rear left + + + Rear right + + + Front left of center + + + Front right of center + + + Rear center + + + Low-frequency effects 2 (subwoofer) + + + Side left + + + Side right + + + Top front left + + + Top front right + + + Top front center + + + Top center + + + Top rear left + + + Top rear right + + + Top side right + + + Top rear right + + + Top rear center + + + Bottom front center + + + Bottom front left + + + Bottom front right + + + Wide left (between front left and side left) + + + Wide right (between front right and side right) + + + Surround left (between rear left and side left) + + + Surround right (between rear right and side right) + + + + Extra buffer metadata describing how much audio has to be clipped from +the start or end of a buffer. This is used for compressed formats, where +the first frame usually has some additional samples due to encoder and +decoder delays, and the last frame usually has some additional samples to +be able to fill the complete last frame. + +This is used to ensure that decoded data in the end has the same amount of +samples, and multiply decoded streams can be gaplessly concatenated. + +Note: If clipping of the start is done by adjusting the segment, this meta +has to be dropped from buffers as otherwise clipping could happen twice. + + + parent #GstMeta + + + + GstFormat of @start and @stop, GST_FORMAT_DEFAULT is samples + + + + Amount of audio to clip from start of buffer + + + + Amount of to clip from end of buffer + + + + + + + + + + + #GstAudioClock makes it easy for elements to implement a #GstClock, they +simply need to provide a function that returns the current clock time. + +This object is internally used to implement the clock in #GstAudioBaseSink. + + + Create a new #GstAudioClock instance. Whenever the clock time should be +calculated it will call @func with @user_data. When @func returns +#GST_CLOCK_TIME_NONE, the clock will return the last reported time. + + + a new #GstAudioClock casted to a #GstClock. + + + + + the name of the clock + + + + a function + + + + user data + + + + #GDestroyNotify for @user_data + + + + + + Adjust @time with the internal offset of the audio clock. + + + @time adjusted with the internal offset. + + + + + a #GstAudioClock + + + + a #GstClockTime + + + + + + Report the time as returned by the #GstAudioClockGetTimeFunc without applying +any offsets. + + + the time as reported by the time function of the audio clock + + + + + a #GstAudioClock + + + + + + Invalidate the clock function. Call this function when the provided +#GstAudioClockGetTimeFunc cannot be called anymore, for example, when the +user_data becomes invalid. + +After calling this function, @clock will return the last returned time for +the rest of its lifetime. + + + + + + + a #GstAudioClock + + + + + + Inform @clock that future calls to #GstAudioClockGetTimeFunc will return values +starting from @time. The clock will update an internal offset to make sure that +future calls to internal_time will return an increasing result as required by +the #GstClock object. + + + + + + + a #GstAudioClock + + + + a #GstClockTime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function will be called whenever the current clock time needs to be +calculated. If this function returns #GST_CLOCK_TIME_NONE, the last reported +time will be returned by the clock. + + + the current time or #GST_CLOCK_TIME_NONE if the previous time should +be used. + + + + + the #GstAudioClock + + + + user data + + + + + + This object is used to convert audio samples from one format to another. +The object can perform conversion of: + + * audio format with optional dithering and noise shaping + + * audio samplerate + + * audio channels and channel layout + + + Create a new #GstAudioConverter that is able to convert between @in and @out +audio formats. + +@config contains extra configuration options, see `GST_AUDIO_CONVERTER_OPT_*` +parameters for details about the options and values. + + + a #GstAudioConverter or %NULL if conversion is not possible. + + + + + extra #GstAudioConverterFlags + + + + a source #GstAudioInfo + + + + a destination #GstAudioInfo + + + + a #GstStructure with configuration options + + + + + + Convenience wrapper around gst_audio_converter_samples(), which will +perform allocation of the output buffer based on the result from +gst_audio_converter_get_out_frames(). + + + %TRUE is the conversion could be performed. + + + + + a #GstAudioConverter + + + + extra #GstAudioConverterFlags + + + + input data + + + + + + size of @in + + + + a pointer where + the output data will be written + + + + + + a pointer where the size of @out will be written + + + + + + Free a previously allocated @convert instance. + + + + + + + a #GstAudioConverter + + + + + + Get the current configuration of @convert. + + + + a #GstStructure that remains valid for as long as @convert is valid + or until gst_audio_converter_update_config() is called. + + + + + a #GstAudioConverter + + + + result input rate + + + + result output rate + + + + + + Calculate how many input frames are currently needed by @convert to produce +@out_frames of output frames. + + + the number of input frames + + + + + a #GstAudioConverter + + + + number of output frames + + + + + + Get the maximum number of input frames that the converter would +need before producing output. + + + the latency of @convert as expressed in the number of +frames. + + + + + a #GstAudioConverter + + + + + + Calculate how many output frames can be produced when @in_frames input +frames are given to @convert. + + + the number of output frames + + + + + a #GstAudioConverter + + + + number of input frames + + + + + + Returns whether the audio converter will operate in passthrough mode. +The return value would be typically input to gst_base_transform_set_passthrough() + + + %TRUE when no conversion will actually occur. + + + + + + + + + + Reset @convert to the state it was when it was first created, clearing +any history it might currently have. + + + + + + + a #GstAudioConverter + + + + + + Perform the conversion with @in_frames in @in to @out_frames in @out +using @convert. + +In case the samples are interleaved, @in and @out must point to an +array with a single element pointing to a block of interleaved samples. + +If non-interleaved samples are used, @in and @out must point to an +array with pointers to memory blocks, one for each channel. + +@in may be %NULL, in which case @in_frames of silence samples are processed +by the converter. + +This function always produces @out_frames of output and consumes @in_frames of +input. Use gst_audio_converter_get_out_frames() and +gst_audio_converter_get_in_frames() to make sure @in_frames and @out_frames +are matching and @in and @out point to enough memory. + + + %TRUE is the conversion could be performed. + + + + + a #GstAudioConverter + + + + extra #GstAudioConverterFlags + + + + input frames + + + + number of input frames + + + + output frames + + + + number of output frames + + + + + + Returns whether the audio converter can perform the conversion in-place. +The return value would be typically input to gst_base_transform_set_in_place() + + + %TRUE when the conversion can be done in place. + + + + + a #GstAudioConverter + + + + + + Set @in_rate, @out_rate and @config as extra configuration for @convert. + +@in_rate and @out_rate specify the new sample rates of input and output +formats. A value of 0 leaves the sample rate unchanged. + +@config can be %NULL, in which case, the current configuration is not +changed. + +If the parameters in @config can not be set exactly, this function returns +%FALSE and will try to update as much state as possible. The new state can +then be retrieved and refined with gst_audio_converter_get_config(). + +Look at the `GST_AUDIO_CONVERTER_OPT_*` fields to check valid configuration +option and values. + + + %TRUE when the new parameters could be set + + + + + a #GstAudioConverter + + + + input rate + + + + output rate + + + + a #GstStructure or %NULL + + + + + + + Extra flags passed to gst_audio_converter_new() and gst_audio_converter_samples(). + + no flag + + + the input sample arrays are writable and can be + used as temporary storage during conversion. + + + allow arbitrary rate updates with + gst_audio_converter_update_config(). + + + + This base class is for audio decoders turning encoded data into +raw audio samples. + +GstAudioDecoder and subclass should cooperate as follows. + +## Configuration + + * Initially, GstAudioDecoder calls @start when the decoder element + is activated, which allows subclass to perform any global setup. + Base class (context) parameters can already be set according to subclass + capabilities (or possibly upon receive more information in subsequent + @set_format). + * GstAudioDecoder calls @set_format to inform subclass of the format + of input audio data that it is about to receive. + While unlikely, it might be called more than once, if changing input + parameters require reconfiguration. + * GstAudioDecoder calls @stop at end of all processing. + +As of configuration stage, and throughout processing, GstAudioDecoder +provides various (context) parameters, e.g. describing the format of +output audio data (valid when output caps have been set) or current parsing state. +Conversely, subclass can and should configure context to inform +base class of its expectation w.r.t. buffer handling. + +## Data processing + * Base class gathers input data, and optionally allows subclass + to parse this into subsequently manageable (as defined by subclass) + chunks. Such chunks are subsequently referred to as 'frames', + though they may or may not correspond to 1 (or more) audio format frame. + * Input frame is provided to subclass' @handle_frame. + * If codec processing results in decoded data, subclass should call + @gst_audio_decoder_finish_frame to have decoded data pushed + downstream. + * Just prior to actually pushing a buffer downstream, + it is passed to @pre_push. Subclass should either use this callback + to arrange for additional downstream pushing or otherwise ensure such + custom pushing occurs after at least a method call has finished since + setting src pad caps. + * During the parsing process GstAudioDecoderClass will handle both + srcpad and sinkpad events. Sink events will be passed to subclass + if @event callback has been provided. + +## Shutdown phase + + * GstAudioDecoder class calls @stop to inform the subclass that data + parsing will be stopped. + +Subclass is responsible for providing pad template caps for +source and sink pads. The pads need to be named "sink" and "src". It also +needs to set the fixed caps on srcpad, when the format is ensured. This +is typically when base class calls subclass' @set_format function, though +it might be delayed until calling @gst_audio_decoder_finish_frame. + +In summary, above process should have subclass concentrating on +codec data processing while leaving other matters to base class, +such as most notably timestamp handling. While it may exert more control +in this area (see e.g. @pre_push), it is very much not recommended. + +In particular, base class will try to arrange for perfect output timestamps +as much as possible while tracking upstream timestamps. +To this end, if deviation between the next ideal expected perfect timestamp +and upstream exceeds #GstAudioDecoder:tolerance, then resync to upstream +occurs (which would happen always if the tolerance mechanism is disabled). + +In non-live pipelines, baseclass can also (configurably) arrange for +output buffer aggregation which may help to redue large(r) numbers of +small(er) buffers being pushed and processed downstream. Note that this +feature is only available if the buffer layout is interleaved. For planar +buffers, the decoder implementation is fully responsible for the output +buffer size. + +On the other hand, it should be noted that baseclass only provides limited +seeking support (upon explicit subclass request), as full-fledged support +should rather be left to upstream demuxer, parser or alike. This simple +approach caters for seeking and duration reporting using estimated input +bitrates. + +Things that subclass need to take care of: + + * Provide pad templates + * Set source pad caps when appropriate + * Set user-configurable properties to sane defaults for format and + implementing codec at hand, and convey some subclass capabilities and + expectations in context. + + * Accept data in @handle_frame and provide encoded results to + @gst_audio_decoder_finish_frame. If it is prepared to perform + PLC, it should also accept NULL data in @handle_frame and provide for + data for indicated duration. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiate with downstream elements to currently configured #GstAudioInfo. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioDecoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper function that allocates a buffer to hold an audio frame +for @dec's current output format. + + + allocated buffer + + + + + a #GstAudioDecoder + + + + size of the buffer + + + + + + Collects decoded data and pushes it downstream. + +@buf may be NULL in which case the indicated number of frames +are discarded and considered to have produced no output +(e.g. lead-in or setup frames). +Otherwise, source pad caps must be set when it is called with valid +data in @buf. + +Note that a frame received in #GstAudioDecoderClass.handle_frame() may be +invalidated by a call to this function. + + + a #GstFlowReturn that should be escalated to caller (of caller) + + + + + a #GstAudioDecoder + + + + decoded data + + + + number of decoded frames represented by decoded data + + + + + + Collects decoded data and pushes it downstream. This function may be called +multiple times for a given input frame. + +@buf may be NULL in which case it is assumed that the current input frame is +finished. This is equivalent to calling gst_audio_decoder_finish_subframe() +with a NULL buffer and frames=1 after having pushed out all decoded audio +subframes using this function. + +When called with valid data in @buf the source pad caps must have been set +already. + +Note that a frame received in #GstAudioDecoderClass.handle_frame() may be +invalidated by a call to this function. + + + a #GstFlowReturn that should be escalated to caller (of caller) + + + + + a #GstAudioDecoder + + + + decoded data + + + + + + Lets #GstAudioDecoder sub-classes to know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after use it. + + + + + + + a #GstAudioDecoder + + + + the #GstAllocator +used + + + + the +#GstAllocationParams of @allocator + + + + + + + + a #GstAudioInfo describing the input audio format + + + + + a #GstAudioDecoder + + + + + + + + currently configured decoder delay + + + + + a #GstAudioDecoder + + + + + + Queries decoder drain handling. + + + TRUE if drainable handling is enabled. + +MT safe. + + + + + a #GstAudioDecoder + + + + + + + + currently configured byte to time conversion setting + + + + + a #GstAudioDecoder + + + + + + Sets the variables pointed to by @min and @max to the currently configured +latency. + + + + + + + a #GstAudioDecoder + + + + a pointer to storage to hold minimum latency + + + + a pointer to storage to hold maximum latency + + + + + + + + currently configured decoder tolerated error count. + + + + + a #GstAudioDecoder + + + + + + Queries decoder's latency aggregation. + + + aggregation latency. + +MT safe. + + + + + a #GstAudioDecoder + + + + + + Queries decoder required format handling. + + + TRUE if required format handling is enabled. + +MT safe. + + + + + a #GstAudioDecoder + + + + + + Return current parsing (sync and eos) state. + + + + + + + a #GstAudioDecoder + + + + a pointer to a variable to hold the current sync state + + + + a pointer to a variable to hold the current eos state + + + + + + Queries decoder packet loss concealment handling. + + + TRUE if packet loss concealment is enabled. + +MT safe. + + + + + a #GstAudioDecoder + + + + + + + + currently configured plc handling + + + + + a #GstAudioDecoder + + + + + + Queries current audio jitter tolerance threshold. + + + decoder audio jitter tolerance threshold. + +MT safe. + + + + + a #GstAudioDecoder + + + + + + Sets the audio decoder tags and how they should be merged with any +upstream stream tags. This will override any tags previously-set +with gst_audio_decoder_merge_tags(). + +Note that this is provided for convenience, and the subclass is +not required to use this and can still do tag handling on its own. + + + + + + + a #GstAudioDecoder + + + + a #GstTagList to merge, or NULL + + + + the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE + + + + + + Negotiate with downstream elements to currently configured #GstAudioInfo. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioDecoder + + + + + + Returns caps that express @caps (or sink template caps if @caps == NULL) +restricted to rate/channels/... combinations supported by downstream +elements. + + + a #GstCaps owned by caller + + + + + a #GstAudioDecoder + + + + initial caps + + + + filter caps + + + + + + Sets a caps in allocation query which are different from the set +pad's caps. Use this function before calling +gst_audio_decoder_negotiate(). Setting to %NULL the allocation +query will use the caps from the pad. + + + + + + + a #GstAudioDecoder + + + + a #GstCaps or %NULL + + + + + + Configures decoder drain handling. If drainable, subclass might +be handed a NULL buffer to have it return any leftover decoded data. +Otherwise, it is not considered so capable and will only ever be passed +real data. + +MT safe. + + + + + + + a #GstAudioDecoder + + + + new state + + + + + + Allows baseclass to perform byte to time estimated conversion. + + + + + + + a #GstAudioDecoder + + + + whether to enable byte to time conversion + + + + + + Sets decoder latency. + + + + + + + a #GstAudioDecoder + + + + minimum latency + + + + maximum latency + + + + + + Sets numbers of tolerated decoder errors, where a tolerated one is then only +warned about, but more than tolerated will lead to fatal error. You can set +-1 for never returning fatal errors. Default is set to +GST_AUDIO_DECODER_MAX_ERRORS. + + + + + + + a #GstAudioDecoder + + + + max tolerated errors + + + + + + Sets decoder minimum aggregation latency. + +MT safe. + + + + + + + a #GstAudioDecoder + + + + new minimum latency + + + + + + Configures decoder format needs. If enabled, subclass needs to be +negotiated with format caps before it can process any data. It will then +never be handed any data before it has been configured. +Otherwise, it might be handed data without having been configured and +is then expected being able to do so either by default +or based on the input data. + +MT safe. + + + + + + + a #GstAudioDecoder + + + + new state + + + + + + Configure output caps on the srcpad of @dec. Similar to +gst_audio_decoder_set_output_format(), but allows subclasses to specify +output caps that can't be expressed via #GstAudioInfo e.g. caps that have +caps features. + + + %TRUE on success. + + + + + a #GstAudioDecoder + + + + (fixed) #GstCaps + + + + + + Configure output info on the srcpad of @dec. + + + %TRUE on success. + + + + + a #GstAudioDecoder + + + + #GstAudioInfo + + + + + + Enable or disable decoder packet loss concealment, provided subclass +and codec are capable and allow handling plc. + +MT safe. + + + + + + + a #GstAudioDecoder + + + + new state + + + + + + Indicates whether or not subclass handles packet loss concealment (plc). + + + + + + + a #GstAudioDecoder + + + + new plc state + + + + + + Configures decoder audio jitter tolerance threshold. + +MT safe. + + + + + + + a #GstAudioDecoder + + + + new tolerance + + + + + + Lets #GstAudioDecoder sub-classes decide if they want the sink pad +to use the default pad query handler to reply to accept-caps queries. + +By setting this to true it is possible to further customize the default +handler with %GST_PAD_SET_ACCEPT_INTERSECT and +%GST_PAD_SET_ACCEPT_TEMPLATE + + + + + + + a #GstAudioDecoder + + + + if the default pad accept-caps query handling should be used + + + + + + Maximum number of tolerated consecutive decode errors. See +gst_audio_decoder_set_max_errors() for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum @handle_frame (and likely @set_format) needs to be +overridden. + + + The parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioDecoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set of available dithering methods. + + No dithering + + + Rectangular dithering + + + Triangular dithering (default) + + + High frequency triangular dithering + + + + Extra buffer metadata describing audio downmixing matrix. This metadata is +attached to audio buffers and contains a matrix to downmix the buffer number +of channels to @channels. + +@matrix is an two-dimensional array of @to_channels times @from_channels +coefficients, i.e. the i-th output channels is constructed by multiplicating +the input channels with the coefficients in @matrix[i] and taking the sum +of the results. + + + parent #GstMeta + + + + the channel positions of the source + + + + the channel positions of the destination + + + + the number of channels of the source + + + + the number of channels of the destination + + + + the matrix coefficients. + + + + + + + + + + + This base class is for audio encoders turning raw audio samples into +encoded audio data. + +GstAudioEncoder and subclass should cooperate as follows. + +## Configuration + + * Initially, GstAudioEncoder calls @start when the encoder element + is activated, which allows subclass to perform any global setup. + + * GstAudioEncoder calls @set_format to inform subclass of the format + of input audio data that it is about to receive. Subclass should + setup for encoding and configure various base class parameters + appropriately, notably those directing desired input data handling. + While unlikely, it might be called more than once, if changing input + parameters require reconfiguration. + + * GstAudioEncoder calls @stop at end of all processing. + +As of configuration stage, and throughout processing, GstAudioEncoder +maintains various parameters that provide required context, +e.g. describing the format of input audio data. +Conversely, subclass can and should configure these context parameters +to inform base class of its expectation w.r.t. buffer handling. + +## Data processing + + * Base class gathers input sample data (as directed by the context's + frame_samples and frame_max) and provides this to subclass' @handle_frame. + * If codec processing results in encoded data, subclass should call + gst_audio_encoder_finish_frame() to have encoded data pushed + downstream. Alternatively, it might also call + gst_audio_encoder_finish_frame() (with a NULL buffer and some number of + dropped samples) to indicate dropped (non-encoded) samples. + * Just prior to actually pushing a buffer downstream, + it is passed to @pre_push. + * During the parsing process GstAudioEncoderClass will handle both + srcpad and sinkpad events. Sink events will be passed to subclass + if @event callback has been provided. + +## Shutdown phase + + * GstAudioEncoder class calls @stop to inform the subclass that data + parsing will be stopped. + +Subclass is responsible for providing pad template caps for +source and sink pads. The pads need to be named "sink" and "src". It also +needs to set the fixed caps on srcpad, when the format is ensured. This +is typically when base class calls subclass' @set_format function, though +it might be delayed until calling @gst_audio_encoder_finish_frame. + +In summary, above process should have subclass concentrating on +codec data processing while leaving other matters to base class, +such as most notably timestamp handling. While it may exert more control +in this area (see e.g. @pre_push), it is very much not recommended. + +In particular, base class will either favor tracking upstream timestamps +(at the possible expense of jitter) or aim to arrange for a perfect stream of +output timestamps, depending on #GstAudioEncoder:perfect-timestamp. +However, in the latter case, the input may not be so perfect or ideal, which +is handled as follows. An input timestamp is compared with the expected +timestamp as dictated by input sample stream and if the deviation is less +than #GstAudioEncoder:tolerance, the deviation is discarded. +Otherwise, it is considered a discontuinity and subsequent output timestamp +is resynced to the new position after performing configured discontinuity +processing. In the non-perfect-timestamp case, an upstream variation +exceeding tolerance only leads to marking DISCONT on subsequent outgoing +(while timestamps are adjusted to upstream regardless of variation). +While DISCONT is also marked in the perfect-timestamp case, this one +optionally (see #GstAudioEncoder:hard-resync) +performs some additional steps, such as clipping of (early) input samples +or draining all currently remaining input data, depending on the direction +of the discontuinity. + +If perfect timestamps are arranged, it is also possible to request baseclass +(usually set by subclass) to provide additional buffer metadata (in OFFSET +and OFFSET_END) fields according to granule defined semantics currently +needed by oggmux. Specifically, OFFSET is set to granulepos (= sample count +including buffer) and OFFSET_END to corresponding timestamp (as determined +by same sample count and sample rate). + +Things that subclass need to take care of: + + * Provide pad templates + * Set source pad caps when appropriate + * Inform base class of buffer processing needs using context's + frame_samples and frame_bytes. + * Set user-configurable properties to sane defaults for format and + implementing codec at hand, e.g. those controlling timestamp behaviour + and discontinuity processing. + * Accept data in @handle_frame and provide encoded results to + gst_audio_encoder_finish_frame(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiate with downstream elements to currently configured #GstCaps. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioEncoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper function that allocates a buffer to hold an encoded audio frame +for @enc's current output format. + + + allocated buffer + + + + + a #GstAudioEncoder + + + + size of the buffer + + + + + + Collects encoded data and pushes encoded data downstream. +Source pad caps must be set when this is called. + +If @samples < 0, then best estimate is all samples provided to encoder +(subclass) so far. @buf may be NULL, in which case next number of @samples +are considered discarded, e.g. as a result of discontinuous transmission, +and a discontinuity is marked. + +Note that samples received in #GstAudioEncoderClass.handle_frame() +may be invalidated by a call to this function. + + + a #GstFlowReturn that should be escalated to caller (of caller) + + + + + a #GstAudioEncoder + + + + encoded data + + + + number of samples (per channel) represented by encoded data + + + + + + Lets #GstAudioEncoder sub-classes to know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after use it. + + + + + + + a #GstAudioEncoder + + + + the #GstAllocator +used + + + + the +#GstAllocationParams of @allocator + + + + + + + + a #GstAudioInfo describing the input audio format + + + + + a #GstAudioEncoder + + + + + + Queries encoder drain handling. + + + TRUE if drainable handling is enabled. + +MT safe. + + + + + a #GstAudioEncoder + + + + + + + + currently configured maximum handled frames + + + + + a #GstAudioEncoder + + + + + + + + currently maximum requested samples per frame + + + + + a #GstAudioEncoder + + + + + + + + currently minimum requested samples per frame + + + + + a #GstAudioEncoder + + + + + + Queries encoder hard minimum handling. + + + TRUE if hard minimum handling is enabled. + +MT safe. + + + + + a #GstAudioEncoder + + + + + + + + + + + + + + + + + Sets the variables pointed to by @min and @max to the currently configured +latency. + + + + + + + a #GstAudioEncoder + + + + a pointer to storage to hold minimum latency + + + + a pointer to storage to hold maximum latency + + + + + + + + currently configured encoder lookahead + + + + + a #GstAudioEncoder + + + + + + Queries if the encoder will handle granule marking. + + + TRUE if granule marking is enabled. + +MT safe. + + + + + a #GstAudioEncoder + + + + + + Queries encoder perfect timestamp behaviour. + + + TRUE if perfect timestamp setting enabled. + +MT safe. + + + + + a #GstAudioEncoder + + + + + + Queries current audio jitter tolerance threshold. + + + encoder audio jitter tolerance threshold. + +MT safe. + + + + + a #GstAudioEncoder + + + + + + Sets the audio encoder tags and how they should be merged with any +upstream stream tags. This will override any tags previously-set +with gst_audio_encoder_merge_tags(). + +Note that this is provided for convenience, and the subclass is +not required to use this and can still do tag handling on its own. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + a #GstTagList to merge, or NULL to unset + previously-set tags + + + + the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE + + + + + + Negotiate with downstream elements to currently configured #GstCaps. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioEncoder + + + + + + Returns caps that express @caps (or sink template caps if @caps == NULL) +restricted to channel/rate combinations supported by downstream elements +(e.g. muxers). + + + a #GstCaps owned by caller + + + + + a #GstAudioEncoder + + + + initial caps + + + + filter caps + + + + + + Sets a caps in allocation query which are different from the set +pad's caps. Use this function before calling +gst_audio_encoder_negotiate(). Setting to %NULL the allocation +query will use the caps from the pad. + + + + + + + a #GstAudioEncoder + + + + a #GstCaps or %NULL + + + + + + Configures encoder drain handling. If drainable, subclass might +be handed a NULL buffer to have it return any leftover encoded data. +Otherwise, it is not considered so capable and will only ever be passed +real data. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + new state + + + + + + Sets max number of frames accepted at once (assumed minimally 1). +Requires @frame_samples_min and @frame_samples_max to be the equal. + +Note: This value will be reset to 0 every time before +#GstAudioEncoderClass.set_format() is called. + + + + + + + a #GstAudioEncoder + + + + number of frames + + + + + + Sets number of samples (per channel) subclass needs to be handed, +at most or will be handed all available if 0. + +If an exact number of samples is required, gst_audio_encoder_set_frame_samples_min() +must be called with the same number. + +Note: This value will be reset to 0 every time before +#GstAudioEncoderClass.set_format() is called. + + + + + + + a #GstAudioEncoder + + + + number of samples per frame + + + + + + Sets number of samples (per channel) subclass needs to be handed, +at least or will be handed all available if 0. + +If an exact number of samples is required, gst_audio_encoder_set_frame_samples_max() +must be called with the same number. + +Note: This value will be reset to 0 every time before +#GstAudioEncoderClass.set_format() is called. + + + + + + + a #GstAudioEncoder + + + + number of samples per frame + + + + + + Configures encoder hard minimum handling. If enabled, subclass +will never be handed less samples than it configured, which otherwise +might occur near end-of-data handling. Instead, the leftover samples +will simply be discarded. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + new state + + + + + + + + + + + + + + + + + + + + Set the codec headers to be sent downstream whenever requested. + + + + + + + a #GstAudioEncoder + + + + a list of + #GstBuffer containing the codec header + + + + + + + + Sets encoder latency. + + + + + + + a #GstAudioEncoder + + + + minimum latency + + + + maximum latency + + + + + + Sets encoder lookahead (in units of input rate samples) + +Note: This value will be reset to 0 every time before +#GstAudioEncoderClass.set_format() is called. + + + + + + + a #GstAudioEncoder + + + + lookahead + + + + + + Enable or disable encoder granule handling. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + new state + + + + + + Configure output caps on the srcpad of @enc. + + + %TRUE on success. + + + + + a #GstAudioEncoder + + + + #GstCaps + + + + + + Enable or disable encoder perfect output timestamp preference. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + new state + + + + + + Configures encoder audio jitter tolerance threshold. + +MT safe. + + + + + + + a #GstAudioEncoder + + + + new tolerance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum @set_format and @handle_frame needs to be overridden. + + + The parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAudioEncoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioFilter is a #GstBaseTransform<!-- -->-derived base class for simple audio +filters, ie. those that output the same format that they get as input. + +#GstAudioFilter will parse the input format for you (with error checking) +before calling your setup function. Also, elements deriving from +#GstAudioFilter may use gst_audio_filter_class_add_pad_templates() from +their class_init function to easily configure the set of caps/formats that +the element is able to handle. + +Derived classes should override the #GstAudioFilterClass.setup() and +#GstBaseTransformClass.transform_ip() and/or +#GstBaseTransformClass.transform() +virtual functions in their class_init function. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In addition to the @setup virtual function, you should also override the +GstBaseTransform::transform and/or GstBaseTransform::transform_ip virtual +function. + + + parent class + + + + + + + + + + + + + + + + + + + + + + + + + Convenience function to add pad templates to this element class, with +@allowed_caps as the caps that can be handled. + +This function is usually used from within a GObject class_init function. + + + + + + + an #GstAudioFilterClass + + + + what formats the filter can handle, as #GstCaps + + + + + + + Extra audio flags + + no valid flag + + + the position array explicitly + contains unpositioned channels. + + + + Enum value describing the most common audio formats. + + unknown or unset audio format + + + encoded audio format + + + 8 bits in 8 bits, signed + + + 8 bits in 8 bits, unsigned + + + 16 bits in 16 bits, signed, little endian + + + 16 bits in 16 bits, signed, big endian + + + 16 bits in 16 bits, unsigned, little endian + + + 16 bits in 16 bits, unsigned, big endian + + + 24 bits in 32 bits, signed, little endian + + + 24 bits in 32 bits, signed, big endian + + + 24 bits in 32 bits, unsigned, little endian + + + 24 bits in 32 bits, unsigned, big endian + + + 32 bits in 32 bits, signed, little endian + + + 32 bits in 32 bits, signed, big endian + + + 32 bits in 32 bits, unsigned, little endian + + + 32 bits in 32 bits, unsigned, big endian + + + 24 bits in 24 bits, signed, little endian + + + 24 bits in 24 bits, signed, big endian + + + 24 bits in 24 bits, unsigned, little endian + + + 24 bits in 24 bits, unsigned, big endian + + + 20 bits in 24 bits, signed, little endian + + + 20 bits in 24 bits, signed, big endian + + + 20 bits in 24 bits, unsigned, little endian + + + 20 bits in 24 bits, unsigned, big endian + + + 18 bits in 24 bits, signed, little endian + + + 18 bits in 24 bits, signed, big endian + + + 18 bits in 24 bits, unsigned, little endian + + + 18 bits in 24 bits, unsigned, big endian + + + 32-bit floating point samples, little endian + + + 32-bit floating point samples, big endian + + + 64-bit floating point samples, little endian + + + 64-bit floating point samples, big endian + + + 16 bits in 16 bits, signed, native endianness + + + 16 bits in 16 bits, unsigned, native endianness + + + 24 bits in 32 bits, signed, native endianness + + + 24 bits in 32 bits, unsigned, native endianness + + + 32 bits in 32 bits, signed, native endianness + + + 32 bits in 32 bits, unsigned, native endianness + + + 24 bits in 24 bits, signed, native endianness + + + 24 bits in 24 bits, unsigned, native endianness + + + 20 bits in 24 bits, signed, native endianness + + + 20 bits in 24 bits, unsigned, native endianness + + + 18 bits in 24 bits, signed, native endianness + + + 18 bits in 24 bits, unsigned, native endianness + + + 32-bit floating point samples, native endianness + + + 64-bit floating point samples, native endianness + + + Construct a #GstAudioFormat with given parameters. + + + a #GstAudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format +exists with the given parameters. + + + + + signed or unsigned format + + + + G_LITTLE_ENDIAN or G_BIG_ENDIAN + + + + amount of bits used per sample + + + + amount of used bits in @width + + + + + + Fill @length bytes in @dest with silence samples for @info. + + + + + + + a #GstAudioFormatInfo + + + + a destination + to fill + + + + + + the length to fill + + + + + + Convert the @format string to its #GstAudioFormat. + + + the #GstAudioFormat for @format or GST_AUDIO_FORMAT_UNKNOWN when the +string is not a known format. + + + + + a format string + + + + + + Get the #GstAudioFormatInfo for @format + + + The #GstAudioFormatInfo for @format. + + + + + a #GstAudioFormat + + + + + + + + + + + + + + + + + + The different audio flags that a format info can have. + + integer samples + + + float samples + + + signed samples + + + complex layout + + + the format can be used in +#GstAudioFormatUnpack and #GstAudioFormatPack functions + + + + Information for an audio format. + + + #GstAudioFormat + + + + string representation of the format + + + + user readable description of the format + + + + #GstAudioFormatFlags + + + + the endianness + + + + amount of bits used for one sample + + + + amount of valid bits in @width + + + + @width/8 bytes with 1 silent sample + + + + + + the format of the unpacked samples + + + + function to unpack samples + + + + function to pack samples + + + + + + + + + + Packs @length samples from @src to the data array in format @info. +The samples from source have each channel interleaved +and will be packed into @data. + + + + + + + a #GstAudioFormatInfo + + + + #GstAudioPackFlags + + + + a source array + + + + + + pointer to the destination + data + + + + + + the amount of samples to pack. + + + + + + Unpacks @length samples from the given data of format @info. +The samples will be unpacked into @dest which each channel +interleaved. @dest should at least be big enough to hold @length * +channels * size(unpack_format) bytes. + + + + + + + a #GstAudioFormatInfo + + + + #GstAudioPackFlags + + + + a destination array + + + + + + pointer to the audio data + + + + + + the amount of samples to unpack. + + + + + + Information describing audio properties. This information can be filled +in from GstCaps with gst_audio_info_from_caps(). + +Use the provided macros to access the info in this structure. + + + the format info of the audio + + + + additional audio flags + + + + audio layout + + + + the audio sample rate + + + + the number of channels + + + + the number of bytes for one frame, this is the size of one + sample * @channels + + + + the positions for each channel + + + + + + + + + + + Allocate a new #GstAudioInfo that is also initialized with +gst_audio_info_init(). + + + a new #GstAudioInfo. free with gst_audio_info_free(). + + + + + Converts among various #GstFormat types. This function handles +GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For +raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This +function can be used to handle pad queries of the type GST_QUERY_CONVERT. + + + TRUE if the conversion was successful. + + + + + a #GstAudioInfo + + + + #GstFormat of the @src_val + + + + value to convert + + + + #GstFormat of the @dest_val + + + + pointer to destination value + + + + + + Copy a GstAudioInfo structure. + + + a new #GstAudioInfo. free with gst_audio_info_free. + + + + + a #GstAudioInfo + + + + + + Free a GstAudioInfo structure previously allocated with gst_audio_info_new() +or gst_audio_info_copy(). + + + + + + + a #GstAudioInfo + + + + + + Parse @caps and update @info. + + + TRUE if @caps could be parsed + + + + + a #GstAudioInfo + + + + a #GstCaps + + + + + + Initialize @info with default values. + + + + + + + a #GstAudioInfo + + + + + + Compares two #GstAudioInfo and returns whether they are equal or not + + + %TRUE if @info and @other are equal, else %FALSE. + + + + + a #GstAudioInfo + + + + a #GstAudioInfo + + + + + + Set the default info for the audio info of @format and @rate and @channels. + +Note: This initializes @info first, no values are preserved. + + + + + + + a #GstAudioInfo + + + + the format + + + + the samplerate + + + + the number of channels + + + + the channel positions + + + + + + + + Convert the values of @info into a #GstCaps. + + + the new #GstCaps containing the + info of @info. + + + + + a #GstAudioInfo + + + + + + + Layout of the audio samples for the different channels. + + interleaved audio + + + non-interleaved audio + + + + #GstAudioDownmixMeta defines an audio downmix matrix to be send along with +audio buffers. These functions in this module help to create and attach the +meta as well as extracting it. + + + parent #GstMeta + + + + the audio properties of the buffer + + + + the number of valid samples in the buffer + + + + the offsets (in bytes) where each channel plane starts in the + buffer or %NULL if the buffer has interleaved layout; if not %NULL, this + is guaranteed to be an array of @info.channels elements + + + + + + + + + + + + + + + + + + + + + Set of available noise shaping methods + + No noise shaping (default) + + + Error feedback + + + Simple 2-pole noise shaping + + + Medium 5-pole noise shaping + + + High 8-pole noise shaping + + + + The different flags that can be used when packing and unpacking. + + No flag + + + When the source has a smaller depth + than the target format, set the least significant bits of the target + to 0. This is likely slightly faster but less accurate. When this flag + is not specified, the most significant bits of the source are duplicated + in the least significant bits of the destination. + + + + + + Free a #GstAudioQuantize. + + + + + + + a #GstAudioQuantize + + + + + + Reset @quant to the state is was when created, clearing any +history it might have. + + + + + + + a #GstAudioQuantize + + + + + + Perform quantization on @samples in @in and write the result to @out. + +In case the samples are interleaved, @in and @out must point to an +array with a single element pointing to a block of interleaved samples. + +If non-interleaved samples are used, @in and @out must point to an +array with pointers to memory blocks, one for each channel. + +@in and @out may point to the same memory location, in which case samples will be +modified in-place. + + + + + + + a #GstAudioQuantize + + + + input samples + + + + output samples + + + + number of samples + + + + + + Create a new quantizer object with the given parameters. + +Output samples will be quantized to a multiple of @quantizer. Better +performance is achieved when @quantizer is a power of 2. + +Dithering and noise-shaping can be performed during quantization with +the @dither and @ns parameters. + + + a new #GstAudioQuantize. Free with gst_audio_quantize_free(). + + + + + a #GstAudioDitherMethod + + + + a #GstAudioNoiseShapingMethod + + + + #GstAudioQuantizeFlags + + + + the #GstAudioFormat of the samples + + + + the amount of channels in the samples + + + + the quantizer to use + + + + + + + Extra flags that can be passed to gst_audio_quantize_new() + + no flags + + + samples are non-interleaved + + + + #GstAudioResampler is a structure which holds the information +required to perform various kinds of resampling filtering. + + + Free a previously allocated #GstAudioResampler @resampler. + + + + + + + a #GstAudioResampler + + + + + + Get the number of input frames that would currently be needed +to produce @out_frames from @resampler. + + + The number of input frames needed for producing +@out_frames of data from @resampler. + + + + + a #GstAudioResampler + + + + number of input frames + + + + + + Get the maximum number of input samples that the resampler would +need before producing output. + + + the latency of @resampler as expressed in the number of +frames. + + + + + a #GstAudioResampler + + + + + + Get the number of output frames that would be currently available when +@in_frames are given to @resampler. + + + The number of frames that would be available after giving +@in_frames as input to @resampler. + + + + + a #GstAudioResampler + + + + number of input frames + + + + + + Perform resampling on @in_frames frames in @in and write @out_frames to @out. + +In case the samples are interleaved, @in and @out must point to an +array with a single element pointing to a block of interleaved samples. + +If non-interleaved samples are used, @in and @out must point to an +array with pointers to memory blocks, one for each channel. + +@in may be %NULL, in which case @in_frames of silence samples are pushed +into the resampler. + +This function always produces @out_frames of output and consumes @in_frames of +input. Use gst_audio_resampler_get_out_frames() and +gst_audio_resampler_get_in_frames() to make sure @in_frames and @out_frames +are matching and @in and @out point to enough memory. + + + + + + + a #GstAudioResampler + + + + input samples + + + + number of input frames + + + + output samples + + + + number of output frames + + + + + + Reset @resampler to the state it was when it was first created, discarding +all sample history. + + + + + + + a #GstAudioResampler + + + + + + Update the resampler parameters for @resampler. This function should +not be called concurrently with any other function on @resampler. + +When @in_rate or @out_rate is 0, its value is unchanged. + +When @options is %NULL, the previously configured options are reused. + + + %TRUE if the new parameters could be set + + + + + a #GstAudioResampler + + + + new input rate + + + + new output rate + + + + new options or %NULL + + + + + + Make a new resampler. + + + The new #GstAudioResampler, or +%NULL on failure. + + + + + a #GstAudioResamplerMethod + + + + #GstAudioResamplerFlags + + + + the #GstAudioFormat + + + + the number of channels + + + + input rate + + + + output rate + + + + extra options + + + + + + Set the parameters for resampling from @in_rate to @out_rate using @method +for @quality in @options. + + + + + + + a #GstAudioResamplerMethod + + + + the quality + + + + the input rate + + + + the output rate + + + + a #GstStructure + + + + + + + The different filter interpolation methods. + + no interpolation + + + linear interpolation of the + filter coefficients. + + + cubic interpolation of the + filter coefficients. + + + + Select for the filter tables should be set up. + + Use interpolated filter tables. This + uses less memory but more CPU and is slightly less accurate but it allows for more + efficient variable rate resampling with gst_audio_resampler_update(). + + + Use full filter table. This uses more memory + but less CPU. + + + Automatically choose between interpolated + and full filter tables. + + + + Different resampler flags. + + no flags + + + input samples are non-interleaved. + an array of blocks of samples, one for each channel, should be passed to the + resample function. + + + output samples are non-interleaved. + an array of blocks of samples, one for each channel, should be passed to the + resample function. + + + optimize for dynamic updates of the sample + rates with gst_audio_resampler_update(). This will select an interpolating filter + when #GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO is configured. + + + + Different subsampling and upsampling methods + + Duplicates the samples when + upsampling and drops when downsampling + + + Uses linear interpolation to reconstruct + missing samples and averaging to downsample + + + Uses cubic interpolation + + + Uses Blackman-Nuttall windowed sinc interpolation + + + Uses Kaiser windowed sinc interpolation + + + + This object is the base class for audio ringbuffers used by the base +audio source and sink classes. + +The ringbuffer abstracts a circular buffer of data. One reader and +one writer can operate on the data from different threads in a lockfree +manner. The base class is sufficiently flexible to be used as an +abstraction for DMA based ringbuffers as well as a pure software +implementations. + + + Print debug info about the buffer sized in @spec to the debug log. + + + + + + + the spec to debug + + + + + + Print debug info about the parsed caps in @spec to the debug log. + + + + + + + the spec to debug + + + + + + Parse @caps into @spec. + + + TRUE if the caps could be parsed. + + + + + a spec + + + + a #GstCaps + + + + + + Allocate the resources for the ringbuffer. This function fills +in the data pointer of the ring buffer with a valid #GstBuffer +to which samples can be written. + + + TRUE if the device could be acquired, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to acquire + + + + the specs of the buffer + + + + + + Activate @buf to start or stop pulling data. + +MT safe. + + + TRUE if the device could be activated in the requested mode, +FALSE on error. + + + + + the #GstAudioRingBuffer to activate + + + + the new mode + + + + + + Clear all samples from the ringbuffer. + +MT safe. + + + + + + + the #GstAudioRingBuffer to clear + + + + + + Close the audio device associated with the ring buffer. The ring buffer +should already have been released via gst_audio_ring_buffer_release(). + + + TRUE if the device could be closed, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + Commit @in_samples samples pointed to by @data to the ringbuffer @buf. + +@in_samples and @out_samples define the rate conversion to perform on the +samples in @data. For negative rates, @out_samples must be negative and +@in_samples positive. + +When @out_samples is positive, the first sample will be written at position @sample +in the ringbuffer. When @out_samples is negative, the last sample will be written to +@sample in reverse order. + +@out_samples does not need to be a multiple of the segment size of the ringbuffer +although it is recommended for optimal performance. + +@accum will hold a temporary accumulator used in rate conversion and should be +set to 0 when this function is first called. In case the commit operation is +interrupted, one can resume the processing by passing the previously returned +@accum value back to this function. + +MT safe. + + + The number of samples written to the ringbuffer or -1 on error. The +number of samples written can be less than @out_samples when @buf was interrupted +with a flush or stop. + + + + + the #GstAudioRingBuffer to commit + + + + the sample position of the data + + + + the data to commit + + + + + + the number of samples in the data to commit + + + + the number of samples to write to the ringbuffer + + + + accumulator for rate conversion. + + + + + + Get the number of samples queued in the audio device. This is +usually less than the segment size but can be bigger when the +implementation uses another internal buffer between the audio +device. + +For playback ringbuffers this is the amount of samples transferred from the +ringbuffer to the device but still not played. + +For capture ringbuffers this is the amount of samples in the device that are +not yet transferred to the ringbuffer. + + + The number of samples queued in the audio device. + +MT safe. + + + + + the #GstAudioRingBuffer to query + + + + + + Open the audio device associated with the ring buffer. Does not perform any +setup on the device. You must open the device before acquiring the ring +buffer. + + + TRUE if the device could be opened, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + Pause processing samples from the ringbuffer. + + + TRUE if the device could be paused, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to pause + + + + + + Free the resources of the ringbuffer. + + + TRUE if the device could be released, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to release + + + + + + + + + + + + + + + + + Start processing samples from the ringbuffer. + + + TRUE if the device could be started, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to start + + + + + + Stop processing samples from the ringbuffer. + + + TRUE if the device could be stopped, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to stop + + + + + + Allocate the resources for the ringbuffer. This function fills +in the data pointer of the ring buffer with a valid #GstBuffer +to which samples can be written. + + + TRUE if the device could be acquired, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to acquire + + + + the specs of the buffer + + + + + + Activate @buf to start or stop pulling data. + +MT safe. + + + TRUE if the device could be activated in the requested mode, +FALSE on error. + + + + + the #GstAudioRingBuffer to activate + + + + the new mode + + + + + + Subclasses should call this function to notify the fact that +@advance segments are now processed by the device. + +MT safe. + + + + + + + the #GstAudioRingBuffer to advance + + + + the number of segments written + + + + + + Clear the given segment of the buffer with silence samples. +This function is used by subclasses. + +MT safe. + + + + + + + the #GstAudioRingBuffer to clear + + + + the segment to clear + + + + + + Clear all samples from the ringbuffer. + +MT safe. + + + + + + + the #GstAudioRingBuffer to clear + + + + + + Close the audio device associated with the ring buffer. The ring buffer +should already have been released via gst_audio_ring_buffer_release(). + + + TRUE if the device could be closed, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + Commit @in_samples samples pointed to by @data to the ringbuffer @buf. + +@in_samples and @out_samples define the rate conversion to perform on the +samples in @data. For negative rates, @out_samples must be negative and +@in_samples positive. + +When @out_samples is positive, the first sample will be written at position @sample +in the ringbuffer. When @out_samples is negative, the last sample will be written to +@sample in reverse order. + +@out_samples does not need to be a multiple of the segment size of the ringbuffer +although it is recommended for optimal performance. + +@accum will hold a temporary accumulator used in rate conversion and should be +set to 0 when this function is first called. In case the commit operation is +interrupted, one can resume the processing by passing the previously returned +@accum value back to this function. + +MT safe. + + + The number of samples written to the ringbuffer or -1 on error. The +number of samples written can be less than @out_samples when @buf was interrupted +with a flush or stop. + + + + + the #GstAudioRingBuffer to commit + + + + the sample position of the data + + + + the data to commit + + + + + + the number of samples in the data to commit + + + + the number of samples to write to the ringbuffer + + + + accumulator for rate conversion. + + + + + + Convert @src_val in @src_fmt to the equivalent value in @dest_fmt. The result +will be put in @dest_val. + + + TRUE if the conversion succeeded. + + + + + the #GstAudioRingBuffer + + + + the source format + + + + the source value + + + + the destination format + + + + a location to store the converted value + + + + + + Get the number of samples queued in the audio device. This is +usually less than the segment size but can be bigger when the +implementation uses another internal buffer between the audio +device. + +For playback ringbuffers this is the amount of samples transferred from the +ringbuffer to the device but still not played. + +For capture ringbuffers this is the amount of samples in the device that are +not yet transferred to the ringbuffer. + + + The number of samples queued in the audio device. + +MT safe. + + + + + the #GstAudioRingBuffer to query + + + + + + Checks the status of the device associated with the ring buffer. + + + TRUE if the device was open, FALSE if it was closed. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + Check if the ringbuffer is acquired and ready to use. + + + TRUE if the ringbuffer is acquired, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to check + + + + + + Check if @buf is activated. + +MT safe. + + + TRUE if the device is active. + + + + + the #GstAudioRingBuffer + + + + + + Check if @buf is flushing. + +MT safe. + + + TRUE if the device is flushing. + + + + + the #GstAudioRingBuffer + + + + + + Tell the ringbuffer that it is allowed to start playback when +the ringbuffer is filled with samples. + +MT safe. + + + + + + + the #GstAudioRingBuffer + + + + the new value + + + + + + Open the audio device associated with the ring buffer. Does not perform any +setup on the device. You must open the device before acquiring the ring +buffer. + + + TRUE if the device could be opened, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + Pause processing samples from the ringbuffer. + + + TRUE if the device could be paused, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to pause + + + + + + Returns a pointer to memory where the data from segment @segment +can be found. This function is mostly used by subclasses. + + + FALSE if the buffer is not started. + +MT safe. + + + + + the #GstAudioRingBuffer to read from + + + + the segment to read + + + + + the pointer to the memory where samples can be read + + + + + + the number of bytes to read + + + + + + Read @len samples from the ringbuffer into the memory pointed +to by @data. +The first sample should be read from position @sample in +the ringbuffer. + +@len should not be a multiple of the segment size of the ringbuffer +although it is recommended. + +@timestamp will return the timestamp associated with the data returned. + + + The number of samples read from the ringbuffer or -1 on +error. + +MT safe. + + + + + the #GstAudioRingBuffer to read from + + + + the sample position of the data + + + + where the data should be read + + + + + + the number of samples in data to read + + + + where the timestamp is returned + + + + + + Free the resources of the ringbuffer. + + + TRUE if the device could be released, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to release + + + + + + Get the number of samples that were processed by the ringbuffer +since it was last started. This does not include the number of samples not +yet processed (see gst_audio_ring_buffer_delay()). + + + The number of samples processed by the ringbuffer. + +MT safe. + + + + + the #GstAudioRingBuffer to query + + + + + + Sets the given callback function on the buffer. This function +will be called every time a segment has been written to a device. + +MT safe. + + + + + + + the #GstAudioRingBuffer to set the callback on + + + + the callback to set + + + + user data passed to the callback + + + + + + Sets the given callback function on the buffer. This function +will be called every time a segment has been written to a device. + +MT safe. + + + + + + + the #GstAudioRingBuffer to set the callback on + + + + the callback to set + + + + user data passed to the callback + + + + function to be called when @user_data is no longer needed + + + + + + Tell the ringbuffer about the device's channel positions. This must +be called in when the ringbuffer is acquired. + + + + + + + the #GstAudioRingBuffer + + + + the device channel positions + + + + + + + + Set the ringbuffer to flushing mode or normal mode. + +MT safe. + + + + + + + the #GstAudioRingBuffer to flush + + + + the new mode + + + + + + Make sure that the next sample written to the device is +accounted for as being the @sample sample written to the +device. This value will be used in reporting the current +sample position of the ringbuffer. + +This function will also clear the buffer with silence. + +MT safe. + + + + + + + the #GstAudioRingBuffer to use + + + + the sample number to set + + + + + + + + + + + + + + + + + + + + + + + Start processing samples from the ringbuffer. + + + TRUE if the device could be started, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to start + + + + + + Stop processing samples from the ringbuffer. + + + TRUE if the device could be stopped, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to stop + + + + + + + + + used to signal start/stop/pause/resume actions + + + + boolean indicating that the ringbuffer is open + + + + boolean indicating that the ringbuffer is acquired + + + + data in the ringbuffer + + + + size of data in the ringbuffer + + + + + + + format and layout of the ringbuffer data + + + + number of samples in one segment + + + + pointer to memory holding one segment of silence samples + + + + state of the buffer + + + + readpointer in the ringbuffer + + + + segment corresponding to segment 0 (unused) + + + + is a reader or writer waiting for a free segment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function is set with gst_audio_ring_buffer_set_callback() and is +called to fill the memory at @data with @len bytes of samples. + + + + + + + a #GstAudioRingBuffer + + + + target to fill + + + + + + amount to fill + + + + user data + + + + + + The vmethods that subclasses can override to implement the ringbuffer. + + + parent class + + + + + + + TRUE if the device could be opened, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + + + + + TRUE if the device could be acquired, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to acquire + + + + the specs of the buffer + + + + + + + + + + TRUE if the device could be released, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to release + + + + + + + + + + TRUE if the device could be closed, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer + + + + + + + + + + TRUE if the device could be started, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to start + + + + + + + + + + TRUE if the device could be paused, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to pause + + + + + + + + + + + + + + + + + + + + + + + TRUE if the device could be stopped, FALSE on error. + +MT safe. + + + + + the #GstAudioRingBuffer to stop + + + + + + + + + + The number of samples queued in the audio device. + +MT safe. + + + + + the #GstAudioRingBuffer to query + + + + + + + + + + TRUE if the device could be activated in the requested mode, +FALSE on error. + + + + + the #GstAudioRingBuffer to activate + + + + the new mode + + + + + + + + + + The number of samples written to the ringbuffer or -1 on error. The +number of samples written can be less than @out_samples when @buf was interrupted +with a flush or stop. + + + + + the #GstAudioRingBuffer to commit + + + + the sample position of the data + + + + the data to commit + + + + + + the number of samples in the data to commit + + + + the number of samples to write to the ringbuffer + + + + accumulator for rate conversion. + + + + + + + + + + + + + + the #GstAudioRingBuffer to clear + + + + + + + + + + + + + The format of the samples in the ringbuffer. + + samples in linear or float + + + samples in mulaw + + + samples in alaw + + + samples in ima adpcm + + + samples in mpeg audio (but not AAC) format + + + samples in gsm format + + + samples in IEC958 frames (e.g. AC3) + + + samples in AC3 format + + + samples in EAC3 format + + + samples in DTS format + + + samples in MPEG-2 AAC ADTS format + + + samples in MPEG-4 AAC ADTS format + + + samples in MPEG-2 AAC raw format (Since: 1.12) + + + samples in MPEG-4 AAC raw format (Since: 1.12) + + + samples in FLAC format (Since: 1.12) + + + + The structure containing the format specification of the ringbuffer. + + + The caps that generated the Spec. + + + + the sample type + + + + the #GstAudioInfo + + + + the latency in microseconds + + + + the total buffer size in microseconds + + + + the size of one segment in bytes + + + + the total number of segments + + + + number of segments queued in the lower level device, + defaults to segtotal + + + + + + + + + + The state of the ringbuffer. + + The ringbuffer is stopped + + + The ringbuffer is paused + + + The ringbuffer is started + + + The ringbuffer has encountered an + error after it has been started, e.g. because the device was + disconnected (Since: 1.2) + + + + This is the most simple base class for audio sinks that only requires +subclasses to implement a set of simple functions: + +* `open()` :Open the device. + +* `prepare()` :Configure the device with the specified format. + +* `write()` :Write samples to the device. + +* `reset()` :Unblock writes and flush the device. + +* `delay()` :Get the number of samples written but not yet played +by the device. + +* `unprepare()` :Undo operations done by prepare. + +* `close()` :Close the device. + +All scheduling of samples and timestamps is done in this base class +together with #GstAudioBaseSink using a default implementation of a +#GstAudioRingBuffer that uses threads. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the parent class structure. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + class extension structure. Since: 1.18 + + + + + + + + + + + + + + + + + + + + + This is the most simple base class for audio sources that only requires +subclasses to implement a set of simple functions: + +* `open()` :Open the device. +* `prepare()` :Configure the device with the specified format. +* `read()` :Read samples from the device. +* `reset()` :Unblock reads and flush the device. +* `delay()` :Get the number of samples in the device but not yet read. +* `unprepare()` :Undo operations done by prepare. +* `close()` :Close the device. + +All scheduling of samples and timestamps is done in this base class +together with #GstAudioBaseSrc using a default implementation of a +#GstAudioRingBuffer that uses threads. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioSrc class. Override the vmethod to implement +functionality. + + + the parent class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstAudioStreamAlign provides a helper object that helps tracking audio +stream alignment and discontinuities, and detects discontinuities if +possible. + +See gst_audio_stream_align_new() for a description of its parameters and +gst_audio_stream_align_process() for the details of the processing. + + + Allocate a new #GstAudioStreamAlign with the given configuration. All +processing happens according to sample rate @rate, until +gst_audio_stream_align_set_rate() is called with a new @rate. +A negative rate can be used for reverse playback. + +@alignment_threshold gives the tolerance in nanoseconds after which a +timestamp difference is considered a discontinuity. Once detected, +@discont_wait nanoseconds have to pass without going below the threshold +again until the output buffer is marked as a discontinuity. These can later +be re-configured with gst_audio_stream_align_set_alignment_threshold() and +gst_audio_stream_align_set_discont_wait(). + + + a new #GstAudioStreamAlign. free with gst_audio_stream_align_free(). + + + + + a sample rate + + + + a alignment threshold in nanoseconds + + + + discont wait in nanoseconds + + + + + + Copy a GstAudioStreamAlign structure. + + + a new #GstAudioStreamAlign. free with gst_audio_stream_align_free. + + + + + a #GstAudioStreamAlign + + + + + + Free a GstAudioStreamAlign structure previously allocated with gst_audio_stream_align_new() +or gst_audio_stream_align_copy(). + + + + + + + a #GstAudioStreamAlign + + + + + + Gets the currently configured alignment threshold. + + + The currently configured alignment threshold + + + + + a #GstAudioStreamAlign + + + + + + Gets the currently configured discont wait. + + + The currently configured discont wait + + + + + a #GstAudioStreamAlign + + + + + + Gets the currently configured sample rate. + + + The currently configured sample rate + + + + + a #GstAudioStreamAlign + + + + + + Returns the number of samples that were processed since the last +discontinuity was detected. + + + The number of samples processed since the last discontinuity. + + + + + a #GstAudioStreamAlign + + + + + + Timestamp that was passed when a discontinuity was detected, i.e. the first +timestamp after the discontinuity. + + + The last timestamp at when a discontinuity was detected + + + + + a #GstAudioStreamAlign + + + + + + Marks the next buffer as discontinuous and resets timestamp tracking. + + + + + + + a #GstAudioStreamAlign + + + + + + Processes data with @timestamp and @n_samples, and returns the output +timestamp, duration and sample position together with a boolean to signal +whether a discontinuity was detected or not. All non-discontinuous data +will have perfect timestamps and durations. + +A discontinuity is detected once the difference between the actual +timestamp and the timestamp calculated from the sample count since the last +discontinuity differs by more than the alignment threshold for a duration +longer than discont wait. + +Note: In reverse playback, every buffer is considered discontinuous in the +context of buffer flags because the last sample of the previous buffer is +discontinuous with the first sample of the current one. However for this +function they are only considered discontinuous in reverse playback if the +first sample of the previous buffer is discontinuous with the last sample +of the current one. + + + %TRUE if a discontinuity was detected, %FALSE otherwise. + + + + + a #GstAudioStreamAlign + + + + if this data is considered to be discontinuous + + + + a #GstClockTime of the start of the data + + + + number of samples to process + + + + output timestamp of the data + + + + output duration of the data + + + + output sample position of the start of the data + + + + + + Sets @alignment_treshold as new alignment threshold for the following processing. + + + + + + + a #GstAudioStreamAlign + + + + a new alignment threshold + + + + + + Sets @alignment_treshold as new discont wait for the following processing. + + + + + + + a #GstAudioStreamAlign + + + + a new discont wait + + + + + + Sets @rate as new sample rate for the following processing. If the sample +rate differs this implicitly marks the next data as discontinuous. + + + + + + + a #GstAudioStreamAlign + + + + a new sample rate + + + + + + + Calculate frames from @clocktime and sample @rate. + + + + clock time + + + sampling rate + + + + + Calculate clocktime from sample @frames and @rate. + + + + sample frames + + + sampling rate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This metadata stays relevant as long as channels are unchanged. + + + + + This metadata stays relevant as long as sample rate is unchanged. + + + + + This metadata is relevant for audio streams. + + + + + + + + + + + + This interface is implemented by elements that provide a stream volume. Examples for +such elements are #volume and #playbin. + +Applications can use this interface to get or set the current stream volume. For this +the "volume" #GObject property can be used or the helper functions gst_stream_volume_set_volume() +and gst_stream_volume_get_volume(). This volume is always a linear factor, i.e. 0.0 is muted +1.0 is 100%. For showing the volume in a GUI it might make sense to convert it to +a different format by using gst_stream_volume_convert_volume(). Volume sliders should usually +use a cubic volume. + +Separate from the volume the stream can also be muted by the "mute" #GObject property or +gst_stream_volume_set_mute() and gst_stream_volume_get_mute(). + +Elements that provide some kind of stream volume should implement the "volume" and +"mute" #GObject properties and handle setting and getting of them properly. +The volume property is defined to be a linear volume factor. + + + + + the converted volume + + + + + #GstStreamVolumeFormat to convert from + + + + #GstStreamVolumeFormat to convert to + + + + Volume in @from format that should be converted + + + + + + + + Returns %TRUE if the stream is muted + + + + + #GstStreamVolume that should be used + + + + + + + + The current stream volume as linear factor + + + + + #GstStreamVolume that should be used + + + + #GstStreamVolumeFormat which should be returned + + + + + + + + + + + + #GstStreamVolume that should be used + + + + Mute state that should be set + + + + + + + + + + + + #GstStreamVolume that should be used + + + + #GstStreamVolumeFormat of @val + + + + Linear volume factor that should be set + + + + + + + + + + + + + Different representations of a stream volume. gst_stream_volume_convert_volume() +allows to convert between the different representations. + +Formulas to convert from a linear to a cubic or dB volume are +cbrt(val) and 20 * log10 (val). + + + Linear scale factor, 1.0 = 100% + + + Cubic volume scale + + + Logarithmic volume scale (dB, amplitude not power) + + + + + + + + + + Clip the buffer to the given %GstSegment. + +After calling this function the caller does not own a reference to +@buffer anymore. + + + %NULL if the buffer is completely outside the configured segment, +otherwise the clipped buffer is returned. + +If the buffer has no timestamp, it is assumed to be inside the segment and +is not clipped + + + + + The buffer to clip. + + + + Segment in %GST_FORMAT_TIME or %GST_FORMAT_DEFAULT to which + the buffer should be clipped. + + + + sample rate. + + + + size of one audio frame in bytes. This is the size of one sample * +number of channels. + + + + + + Reorders @buffer from the channel positions @from to the channel +positions @to. @from and @to must contain the same number of +positions and the same positions, only in a different order. +@buffer must be writable. + + + %TRUE if the reordering was possible. + + + + + The buffer to reorder. + + + + The %GstAudioFormat of the buffer. + + + + The number of channels. + + + + The channel positions in the buffer. + + + + + + The channel positions to convert to. + + + + + + + + Truncate the buffer to finally have @samples number of samples, removing +the necessary amount of samples from the end and @trim number of samples +from the beginning. + +After calling this function the caller does not own a reference to +@buffer anymore. + + + the truncated buffer or %NULL if the arguments + were invalid + + + + + The buffer to truncate. + + + + size of one audio frame in bytes. This is the size of one sample * +number of channels. + + + + the number of samples to remove from the beginning of the buffer + + + + the final number of samples that should exist in this buffer or -1 +to use all the remaining samples if you are only removing samples from the +beginning. + + + + + + Get the fallback channel-mask for the given number of channels. + +This function returns a reasonable fallback channel-mask and should be +called as a last resort when the specific channel map is unknown. + + + a fallback channel-mask for @channels or 0 when there is no +mask and mono. + + + + + the number of channels + + + + + + Create a new channel mixer object for the given parameters. + + + a new #GstAudioChannelMixer object, or %NULL if @format isn't supported. + Free with gst_audio_channel_mixer_free() after usage. + + + + + #GstAudioChannelMixerFlags + + + + + + + number of input channels + + + + positions of input channels + + + + number of output channels + + + + positions of output channels + + + + + + Create a new channel mixer object for the given parameters. + + + a new #GstAudioChannelMixer object, or %NULL if @format isn't supported, + @matrix is invalid, or @matrix is %NULL and @in_channels != @out_channels. + Free with gst_audio_channel_mixer_free() after usage. + + + + + #GstAudioChannelMixerFlags + + + + + + + number of input channels + + + + number of output channels + + + + channel conversion matrix, m[@in_channels][@out_channels]. + If identity matrix, passthrough applies. If %NULL, a (potentially truncated) + identity matrix is generated. + + + + + + Convert the @channels present in @channel_mask to a @position array +(which should have at least @channels entries ensured by caller). +If @channel_mask is set to 0, it is considered as 'not present' for purpose +of conversion. +A partially valid @channel_mask with less bits set than the number +of channels is considered valid. + + + %TRUE if channel and channel mask are valid and could be converted + + + + + The number of channels + + + + The input channel_mask + + + + The + %GstAudioChannelPosition<!-- -->s + + + + + + + + Convert the @position array of @channels channels to a bitmask. + +If @force_order is %TRUE it additionally checks if the channels are +in the order required by GStreamer. + + + %TRUE if the channel positions are valid and could be converted. + + + + + The %GstAudioChannelPositions + + + + + + The number of channels. + + + + Only consider the GStreamer channel order. + + + + the output channel mask + + + + + + Converts @position to a human-readable string representation for +debugging purposes. + + + a newly allocated string representing +@position + + + + + The %GstAudioChannelPositions + to convert. + + + + + + The number of channels. + + + + + + Reorders the channel positions in @position from any order to +the GStreamer channel order. + + + %TRUE if the channel positions are valid and reordering +was successful. + + + + + The channel positions to + reorder to. + + + + + + The number of channels. + + + + + + Checks if @position contains valid channel positions for +@channels channels. If @force_order is %TRUE it additionally +checks if the channels are in the order required by GStreamer. + + + %TRUE if the channel positions are valid. + + + + + The %GstAudioChannelPositions + to check. + + + + + + The number of channels. + + + + Only consider the GStreamer channel order. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Construct a #GstAudioFormat with given parameters. + + + a #GstAudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format +exists with the given parameters. + + + + + signed or unsigned format + + + + G_LITTLE_ENDIAN or G_BIG_ENDIAN + + + + amount of bits used per sample + + + + amount of used bits in @width + + + + + + Fill @length bytes in @dest with silence samples for @info. + + + + + + + a #GstAudioFormatInfo + + + + a destination + to fill + + + + + + the length to fill + + + + + + Convert the @format string to its #GstAudioFormat. + + + the #GstAudioFormat for @format or GST_AUDIO_FORMAT_UNKNOWN when the +string is not a known format. + + + + + a format string + + + + + + Get the #GstAudioFormatInfo for @format + + + The #GstAudioFormatInfo for @format. + + + + + a #GstAudioFormat + + + + + + + + + + + + + + + + + + + + + + + Return all the raw audio formats supported by GStreamer. + + + an array of #GstAudioFormat + + + + + + + the number of elements in the returned array + + + + + + Returns a reorder map for @from to @to that can be used in +custom channel reordering code, e.g. to convert from or to the +GStreamer channel order. @from and @to must contain the same +number of positions and the same positions, only in a +different order. + +The resulting @reorder_map can be used for reordering by assigning +channel i of the input to channel reorder_map[i] of the output. + + + %TRUE if the channel positions are valid and reordering +is possible. + + + + + The number of channels. + + + + The channel positions to reorder from. + + + + + + The channel positions to reorder to. + + + + + + Pointer to the reorder map. + + + + + + + + Calculated the size of the buffer expected by gst_audio_iec61937_payload() for +payloading type from @spec. + + + the size or 0 if the given @type is not supported or cannot be +payloaded. + + + + + the ringbufer spec + + + + + + Payloads @src in the form specified by IEC 61937 for the type from @spec and +stores the result in @dst. @src must contain exactly one frame of data and +the frame is not checked for errors. + + + transfer-full: %TRUE if the payloading was successful, %FALSE +otherwise. + + + + + a buffer containing the data to payload + + + + + + size of @src in bytes + + + + the destination buffer to store the + payloaded contents in. Should not overlap with @src + + + + + + size of @dst in bytes + + + + the ringbufer spec for @src + + + + the expected byte order of the payloaded data + + + + + + Return a generic raw audio caps for formats defined in @formats. +If @formats is %NULL returns a caps for all the supported raw audio formats, +see gst_audio_formats_raw(). + + + an audio @GstCaps + + + + + an array of raw #GstAudioFormat, or %NULL + + + + + + the size of @formats + + + + the layout of audio samples + + + + + + + + + + + + + + + + + + Create a new quantizer object with the given parameters. + +Output samples will be quantized to a multiple of @quantizer. Better +performance is achieved when @quantizer is a power of 2. + +Dithering and noise-shaping can be performed during quantization with +the @dither and @ns parameters. + + + a new #GstAudioQuantize. Free with gst_audio_quantize_free(). + + + + + a #GstAudioDitherMethod + + + + a #GstAudioNoiseShapingMethod + + + + #GstAudioQuantizeFlags + + + + the #GstAudioFormat of the samples + + + + the amount of channels in the samples + + + + the quantizer to use + + + + + + Reorders @data from the channel positions @from to the channel +positions @to. @from and @to must contain the same number of +positions and the same positions, only in a different order. + +Note: this function assumes the audio data is in interleaved layout + + + %TRUE if the reordering was possible. + + + + + The pointer to + the memory. + + + + + + The size of the memory. + + + + The %GstAudioFormat of the buffer. + + + + The number of channels. + + + + The channel positions in the buffer. + + + + + + The channel positions to convert to. + + + + + + + + Make a new resampler. + + + The new #GstAudioResampler, or +%NULL on failure. + + + + + a #GstAudioResamplerMethod + + + + #GstAudioResamplerFlags + + + + the #GstAudioFormat + + + + the number of channels + + + + input rate + + + + output rate + + + + extra options + + + + + + Set the parameters for resampling from @in_rate to @out_rate using @method +for @quality in @options. + + + + + + + a #GstAudioResamplerMethod + + + + the quality + + + + the input rate + + + + the output rate + + + + a #GstStructure + + + + + + Attaches #GstAudioClippingMeta metadata to @buffer with the given parameters. + + + the #GstAudioClippingMeta on @buffer. + + + + + a #GstBuffer + + + + GstFormat of @start and @stop, GST_FORMAT_DEFAULT is samples + + + + Amount of audio to clip from start of buffer + + + + Amount of to clip from end of buffer + + + + + + Attaches #GstAudioDownmixMeta metadata to @buffer with the given parameters. + +@matrix is an two-dimensional array of @to_channels times @from_channels +coefficients, i.e. the i-th output channels is constructed by multiplicating +the input channels with the coefficients in @matrix[i] and taking the sum +of the results. + + + the #GstAudioDownmixMeta on @buffer. + + + + + a #GstBuffer + + + + the channel positions + of the source + + + + + + The number of channels of the source + + + + the channel positions of + the destination + + + + + + The number of channels of the destination + + + + The matrix coefficients. + + + + + + Allocates and attaches a #GstAudioMeta on @buffer, which must be writable +for that purpose. The fields of the #GstAudioMeta are directly populated +from the arguments of this function. + +When @info->layout is %GST_AUDIO_LAYOUT_NON_INTERLEAVED and @offsets is +%NULL, the offsets are calculated with a formula that assumes the planes are +tightly packed and in sequence: +offsets[channel] = channel * @samples * sample_stride + +It is not allowed for channels to overlap in memory, +i.e. for each i in [0, channels), the range +[@offsets[i], @offsets[i] + @samples * sample_stride) must not overlap +with any other such range. This function will assert if the parameters +specified cause this restriction to be violated. + +It is, obviously, also not allowed to specify parameters that would cause +out-of-bounds memory access on @buffer. This is also checked, which means +that you must add enough memory on the @buffer before adding this meta. + + + the #GstAudioMeta that was attached on the @buffer + + + + + a #GstBuffer + + + + the audio properties of the buffer + + + + the number of valid samples in the buffer + + + + the offsets (in bytes) where each channel plane starts + in the buffer or %NULL to calculate it (see below); must be %NULL also + when @info->layout is %GST_AUDIO_LAYOUT_INTERLEAVED + + + + + + + + + + + + + + + + + + + + Find the #GstAudioDownmixMeta on @buffer for the given destination +channel positions. + + + the #GstAudioDownmixMeta on @buffer. + + + + + a #GstBuffer + + + + the channel positions of + the destination + + + + + + The number of channels of the destination + + + + + + + + + + + + + This library contains some helper functions for audio elements. + + + This library contains some helper functions for multichannel audio. + + + This module contains some helper functions for encapsulating various +audio formats in IEC 61937 headers and padding. + + + + + the converted volume + + + + + #GstStreamVolumeFormat to convert from + + + + #GstStreamVolumeFormat to convert to + + + + Volume in @from format that should be converted + + + + + + diff --git a/girs/GstBase-1.0.gir b/girs/GstBase-1.0.gir new file mode 100644 index 0000000000..0aad79a0b4 --- /dev/null +++ b/girs/GstBase-1.0.gir @@ -0,0 +1,18611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience macro to access the source pad of #GstAggregator + + + + a #GstAggregator + + + + + This class is for elements that receive buffers in an undesired size. +While for example raw video contains one image per buffer, the same is not +true for a lot of other formats, especially those that come directly from +a file. So if you have undefined buffer sizes and require a specific size, +this object is for you. + +An adapter is created with gst_adapter_new(). It can be freed again with +g_object_unref(). + +The theory of operation is like this: All buffers received are put +into the adapter using gst_adapter_push() and the data is then read back +in chunks of the desired size using gst_adapter_map()/gst_adapter_unmap() +and/or gst_adapter_copy(). After the data has been processed, it is freed +using gst_adapter_unmap(). + +Other methods such as gst_adapter_take() and gst_adapter_take_buffer() +combine gst_adapter_map() and gst_adapter_unmap() in one method and are +potentially more convenient for some use cases. + +For example, a sink pad's chain function that needs to pass data to a library +in 512-byte chunks could be implemented like this: +|[<!-- language="C" --> +static GstFlowReturn +sink_pad_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer) +{ + MyElement *this; + GstAdapter *adapter; + GstFlowReturn ret = GST_FLOW_OK; + + this = MY_ELEMENT (parent); + + adapter = this->adapter; + + // put buffer into adapter + gst_adapter_push (adapter, buffer); + + // while we can read out 512 bytes, process them + while (gst_adapter_available (adapter) >= 512 && ret == GST_FLOW_OK) { + const guint8 *data = gst_adapter_map (adapter, 512); + // use flowreturn as an error value + ret = my_library_foo (data); + gst_adapter_unmap (adapter); + gst_adapter_flush (adapter, 512); + } + return ret; +} +]| + +For another example, a simple element inside GStreamer that uses #GstAdapter +is the libvisual element. + +An element using #GstAdapter in its sink pad chain function should ensure that +when the FLUSH_STOP event is received, that any queued data is cleared using +gst_adapter_clear(). Data should also be cleared or processed on EOS and +when changing state from %GST_STATE_PAUSED to %GST_STATE_READY. + +Also check the GST_BUFFER_FLAG_DISCONT flag on the buffer. Some elements might +need to clear the adapter after a discontinuity. + +The adapter will keep track of the timestamps of the buffers +that were pushed. The last seen timestamp before the current position +can be queried with gst_adapter_prev_pts(). This function can +optionally return the number of bytes between the start of the buffer that +carried the timestamp and the current adapter position. The distance is +useful when dealing with, for example, raw audio samples because it allows +you to calculate the timestamp of the current adapter position by using the +last seen timestamp and the amount of bytes since. Additionally, the +gst_adapter_prev_pts_at_offset() can be used to determine the last +seen timestamp at a particular offset in the adapter. + +The adapter will also keep track of the offset of the buffers +(#GST_BUFFER_OFFSET) that were pushed. The last seen offset before the +current position can be queried with gst_adapter_prev_offset(). This function +can optionally return the number of bytes between the start of the buffer +that carried the offset and the current adapter position. + +Additionally the adapter also keeps track of the PTS, DTS and buffer offset +at the last discontinuity, which can be retrieved with +gst_adapter_pts_at_discont(), gst_adapter_dts_at_discont() and +gst_adapter_offset_at_discont(). The number of bytes that were consumed +since then can be queried with gst_adapter_distance_from_discont(). + +A last thing to note is that while #GstAdapter is pretty optimized, +merging buffers still might be an operation that requires a `malloc()` and +`memcpy()` operation, and these operations are not the fastest. Because of +this, some functions like gst_adapter_available_fast() are provided to help +speed up such cases should you want to. To avoid repeated memory allocations, +gst_adapter_copy() can be used to copy data into a (statically allocated) +user provided buffer. + +#GstAdapter is not MT safe. All operations on an adapter must be serialized by +the caller. This is not normally a problem, however, as the normal use case +of #GstAdapter is inside one pad's chain function, in which case access is +serialized via the pad's STREAM_LOCK. + +Note that gst_adapter_push() takes ownership of the buffer passed. Use +gst_buffer_ref() before pushing it into the adapter if you still want to +access the buffer later. The adapter will never modify the data in the +buffer pushed in it. + + + Creates a new #GstAdapter. Free with g_object_unref(). + + + a new #GstAdapter + + + + + Gets the maximum amount of bytes available, that is it returns the maximum +value that can be supplied to gst_adapter_map() without that function +returning %NULL. + + + number of bytes available in @adapter + + + + + a #GstAdapter + + + + + + Gets the maximum number of bytes that are immediately available without +requiring any expensive operations (like copying the data into a +temporary buffer). + + + number of bytes that are available in @adapter without expensive +operations + + + + + a #GstAdapter + + + + + + Removes all buffers from @adapter. + + + + + + + a #GstAdapter + + + + + + Copies @size bytes of data starting at @offset out of the buffers +contained in #GstAdapter into an array @dest provided by the caller. + +The array @dest should be large enough to contain @size bytes. +The user should check that the adapter has (@offset + @size) bytes +available before calling this function. + + + + + + + a #GstAdapter + + + + + the memory to copy into + + + + + + the bytes offset in the adapter to start from + + + + the number of bytes to copy + + + + + + Similar to gst_adapter_copy, but more suitable for language bindings. @size +bytes of data starting at @offset will be copied out of the buffers contained +in @adapter and into a new #GBytes structure which is returned. Depending on +the value of the @size argument an empty #GBytes structure may be returned. + + + A new #GBytes structure containing the copied data. + + + + + a #GstAdapter + + + + the bytes offset in the adapter to start from + + + + the number of bytes to copy + + + + + + Get the distance in bytes since the last buffer with the +%GST_BUFFER_FLAG_DISCONT flag. + +The distance will be reset to 0 for all buffers with +%GST_BUFFER_FLAG_DISCONT on them, and then calculated for all other +following buffers based on their size. + + + The offset. Can be %GST_BUFFER_OFFSET_NONE. + + + + + a #GstAdapter + + + + + + Get the DTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT +flag, or GST_CLOCK_TIME_NONE. + + + The DTS at the last discont or GST_CLOCK_TIME_NONE. + + + + + a #GstAdapter + + + + + + Flushes the first @flush bytes in the @adapter. The caller must ensure that +at least this many bytes are available. + +See also: gst_adapter_map(), gst_adapter_unmap() + + + + + + + a #GstAdapter + + + + the number of bytes to flush + + + + + + Returns a #GstBuffer containing the first @nbytes of the @adapter, but +does not flush them from the adapter. See gst_adapter_take_buffer() +for details. + +Caller owns a reference to the returned buffer. gst_buffer_unref() after +usage. + +Free-function: gst_buffer_unref + + + a #GstBuffer containing the first + @nbytes of the adapter, or %NULL if @nbytes bytes are not available. + gst_buffer_unref() when no longer needed. + + + + + a #GstAdapter + + + + the number of bytes to get + + + + + + Returns a #GstBuffer containing the first @nbytes of the @adapter, but +does not flush them from the adapter. See gst_adapter_take_buffer_fast() +for details. + +Caller owns a reference to the returned buffer. gst_buffer_unref() after +usage. + +Free-function: gst_buffer_unref + + + a #GstBuffer containing the first + @nbytes of the adapter, or %NULL if @nbytes bytes are not available. + gst_buffer_unref() when no longer needed. + + + + + a #GstAdapter + + + + the number of bytes to get + + + + + + Returns a #GstBufferList of buffers containing the first @nbytes bytes of +the @adapter but does not flush them from the adapter. See +gst_adapter_take_buffer_list() for details. + +Caller owns the returned list. Call gst_buffer_list_unref() to free +the list after usage. + + + a #GstBufferList of buffers containing + the first @nbytes of the adapter, or %NULL if @nbytes bytes are not + available + + + + + a #GstAdapter + + + + the number of bytes to get + + + + + + Returns a #GList of buffers containing the first @nbytes bytes of the +@adapter, but does not flush them from the adapter. See +gst_adapter_take_list() for details. + +Caller owns returned list and contained buffers. gst_buffer_unref() each +buffer in the list before freeing the list after usage. + + + a #GList of + buffers containing the first @nbytes of the adapter, or %NULL if @nbytes + bytes are not available + + + + + + + a #GstAdapter + + + + the number of bytes to get + + + + + + Gets the first @size bytes stored in the @adapter. The returned pointer is +valid until the next function is called on the adapter. + +Note that setting the returned pointer as the data of a #GstBuffer is +incorrect for general-purpose plugins. The reason is that if a downstream +element stores the buffer so that it has access to it outside of the bounds +of its chain function, the buffer will have an invalid data pointer after +your element flushes the bytes. In that case you should use +gst_adapter_take(), which returns a freshly-allocated buffer that you can set +as #GstBuffer memory or the potentially more performant +gst_adapter_take_buffer(). + +Returns %NULL if @size bytes are not available. + + + + a pointer to the first @size bytes of data, or %NULL + + + + + + + a #GstAdapter + + + + the number of bytes to map/peek + + + + + + Scan for pattern @pattern with applied mask @mask in the adapter data, +starting from offset @offset. + +The bytes in @pattern and @mask are interpreted left-to-right, regardless +of endianness. All four bytes of the pattern must be present in the +adapter for it to match, even if the first or last bytes are masked out. + +It is an error to call this function without making sure that there is +enough data (offset+size bytes) in the adapter. + +This function calls gst_adapter_masked_scan_uint32_peek() passing %NULL +for value. + + + offset of the first match, or -1 if no match was found. + +Example: +|[ +// Assume the adapter contains 0x00 0x01 0x02 ... 0xfe 0xff + +gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 0, 256); +// -> returns 0 +gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 1, 255); +// -> returns -1 +gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x01020304, 1, 255); +// -> returns 1 +gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0001, 0, 256); +// -> returns -1 +gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0203, 0, 256); +// -> returns 0 +gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 256); +// -> returns 2 +gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 4); +// -> returns -1 +]| + + + + + a #GstAdapter + + + + mask to apply to data before matching against @pattern + + + + pattern to match (after mask is applied) + + + + offset into the adapter data from which to start scanning, returns + the last scanned position. + + + + number of bytes to scan from offset + + + + + + Scan for pattern @pattern with applied mask @mask in the adapter data, +starting from offset @offset. If a match is found, the value that matched +is returned through @value, otherwise @value is left untouched. + +The bytes in @pattern and @mask are interpreted left-to-right, regardless +of endianness. All four bytes of the pattern must be present in the +adapter for it to match, even if the first or last bytes are masked out. + +It is an error to call this function without making sure that there is +enough data (offset+size bytes) in the adapter. + + + offset of the first match, or -1 if no match was found. + + + + + a #GstAdapter + + + + mask to apply to data before matching against @pattern + + + + pattern to match (after mask is applied) + + + + offset into the adapter data from which to start scanning, returns + the last scanned position. + + + + number of bytes to scan from offset + + + + pointer to uint32 to return matching data + + + + + + Get the offset that was on the last buffer with the GST_BUFFER_FLAG_DISCONT +flag, or GST_BUFFER_OFFSET_NONE. + + + The offset at the last discont or GST_BUFFER_OFFSET_NONE. + + + + + a #GstAdapter + + + + + + Get the dts that was before the current byte in the adapter. When +@distance is given, the amount of bytes between the dts and the current +position is returned. + +The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when +the adapter is first created or when it is cleared. This also means that before +the first byte with a dts is removed from the adapter, the dts +and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. + + + The previously seen dts. + + + + + a #GstAdapter + + + + pointer to location for distance, or %NULL + + + + + + Get the dts that was before the byte at offset @offset in the adapter. When +@distance is given, the amount of bytes between the dts and the current +position is returned. + +The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when +the adapter is first created or when it is cleared. This also means that before +the first byte with a dts is removed from the adapter, the dts +and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. + + + The previously seen dts at given offset. + + + + + a #GstAdapter + + + + the offset in the adapter at which to get timestamp + + + + pointer to location for distance, or %NULL + + + + + + Get the offset that was before the current byte in the adapter. When +@distance is given, the amount of bytes between the offset and the current +position is returned. + +The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 +when the adapter is first created or when it is cleared. This also means that +before the first byte with an offset is removed from the adapter, the offset +and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively. + + + The previous seen offset. + + + + + a #GstAdapter + + + + pointer to a location for distance, or %NULL + + + + + + Get the pts that was before the current byte in the adapter. When +@distance is given, the amount of bytes between the pts and the current +position is returned. + +The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when +the adapter is first created or when it is cleared. This also means that before +the first byte with a pts is removed from the adapter, the pts +and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. + + + The previously seen pts. + + + + + a #GstAdapter + + + + pointer to location for distance, or %NULL + + + + + + Get the pts that was before the byte at offset @offset in the adapter. When +@distance is given, the amount of bytes between the pts and the current +position is returned. + +The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when +the adapter is first created or when it is cleared. This also means that before +the first byte with a pts is removed from the adapter, the pts +and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. + + + The previously seen pts at given offset. + + + + + a #GstAdapter + + + + the offset in the adapter at which to get timestamp + + + + pointer to location for distance, or %NULL + + + + + + Get the PTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT +flag, or GST_CLOCK_TIME_NONE. + + + The PTS at the last discont or GST_CLOCK_TIME_NONE. + + + + + a #GstAdapter + + + + + + Adds the data from @buf to the data stored inside @adapter and takes +ownership of the buffer. + + + + + + + a #GstAdapter + + + + a #GstBuffer to add to queue in the adapter + + + + + + Returns a freshly allocated buffer containing the first @nbytes bytes of the +@adapter. The returned bytes will be flushed from the adapter. + +Caller owns returned value. g_free after usage. + +Free-function: g_free + + + + oven-fresh hot data, or %NULL if @nbytes bytes are not available + + + + + + + a #GstAdapter + + + + the number of bytes to take + + + + + + Returns a #GstBuffer containing the first @nbytes bytes of the +@adapter. The returned bytes will be flushed from the adapter. +This function is potentially more performant than +gst_adapter_take() since it can reuse the memory in pushed buffers +by subbuffering or merging. This function will always return a +buffer with a single memory region. + +Note that no assumptions should be made as to whether certain buffer +flags such as the DISCONT flag are set on the returned buffer, or not. +The caller needs to explicitly set or unset flags that should be set or +unset. + +Since 1.6 this will also copy over all GstMeta of the input buffers except +for meta with the %GST_META_FLAG_POOLED flag or with the "memory" tag. + +Caller owns a reference to the returned buffer. gst_buffer_unref() after +usage. + +Free-function: gst_buffer_unref + + + a #GstBuffer containing the first + @nbytes of the adapter, or %NULL if @nbytes bytes are not available. + gst_buffer_unref() when no longer needed. + + + + + a #GstAdapter + + + + the number of bytes to take + + + + + + Returns a #GstBuffer containing the first @nbytes of the @adapter. +The returned bytes will be flushed from the adapter. This function +is potentially more performant than gst_adapter_take_buffer() since +it can reuse the memory in pushed buffers by subbuffering or +merging. Unlike gst_adapter_take_buffer(), the returned buffer may +be composed of multiple non-contiguous #GstMemory objects, no +copies are made. + +Note that no assumptions should be made as to whether certain buffer +flags such as the DISCONT flag are set on the returned buffer, or not. +The caller needs to explicitly set or unset flags that should be set or +unset. + +This will also copy over all GstMeta of the input buffers except +for meta with the %GST_META_FLAG_POOLED flag or with the "memory" tag. + +This function can return buffer up to the return value of +gst_adapter_available() without making copies if possible. + +Caller owns a reference to the returned buffer. gst_buffer_unref() after +usage. + +Free-function: gst_buffer_unref + + + a #GstBuffer containing the first + @nbytes of the adapter, or %NULL if @nbytes bytes are not available. + gst_buffer_unref() when no longer needed. + + + + + a #GstAdapter + + + + the number of bytes to take + + + + + + Returns a #GstBufferList of buffers containing the first @nbytes bytes of +the @adapter. The returned bytes will be flushed from the adapter. +When the caller can deal with individual buffers, this function is more +performant because no memory should be copied. + +Caller owns the returned list. Call gst_buffer_list_unref() to free +the list after usage. + + + a #GstBufferList of buffers containing + the first @nbytes of the adapter, or %NULL if @nbytes bytes are not + available + + + + + a #GstAdapter + + + + the number of bytes to take + + + + + + Returns a #GList of buffers containing the first @nbytes bytes of the +@adapter. The returned bytes will be flushed from the adapter. +When the caller can deal with individual buffers, this function is more +performant because no memory should be copied. + +Caller owns returned list and contained buffers. gst_buffer_unref() each +buffer in the list before freeing the list after usage. + + + a #GList of + buffers containing the first @nbytes of the adapter, or %NULL if @nbytes + bytes are not available + + + + + + + a #GstAdapter + + + + the number of bytes to take + + + + + + Releases the memory obtained with the last gst_adapter_map(). + + + + + + + a #GstAdapter + + + + + + + + + + Manages a set of pads with the purpose of aggregating their buffers. +Control is given to the subclass when all pads have data. + + * Base class for mixers and muxers. Subclasses should at least implement + the #GstAggregatorClass.aggregate() virtual method. + + * Installs a #GstPadChainFunction, a #GstPadEventFullFunction and a + #GstPadQueryFunction to queue all serialized data packets per sink pad. + Subclasses should not overwrite those, but instead implement + #GstAggregatorClass.sink_event() and #GstAggregatorClass.sink_query() as + needed. + + * When data is queued on all pads, the aggregate vmethod is called. + + * One can peek at the data on any given GstAggregatorPad with the + gst_aggregator_pad_peek_buffer() method, and remove it from the pad + with the gst_aggregator_pad_pop_buffer () method. When a buffer + has been taken with pop_buffer (), a new buffer can be queued + on that pad. + + * When gst_aggregator_pad_peek_buffer() or gst_aggregator_pad_has_buffer() + are called, a reference is taken to the returned buffer, which stays + valid until either: + + - gst_aggregator_pad_pop_buffer() is called, in which case the caller + is guaranteed that the buffer they receive is the same as the peeked + buffer. + - gst_aggregator_pad_drop_buffer() is called, in which case the caller + is guaranteed that the dropped buffer is the one that was peeked. + - the subclass implementation of #GstAggregatorClass.aggregate returns. + + Subsequent calls to gst_aggregator_pad_peek_buffer() or + gst_aggregator_pad_has_buffer() return / check the same buffer that was + returned / checked, until one of the conditions listed above is met. + + Subclasses are only allowed to call these methods from the aggregate + thread. + + * If the subclass wishes to push a buffer downstream in its aggregate + implementation, it should do so through the + gst_aggregator_finish_buffer() method. This method will take care + of sending and ordering mandatory events such as stream start, caps + and segment. Buffer lists can also be pushed out with + gst_aggregator_finish_buffer_list(). + + * Same goes for EOS events, which should not be pushed directly by the + subclass, it should instead return GST_FLOW_EOS in its aggregate + implementation. + + * Note that the aggregator logic regarding gap event handling is to turn + these into gap buffers with matching PTS and duration. It will also + flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE + to ease their identification and subsequent processing. + + * Subclasses must use (a subclass of) #GstAggregatorPad for both their + sink and source pads. + See gst_element_class_add_static_pad_template_with_gtype(). + +This class used to live in gst-plugins-bad and was moved to core. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This method will push the provided output buffer downstream. If needed, +mandatory events such as stream-start, caps, and segment events will be +sent before pushing the buffer. + + + + + + + The #GstAggregator + + + + the #GstBuffer to push. + + + + + + This method will push the provided output buffer list downstream. If needed, +mandatory events such as stream-start, caps, and segment events will be +sent before pushing the buffer. + + + + + + + The #GstAggregator + + + + the #GstBufferList to push. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiates src pad caps with downstream elements. +Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again +if #GstAggregatorClass.negotiate() fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAggregator + + + + + + + + + + + + + + + + + + + + Use this function to determine what input buffers will be aggregated +to produce the next output buffer. This should only be called from +a #GstAggregator::samples-selected handler, and can be used to precisely +control aggregating parameters for a given set of input samples. + + + The sample that is about to be aggregated. It may hold a #GstBuffer + or a #GstBufferList. The contents of its info structure is subclass-dependent, + and documented on a subclass basis. The buffers held by the sample are + not writable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This method will push the provided output buffer downstream. If needed, +mandatory events such as stream-start, caps, and segment events will be +sent before pushing the buffer. + + + + + + + The #GstAggregator + + + + the #GstBuffer to push. + + + + + + This method will push the provided output buffer list downstream. If needed, +mandatory events such as stream-start, caps, and segment events will be +sent before pushing the buffer. + + + + + + + The #GstAggregator + + + + the #GstBufferList to push. + + + + + + Lets #GstAggregator sub-classes get the memory @allocator +acquired by the base class and its @params. + +Unref the @allocator after use it. + + + + + + + a #GstAggregator + + + + the #GstAllocator +used + + + + the +#GstAllocationParams of @allocator + + + + + + + + the instance of the #GstBufferPool used +by @trans; free it after use it + + + + + a #GstAggregator + + + + + + Retrieves the latency values reported by @self in response to the latency +query, or %GST_CLOCK_TIME_NONE if there is not live source connected and the element +will not wait for the clock. + +Typically only called by subclasses. + + + The latency or %GST_CLOCK_TIME_NONE if the element does not sync + + + + + a #GstAggregator + + + + + + Negotiates src pad caps with downstream elements. +Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again +if #GstAggregatorClass.negotiate() fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAggregator + + + + + + Use this function to determine what input buffers will be aggregated +to produce the next output buffer. This should only be called from +a #GstAggregator::samples-selected handler, and can be used to precisely +control aggregating parameters for a given set of input samples. + + + The sample that is about to be aggregated. It may hold a #GstBuffer + or a #GstBufferList. The contents of its info structure is subclass-dependent, + and documented on a subclass basis. The buffers held by the sample are + not writable. + + + + + + + + + + + + + Subclasses should call this when they have prepared the +buffers they will aggregate for each of their sink pads, but +before using any of the properties of the pads that govern +*how* aggregation should be performed, for example z-index +for video aggregators. + +If gst_aggregator_update_segment() is used by the subclass, +it MUST be called before gst_aggregator_selected_samples(). + +This function MUST only be called from the #GstAggregatorClass::aggregate() +function. + + + + + + + + + + The presentation timestamp of the next output buffer + + + + The decoding timestamp of the next output buffer + + + + The duration of the next output buffer + + + + a #GstStructure containing additional information + + + + + + Lets #GstAggregator sub-classes tell the baseclass what their internal +latency is. Will also post a LATENCY message on the bus so the pipeline +can reconfigure its global latency. + + + + + + + a #GstAggregator + + + + minimum latency + + + + maximum latency + + + + + + Sets the caps to be used on the src pad. + + + + + + + The #GstAggregator + + + + The #GstCaps to set on the src pad. + + + + + + This is a simple #GstAggregatorClass.get_next_time() implementation that +just looks at the #GstSegment on the srcpad of the aggregator and bases +the next time on the running time there. + +This is the desired behaviour in most cases where you have a live source +and you have a dead line based aggregator subclass. + + + The running time based on the position + + + + + A #GstAggregator + + + + + + Subclasses should use this to update the segment on their +source pad, instead of directly pushing new segment events +downstream. + +Subclasses MUST call this before gst_aggregator_selected_samples(), +if it is used at all. + + + + + + + + + + + + + + + Enables the emission of signals such as #GstAggregator::samples-selected + + + + + + + Force minimum upstream latency (in nanoseconds). When sources with a +higher latency are expected to be plugged in dynamically after the +aggregator has started playing, this allows overriding the minimum +latency reported by the initial source(s). This is only taken into +account when larger than the actually reported minimum latency. + + + + + + + + + + + + + the aggregator's source pad + + + + + + + + + + + + Signals that the #GstAggregator subclass has selected the next set +of input samples it will aggregate. Handlers may call +gst_aggregator_peek_next_sample() at that point. + + + + + + The #GstSegment the next output buffer is part of + + + + The presentation timestamp of the next output buffer + + + + The decoding timestamp of the next output buffer + + + + The duration of the next output buffer + + + + a #GstStructure containing additional information + + + + + + + The aggregator base class will handle in a thread-safe way all manners of +concurrent flushes, seeks, pad additions and removals, leaving to the +subclass the responsibility of clipping buffers, and aggregating buffers in +the way the implementor sees fit. + +It will also take care of event ordering (stream-start, segment, eos). + +Basically, a simple implementation will override @aggregate, and call +_finish_buffer from inside that function. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstAggregator + + + + the #GstBuffer to push. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstAggregator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstAggregator + + + + the #GstBufferList to push. + + + + + + + + + + The sample that is about to be aggregated. It may hold a #GstBuffer + or a #GstBufferList. The contents of its info structure is subclass-dependent, + and documented on a subclass basis. The buffers held by the sample are + not writable. + + + + + + + + + + + + + + + + + + + + Pads managed by a #GstAggregator subclass. + +This class used to live in gst-plugins-bad and was moved to core. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Drop the buffer currently queued in @pad. + + + TRUE if there was a buffer queued in @pad, or FALSE if not. + + + + + the pad where to drop any pending buffer + + + + + + This checks if a pad has a buffer available that will be returned by +a call to gst_aggregator_pad_peek_buffer() or +gst_aggregator_pad_pop_buffer(). + + + %TRUE if the pad has a buffer available as the next thing. + + + + + the pad to check the buffer on + + + + + + + + %TRUE if the pad is EOS, otherwise %FALSE. + + + + + an aggregator pad + + + + + + + + A reference to the buffer in @pad or +NULL if no buffer was queued. You should unref the buffer after +usage. + + + + + the pad to get buffer from + + + + + + Steal the ref to the buffer currently queued in @pad. + + + The buffer in @pad or NULL if no buffer was + queued. You should unref the buffer after usage. + + + + + the pad to get buffer from + + + + + + Enables the emission of signals such as #GstAggregatorPad::buffer-consumed + + + + + + + last segment received. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Start at running time 0. + + + Start at the running time of +the first buffer that is received. + + + Start at the running time +selected by the `start-time` property. + + + + + + + + + + + + + + + + + + + + + + + + + Obtains current drain status (ie. whether EOS has been received and +the parser is now processing the frames at the end of the stream) + + + + base parse instance + + + + + + + + + + + + + + + + + + + + Obtains current sync status. + + + + base parse instance + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + base parse instance + + + + + Gives the pointer to the source #GstPad object of the element. + + + + base parse instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gives the pointer to the #GstPad object of the element. + + + + base sink instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gives the pointer to the #GstPad object of the element. + + + + base source instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The name of the templates for the sink pad. + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + base transform instance + + + + + The name of the templates for the source pad. + + + + + Gives the pointer to the source #GstPad object of the element. + + + + base transform instance + + + + + + + + + + + + A #GstBitReader must be initialized with this macro, before it can be +used. This macro can used be to initialize a variable, but it cannot +be assigned to a variable. In that case you have to use +gst_bit_reader_init(). + + + + Data from which the #GstBitReader should read + + + Size of @data in bytes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GstByteReader must be initialized with this macro, before it can be +used. This macro can used be to initialize a variable, but it cannot +be assigned to a variable. In that case you have to use +gst_byte_reader_init(). + + + + Data from which the #GstByteReader should read + + + Size of @data in bytes + + + + + + + + + + + + This base class is for parser elements that process data and splits it +into separate audio/video/whatever frames. + +It provides for: + + * provides one sink pad and one source pad + * handles state changes + * can operate in pull mode or push mode + * handles seeking in both modes + * handles events (SEGMENT/EOS/FLUSH) + * handles queries (POSITION/DURATION/SEEKING/FORMAT/CONVERT) + * handles flushing + +The purpose of this base class is to provide the basic functionality of +a parser and share a lot of rather complex code. + +# Description of the parsing mechanism: + +## Set-up phase + + * #GstBaseParse calls #GstBaseParseClass.start() to inform subclass + that data processing is about to start now. + + * #GstBaseParse class calls #GstBaseParseClass.set_sink_caps() to + inform the subclass about incoming sinkpad caps. Subclass could + already set the srcpad caps accordingly, but this might be delayed + until calling gst_base_parse_finish_frame() with a non-queued frame. + + * At least at this point subclass needs to tell the #GstBaseParse class + how big data chunks it wants to receive (minimum frame size ). It can + do this with gst_base_parse_set_min_frame_size(). + + * #GstBaseParse class sets up appropriate data passing mode (pull/push) + and starts to process the data. + +## Parsing phase + + * #GstBaseParse gathers at least min_frame_size bytes of data either + by pulling it from upstream or collecting buffers in an internal + #GstAdapter. + + * A buffer of (at least) min_frame_size bytes is passed to subclass + with #GstBaseParseClass.handle_frame(). Subclass checks the contents + and can optionally return #GST_FLOW_OK along with an amount of data + to be skipped to find a valid frame (which will result in a + subsequent DISCONT). If, otherwise, the buffer does not hold a + complete frame, #GstBaseParseClass.handle_frame() can merely return + and will be called again when additional data is available. In push + mode this amounts to an additional input buffer (thus minimal + additional latency), in pull mode this amounts to some arbitrary + reasonable buffer size increase. + + Of course, gst_base_parse_set_min_frame_size() could also be used if + a very specific known amount of additional data is required. If, + however, the buffer holds a complete valid frame, it can pass the + size of this frame to gst_base_parse_finish_frame(). + + If acting as a converter, it can also merely indicate consumed input + data while simultaneously providing custom output data. Note that + baseclass performs some processing (such as tracking overall consumed + data rate versus duration) for each finished frame, but other state + is only updated upon each call to #GstBaseParseClass.handle_frame() + (such as tracking upstream input timestamp). + + Subclass is also responsible for setting the buffer metadata + (e.g. buffer timestamp and duration, or keyframe if applicable). + (although the latter can also be done by #GstBaseParse if it is + appropriately configured, see below). Frame is provided with + timestamp derived from upstream (as much as generally possible), + duration obtained from configuration (see below), and offset + if meaningful (in pull mode). + + Note that #GstBaseParseClass.handle_frame() might receive any small + amount of input data when leftover data is being drained (e.g. at + EOS). + + * As part of finish frame processing, just prior to actually pushing + the buffer in question, it is passed to + #GstBaseParseClass.pre_push_frame() which gives subclass yet one last + chance to examine buffer metadata, or to send some custom (tag) + events, or to perform custom (segment) filtering. + + * During the parsing process #GstBaseParseClass will handle both srcpad + and sinkpad events. They will be passed to subclass if + #GstBaseParseClass.sink_event() or #GstBaseParseClass.src_event() + implementations have been provided. + +## Shutdown phase + +* #GstBaseParse class calls #GstBaseParseClass.stop() to inform the + subclass that data parsing will be stopped. + +Subclass is responsible for providing pad template caps for source and +sink pads. The pads need to be named "sink" and "src". It also needs to +set the fixed caps on srcpad, when the format is ensured (e.g. when +base class calls subclass' #GstBaseParseClass.set_sink_caps() function). + +This base class uses %GST_FORMAT_DEFAULT as a meaning of frames. So, +subclass conversion routine needs to know that conversion from +%GST_FORMAT_TIME to %GST_FORMAT_DEFAULT must return the +frame number that can be found from the given byte position. + +#GstBaseParse uses subclasses conversion methods also for seeking (or +otherwise uses its own default one, see also below). + +Subclass @start and @stop functions will be called to inform the beginning +and end of data processing. + +Things that subclass need to take care of: + +* Provide pad templates +* Fixate the source pad caps when appropriate +* Inform base class how big data chunks should be retrieved. This is + done with gst_base_parse_set_min_frame_size() function. +* Examine data chunks passed to subclass with + #GstBaseParseClass.handle_frame() and pass proper frame(s) to + gst_base_parse_finish_frame(), and setting src pad caps and timestamps + on frame. +* Provide conversion functions +* Update the duration information with gst_base_parse_set_duration() +* Optionally passthrough using gst_base_parse_set_passthrough() +* Configure various baseparse parameters using + gst_base_parse_set_average_bitrate(), gst_base_parse_set_syncable() + and gst_base_parse_set_frame_rate(). + +* In particular, if subclass is unable to determine a duration, but + parsing (or specs) yields a frames per seconds rate, then this can be + provided to #GstBaseParse to enable it to cater for buffer time + metadata (which will be taken from upstream as much as + possible). Internally keeping track of frame durations and respective + sizes that have been pushed provides #GstBaseParse with an estimated + bitrate. A default #GstBaseParseClass.convert() (used if not + overridden) will then use these rates to perform obvious conversions. + These rates are also used to update (estimated) duration at regular + frame intervals. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds an entry to the index associating @offset to @ts. It is recommended +to only add keyframe entries. @force allows to bypass checks, such as +whether the stream is (upstream) seekable, another entry is already "close" +to the new entry, etc. + + + #gboolean indicating whether entry was added + + + + + #GstBaseParse. + + + + offset of entry + + + + timestamp associated with offset + + + + whether entry refers to keyframe + + + + add entry disregarding sanity checks + + + + + + Default implementation of #GstBaseParseClass.convert(). + + + %TRUE if conversion was successful. + + + + + #GstBaseParse. + + + + #GstFormat describing the source format. + + + + Source value to be converted. + + + + #GstFormat defining the converted format. + + + + Pointer where the conversion result will be put. + + + + + + Drains the adapter until it is empty. It decreases the min_frame_size to +match the current adapter size and calls chain method until the adapter +is emptied or chain returns with error. + + + + + + + a #GstBaseParse + + + + + + Collects parsed data and pushes this downstream. +Source pad caps must be set when this is called. + +If @frame's out_buffer is set, that will be used as subsequent frame data. +Otherwise, @size samples will be taken from the input and used for output, +and the output's metadata (timestamps etc) will be taken as (optionally) +set by the subclass on @frame's (input) buffer (which is otherwise +ignored for any but the above purpose/information). + +Note that the latter buffer is invalidated by this call, whereas the +caller retains ownership of @frame. + + + a #GstFlowReturn that should be escalated to caller (of caller) + + + + + a #GstBaseParse + + + + a #GstBaseParseFrame + + + + consumed input data represented by frame + + + + + + Sets the parser subclass's tags and how they should be merged with any +upstream stream tags. This will override any tags previously-set +with gst_base_parse_merge_tags(). + +Note that this is provided for convenience, and the subclass is +not required to use this and can still do tag handling on its own. + + + + + + + a #GstBaseParse + + + + a #GstTagList to merge, or NULL to unset + previously-set tags + + + + the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE + + + + + + Pushes the frame's buffer downstream, sends any pending events and +does some timestamp and segment handling. Takes ownership of +frame's buffer, though caller retains ownership of @frame. + +This must be called with sinkpad STREAM_LOCK held. + + + #GstFlowReturn + + + + + #GstBaseParse. + + + + a #GstBaseParseFrame + + + + + + Optionally sets the average bitrate detected in media (if non-zero), +e.g. based on metadata, as it will be posted to the application. + +By default, announced average bitrate is estimated. The average bitrate +is used to estimate the total duration of the stream and to estimate +a seek position, if there's no index and the format is syncable +(see gst_base_parse_set_syncable()). + + + + + + + #GstBaseParse. + + + + average bitrate in bits/second + + + + + + Sets the duration of the currently playing media. Subclass can use this +when it is able to determine duration and/or notices a change in the media +duration. Alternatively, if @interval is non-zero (default), then stream +duration is determined based on estimated bitrate, and updated every @interval +frames. + + + + + + + #GstBaseParse. + + + + #GstFormat. + + + + duration value. + + + + how often to update the duration estimate based on bitrate, or 0. + + + + + + If frames per second is configured, parser can take care of buffer duration +and timestamping. When performing segment clipping, or seeking to a specific +location, a corresponding decoder might need an initial @lead_in and a +following @lead_out number of frames to ensure the desired segment is +entirely filled upon decoding. + + + + + + + the #GstBaseParse to set + + + + frames per second (numerator). + + + + frames per second (denominator). + + + + frames needed before a segment for subsequent decode + + + + frames needed after a segment + + + + + + Set if frames carry timing information which the subclass can (generally) +parse and provide. In particular, intrinsic (rather than estimated) time +can be obtained following a seek. + + + + + + + a #GstBaseParse + + + + whether frames carry timing information + + + + + + By default, the base class might try to infer PTS from DTS and vice +versa. While this is generally correct for audio data, it may not +be otherwise. Sub-classes implementing such formats should disable +timestamp inferring. + + + + + + + a #GstBaseParse + + + + %TRUE if parser should infer DTS/PTS from each other + + + + + + Sets the minimum and maximum (which may likely be equal) latency introduced +by the parsing process. If there is such a latency, which depends on the +particular parsing of the format, it typically corresponds to 1 frame duration. + + + + + + + a #GstBaseParse + + + + minimum parse latency + + + + maximum parse latency + + + + + + Subclass can use this function to tell the base class that it needs to +be given buffers of at least @min_size bytes. + + + + + + + #GstBaseParse. + + + + Minimum size in bytes of the data that this base class should + give to subclass. + + + + + + Set if the nature of the format or configuration does not allow (much) +parsing, and the parser should operate in passthrough mode (which only +applies when operating in push mode). That is, incoming buffers are +pushed through unmodified, i.e. no #GstBaseParseClass.handle_frame() +will be invoked, but #GstBaseParseClass.pre_push_frame() will still be +invoked, so subclass can perform as much or as little is appropriate for +passthrough semantics in #GstBaseParseClass.pre_push_frame(). + + + + + + + a #GstBaseParse + + + + %TRUE if parser should run in passthrough mode + + + + + + By default, the base class will guess PTS timestamps using a simple +interpolation (previous timestamp + duration), which is incorrect for +data streams with reordering, where PTS can go backward. Sub-classes +implementing such formats should disable PTS interpolation. + + + + + + + a #GstBaseParse + + + + %TRUE if parser should interpolate PTS timestamps + + + + + + Set if frame starts can be identified. This is set by default and +determines whether seeking based on bitrate averages +is possible for a format/stream. + + + + + + + a #GstBaseParse + + + + set if frame starts can be identified + + + + + + This function should only be called from a @handle_frame implementation. + +#GstBaseParse creates initial timestamps for frames by using the last +timestamp seen in the stream before the frame starts. In certain +cases, the correct timestamps will occur in the stream after the +start of the frame, but before the start of the actual picture data. +This function can be used to set the timestamps based on the offset +into the frame data that the picture starts. + + + + + + + a #GstBaseParse + + + + offset into current buffer + + + + + + If set to %TRUE, baseparse will unconditionally force parsing of the +incoming data. This can be required in the rare cases where the incoming +side-data (caps, pts, dts, ...) is not trusted by the user and wants to +force validation and parsing of the incoming data. +If set to %FALSE, decision of whether to parse the data or not is up to +the implementation (standard behaviour). + + + + the parent element. + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum @handle_frame needs to be overridden. + + + the parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Frame (context) data passed to each frame parsing virtual methods. In +addition to providing the data to be checked for a valid frame or an already +identified frame, it conveys additional metadata or control information +from and to the subclass w.r.t. the particular frame in question (rather +than global parameters). Some of these may apply to each parsing stage, others +only to some a particular one. These parameters are effectively zeroed at start +of each frame's processing, i.e. parsing virtual method invocation sequence. + + + input data to be parsed for frames. + + + + output data. + + + + a combination of input and output #GstBaseParseFrameFlags that + convey additional context to subclass or allow subclass to tune + subsequent #GstBaseParse actions. + + + + media specific offset of input frame + Note that a converter may have a different one on the frame's buffer. + + + + subclass can set this to indicates the metadata overhead + for the given frame, which is then used to enable more accurate bitrate + computations. If this is -1, it is assumed that this frame should be + skipped in bitrate calculation. + + + + + + + + + + + + + + + + + + + + Allocates a new #GstBaseParseFrame. This function is mainly for bindings, +elements written in C should usually allocate the frame on the stack and +then use gst_base_parse_frame_init() to initialise it. + + + a newly-allocated #GstBaseParseFrame. Free with + gst_base_parse_frame_free() when no longer needed. + + + + + a #GstBuffer + + + + the flags + + + + number of bytes in this frame which should be counted as + metadata overhead, ie. not used to calculate the average bitrate. + Set to -1 to mark the entire frame as metadata. If in doubt, set to 0. + + + + + + Copies a #GstBaseParseFrame. + + + A copy of @frame + + + + + a #GstBaseParseFrame + + + + + + Frees the provided @frame. + + + + + + + A #GstBaseParseFrame + + + + + + Sets a #GstBaseParseFrame to initial state. Currently this means +all public fields are zero-ed and a private flag is set to make +sure gst_base_parse_frame_free() only frees the contents but not +the actual frame. Use this function to initialise a #GstBaseParseFrame +allocated on the stack. + + + + + + + #GstBaseParseFrame. + + + + + + + Flags to be used in a #GstBaseParseFrame. + + + no flag + + + set by baseclass if current frame + is passed for processing to the subclass for the first time + (and not set on subsequent calls with same data). + + + set to indicate this buffer should not be + counted as frame, e.g. if this frame is dependent on a previous one. + As it is not counted as a frame, bitrate increases but frame to time + conversions are maintained. + + + @pre_push_frame can set this to indicate + that regular segment clipping can still be performed (as opposed to + any custom one having been done). + + + indicates to @finish_frame that the + the frame should be dropped (and might be handled internally by subclass) + + + indicates to @finish_frame that the + the frame should be queued for now and processed fully later + when the first non-queued frame is finished + + + + + + + #GstBaseSink is the base class for sink elements in GStreamer, such as +xvimagesink or filesink. It is a layer on top of #GstElement that provides a +simplified interface to plugin writers. #GstBaseSink handles many details +for you, for example: preroll, clock synchronization, state changes, +activation in push or pull mode, and queries. + +In most cases, when writing sink elements, there is no need to implement +class methods from #GstElement or to set functions on pads, because the +#GstBaseSink infrastructure should be sufficient. + +#GstBaseSink provides support for exactly one sink pad, which should be +named "sink". A sink implementation (subclass of #GstBaseSink) should +install a pad template in its class_init function, like so: +|[<!-- language="C" --> +static void +my_element_class_init (GstMyElementClass *klass) +{ + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + + // sinktemplate should be a #GstStaticPadTemplate with direction + // %GST_PAD_SINK and name "sink" + gst_element_class_add_static_pad_template (gstelement_class, &amp;sinktemplate); + + gst_element_class_set_static_metadata (gstelement_class, + "Sink name", + "Sink", + "My Sink element", + "The author <my.sink@my.email>"); +} +]| + +#GstBaseSink will handle the prerolling correctly. This means that it will +return %GST_STATE_CHANGE_ASYNC from a state change to PAUSED until the first +buffer arrives in this element. The base class will call the +#GstBaseSinkClass.preroll() vmethod with this preroll buffer and will then +commit the state change to the next asynchronously pending state. + +When the element is set to PLAYING, #GstBaseSink will synchronise on the +clock using the times returned from #GstBaseSinkClass.get_times(). If this +function returns %GST_CLOCK_TIME_NONE for the start time, no synchronisation +will be done. Synchronisation can be disabled entirely by setting the object +#GstBaseSink:sync property to %FALSE. + +After synchronisation the virtual method #GstBaseSinkClass.render() will be +called. Subclasses should minimally implement this method. + +Subclasses that synchronise on the clock in the #GstBaseSinkClass.render() +method are supported as well. These classes typically receive a buffer in +the render method and can then potentially block on the clock while +rendering. A typical example is an audiosink. +These subclasses can use gst_base_sink_wait_preroll() to perform the +blocking wait. + +Upon receiving the EOS event in the PLAYING state, #GstBaseSink will wait +for the clock to reach the time indicated by the stop time of the last +#GstBaseSinkClass.get_times() call before posting an EOS message. When the +element receives EOS in PAUSED, preroll completes, the event is queued and an +EOS message is posted when going to PLAYING. + +#GstBaseSink will internally use the %GST_EVENT_SEGMENT events to schedule +synchronisation and clipping of buffers. Buffers that fall completely outside +of the current segment are dropped. Buffers that fall partially in the +segment are rendered (and prerolled). Subclasses should do any subbuffer +clipping themselves when needed. + +#GstBaseSink will by default report the current playback position in +%GST_FORMAT_TIME based on the current clock time and segment information. +If no clock has been set on the element, the query will be forwarded +upstream. + +The #GstBaseSinkClass.set_caps() function will be called when the subclass +should configure itself to process a specific media type. + +The #GstBaseSinkClass.start() and #GstBaseSinkClass.stop() virtual methods +will be called when resources should be allocated. Any +#GstBaseSinkClass.preroll(), #GstBaseSinkClass.render() and +#GstBaseSinkClass.set_caps() function will be called between the +#GstBaseSinkClass.start() and #GstBaseSinkClass.stop() calls. + +The #GstBaseSinkClass.event() virtual method will be called when an event is +received by #GstBaseSink. Normally this method should only be overridden by +very specific elements (such as file sinks) which need to handle the +newsegment event specially. + +The #GstBaseSinkClass.unlock() method is called when the elements should +unblock any blocking operations they perform in the +#GstBaseSinkClass.render() method. This is mostly useful when the +#GstBaseSinkClass.render() method performs a blocking write on a file +descriptor, for example. + +The #GstBaseSink:max-lateness property affects how the sink deals with +buffers that arrive too late in the sink. A buffer arrives too late in the +sink when the presentation time (as a combination of the last segment, buffer +timestamp and element base_time) plus the duration is before the current +time of the clock. +If the frame is later than max-lateness, the sink will drop the buffer +without calling the render method. +This feature is disabled if sync is disabled, the +#GstBaseSinkClass.get_times() method does not return a valid start time or +max-lateness is set to -1 (the default). +Subclasses can use gst_base_sink_set_max_lateness() to configure the +max-lateness value. + +The #GstBaseSink:qos property will enable the quality-of-service features of +the basesink which gather statistics about the real-time performance of the +clock synchronisation. For each buffer received in the sink, statistics are +gathered and a QOS event is sent upstream with these numbers. This +information can then be used by upstream elements to reduce their processing +rate, for example. + +The #GstBaseSink:async property can be used to instruct the sink to never +perform an ASYNC state change. This feature is mostly usable when dealing +with non-synchronized streams or sparse streams. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If the @sink spawns its own thread for pulling buffers from upstream it +should call this method after it has pulled a buffer. If the element needed +to preroll, this function will perform the preroll and will then block +until the element state is changed. + +This function should be called with the PREROLL_LOCK held. + + + %GST_FLOW_OK if the preroll completed and processing can +continue. Any other return value should be returned from the render vmethod. + + + + + the sink + + + + the mini object that caused the preroll + + + + + + Get the number of bytes that the sink will pull when it is operating in pull +mode. + + + the number of bytes @sink will pull in pull mode. + + + + + a #GstBaseSink + + + + + + Checks if @sink is currently configured to drop buffers which are outside +the current segment + + + %TRUE if the sink is configured to drop buffers outside the +current segment. + + + + + the sink + + + + + + Get the last sample that arrived in the sink and was used for preroll or for +rendering. This property can be used to generate thumbnails. + +The #GstCaps on the sample can be used to determine the type of the buffer. + +Free-function: gst_sample_unref + + + a #GstSample. gst_sample_unref() after + usage. This function returns %NULL when no buffer has arrived in the + sink yet or when the sink is not in PAUSED or PLAYING. + + + + + the sink + + + + + + Get the currently configured latency. + + + The configured latency. + + + + + the sink + + + + + + Get the maximum amount of bits per second that the sink will render. + + + the maximum number of bits per second @sink will render. + + + + + a #GstBaseSink + + + + + + Gets the max lateness value. See gst_base_sink_set_max_lateness() for +more details. + + + The maximum time in nanoseconds that a buffer can be late +before it is dropped and not rendered. A value of -1 means an +unlimited time. + + + + + the sink + + + + + + Get the processing deadline of @sink. see +gst_base_sink_set_processing_deadline() for more information about +the processing deadline. + + + the processing deadline + + + + + a #GstBaseSink + + + + + + Get the render delay of @sink. see gst_base_sink_set_render_delay() for more +information about the render delay. + + + the render delay of @sink. + + + + + a #GstBaseSink + + + + + + Return various #GstBaseSink statistics. This function returns a #GstStructure +with name `application/x-gst-base-sink-stats` with the following fields: + +- "average-rate" G_TYPE_DOUBLE average frame rate +- "dropped" G_TYPE_UINT64 Number of dropped frames +- "rendered" G_TYPE_UINT64 Number of rendered frames + + + pointer to #GstStructure + + + + + #GstBaseSink + + + + + + Checks if @sink is currently configured to synchronize against the +clock. + + + %TRUE if the sink is configured to synchronize against the clock. + + + + + the sink + + + + + + Get the time that will be inserted between frames to control the +maximum buffers per second. + + + the number of nanoseconds @sink will put between frames. + + + + + a #GstBaseSink + + + + + + Get the synchronisation offset of @sink. + + + The synchronisation offset. + + + + + the sink + + + + + + Checks if @sink is currently configured to perform asynchronous state +changes to PAUSED. + + + %TRUE if the sink is configured to perform asynchronous state +changes. + + + + + the sink + + + + + + Checks if @sink is currently configured to store the last received sample in +the last-sample property. + + + %TRUE if the sink is configured to store the last received sample. + + + + + the sink + + + + + + Checks if @sink is currently configured to send Quality-of-Service events +upstream. + + + %TRUE if the sink is configured to perform Quality-of-Service. + + + + + the sink + + + + + + Query the sink for the latency parameters. The latency will be queried from +the upstream elements. @live will be %TRUE if @sink is configured to +synchronize against the clock. @upstream_live will be %TRUE if an upstream +element is live. + +If both @live and @upstream_live are %TRUE, the sink will want to compensate +for the latency introduced by the upstream elements by setting the +@min_latency to a strictly positive value. + +This function is mostly used by subclasses. + + + %TRUE if the query succeeded. + + + + + the sink + + + + if the sink is live + + + + if an upstream element is live + + + + the min latency of the upstream elements + + + + the max latency of the upstream elements + + + + + + Configures @sink to perform all state changes asynchronously. When async is +disabled, the sink will immediately go to PAUSED instead of waiting for a +preroll buffer. This feature is useful if the sink does not synchronize +against the clock or when it is dealing with sparse streams. + + + + + + + the sink + + + + the new async value. + + + + + + Set the number of bytes that the sink will pull when it is operating in pull +mode. + + + + + + + a #GstBaseSink + + + + the blocksize in bytes + + + + + + Configure @sink to drop buffers which are outside the current segment + + + + + + + the sink + + + + drop buffers outside the segment + + + + + + Configures @sink to store the last received sample in the last-sample +property. + + + + + + + the sink + + + + the new enable-last-sample value. + + + + + + Set the maximum amount of bits per second that the sink will render. + + + + + + + a #GstBaseSink + + + + the max_bitrate in bits per second + + + + + + Sets the new max lateness value to @max_lateness. This value is +used to decide if a buffer should be dropped or not based on the +buffer timestamp and the current clock time. A value of -1 means +an unlimited time. + + + + + + + the sink + + + + the new max lateness value. + + + + + + Maximum amount of time (in nanoseconds) that the pipeline can take +for processing the buffer. This is added to the latency of live +pipelines. + +This function is usually called by subclasses. + + + + + + + a #GstBaseSink + + + + the new processing deadline in nanoseconds. + + + + + + Configures @sink to send Quality-of-Service events upstream. + + + + + + + the sink + + + + the new qos value. + + + + + + Set the render delay in @sink to @delay. The render delay is the time +between actual rendering of a buffer and its synchronisation time. Some +devices might delay media rendering which can be compensated for with this +function. + +After calling this function, this sink will report additional latency and +other sinks will adjust their latency to delay the rendering of their media. + +This function is usually called by subclasses. + + + + + + + a #GstBaseSink + + + + the new delay + + + + + + Configures @sink to synchronize on the clock or not. When +@sync is %FALSE, incoming samples will be played as fast as +possible. If @sync is %TRUE, the timestamps of the incoming +buffers will be used to schedule the exact render time of its +contents. + + + + + + + the sink + + + + the new sync value. + + + + + + Set the time that will be inserted between rendered buffers. This +can be used to control the maximum buffers per second that the sink +will render. + + + + + + + a #GstBaseSink + + + + the throttle time in nanoseconds + + + + + + Adjust the synchronisation of @sink with @offset. A negative value will +render buffers earlier than their timestamp. A positive value will delay +rendering. This function can be used to fix playback of badly timestamped +buffers. + + + + + + + the sink + + + + the new offset + + + + + + This function will wait for preroll to complete and will then block until @time +is reached. It is usually called by subclasses that use their own internal +synchronisation but want to let some synchronization (like EOS) be handled +by the base class. + +This function should only be called with the PREROLL_LOCK held (like when +receiving an EOS event in the ::event vmethod or when handling buffers in +::render). + +The @time argument should be the running_time of when the timeout should happen +and will be adjusted with any latency and offset configured in the sink. + + + #GstFlowReturn + + + + + the sink + + + + the running_time to be reached + + + + the jitter to be filled with time diff, or %NULL + + + + + + This function will block until @time is reached. It is usually called by +subclasses that use their own internal synchronisation. + +If @time is not valid, no synchronisation is done and %GST_CLOCK_BADTIME is +returned. Likewise, if synchronisation is disabled in the element or there +is no clock, no synchronisation is done and %GST_CLOCK_BADTIME is returned. + +This function should only be called with the PREROLL_LOCK held, like when +receiving an EOS event in the #GstBaseSinkClass.event() vmethod or when +receiving a buffer in +the #GstBaseSinkClass.render() vmethod. + +The @time argument should be the running_time of when this method should +return and is not adjusted with any latency or offset configured in the +sink. + + + #GstClockReturn + + + + + the sink + + + + the running_time to be reached + + + + the jitter to be filled with time diff, or %NULL + + + + + + If the #GstBaseSinkClass.render() method performs its own synchronisation +against the clock it must unblock when going from PLAYING to the PAUSED state +and call this method before continuing to render the remaining data. + +If the #GstBaseSinkClass.render() method can block on something else than +the clock, it must also be ready to unblock immediately on +the #GstBaseSinkClass.unlock() method and cause the +#GstBaseSinkClass.render() method to immediately call this function. +In this case, the subclass must be prepared to continue rendering where it +left off if this function returns %GST_FLOW_OK. + +This function will block until a state change to PLAYING happens (in which +case this function returns %GST_FLOW_OK) or the processing must be stopped due +to a state change to READY or a FLUSH event (in which case this function +returns %GST_FLOW_FLUSHING). + +This function should only be called with the PREROLL_LOCK held, like in the +render function. + + + %GST_FLOW_OK if the preroll completed and processing can +continue. Any other return value should be returned from the render vmethod. + + + + + the sink + + + + + + If set to %TRUE, the basesink will perform asynchronous state changes. +When set to %FALSE, the sink will not signal the parent when it prerolls. +Use this option when dealing with sparse streams or when synchronisation is +not required. + + + + The amount of bytes to pull when operating in pull mode. + + + + Enable the last-sample property. If %FALSE, basesink doesn't keep a +reference to the last buffer arrived and the last-sample property is always +set to %NULL. This can be useful if you need buffers to be released as soon +as possible, eg. if you're using a buffer pool. + + + + The last buffer that arrived in the sink and was used for preroll or for +rendering. This property can be used to generate thumbnails. This property +can be %NULL when the sink has not yet received a buffer. + + + + Control the maximum amount of bits that will be rendered per second. +Setting this property to a value bigger than 0 will make the sink delay +rendering of the buffers when it would exceed to max-bitrate. + + + + + + + Maximum amount of time (in nanoseconds) that the pipeline can take +for processing the buffer. This is added to the latency of live +pipelines. + + + + + + + The additional delay between synchronisation and actual rendering of the +media. This property will add additional latency to the device in order to +make other sinks compensate for the delay. + + + + Various #GstBaseSink statistics. This property returns a #GstStructure +with name `application/x-gst-base-sink-stats` with the following fields: + +- "average-rate" G_TYPE_DOUBLE average frame rate +- "dropped" G_TYPE_UINT64 Number of dropped frames +- "rendered" G_TYPE_UINT64 Number of rendered frames + + + + + + + The time to insert between buffers. This property can be used to control +the maximum amount of buffers per second to render. Setting this property +to a value bigger than 0 will make the sink create THROTTLE QoS events. + + + + Controls the final synchronisation, a negative value will render the buffer +earlier while a positive value delays playback. This property can be +used to fix synchronisation in bad files. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At the minimum, the @render method should be overridden to +output/present buffers. + + + Element parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is a generic base class for source elements. The following +types of sources are supported: + + * random access sources like files + * seekable sources + * live sources + +The source can be configured to operate in any #GstFormat with the +gst_base_src_set_format() method. The currently set format determines +the format of the internal #GstSegment and any %GST_EVENT_SEGMENT +events. The default format for #GstBaseSrc is %GST_FORMAT_BYTES. + +#GstBaseSrc always supports push mode scheduling. If the following +conditions are met, it also supports pull mode scheduling: + + * The format is set to %GST_FORMAT_BYTES (default). + * #GstBaseSrcClass.is_seekable() returns %TRUE. + +If all the conditions are met for operating in pull mode, #GstBaseSrc is +automatically seekable in push mode as well. The following conditions must +be met to make the element seekable in push mode when the format is not +%GST_FORMAT_BYTES: + +* #GstBaseSrcClass.is_seekable() returns %TRUE. +* #GstBaseSrcClass.query() can convert all supported seek formats to the + internal format as set with gst_base_src_set_format(). +* #GstBaseSrcClass.do_seek() is implemented, performs the seek and returns + %TRUE. + +When the element does not meet the requirements to operate in pull mode, the +offset and length in the #GstBaseSrcClass.create() method should be ignored. +It is recommended to subclass #GstPushSrc instead, in this situation. If the +element can operate in pull mode but only with specific offsets and +lengths, it is allowed to generate an error when the wrong values are passed +to the #GstBaseSrcClass.create() function. + +#GstBaseSrc has support for live sources. Live sources are sources that when +paused discard data, such as audio or video capture devices. A typical live +source also produces data at a fixed rate and thus provides a clock to publish +this rate. +Use gst_base_src_set_live() to activate the live source mode. + +A live source does not produce data in the PAUSED state. This means that the +#GstBaseSrcClass.create() method will not be called in PAUSED but only in +PLAYING. To signal the pipeline that the element will not produce data, the +return value from the READY to PAUSED state will be +%GST_STATE_CHANGE_NO_PREROLL. + +A typical live source will timestamp the buffers it creates with the +current running time of the pipeline. This is one reason why a live source +can only produce data in the PLAYING state, when the clock is actually +distributed and running. + +Live sources that synchronize and block on the clock (an audio source, for +example) can use gst_base_src_wait_playing() when the +#GstBaseSrcClass.create() function was interrupted by a state change to +PAUSED. + +The #GstBaseSrcClass.get_times() method can be used to implement pseudo-live +sources. It only makes sense to implement the #GstBaseSrcClass.get_times() +function if the source is a live source. The #GstBaseSrcClass.get_times() +function should return timestamps starting from 0, as if it were a non-live +source. The base class will make sure that the timestamps are transformed +into the current running_time. The base source will then wait for the +calculated running_time before pushing out the buffer. + +For live sources, the base class will by default report a latency of 0. +For pseudo live sources, the base class will by default measure the difference +between the first buffer timestamp and the start time of get_times and will +report this value as the latency. +Subclasses should override the query function when this behaviour is not +acceptable. + +There is only support in #GstBaseSrc for exactly one source pad, which +should be named "src". A source implementation (subclass of #GstBaseSrc) +should install a pad template in its class_init function, like so: +|[<!-- language="C" --> +static void +my_element_class_init (GstMyElementClass *klass) +{ + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + // srctemplate should be a #GstStaticPadTemplate with direction + // %GST_PAD_SRC and name "src" + gst_element_class_add_static_pad_template (gstelement_class, &amp;srctemplate); + + gst_element_class_set_static_metadata (gstelement_class, + "Source name", + "Source", + "My Source element", + "The author <my.sink@my.email>"); +} +]| + +## Controlled shutdown of live sources in applications + +Applications that record from a live source may want to stop recording +in a controlled way, so that the recording is stopped, but the data +already in the pipeline is processed to the end (remember that many live +sources would go on recording forever otherwise). For that to happen the +application needs to make the source stop recording and send an EOS +event down the pipeline. The application would then wait for an +EOS message posted on the pipeline's bus to know when all data has +been processed and the pipeline can safely be stopped. + +An application may send an EOS event to a source element to make it +perform the EOS logic (send EOS event downstream or post a +%GST_MESSAGE_SEGMENT_DONE on the bus). This can typically be done +with the gst_element_send_event() function on the element or its parent bin. + +After the EOS has been sent to the element, the application should wait for +an EOS message to be posted on the pipeline's bus. Once this EOS message is +received, it may safely shut down the entire pipeline. + + + + + + + + + + + + + + + + + + + + + + + Ask the subclass to create a buffer with @offset and @size, the default +implementation will call alloc and fill. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Called to get the caps to report. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Given @buffer, return @start and @end time when it should be pushed +out. The base class will sync on the clock using these times. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiates src pad caps with downstream elements. +Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again +if #GstBaseSrcClass.negotiate() fails. + +Do not call this in the #GstBaseSrcClass.fill() vmethod. Call this in +#GstBaseSrcClass.create() or in #GstBaseSrcClass.alloc(), _before_ any +buffer is allocated. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + base source instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set new caps on the basesrc source pad. + + + %TRUE if the caps could be set + + + + + a #GstBaseSrc + + + + a #GstCaps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lets #GstBaseSrc sub-classes to know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after usage. + + + + + + + a #GstBaseSrc + + + + the #GstAllocator +used + + + + the #GstAllocationParams of @allocator + + + + + + Get the number of bytes that @src will push out with each buffer. + + + the number of bytes pushed with each buffer. + + + + + the source + + + + + + + + the instance of the #GstBufferPool used +by the src; unref it after usage. + + + + + a #GstBaseSrc + + + + + + Query if @src timestamps outgoing buffers based on the current running_time. + + + %TRUE if the base class will automatically timestamp outgoing buffers. + + + + + the source + + + + + + Get the current async behaviour of @src. See also gst_base_src_set_async(). + + + %TRUE if @src is operating in async mode. + + + + + base source instance + + + + + + Check if an element is in live mode. + + + %TRUE if element is in live mode. + + + + + base source instance + + + + + + Negotiates src pad caps with downstream elements. +Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again +if #GstBaseSrcClass.negotiate() fails. + +Do not call this in the #GstBaseSrcClass.fill() vmethod. Call this in +#GstBaseSrcClass.create() or in #GstBaseSrcClass.alloc(), _before_ any +buffer is allocated. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + base source instance + + + + + + Prepare a new seamless segment for emission downstream. This function must +only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, +as the stream-lock needs to be held. + +The format for the new segment will be the current format of the source, as +configured with gst_base_src_set_format() + Use gst_base_src_new_segment() + + + %TRUE if preparation of the seamless segment succeeded. + + + + + The source + + + + The new start value for the segment + + + + Stop value for the new segment + + + + The new time value for the start of the new segment + + + + + + Prepare a new segment for emission downstream. This function must +only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, +as the stream-lock needs to be held. + +The format for the @segment must be identical with the current format +of the source, as configured with gst_base_src_set_format(). + +The format of @src must not be %GST_FORMAT_UNDEFINED and the format +should be configured via gst_base_src_set_format() before calling this method. + + + %TRUE if preparation of new segment succeeded. + + + + + a #GstBaseSrc + + + + a pointer to a #GstSegment + + + + + + Query the source for the latency parameters. @live will be %TRUE when @src is +configured as a live source. @min_latency and @max_latency will be set +to the difference between the running time and the timestamp of the first +buffer. + +This function is mostly used by subclasses. + + + %TRUE if the query succeeded. + + + + + the source + + + + if the source is live + + + + the min latency of the source + + + + the max latency of the source + + + + + + Configure async behaviour in @src, no state change will block. The open, +close, start, stop, play and pause virtual methods will be executed in a +different thread and are thus allowed to perform blocking operations. Any +blocking operation should be unblocked with the unlock vmethod. + + + + + + + base source instance + + + + new async mode + + + + + + If @automatic_eos is %TRUE, @src will automatically go EOS if a buffer +after the total size is returned. By default this is %TRUE but sources +that can't return an authoritative size and only know that they're EOS +when trying to read more should set this to %FALSE. + +When @src operates in %GST_FORMAT_TIME, #GstBaseSrc will send an EOS +when a buffer outside of the currently configured segment is pushed if +@automatic_eos is %TRUE. Since 1.16, if @automatic_eos is %FALSE an +EOS will be pushed only when the #GstBaseSrcClass.create() implementation +returns %GST_FLOW_EOS. + + + + + + + base source instance + + + + automatic eos + + + + + + Set the number of bytes that @src will push out with each buffer. When +@blocksize is set to -1, a default length will be used. + + + + + + + the source + + + + the new blocksize in bytes + + + + + + Set new caps on the basesrc source pad. + + + %TRUE if the caps could be set + + + + + a #GstBaseSrc + + + + a #GstCaps + + + + + + Configure @src to automatically timestamp outgoing buffers based on the +current running_time of the pipeline. This property is mostly useful for live +sources. + + + + + + + the source + + + + enable or disable timestamping + + + + + + If not @dynamic, size is only updated when needed, such as when trying to +read past current tracked size. Otherwise, size is checked for upon each +read. + + + + + + + base source instance + + + + new dynamic size mode + + + + + + Sets the default format of the source. This will be the format used +for sending SEGMENT events and for performing seeks. + +If a format of GST_FORMAT_BYTES is set, the element will be able to +operate in pull mode if the #GstBaseSrcClass.is_seekable() returns %TRUE. + +This function must only be called in states < %GST_STATE_PAUSED. + + + + + + + base source instance + + + + the format to use + + + + + + If the element listens to a live source, @live should +be set to %TRUE. + +A live source will not produce data in the PAUSED state and +will therefore not be able to participate in the PREROLL phase +of a pipeline. To signal this fact to the application and the +pipeline, the state change return value of the live source will +be GST_STATE_CHANGE_NO_PREROLL. + + + + + + + base source instance + + + + new live-mode + + + + + + Complete an asynchronous start operation. When the subclass overrides the +start method, it should call gst_base_src_start_complete() when the start +operation completes either from the same thread or from an asynchronous +helper thread. + + + + + + + base source instance + + + + a #GstFlowReturn + + + + + + Wait until the start operation completes. + + + a #GstFlowReturn. + + + + + base source instance + + + + + + Subclasses can call this from their create virtual method implementation +to submit a buffer list to be pushed out later. This is useful in +cases where the create function wants to produce multiple buffers to be +pushed out in one go in form of a #GstBufferList, which can reduce overhead +drastically, especially for packetised inputs (for data streams where +the packetisation/chunking is not important it is usually more efficient +to return larger buffers instead). + +Subclasses that use this function from their create function must return +%GST_FLOW_OK and no buffer from their create virtual method implementation. +If a buffer is returned after a buffer list has also been submitted via this +function the behaviour is undefined. + +Subclasses must only call this function once per create function call and +subclasses must only call this function when the source operates in push +mode. + + + + + + + a #GstBaseSrc + + + + a #GstBufferList + + + + + + If the #GstBaseSrcClass.create() method performs its own synchronisation +against the clock it must unblock when going from PLAYING to the PAUSED state +and call this method before continuing to produce the remaining data. + +This function will block until a state change to PLAYING happens (in which +case this function returns %GST_FLOW_OK) or the processing must be stopped due +to a state change to READY or a FLUSH event (in which case this function +returns %GST_FLOW_FLUSHING). + + + %GST_FLOW_OK if @src is PLAYING and processing can +continue. Any other return value should be returned from the create vmethod. + + + + + the src + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At the minimum, the @create method should be overridden to produce +buffers. + + + Element parent class + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + base source instance + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the caps could be set + + + + + a #GstBaseSrc + + + + a #GstCaps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstElement flags that a basesrc element may have. + + + has source is starting + + + has source been started + + + offset to define more flags + + + + + + + This base class is for filter elements that process data. Elements +that are suitable for implementation using #GstBaseTransform are ones +where the size and caps of the output is known entirely from the input +caps and buffer sizes. These include elements that directly transform +one buffer into another, modify the contents of a buffer in-place, as +well as elements that collate multiple input buffers into one output buffer, +or that expand one input buffer into multiple output buffers. See below +for more concrete use cases. + +It provides for: + +* one sinkpad and one srcpad +* Possible formats on sink and source pad implemented + with custom transform_caps function. By default uses + same format on sink and source. + +* Handles state changes +* Does flushing +* Push mode +* Pull mode if the sub-class transform can operate on arbitrary data + +# Use Cases + +## Passthrough mode + + * Element has no interest in modifying the buffer. It may want to inspect it, + in which case the element should have a transform_ip function. If there + is no transform_ip function in passthrough mode, the buffer is pushed + intact. + + * The #GstBaseTransformClass.passthrough_on_same_caps variable + will automatically set/unset passthrough based on whether the + element negotiates the same caps on both pads. + + * #GstBaseTransformClass.passthrough_on_same_caps on an element that + doesn't implement a transform_caps function is useful for elements that + only inspect data (such as level) + + * Example elements + + * Level + * Videoscale, audioconvert, videoconvert, audioresample in certain modes. + +## Modifications in-place - input buffer and output buffer are the same thing. + +* The element must implement a transform_ip function. +* Output buffer size must <= input buffer size +* If the always_in_place flag is set, non-writable buffers will be copied + and passed to the transform_ip function, otherwise a new buffer will be + created and the transform function called. + +* Incoming writable buffers will be passed to the transform_ip function + immediately. +* only implementing transform_ip and not transform implies always_in_place = %TRUE + + * Example elements: + * Volume + * Audioconvert in certain modes (signed/unsigned conversion) + * videoconvert in certain modes (endianness swapping) + +## Modifications only to the caps/metadata of a buffer + +* The element does not require writable data, but non-writable buffers + should be subbuffered so that the meta-information can be replaced. + +* Elements wishing to operate in this mode should replace the + prepare_output_buffer method to create subbuffers of the input buffer + and set always_in_place to %TRUE + +* Example elements + * Capsfilter when setting caps on outgoing buffers that have + none. + * identity when it is going to re-timestamp buffers by + datarate. + +## Normal mode + * always_in_place flag is not set, or there is no transform_ip function + * Element will receive an input buffer and output buffer to operate on. + * Output buffer is allocated by calling the prepare_output_buffer function. + * Example elements: + * Videoscale, videoconvert, audioconvert when doing + scaling/conversions + +## Special output buffer allocations + * Elements which need to do special allocation of their output buffers + beyond allocating output buffers via the negotiated allocator or + buffer pool should implement the prepare_output_buffer method. + + * Example elements: + * efence + +# Sub-class settable flags on GstBaseTransform + +* passthrough + + * Implies that in the current configuration, the sub-class is not interested in modifying the buffers. + * Elements which are always in passthrough mode whenever the same caps has been negotiated on both pads can set the class variable passthrough_on_same_caps to have this behaviour automatically. + +* always_in_place + * Determines whether a non-writable buffer will be copied before passing + to the transform_ip function. + + * Implied %TRUE if no transform function is implemented. + * Implied %FALSE if ONLY transform function is implemented. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lets #GstBaseTransform sub-classes know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after use. + + + + + + + a #GstBaseTransform + + + + the #GstAllocator +used + + + + the #GstAllocationParams of @allocator + + + + + + + + the instance of the #GstBufferPool used +by @trans; free it after use + + + + + a #GstBaseTransform + + + + + + See if @trans is configured as a in_place transform. + + + %TRUE if the transform is configured in in_place mode. + +MT safe. + + + + + the #GstBaseTransform to query + + + + + + See if @trans is configured as a passthrough transform. + + + %TRUE if the transform is configured in passthrough mode. + +MT safe. + + + + + the #GstBaseTransform to query + + + + + + Queries if the transform will handle QoS. + + + %TRUE if QoS is enabled. + +MT safe. + + + + + a #GstBaseTransform + + + + + + Negotiates src pad caps with downstream elements if the source pad is +marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in +any case. But marks it again if negotiation fails. + +Do not call this in the #GstBaseTransformClass.transform() or +#GstBaseTransformClass.transform_ip() vmethod. Call this in +#GstBaseTransformClass.submit_input_buffer(), +#GstBaseTransformClass.prepare_output_buffer() or in +#GstBaseTransformClass.generate_output() _before_ any output buffer is +allocated. + +It will be default be called when handling an ALLOCATION query or at the +very beginning of the default #GstBaseTransformClass.submit_input_buffer() +implementation. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + the #GstBaseTransform to set + + + + + + Instructs @trans to request renegotiation upstream. This function is +typically called after properties on the transform were set that +influence the input format. + + + + + + + a #GstBaseTransform + + + + + + Instructs @trans to renegotiate a new downstream transform on the next +buffer. This function is typically called after properties on the transform +were set that influence the output format. + + + + + + + a #GstBaseTransform + + + + + + If @gap_aware is %FALSE (the default), output buffers will have the +%GST_BUFFER_FLAG_GAP flag unset. + +If set to %TRUE, the element must handle output buffers with this flag set +correctly, i.e. it can assume that the buffer contains neutral data but must +unset the flag if the output is no neutral data. + +MT safe. + + + + + + + a #GstBaseTransform + + + + New state + + + + + + Determines whether a non-writable buffer will be copied before passing +to the transform_ip function. + + * Always %TRUE if no transform function is implemented. + * Always %FALSE if ONLY transform function is implemented. + +MT safe. + + + + + + + the #GstBaseTransform to modify + + + + Boolean value indicating that we would like to operate +on in_place buffers. + + + + + + Set passthrough mode for this filter by default. This is mostly +useful for filters that do not care about negotiation. + +Always %TRUE for filters which don't implement either a transform +or transform_ip or generate_output method. + +MT safe. + + + + + + + the #GstBaseTransform to set + + + + boolean indicating passthrough mode. + + + + + + If @prefer_passthrough is %TRUE (the default), @trans will check and +prefer passthrough caps from the list of caps returned by the +transform_caps vmethod. + +If set to %FALSE, the element must order the caps returned from the +transform_caps function in such a way that the preferred format is +first in the list. This can be interesting for transforms that can do +passthrough transforms but prefer to do something else, like a +capsfilter. + +MT safe. + + + + + + + a #GstBaseTransform + + + + New state + + + + + + Enable or disable QoS handling in the transform. + +MT safe. + + + + + + + a #GstBaseTransform + + + + new state + + + + + + Set the QoS parameters in the transform. This function is called internally +when a QOS event is received but subclasses can provide custom information +when needed. + +MT safe. + + + + + + + a #GstBaseTransform + + + + the proportion + + + + the diff against the clock + + + + the timestamp of the buffer generating the QoS expressed in +running_time. + + + + + + Updates the srcpad caps and sends the caps downstream. This function +can be used by subclasses when they have already negotiated their caps +but found a change in them (or computed new information). This way, +they can notify downstream about that change without losing any +buffer. + + + %TRUE if the caps could be sent downstream %FALSE otherwise + + + + + a #GstBaseTransform + + + + An updated version of the srcpad caps to be pushed +downstream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum either @transform or @transform_ip need to be overridden. +If the element can overwrite the input data with the results (data is of the +same type and quantity) it should provide @transform_ip. + + + Element parent class + + + + If set to %TRUE, passthrough mode will be + automatically enabled if the caps are the same. + Set to %FALSE by default. + + + + If set to %TRUE, @transform_ip will be called in + passthrough mode. The passed buffer might not be + writable. When %FALSE, neither @transform nor + @transform_ip will be called in passthrough mode. + Set to %TRUE by default. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstBitReader provides a bit reader that can read any number of bits +from a memory buffer. It provides functions for reading any number of bits +into 8, 16, 32 and 64 bit variables. + + + Data from which the bit reader will + read + + + + + + Size of @data in bytes + + + + Current byte position + + + + Bit position in the current byte + + + + + + + + + Frees a #GstBitReader instance, which was previously allocated by +gst_bit_reader_new(). + + + + + + + a #GstBitReader instance + + + + + + Read @nbits bits into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint16 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint32 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint64 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint8 to store the result + + + + number of bits to read + + + + + + Returns the current position of a #GstBitReader instance in bits. + + + The current position of @reader in bits. + + + + + a #GstBitReader instance + + + + + + Returns the remaining number of bits of a #GstBitReader instance. + + + The remaining number of bits of @reader instance. + + + + + a #GstBitReader instance + + + + + + Returns the total number of bits of a #GstBitReader instance. + + + The total number of bits of @reader instance. + + + + + a #GstBitReader instance + + + + + + Initializes a #GstBitReader instance to read from @data. This function +can be called on already initialized instances. + + + + + + + a #GstBitReader instance + + + + data from which the bit reader should read + + + + + + Size of @data in bytes + + + + + + Read @nbits bits into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint16 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint32 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint64 to store the result + + + + number of bits to read + + + + + + Read @nbits bits into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + Pointer to a #guint8 to store the result + + + + number of bits to read + + + + + + Sets the new position of a #GstBitReader instance to @pos in bits. + + + %TRUE if the position could be set successfully, %FALSE +otherwise. + + + + + a #GstBitReader instance + + + + The new position in bits + + + + + + Skips @nbits bits of the #GstBitReader instance. + + + %TRUE if @nbits bits could be skipped, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + the number of bits to skip + + + + + + Skips until the next byte. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitReader instance + + + + + + Create a new #GstBitReader instance, which will read from @data. + +Free-function: gst_bit_reader_free + + + a new #GstBitReader instance + + + + + Data from which the #GstBitReader + should read + + + + + + Size of @data in bytes + + + + + + + #GstBitWriter provides a bit writer that can write any number of +bits into a memory buffer. It provides functions for writing any +number of bits into 8, 16, 32 and 64 bit variables. + + + Allocated @data for bit writer to write + + + + Size of written @data in bits + + + + + + + + + + + + + + + + + + Write trailing bit to align last byte of @data. @trailing_bit can +only be 1 or 0. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + trailing bits of last byte, 0 or 1 + + + + + + Frees @bitwriter and the allocated data inside. + + + + + + + #GstBitWriter instance + + + + + + Frees @bitwriter without destroying the internal data, which is +returned as #GstBuffer. + +Free-function: gst_buffer_unref + + + a new allocated #GstBuffer wrapping the + data inside. gst_buffer_unref() after usage. + + + + + #GstBitWriter instance + + + + + + Frees @bitwriter without destroying the internal data, which is +returned. + +Free-function: g_free + + + the current data. g_free() after + usage. + + + + + + + #GstBitWriter instance + + + + + + Get written data pointer + + + data pointer + + + + + a #GstBitWriter instance + + + + + + + + + + + + + + + + + Get size of written @data + + + size of bits written in @data + + + + + a #GstBitWriter instance + + + + + + Initializes @bitwriter to an empty instance. + + + + + + + #GstBitWriter instance + + + + + + Initializes @bitwriter with the given memory area @data. IF +@initialized is %TRUE it is possible to read @size bits from the +#GstBitWriter from the beginning. + + + + + + + #GstBitWriter instance + + + + Memory area for writing + + + + + + Size of @data in bytes + + + + If %TRUE the complete data can be read from the beginning + + + + + + Initializes a #GstBitWriter instance and allocates the given data +@size. + + + + + + + #GstBitWriter instance + + + + the size on bytes to allocate for data + + + + If %TRUE the data can't be reallocated + + + + + + Write @nbits bits of @value to #GstBitWriter. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + value of #guint16 to write + + + + number of bits to write + + + + + + Write @nbits bits of @value to #GstBitWriter. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + value of #guint32 to write + + + + number of bits to write + + + + + + Write @nbits bits of @value to #GstBitWriter. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + value of #guint64 to write + + + + number of bits to write + + + + + + Write @nbits bits of @value to #GstBitWriter. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + value of #guint8 to write + + + + number of bits to write + + + + + + Write @nbytes bytes of @data to #GstBitWriter. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstBitWriter instance + + + + pointer of data to write + + + + number of bytes to write + + + + + + Resets @bitwriter and frees the data if it's owned by @bitwriter. + + + + + + + #GstBitWriter instance + + + + + + Resets @bitwriter and returns the current data as #GstBuffer. + +Free-function: gst_buffer_unref + + + a new allocated #GstBuffer wrapping the + current data. gst_buffer_unref() after usage. + + + + + a #GstBitWriter instance + + + + + + Resets @bitwriter and returns the current data. + +Free-function: g_free + + + the current data. g_free() after + usage. + + + + + + + a #GstBitWriter instance + + + + + + + + + + + + + + + + + + + + Creates a new, empty #GstBitWriter instance. + +Free-function: gst_bit_writer_free + + + a new, empty #GstByteWriter instance + + + + + Creates a new #GstBitWriter instance with the given memory area. If +@initialized is %TRUE it is possible to read @size bits from the +#GstBitWriter from the beginning. + +Free-function: gst_bit_writer_free + + + a new #GstBitWriter instance + + + + + Memory area for writing + + + + Size of @data in bytes + + + + if %TRUE the complete data can be read from the beginning + + + + + + Creates a #GstBitWriter instance with the given initial data size. + +Free-function: gst_bit_writer_free + + + a new #GstBitWriter instance + + + + + Initial size of data in bytes + + + + If %TRUE the data can't be reallocated + + + + + + + #GstByteReader provides a byte reader that can read different integer and +floating point types from a memory buffer. It provides functions for reading +signed/unsigned, little/big endian integers of 8, 16, 24, 32 and 64 bits +and functions for reading little/big endian floating points numbers of +32 and 64 bits. It also provides functions to read NUL-terminated strings +in various character encodings. + + + Data from which the bit reader will + read + + + + + + Size of @data in bytes + + + + Current byte position + + + + + + + + + Free-function: g_free + +Returns a newly-allocated copy of the current data +position if at least @size bytes are left and +updates the current position. Free with g_free() when no longer needed. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Size in bytes + + + + address of a + #guint8 pointer variable in which to store the result + + + + + + + + Free-function: g_free + +Returns a newly-allocated copy of the current data position if there is +a NUL-terminated UTF-16 string in the data (this could be an empty string +as well), and advances the current position. + +No input checking for valid UTF-16 is done. This function is endianness +agnostic - you should not assume the UTF-16 characters are in host +endianness. + +This function will fail if no NUL-terminator was found in in the data. + +Note: there is no peek or get variant of this function to ensure correct +byte alignment of the UTF-16 string. + + + %TRUE if a string could be read, %FALSE otherwise. The + string put into @str must be freed with g_free() when no longer needed. + + + + + a #GstByteReader instance + + + + address of a + #guint16 pointer variable in which to store the result + + + + + + + + Free-function: g_free + +Returns a newly-allocated copy of the current data position if there is +a NUL-terminated UTF-32 string in the data (this could be an empty string +as well), and advances the current position. + +No input checking for valid UTF-32 is done. This function is endianness +agnostic - you should not assume the UTF-32 characters are in host +endianness. + +This function will fail if no NUL-terminator was found in in the data. + +Note: there is no peek or get variant of this function to ensure correct +byte alignment of the UTF-32 string. + + + %TRUE if a string could be read, %FALSE otherwise. The + string put into @str must be freed with g_free() when no longer needed. + + + + + a #GstByteReader instance + + + + address of a + #guint32 pointer variable in which to store the result + + + + + + + + Free-function: g_free + +FIXME:Reads (copies) a NUL-terminated string in the #GstByteReader instance, +advancing the current position to the byte after the string. This will work +for any NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be read into @str, %FALSE otherwise. The + string put into @str must be freed with g_free() when no longer needed. + + + + + a #GstByteReader instance + + + + address of a + #gchar pointer variable in which to store the result + + + + + + + + Frees a #GstByteReader instance, which was previously allocated by +gst_byte_reader_new(). + + + + + + + a #GstByteReader instance + + + + + + Returns a constant pointer to the current data +position if at least @size bytes are left and +updates the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Size in bytes + + + + address of a + #guint8 pointer variable in which to store the result + + + + + + + + Read a 32 bit big endian floating point value into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gfloat to store the result + + + + + + Read a 32 bit little endian floating point value into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gfloat to store the result + + + + + + Read a 64 bit big endian floating point value into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gdouble to store the result + + + + + + Read a 64 bit little endian floating point value into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gdouble to store the result + + + + + + Read a signed 16 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint16 to store the result + + + + + + Read a signed 16 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint16 to store the result + + + + + + Read a signed 24 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 24 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 32 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 32 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 64 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint64 to store the result + + + + + + Read a signed 64 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint64 to store the result + + + + + + Read a signed 8 bit integer into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint8 to store the result + + + + + + Returns the current position of a #GstByteReader instance in bytes. + + + The current position of @reader in bytes. + + + + + a #GstByteReader instance + + + + + + Returns the remaining number of bytes of a #GstByteReader instance. + + + The remaining number of bytes of @reader instance. + + + + + a #GstByteReader instance + + + + + + Returns the total number of bytes of a #GstByteReader instance. + + + The total number of bytes of @reader instance. + + + + + a #GstByteReader instance + + + + + + Returns a constant pointer to the current data position if there is +a NUL-terminated string in the data (this could be just a NUL terminator), +advancing the current position to the byte after the string. This will work +for any NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. + +No input checking for valid UTF-8 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be found, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + address of a + #gchar pointer variable in which to store the result + + + + + + + + Initializes a #GstByteReader sub-reader instance to contain @size bytes of +data from the current position of @reader. This is useful to read chunked +formats and make sure that one doesn't read beyond the size of the sub-chunk. + +Unlike gst_byte_reader_peek_sub_reader(), this function also modifies the +position of @reader and moves it forward by @size bytes. + + + FALSE on error or if @reader does not contain @size more bytes from + the current position, and otherwise TRUE + + + + + an existing and initialized #GstByteReader instance + + + + a #GstByteReader instance to initialize as sub-reader + + + + size of @sub_reader in bytes + + + + + + Read an unsigned 16 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint16 to store the result + + + + + + Read an unsigned 16 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint16 to store the result + + + + + + Read an unsigned 24 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 24 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 32 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 32 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 64 bit big endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint64 to store the result + + + + + + Read an unsigned 64 bit little endian integer into @val +and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint64 to store the result + + + + + + Read an unsigned 8 bit integer into @val and update the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint8 to store the result + + + + + + Initializes a #GstByteReader instance to read from @data. This function +can be called on already initialized instances. + + + + + + + a #GstByteReader instance + + + + data from which + the #GstByteReader should read + + + + + + Size of @data in bytes + + + + + + Scan for pattern @pattern with applied mask @mask in the byte reader data, +starting from offset @offset relative to the current position. + +The bytes in @pattern and @mask are interpreted left-to-right, regardless +of endianness. All four bytes of the pattern must be present in the +byte reader data for it to match, even if the first or last bytes are masked +out. + +It is an error to call this function without making sure that there is +enough data (offset+size bytes) in the byte reader. + + + offset of the first match, or -1 if no match was found. + +Example: +|[ +// Assume the reader contains 0x00 0x01 0x02 ... 0xfe 0xff + +gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 0, 256); +// -> returns 0 +gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 1, 255); +// -> returns -1 +gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x01020304, 1, 255); +// -> returns 1 +gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0001, 0, 256); +// -> returns -1 +gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0203, 0, 256); +// -> returns 0 +gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 256); +// -> returns 2 +gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 4); +// -> returns -1 +]| + + + + + a #GstByteReader + + + + mask to apply to data before matching against @pattern + + + + pattern to match (after mask is applied) + + + + offset from which to start scanning, relative to the current + position + + + + number of bytes to scan from offset + + + + + + Scan for pattern @pattern with applied mask @mask in the byte reader data, +starting from offset @offset relative to the current position. + +The bytes in @pattern and @mask are interpreted left-to-right, regardless +of endianness. All four bytes of the pattern must be present in the +byte reader data for it to match, even if the first or last bytes are masked +out. + +It is an error to call this function without making sure that there is +enough data (offset+size bytes) in the byte reader. + + + offset of the first match, or -1 if no match was found. + + + + + a #GstByteReader + + + + mask to apply to data before matching against @pattern + + + + pattern to match (after mask is applied) + + + + offset from which to start scanning, relative to the current + position + + + + number of bytes to scan from offset + + + + pointer to uint32 to return matching data + + + + + + Returns a constant pointer to the current data +position if at least @size bytes are left and +keeps the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Size in bytes + + + + address of a + #guint8 pointer variable in which to store the result + + + + + + + + Read a 32 bit big endian floating point value into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gfloat to store the result + + + + + + Read a 32 bit little endian floating point value into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gfloat to store the result + + + + + + Read a 64 bit big endian floating point value into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gdouble to store the result + + + + + + Read a 64 bit little endian floating point value into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gdouble to store the result + + + + + + Read a signed 16 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint16 to store the result + + + + + + Read a signed 16 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint16 to store the result + + + + + + Read a signed 24 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 24 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 32 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 32 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint32 to store the result + + + + + + Read a signed 64 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint64 to store the result + + + + + + Read a signed 64 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint64 to store the result + + + + + + Read a signed 8 bit integer into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #gint8 to store the result + + + + + + Returns a constant pointer to the current data position if there is +a NUL-terminated string in the data (this could be just a NUL terminator). +The current position will be maintained. This will work for any +NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. + +No input checking for valid UTF-8 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be skipped, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + address of a + #gchar pointer variable in which to store the result + + + + + + + + Initializes a #GstByteReader sub-reader instance to contain @size bytes of +data from the current position of @reader. This is useful to read chunked +formats and make sure that one doesn't read beyond the size of the sub-chunk. + +Unlike gst_byte_reader_get_sub_reader(), this function does not modify the +current position of @reader. + + + FALSE on error or if @reader does not contain @size more bytes from + the current position, and otherwise TRUE + + + + + an existing and initialized #GstByteReader instance + + + + a #GstByteReader instance to initialize as sub-reader + + + + size of @sub_reader in bytes + + + + + + Read an unsigned 16 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint16 to store the result + + + + + + Read an unsigned 16 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint16 to store the result + + + + + + Read an unsigned 24 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 24 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 32 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 32 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint32 to store the result + + + + + + Read an unsigned 64 bit big endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint64 to store the result + + + + + + Read an unsigned 64 bit little endian integer into @val +but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint64 to store the result + + + + + + Read an unsigned 8 bit integer into @val but keep the current position. + + + %TRUE if successful, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + Pointer to a #guint8 to store the result + + + + + + Sets the new position of a #GstByteReader instance to @pos in bytes. + + + %TRUE if the position could be set successfully, %FALSE +otherwise. + + + + + a #GstByteReader instance + + + + The new position in bytes + + + + + + Skips @nbytes bytes of the #GstByteReader instance. + + + %TRUE if @nbytes bytes could be skipped, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + the number of bytes to skip + + + + + + Skips a NUL-terminated UTF-16 string in the #GstByteReader instance, +advancing the current position to the byte after the string. + +No input checking for valid UTF-16 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be skipped, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + + + Skips a NUL-terminated UTF-32 string in the #GstByteReader instance, +advancing the current position to the byte after the string. + +No input checking for valid UTF-32 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be skipped, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + + + Skips a NUL-terminated string in the #GstByteReader instance, advancing +the current position to the byte after the string. This will work for +any NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done. + +This function will fail if no NUL-terminator was found in in the data. + + + %TRUE if a string could be skipped, %FALSE otherwise. + + + + + a #GstByteReader instance + + + + + + Create a new #GstByteReader instance, which will read from @data. + +Free-function: gst_byte_reader_free + + + a new #GstByteReader instance + + + + + data from which the + #GstByteReader should read + + + + + + Size of @data in bytes + + + + + + + #GstByteWriter provides a byte writer and reader that can write/read different +integer and floating point types to/from a memory buffer. It provides functions +for writing/reading signed/unsigned, little/big endian integers of 8, 16, 24, +32 and 64 bits and functions for reading little/big endian floating points numbers of +32 and 64 bits. It also provides functions to write/read NUL-terminated strings +in various character encodings. + + + #GstByteReader parent + + + + Allocation size of the data + + + + If %TRUE no reallocations are allowed + + + + If %FALSE no reallocations are allowed and copies of data are returned + + + + + + + + + Checks if enough free space from the current write cursor is +available and reallocates if necessary. + + + %TRUE if at least @size bytes are still available + + + + + #GstByteWriter instance + + + + Number of bytes that should be available + + + + + + Writes @size bytes containing @value to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to be written + + + + Number of bytes to be written + + + + + + Frees @writer and all memory allocated by it. + + + + + + + #GstByteWriter instance + + + + + + Frees @writer and all memory allocated by it except +the current data, which is returned as #GstBuffer. + +Free-function: gst_buffer_unref + + + the current data as buffer. gst_buffer_unref() + after usage. + + + + + #GstByteWriter instance + + + + + + Frees @writer and all memory allocated by it except +the current data, which is returned. + +Free-function: g_free + + + the current data. g_free() after usage. + + + + + #GstByteWriter instance + + + + + + Returns the remaining size of data that can still be written. If +-1 is returned the remaining size is only limited by system resources. + + + the remaining size of data that can still be written + + + + + #GstByteWriter instance + + + + + + Initializes @writer to an empty instance + + + + + + + #GstByteWriter instance + + + + + + Initializes @writer with the given +memory area. If @initialized is %TRUE it is possible to +read @size bytes from the #GstByteWriter from the beginning. + + + + + + + #GstByteWriter instance + + + + Memory area for writing + + + + + + Size of @data in bytes + + + + If %TRUE the complete data can be read from the beginning + + + + + + Initializes @writer with the given initial data size. + + + + + + + #GstByteWriter instance + + + + Initial size of data + + + + If %TRUE the data can't be reallocated + + + + + + Writes @size bytes of @data to @writer. + + + %TRUE if the data could be written + + + + + #GstByteWriter instance + + + + source #GstBuffer + + + + offset to copy from + + + + total size to copy. If -1, all data is copied + + + + + + Writes @size bytes of @data to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Data to write + + + + + + Size of @data in bytes + + + + + + Writes a big endian 32 bit float to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a little endian 32 bit float to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a big endian 64 bit float to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a little endian 64 bit float to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed big endian 16 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed little endian 16 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed big endian 24 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed little endian 24 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed big endian 32 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed little endian 32 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed big endian 64 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed little endian 64 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a signed 8 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a NUL-terminated UTF16 string to @writer (including the terminator). + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + UTF16 string to write + + + + + + + + Writes a NUL-terminated UTF32 string to @writer (including the terminator). + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + UTF32 string to write + + + + + + + + Writes a NUL-terminated UTF8 string to @writer (including the terminator). + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + UTF8 string to write + + + + + + Writes a unsigned big endian 16 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned little endian 16 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned big endian 24 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned little endian 24 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned big endian 32 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned little endian 32 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned big endian 64 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned little endian 64 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Writes a unsigned 8 bit integer to @writer. + + + %TRUE if the value could be written + + + + + #GstByteWriter instance + + + + Value to write + + + + + + Resets @writer and frees the data if it's +owned by @writer. + + + + + + + #GstByteWriter instance + + + + + + Resets @writer and returns the current data as buffer. + +Free-function: gst_buffer_unref + + + the current data as buffer. gst_buffer_unref() + after usage. + + + + + #GstByteWriter instance + + + + + + Resets @writer and returns the current data. + +Free-function: g_free + + + the current data. g_free() after +usage. + + + + + + + #GstByteWriter instance + + + + + + Creates a new, empty #GstByteWriter instance + +Free-function: gst_byte_writer_free + + + a new, empty #GstByteWriter instance + + + + + Creates a new #GstByteWriter instance with the given +memory area. If @initialized is %TRUE it is possible to +read @size bytes from the #GstByteWriter from the beginning. + +Free-function: gst_byte_writer_free + + + a new #GstByteWriter instance + + + + + Memory area for writing + + + + Size of @data in bytes + + + + If %TRUE the complete data can be read from the beginning + + + + + + Creates a new #GstByteWriter instance with the given +initial data size. + +Free-function: gst_byte_writer_free + + + a new #GstByteWriter instance + + + + + Initial size of data + + + + If %TRUE the data can't be reallocated + + + + + + + + + + + + + + + + + + + + + Returns the DTS that has been converted to running time when using +gst_collect_pads_clip_running_time(). Unlike the value saved into +the buffer, this value is of type gint64 and may be negative. This allow +properly handling streams with frame reordering where the first DTS may +be negative. If the initial DTS was not set, this value will be +set to %G_MININT64. + + + + A #GstCollectData. + + + + + Check if running DTS value store is valid. + + + + A #GstCollectData. + + + + + + + + + + + + Get the stream lock of @pads. The stream lock is used to coordinate and +serialize execution among the various streams being collected, and in +protecting the resources used to accomplish this. + + + + a #GstCollectPads + + + + + A flags word containing #GstCollectPadsStateFlags flags set +on this collected pad. + + + + a #GstCollectData. + + + + + Gives the status of a specific flag on a collected pad. + + + + a #GstCollectData. + + + the #GstCollectPadsStateFlags to check. + + + + + Sets a state flag on a collected pad. + + + + a #GstCollectData. + + + the #GstCollectPadsStateFlags to set. + + + + + Clears a state flag on a collected pad. + + + + a #GstCollectData. + + + the #GstCollectPadsStateFlags to clear. + + + + + Lock the stream lock of @pads. + + + + a #GstCollectPads + + + + + Unlock the stream lock of @pads. + + + + a #GstCollectPads + + + + + Structure used by the collect_pads. + + + owner #GstCollectPads + + + + #GstPad managed by this data + + + + currently queued buffer. + + + + position in the buffer + + + + last segment received. + + + + + + + + + + + + + + + + + + + + + + + + + A function that will be called when the #GstCollectData will be freed. +It is passed the pointer to the structure and should free any custom +memory and resources allocated for it. + + + + + + + the #GstCollectData that will be freed + + + + + + + + + Manages a set of pads that operate in collect mode. This means that control +is given to the manager of this object when all pads have data. + + * Collectpads are created with gst_collect_pads_new(). A callback should then + be installed with gst_collect_pads_set_function (). + + * Pads are added to the collection with gst_collect_pads_add_pad()/ + gst_collect_pads_remove_pad(). The pad has to be a sinkpad. When added, + the chain, event and query functions of the pad are overridden. The + element_private of the pad is used to store private information for the + collectpads. + + * For each pad, data is queued in the _chain function or by + performing a pull_range. + + * When data is queued on all pads in waiting mode, the callback function is called. + + * Data can be dequeued from the pad with the gst_collect_pads_pop() method. + One can peek at the data with the gst_collect_pads_peek() function. + These functions will return %NULL if the pad received an EOS event. When all + pads return %NULL from a gst_collect_pads_peek(), the element can emit an EOS + event itself. + + * Data can also be dequeued in byte units using the gst_collect_pads_available(), + gst_collect_pads_read_buffer() and gst_collect_pads_flush() calls. + + * Elements should call gst_collect_pads_start() and gst_collect_pads_stop() in + their state change functions to start and stop the processing of the collectpads. + The gst_collect_pads_stop() call should be called before calling the parent + element state change function in the PAUSED_TO_READY state change to ensure + no pad is blocked and the element can finish streaming. + + * gst_collect_pads_set_waiting() sets a pad to waiting or non-waiting mode. + CollectPads element is not waiting for data to be collected on non-waiting pads. + Thus these pads may but need not have data when the callback is called. + All pads are in waiting mode by default. + + + Create a new instance of #GstCollectPads. + +MT safe. + + + a new #GstCollectPads, or %NULL in case of an error. + + + + + Add a pad to the collection of collect pads. The pad has to be +a sinkpad. The refcount of the pad is incremented. Use +gst_collect_pads_remove_pad() to remove the pad from the collection +again. + +You specify a size for the returned #GstCollectData structure +so that you can use it to store additional information. + +You can also specify a #GstCollectDataDestroyNotify that will be called +just before the #GstCollectData structure is freed. It is passed the +pointer to the structure and should free any custom memory and resources +allocated for it. + +Keeping a pad locked in waiting state is only relevant when using +the default collection algorithm (providing the oldest buffer). +It ensures a buffer must be available on this pad for a collection +to take place. This is of typical use to a muxer element where +non-subtitle streams should always be in waiting state, +e.g. to assure that caps information is available on all these streams +when initial headers have to be written. + +The pad will be automatically activated in push mode when @pads is +started. + +MT safe. + + + a new #GstCollectData to identify the + new pad. Or %NULL if wrong parameters are supplied. + + + + + the collectpads to use + + + + the pad to add + + + + the size of the returned #GstCollectData structure + + + + function to be called before the returned + #GstCollectData structure is freed + + + + whether to lock this pad in usual waiting state + + + + + + Query how much bytes can be read from each queued buffer. This means +that the result of this call is the maximum number of bytes that can +be read from each of the pads. + +This function should be called with @pads STREAM_LOCK held, such as +in the callback. + +MT safe. + + + The maximum number of bytes queued on all pads. This function +returns 0 if a pad has no queued buffer. + + + + + the collectpads to query + + + + + + Convenience clipping function that converts incoming buffer's timestamp +to running time, or clips the buffer if outside configured segment. + +Since 1.6, this clipping function also sets the DTS parameter of the +GstCollectData structure. This version of the running time DTS can be +negative. G_MININT64 is used to indicate invalid value. + + + + + + + the collectpads to use + + + + collect data of corresponding pad + + + + buffer being clipped + + + + output buffer with running time, or NULL if clipped + + + + user data (unused) + + + + + + Default #GstCollectPads event handling that elements should always +chain up to to ensure proper operation. Element might however indicate +event should not be forwarded downstream. + + + + + + + the collectpads to use + + + + collect data of corresponding pad + + + + event being processed + + + + process but do not send event downstream + + + + + + Flush @size bytes from the pad @data. + +This function should be called with @pads STREAM_LOCK held, such as +in the callback. + +MT safe. + + + The number of bytes flushed This can be less than @size and +is 0 if the pad was end-of-stream. + + + + + the collectpads to query + + + + the data to use + + + + the number of bytes to flush + + + + + + Peek at the buffer currently queued in @data. This function +should be called with the @pads STREAM_LOCK held, such as in the callback +handler. + +MT safe. + + + The buffer in @data or %NULL if no +buffer is queued. should unref the buffer after usage. + + + + + the collectpads to peek + + + + the data to use + + + + + + Pop the buffer currently queued in @data. This function +should be called with the @pads STREAM_LOCK held, such as in the callback +handler. + +MT safe. + + + The buffer in @data or %NULL if no +buffer was queued. You should unref the buffer after usage. + + + + + the collectpads to pop + + + + the data to use + + + + + + Default #GstCollectPads query handling that elements should always +chain up to to ensure proper operation. Element might however indicate +query should not be forwarded downstream. + + + + + + + the collectpads to use + + + + collect data of corresponding pad + + + + query being processed + + + + process but do not send event downstream + + + + + + Get a subbuffer of @size bytes from the given pad @data. + +This function should be called with @pads STREAM_LOCK held, such as in the +callback. + +MT safe. + + + A sub buffer. The size of the buffer can +be less that requested. A return of %NULL signals that the pad is +end-of-stream. Unref the buffer after use. + + + + + the collectpads to query + + + + the data to use + + + + the number of bytes to read + + + + + + Remove a pad from the collection of collect pads. This function will also +free the #GstCollectData and all the resources that were allocated with +gst_collect_pads_add_pad(). + +The pad will be deactivated automatically when @pads is stopped. + +MT safe. + + + %TRUE if the pad could be removed. + + + + + the collectpads to use + + + + the pad to remove + + + + + + Set the callback function and user data that will be called with +the oldest buffer when all pads have been collected, or %NULL on EOS. +If a buffer is passed, the callback owns a reference and must unref +it. + +MT safe. + + + + + + + the collectpads to use + + + + the function to set + + + + user data passed to the function + + + + + + Install a clipping function that is called right after a buffer is received +on a pad managed by @pads. See #GstCollectPadsClipFunction for more info. + + + + + + + the collectpads to use + + + + clip function to install + + + + user data to pass to @clip_func + + + + + + Set the timestamp comparison function. + +MT safe. + + + + + + + the pads to use + + + + the function to set + + + + user data passed to the function + + + + + + Set the event callback function and user data that will be called when +collectpads has received an event originating from one of the collected +pads. If the event being processed is a serialized one, this callback is +called with @pads STREAM_LOCK held, otherwise not. As this lock should be +held when calling a number of CollectPads functions, it should be acquired +if so (unusually) needed. + +MT safe. + + + + + + + the collectpads to use + + + + the function to set + + + + user data passed to the function + + + + + + Install a flush function that is called when the internal +state of all pads should be flushed as part of flushing seek +handling. See #GstCollectPadsFlushFunction for more info. + + + + + + + the collectpads to use + + + + flush function to install + + + + user data to pass to @func + + + + + + Change the flushing state of all the pads in the collection. No pad +is able to accept anymore data when @flushing is %TRUE. Calling this +function with @flushing %FALSE makes @pads accept data again. +Caller must ensure that downstream streaming (thread) is not blocked, +e.g. by sending a FLUSH_START downstream. + +MT safe. + + + + + + + the collectpads to use + + + + desired state of the pads + + + + + + CollectPads provides a default collection algorithm that will determine +the oldest buffer available on all of its pads, and then delegate +to a configured callback. +However, if circumstances are more complicated and/or more control +is desired, this sets a callback that will be invoked instead when +all the pads added to the collection have buffers queued. +Evidently, this callback is not compatible with +gst_collect_pads_set_buffer_function() callback. +If this callback is set, the former will be unset. + +MT safe. + + + + + + + the collectpads to use + + + + the function to set + + + + user data passed to the function + + + + + + Set the query callback function and user data that will be called after +collectpads has received a query originating from one of the collected +pads. If the query being processed is a serialized one, this callback is +called with @pads STREAM_LOCK held, otherwise not. As this lock should be +held when calling a number of CollectPads functions, it should be acquired +if so (unusually) needed. + +MT safe. + + + + + + + the collectpads to use + + + + the function to set + + + + user data passed to the function + + + + + + Sets a pad to waiting or non-waiting mode, if at least this pad +has not been created with locked waiting state, +in which case nothing happens. + +This function should be called with @pads STREAM_LOCK held, such as +in the callback. + +MT safe. + + + + + + + the collectpads + + + + the data to use + + + + boolean indicating whether this pad should operate + in waiting or non-waiting mode + + + + + + Default #GstCollectPads event handling for the src pad of elements. +Elements can chain up to this to let flushing seek event handling +be done by #GstCollectPads. + + + + + + + the #GstCollectPads to use + + + + src #GstPad that received the event + + + + event being processed + + + + + + Starts the processing of data in the collect_pads. + +MT safe. + + + + + + + the collectpads to use + + + + + + Stops the processing of data in the collect_pads. this function +will also unblock any blocking operations. + +MT safe. + + + + + + + the collectpads to use + + + + + + Get a subbuffer of @size bytes from the given pad @data. Flushes the amount +of read bytes. + +This function should be called with @pads STREAM_LOCK held, such as in the +callback. + +MT safe. + + + A sub buffer. The size of the buffer can +be less that requested. A return of %NULL signals that the pad is +end-of-stream. Unref the buffer after use. + + + + + the collectpads to query + + + + the data to use + + + + the number of bytes to read + + + + + + + + + #GList of #GstCollectData managed + by this #GstCollectPads. + + + + + + + + + + + + + + + + + + A function that will be called when a (considered oldest) buffer can be muxed. +If all pads have reached EOS, this function is called with %NULL @buffer +and %NULL @data. + + + %GST_FLOW_OK for success + + + + + the #GstCollectPads that triggered the callback + + + + the #GstCollectData of pad that has received the buffer + + + + the #GstBuffer + + + + user data passed to gst_collect_pads_set_buffer_function() + + + + + + + + + + + + + + + + + A function that will be called when @inbuffer is received on the pad managed +by @data in the collectpad object @pads. + +The function should use the segment of @data and the negotiated media type on +the pad to perform clipping of @inbuffer. + +This function takes ownership of @inbuffer and should output a buffer in +@outbuffer or return %NULL in @outbuffer if the buffer should be dropped. + + + a #GstFlowReturn that corresponds to the result of clipping. + + + + + a #GstCollectPads + + + + a #GstCollectData + + + + the input #GstBuffer + + + + the output #GstBuffer + + + + user data + + + + + + A function for comparing two timestamps of buffers or newsegments collected on one pad. + + + Integer less than zero when first timestamp is deemed older than the second one. + Zero if the timestamps are deemed equally old. + Integer greater than zero when second timestamp is deemed older than the first one. + + + + + the #GstCollectPads that is comparing the timestamps + + + + the first #GstCollectData + + + + the first timestamp + + + + the second #GstCollectData + + + + the second timestamp + + + + user data passed to gst_collect_pads_set_compare_function() + + + + + + A function that will be called while processing an event. It takes +ownership of the event and is responsible for chaining up (to +gst_collect_pads_event_default()) or dropping events (such typical cases +being handled by the default handler). + + + %TRUE if the pad could handle the event + + + + + the #GstCollectPads that triggered the callback + + + + the #GstPad that received an event + + + + the #GstEvent received + + + + user data passed to gst_collect_pads_set_event_function() + + + + + + A function that will be called while processing a flushing seek event. + +The function should flush any internal state of the element and the state of +all the pads. It should clear only the state not directly managed by the +@pads object. It is therefore not necessary to call +gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function. + + + + + + + a #GstCollectPads + + + + user data + + + + + + A function that will be called when all pads have received data. + + + %GST_FLOW_OK for success + + + + + the #GstCollectPads that triggered the callback + + + + user data passed to gst_collect_pads_set_function() + + + + + + + + + A function that will be called while processing a query. It takes +ownership of the query and is responsible for chaining up (to +events downstream (with gst_pad_event_default()). + + + %TRUE if the pad could handle the event + + + + + the #GstCollectPads that triggered the callback + + + + the #GstPad that received an event + + + + the #GstEvent received + + + + user data passed to gst_collect_pads_set_query_function() + + + + + + + + Set if collectdata's pad is EOS. + + + Set if collectdata's pad is flushing. + + + Set if collectdata's pad received a + new_segment event. + + + Set if collectdata's pad must be waited + for when collecting. + + + Set collectdata's pad WAITING state must + not be changed. +#GstCollectPadsStateFlags indicate private state of a collectdata('s pad). + + + + + + + + + + + + + + + + + + #GstDataQueue is an object that handles threadsafe queueing of objects. It +also provides size-related functionality. This object should be used for +any #GstElement that wishes to provide some sort of queueing functionality. + + + Creates a new #GstDataQueue. If @fullcallback or @emptycallback are supplied, then +the #GstDataQueue will call the respective callback to signal full or empty condition. +If the callbacks are NULL the #GstDataQueue will instead emit 'full' and 'empty' +signals. + + + a new #GstDataQueue. + + + + + the callback used to tell if the element considers the queue full +or not. + + + + the callback which will be called when the queue is considered full. + + + + the callback which will be called when the queue is considered empty. + + + + a #gpointer that will be passed to the @checkfull, @fullcallback, + and @emptycallback callbacks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pop and unref the head-most #GstMiniObject with the given #GType. + + + %TRUE if an element was removed. + + + + + The #GstDataQueue to drop an item from. + + + + The #GType of the item to drop. + + + + + + Flushes all the contents of the @queue. Any call to #gst_data_queue_push and +#gst_data_queue_pop will be released. +MT safe. + + + + + + + a #GstDataQueue. + + + + + + Get the current level of the queue. + + + + + + + The #GstDataQueue + + + + the location to store the result + + + + + + Queries if there are any items in the @queue. +MT safe. + + + %TRUE if @queue is empty. + + + + + a #GstDataQueue. + + + + + + Queries if @queue is full. This check will be done using the +#GstDataQueueCheckFullFunction registered with @queue. +MT safe. + + + %TRUE if @queue is full. + + + + + a #GstDataQueue. + + + + + + Inform the queue that the limits for the fullness check have changed and that +any blocking gst_data_queue_push() should be unblocked to recheck the limits. + + + + + + + The #GstDataQueue + + + + + + Retrieves the first @item available on the @queue without removing it. +If the queue is currently empty, the call will block until at least +one item is available, OR the @queue is set to the flushing state. +MT safe. + + + %TRUE if an @item was successfully retrieved from the @queue. + + + + + a #GstDataQueue. + + + + pointer to store the returned #GstDataQueueItem. + + + + + + Retrieves the first @item available on the @queue. If the queue is currently +empty, the call will block until at least one item is available, OR the +@queue is set to the flushing state. +MT safe. + + + %TRUE if an @item was successfully retrieved from the @queue. + + + + + a #GstDataQueue. + + + + pointer to store the returned #GstDataQueueItem. + + + + + + Pushes a #GstDataQueueItem (or a structure that begins with the same fields) +on the @queue. If the @queue is full, the call will block until space is +available, OR the @queue is set to flushing state. +MT safe. + +Note that this function has slightly different semantics than gst_pad_push() +and gst_pad_push_event(): this function only takes ownership of @item and +the #GstMiniObject contained in @item if the push was successful. If %FALSE +is returned, the caller is responsible for freeing @item and its contents. + + + %TRUE if the @item was successfully pushed on the @queue. + + + + + a #GstDataQueue. + + + + a #GstDataQueueItem. + + + + + + Pushes a #GstDataQueueItem (or a structure that begins with the same fields) +on the @queue. It ignores if the @queue is full or not and forces the @item +to be pushed anyway. +MT safe. + +Note that this function has slightly different semantics than gst_pad_push() +and gst_pad_push_event(): this function only takes ownership of @item and +the #GstMiniObject contained in @item if the push was successful. If %FALSE +is returned, the caller is responsible for freeing @item and its contents. + + + %TRUE if the @item was successfully pushed on the @queue. + + + + + a #GstDataQueue. + + + + a #GstDataQueueItem. + + + + + + Sets the queue to flushing state if @flushing is %TRUE. If set to flushing +state, any incoming data on the @queue will be discarded. Any call currently +blocking on #gst_data_queue_push or #gst_data_queue_pop will return straight +away with a return value of %FALSE. While the @queue is in flushing state, +all calls to those two functions will return %FALSE. + +MT Safe. + + + + + + + a #GstDataQueue. + + + + a #gboolean stating if the queue will be flushing or not. + + + + + + + + + + + + + + + the parent structure + + + + + + + + + + + + Reports that the queue became empty (empty). +A queue is empty if the total amount of visible items inside it (num-visible, time, +size) is lower than the boundary values which can be set through the GObject +properties. + + + + + + Reports that the queue became full (full). +A queue is full if the total amount of data inside it (num-visible, time, +size) is higher than the boundary values which can be set through the GObject +properties. + + + + + + + The prototype of the function used to inform the queue that it should be +considered as full. + + + %TRUE if the queue should be considered full. + + + + + a #GstDataQueue. + + + + The number of visible items currently in the queue. + + + + The amount of bytes currently in the queue. + + + + The accumulated duration of the items currently in the queue. + + + + The #gpointer registered when the #GstDataQueue was created. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Structure used by #GstDataQueue. You can supply a different structure, as +long as the top of the structure is identical to this structure. + + + the #GstMiniObject to queue. + + + + the size in bytes of the miniobject. + + + + the duration in #GstClockTime of the miniobject. Can not be +%GST_CLOCK_TIME_NONE. + + + + %TRUE if @object should be considered as a visible object. + + + + The #GDestroyNotify function to use to free the #GstDataQueueItem. +This function should also drop the reference to @object the owner of the +#GstDataQueueItem is assumed to hold. + + + + + + + + + + + + + Structure describing the size of a queue. + + + number of buffers + + + + number of bytes + + + + amount of time + + + + + Utility struct to help handling #GstFlowReturn combination. Useful for +#GstElement<!-- -->s that have multiple source pads and need to combine +the different #GstFlowReturn for those pads. + +#GstFlowCombiner works by using the last #GstFlowReturn for all #GstPad +it has in its list and computes the combined return value and provides +it to the caller. + +To add a new pad to the #GstFlowCombiner use gst_flow_combiner_add_pad(). +The new #GstPad is stored with a default value of %GST_FLOW_OK. + +In case you want a #GstPad to be removed, use gst_flow_combiner_remove_pad(). + +Please be aware that this struct isn't thread safe as its designed to be + used by demuxers, those usually will have a single thread operating it. + +These functions will take refs on the passed #GstPad<!-- -->s. + +Aside from reducing the user's code size, the main advantage of using this +helper struct is to follow the standard rules for #GstFlowReturn combination. +These rules are: + +* %GST_FLOW_EOS: only if all returns are EOS too +* %GST_FLOW_NOT_LINKED: only if all returns are NOT_LINKED too +* %GST_FLOW_ERROR or below: if at least one returns an error return +* %GST_FLOW_NOT_NEGOTIATED: if at least one returns a not-negotiated return +* %GST_FLOW_FLUSHING: if at least one returns flushing +* %GST_FLOW_OK: otherwise + +%GST_FLOW_ERROR or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are +returned immediately from the gst_flow_combiner_update_flow() function. + + + Creates a new #GstFlowCombiner, use gst_flow_combiner_free() to free it. + + + A new #GstFlowCombiner + + + + + Adds a new #GstPad to the #GstFlowCombiner. + + + + + + + the #GstFlowCombiner + + + + the #GstPad that is being added + + + + + + Removes all pads from a #GstFlowCombiner and resets it to its initial state. + + + + + + + the #GstFlowCombiner to clear + + + + + + Frees a #GstFlowCombiner struct and all its internal data. + + + + + + + the #GstFlowCombiner to free + + + + + + Increments the reference count on the #GstFlowCombiner. + + + the #GstFlowCombiner. + + + + + the #GstFlowCombiner to add a reference to. + + + + + + Removes a #GstPad from the #GstFlowCombiner. + + + + + + + the #GstFlowCombiner + + + + the #GstPad to remove + + + + + + Reset flow combiner and all pads to their initial state without removing pads. + + + + + + + the #GstFlowCombiner to clear + + + + + + Decrements the reference count on the #GstFlowCombiner. + + + + + + + the #GstFlowCombiner to unreference. + + + + + + Computes the combined flow return for the pads in it. + +The #GstFlowReturn parameter should be the last flow return update for a pad +in this #GstFlowCombiner. It will use this value to be able to shortcut some +combinations and avoid looking over all pads again. e.g. The last combined +return is the same as the latest obtained #GstFlowReturn. + + + The combined #GstFlowReturn + + + + + the #GstFlowCombiner + + + + the latest #GstFlowReturn received for a pad in this #GstFlowCombiner + + + + + + Sets the provided pad's last flow return to provided value and computes +the combined flow return for the pads in it. + +The #GstFlowReturn parameter should be the last flow return update for a pad +in this #GstFlowCombiner. It will use this value to be able to shortcut some +combinations and avoid looking over all pads again. e.g. The last combined +return is the same as the latest obtained #GstFlowReturn. + + + The combined #GstFlowReturn + + + + + the #GstFlowCombiner + + + + the #GstPad whose #GstFlowReturn to update + + + + the latest #GstFlowReturn received for a pad in this #GstFlowCombiner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This class is mostly useful for elements that cannot do +random access, or at least very slowly. The source usually +prefers to push out a fixed size buffer. + +Subclasses usually operate in a format that is different from the +default GST_FORMAT_BYTES format of #GstBaseSrc. + +Classes extending this base class will usually be scheduled +in a push based mode. If the peer accepts to operate without +offsets and within the limits of the allowed block size, this +class can operate in getrange based mode automatically. To make +this possible, the subclass should implement and override the +SCHEDULING query. + +The subclass should extend the methods from the baseclass in +addition to the ::create method. + +Seeking, flushing, scheduling and sync is all handled by this +base class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At the minimum, the @fill method should be overridden to produce +buffers. + + + Element parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstQueueArray is an object that provides standard queue functionality +based on an array instead of linked lists. This reduces the overhead +caused by memory management by a large factor. + + + Clears queue @array and frees all memory associated to it. + + + + + + + a #GstQueueArray object + + + + + + Drops the queue element at position @idx from queue @array. + + + the dropped element + + + + + a #GstQueueArray object + + + + index to drop + + + + + + Drops the queue element at position @idx from queue @array and copies the +data of the element or structure that was removed into @p_struct if +@p_struct is set (not NULL). + + + TRUE on success, or FALSE on error + + + + + a #GstQueueArray object + + + + index to drop + + + + address into which to store the data of the dropped structure, or NULL + + + + + + Finds an element in the queue @array, either by comparing every element +with @func or by looking up @data if no compare function @func is provided, +and returning the index of the found element. + + + Index of the found element or -1 if nothing was found. + + + + + a #GstQueueArray object + + + + comparison function, or %NULL to find @data by value + + + + data for comparison function + + + + + + Frees queue @array and all memory associated to it. + + + + + + + a #GstQueueArray object + + + + + + Returns the length of the queue @array + + + the length of the queue @array. + + + + + a #GstQueueArray object + + + + + + Checks if the queue @array is empty. + + + %TRUE if the queue @array is empty + + + + + a #GstQueueArray object + + + + + + Returns the head of the queue @array and does not +remove it from the queue. + + + The head of the queue + + + + + a #GstQueueArray object + + + + + + Returns the head of the queue @array without removing it from the queue. + + + pointer to element or struct, or NULL if @array was empty. The + data pointed to by the returned pointer stays valid only as long as + the queue array is not modified further! + + + + + a #GstQueueArray object + + + + + + Returns the item at @idx in @array, but does not remove it from the queue. + + + The item, or %NULL if @idx was out of bounds + + + + + + + + + + + + + Returns the item at @idx in @array, but does not remove it from the queue. + + + The item, or %NULL if @idx was out of bounds + + + + + + + + + + + + + Returns the tail of the queue @array, but does not remove it from the queue. + + + The tail of the queue + + + + + a #GstQueueArray object + + + + + + Returns the tail of the queue @array, but does not remove it from the queue. + + + The tail of the queue + + + + + a #GstQueueArray object + + + + + + Returns and head of the queue @array and removes +it from the queue. + + + The head of the queue + + + + + a #GstQueueArray object + + + + + + Returns the head of the queue @array and removes it from the queue. + + + pointer to element or struct, or NULL if @array was empty. The + data pointed to by the returned pointer stays valid only as long as + the queue array is not modified further! + + + + + a #GstQueueArray object + + + + + + Returns the tail of the queue @array and removes +it from the queue. + + + The tail of the queue + + + + + a #GstQueueArray object + + + + + + Returns the tail of the queue @array and removes +it from the queue. + + + The tail of the queue + + + + + a #GstQueueArray object + + + + + + Pushes @data to the tail of the queue @array. + + + + + + + a #GstQueueArray object + + + + object to push + + + + + + + + + + + + + + + + + + + + Sets a function to clear an element of @array. + +The @clear_func will be called when an element in the array +data segment is removed and when the array is freed and data +segment is deallocated as well. @clear_func will be passed a +pointer to the element to clear, rather than the element itself. + +Note that in contrast with other uses of #GDestroyNotify +functions, @clear_func is expected to clear the contents of +the array element it is given, but not free the element itself. + + + + + + + a #GstQueueArray object + + + + a function to clear an element of @array + + + + + + Allocates a new #GstQueueArray object with an initial +queue size of @initial_size. + + + a new #GstQueueArray object + + + + + Initial size of the new queue + + + + + + Allocates a new #GstQueueArray object for elements (e.g. structures) +of size @struct_size, with an initial queue size of @initial_size. + + + a new #GstQueueArray object + + + + + Size of each element (e.g. structure) in the array + + + + Initial size of the new queue + + + + + + + This function will be called by gst_type_find_helper_get_range() when +typefinding functions request to peek at the data of a stream at certain +offsets. If this function returns GST_FLOW_OK, the result buffer will be +stored in @buffer. The contents of @buffer is invalid for any other +return value. + +This function is supposed to behave exactly like a #GstPadGetRangeFunction. + + + GST_FLOW_OK for success + + + + + a #GstObject that will handle the getrange request + + + + the parent of @obj or %NULL + + + + the offset of the range + + + + the length of the range + + + + a memory location to hold the result buffer + + + + + + Create a new #GstBitReader instance, which will read from @data. + +Free-function: gst_bit_reader_free + + + a new #GstBitReader instance + + + + + Data from which the #GstBitReader + should read + + + + + + Size of @data in bytes + + + + + + Creates a new, empty #GstBitWriter instance. + +Free-function: gst_bit_writer_free + + + a new, empty #GstByteWriter instance + + + + + Creates a new #GstBitWriter instance with the given memory area. If +@initialized is %TRUE it is possible to read @size bits from the +#GstBitWriter from the beginning. + +Free-function: gst_bit_writer_free + + + a new #GstBitWriter instance + + + + + Memory area for writing + + + + Size of @data in bytes + + + + if %TRUE the complete data can be read from the beginning + + + + + + Creates a #GstBitWriter instance with the given initial data size. + +Free-function: gst_bit_writer_free + + + a new #GstBitWriter instance + + + + + Initial size of data in bytes + + + + If %TRUE the data can't be reallocated + + + + + + + + + + + + + + + + + + + + + + + + Create a new #GstByteReader instance, which will read from @data. + +Free-function: gst_byte_reader_free + + + a new #GstByteReader instance + + + + + data from which the + #GstByteReader should read + + + + + + Size of @data in bytes + + + + + + Returns a constant pointer to the current data position if there is +a NUL-terminated string in the data (this could be just a NUL terminator). +The current position will be maintained. This will work for any +NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. + +This function will fail if no NUL-terminator was found in in the data. + + + + a #GstByteReader instance + + + address of a + #gchar pointer variable in which to store the result + + + + + Skips a NUL-terminated string in the #GstByteReader instance, advancing +the current position to the byte after the string. This will work for +any NUL-terminated string with a character width of 8 bits, so ASCII, +UTF-8, ISO-8859-N etc. + +This function will fail if no NUL-terminator was found in in the data. + + + + a #GstByteReader instance + + + + + Creates a new, empty #GstByteWriter instance + +Free-function: gst_byte_writer_free + + + a new, empty #GstByteWriter instance + + + + + Creates a new #GstByteWriter instance with the given +memory area. If @initialized is %TRUE it is possible to +read @size bytes from the #GstByteWriter from the beginning. + +Free-function: gst_byte_writer_free + + + a new #GstByteWriter instance + + + + + Memory area for writing + + + + Size of @data in bytes + + + + If %TRUE the complete data can be read from the beginning + + + + + + Creates a new #GstByteWriter instance with the given +initial data size. + +Free-function: gst_byte_writer_free + + + a new #GstByteWriter instance + + + + + Initial size of data + + + + If %TRUE the data can't be reallocated + + + + + + Write a NUL-terminated string to @writer (including the terminator). The +string is assumed to be in an 8-bit encoding (e.g. ASCII,UTF-8 or +ISO-8859-1). + + + + #GstByteWriter instance + + + Null terminated string + + + + + Utility functions for elements doing typefinding: +gst_type_find_helper() does typefinding in pull mode, while +gst_type_find_helper_for_buffer() is useful for elements needing to do +typefinding in push mode from a chain function. + + + Allocates a new #GstQueueArray object with an initial +queue size of @initial_size. + + + a new #GstQueueArray object + + + + + Initial size of the new queue + + + + + + Allocates a new #GstQueueArray object for elements (e.g. structures) +of size @struct_size, with an initial queue size of @initial_size. + + + a new #GstQueueArray object + + + + + Size of each element (e.g. structure) in the array + + + + Initial size of the new queue + + + + + + Tries to find what type of data is flowing from the given source #GstPad. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data + stream. Returns %NULL if no #GstCaps matches the data stream. + + + + + A source #GstPad + + + + The length in bytes + + + + + + Tries to find what type of data is contained in the given #GstBuffer, the +assumption being that the buffer represents the beginning of the stream or +file. + +All available typefinders will be called on the data in order of rank. If +a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, +typefinding is stopped immediately and the found caps will be returned +right away. Otherwise, all available typefind functions will the tried, +and the caps with the highest probability will be returned, or %NULL if +the content of the buffer could not be identified. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data, + or %NULL if no type could be found. The caller should free the caps + returned with gst_caps_unref(). + + + + + object doing the typefinding, or %NULL (used for logging) + + + + a #GstBuffer with data to typefind + + + + location to store the probability of the found + caps, or %NULL + + + + + + Tries to find what type of data is contained in the given #GstBuffer, the +assumption being that the buffer represents the beginning of the stream or +file. + +All available typefinders will be called on the data in order of rank. If +a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, +typefinding is stopped immediately and the found caps will be returned +right away. Otherwise, all available typefind functions will the tried, +and the caps with the highest probability will be returned, or %NULL if +the content of the buffer could not be identified. + +When @extension is not %NULL, this function will first try the typefind +functions for the given extension, which might speed up the typefinding +in many cases. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data, + or %NULL if no type could be found. The caller should free the caps + returned with gst_caps_unref(). + + + + + object doing the typefinding, or %NULL (used for logging) + + + + a #GstBuffer with data to typefind + + + + extension of the media, or %NULL + + + + location to store the probability of the found + caps, or %NULL + + + + + + Tries to find what type of data is contained in the given @data, the +assumption being that the data represents the beginning of the stream or +file. + +All available typefinders will be called on the data in order of rank. If +a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, +typefinding is stopped immediately and the found caps will be returned +right away. Otherwise, all available typefind functions will the tried, +and the caps with the highest probability will be returned, or %NULL if +the content of @data could not be identified. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data, + or %NULL if no type could be found. The caller should free the caps + returned with gst_caps_unref(). + + + + + object doing the typefinding, or %NULL (used for logging) + + + + * a pointer with data to typefind + + + + + + the size of @data + + + + location to store the probability of the found + caps, or %NULL + + + + + + Tries to find what type of data is contained in the given @data, the +assumption being that the data represents the beginning of the stream or +file. + +All available typefinders will be called on the data in order of rank. If +a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, +typefinding is stopped immediately and the found caps will be returned +right away. Otherwise, all available typefind functions will the tried, +and the caps with the highest probability will be returned, or %NULL if +the content of @data could not be identified. + +When @extension is not %NULL, this function will first try the typefind +functions for the given extension, which might speed up the typefinding +in many cases. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data, + or %NULL if no type could be found. The caller should free the caps + returned with gst_caps_unref(). + + + + + object doing the typefinding, or %NULL (used for logging) + + + + * a pointer with data to typefind + + + + + + the size of @data + + + + extension of the media, or %NULL + + + + location to store the probability of the found + caps, or %NULL + + + + + + Tries to find the best #GstCaps associated with @extension. + +All available typefinders will be checked against the extension in order +of rank. The caps of the first typefinder that can handle @extension will be +returned. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to + @extension, or %NULL if no type could be found. The caller should free + the caps returned with gst_caps_unref(). + + + + + object doing the typefinding, or %NULL (used for logging) + + + + an extension + + + + + + Utility function to do pull-based typefinding. Unlike gst_type_find_helper() +however, this function will use the specified function @func to obtain the +data needed by the typefind functions, rather than operating on a given +source pad. This is useful mostly for elements like tag demuxers which +strip off data at the beginning and/or end of a file and want to typefind +the stripped data stream before adding their own source pad (the specified +callback can then call the upstream peer pad with offsets adjusted for the +tag size, for example). + +When @extension is not %NULL, this function will first try the typefind +functions for the given extension, which might speed up the typefinding +in many cases. + +Free-function: gst_caps_unref + + + the #GstCaps corresponding to the data + stream. Returns %NULL if no #GstCaps matches the data stream. + + + + + A #GstObject that will be passed as first argument to @func + + + + the parent of @obj or %NULL + + + + A generic #GstTypeFindHelperGetRangeFunction that will + be used to access data at random offsets when doing the typefinding + + + + The length in bytes + + + + extension of the media, or %NULL + + + + location to store the probability of the found + caps, or %NULL + + + + + + Utility function to do pull-based typefinding. Unlike gst_type_find_helper() +however, this function will use the specified function @func to obtain the +data needed by the typefind functions, rather than operating on a given +source pad. This is useful mostly for elements like tag demuxers which +strip off data at the beginning and/or end of a file and want to typefind +the stripped data stream before adding their own source pad (the specified +callback can then call the upstream peer pad with offsets adjusted for the +tag size, for example). + +When @extension is not %NULL, this function will first try the typefind +functions for the given extension, which might speed up the typefinding +in many cases. + + + the last %GstFlowReturn from pulling a buffer or %GST_FLOW_OK if + typefinding was successful. + + + + + A #GstObject that will be passed as first argument to @func + + + + the parent of @obj or %NULL + + + + A generic #GstTypeFindHelperGetRangeFunction that will + be used to access data at random offsets when doing the typefinding + + + + The length in bytes + + + + extension of the media, or %NULL + + + + returned caps + + + + location to store the probability of the found + caps, or %NULL + + + + + + diff --git a/girs/GstController-1.0.gir b/girs/GstController-1.0.gir new file mode 100644 index 0000000000..47704d79dd --- /dev/null +++ b/girs/GstController-1.0.gir @@ -0,0 +1,1604 @@ + + + + + + + + + + + + A value mapping object that attaches multiple control sources to a guint +gobject properties representing a color. A control value of 0.0 will turn the +color component off and a value of 1.0 will be the color level. + + + Create a new control-binding that attaches the given #GstControlSource to the +#GObject property. + + + the new #GstARGBControlBinding + + + + + the object of the property + + + + the property-name to attach the control source + + + + the control source for the alpha channel + + + + the control source for the red channel + + + + the control source for the green channel + + + + the control source for the blue channel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The class structure of #GstARGBControlBinding. + + + Parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An internal structure for value+time and various temporary +values used for interpolation. This "inherits" from +GstTimedValue. + + + timestamp of the value change + + + + the new value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copies a #GstControlPoint + + + A copy of @cp + + + + + The control point to copy + + + + + + Frees all data allocated by a #GstControlPoint instance. + + + + + + + the object to free + + + + + + + + + + + + + + + + + + + + + + + + + + + + A value mapping object that attaches control sources to gobject properties. It +will map the control values directly to the target property range. If a +non-absolute direct control binding is used, the value range [0.0 ... 1.0] +is mapped to full target property range, and all values outside the range +will be clipped. An absolute control binding will not do any value +transformations. + + + Create a new control-binding that attaches the #GstControlSource to the +#GObject property. It will map the control source range [0.0 ... 1.0] to +the full target property range, and clip all values outside this range. + + + the new #GstDirectControlBinding + + + + + the object of the property + + + + the property-name to attach the control source + + + + the control source + + + + + + Create a new control-binding that attaches the #GstControlSource to the +#GObject property. It will directly map the control source values to the +target property range without any transformations. + + + the new #GstDirectControlBinding + + + + + the object of the property + + + + the property-name to attach the control source + + + + the control source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The class structure of #GstDirectControlBinding. + + + Parent class + + + + + + + + + + Function to map a control-value to the target GValue. + + + + + + + the #GstDirectControlBinding instance + + + + the value returned by the cotnrol source + + + + the target GValue + + + + + + Function to map a control-value to the target plain data type. + + + + + + + the #GstDirectControlBinding instance + + + + the value returned by the cotnrol source + + + + the target location + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstInterpolationControlSource is a #GstControlSource, that interpolates values between user-given +control points. It supports several interpolation modes and property types. + +To use #GstInterpolationControlSource get a new instance by calling +gst_interpolation_control_source_new(), bind it to a #GParamSpec and set some +control points by calling gst_timed_value_control_source_set(). + +All functions are MT-safe. + + + This returns a new, unbound #GstInterpolationControlSource. + + + a new, unbound #GstInterpolationControlSource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The various interpolation modes available. + + steps-like interpolation, default + + + linear interpolation + + + cubic interpolation (natural), may overshoot + the min or max values set by the control point, but is more 'curvy' + + + monotonic cubic interpolation, will not + produce any values outside of the min-max range set by the control points + (Since: 1.8) + + + + #GstLFOControlSource is a #GstControlSource, that provides several periodic +waveforms as control values. + +To use #GstLFOControlSource get a new instance by calling +gst_lfo_control_source_new(), bind it to a #GParamSpec and set the relevant +properties. + +All functions are MT-safe. + + + This returns a new, unbound #GstLFOControlSource. + + + a new, unbound #GstLFOControlSource. + + + + + Specifies the amplitude for the waveform of this #GstLFOControlSource. + + + + Specifies the frequency that should be used for the waveform +of this #GstLFOControlSource. It should be large enough +so that the period is longer than one nanosecond. + + + + Specifies the value offset for the waveform of this #GstLFOControlSource. + + + + Specifies the timeshift to the right that should be used for the waveform +of this #GstLFOControlSource in nanoseconds. + +To get a n nanosecond shift to the left use +"(GST_SECOND / frequency) - n". + + + + Specifies the waveform that should be used for this #GstLFOControlSource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The various waveform modes available. + + sine waveform + + + square waveform + + + saw waveform + + + reverse saw waveform + + + triangle waveform + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GstControlBinding that forwards requests to another #GstControlBinding + + + #GstProxyControlBinding forwards all access to data or `sync_values()` +requests from @property_name on @object to the control binding at +@ref_property_name on @ref_object. + + + a new #GstControlBinding that proxies the control interface between +properties on different #GstObject's + + + + + a #GstObject + + + + the property name in @object to control + + + + a #GstObject to forward all + #GstControlBinding requests to + + + + the property_name in @ref_object to control + + + + + + + + + + + + + + + + + + + + + Opaque #GstProxyControlBindingClass struct + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for #GstControlSource that use time-stamped values. + +When overriding bind, chain up first to give this bind implementation a +chance to setup things. + +All functions are MT-safe. + + + Find last value before given timestamp in control point list. +If all values in the control point list come after the given +timestamp or no values exist, %NULL is returned. + +For use in control source implementations. + + + the found #GSequenceIter or %NULL + + + + + the control source to search in + + + + the search key + + + + + + Returns a read-only copy of the list of #GstTimedValue for the given property. +Free the list after done with it. + + + a copy +of the list, or %NULL if the property isn't handled by the controller + + + + + + + the #GstTimedValueControlSource to get the list from + + + + + + Get the number of control points that are set. + + + the number of control points that are set. + + + + + the #GstTimedValueControlSource to get the number of values from + + + + + + Set the value of given controller-handled property at a certain time. + + + FALSE if the values couldn't be set, TRUE otherwise. + + + + + the #GstTimedValueControlSource object + + + + the time the control-change is scheduled for + + + + the control-value + + + + + + Sets multiple timed values at once. + + + FALSE if the values couldn't be set, TRUE otherwise. + + + + + the #GstTimedValueControlSource object + + + + a list +with #GstTimedValue items + + + + + + + + Used to remove the value of given controller-handled property at a certain +time. + + + FALSE if the value couldn't be unset (i.e. not found, TRUE otherwise. + + + + + the #GstTimedValueControlSource object + + + + the time the control-change should be removed from + + + + + + Used to remove all time-stamped values of given controller-handled property + + + + + + + the #GstTimedValueControlSource object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted right after the new value has been added to @self + + + + + + The newly added #GstTimedValue + + + + + + Emitted right after the new value has been set on @timed_signals + + + + + + The #GstTimedValue where the value changed + + + + + + Emitted when @timed_value is removed from @self + + + + + + The removed #GstTimedValue + + + + + + + + + + + + + + + + + + + + + #GstTriggerControlSource is a #GstControlSource, that returns values from user-given +control points. It allows for a tolerance on the time-stamps. + +To use #GstTriggerControlSource get a new instance by calling +gst_trigger_control_source_new(), bind it to a #GParamSpec and set some +control points by calling gst_timed_value_control_source_set(). + +All functions are MT-safe. + + + This returns a new, unbound #GstTriggerControlSource. + + + a new, unbound #GstTriggerControlSource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reset the controlled value cache. + + + + + + + the #GstTimedValueControlSource + + + + + + diff --git a/girs/GstNet-1.0.gir b/girs/GstNet-1.0.gir new file mode 100644 index 0000000000..52535405e5 --- /dev/null +++ b/girs/GstNet-1.0.gir @@ -0,0 +1,1290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The size of the packets sent between network clocks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstNetAddressMeta can be used to store a network address (a #GSocketAddress) +in a #GstBuffer so that it network elements can track the to and from address +of the buffer. + + + the parent type + + + + a #GSocketAddress stored as metadata + + + + + + + + + + + #GstNetClientClock implements a custom #GstClock that synchronizes its time +to a remote time provider such as #GstNetTimeProvider. #GstNtpClock +implements a #GstClock that synchronizes its time to a remote NTPv4 server. + +A new clock is created with gst_net_client_clock_new() or +gst_ntp_clock_new(), which takes the address and port of the remote time +provider along with a name and an initial time. + +This clock will poll the time provider and will update its calibration +parameters based on the local and remote observations. + +The "round-trip" property limits the maximum round trip packets can take. + +Various parameters of the clock can be configured with the parent #GstClock +"timeout", "window-size" and "window-threshold" object properties. + +A #GstNetClientClock and #GstNtpClock is typically set on a #GstPipeline with +gst_pipeline_use_clock(). + +If you set a #GstBus on the clock via the "bus" object property, it will +send @GST_MESSAGE_ELEMENT messages with an attached #GstStructure containing +statistics about clock accuracy and network traffic. + + + Create a new #GstNetClientClock that will report the time +provided by the #GstNetTimeProvider on @remote_address and +@remote_port. + + + a new #GstClock that receives a time from the remote +clock. + + + + + a name for the clock + + + + the address or hostname of the remote clock provider + + + + the port of the remote clock provider + + + + initial time of the clock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstNetControlMessageMeta can be used to store control messages (ancillary +data) which was received with or is to be sent alongside the buffer data. +When used with socket sinks and sources which understand this meta it allows +sending and receiving ancillary data such as unix credentials (See +#GUnixCredentialsMessage) and Unix file descriptions (See #GUnixFDMessage). + + + the parent type + + + + a #GSocketControlMessage stored as metadata + + + + + + + + + + + Various functions for receiving, sending an serializing #GstNetTimePacket +structures. + + + the local time when this packet was sent + + + + the remote time observation + + + + Creates a new #GstNetTimePacket from a buffer received over the network. The +caller is responsible for ensuring that @buffer is at least +#GST_NET_TIME_PACKET_SIZE bytes long. + +If @buffer is %NULL, the local and remote times will be set to +#GST_CLOCK_TIME_NONE. + +MT safe. Caller owns return value (gst_net_time_packet_free to free). + + + The new #GstNetTimePacket. + + + + + a buffer from which to construct the packet, or NULL + + + + + + + + Make a copy of @packet. + + + a copy of @packet, free with gst_net_time_packet_free(). + + + + + the #GstNetTimePacket + + + + + + Free @packet. + + + + + + + the #GstNetTimePacket + + + + + + Sends a #GstNetTimePacket over a socket. + +MT safe. + + + TRUE if successful, FALSE in case an error occurred. + + + + + the #GstNetTimePacket to send + + + + socket to send the time packet on + + + + address to send the time packet to + + + + + + Serialized a #GstNetTimePacket into a newly-allocated sequence of +#GST_NET_TIME_PACKET_SIZE bytes, in network byte order. The value returned is +suitable for passing to write(2) or sendto(2) for communication over the +network. + +MT safe. Caller owns return value (g_free to free). + + + A newly allocated sequence of #GST_NET_TIME_PACKET_SIZE bytes. + + + + + the #GstNetTimePacket + + + + + + Receives a #GstNetTimePacket over a socket. Handles interrupted system +calls, but otherwise returns NULL on error. + + + a new #GstNetTimePacket, or NULL on error. Free + with gst_net_time_packet_free() when done. + + + + + socket to receive the time packet on + + + + address of variable to return sender address + + + + + + + This object exposes the time of a #GstClock on the network. + +A #GstNetTimeProvider is created with gst_net_time_provider_new() which +takes a #GstClock, an address and a port number as arguments. + +After creating the object, a client clock such as #GstNetClientClock can +query the exposed clock over the network for its values. + +The #GstNetTimeProvider typically wraps the clock used by a #GstPipeline. + + + + Allows network clients to get the current time of @clock. + + + the new #GstNetTimeProvider, or NULL on error + + + + + a #GstClock to export over the network + + + + an address to bind on as a dotted quad + (xxx.xxx.xxx.xxx), IPv6 address, or NULL to bind to all addresses + + + + a port to bind on, or 0 to let the kernel choose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create a new #GstNtpClock that will report the time provided by +the NTPv4 server on @remote_address and @remote_port. + + + a new #GstClock that receives a time from the remote +clock. + + + + + a name for the clock + + + + the address or hostname of the remote clock provider + + + + the port of the remote clock provider + + + + initial time of the clock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PTP clock identification that can be passed to gst_ptp_init() to +automatically select one based on the MAC address of interfaces + + + + + + + + + + + + + + + + + + + + + GstPtpClock implements a PTP (IEEE1588:2008) ordinary clock in slave-only +mode, that allows a GStreamer pipeline to synchronize to a PTP network +clock in some specific domain. + +The PTP subsystem can be initialized with gst_ptp_init(), which then starts +a helper process to do the actual communication via the PTP ports. This is +required as PTP listens on ports < 1024 and thus requires special +privileges. Once this helper process is started, the main process will +synchronize to all PTP domains that are detected on the selected +interfaces. + +gst_ptp_clock_new() then allows to create a GstClock that provides the PTP +time from a master clock inside a specific PTP domain. This clock will only +return valid timestamps once the timestamps in the PTP domain are known. To +check this, you can use gst_clock_wait_for_sync(), the GstClock::synced +signal and gst_clock_is_synced(). + +To gather statistics about the PTP clock synchronization, +gst_ptp_statistics_callback_add() can be used. This gives the application +the possibility to collect all kinds of statistics from the clock +synchronization. + + + Creates a new PTP clock instance that exports the PTP time of the master +clock in @domain. This clock can be slaved to other clocks as needed. + +If gst_ptp_init() was not called before, this will call gst_ptp_init() with +default parameters. + +This clock only returns valid timestamps after it received the first +times from the PTP master clock on the network. Once this happens the +GstPtpClock::internal-clock property will become non-NULL. You can +check this with gst_clock_wait_for_sync(), the GstClock::synced signal and +gst_clock_is_synced(). + + + A new #GstClock + + + + + Name of the clock + + + + PTP domain + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Opaque #GstPtpClockClass structure. + + + parented to #GstSystemClockClass + + + + + + + + + + + + + The statistics can be the following structures: + +GST_PTP_STATISTICS_NEW_DOMAIN_FOUND: +"domain" G_TYPE_UINT The domain identifier of the domain +"clock" GST_TYPE_CLOCK The internal clock that is slaved to the + PTP domain + +GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED: +"domain" G_TYPE_UINT The domain identifier of the domain +"master-clock-id" G_TYPE_UINT64 PTP clock identifier of the selected master + clock +"master-clock-port" G_TYPE_UINT PTP port number of the selected master clock +"grandmaster-clock-id" G_TYPE_UINT64 PTP clock identifier of the grandmaster clock + +GST_PTP_STATISTICS_PATH_DELAY_MEASURED: +"domain" G_TYPE_UINT The domain identifier of the domain +"mean-path-delay-avg" GST_TYPE_CLOCK_TIME Average mean path delay +"mean-path-delay" GST_TYPE_CLOCK_TIME Latest mean path delay +"delay-request-delay" GST_TYPE_CLOCK_TIME Delay of DELAY_REQ / DELAY_RESP messages + +GST_PTP_STATISTICS_TIME_UPDATED: +"domain" G_TYPE_UINT The domain identifier of the domain +"mean-path-delay-avg" GST_TYPE_CLOCK_TIME Average mean path delay +"local-time" GST_TYPE_CLOCK_TIME Local time that corresponds to ptp-time +"ptp-time" GST_TYPE_CLOCK_TIME Newly measured PTP time at local-time +"estimated-ptp-time" GST_TYPE_CLOCK_TIME Estimated PTP time based on previous measurements +"discontinuity" G_TYPE_INT64 Difference between estimated and measured PTP time +"synced" G_TYPE_BOOLEAN Currently synced to the remote clock +"r-squared" G_TYPE_DOUBLE R² of clock estimation regression +"internal-time" GST_TYPE_CLOCK_TIME Internal time clock parameter +"external-time" GST_TYPE_CLOCK_TIME External time clock parameter +"rate-num" G_TYPE_UINT64 Internal/external rate numerator +"rate-den" G_TYPE_UINT64 Internal/external rate denominator +"rate" G_TYPE_DOUBLE Internal/external rate + +If %FALSE is returned, the callback is removed and never called again. + + + + + + + PTP domain identifier + + + + New statistics + + + + Data passed to gst_ptp_statistics_callback_add() + + + + + + Attaches @addr as metadata in a #GstNetAddressMeta to @buffer. + + + a #GstNetAddressMeta connected to @buffer + + + + + a #GstBuffer + + + + a @GSocketAddress to connect to @buffer + + + + + + Attaches @message as metadata in a #GstNetControlMessageMeta to @buffer. + + + a #GstNetControlMessageMeta connected to @buffer + + + + + a #GstBuffer + + + + a @GSocketControlMessage to attach to @buffer + + + + + + Find the #GstNetAddressMeta on @buffer. + + + the #GstNetAddressMeta or %NULL when there +is no such metadata on @buffer. + + + + + a #GstBuffer + + + + + + + + + + + + + GstNetUtils gathers network utility functions, enabling use for all +gstreamer plugins. + + + + + + + + + + + + + + + + + + + + + + + + + + + Receives a #GstNetTimePacket over a socket. Handles interrupted system +calls, but otherwise returns NULL on error. + + + a new #GstNetTimePacket, or NULL on error. Free + with gst_net_time_packet_free() when done. + + + + + socket to receive the time packet on + + + + address of variable to return sender address + + + + + + Configures IP_TOS value of socket, i.e. sets QoS DSCP. + + + TRUE if successful, FALSE in case an error occurred. + + + + + Socket to configure + + + + QoS DSCP value + + + + + + Deinitialize the GStreamer PTP subsystem and stop the PTP clock. If there +are any remaining GstPtpClock instances, they won't be further synchronized +to the PTP network clock. + + + + + + + Initialize the GStreamer PTP subsystem and create a PTP ordinary clock in +slave-only mode for all domains on the given @interfaces with the +given @clock_id. + +If @clock_id is %GST_PTP_CLOCK_ID_NONE, a clock id is automatically +generated from the MAC address of the first network interface. + +This function is automatically called by gst_ptp_clock_new() with default +parameters if it wasn't called before. + + + %TRUE if the GStreamer PTP clock subsystem could be initialized. + + + + + PTP clock id of this process' clock or %GST_PTP_CLOCK_ID_NONE + + + + network interfaces to run the clock on + + + + + + + + Check if the GStreamer PTP clock subsystem is initialized. + + + %TRUE if the GStreamer PTP clock subsystem is initialized. + + + + + Check if PTP clocks are generally supported on this system, and if previous +initializations did not fail. + + + %TRUE if PTP clocks are generally supported on this system, and +previous initializations did not fail. + + + + + Installs a new statistics callback for gathering PTP statistics. See +GstPtpStatisticsCallback for a list of statistics that are provided. + + + Id for the callback that can be passed to +gst_ptp_statistics_callback_remove() + + + + + GstPtpStatisticsCallback to call + + + + Data to pass to the callback + + + + GDestroyNotify to destroy the data + + + + + + Removes a PTP statistics callback that was previously added with +gst_ptp_statistics_callback_add(). + + + + + + + Callback id to remove + + + + + + diff --git a/girs/GstPbutils-1.0.gir b/girs/GstPbutils-1.0.gir new file mode 100644 index 0000000000..f7a5945932 --- /dev/null +++ b/girs/GstPbutils-1.0.gir @@ -0,0 +1,6836 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A baseclass for scopes (visualizers). It takes care of re-fitting the +audio-rate to video-rate and handles renegotiation (downstream video size +changes). + +It also provides several background shading effects. These effects are +applied to a previous picture before the `render()` implementation can draw a +new frame. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Different types of supported background shading functions. + + no shading + + + plain fading + + + fade and move up + + + fade and move down + + + fade and move left + + + fade and move right + + + fade and move horizontally out + + + fade and move horizontally in + + + fade and move vertically out + + + fade and move vertically in + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstDiscoverer is a utility object which allows to get as much +information as possible from one or many URIs. + +It provides two APIs, allowing usage in blocking or non-blocking mode. + +The blocking mode just requires calling gst_discoverer_discover_uri() +with the URI one wishes to discover. + +The non-blocking mode requires a running #GMainLoop iterating a +#GMainContext, where one connects to the various signals, appends the +URIs to be processed (through gst_discoverer_discover_uri_async()) and then +asks for the discovery to begin (through gst_discoverer_start()). +By default this will use the GLib default main context unless you have +set a custom context using g_main_context_push_thread_default(). + +All the information is returned in a #GstDiscovererInfo structure. + + + Creates a new #GstDiscoverer with the provided timeout. + + + The new #GstDiscoverer. +If an error occurred when creating the discoverer, @err will be set +accordingly and %NULL will be returned. If @err is set, the caller must +free it when no longer needed using g_error_free(). + + + + + timeout per file, in nanoseconds. Allowed are values between + one second (#GST_SECOND) and one hour (3600 * #GST_SECOND) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Synchronously discovers the given @uri. + +A copy of @uri will be made internally, so the caller can safely g_free() +afterwards. + + + the result of the scanning. Can be %NULL if an +error occurred. + + + + + A #GstDiscoverer + + + + The URI to run on. + + + + + + Appends the given @uri to the list of URIs to discoverer. The actual +discovery of the @uri will only take place if gst_discoverer_start() has +been called. + +A copy of @uri will be made internally, so the caller can safely g_free() +afterwards. + + + %TRUE if the @uri was successfully appended to the list of pending +uris, else %FALSE + + + + + A #GstDiscoverer + + + + the URI to add. + + + + + + Allow asynchronous discovering of URIs to take place. +A #GMainLoop must be available for #GstDiscoverer to properly work in +asynchronous mode. + + + + + + + A #GstDiscoverer + + + + + + Stop the discovery of any pending URIs and clears the list of +pending URIS (if any). + + + + + + + A #GstDiscoverer + + + + + + The duration (in nanoseconds) after which the discovery of an individual +URI will timeout. + +If the discovery of a URI times out, the %GST_DISCOVERER_TIMEOUT will be +set on the result flags. + + + + + + + + + + + + + + + + + + Will be emitted in async mode when all information on a URI could be +discovered, or an error occurred. + +When an error occurs, @info might still contain some partial information, +depending on the circumstances of the error. + + + + + + the results #GstDiscovererInfo + + + + #GError, which will be non-NULL + if an error occurred during + discovery. You must not free + this #GError, it will be freed by + the discoverer. + + + + + + Will be emitted in async mode when all pending URIs have been processed. + + + + + + This signal is emitted after the source element has been created for, so +the URI being discovered, so it can be configured by setting additional +properties (e.g. set a proxy server for an http source, or set the device +and read speed for an audio cd source). + +This signal is usually emitted from the context of a GStreamer streaming +thread. + + + + + + source element + + + + + + Will be emitted when the discover starts analyzing the pending URIs + + + + + + + #GstDiscovererStreamInfo specific to audio streams. + + + + the average or nominal bitrate of the stream in bits/second. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the channel-mask of the stream, refer to +gst_audio_channel_positions_from_mask() for more +information. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the number of channels in the stream. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the number of bits used per sample in each channel. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the language of the stream, or NULL if unknown. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the maximum bitrate of the stream in bits/second. + + + + + a #GstDiscovererAudioInfo + + + + + + + + the sample rate of the stream in Hertz. + + + + + a #GstDiscovererAudioInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstDiscovererStreamInfo specific to container streams. + + + + the list of +#GstDiscovererStreamInfo this container stream offers. +Free with gst_discoverer_stream_info_list_free() after usage. + + + + + + + a #GstDiscovererStreamInfo + + + + + + + Structure containing the information of a URI analyzed by #GstDiscoverer. + + Parses a #GVariant as produced by gst_discoverer_info_to_variant() +back to a #GstDiscovererInfo. + + + A newly-allocated #GstDiscovererInfo. + + + + + A #GVariant to deserialize into a #GstDiscovererInfo. + + + + + + + + A copy of the #GstDiscovererInfo + + + + + a #GstDiscovererInfo + + + + + + Finds all the #GstDiscovererAudioInfo contained in @info + + + A #GList of +matching #GstDiscovererStreamInfo. The caller should free it with +gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + + + Finds all the #GstDiscovererContainerInfo contained in @info + + + A #GList of +matching #GstDiscovererStreamInfo. The caller should free it with +gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + + + + + the duration of the URI in #GstClockTime (nanoseconds). + + + + + a #GstDiscovererInfo + + + + + + + + whether the URI is live. + + + + + a #GstDiscovererInfo + + + + + + This functions is deprecated since version 1.4, use +#gst_discoverer_info_get_missing_elements_installer_details + + + Miscellaneous information stored as a #GstStructure +(for example: information about missing plugins). If you wish to use the +#GstStructure after the life-time of @info, you will need to copy it. + + + + + a #GstDiscovererInfo + + + + + + Get the installer details for missing elements + + + An array of strings +containing information about how to install the various missing elements +for @info to be usable. If you wish to use the strings after the life-time +of @info, you will need to copy them. + + + + + + + a #GstDiscovererStreamInfo to retrieve installer detail +for the missing element + + + + + + + + the result of the discovery as a #GstDiscovererResult. + + + + + a #GstDiscovererInfo + + + + + + + + the whether the URI is seekable. + + + + + a #GstDiscovererInfo + + + + + + + + the structure (or topology) of the URI as a +#GstDiscovererStreamInfo. +This structure can be traversed to see the original hierarchy. Unref with +gst_discoverer_stream_info_unref() after usage. + + + + + a #GstDiscovererInfo + + + + + + + + the list of +all streams contained in the #info. Free after usage +with gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + + + Finds the #GstDiscovererStreamInfo contained in @info that match the +given @streamtype. + + + A #GList of +matching #GstDiscovererStreamInfo. The caller should free it with +gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + a #GType derived from #GstDiscovererStreamInfo + + + + + + Finds all the #GstDiscovererSubtitleInfo contained in @info + + + A #GList of +matching #GstDiscovererStreamInfo. The caller should free it with +gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + + + + + all tags contained in the URI. If you wish to use +the tags after the life-time of @info, you will need to copy them. + + + + + a #GstDiscovererInfo + + + + + + + + TOC contained in the URI. If you wish to use +the TOC after the life-time of @info, you will need to copy it. + + + + + a #GstDiscovererInfo + + + + + + + + the URI to which this information corresponds to. +Copy it if you wish to use it after the life-time of @info. + + + + + a #GstDiscovererInfo + + + + + + Finds all the #GstDiscovererVideoInfo contained in @info + + + A #GList of +matching #GstDiscovererStreamInfo. The caller should free it with +gst_discoverer_stream_info_list_free(). + + + + + + + a #GstDiscovererInfo + + + + + + Serializes @info to a #GVariant that can be parsed again +through gst_discoverer_info_from_variant(). + +Note that any #GstToc (s) that might have been discovered will not be serialized +for now. + + + A newly-allocated #GVariant representing @info. + + + + + A #GstDiscovererInfo + + + + A combination of #GstDiscovererSerializeFlags to specify +what needs to be serialized. + + + + + + + + + + Result values for the discovery process. + + The discovery was successful + + + the URI is invalid + + + an error happened and the GError is set + + + the discovery timed-out + + + the discoverer was already discovering a file + + + Some plugins are missing for full discovery + + + + You can use these flags to control what is serialized by +gst_discoverer_info_to_variant() + + Serialize only basic information, excluding +caps, tags and miscellaneous information + + + Serialize the caps for each stream + + + Serialize the tags for each stream + + + Serialize miscellaneous information for each stream + + + Serialize all the available info, including +caps, tags and miscellaneous information + + + + Base structure for information concerning a media stream. Depending on the +stream type, one can find more media-specific information in +#GstDiscovererAudioInfo, #GstDiscovererVideoInfo, and +#GstDiscovererContainerInfo. + +The #GstDiscovererStreamInfo represents the topology of the stream. Siblings +can be iterated over with gst_discoverer_stream_info_get_next() and +gst_discoverer_stream_info_get_previous(). Children (sub-streams) of a +stream can be accessed using the #GstDiscovererContainerInfo API. + +As a simple example, if you run #GstDiscoverer on an AVI file with one audio +and one video stream, you will get a #GstDiscovererContainerInfo +corresponding to the AVI container, which in turn will have a +#GstDiscovererAudioInfo sub-stream and a #GstDiscovererVideoInfo sub-stream +for the audio and video streams respectively. + + Decrements the reference count of all contained #GstDiscovererStreamInfo +and fress the #GList. + + + + + + + a #GList of #GstDiscovererStreamInfo + + + + + + + + + + the #GstCaps of the stream. Unref with +#gst_caps_unref after usage. + + + + + a #GstDiscovererStreamInfo + + + + + + This functions is deprecated since version 1.4, use +#gst_discoverer_info_get_missing_elements_installer_details + + + additional information regarding the stream (for +example codec version, profile, etc..). If you wish to use the #GstStructure +after the life-time of @info you will need to copy it. + + + + + a #GstDiscovererStreamInfo + + + + + + + + the next #GstDiscovererStreamInfo in a chain. %NULL +for final streams. +Unref with #gst_discoverer_stream_info_unref after usage. + + + + + a #GstDiscovererStreamInfo + + + + + + + + the previous #GstDiscovererStreamInfo in a chain. +%NULL for starting points. Unref with #gst_discoverer_stream_info_unref +after usage. + + + + + a #GstDiscovererStreamInfo + + + + + + + + the stream ID of this stream. If you wish to +use the stream ID after the life-time of @info you will need to copy it. + + + + + a #GstDiscovererStreamInfo + + + + + + + + a human readable name for the stream type of the given @info (ex : "audio", +"container",...). + + + + + a #GstDiscovererStreamInfo + + + + + + + + the tags contained in this stream. If you wish to +use the tags after the life-time of @info you will need to copy them. + + + + + a #GstDiscovererStreamInfo + + + + + + + + the TOC contained in this stream. If you wish to +use the TOC after the life-time of @info you will need to copy it. + + + + + a #GstDiscovererStreamInfo + + + + + + + #GstDiscovererStreamInfo specific to subtitle streams (this includes text and +image based ones). + + + + the language of the stream, or NULL if unknown. + + + + + a #GstDiscovererSubtitleInfo + + + + + + + #GstDiscovererStreamInfo specific to video streams (this includes images). + + + + the average or nominal bitrate of the video stream in bits/second. + + + + + a #GstDiscovererVideoInfo + + + + + + + + the depth in bits of the video stream. + + + + + a #GstDiscovererVideoInfo + + + + + + + + the framerate of the video stream (denominator). + + + + + a #GstDiscovererVideoInfo + + + + + + + + the framerate of the video stream (numerator). + + + + + a #GstDiscovererVideoInfo + + + + + + + + the height of the video stream in pixels. + + + + + a #GstDiscovererVideoInfo + + + + + + + + the maximum bitrate of the video stream in bits/second. + + + + + a #GstDiscovererVideoInfo + + + + + + + + the Pixel Aspect Ratio (PAR) of the video stream (denominator). + + + + + a #GstDiscovererVideoInfo + + + + + + + + the Pixel Aspect Ratio (PAR) of the video stream (numerator). + + + + + a #GstDiscovererVideoInfo + + + + + + + + the width of the video stream in pixels. + + + + + a #GstDiscovererVideoInfo + + + + + + + + %TRUE if the video stream corresponds to an image (i.e. only contains +one frame). + + + + + a #GstDiscovererVideoInfo + + + + + + + + %TRUE if the stream is interlaced, else %FALSE. + + + + + a #GstDiscovererVideoInfo + + + + + + + + + + + + + + #GstEncodingTarget category for recording and capture. +Targets within this category are optimized for low latency encoding. + + + + + #GstEncodingTarget category for device-specific targets. +The name of the target will usually be the constructor and model of the device, +and that target will contain #GstEncodingProfiles suitable for that device. + + + + + #GstEncodingTarget category for file extensions. +The name of the target will be the name of the file extensions possible +for a particular target. Those targets are defining like 'default' formats +usually used for a particular file extension. + + + + + #GstEncodingTarget category for online-services. +The name of the target will usually be the name of the online service +and that target will contain #GstEncodingProfiles suitable for that online +service. + + + + + #GstEncodingTarget category for storage, archiving and editing targets. +Those targets can be lossless and/or provide very fast random access content. +The name of the target will usually be the container type or editing target, +and that target will contain #GstEncodingProfiles suitable for editing or +storage. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Variant of #GstEncodingProfile for audio streams. + + + Creates a new #GstEncodingAudioProfile + +All provided allocatable arguments will be internally copied, so can be +safely freed/unreferenced after calling this method. + + + the newly created #GstEncodingAudioProfile. + + + + + the #GstCaps + + + + the preset(s) to use on the encoder, can be %NULL + + + + the #GstCaps used to restrict the input to the encoder, can be +NULL. See gst_encoding_profile_get_restriction() for more details. + + + + the number of time this stream must be used. 0 means any number of + times (including never) + + + + + + + + + + Encoding profiles for containers. Keeps track of a list of #GstEncodingProfile + + + Creates a new #GstEncodingContainerProfile. + + + The newly created #GstEncodingContainerProfile. + + + + + The name of the container profile, can be %NULL + + + + The description of the container profile, + can be %NULL + + + + The format to use for this profile + + + + The preset to use for this profile. + + + + + + Add a #GstEncodingProfile to the list of profiles handled by @container. + +No copy of @profile will be made, if you wish to use it elsewhere after this +method you should increment its reference count. + + + %TRUE if the @stream was properly added, else %FALSE. + + + + + the #GstEncodingContainerProfile to use + + + + the #GstEncodingProfile to add. + + + + + + Checks if @container contains a #GstEncodingProfile identical to +@profile. + + + %TRUE if @container contains a #GstEncodingProfile identical +to @profile, else %FALSE. + + + + + a #GstEncodingContainerProfile + + + + a #GstEncodingProfile + + + + + + + + +the list of contained #GstEncodingProfile. + + + + + + + a #GstEncodingContainerProfile + + + + + + + + + + The opaque base class object for all encoding profiles. This contains generic +information like name, description, format and preset. + + + Find the #GstEncodingProfile with the specified name and category. + + + The matching #GstEncodingProfile or %NULL. + + + + + The name of the target + + + + The name of the profile, if %NULL +provided, it will default to the encoding profile called `default`. + + + + The target category. Can be %NULL + + + + + + Creates a #GstEncodingProfile matching the formats from the given +#GstDiscovererInfo. Streams other than audio or video (eg, +subtitles), are currently ignored. + + + The new #GstEncodingProfile or %NULL. + + + + + The #GstDiscovererInfo to read from + + + + + + Makes a deep copy of @self + + + The copy of @self + + + + + The #GstEncodingProfile to copy + + + + + + Get whether the format that has been negotiated in at some point can be renegotiated +later during the encoding. + + + + + + + a #GstEncodingProfile + + + + + + + + the description of the profile, can be %NULL. + + + + + a #GstEncodingProfile + + + + + + + + a suitable file extension for @profile, or NULL. + + + + + a #GstEncodingProfile + + + + + + + + the #GstCaps corresponding to the media format used +in the profile. Unref after usage. + + + + + a #GstEncodingProfile + + + + + + Computes the full output caps that this @profile will be able to consume. + + + The full caps the given @profile can consume. Call +gst_caps_unref() when you are done with the caps. + + + + + a #GstEncodingProfile + + + + + + + + the name of the profile, can be %NULL. + + + + + a #GstEncodingProfile + + + + + + + + The number of times the profile is used in its parent +container profile. If 0, it is not a mandatory stream. + + + + + a #GstEncodingProfile + + + + + + + + the name of the #GstPreset to be used in the profile. +This is the name that has been set when saving the preset. + + + + + a #GstEncodingProfile + + + + + + + + the name of the #GstPreset factory to be used in the profile. + + + + + a #GstEncodingProfile + + + + + + + + The restriction #GstCaps to apply before the encoder +that will be used in the profile. The fields present in restriction caps are +properties of the raw stream (that is before encoding), such as height and +width for video and depth and sampling rate for audio. Does not apply to +#GstEncodingContainerProfile (since there is no corresponding raw stream). +Can be %NULL. Unref after usage. + + + + + a #GstEncodingProfile + + + + + + + + #TRUE if the stream represented by @profile should use a single +segment before the encoder, #FALSE otherwise. This means that buffers will be retimestamped +and segments will be eat so as to appear as one segment. + + + + + a #GstEncodingProfile + + + + + + + + the human-readable name of the type of @profile. + + + + + a #GstEncodingProfile + + + + + + + + + + + + + + + + + Checks whether the two #GstEncodingProfile are equal + + + %TRUE if @a and @b are equal, else %FALSE. + + + + + a #GstEncodingProfile + + + + a #GstEncodingProfile + + + + + + Sets whether the format that has been negotiated in at some point can be renegotiated +later during the encoding. + + + + + + + a #GstEncodingProfile + + + + Whether the format that has been negotiated first can be renegotiated +during the encoding + + + + + + Set @description as the given description for the @profile. A copy of +@description will be made internally. + + + + + + + a #GstEncodingProfile + + + + the description to set on the profile + + + + + + Set whether the profile should be used or not. + + + + + + + a #GstEncodingProfile + + + + %FALSE to disable @profile, %TRUE to enable it + + + + + + Sets the media format used in the profile. + + + + + + + a #GstEncodingProfile + + + + the media format to use in the profile. + + + + + + Set @name as the given name for the @profile. A copy of @name will be made +internally. + + + + + + + a #GstEncodingProfile + + + + the name to set on the profile + + + + + + Set the number of time the profile is used in its parent +container profile. If 0, it is not a mandatory stream + + + + + + + a #GstEncodingProfile + + + + the number of time the profile can be used + + + + + + Sets the name of the #GstElement that implements the #GstPreset interface +to use for the profile. +This is the name that has been set when saving the preset. + + + + + + + a #GstEncodingProfile + + + + the element preset to use + + + + + + Sets the name of the #GstPreset's factory to be used in the profile. + + + + + + + a #GstEncodingProfile + + + + The name of the preset to use in this @profile. + + + + + + Set the restriction #GstCaps to apply before the encoder +that will be used in the profile. See gst_encoding_profile_get_restriction() +for more about restrictions. Does not apply to #GstEncodingContainerProfile. + + + + + + + a #GstEncodingProfile + + + + the restriction to apply + + + + + + If using a single segment, buffers will be retimestamped and segments will be +eat so as to appear as one segment. + +> *NOTE*: Single segment is not property supported when using +> #encodebin:avoid-reencoding + + + + + + + a #GstEncodingProfile + + + + #TRUE if the stream represented by @profile should use a +single segment before the encoder, #FALSE otherwise. + + + + + + + + + + + + + Collection of #GstEncodingProfile for a specific target or use-case. + +When being stored/loaded, targets come from a specific category, like +#GST_ENCODING_CATEGORY_DEVICE. + + Creates a new #GstEncodingTarget. + +The name and category can only consist of lowercase ASCII letters for the +first character, followed by either lowercase ASCII letters, digits or +hyphens ('-'). + +The @category *should* be one of the existing +well-defined categories, like #GST_ENCODING_CATEGORY_DEVICE, but it +*can* be a application or user specific category if +needed. + + + The newly created #GstEncodingTarget or %NULL if +there was an error. + + + + + The name of the target. + + + + The name of the category to which this @target +belongs. For example: #GST_ENCODING_CATEGORY_DEVICE. + + + + A description of #GstEncodingTarget in the +current locale. + + + + A #GList of +#GstEncodingProfile. + + + + + + + + Searches for the #GstEncodingTarget with the given name, loads it +and returns it. + +If the category name is specified only targets from that category will be +searched for. + + + The #GstEncodingTarget if available, else %NULL. + + + + + the name of the #GstEncodingTarget to load (automatically +converted to lower case internally as capital letters are not +valid for target names). + + + + the name of the target category, like +#GST_ENCODING_CATEGORY_DEVICE. Can be %NULL + + + + + + Opens the provided file and returns the contained #GstEncodingTarget. + + + The #GstEncodingTarget contained in the file, else +%NULL + + + + + The file location to load the #GstEncodingTarget from + + + + + + Adds the given @profile to the @target. Each added profile must have +a unique name within the profile. + +The @target will steal a reference to the @profile. If you wish to use +the profile after calling this method, you should increase its reference +count. + + + %TRUE if the profile was added, else %FALSE. + + + + + the #GstEncodingTarget to add a profile to + + + + the #GstEncodingProfile to add + + + + + + + + The category of the @target. For example: +#GST_ENCODING_CATEGORY_DEVICE. + + + + + a #GstEncodingTarget + + + + + + + + The description of the @target. + + + + + a #GstEncodingTarget + + + + + + + + The name of the @target. + + + + + a #GstEncodingTarget + + + + + + + + The path to the @target file. + + + + + a #GstEncodingTarget + + + + + + + + The matching #GstEncodingProfile, or %NULL. + + + + + a #GstEncodingTarget + + + + the name of the profile to retrieve + + + + + + + + A list of +#GstEncodingProfile(s) this @target handles. + + + + + + + a #GstEncodingTarget + + + + + + Saves the @target to a default user-local directory. + + + %TRUE if the target was correctly saved, else %FALSE. + + + + + a #GstEncodingTarget + + + + + + Saves the @target to the provided file location. + + + %TRUE if the target was correctly saved, else %FALSE. + + + + + a #GstEncodingTarget + + + + the location to store the @target at. + + + + + + + Variant of #GstEncodingProfile for video streams, allows specifying the @pass. + + + Creates a new #GstEncodingVideoProfile + +All provided allocatable arguments will be internally copied, so can be +safely freed/unreferenced after calling this method. + +If you wish to control the pass number (in case of multi-pass scenarios), +please refer to the gst_encoding_video_profile_set_pass() documentation. + +If you wish to use/force a constant framerate please refer to the +gst_encoding_video_profile_set_variableframerate() documentation. + + + the newly created #GstEncodingVideoProfile. + + + + + the #GstCaps + + + + the preset(s) to use on the encoder, can be %NULL + + + + the #GstCaps used to restrict the input to the encoder, can be +NULL. See gst_encoding_profile_get_restriction() for more details. + + + + the number of time this stream must be used. 0 means any number of + times (including never) + + + + + + Get the pass number if this is part of a multi-pass profile. + + + The pass number. Starts at 1 for multi-pass. 0 if this is +not a multi-pass profile + + + + + a #GstEncodingVideoProfile + + + + + + > *NOTE*: Fixed framerate won't be enforced when #encodebin:avoid-reencoding +> is set. + + + Whether non-constant video framerate is allowed for encoding. + + + + + a #GstEncodingVideoProfile + + + + + + Sets the pass number of this video profile. The first pass profile should have +this value set to 1. If this video profile isn't part of a multi-pass profile, +you may set it to 0 (the default value). + + + + + + + a #GstEncodingVideoProfile + + + + the pass number for this profile + + + + + + If set to %TRUE, then the incoming stream will be allowed to have non-constant +framerate. If set to %FALSE (default value), then the incoming stream will +be normalized by dropping/duplicating frames in order to produce a +constance framerate. + + + + + + + a #GstEncodingVideoProfile + + + + a boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Opaque context structure for the plugin installation. Use the provided +API to set details on it. + + + Creates a new #GstInstallPluginsContext. + + + a new #GstInstallPluginsContext. Free with +gst_install_plugins_context_free() when no longer needed + + + + + Copies a #GstInstallPluginsContext. + + + A copy of @ctx + + + + + a #GstInstallPluginsContext + + + + + + Frees a #GstInstallPluginsContext. + + + + + + + a #GstInstallPluginsContext + + + + + + This function is used to tell the external installer process whether it +should ask for confirmation or not before searching for missing plugins. + +If set, this option will be passed to the installer via a +--interaction=[show-confirm-search|hide-confirm-search] command line option. + + + + + + + a #GstInstallPluginsContext + + + + whether to ask for confirmation before searching for plugins + + + + + + This function is used to pass the calling application's desktop file ID to +the external installer process. + +A desktop file ID is the basename of the desktop file, including the +.desktop extension. + +If set, the desktop file ID will be passed to the installer via a +--desktop-id= command line option. + + + + + + + a #GstInstallPluginsContext + + + + the desktop file ID of the calling application + + + + + + Sets the startup notification ID for the launched process. + +This is typically used to to pass the current X11 event timestamp to the +external installer process. + +Startup notification IDs are defined in the +[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). + +If set, the ID will be passed to the installer via a +--startup-notification-id= command line option. + +GTK+/GNOME applications should be able to create a startup notification ID +like this: +|[ + timestamp = gtk_get_current_event_time (); + startup_id = g_strdup_printf ("_TIME%u", timestamp); +... +]| + + + + + + + a #GstInstallPluginsContext + + + + the startup notification ID + + + + + + This function is for X11-based applications (such as most Gtk/Qt +applications on linux/unix) only. You can use it to tell the external +installer the XID of your main application window. That way the installer +can make its own window transient to your application window during the +installation. + +If set, the XID will be passed to the installer via a --transient-for=XID +command line option. + +Gtk+/Gnome application should be able to obtain the XID of the top-level +window like this: +|[ +##include &lt;gtk/gtk.h&gt; +##ifdef GDK_WINDOWING_X11 +##include &lt;gdk/gdkx.h&gt; +##endif +... +##ifdef GDK_WINDOWING_X11 + xid = GDK_WINDOW_XWINDOW (GTK_WIDGET (application_window)-&gt;window); +##endif +... +]| + + + + + + + a #GstInstallPluginsContext + + + + the XWindow ID (XID) of the top-level application + + + + + + + The prototype of the callback function that will be called once the +external plugin installer program has returned. You only need to provide +a callback function if you are using the asynchronous interface. + + + + + + + whether the installation of the requested plugins succeeded or not + + + + the user data passed to gst_install_plugins_async() + + + + + + Result codes returned by gst_install_plugins_async() and +gst_install_plugins_sync(), and also the result code passed to the +#GstInstallPluginsResultFunc specified with gst_install_plugins_async(). + +These codes indicate success or failure of starting an external installer +program and to what extent the requested plugins could be installed. + + all of the requested plugins could be + installed + + + no appropriate installation candidate for + any of the requested plugins could be found. Only return this if nothing + has been installed. Return #GST_INSTALL_PLUGINS_PARTIAL_SUCCESS if + some (but not all) of the requested plugins could be installed. + + + an error occurred during the installation. If + this happens, the user has already seen an error message and another + one should not be displayed + + + some of the requested plugins could + be installed, but not all + + + the user has aborted the installation + + + the installer had an unclean exit code + (ie. death by signal) + + + the helper returned an invalid status code + + + returned by gst_install_plugins_async() to + indicate that everything went fine so far and the provided callback + will be called with the result of the installation later + + + some internal failure has + occurred when trying to start the installer + + + the helper script to call the + actual installer is not installed + + + a previously-started plugin + installation is still in progress, try again later + + + Convenience function to return the descriptive string associated +with a status code. This function returns English strings and +should not be used for user messages. It is here only to assist +in debugging. + + + a descriptive string for the status code in @ret + + + + + the return status code + + + + + + + + + + + + + + The major version of GStreamer's gst-plugins-base libraries at compile time. + + + + + The micro version of GStreamer's gst-plugins-base libraries at compile time. + + + + + The minor version of GStreamer's gst-plugins-base libraries at compile time. + + + + + The nano version of GStreamer's gst-plugins-base libraries at compile time. +Actual releases have 0, GIT versions have 1, prerelease versions have 2-... + + + + + Sets the level and profile on @caps if it can be determined from +@audio_config. See gst_codec_utils_aac_get_level() and +gst_codec_utils_aac_get_profile() for more details on the parameters. +@caps must be audio/mpeg caps with an "mpegversion" field of either 2 or 4. +If mpegversion is 4, the "base-profile" field is also set in @caps. + + + %TRUE if the level and profile could be set, %FALSE otherwise. + + + + + the #GstCaps to which level and profile fields are to be added + + + + a pointer to the AudioSpecificConfig + as specified in the Elementary Stream Descriptor (esds) + in ISO/IEC 14496-1. (See below for more details) + + + + + + Length of @audio_config in bytes + + + + + + Returns the channels of the given AAC stream. + + + The channels or 0 if the channel could not be determined. + + + + + a pointer to the AudioSpecificConfig + as specified in the Elementary Stream Descriptor (esds) + in ISO/IEC 14496-1. + + + + + + Length of @audio_config in bytes + + + + + + Translates the sample rate to the index corresponding to it in AAC spec. + + + The AAC index for this sample rate, -1 if the rate is not a +valid AAC sample rate. + + + + + Sample rate + + + + + + Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC +streams, the constraints from the AAC audio profile are applied. For AAC +Main, LTP, SSR and others, the Main profile is used. + +The @audio_config parameter follows the following format, starting from the +most significant bit of the first byte: + + * Bit 0:4 contains the AudioObjectType (if this is 0x5, then the + real AudioObjectType is carried after the rate and channel data) + * Bit 5:8 contains the sample frequency index (if this is 0xf, then the + next 24 bits define the actual sample frequency, and subsequent + fields are appropriately shifted). + * Bit 9:12 contains the channel configuration + + + The level as a const string and %NULL if the level could not be +determined. + + + + + a pointer to the AudioSpecificConfig + as specified in the Elementary Stream Descriptor (esds) + in ISO/IEC 14496-1. + + + + + + Length of @audio_config in bytes + + + + + + Returns the profile of the given AAC stream as a string. The profile is +normally determined using the AudioObjectType field which is in the first +5 bits of @audio_config + + + The profile as a const string and %NULL if the profile could not be +determined. + + + + + a pointer to the AudioSpecificConfig + as specified in the Elementary Stream Descriptor (esds) + in ISO/IEC 14496-1. + + + + + + Length of @audio_config in bytes + + + + + + Translates the sample rate index found in AAC headers to the actual sample +rate. + + + The sample rate if sr_idx is valid, 0 otherwise. + + + + + a pointer to the AudioSpecificConfig + as specified in the Elementary Stream Descriptor (esds) + in ISO/IEC 14496-1. + + + + + + Length of @audio_config + + + + + + Translates the sample rate index found in AAC headers to the actual sample +rate. + + + The sample rate if @sr_idx is valid, 0 otherwise. + + + + + Sample rate index as from the AudioSpecificConfig (MPEG-4 + container) or ADTS frame header + + + + + + Sets the level and profile in @caps if it can be determined from @sps. See +gst_codec_utils_h264_get_level() and gst_codec_utils_h264_get_profile() +for more details on the parameters. + + + %TRUE if the level and profile could be set, %FALSE otherwise. + + + + + the #GstCaps to which the level and profile are to be added + + + + Pointer to the sequence parameter set for the stream. + + + + + + Length of the data available in @sps. + + + + + + Converts the level indication (level_idc) in the stream's +sequence parameter set into a string. The SPS is expected to have the +same format as for gst_codec_utils_h264_get_profile(). + + + The level as a const string, or %NULL if there is an error. + + + + + Pointer to the sequence parameter set for the stream. + + + + + + Length of the data available in @sps. + + + + + + Transform a level string from the caps into the level_idc + + + the level_idc or 0 if the level is unknown + + + + + A level string from caps + + + + + + Converts the profile indication (profile_idc) in the stream's +sequence parameter set into a string. The SPS is expected to have the +following format, as defined in the H.264 specification. The SPS is viewed +as a bitstream here, with bit 0 being the most significant bit of the first +byte. + +* Bit 0:7 - Profile indication +* Bit 8 - constraint_set0_flag +* Bit 9 - constraint_set1_flag +* Bit 10 - constraint_set2_flag +* Bit 11 - constraint_set3_flag +* Bit 12 - constraint_set3_flag +* Bit 13:15 - Reserved +* Bit 16:24 - Level indication + + + The profile as a const string, or %NULL if there is an error. + + + + + Pointer to the sequence parameter set for the stream. + + + + + + Length of the data available in @sps. + + + + + + Sets the level, tier and profile in @caps if it can be determined from +@profile_tier_level. See gst_codec_utils_h265_get_level(), +gst_codec_utils_h265_get_tier() and gst_codec_utils_h265_get_profile() +for more details on the parameters. + + + %TRUE if the level, tier, profile could be set, %FALSE otherwise. + + + + + the #GstCaps to which the level, tier and profile are to be added + + + + Pointer to the profile_tier_level + struct + + + + + + Length of the data available in @profile_tier_level. + + + + + + Converts the level indication (general_level_idc) in the stream's +profile_tier_level structure into a string. The profiel_tier_level is +expected to have the same format as for gst_codec_utils_h264_get_profile(). + + + The level as a const string, or %NULL if there is an error. + + + + + Pointer to the profile_tier_level + for the stream + + + + + + Length of the data available in @profile_tier_level. + + + + + + Transform a level string from the caps into the level_idc + + + the level_idc or 0 if the level is unknown + + + + + A level string from caps + + + + + + Converts the profile indication (general_profile_idc) in the stream's +profile_level_tier structure into a string. The profile_tier_level is +expected to have the following format, as defined in the H.265 +specification. The profile_tier_level is viewed as a bitstream here, +with bit 0 being the most significant bit of the first byte. + +* Bit 0:1 - general_profile_space +* Bit 2 - general_tier_flag +* Bit 3:7 - general_profile_idc +* Bit 8:39 - gernal_profile_compatibility_flags +* Bit 40 - general_progressive_source_flag +* Bit 41 - general_interlaced_source_flag +* Bit 42 - general_non_packed_constraint_flag +* Bit 43 - general_frame_only_constraint_flag +* Bit 44:87 - See below +* Bit 88:95 - general_level_idc + + + The profile as a const string, or %NULL if there is an error. + + + + + Pointer to the profile_tier_level + structure for the stream. + + + + + + Length of the data available in @profile_tier_level + + + + + + Converts the tier indication (general_tier_flag) in the stream's +profile_tier_level structure into a string. The profile_tier_level +is expected to have the same format as for gst_codec_utils_h264_get_profile(). + + + The tier as a const string, or %NULL if there is an error. + + + + + Pointer to the profile_tier_level + for the stream. + + + + + + Length of the data available in @profile_tier_level. + + + + + + Sets the level and profile in @caps if it can be determined from +@vis_obj_seq. See gst_codec_utils_mpeg4video_get_level() and +gst_codec_utils_mpeg4video_get_profile() for more details on the +parameters. + + + %TRUE if the level and profile could be set, %FALSE otherwise. + + + + + the #GstCaps to which the level and profile are to be added + + + + Pointer to the visual object + sequence for the stream. + + + + + + Length of the data available in @sps. + + + + + + Converts the level indication in the stream's visual object sequence into +a string. @vis_obj_seq is expected to be the data following the visual +object sequence start code. Only the first byte +(profile_and_level_indication) is used. + + + The level as a const string, or NULL if there is an error. + + + + + Pointer to the visual object + sequence for the stream. + + + + + + Length of the data available in @sps. + + + + + + Converts the profile indication in the stream's visual object sequence into +a string. @vis_obj_seq is expected to be the data following the visual +object sequence start code. Only the first byte +(profile_and_level_indication) is used. + + + The profile as a const string, or NULL if there is an error. + + + + + Pointer to the visual object + sequence for the stream. + + + + + + Length of the data available in @sps. + + + + + + Creates Opus caps from the given parameters. + + + The #GstCaps, or %NULL if the parameters would lead to +invalid Opus caps. + + + + + the sample rate + + + + the number of channels + + + + the channel mapping family + + + + the number of independent streams + + + + the number of stereo streams + + + + the mapping between the streams + + + + + + + + Creates Opus caps from the given OpusHead @header and comment header +@comments. + + + The #GstCaps. + + + + + OpusHead header + + + + Comment header or NULL + + + + + + Creates OpusHead header from the given parameters. + + + The #GstBuffer containing the OpusHead. + + + + + the sample rate + + + + the number of channels + + + + the channel mapping family + + + + the number of independent streams + + + + the number of stereo streams + + + + the mapping between the streams + + + + + + Pre-skip in 48kHz samples or 0 + + + + Output gain or 0 + + + + + + Parses Opus caps and fills the different fields with defaults if possible. + + + %TRUE if parsing was successful, %FALSE otherwise. + + + + + the #GstCaps to parse the data from + + + + the sample rate + + + + the number of channels + + + + the channel mapping family + + + + the number of independent streams + + + + the number of stereo streams + + + + the mapping between the streams + + + + + + + + Parses the OpusHead header. + + + %TRUE if parsing was successful, %FALSE otherwise. + + + + + the OpusHead #GstBuffer + + + + the sample rate + + + + the number of channels + + + + the channel mapping family + + + + the number of independent streams + + + + the number of stereo streams + + + + the mapping between the streams + + + + + + Pre-skip in 48kHz samples or 0 + + + + Output gain or 0 + + + + + + Increments the reference count of @info. + + + + a #GstDiscovererInfo + + + + + Decrements the reference count of @info. + + + + a #GstDiscovererInfo + + + + + Increments the reference count of @info. + + + + a #GstDiscovererStreamInfo + + + + + Decrements the reference count of @info. + + + + a #GstDiscovererStreamInfo + + + + + Functions to create and handle encoding profiles. + +Encoding profiles describe the media types and settings one wishes to use +for an encoding process. The top-level profiles are commonly +#GstEncodingContainerProfile(s) (which contains a user-readable name and +description along with which container format to use). These, in turn, +reference one or more #GstEncodingProfile(s) which indicate which encoding +format should be used on each individual streams. + +#GstEncodingProfile(s) can be provided to the 'encodebin' element, which +will take care of selecting and setting up the required elements to produce +an output stream conforming to the specifications of the profile. + +Unlike other systems, the encoding profiles do not specify which #GstElement +to use for the various encoding and muxing steps, but instead relies on +specifying the format one wishes to use. + +Encoding profiles can be created at runtime by the application or loaded +from (and saved to) file using the #GstEncodingTarget API. + +## Defining a GstEncodingProfile as a string + +### Serialized encoding profile formats + +#### Using encoders and muxer element factory name: + +``` + muxer_factory_name:video_encoder_factory_name:audio_encoder_factory_name +``` + +For example to encode a stream into a WebM container, with an OGG audio +stream and a VP8 video stream, the serialized #GstEncodingProfile looks +like: + +``` + webmmux:vp8enc:vorbisenc +``` + +#### Define the encoding profile in a generic way using caps: + +``` + muxer_source_caps:video_encoder_source_caps:audio_encoder_source_caps +``` + +For example to encode a stream into a WebM container, with an OGG audio +stream and a VP8 video stream, the serialized #GstEncodingProfile looks +like: + +``` + video/webm:video/x-vp8:audio/x-vorbis +``` + +It is possible to mix caps and element type names so you can specify a specific +video encoder while using caps for other encoders/muxer. + +### Advanced encoding format serialization features: + +You can also set the preset name of the encoding profile using the +caps+preset_name syntax as in: + +``` + video/webm:video/x-vp8+youtube-preset:audio/x-vorbis +``` + +Moreover, you can set extra properties `presence`, `single-segment` and +`variable-framerate` * of an * encoding profile using the `|presence=` syntax +as in: + +``` + video/webm:video/x-vp8|presence=1,variable-framerate=true|single-segment=true:audio/x-vorbis +``` + +This field allows specifies the maximum number of times a +#GstEncodingProfile can be used inside an encodebin. If 0, it is not a +mandatory stream and can be used as many times as necessary. + +You can also use the `restriction_caps->encoded_format_caps` syntax to +specify the restriction caps to be set on a #GstEncodingProfile + +It corresponds to the restriction #GstCaps to apply before the encoder that +will be used in the profile. The fields present in restriction caps are +properties of the raw stream (that is, before encoding), such as height and +width for video and depth and sampling rate for audio. This property does +not make sense for muxers. See #gst_encoding_profile_get_restriction for +more details. + +To force a video stream to be encoded with a Full HD resolution (using WebM +as the container format, VP8 as the video codec and Vorbis as the audio +codec), you should use: + +``` + "video/webm:video/x-raw,width=1920,height=1080->video/x-vp8:audio/x-vorbis" +``` + +> NOTE: Make sure to enclose into quotes to avoid '>' to be reinterpreted by +> the shell. + +In the case you are using encoder types, the following is also possible: + +``` + "matroskamux:x264enc,width=1920,height=1080:audio/x-vorbis" +``` + +## Some serialized encoding formats examples: + +MP3 audio and H264 in MP4: + +``` + video/quicktime,variant=iso:video/x-h264:audio/mpeg,mpegversion=1,layer=3 +``` + +Vorbis and theora in OGG: + +``` + application/ogg:video/x-theora:audio/x-vorbis +``` + +AC3 and H264 in MPEG-TS: + +``` + video/mpegts:video/x-h264:audio/x-ac3 +``` + +## Loading a profile from encoding targets + +Anywhere where you have to use a string to define a #GstEncodingProfile, +you can use load it from a #GstEncodingTarget using the following syntaxes: + +``` + target_name[/profilename/category] +``` + +or + +``` + /path/to/target.gep:profilename +``` + +## Examples + +### Creating a profile + +``` c +#include <gst/pbutils/encoding-profile.h> +... +GstEncodingProfile * +create_ogg_theora_profile(void) +{ + GstEncodingContainerProfile *prof; + GstCaps *caps; + + caps = gst_caps_from_string("application/ogg"); + prof = gst_encoding_container_profile_new("Ogg audio/video", + "Standard OGG/THEORA/VORBIS", + caps, NULL); + gst_caps_unref (caps); + + caps = gst_caps_from_string("video/x-theora"); + gst_encoding_container_profile_add_profile(prof, + (GstEncodingProfile*) gst_encoding_video_profile_new(caps, NULL, NULL, 0)); + gst_caps_unref (caps); + + caps = gst_caps_from_string("audio/x-vorbis"); + gst_encoding_container_profile_add_profile(prof, + (GstEncodingProfile*) gst_encoding_audio_profile_new(caps, NULL, NULL, 0)); + gst_caps_unref (caps); + + return (GstEncodingProfile*) prof; +} + +``` + +### Example: Using an encoder preset with a profile + +``` c +#include <gst/pbutils/encoding-profile.h> +... +GstEncodingProfile * +create_ogg_theora_profile(void) +{ + GstEncodingVideoProfile *v; + GstEncodingAudioProfile *a; + GstEncodingContainerProfile *prof; + GstCaps *caps; + GstPreset *preset; + + caps = gst_caps_from_string ("application/ogg"); + prof = gst_encoding_container_profile_new ("Ogg audio/video", + "Standard OGG/THEORA/VORBIS", + caps, NULL); + gst_caps_unref (caps); + + preset = GST_PRESET (gst_element_factory_make ("theoraenc", "theorapreset")); + g_object_set (preset, "bitrate", 1000, NULL); + // The preset will be saved on the filesystem, + // so try to use a descriptive name + gst_preset_save_preset (preset, "theora_bitrate_preset"); + gst_object_unref (preset); + + caps = gst_caps_from_string ("video/x-theora"); + v = gst_encoding_video_profile_new (caps, "theora_bitrate_preset", NULL, 0); + gst_encoding_container_profile_add_profile (prof, (GstEncodingProfile*) v); + gst_caps_unref (caps); + + caps = gst_caps_from_string ("audio/x-vorbis"); + a = gst_encoding_audio_profile_new (caps, NULL, NULL, 0); + gst_encoding_container_profile_add_profile (prof, (GstEncodingProfile*) a); + gst_caps_unref (caps); + + return (GstEncodingProfile*) prof; +} + +``` + +### Listing categories, targets and profiles + +``` c +#include <gst/pbutils/encoding-profile.h> +... +GstEncodingProfile *prof; +GList *categories, *tmpc; +GList *targets, *tmpt; +... +categories = gst_encoding_list_available_categories (); + +... Show available categories to user ... + +for (tmpc = categories; tmpc; tmpc = tmpc->next) { + gchar *category = (gchar *) tmpc->data; + + ... and we can list all targets within that category ... + + targets = gst_encoding_list_all_targets (category); + + ... and show a list to our users ... + + g_list_foreach (targets, (GFunc) gst_encoding_target_unref, NULL); + g_list_free (targets); +} + +g_list_foreach (categories, (GFunc) g_free, NULL); +g_list_free (categories); + +... +``` + + + On top of the notion of profiles, we implement the notion of EncodingTarget. +Encoding Targets are basically a higher level of abstraction to define formats +for specific target types. Those can define several GstEncodingProfiles with +different names, for example one for transcoding in full HD, another one for +low res, etc.. which are defined in the same encoding target. + +Basically if you want to encode a stream to send it to, say, youtube you should +have a Youtube encoding target defined in the "online-service" category. + +## Encoding target serialization format + +Encoding targets are serialized in a KeyFile like files. + +|[ +[GStreamer Encoding Target] +name : <name> +category : <category> +\description : <description> #translatable + +[profile-<profile1name>] +name : <name> +\description : <description> #optional +format : <format> +preset : <preset> + +[streamprofile-<id>] +parent : <encodingprofile.name>[,<encodingprofile.name>..] +\type : <type> # "audio", "video", "text" +format : <format> +preset : <preset> +restriction : <restriction> +presence : <presence> +pass : <pass> +variableframerate : <variableframerate> +]| + +## Location of encoding target files + +$GST_DATADIR/gstreamer-GST_API_VERSION/encoding-profile +$HOME/gstreamer-GST_API_VERSION/encoding-profile + +There also is a GST_ENCODING_TARGET_PATH environment variable +defining a list of folder containing encoding target files. + +## Naming convention + +|[ + $(target.category)/$(target.name).gep +]| + +## Naming restrictions: + + * lowercase ASCII letter for the first character + * Same for all other characters + numerics + hyphens + + + List all available #GstEncodingTarget for the specified category, or all categories +if @categoryname is %NULL. + + + The list of #GstEncodingTarget + + + + + + + The category, for ex: #GST_ENCODING_CATEGORY_DEVICE. +Can be %NULL. + + + + + + Lists all #GstEncodingTarget categories present on disk. + + + A list +of #GstEncodingTarget categories. + + + + + + + Increases the reference count of the @profile. + + + + a #GstEncodingProfile + + + + + Decreases the reference count of the @profile, possibly freeing the @profile. + + + + a #GstEncodingProfile + + + + + Increases the reference count of the @target. + + + + a #GstEncodingTarget + + + + + Decreases the reference count of the @target, possibly freeing it. + + + + a #GstEncodingTarget + + + + + libgstpbutils is a general utility library for plugins and applications. +It currently provides the +following: + +* human-readable description strings of codecs, elements, sources, decoders, +encoders, or sinks from decoder/encoder caps, element names, or protocol +names. + +* support for applications to initiate installation of missing plugins (if +this is supported by the distribution or operating system used) + +* API for GStreamer elements to create missing-plugin messages in order to +communicate to the application that a certain type of plugin is missing +(decoder, encoder, URI protocol source, URI protocol sink, named element) + +* API for applications to recognise and handle missing-plugin messages + +## Linking to this library + +You should obtain the required CFLAGS and LIBS using pkg-config on the +gstreamer-plugins-base-1.0 module. You will then also need to add +'-lgstreamer-pbutils-1.0' manually to your LIBS line. + +## Library initialisation + +Before using any of its functions, applications and plugins must call +gst_pb_utils_init() to initialise the library. + + + Provides codec-specific ulility functions such as functions to provide the +codec profile and level in human-readable string form from header data. + + + The above functions provide human-readable strings for media formats +and decoder/demuxer/depayloader/encoder/muxer/payloader elements for use +in error dialogs or other messages shown to users. + +gst_pb_utils_add_codec_description_to_tag_list() is a utility function +for demuxer and decoder elements to add audio/video codec tags from a +given (fixed) #GstCaps. + + + ## Overview + +Using this API, applications can request the installation of missing +GStreamer plugins. These may be missing decoders/demuxers or +encoders/muxers for a certain format, sources or sinks for a certain URI +protocol (e.g. 'http'), or certain elements known by their element +factory name ('audioresample'). + +Whether plugin installation is supported or not depends on the operating +system and/or distribution in question. The vendor of the operating +system needs to make sure the necessary hooks and mechanisms are in +place for plugin installation to work. See below for more detailed +information. + +From the application perspective, plugin installation is usually +triggered either + +- when the application itself has found that it wants or needs to + install a certain element +- when the application has been notified by an element (such as + playbin or decodebin) that one or more plugins are missing *and* the + application has decided that it wants to install one or more of + those missing plugins + +The install functions in this section all take one or more 'detail +strings'. These detail strings contain information about the type of +plugin that needs to be installed (decoder, encoder, source, sink, or +named element), and some additional information such GStreamer version +used and a human-readable description of the component to install for +user dialogs. + +Applications should not concern themselves with the composition of the +string itself. They should regard the string as if it was a shared +secret between GStreamer and the plugin installer application. + +Detail strings can be obtained using the function +gst_missing_plugin_message_get_installer_detail() on a +missing-plugin message. Such a message will either have been found by +the application on a pipeline's #GstBus, or the application will have +created it itself using gst_missing_element_message_new(), +gst_missing_decoder_message_new(), +gst_missing_encoder_message_new(), +gst_missing_uri_sink_message_new(), or +gst_missing_uri_source_message_new(). + +For each GStreamer element/plugin/component that should be installed, +the application needs one of those 'installer detail' string mentioned +in the previous section. This string can be obtained, as already +mentioned above, from a missing-plugin message using the function +gst_missing_plugin_message_get_installer_detail(). The +missing-plugin message is either posted by another element and then +found on the bus by the application, or the application has created it +itself as described above. + +The application will then call gst_install_plugins_async(), passing a +NULL-terminated array of installer detail strings, and a function that +should be called when the installation of the plugins has finished +(successfully or not). Optionally, a #GstInstallPluginsContext created +with gst_install_plugins_context_new() may be passed as well. This +way additional optional arguments like the application window's XID can +be passed to the external installer application. + +gst_install_plugins_async() will return almost immediately, with the +return code indicating whether plugin installation was started or not. +If the necessary hooks for plugin installation are in place and an +external installer application has in fact been called, the passed in +function will be called with a result code as soon as the external +installer has finished. If the result code indicates that new plugins +have been installed, the application will want to call +gst_update_registry() so the run-time plugin registry is updated and +the new plugins are made available to the application. + +> A Gtk/GLib main loop must be running in order for the result function +> to be called when the external installer has finished. If this is not +> the case, make sure to regularly call in your code: +> +> g_main_context_iteration (NULL,FALSE); + +## 1. Installer hook + +When GStreamer applications initiate plugin installation via +gst_install_plugins_async() or gst_install_plugins_sync(), a +pre-defined helper application will be called. + +The exact path of the helper application to be called is set at compile +time, usually by the build system based on the install prefix. +For a normal package build into the `/usr` prefix, this will usually +default to `/usr/libexec/gst-install-plugins-helper` or +`/usr/lib/gst-install-plugins-helper`. + +Vendors/distros who want to support GStreamer plugin installation should +either provide such a helper script/application or use the meson option +`-Dinstall_plugins_helper'=/path/to/installer` to make GStreamer call an +installer of their own directly. + +It is strongly recommended that vendors provide a small helper +application as interlocutor to the real installer though, even more so +if command line argument munging is required to transform the command +line arguments passed by GStreamer to the helper application into +arguments that are understood by the real installer. + +The helper application path defined at compile time can be overridden at +runtime by setting the GST_INSTALL_PLUGINS_HELPER environment +variable. This can be useful for testing/debugging purposes. + +## 2. Arguments passed to the install helper + +GStreamer will pass the following arguments to the install helper (this +is in addition to the path of the executable itself, which is by +convention argv[0]): + +- none to many optional arguments in the form of `--foo-bar=val`. + Example: `--transient-for=XID` where XID is the X Window ID of the + main window of the calling application (so the installer can make + itself transient to that window). Unknown optional arguments should + be ignored by the installer. + +- one 'installer detail string' argument for each plugin to be + installed; these strings will have a `gstreamer` prefix; the exact + format of the detail string is explained below + +## 3. Detail string describing the missing plugin + +The string is in UTF-8 encoding and is made up of several fields, +separated by '|' characters (but neither the first nor the last +character is a '|'). The fields are: + +- plugin system identifier, ie. "gstreamer" + This identifier determines the format of the rest of the detail + string. Automatic plugin installers should not process detail + strings with unknown identifiers. This allows other plugin-based + libraries to use the same mechanism for their automatic plugin + installation needs, or for the format to be changed should it turn + out to be insufficient. +- plugin system version, e.g. "1.0" + This is required so that when there is GStreamer-2.0 at some point + in future, the different major versions can still co-exist and use + the same plugin install mechanism in the same way. +- application identifier, e.g. "totem" + This may also be in the form of "pid/12345" if the program name + can't be obtained for some reason. +- human-readable localised description of the required component, e.g. + "Vorbis audio decoder" +- identifier string for the required component (see below for details + about how to map this to the package/plugin that needs installing), + e.g. + - urisource-$(PROTOCOL_REQUIRED), e.g. urisource-http or + urisource-mms + - element-$(ELEMENT_REQUIRED), e.g. element-videoconvert + - decoder-$(CAPS_REQUIRED), e.g. (do read below for more + details!): + - decoder-audio/x-vorbis + - decoder-application/ogg + - decoder-audio/mpeg, mpegversion=(int)4 + - decoder-video/mpeg, systemstream=(boolean)true, + mpegversion=(int)2 + - encoder-$(CAPS_REQUIRED), e.g. encoder-audio/x-vorbis +- optional further fields not yet specified + +An entire ID string might then look like this, for example: ` +gstreamer|1.0|totem|Vorbis audio decoder|decoder-audio/x-vorbis` + +Plugin installers parsing this ID string should expect further fields +also separated by '|' symbols and either ignore them, warn the user, or +error out when encountering them. + +Those unfamiliar with the GStreamer 'caps' system should note a few +things about the caps string used in the above decoder/encoder case: + +- the first part ("video/mpeg") of the caps string is a GStreamer + media type and *not* a MIME type. Wherever possible, the GStreamer + media type will be the same as the corresponding MIME type, but + often it is not. +- a caps string may or may not have additional comma-separated fields + of various types (as seen in the examples above) +- the caps string of a 'required' component (as above) will always + have fields with fixed values, whereas an introspected string (see + below) may have fields with non-fixed values. Compare for example: + - `audio/mpeg, mpegversion=(int)4` vs. + `audio/mpeg, mpegversion=(int){2, 4}` + - `video/mpeg, mpegversion=(int)2` vs. + `video/mpeg, systemstream=(boolean){ true, false}, mpegversion=(int)[1, 2]` + +## 4. Exit codes the installer should return + +The installer should return one of the following exit codes when it +exits: + +- 0 if all of the requested plugins could be installed + (#GST_INSTALL_PLUGINS_SUCCESS) +- 1 if no appropriate installation candidate for any of the requested + plugins could be found. Only return this if nothing has been + installed (#GST_INSTALL_PLUGINS_NOT_FOUND) +- 2 if an error occurred during the installation. The application will + assume that the user will already have seen an error message by the + installer in this case and will usually not show another one + (#GST_INSTALL_PLUGINS_ERROR) +- 3 if some of the requested plugins could be installed, but not all + (#GST_INSTALL_PLUGINS_PARTIAL_SUCCESS) +- 4 if the user aborted the installation + (#GST_INSTALL_PLUGINS_USER_ABORT) + +## 5. How to map the required detail string to packages + +It is up to the vendor to find mechanism to map required components from +the detail string to the actual packages/plugins to install. This could +be a hardcoded list of mappings, for example, or be part of the +packaging system metadata. + +GStreamer plugin files can be introspected for this information. The +`gst-inspect` utility has a special command line option that will output +information similar to what is required. For example ` +$ gst-inspect-1.0 --print-plugin-auto-install-info /path/to/libgstvorbis.so +should output something along the lines of +`decoder-audio/x-vorbis`, `element-vorbisdec` `element-vorbisenc` +`element-vorbisparse`, `element-vorbistag`, `encoder-audio/x-vorbis` + +Note that in the encoder and decoder case the introspected caps can be +more complex with additional fields, e.g. +`audio/mpeg,mpegversion=(int){2,4}`, so they will not always exactly +match the caps wanted by the application. It is up to the installer to +deal with this (either by doing proper caps intersection using the +GStreamer #GstCaps API, or by only taking into account the media type). + +Another potential source of problems are plugins such as ladspa or +libvisual where the list of elements depends on the installed +ladspa/libvisual plugins at the time. This is also up to the +distribution to handle (but usually not relevant for playback +applications). + + + Functions to create, recognise and parse missing-plugins messages for +applications and elements. + +Missing-plugin messages are posted on the bus by elements like decodebin +or playbin if they can't find an appropriate source element or decoder +element. The application can use these messages for two things: + + * concise error/problem reporting to the user mentioning what exactly + is missing, see gst_missing_plugin_message_get_description() + + * initiate installation of missing plugins, see + gst_missing_plugin_message_get_installer_detail() and + gst_install_plugins_async() + +Applications may also create missing-plugin messages themselves to install +required elements that are missing, using the install mechanism mentioned +above. + + + Use the GST_PLUGINS_BASE_VERSION_* macros e.g. to check what version of +gst-plugins-base you are building against, and gst_plugins_base_version() +if you need to check at runtime what version of the gst-plugins-base +libraries are being used / you are currently linked against. + +The version macros get defined by including &lt;gst/pbutils/pbutils.h&gt;. + + + Requests plugin installation without blocking. Once the plugins have been +installed or installation has failed, @func will be called with the result +of the installation and your provided @user_data pointer. + +This function requires a running GLib/Gtk main loop. If you are not +running a GLib/Gtk main loop, make sure to regularly call +g_main_context_iteration(NULL,FALSE). + +The installer strings that make up @detail are typically obtained by +calling gst_missing_plugin_message_get_installer_detail() on missing-plugin +messages that have been caught on a pipeline's bus or created by the +application via the provided API, such as gst_missing_element_message_new(). + +It is possible to request the installation of multiple missing plugins in +one go (as might be required if there is a demuxer for a certain format +installed but no suitable video decoder and no suitable audio decoder). + + + result code whether an external installer could be started + + + + + NULL-terminated array + of installer string details (see below) + + + + + + a #GstInstallPluginsContext, or NULL + + + + the function to call when the installer program returns + + + + the user data to pass to @func when called, or NULL + + + + + + Checks whether plugin installation (initiated by this application only) +is currently in progress. + + + TRUE if plugin installation is in progress, otherwise FALSE + + + + + Convenience function to return the descriptive string associated +with a status code. This function returns English strings and +should not be used for user messages. It is here only to assist +in debugging. + + + a descriptive string for the status code in @ret + + + + + the return status code + + + + + + Checks whether plugin installation is likely to be supported by the +current environment. This currently only checks whether the helper script +that is to be provided by the distribution or operating system vendor +exists. + + + TRUE if plugin installation is likely to be supported. + + + + + Requests plugin installation and block until the plugins have been +installed or installation has failed. + +This function should almost never be used, it only exists for cases where +a non-GLib main loop is running and the user wants to run it in a separate +thread and marshal the result back asynchronously into the main thread +using the other non-GLib main loop. You should almost always use +gst_install_plugins_async() instead of this function. + + + the result of the installation. + + + + + NULL-terminated array + of installer string details + + + + + + a #GstInstallPluginsContext, or NULL + + + + + + Checks whether @msg is a missing plugins message. + + + %TRUE if @msg is a missing-plugins message, otherwise %FALSE. + + + + + a #GstMessage + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions in +the case where the application knows exactly what kind of plugin it is +missing. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + the (fixed) caps for which a decoder element is needed + + + + + + Creates a missing-plugin message for @element to notify the application +that a decoder element for a particular set of (fixed) caps is missing. +This function is mainly for use in plugins. + + + a new #GstMessage, or NULL on error + + + + + the #GstElement posting the message + + + + the (fixed) caps for which a decoder element is needed + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions in +the case where the application knows exactly what kind of plugin it is +missing. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + the name of the missing element (element factory), + e.g. "videoscale" or "cdparanoiasrc" + + + + + + Creates a missing-plugin message for @element to notify the application +that a certain required element is missing. This function is mainly for +use in plugins. + + + a new #GstMessage, or NULL on error + + + + + the #GstElement posting the message + + + + the name of the missing element (element factory), + e.g. "videoscale" or "cdparanoiasrc" + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions in +the case where the application knows exactly what kind of plugin it is +missing. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + the (fixed) caps for which an encoder element is needed + + + + + + Creates a missing-plugin message for @element to notify the application +that an encoder element for a particular set of (fixed) caps is missing. +This function is mainly for use in plugins. + + + a new #GstMessage, or NULL on error + + + + + the #GstElement posting the message + + + + the (fixed) caps for which an encoder element is needed + + + + + + Returns a localised string describing the missing feature, for use in +error dialogs and the like. Should never return NULL unless @msg is not +a valid missing-plugin message. + +This function is mainly for applications that need a human-readable string +describing a missing plugin, given a previously collected missing-plugin +message + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + a missing-plugin #GstMessage of type #GST_MESSAGE_ELEMENT + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + a missing-plugin #GstMessage of type #GST_MESSAGE_ELEMENT + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions in +the case where the application knows exactly what kind of plugin it is +missing. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + the URI protocol the missing source needs to implement, + e.g. "http" or "mms" + + + + + + Creates a missing-plugin message for @element to notify the application +that a sink element for a particular URI protocol is missing. This +function is mainly for use in plugins. + + + a new #GstMessage, or NULL on error + + + + + the #GstElement posting the message + + + + the URI protocol the missing sink needs to implement, + e.g. "http" or "smb" + + + + + + Returns an opaque string containing all the details about the missing +element to be passed to an external installer called via +gst_install_plugins_async() or gst_install_plugins_sync(). + +This function is mainly for applications that call external plugin +installation mechanisms using one of the two above-mentioned functions in +the case where the application knows exactly what kind of plugin it is +missing. + + + a newly-allocated detail string, or NULL on error. Free string + with g_free() when not needed any longer. + + + + + the URI protocol the missing source needs to implement, + e.g. "http" or "mms" + + + + + + Creates a missing-plugin message for @element to notify the application +that a source element for a particular URI protocol is missing. This +function is mainly for use in plugins. + + + a new #GstMessage, or NULL on error + + + + + the #GstElement posting the message + + + + the URI protocol the missing source needs to implement, + e.g. "http" or "mms" + + + + + + Adds a codec tag describing the format specified by @caps to @taglist. + + + TRUE if a codec tag was added, FALSE otherwise. + + + + + a #GstTagList + + + + a GStreamer codec tag such as #GST_TAG_AUDIO_CODEC, + #GST_TAG_VIDEO_CODEC or #GST_TAG_CODEC. If none is specified, + the function will attempt to detect the appropriate category. + + + + the (fixed) #GstCaps for which a codec tag should be added. + + + + + + Returns a localised (as far as this is possible) string describing the +media format specified in @caps, for use in error dialogs or other messages +to be seen by the user. Should never return NULL unless @caps is invalid. + +Also see the convenience function +gst_pb_utils_add_codec_description_to_tag_list(). + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the (fixed) #GstCaps for which an format description is needed + + + + + + Returns a localised string describing an decoder for the format specified +in @caps, for use in error dialogs or other messages to be seen by the user. +Should never return NULL unless @factory_name or @caps are invalid. + +This function is mainly for internal use, applications would typically +use gst_missing_plugin_message_get_description() to get a description of +a missing feature from a missing-plugin message. + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the (fixed) #GstCaps for which an decoder description is needed + + + + + + Returns a localised string describing the given element, for use in +error dialogs or other messages to be seen by the user. Should never +return NULL unless @factory_name is invalid. + +This function is mainly for internal use, applications would typically +use gst_missing_plugin_message_get_description() to get a description of +a missing feature from a missing-plugin message. + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the name of the element, e.g. "giosrc" + + + + + + Returns a localised string describing an encoder for the format specified +in @caps, for use in error dialogs or other messages to be seen by the user. +Should never return NULL unless @factory_name or @caps are invalid. + +This function is mainly for internal use, applications would typically +use gst_missing_plugin_message_get_description() to get a description of +a missing feature from a missing-plugin message. + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the (fixed) #GstCaps for which an encoder description is needed + + + + + + Returns a localised string describing a sink element handling the protocol +specified in @protocol, for use in error dialogs or other messages to be +seen by the user. Should never return NULL unless @protocol is invalid. + +This function is mainly for internal use, applications would typically +use gst_missing_plugin_message_get_description() to get a description of +a missing feature from a missing-plugin message. + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the protocol the sink element needs to handle, e.g. "http" + + + + + + Returns a localised string describing a source element handling the protocol +specified in @protocol, for use in error dialogs or other messages to be +seen by the user. Should never return NULL unless @protocol is invalid. + +This function is mainly for internal use, applications would typically +use gst_missing_plugin_message_get_description() to get a description of +a missing feature from a missing-plugin message. + + + a newly-allocated description string, or NULL on error. Free + string with g_free() when not needed any longer. + + + + + the protocol the source element needs to handle, e.g. "http" + + + + + + Initialises the base utils support library. This function is not +thread-safe. Applications should call it after calling gst_init(), +plugins should call it from their plugin_init function. + +This function may be called multiple times. It will do nothing if the +library has already been initialised. + + + + + + + Gets the version number of the GStreamer Plugins Base libraries. + + + + + + + pointer to a guint to store the major version number, or %NULL + + + + pointer to a guint to store the minor version number, or %NULL + + + + pointer to a guint to store the micro version number, or %NULL + + + + pointer to a guint to store the nano version number, or %NULL + + + + + + This function returns a string that is useful for describing this version +of GStreamer's gst-plugins-base libraries to the outside world: user agent +strings, logging, about dialogs ... + + + a newly allocated string describing this version of gst-plugins-base + + + + + diff --git a/girs/GstRtp-1.0.gir b/girs/GstRtp-1.0.gir new file mode 100644 index 0000000000..58af7ee5dd --- /dev/null +++ b/girs/GstRtp-1.0.gir @@ -0,0 +1,8509 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Note: The API in this module is not yet declared stable. + +The GstRTPCBuffer helper functions makes it easy to parse and create regular +#GstBuffer objects that contain compound RTCP packets. These buffers are typically +of 'application/x-rtcp' #GstCaps. + +An RTCP buffer consists of 1 or more #GstRTCPPacket structures that you can +retrieve with gst_rtcp_buffer_get_first_packet(). #GstRTCPPacket acts as a pointer +into the RTCP buffer; you can move to the next packet with +gst_rtcp_packet_move_to_next(). + + + + + + + + + Add a new packet of @type to @rtcp. @packet will point to the newly created +packet. + + + %TRUE if the packet could be created. This function returns %FALSE +if the max mtu is exceeded for the buffer. + + + + + a valid RTCP buffer + + + + the #GstRTCPType of the new packet + + + + pointer to new packet + + + + + + Initialize a new #GstRTCPPacket pointer that points to the first packet in +@rtcp. + + + TRUE if the packet existed in @rtcp. + + + + + a valid RTCP buffer + + + + a #GstRTCPPacket + + + + + + Get the number of RTCP packets in @rtcp. + + + the number of RTCP packets in @rtcp. + + + + + a valid RTCP buffer + + + + + + Finish @rtcp after being constructed. This function is usually called +after gst_rtcp_buffer_map() and after adding the RTCP items to the new buffer. + +The function adjusts the size of @rtcp with the total length of all the +added packets. + + + + + + + a buffer with an RTCP packet + + + + + + Open @buffer for reading or writing, depending on @flags. The resulting RTCP +buffer state is stored in @rtcp. + + + + + + + a buffer with an RTCP packet + + + + flags for the mapping + + + + resulting #GstRTCPBuffer + + + + + + Create a new buffer for constructing RTCP packets. The packet will have a +maximum size of @mtu. + + + A newly allocated buffer. + + + + + the maximum mtu size. + + + + + + Create a new buffer and set the data to a copy of @len +bytes of @data and the size to @len. The data will be freed when the buffer +is freed. + + + A newly allocated buffer with a copy of @data and of size @len. + + + + + data for the new buffer + + + + + + the length of data + + + + + + Create a new buffer and set the data and size of the buffer to @data and @len +respectively. @data will be freed when the buffer is unreffed, so this +function transfers ownership of @data to the new buffer. + + + A newly allocated buffer with @data and of size @len. + + + + + data for the new buffer + + + + + + the length of data + + + + + + Check if the data pointed to by @buffer is a valid RTCP packet using +gst_rtcp_buffer_validate_data(). + + + TRUE if @buffer is a valid RTCP packet. + + + + + the buffer to validate + + + + + + Check if the @data and @size point to the data of a valid compound, +non-reduced size RTCP packet. +Use this function to validate a packet before using the other functions in +this module. + + + TRUE if the data points to a valid RTCP packet. + + + + + the data to validate + + + + + + the length of @data to validate + + + + + + Check if the @data and @size point to the data of a valid RTCP packet. +Use this function to validate a packet before using the other functions in +this module. + +This function is updated to support reduced size rtcp packets according to +RFC 5506 and will validate full compound RTCP packets as well as reduced +size RTCP packets. + + + TRUE if the data points to a valid RTCP packet. + + + + + the data to validate + + + + + + the length of @data to validate + + + + + + Check if the data pointed to by @buffer is a valid RTCP packet using +gst_rtcp_buffer_validate_reduced(). + + + TRUE if @buffer is a valid RTCP packet. + + + + + the buffer to validate + + + + + + + Different types of feedback messages. + + Invalid type + + + Generic NACK + + + Temporary Maximum Media Stream Bit Rate Request + + + Temporary Maximum Media Stream Bit Rate + Notification + + + Request an SR packet for early + synchronization + + + + + Picture Loss Indication + + + Slice Loss Indication + + + Reference Picture Selection Indication + + + Application layer Feedback + + + Full Intra Request Command + + + Temporal-Spatial Trade-off Request + + + Temporal-Spatial Trade-off Notification + + + Video Back Channel Message + + + + Data structure that points to a packet at @offset in @buffer. +The size of the structure is made public to allow stack allocations. + + + pointer to RTCP buffer + + + + offset of packet in buffer data + + + + + + + + + + + + + + + + + + + + + + + + + Add profile-specific extension @data to @packet. If @packet already +contains profile-specific extension @data will be appended to the existing +extension. + + + %TRUE if the profile specific extension data was added. + + + + + a valid SR or RR #GstRTCPPacket + + + + profile-specific data + + + + + + length of the profile-specific data in bytes + + + + + + Add a new report block to @packet with the given values. + + + %TRUE if the packet was created. This function can return %FALSE if +the max MTU is exceeded or the number of report blocks is greater than +#GST_RTCP_MAX_RB_COUNT. + + + + + a valid SR or RR #GstRTCPPacket + + + + data source being reported + + + + fraction lost since last SR/RR + + + + the cumululative number of packets lost + + + + the extended last sequence number received + + + + the interarrival jitter + + + + the last SR packet from this source + + + + the delay since last SR packet + + + + + + Get the application-dependent data attached to a RTPFB or PSFB @packet. + + + A pointer to the data + + + + + a valid APP #GstRTCPPacket + + + + + + Get the length of the application-dependent data attached to an APP +@packet. + + + The length of data in 32-bit words. + + + + + a valid APP #GstRTCPPacket + + + + + + Get the name field of the APP @packet. + + + The 4-byte name field, not zero-terminated. + + + + + a valid APP #GstRTCPPacket + + + + + + Get the SSRC/CSRC field of the APP @packet. + + + The SSRC/CSRC. + + + + + a valid APP #GstRTCPPacket + + + + + + Get the subtype field of the APP @packet. + + + The subtype. + + + + + a valid APP #GstRTCPPacket + + + + + + Set the length of the application-dependent data attached to an APP +@packet. + + + %TRUE if there was enough space in the packet to add this much +data. + + + + + a valid APP #GstRTCPPacket + + + + Length of the data in 32-bit words + + + + + + Set the name field of the APP @packet. + + + + + + + a valid APP #GstRTCPPacket + + + + 4-byte ASCII name + + + + + + Set the SSRC/CSRC field of the APP @packet. + + + + + + + a valid APP #GstRTCPPacket + + + + SSRC/CSRC of the packet + + + + + + Set the subtype field of the APP @packet. + + + + + + + a valid APP #GstRTCPPacket + + + + subtype of the packet + + + + + + Add @ssrc to the BYE @packet. + + + %TRUE if the ssrc was added. This function can return %FALSE if +the max MTU is exceeded or the number of sources blocks is greater than +#GST_RTCP_MAX_BYE_SSRC_COUNT. + + + + + a valid BYE #GstRTCPPacket + + + + an SSRC to add + + + + + + Adds @len SSRCs in @ssrc to BYE @packet. + + + %TRUE if the all the SSRCs were added. This function can return %FALSE if +the max MTU is exceeded or the number of sources blocks is greater than +#GST_RTCP_MAX_BYE_SSRC_COUNT. + + + + + a valid BYE #GstRTCPPacket + + + + an array of SSRCs to add + + + + + + number of elements in @ssrc + + + + + + Get the @nth SSRC of the BYE @packet. + + + The @nth SSRC of @packet. + + + + + a valid BYE #GstRTCPPacket + + + + the nth SSRC to get + + + + + + Get the reason in @packet. + + + The reason for the BYE @packet or NULL if the packet did not contain +a reason string. The string must be freed with g_free() after usage. + + + + + a valid BYE #GstRTCPPacket + + + + + + Get the length of the reason string. + + + The length of the reason string or 0 when there is no reason string +present. + + + + + a valid BYE #GstRTCPPacket + + + + + + Get the number of SSRC fields in @packet. + + + The number of SSRC fields in @packet. + + + + + a valid BYE #GstRTCPPacket + + + + + + Set the reason string to @reason in @packet. + + + TRUE if the string could be set. + + + + + a valid BYE #GstRTCPPacket + + + + a reason string + + + + + + The profile-specific extension data is copied into a new allocated +memory area @data. This must be freed with g_free() after usage. + + + %TRUE if there was valid data. + + + + + a valid SR or RR #GstRTCPPacket + + + + result profile-specific data + + + + + + length of the profile-specific extension data + + + + + + Get the Feedback Control Information attached to a RTPFB or PSFB @packet. + + + a pointer to the FCI + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + + + Get the length of the Feedback Control Information attached to a +RTPFB or PSFB @packet. + + + The length of the FCI in 32-bit words. + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + + + Get the media SSRC field of the RTPFB or PSFB @packet. + + + the media SSRC. + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + + + Get the sender SSRC field of the RTPFB or PSFB @packet. + + + the sender SSRC. + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + + + Get the feedback message type of the FB @packet. + + + The feedback message type. + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + + + Set the length of the Feedback Control Information attached to a +RTPFB or PSFB @packet. + + + %TRUE if there was enough space in the packet to add this much FCI + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + Length of the FCI in 32-bit words + + + + + + Set the media SSRC field of the RTPFB or PSFB @packet. + + + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + a media SSRC + + + + + + Set the sender SSRC field of the RTPFB or PSFB @packet. + + + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + a sender SSRC + + + + + + Set the feedback message type of the FB @packet. + + + + + + + a valid RTPFB or PSFB #GstRTCPPacket + + + + the #GstRTCPFBType to set + + + + + + Get the count field in @packet. + + + The count field in @packet or -1 if @packet does not point to a +valid packet. + + + + + a valid #GstRTCPPacket + + + + + + Get the length field of @packet. This is the length of the packet in +32-bit words minus one. + + + The length field of @packet. + + + + + a valid #GstRTCPPacket + + + + + + Get the packet padding of the packet pointed to by @packet. + + + If the packet has the padding bit set. + + + + + a valid #GstRTCPPacket + + + + + + + + %TRUE if there was valid data. + + + + + a valid SR or RR #GstRTCPPacket + + + + result profile-specific data + + + + + + result length of the profile-specific data + + + + + + + + The number of 32-bit words containing profile-specific extension + data from @packet. + + + + + a valid SR or RR #GstRTCPPacket + + + + + + Parse the values of the @nth report block in @packet and store the result in +the values. + + + + + + + a valid SR or RR #GstRTCPPacket + + + + the nth report block in @packet + + + + result for data source being reported + + + + result for fraction lost since last SR/RR + + + + result for the cumululative number of packets lost + + + + result for the extended last sequence number received + + + + result for the interarrival jitter + + + + result for the last SR packet from this source + + + + result for the delay since last SR packet + + + + + + Get the number of report blocks in @packet. + + + The number of report blocks in @packet. + + + + + a valid SR or RR #GstRTCPPacket + + + + + + Get the packet type of the packet pointed to by @packet. + + + The packet type or GST_RTCP_TYPE_INVALID when @packet is not +pointing to a valid packet. + + + + + a valid #GstRTCPPacket + + + + + + Move the packet pointer @packet to the next packet in the payload. +Use gst_rtcp_buffer_get_first_packet() to initialize @packet. + + + TRUE if @packet is pointing to a valid packet after calling this +function. + + + + + a #GstRTCPPacket + + + + + + Removes the packet pointed to by @packet and moves pointer to the next one + + + TRUE if @packet is pointing to a valid packet after calling this +function. + + + + + a #GstRTCPPacket + + + + + + Get the ssrc field of the RR @packet. + + + the ssrc. + + + + + a valid RR #GstRTCPPacket + + + + + + Set the ssrc field of the RR @packet. + + + + + + + a valid RR #GstRTCPPacket + + + + the SSRC to set + + + + + + Add a new SDES entry to the current item in @packet. + + + %TRUE if the item could be added, %FALSE if the MTU has been +reached. + + + + + a valid SDES #GstRTCPPacket + + + + the #GstRTCPSDESType of the SDES entry + + + + the data length + + + + the data + + + + + + + + Add a new SDES item for @ssrc to @packet. + + + %TRUE if the item could be added, %FALSE if the maximum amount of +items has been exceeded for the SDES packet or the MTU has been reached. + + + + + a valid SDES #GstRTCPPacket + + + + the SSRC of the new item to add + + + + + + This function is like gst_rtcp_packet_sdes_get_entry() but it returns a +null-terminated copy of the data instead. use g_free() after usage. + + + %TRUE if there was valid data. + + + + + a valid SDES #GstRTCPPacket + + + + result of the entry type + + + + result length of the entry data + + + + result entry data + + + + + + + + Move to the first SDES entry in the current item. + + + %TRUE if there was a first entry. + + + + + a valid SDES #GstRTCPPacket + + + + + + Move to the first SDES item in @packet. + + + TRUE if there was a first item. + + + + + a valid SDES #GstRTCPPacket + + + + + + Get the data of the current SDES item entry. @type (when not NULL) will +contain the type of the entry. @data (when not NULL) will point to @len +bytes. + +When @type refers to a text item, @data will point to a UTF8 string. Note +that this UTF8 string is NOT null-terminated. Use +gst_rtcp_packet_sdes_copy_entry() to get a null-terminated copy of the entry. + + + %TRUE if there was valid data. + + + + + a valid SDES #GstRTCPPacket + + + + result of the entry type + + + + result length of the entry data + + + + result entry data + + + + + + + + Get the number of items in the SDES packet @packet. + + + The number of items in @packet. + + + + + a valid SDES #GstRTCPPacket + + + + + + Get the SSRC of the current SDES item. + + + the SSRC of the current item. + + + + + a valid SDES #GstRTCPPacket + + + + + + Move to the next SDES entry in the current item. + + + %TRUE if there was a next entry. + + + + + a valid SDES #GstRTCPPacket + + + + + + Move to the next SDES item in @packet. + + + TRUE if there was a next item. + + + + + a valid SDES #GstRTCPPacket + + + + + + Set the @nth new report block in @packet with the given values. + +Note: Not implemented. + + + + + + + a valid SR or RR #GstRTCPPacket + + + + the nth report block to set + + + + data source being reported + + + + fraction lost since last SR/RR + + + + the cumululative number of packets lost + + + + the extended last sequence number received + + + + the interarrival jitter + + + + the last SR packet from this source + + + + the delay since last SR packet + + + + + + Parse the SR sender info and store the values. + + + + + + + a valid SR #GstRTCPPacket + + + + result SSRC + + + + result NTP time + + + + result RTP time + + + + result packet count + + + + result octet count + + + + + + Set the given values in the SR packet @packet. + + + + + + + a valid SR #GstRTCPPacket + + + + the SSRC + + + + the NTP time + + + + the RTP time + + + + the packet count + + + + the octet count + + + + + + Move to the first extended report block in XR @packet. + + + TRUE if there was a first extended report block. + + + + + a valid XR #GstRTCPPacket + + + + + + + + The number of 32-bit words containing type-specific block + data from @packet. + + + + + a valid XR #GstRTCPPacket + + + + + + Get the extended report block type of the XR @packet. + + + The extended report block type. + + + + + a valid XR #GstRTCPPacket + + + + + + Parse the extended report block for DLRR report block type. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has DLRR Report Block. + + + + the index of sub-block to retrieve. + + + + the SSRC of the receiver. + + + + the last receiver reference timestamp of @ssrc. + + + + the delay since @last_rr. + + + + + + Retrieve the packet receipt time of @seq which ranges in [begin_seq, end_seq). + + + %TRUE if the report block returns the receipt time correctly. + + + + + a valid XR #GstRTCPPacket which has the Packet Recept Times Report Block. + + + + the sequence to retrieve the time. + + + + the packet receipt time of @seq. + + + + + + Parse the Packet Recept Times Report Block from a XR @packet + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has a Packet Receipt Times Report Block + + + + the SSRC of the RTP data packet source being reported upon by this report block. + + + + the amount of thinning performed on the sequence number space. + + + + the first sequence number that this block reports on. + + + + the last sequence number that this block reports on plus one. + + + + + + Parse the extended report block for Loss RLE and Duplicated LRE block type. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which is Loss RLE or Duplicate RLE report. + + + + the SSRC of the RTP data packet source being reported upon by this report block. + + + + the amount of thinning performed on the sequence number space. + + + + the first sequence number that this block reports on. + + + + the last sequence number that this block reports on plus one. + + + + the number of chunks calculated by block length. + + + + + + Retrieve actual chunk data. + + + %TRUE if the report block returns chunk correctly. + + + + + a valid XR #GstRTCPPacket which is Loss RLE or Duplicate RLE report. + + + + the index of chunk to retrieve. + + + + the @nth chunk. + + + + + + + + %TRUE if the report block returns the reference time correctly. + + + + + a valid XR #GstRTCPPacket which has the Receiver Reference Time. + + + + NTP timestamp + + + + + + Get the ssrc field of the XR @packet. + + + the ssrc. + + + + + a valid XR #GstRTCPPacket + + + + + + Extract a basic information from static summary report block of XR @packet. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has Statics Summary Report Block. + + + + the SSRC of the source. + + + + the first sequence number that this block reports on. + + + + the last sequence number that this block reports on plus one. + + + + + + Extract jitter information from the statistics summary. If the jitter flag in +a block header is set as zero, all of jitters will be zero. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has Statics Summary Report Block. + + + + the minimum relative transit time between two sequences. + + + + the maximum relative transit time between two sequences. + + + + the mean relative transit time between two sequences. + + + + the standard deviation of the relative transit time between two sequences. + + + + + + Get the number of lost or duplicate packets. If the flag in a block header +is set as zero, @lost_packets or @dup_packets will be zero. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has Statics Summary Report Block. + + + + the number of lost packets between begin_seq and end_seq. + + + + the number of duplicate packets between begin_seq and end_seq. + + + + + + Extract the value of ttl for ipv4, or hop limit for ipv6. + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has Statics Summary Report Block. + + + + the flag to indicate that the return values are ipv4 ttl or ipv6 hop limits. + + + + the minimum TTL or Hop Limit value of data packets between two sequences. + + + + the maximum TTL or Hop Limit value of data packets between two sequences. + + + + the mean TTL or Hop Limit value of data packets between two sequences. + + + + the standard deviation of the TTL or Hop Limit value of data packets between two sequences. + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the fraction of RTP data packets within burst periods. + + + + the fraction of RTP data packets within inter-burst gaps. + + + + the mean duration(ms) of the burst periods. + + + + the mean duration(ms) of the gap periods. + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the gap threshold. + + + + the receiver configuration byte. + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the most recently calculated round trip time between RTP interfaces(ms) + + + + the most recently estimated end system delay(ms) + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the current nominal jitter buffer delay(ms) + + + + the current maximum jitter buffer delay(ms) + + + + the absolute maximum delay(ms) + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the SSRC of source + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the fraction of RTP data packets from the source lost. + + + + the fraction of RTP data packets from the source that have been discarded. + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the R factor is a voice quality metric describing the segment of the call. + + + + the external R factor is a voice quality metric. + + + + the estimated mean opinion score for listening quality. + + + + the estimated mean opinion score for conversational quality. + + + + + + + + %TRUE if the report block is correctly parsed. + + + + + a valid XR #GstRTCPPacket which has VoIP Metrics Report Block. + + + + the ratio of the signal level to a 0 dBm reference. + + + + the ratio of the silent period background noise level to a 0 dBm reference. + + + + the residual echo return loss value. + + + + the gap threshold. + + + + + + Move to the next extended report block in XR @packet. + + + TRUE if there was a next extended report block. + + + + + a valid XR #GstRTCPPacket + + + + + + + Different types of SDES content. + + Invalid SDES entry + + + End of SDES list + + + Canonical name + + + User name + + + User's electronic mail address + + + User's phone number + + + Geographic user location + + + Name of application or tool + + + Notice about the source + + + Private extensions + + + + Different RTCP packet types. + + Invalid type + + + Sender report + + + Receiver report + + + Source description + + + Goodbye + + + Application defined + + + Transport layer feedback. + + + Payload-specific feedback. + + + Extended report. + + + + Types of RTCP Extended Reports, those are defined in RFC 3611 and other RFCs +according to the [IANA registry](https://www.iana.org/assignments/rtcp-xr-block-types/rtcp-xr-block-types.xhtml). + + Invalid XR Report Block + + + Loss RLE Report Block + + + Duplicate RLE Report Block + + + Packet Receipt Times Report Block + + + Receiver Reference Time Report Block + + + Delay since the last Receiver Report + + + Statistics Summary Report Block + + + VoIP Metrics Report Block + + + + The maximum amount of SSRCs in a BYE packet. + + + + + The maximum amount of Receiver report blocks in RR and SR messages. + + + + + The maximum text length for an SDES item. + + + + + The maximum amount of SDES items. + + + + + Mask for version, padding bit and packet type pair allowing reduced size +packets, basically it accepts other types than RR and SR + + + + + Mask for version, padding bit and packet type pair + + + + + Valid value for the first two bytes of an RTCP packet after applying +#GST_RTCP_VALID_MASK to them. + + + + + The supported RTCP version 2. + + + + + Provides a base class for audio RTP payloaders for frame or sample based +audio codecs (constant bitrate) + +This class derives from GstRTPBasePayload. It can be used for payloading +audio codecs. It will only work with constant bitrate codecs. It supports +both frame based and sample based codecs. It takes care of packing up the +audio data into RTP packets and filling up the headers accordingly. The +payloading is done based on the maximum MTU (mtu) and the maximum time per +packet (max-ptime). The general idea is to divide large data buffers into +smaller RTP packets. The RTP packet size is the minimum of either the MTU, +max-ptime (if set) or available data. The RTP packet size is always larger or +equal to min-ptime (if set). If min-ptime is not set, any residual data is +sent in a last RTP packet. In the case of frame based codecs, the resulting +RTP packets always contain full frames. + +## Usage + +To use this base class, your child element needs to call either +gst_rtp_base_audio_payload_set_frame_based() or +gst_rtp_base_audio_payload_set_sample_based(). This is usually done in the +element's `_init()` function. Then, the child element must call either +gst_rtp_base_audio_payload_set_frame_options(), +gst_rtp_base_audio_payload_set_sample_options() or +gst_rtp_base_audio_payload_set_samplebits_options. Since +GstRTPBaseAudioPayload derives from GstRTPBasePayload, the child element +must set any variables or call/override any functions required by that base +class. The child element does not need to override any other functions +specific to GstRTPBaseAudioPayload. + + + Create an RTP buffer and store @payload_len bytes of the adapter as the +payload. Set the timestamp on the new buffer to @timestamp before pushing +the buffer downstream. + +If @payload_len is -1, all pending bytes will be flushed. If @timestamp is +-1, the timestamp will be calculated automatically. + + + a #GstFlowReturn + + + + + a #GstRTPBasePayload + + + + length of payload + + + + a #GstClockTime + + + + + + Gets the internal adapter used by the depayloader. + + + a #GstAdapter. + + + + + a #GstRTPBaseAudioPayload + + + + + + Create an RTP buffer and store @payload_len bytes of @data as the +payload. Set the timestamp on the new buffer to @timestamp before pushing +the buffer downstream. + + + a #GstFlowReturn + + + + + a #GstRTPBasePayload + + + + data to set as payload + + + + + + length of payload + + + + a #GstClockTime + + + + + + Tells #GstRTPBaseAudioPayload that the child element is for a frame based +audio codec + + + + + + + a pointer to the element. + + + + + + Sets the options for frame based audio codecs. + + + + + + + a pointer to the element. + + + + The duraction of an audio frame in milliseconds. + + + + The size of an audio frame in bytes. + + + + + + Tells #GstRTPBaseAudioPayload that the child element is for a sample based +audio codec + + + + + + + a pointer to the element. + + + + + + Sets the options for sample based audio codecs. + + + + + + + a pointer to the element. + + + + Size per sample in bytes. + + + + + + Sets the options for sample based audio codecs. + + + + + + + a pointer to the element. + + + + Size per sample in bits. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for audio RTP payloader. + + + the parent class + + + + + + + + + + + + + Provides a base class for RTP depayloaders + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Queries whether #GstRTPSourceMeta will be added to depayloaded buffers. + + + %TRUE if source-info is enabled. + + + + + a #GstRTPBaseDepayload + + + + + + Push @out_buf to the peer of @filter. This function takes ownership of +@out_buf. + +This function will by default apply the last incoming timestamp on +the outgoing buffer when it didn't have a timestamp already. + + + a #GstFlowReturn. + + + + + a #GstRTPBaseDepayload + + + + a #GstBuffer + + + + + + Push @out_list to the peer of @filter. This function takes ownership of +@out_list. + + + a #GstFlowReturn. + + + + + a #GstRTPBaseDepayload + + + + a #GstBufferList + + + + + + Enable or disable adding #GstRTPSourceMeta to depayloaded buffers. + + + + + + + a #GstRTPBaseDepayload + + + + whether to add meta about RTP sources to buffer + + + + + + Max seqnum reorder before the sender is assumed to have restarted. + +When max-reorder is set to 0 all reordered/duplicate packets are +considered coming from a restarted sender. + + + + Add RTP source information found in RTP header as meta to output buffer. + + + + Various depayloader statistics retrieved atomically (and are therefore +synchroized with each other). This property return a GstStructure named +application/x-rtp-depayload-stats containing the following fields relating to +the last processed buffer and current state of the stream being depayloaded: + + * `clock-rate`: #G_TYPE_UINT, clock-rate of the stream + * `npt-start`: #G_TYPE_UINT64, time of playback start + * `npt-stop`: #G_TYPE_UINT64, time of playback stop + * `play-speed`: #G_TYPE_DOUBLE, the playback speed + * `play-scale`: #G_TYPE_DOUBLE, the playback scale + * `running-time-dts`: #G_TYPE_UINT64, the last running-time of the + last DTS + * `running-time-pts`: #G_TYPE_UINT64, the last running-time of the + last PTS + * `seqnum`: #G_TYPE_UINT, the last seen seqnum + * `timestamp`: #G_TYPE_UINT, the last seen RTP timestamp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for RTP depayloaders. + + + the parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides a base class for RTP payloaders + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Allocate a new #GstBuffer with enough data to hold an RTP packet with +minimum @csrc_count CSRCs, a payload length of @payload_len and padding of +@pad_len. If @payload has #GstRTPBasePayload:source-info %TRUE additional +CSRCs may be allocated and filled with RTP source information. + + + A newly allocated buffer that can hold an RTP packet with given +parameters. + + + + + a #GstRTPBasePayload + + + + the length of the payload + + + + the amount of padding + + + + the minimum number of CSRC entries + + + + + + Count the total number of RTP sources found in the meta of @buffer, which +will be automically added by gst_rtp_base_payload_allocate_output_buffer(). +If #GstRTPBasePayload:source-info is %FALSE the count will be 0. + + + The number of sources. + + + + + a #GstRTPBasePayload + + + + a #GstBuffer, typically the buffer to payload + + + + + + Check if the packet with @size and @duration would exceed the configured +maximum size. + + + %TRUE if the packet of @size and @duration would exceed the +configured MTU or max_ptime. + + + + + a #GstRTPBasePayload + + + + the size of the packet + + + + the duration of the packet + + + + + + Queries whether the payloader will add contributing sources (CSRCs) to the +RTP header from #GstRTPSourceMeta. + + + %TRUE if source-info is enabled. + + + + + a #GstRTPBasePayload + + + + + + Push @buffer to the peer element of the payloader. The SSRC, payload type, +seqnum and timestamp of the RTP buffer will be updated first. + +This function takes ownership of @buffer. + + + a #GstFlowReturn. + + + + + a #GstRTPBasePayload + + + + a #GstBuffer + + + + + + Push @list to the peer element of the payloader. The SSRC, payload type, +seqnum and timestamp of the RTP buffer will be updated first. + +This function takes ownership of @list. + + + a #GstFlowReturn. + + + + + a #GstRTPBasePayload + + + + a #GstBufferList + + + + + + Set the rtp options of the payloader. These options will be set in the caps +of the payloader. Subclasses must call this method before calling +gst_rtp_base_payload_push() or gst_rtp_base_payload_set_outcaps(). + + + + + + + a #GstRTPBasePayload + + + + the media type (typically "audio" or "video") + + + + if the payload type is dynamic + + + + the encoding name + + + + the clock rate of the media + + + + + + Configure the output caps with the optional parameters. + +Variable arguments should be in the form field name, field type +(as a GType), value(s). The last variable argument should be NULL. + + + %TRUE if the caps could be set. + + + + + a #GstRTPBasePayload + + + + the first field name or %NULL + + + + field values + + + + + + Enable or disable adding contributing sources to RTP packets from +#GstRTPSourceMeta. + + + + + + + a #GstRTPBasePayload + + + + whether to add contributing sources to RTP packets + + + + + + + + + Minimum duration of the packet data in ns (can't go above MTU) + + + + + + + Make the payloader timestamp packets according to the Rate-Control=no +behaviour specified in the ONVIF replay spec. + + + + Try to use the offset fields to generate perfect RTP timestamps. When this +option is disabled, RTP timestamps are generated from GST_BUFFER_PTS of +each payloaded buffer. The PTSes of buffers may not necessarily increment +with the amount of data in each input buffer, consider e.g. the case where +the buffer arrives from a network which means that the PTS is unrelated to +the amount of data. Because the RTP timestamps are generated from +GST_BUFFER_PTS this can result in RTP timestamps that also don't increment +with the amount of data in the payloaded packet. To circumvent this it is +possible to set the perfect rtptime option enabled. When this option is +enabled the payloader will increment the RTP timestamps based on +GST_BUFFER_OFFSET which relates to the amount of data in each packet +rather than the GST_BUFFER_PTS of each buffer and therefore the RTP +timestamps will more closely correlate with the amount of data in each +buffer. Currently GstRTPBasePayload is limited to handling perfect RTP +timestamps for audio streams. + + + + + + + Force buffers to be multiples of this duration in ns (0 disables) + + + + Make the RTP packets' timestamps be scaled with the segment's rate +(corresponding to RTSP speed parameter). Disabling this property means +the timestamps will not be affected by the set delivery speed (RTSP speed). + +Example: A server wants to allow streaming a recorded video in double +speed but still have the timestamps correspond to the position in the +video. This is achieved by the client setting RTSP Speed to 2 while the +server has this property disabled. + + + + + + + + + + Enable writing the CSRC field in allocated RTP header based on RTP source +information found in the input buffer's #GstRTPSourceMeta. + + + + + + + Various payloader statistics retrieved atomically (and are therefore +synchroized with each other), these can be used e.g. to generate an +RTP-Info header. This property return a GstStructure named +application/x-rtp-payload-stats containing the following fields relating to +the last processed buffer and current state of the stream being payloaded: + + * `clock-rate` :#G_TYPE_UINT, clock-rate of the stream + * `running-time` :#G_TYPE_UINT64, running time + * `seqnum` :#G_TYPE_UINT, sequence number, same as #GstRTPBasePayload:seqnum + * `timestamp` :#G_TYPE_UINT, RTP timestamp, same as #GstRTPBasePayload:timestamp + * `ssrc` :#G_TYPE_UINT, The SSRC in use + * `pt` :#G_TYPE_UINT, The Payload type in use, same as #GstRTPBasePayload:pt + * `seqnum-offset` :#G_TYPE_UINT, The current offset added to the seqnum + * `timestamp-offset` :#G_TYPE_UINT, The current offset added to the timestamp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for audio RTP payloader. + + + the parent class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The GstRTPBuffer helper functions makes it easy to parse and create regular +#GstBuffer objects that contain RTP payloads. These buffers are typically of +'application/x-rtp' #GstCaps. + + + pointer to RTP buffer + + + + internal state + + + + array of data + + + + + + array of size + + + + + + array of #GstMapInfo + + + + + + Adds a RFC 5285 header extension with a one byte header to the end of the +RTP header. If there is already a RFC 5285 header extension with a one byte +header, the new extension will be appended. +It will not work if there is already a header extension that does not follow +the mechanism described in RFC 5285 or if there is a header extension with +a two bytes header as described in RFC 5285. In that case, use +gst_rtp_buffer_add_extension_twobytes_header() + + + %TRUE if header extension could be added + + + + + the RTP packet + + + + The ID of the header extension (between 1 and 14). + + + + location for data + + + + + + the size of the data in bytes + + + + + + Adds a RFC 5285 header extension with a two bytes header to the end of the +RTP header. If there is already a RFC 5285 header extension with a two bytes +header, the new extension will be appended. +It will not work if there is already a header extension that does not follow +the mechanism described in RFC 5285 or if there is a header extension with +a one byte header as described in RFC 5285. In that case, use +gst_rtp_buffer_add_extension_onebyte_header() + + + %TRUE if header extension could be added + + + + + the RTP packet + + + + Application specific bits + + + + The ID of the header extension + + + + location for data + + + + + + the size of the data in bytes + + + + + + Get the CSRC at index @idx in @buffer. + + + the CSRC at index @idx in host order. + + + + + the RTP packet + + + + the index of the CSRC to get + + + + + + Get the CSRC count of the RTP packet in @buffer. + + + the CSRC count of @buffer. + + + + + the RTP packet + + + + + + Check if the extension bit is set on the RTP packet in @buffer. + + + TRUE if @buffer has the extension bit set. + + + + + the RTP packet + + + + + + Similar to gst_rtp_buffer_get_extension_data, but more suitable for language +bindings usage. @bits will contain the extension 16 bits of custom data and +the extension data (not including the extension header) is placed in a new +#GBytes structure. + +If @rtp did not contain an extension, this function will return %NULL, with +@bits unchanged. If there is an extension header but no extension data then +an empty #GBytes will be returned. + + + A new #GBytes if an extension header was present +and %NULL otherwise. + + + + + the RTP packet + + + + location for header bits + + + + + + Get the extension data. @bits will contain the extension 16 bits of custom +data. @data will point to the data in the extension and @wordlen will contain +the length of @data in 32 bits words. + +If @buffer did not contain an extension, this function will return %FALSE +with @bits, @data and @wordlen unchanged. + + + TRUE if @buffer had the extension bit set. + + + + + the RTP packet + + + + location for result bits + + + + location for data + + + + + + location for length of @data in 32 bits words + + + + + + Parses RFC 5285 style header extensions with a one byte header. It will +return the nth extension with the requested id. + + + TRUE if @buffer had the requested header extension + + + + + the RTP packet + + + + The ID of the header extension to be read (between 1 and 14). + + + + Read the nth extension packet with the requested ID + + + + + location for data + + + + + + the size of the data in bytes + + + + + + Parses RFC 5285 style header extensions with a two bytes header. It will +return the nth extension with the requested id. + + + TRUE if @buffer had the requested header extension + + + + + the RTP packet + + + + Application specific bits + + + + The ID of the header extension to be read (between 1 and 14). + + + + Read the nth extension packet with the requested ID + + + + + location for data + + + + + + the size of the data in bytes + + + + + + Return the total length of the header in @buffer. This include the length of +the fixed header, the CSRC list and the extension header. + + + The total length of the header in @buffer. + + + + + the RTP packet + + + + + + Check if the marker bit is set on the RTP packet in @buffer. + + + TRUE if @buffer has the marker bit set. + + + + + the RTP packet + + + + + + Return the total length of the packet in @buffer. + + + The total length of the packet in @buffer. + + + + + the RTP packet + + + + + + Check if the padding bit is set on the RTP packet in @buffer. + + + TRUE if @buffer has the padding bit set. + + + + + the RTP packet + + + + + + Get a pointer to the payload data in @buffer. This pointer is valid as long +as a reference to @buffer is held. + + + A pointer +to the payload data in @buffer. + + + + + + + the RTP packet + + + + + + Create a buffer of the payload of the RTP packet in @buffer. This function +will internally create a subbuffer of @buffer so that a memcpy can be +avoided. + + + A new buffer with the data of the payload. + + + + + the RTP packet + + + + + + Similar to gst_rtp_buffer_get_payload, but more suitable for language +bindings usage. The return value is a pointer to a #GBytes structure +containing the payload data in @rtp. + + + A new #GBytes containing the payload data in @rtp. + + + + + the RTP packet + + + + + + Get the length of the payload of the RTP packet in @buffer. + + + The length of the payload in @buffer. + + + + + the RTP packet + + + + + + Create a subbuffer of the payload of the RTP packet in @buffer. @offset bytes +are skipped in the payload and the subbuffer will be of size @len. +If @len is -1 the total payload starting from @offset is subbuffered. + + + A new buffer with the specified data of the payload. + + + + + the RTP packet + + + + the offset in the payload + + + + the length in the payload + + + + + + Get the payload type of the RTP packet in @buffer. + + + The payload type. + + + + + the RTP packet + + + + + + Get the sequence number of the RTP packet in @buffer. + + + The sequence number in host order. + + + + + the RTP packet + + + + + + Get the SSRC of the RTP packet in @buffer. + + + the SSRC of @buffer in host order. + + + + + the RTP packet + + + + + + Get the timestamp of the RTP packet in @buffer. + + + The timestamp in host order. + + + + + the RTP packet + + + + + + Get the version number of the RTP packet in @buffer. + + + The version of @buffer. + + + + + the RTP packet + + + + + + Set the amount of padding in the RTP packet in @buffer to +@len. If @len is 0, the padding is removed. + +NOTE: This function does not work correctly. + + + + + + + the RTP packet + + + + the new amount of padding + + + + + + Modify the CSRC at index @idx in @buffer to @csrc. + + + + + + + the RTP packet + + + + the CSRC index to set + + + + the CSRC in host order to set at @idx + + + + + + Set the extension bit on the RTP packet in @buffer to @extension. + + + + + + + the RTP packet + + + + the new extension + + + + + + Set the extension bit of the rtp buffer and fill in the @bits and @length of the +extension header. If the existing extension data is not large enough, it will +be made larger. + + + True if done. + + + + + the RTP packet + + + + the bits specific for the extension + + + + the length that counts the number of 32-bit words in +the extension, excluding the extension header ( therefore zero is a valid length) + + + + + + Set the marker bit on the RTP packet in @buffer to @marker. + + + + + + + the RTP packet + + + + the new marker + + + + + + Set the total @rtp size to @len. The data in the buffer will be made +larger if needed. Any padding will be removed from the packet. + + + + + + + the RTP packet + + + + the new packet length + + + + + + Set the padding bit on the RTP packet in @buffer to @padding. + + + + + + + the buffer + + + + the new padding + + + + + + Set the payload type of the RTP packet in @buffer to @payload_type. + + + + + + + the RTP packet + + + + the new type + + + + + + Set the sequence number of the RTP packet in @buffer to @seq. + + + + + + + the RTP packet + + + + the new sequence number + + + + + + Set the SSRC on the RTP packet in @buffer to @ssrc. + + + + + + + the RTP packet + + + + the new SSRC + + + + + + Set the timestamp of the RTP packet in @buffer to @timestamp. + + + + + + + the RTP packet + + + + the new timestamp + + + + + + Set the version of the RTP packet in @buffer to @version. + + + + + + + the RTP packet + + + + the new version + + + + + + Unmap @rtp previously mapped with gst_rtp_buffer_map(). + + + + + + + a #GstRTPBuffer + + + + + + Allocate enough data in @buffer to hold an RTP packet with @csrc_count CSRCs, +a payload length of @payload_len and padding of @pad_len. +@buffer must be writable and all previous memory in @buffer will be freed. +If @pad_len is >0, the padding bit will be set. All other RTP header fields +will be set to 0/FALSE. + + + + + + + a #GstBuffer + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Calculate the header length of an RTP packet with @csrc_count CSRC entries. +An RTP packet can have at most 15 CSRC entries. + + + The length of an RTP header with @csrc_count CSRC entries. + + + + + the number of CSRC entries + + + + + + Calculate the total length of an RTP packet with a payload size of @payload_len, +a padding of @pad_len and a @csrc_count CSRC entries. + + + The total length of an RTP header with given parameters. + + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Calculate the length of the payload of an RTP packet with size @packet_len, +a padding of @pad_len and a @csrc_count CSRC entries. + + + The length of the payload of an RTP packet with given parameters. + + + + + the length of the total RTP packet + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Compare two sequence numbers, taking care of wraparounds. This function +returns the difference between @seqnum1 and @seqnum2. + + + a negative value if @seqnum1 is bigger than @seqnum2, 0 if they +are equal or a positive value if @seqnum1 is smaller than @segnum2. + + + + + a sequence number + + + + a sequence number + + + + + + Get the default clock-rate for the static payload type @payload_type. + + + the default clock rate or -1 if the payload type is not static or +the clock-rate is undefined. + + + + + the static payload type + + + + + + Update the @exttimestamp field with the extended timestamp of @timestamp +For the first call of the method, @exttimestamp should point to a location +with a value of -1. + +This function is able to handle both forward and backward timestamps taking +into account: + - timestamp wraparound making sure that the returned value is properly increased. + - timestamp unwraparound making sure that the returned value is properly decreased. + + + The extended timestamp of @timestamp or 0 if the result can't go anywhere backwards. + + + + + a previous extended timestamp + + + + a new timestamp + + + + + + Similar to gst_rtp_buffer_get_extension_onebyte_header, but working +on the #GBytes you get from gst_rtp_buffer_get_extension_bytes. +Parses RFC 5285 style header extensions with a one byte header. It will +return the nth extension with the requested id. + + + TRUE if @bytes had the requested header extension + + + + + #GBytes + + + + The bit-pattern. Anything but 0xBEDE is rejected. + + + + The ID of the header extension to be read (between 1 and 14). + + + + Read the nth extension packet with the requested ID + + + + + location for data + + + + + + the size of the data in bytes + + + + + + Map the contents of @buffer into @rtp. + + + %TRUE if @buffer could be mapped. + + + + + a #GstBuffer + + + + #GstMapFlags + + + + a #GstRTPBuffer + + + + + + Allocate a new #GstBuffer with enough data to hold an RTP packet with +@csrc_count CSRCs, a payload length of @payload_len and padding of @pad_len. +All other RTP header fields will be set to 0/FALSE. + + + A newly allocated buffer that can hold an RTP packet with given +parameters. + + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Create a new #GstBuffer that can hold an RTP packet that is exactly +@packet_len long. The length of the payload depends on @pad_len and +@csrc_count and can be calculated with gst_rtp_buffer_calc_payload_len(). +All RTP header fields will be set to 0/FALSE. + + + A newly allocated buffer that can hold an RTP packet of @packet_len. + + + + + the total length of the packet + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Create a new buffer and set the data to a copy of @len +bytes of @data and the size to @len. The data will be freed when the buffer +is freed. + + + A newly allocated buffer with a copy of @data and of size @len. + + + + + data for the new + buffer + + + + + + the length of data + + + + + + Create a new buffer and set the data and size of the buffer to @data and @len +respectively. @data will be freed when the buffer is unreffed, so this +function transfers ownership of @data to the new buffer. + + + A newly allocated buffer with @data and of size @len. + + + + + + data for the new buffer + + + + + + the length of data + + + + + + + Additional RTP buffer flags. These flags can potentially be used on any +buffers carrying RTP packets. + +Note that these are only valid for #GstCaps of type: application/x-rtp (x-rtcp). +They can conflict with other extended buffer flags. + + The #GstBuffer was once wrapped + in a retransmitted packet as specified by RFC 4588. + + + The packet represents redundant RTP packet. + The flag is used in gstrtpstorage to be able to hold the packetback + and use it only for recovery from packet loss. + Since: 1.14 + + + Offset to define more flags. + + + + Additional mapping flags for gst_rtp_buffer_map(). + + Skip mapping and validation of RTP + padding and RTP pad count when present. Useful for buffers where + the padding may be encrypted. + + + Offset to define more flags + + + + Standard predefined fixed payload types. + +The official list is at: +http://www.iana.org/assignments/rtp-parameters + +Audio: +reserved: 19 +unassigned: 20-23, + +Video: +unassigned: 24, 27, 29, 30, 35-71, 77-95 +Reserved for RTCP conflict avoidance: 72-76 + + ITU-T G.711. mu-law audio (RFC 3551) + + + RFC 3551 says reserved + + + RFC 3551 says reserved + + + GSM audio + + + ITU G.723.1 audio + + + IMA ADPCM wave type (RFC 3551) + + + IMA ADPCM wave type (RFC 3551) + + + experimental linear predictive encoding + + + ITU-T G.711 A-law audio (RFC 3551) + + + ITU-T G.722 (RFC 3551) + + + stereo PCM + + + mono PCM + + + EIA & TIA standard IS-733 + + + Comfort Noise (RFC 3389) + + + Audio MPEG 1-3. + + + ITU-T G.728 Speech coder (RFC 3551) + + + IMA ADPCM wave type (RFC 3551) + + + IMA ADPCM wave type (RFC 3551) + + + ITU-T G.729 Speech coder (RFC 3551) + + + See RFC 2029 + + + ISO Standards 10918-1 and 10918-2 (RFC 2435) + + + nv encoding by Ron Frederick + + + ITU-T Recommendation H.261 (RFC 2032) + + + Video MPEG 1 & 2 (RFC 2250) + + + MPEG-2 transport stream (RFC 2250) + + + Video H263 (RFC 2190) + + + + Structure holding default payload type information. + + + payload type, -1 means dynamic + + + + the media type(s), usually "audio", "video", "application", "text", +"message". + + + + the encoding name of @pt + + + + default clock rate, 0 = unknown/variable + + + + encoding parameters. For audio this is the number of +channels. NULL = not applicable. + + + + the bitrate of the media. 0 = unknown/variable. + + + + + + + + + Get the #GstRTPPayloadInfo for @media and @encoding_name. This function is +mostly used to get the default clock-rate and bandwidth for dynamic payload +types specified with @media and @encoding name. + +The search for @encoding_name will be performed in a case insensitive way. + + + a #GstRTPPayloadInfo or NULL when no info could be found. + + + + + the media to find + + + + the encoding name to find + + + + + + Get the #GstRTPPayloadInfo for @payload_type. This function is +mostly used to get the default clock-rate and bandwidth for static payload +types specified with @payload_type. + + + a #GstRTPPayloadInfo or NULL when no info could be found. + + + + + the payload_type to find + + + + + + + The transfer profile to use. + + invalid profile + + + the Audio/Visual profile (RFC 3551) + + + the secure Audio/Visual profile (RFC 3711) + + + the Audio/Visual profile with feedback (RFC 4585) + + + the secure Audio/Visual profile with feedback (RFC 5124) + + + + Meta describing the source(s) of the buffer. + + + parent #GstMeta + + + + the SSRC + + + + whether @ssrc is set and valid + + + + pointer to the CSRCs + + + + + + number of elements in @csrc + + + + Appends @csrc to the list of contributing sources in @meta. + + + %TRUE if all elements in @csrc was added, %FALSE otherwise. + + + + + a #GstRTPSourceMeta + + + + the csrcs to append + + + + number of elements in @csrc + + + + + + Count the total number of RTP sources found in @meta, both SSRC and CSRC. + + + The number of RTP sources + + + + + a #GstRTPSourceMeta + + + + + + Sets @ssrc in @meta. If @ssrc is %NULL the ssrc of @meta will be unset. + + + %TRUE on success, %FALSE otherwise. + + + + + a #GstRTPSourceMeta + + + + pointer to the SSRC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get access to the configured MTU of @payload. + + + + a #GstRTPBasePayload + + + + + Get access to the configured payload type of @payload. + + + + a #GstRTPBasePayload + + + + + Get access to the sinkpad of @payload. + + + + a #GstRTPBasePayload + + + + + Get access to the srcpad of @payload. + + + + a #GstRTPBasePayload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Check if @pt is a dynamic payload type. + + + + a payload type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The supported RTP version 2. + + + + + Attaches RTP source information to @buffer. + + + the #GstRTPSourceMeta on @buffer. + + + + + a #GstBuffer + + + + pointer to the SSRC + + + + pointer to the CSRCs + + + + number of elements in @csrc + + + + + + Find the #GstRTPSourceMeta on @buffer. + + + the #GstRTPSourceMeta or %NULL when there +is no such metadata on @buffer. + + + + + a #GstBuffer + + + + + + Provides common defines for the RTP library. + + + The GstRTPPayloads helper functions makes it easy to deal with static and dynamic +payloads. Its main purpose is to retrieve properties such as the default clock-rate +and get session bandwidth information. + + + Open @buffer for reading or writing, depending on @flags. The resulting RTCP +buffer state is stored in @rtcp. + + + + + + + a buffer with an RTCP packet + + + + flags for the mapping + + + + resulting #GstRTCPBuffer + + + + + + Create a new buffer for constructing RTCP packets. The packet will have a +maximum size of @mtu. + + + A newly allocated buffer. + + + + + the maximum mtu size. + + + + + + Create a new buffer and set the data to a copy of @len +bytes of @data and the size to @len. The data will be freed when the buffer +is freed. + + + A newly allocated buffer with a copy of @data and of size @len. + + + + + data for the new buffer + + + + + + the length of data + + + + + + Create a new buffer and set the data and size of the buffer to @data and @len +respectively. @data will be freed when the buffer is unreffed, so this +function transfers ownership of @data to the new buffer. + + + A newly allocated buffer with @data and of size @len. + + + + + data for the new buffer + + + + + + the length of data + + + + + + Check if the data pointed to by @buffer is a valid RTCP packet using +gst_rtcp_buffer_validate_data(). + + + TRUE if @buffer is a valid RTCP packet. + + + + + the buffer to validate + + + + + + Check if the @data and @size point to the data of a valid compound, +non-reduced size RTCP packet. +Use this function to validate a packet before using the other functions in +this module. + + + TRUE if the data points to a valid RTCP packet. + + + + + the data to validate + + + + + + the length of @data to validate + + + + + + Check if the @data and @size point to the data of a valid RTCP packet. +Use this function to validate a packet before using the other functions in +this module. + +This function is updated to support reduced size rtcp packets according to +RFC 5506 and will validate full compound RTCP packets as well as reduced +size RTCP packets. + + + TRUE if the data points to a valid RTCP packet. + + + + + the data to validate + + + + + + the length of @data to validate + + + + + + Check if the data pointed to by @buffer is a valid RTCP packet using +gst_rtcp_buffer_validate_reduced(). + + + TRUE if @buffer is a valid RTCP packet. + + + + + the buffer to validate + + + + + + Converts an NTP time to UNIX nanoseconds. @ntptime can typically be +the NTP time of an SR RTCP message and contains, in the upper 32 bits, the +number of seconds since 1900 and, in the lower 32 bits, the fractional +seconds. The resulting value will be the number of nanoseconds since 1970. + + + the UNIX time for @ntptime in nanoseconds. + + + + + an NTP timestamp + + + + + + Convert @name into a @GstRTCPSDESType. @name is typically a key in a +#GstStructure containing SDES items. + + + the #GstRTCPSDESType for @name or #GST_RTCP_SDES_PRIV when @name +is a private sdes item. + + + + + a SDES name + + + + + + Converts @type to the string equivalent. The string is typically used as a +key in a #GstStructure containing SDES items. + + + the string equivalent of @type + + + + + a #GstRTCPSDESType + + + + + + Converts a UNIX timestamp in nanoseconds to an NTP time. The caller should +pass a value with nanoseconds since 1970. The NTP time will, in the upper +32 bits, contain the number of seconds since 1900 and, in the lower 32 +bits, the fractional seconds. The resulting value can be used as an ntptime +for constructing SR RTCP packets. + + + the NTP time for @unixtime. + + + + + an UNIX timestamp in nanoseconds + + + + + + Allocate enough data in @buffer to hold an RTP packet with @csrc_count CSRCs, +a payload length of @payload_len and padding of @pad_len. +@buffer must be writable and all previous memory in @buffer will be freed. +If @pad_len is >0, the padding bit will be set. All other RTP header fields +will be set to 0/FALSE. + + + + + + + a #GstBuffer + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Calculate the header length of an RTP packet with @csrc_count CSRC entries. +An RTP packet can have at most 15 CSRC entries. + + + The length of an RTP header with @csrc_count CSRC entries. + + + + + the number of CSRC entries + + + + + + Calculate the total length of an RTP packet with a payload size of @payload_len, +a padding of @pad_len and a @csrc_count CSRC entries. + + + The total length of an RTP header with given parameters. + + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Calculate the length of the payload of an RTP packet with size @packet_len, +a padding of @pad_len and a @csrc_count CSRC entries. + + + The length of the payload of an RTP packet with given parameters. + + + + + the length of the total RTP packet + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Compare two sequence numbers, taking care of wraparounds. This function +returns the difference between @seqnum1 and @seqnum2. + + + a negative value if @seqnum1 is bigger than @seqnum2, 0 if they +are equal or a positive value if @seqnum1 is smaller than @segnum2. + + + + + a sequence number + + + + a sequence number + + + + + + Get the default clock-rate for the static payload type @payload_type. + + + the default clock rate or -1 if the payload type is not static or +the clock-rate is undefined. + + + + + the static payload type + + + + + + Update the @exttimestamp field with the extended timestamp of @timestamp +For the first call of the method, @exttimestamp should point to a location +with a value of -1. + +This function is able to handle both forward and backward timestamps taking +into account: + - timestamp wraparound making sure that the returned value is properly increased. + - timestamp unwraparound making sure that the returned value is properly decreased. + + + The extended timestamp of @timestamp or 0 if the result can't go anywhere backwards. + + + + + a previous extended timestamp + + + + a new timestamp + + + + + + Similar to gst_rtp_buffer_get_extension_onebyte_header, but working +on the #GBytes you get from gst_rtp_buffer_get_extension_bytes. +Parses RFC 5285 style header extensions with a one byte header. It will +return the nth extension with the requested id. + + + TRUE if @bytes had the requested header extension + + + + + #GBytes + + + + The bit-pattern. Anything but 0xBEDE is rejected. + + + + The ID of the header extension to be read (between 1 and 14). + + + + Read the nth extension packet with the requested ID + + + + + location for data + + + + + + the size of the data in bytes + + + + + + Map the contents of @buffer into @rtp. + + + %TRUE if @buffer could be mapped. + + + + + a #GstBuffer + + + + #GstMapFlags + + + + a #GstRTPBuffer + + + + + + Allocate a new #GstBuffer with enough data to hold an RTP packet with +@csrc_count CSRCs, a payload length of @payload_len and padding of @pad_len. +All other RTP header fields will be set to 0/FALSE. + + + A newly allocated buffer that can hold an RTP packet with given +parameters. + + + + + the length of the payload + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Create a new #GstBuffer that can hold an RTP packet that is exactly +@packet_len long. The length of the payload depends on @pad_len and +@csrc_count and can be calculated with gst_rtp_buffer_calc_payload_len(). +All RTP header fields will be set to 0/FALSE. + + + A newly allocated buffer that can hold an RTP packet of @packet_len. + + + + + the total length of the packet + + + + the amount of padding + + + + the number of CSRC entries + + + + + + Create a new buffer and set the data to a copy of @len +bytes of @data and the size to @len. The data will be freed when the buffer +is freed. + + + A newly allocated buffer with a copy of @data and of size @len. + + + + + data for the new + buffer + + + + + + the length of data + + + + + + Create a new buffer and set the data and size of the buffer to @data and @len +respectively. @data will be freed when the buffer is unreffed, so this +function transfers ownership of @data to the new buffer. + + + A newly allocated buffer with @data and of size @len. + + + + + + data for the new buffer + + + + + + the length of data + + + + + + Reads the NTP time from the @size NTP-56 extension bytes in @data and store the +result in @ntptime. + + + %TRUE on success. + + + + + the data to read from + + + + + + the size of @data + + + + the result NTP time + + + + + + Reads the NTP time from the @size NTP-64 extension bytes in @data and store the +result in @ntptime. + + + %TRUE on success. + + + + + the data to read from + + + + + + the size of @data + + + + the result NTP time + + + + + + Writes the NTP time in @ntptime to the format required for the NTP-56 header +extension. @data must hold at least #GST_RTP_HDREXT_NTP_56_SIZE bytes. + + + %TRUE on success. + + + + + the data to write to + + + + the size of @data + + + + the NTP time + + + + + + Writes the NTP time in @ntptime to the format required for the NTP-64 header +extension. @data must hold at least #GST_RTP_HDREXT_NTP_64_SIZE bytes. + + + %TRUE on success. + + + + + the data to write to + + + + the size of @data + + + + the NTP time + + + + + + Get the #GstRTPPayloadInfo for @media and @encoding_name. This function is +mostly used to get the default clock-rate and bandwidth for dynamic payload +types specified with @media and @encoding name. + +The search for @encoding_name will be performed in a case insensitive way. + + + a #GstRTPPayloadInfo or NULL when no info could be found. + + + + + the media to find + + + + the encoding name to find + + + + + + Get the #GstRTPPayloadInfo for @payload_type. This function is +mostly used to get the default clock-rate and bandwidth for static payload +types specified with @payload_type. + + + a #GstRTPPayloadInfo or NULL when no info could be found. + + + + + the payload_type to find + + + + + + + + + + + + + + + + + + diff --git a/girs/GstRtsp-1.0.gir b/girs/GstRtsp-1.0.gir new file mode 100644 index 0000000000..4c90bd9440 --- /dev/null +++ b/girs/GstRtsp-1.0.gir @@ -0,0 +1,7642 @@ + + + + + + + + + + + + + + + + + + + RTSP Authentication credentials + + + a #GstRTSPAuthMethod + + + + A NULL-terminated array of #GstRTSPAuthParam + + + + The authorization for the basic schem + + + + + Authentication methods, ordered by strength + + no authentication + + + basic authentication + + + digest authentication + + + + RTSP Authentication parameter + + + The name of the parameter + + + + The value of the parameter + + + + + + + + + + + + + + + + + + + + + + + + + + + This object manages the RTSP connection to the server. It provides function +to receive and send bytes and messages. + + + Clear the list of authentication directives stored in @conn. + + + + + + + a #GstRTSPConnection + + + + + + Close the connected @conn. After this call, the connection is in the same +state as when it was first created. + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is %NULL this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK when a connection could be made. + + + + + a #GstRTSPConnection + + + + a GTimeVal timeout + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is 0 this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK when a connection could be made. + + + + + a #GstRTSPConnection + + + + a timeout in microseconds + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is %NULL this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. If @conn is set to tunneled, +@response will contain a response to the tunneling request messages. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK when a connection could be made. + + + + + a #GstRTSPConnection + + + + a GTimeVal timeout + + + + a #GstRTSPMessage + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is 0 this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. If @conn is set to tunneled, +@response will contain a response to the tunneling request messages. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK when a connection could be made. + + + + + a #GstRTSPConnection + + + + a timeout in microseconds + + + + a #GstRTSPMessage + + + + + + If @conn received the first tunnel connection and @conn2 received +the second tunnel connection, link the two connections together so that +@conn manages the tunneled connection. + +After this call, @conn2 cannot be used anymore and must be freed with +gst_rtsp_connection_free(). + +If @conn2 is %NULL then only the base64 decoding context will be setup for +@conn. + + + return GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + a #GstRTSPConnection or %NULL + + + + + + Start or stop the flushing action on @conn. When flushing, all current +and future actions on @conn will return #GST_RTSP_EINTR until the connection +is set to non-flushing mode again. + + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + start or stop the flush + + + + + + Close and free @conn. + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + + + Retrieve the IP address of the other end of @conn. + + + The IP address as a string. this value remains valid until the +connection is closed. + + + + + a #GstRTSPConnection + + + + + + Get the file descriptor for reading. + + + the file descriptor used for reading or %NULL on +error. The file descriptor remains valid until the connection is closed. + + + + + a #GstRTSPConnection + + + + + + + + %TRUE if the #GstRTSPConnection remembers the session id in the +last response to set it on any further request. + + + + + a #GstRTSPConnection + + + + + + Get the TLS connection of @conn. + +For client side this will return the #GTlsClientConnection when connected +over TLS. + +For server side connections, this function will create a GTlsServerConnection +when called the first time and will return that same connection on subsequent +calls. The server is then responsible for configuring the TLS connection. + + + the TLS connection for @conn. + + + + + a #GstRTSPConnection + + + + + + Gets the anchor certificate authorities database that will be used +after a server certificate can't be verified with the default +certificate database. + + + the anchor certificate authorities database, or NULL if no +database has been previously set. Use g_object_unref() to release the +certificate database. + + + + + a #GstRTSPConnection + + + + + + Gets a #GTlsInteraction object to be used when the connection or certificate +database need to interact with the user. This will be used to prompt the +user for passwords where necessary. + + + a reference on the #GTlsInteraction. Use +g_object_unref() to release. + + + + + a #GstRTSPConnection + + + + + + Gets the TLS validation flags used to verify the peer certificate +when a TLS connection is established. + + + the validationg flags. + + + + + a #GstRTSPConnection + + + + + + Get the tunnel session id the connection. + + + returns a non-empty string if @conn is being tunneled over HTTP. + + + + + a #GstRTSPConnection + + + + + + Retrieve the URL of the other end of @conn. + + + The URL. This value remains valid until the +connection is freed. + + + + + a #GstRTSPConnection + + + + + + Get the file descriptor for writing. + + + the file descriptor used for writing or NULL on +error. The file descriptor remains valid until the connection is closed. + + + + + a #GstRTSPConnection + + + + + + Get the tunneling state of the connection. + + + if @conn is using HTTP tunneling. + + + + + a #GstRTSPConnection + + + + + + Calculate the next timeout for @conn, storing the result in @timeout. + + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + a timeout + + + + + + Calculate the next timeout for @conn + + + #the next timeout in microseconds + + + + + a #GstRTSPConnection + + + + + + Wait up to the specified @timeout for the connection to become available for +at least one of the operations specified in @events. When the function returns +with #GST_RTSP_OK, @revents will contain a bitmask of available operations on +@conn. + +@timeout can be %NULL, in which case this function might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + a bitmask of #GstRTSPEvent flags to check + + + + location for result flags + + + + a timeout + + + + + + Wait up to the specified @timeout for the connection to become available for +at least one of the operations specified in @events. When the function returns +with #GST_RTSP_OK, @revents will contain a bitmask of available operations on +@conn. + +@timeout can be 0, in which case this function might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + a bitmask of #GstRTSPEvent flags to check + + + + location for result flags + + + + a timeout in microseconds + + + + + + Attempt to read @size bytes into @data from the connected @conn, blocking up to +the specified @timeout. @timeout can be %NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to read + + + + the size of @data + + + + a timeout value or %NULL + + + + + + Attempt to read @size bytes into @data from the connected @conn, blocking up to +the specified @timeout. @timeout can be 0, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to read + + + + the size of @data + + + + a timeout value in microseconds + + + + + + Attempt to read into @message from the connected @conn, blocking up to +the specified @timeout. @timeout can be %NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to read + + + + a timeout value or %NULL + + + + + + Attempt to read into @message from the connected @conn, blocking up to +the specified @timeout. @timeout can be 0, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to read + + + + a timeout value or 0 + + + + + + Reset the timeout of @conn. + + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + + + Attempt to send @message to the connected @conn, blocking up to +the specified @timeout. @timeout can be %NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to send + + + + a timeout value or %NULL + + + + + + Attempt to send @messages to the connected @conn, blocking up to +the specified @timeout. @timeout can be %NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the messages to send + + + + + + the number of messages to send + + + + a timeout value or %NULL + + + + + + Attempt to send @messages to the connected @conn, blocking up to +the specified @timeout. @timeout can be 0, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on Since. + + + + + a #GstRTSPConnection + + + + the messages to send + + + + + + the number of messages to send + + + + a timeout value in microseconds + + + + + + Attempt to send @message to the connected @conn, blocking up to +the specified @timeout. @timeout can be 0, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to send + + + + a timeout value in microseconds + + + + + + Sets a custom accept-certificate function for checking certificates for +validity. This will directly map to #GTlsConnection 's "accept-certificate" +signal and be performed after the default checks of #GstRTSPConnection +(checking against the #GTlsDatabase with the given #GTlsCertificateFlags) +have failed. If no #GTlsDatabase is set on this connection, only @func will +be called. + + + + + + + a #GstRTSPConnection + + + + a #GstRTSPConnectionAcceptCertificateFunc to check certificates + + + + User data passed to @func + + + + #GDestroyNotify for @user_data + + + + + + Configure @conn for authentication mode @method with @user and @pass as the +user and password respectively. + + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + authentication method + + + + the user + + + + the password + + + + + + Setup @conn with authentication directives. This is not necessary for +methods #GST_RTSP_AUTH_NONE and #GST_RTSP_AUTH_BASIC. For +#GST_RTSP_AUTH_DIGEST, directives should be taken from the digest challenge +in the WWW-Authenticate response header and can include realm, domain, +nonce, opaque, stale, algorithm, qop as per RFC2617. + + + + + + + a #GstRTSPConnection + + + + authentication directive + + + + value + + + + + + Configure @conn to use the specified Content-Length limit. +Both requests and responses are validated. If content-length is +exceeded, ENOMEM error will be returned. + + + + + + + a #GstRTSPConnection + + + + Content-Length limit + + + + + + By setting the HTTP mode to %TRUE the message parsing will support HTTP +messages in addition to the RTSP messages. It will also disable the +automatic handling of setting up an HTTP tunnel. + + + + + + + a #GstRTSPConnection + + + + %TRUE to enable manual HTTP mode + + + + + + Set the IP address of the server. + + + + + + + a #GstRTSPConnection + + + + an ip address + + + + + + Set the proxy host and port. + + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + the proxy host + + + + the proxy port + + + + + + Configure @conn to use the specified DSCP value. + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + DSCP value + + + + + + Sets if the #GstRTSPConnection should remember the session id from the last +response received and force it onto any further requests. + +The default value is %TRUE + + + + + + + a #GstRTSPConnection + + + + %TRUE if the connection should remember the session id + + + + + + Sets the anchor certificate authorities database. This certificate +database will be used to verify the server's certificate in case it +can't be verified with the default certificate database first. + + + + + + + a #GstRTSPConnection + + + + a #GTlsDatabase + + + + + + Sets a #GTlsInteraction object to be used when the connection or certificate +database need to interact with the user. This will be used to prompt the +user for passwords where necessary. + + + + + + + a #GstRTSPConnection + + + + a #GTlsInteraction + + + + + + Sets the TLS validation flags to be used to verify the peer +certificate when a TLS connection is established. + + + TRUE if the validation flags are set correctly, or FALSE if +@conn is NULL or is not a TLS connection. + + + + + a #GstRTSPConnection + + + + the validation flags. + + + + + + Set the HTTP tunneling state of the connection. This must be configured before +the @conn is connected. + + + + + + + a #GstRTSPConnection + + + + the new state + + + + + + Attempt to write @size bytes of @data to the connected @conn, blocking up to +the specified @timeout. @timeout can be %NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to write + + + + the size of @data + + + + a timeout value or %NULL + + + + + + Attempt to write @size bytes of @data to the connected @conn, blocking up to +the specified @timeout. @timeout can be 0, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to write + + + + the size of @data + + + + a timeout value or 0 + + + + + + Accept a new connection on @socket and create a new #GstRTSPConnection for +handling communication on new socket. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a socket + + + + storage for a #GstRTSPConnection + + + + a #GCancellable to cancel the operation + + + + + + Create a newly allocated #GstRTSPConnection from @url and store it in @conn. +The connection will not yet attempt to connect to @url, use +gst_rtsp_connection_connect(). + +A copy of @url will be made. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GstRTSPUrl + + + + storage for a #GstRTSPConnection + + + + + + Create a new #GstRTSPConnection for handling communication on the existing +socket @socket. The @initial_buffer contains zero terminated data already +read from @socket which should be used before starting to read new data. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GSocket + + + + the IP address of the other end + + + + the port used by the other end + + + + data already read from @fd + + + + storage for a #GstRTSPConnection + + + + + + + + + + + + + + + + + + + + + + + + + + + The possible events for the connection. + + connection is readable + + + connection is writable + + + + This interface is implemented e.g. by the Windows Media Streaming RTSP + exentension (rtspwms) and the RealMedia RTSP extension (rtspreal). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An interface representing RTSP extensions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The possible network families. + + unknown network family + + + internet + + + internet V6 + + + + Enumeration of rtsp header fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The different transport methods. + + invalid transport flag + + + stream data over UDP + + + stream data over UDP multicast + + + stream data over TCP + + + stream data tunneled over HTTP. + + + encrypt TCP and HTTP with TLS + + + + Provides methods for creating and parsing request, response and data messages. + + + the message type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a header with key @field and @value to @msg. This function takes a copy +of @value. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the value of the header + + + + + + Add a header with key @header and @value to @msg. This function takes a copy +of @value. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + header string + + + + the value of the header + + + + + + Append the currently configured headers in @msg to the #GString @str suitable +for transmission. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + a string + + + + + + Allocate a new copy of @msg and store the result in @copy. The value in +@copy should be release with gst_rtsp_message_free function. + + + a #GstRTSPResult + + + + + a #GstRTSPMessage + + + + pointer to new #GstRTSPMessage + + + + + + Dump the contents of @msg to stdout. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + + + Free the memory used by @msg. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + + + Get the body of @msg. @data remains valid for as long as @msg is valid and +unchanged. + +If the message body was set as a #GstBuffer before this will cause the data +to be copied and stored in the message. The #GstBuffer will no longer be +kept in the message. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the data + + + + + + location for the size of @data + + + + + + Get the body of @msg. @buffer remains valid for as long as @msg is valid and +unchanged. + +If body data was set from raw memory instead of a #GstBuffer this function +will always return %NULL. The caller can check if there is a body buffer by +calling gst_rtsp_message_has_body_buffer(). + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the buffer + + + + + + Get the @indx header value with key @field from @msg. The result in @value +stays valid as long as it remains present in @msg. + + + #GST_RTSP_OK when @field was found, #GST_RTSP_ENOTIMPL if the key +was not found. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + pointer to hold the result + + + + the index of the header + + + + + + Get the @index header value with key @header from @msg. The result in @value +stays valid as long as it remains present in @msg. + + + #GST_RTSP_OK when @field was found, #GST_RTSP_ENOTIMPL if the key +was not found. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + pointer to hold the result + + + + the index of the header + + + + + + Get the message type of @msg. + + + the message type. + + + + + a #GstRTSPMessage + + + + + + Checks if @msg has a body and the body is stored as #GstBuffer. + + + %TRUE if @msg has a body and it's stored as #GstBuffer, %FALSE +otherwise. + + + + + a #GstRTSPMessage + + + + + + Initialize @msg. This function is mostly used when @msg is allocated on the +stack. The reverse operation of this is gst_rtsp_message_unset(). + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + + + Initialize a new data #GstRTSPMessage for @channel. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a channel + + + + + + Initialize @msg as a request message with @method and @uri. To clear @msg +again, use gst_rtsp_message_unset(). + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + the request method to use + + + + the uri of the request + + + + + + Initialize @msg with @code and @reason. + +When @reason is %NULL, the default reason for @code will be used. + +When @request is not %NULL, the relevant headers will be copied to the new +response message. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + the status code + + + + the status reason or %NULL + + + + the request that triggered the response or %NULL + + + + + + Parses the credentials given in a WWW-Authenticate or Authorization header. + + + + %NULL-terminated array of GstRTSPAuthCredential or %NULL. + + + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + + + Parse the data message @msg and store the channel in @channel. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the channel + + + + + + Parse the request message @msg and store the values @method, @uri and +@version. The result locations can be %NULL if one is not interested in its +value. + +@uri remains valid for as long as @msg is valid and unchanged. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the method + + + + location to hold the uri + + + + location to hold the version + + + + + + Parse the response message @msg and store the values @code, @reason and +@version. The result locations can be %NULL if one is not interested in its +value. + +@reason remains valid for as long as @msg is valid and unchanged. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the status code + + + + location to hold the status reason + + + + location to hold the version + + + + + + Remove the @indx header with key @field from @msg. If @indx equals -1, all +headers will be removed. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the index of the header + + + + + + Remove the @index header with key @header from @msg. If @index equals -1, +all matching headers will be removed. + + + a #GstRTSPResult + + + + + a #GstRTSPMessage + + + + the header string + + + + the index of the header + + + + + + Set the body of @msg to a copy of @data. Any existing body or body buffer +will be replaced by the new body. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + the data + + + + + + the size of @data + + + + + + Set the body of @msg to @buffer. Any existing body or body buffer +will be replaced by the new body. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + a #GstBuffer + + + + + + Take the body of @msg and store it in @data and @size. After this method, +the body and size of @msg will be set to %NULL and 0 respectively. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the data + + + + + + location for the size of @data + + + + + + Take the body of @msg and store it in @buffer. After this method, +the body and size of @msg will be set to %NULL and 0 respectively. + +If body data was set from raw memory instead of a #GstBuffer this function +will always return %NULL. The caller can check if there is a body buffer by +calling gst_rtsp_message_has_body_buffer(). + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the buffer + + + + + + Set the body of @msg to @data and @size. This method takes ownership of +@data. Any existing body or body buffer will be replaced by the new body. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + the data + + + + + + the size of @data + + + + + + Set the body of @msg to @buffer. This method takes ownership of @buffer. +Any existing body or body buffer will be replaced by the new body. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + a #GstBuffer + + + + + + Add a header with key @field and @value to @msg. This function takes +ownership of @value. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the value of the header + + + + + + Add a header with key @header and @value to @msg. This function takes +ownership of @value, but not of @header. + + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a header string + + + + the value of the header + + + + + + Unset the contents of @msg so that it becomes an uninitialized +#GstRTSPMessage again. This function is mostly used in combination with +gst_rtsp_message_init_request(), gst_rtsp_message_init_response() and +gst_rtsp_message_init_data() on stack allocated #GstRTSPMessage structures. + + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + + + + The different supported RTSP methods. + + invalid method + + + the DESCRIBE method + + + the ANNOUNCE method + + + the GET_PARAMETER method + + + the OPTIONS method + + + the PAUSE method + + + the PLAY method + + + the RECORD method + + + the REDIRECT method + + + the SETUP method + + + the SET_PARAMETER method + + + the TEARDOWN method + + + the GET method (HTTP). + + + the POST method (HTTP). + + + Convert @method to a string. + + + a string representation of @method. + + + + + a #GstRTSPMethod + + + + + + + The type of a message. + + invalid message type + + + RTSP request message + + + RTSP response message + + + HTTP request message. + + + HTTP response message. + + + data message + + + + The transfer profile to use. + + invalid profile + + + the Audio/Visual profile (RFC 3551) + + + the secure Audio/Visual profile (RFC 3711) + + + the Audio/Visual profile with feedback (RFC 4585) + + + the secure Audio/Visual profile with feedback (RFC 5124) + + + + Provides helper functions to deal with time ranges. + + + minimum value of the range + + + + maximum value of the range + + + + Converts the range in-place between different types of units. +Ranges containing the special value #GST_RTSP_TIME_NOW can not be +converted as these are only valid for #GST_RTSP_RANGE_NPT. + + + %TRUE if the range could be converted + + + + + a #GstRTSPTimeRange + + + + the unit to convert the range into + + + + + + Free the memory allocated by @range. + + + + + + + a #GstRTSPTimeRange + + + + + + Retrieve the minimum and maximum values from @range converted to +#GstClockTime in @min and @max. + +A value of %GST_CLOCK_TIME_NONE will be used to signal #GST_RTSP_TIME_NOW +and #GST_RTSP_TIME_END for @min and @max respectively. + +UTC times will be converted to nanoseconds since 1900. + + + %TRUE on success. + + + + + a #GstRTSPTimeRange + + + + result minimum #GstClockTime + + + + result maximum #GstClockTime + + + + + + Parse @rangestr to a #GstRTSPTimeRange. + + + #GST_RTSP_OK on success. + + + + + a range string to parse + + + + location to hold the #GstRTSPTimeRange result + + + + + + Convert @range into a string representation. + + + The string representation of @range. g_free() after usage. + + + + + a #GstRTSPTimeRange + + + + + + + Different possible time range units. + + SMPTE timecode + + + 29.97 frames per second + + + 25 frames per second + + + Normal play time + + + Absolute time expressed as ISO 8601 timestamps + + + + Result codes from the RTSP functions. + + no error + + + some unspecified error occurred + + + invalid arguments were provided to a function + + + an operation was canceled + + + no memory was available for the operation + + + a host resolve error occurred + + + function not implemented + + + a system error occurred, errno contains more details + + + a parsing error occurred + + + windows networking could not start + + + windows networking stack has wrong version + + + end-of-file was reached + + + a network problem occurred, h_errno contains more details + + + the host is not an IP host + + + a timeout occurred + + + the tunnel GET request has been performed + + + the tunnel POST request has been performed + + + last error + + + + The different RTSP states. + + invalid state + + + initializing + + + ready for operation + + + seeking in progress + + + playing + + + recording + + + + Enumeration of rtsp status codes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A time indication. + + + the time of the time + + + + seconds when @type is GST_RTSP_TIME_SECONDS, + GST_RTSP_TIME_UTC and GST_RTSP_TIME_FRAMES + + + + + Extra fields for a time indication. + + + frames and subframes when type in GstRTSPTime is + GST_RTSP_TIME_FRAMES + + + + year when type is GST_RTSP_TIME_UTC + + + + month when type is GST_RTSP_TIME_UTC + + + + day when type is GST_RTSP_TIME_UTC + + + + + A time range. + + + the time units used + + + + the minimum interval + + + + the maximum interval + + + + extra fields in the minimum interval (Since: 1.2) + + + + extra fields in the maximum interval (Since: 1.2) + + + + + Possible time types. + + seconds + + + now + + + end + + + frames and subframes + + + UTC time + + + + The transfer mode to use. + + invalid tansport mode + + + transfer RTP data + + + transfer RDT (RealMedia) data + + + + Provides helper functions to deal with RTSP transport strings. + + + the transport mode + + + + the tansport profile + + + + the lower transport + + + + the destination ip/hostname + + + + the source ip/hostname + + + + the number of layers + + + + if play mode was selected + + + + if record mode was selected + + + + is append mode was selected + + + + the interleave range + + + + the time to live for multicast UDP + + + + the port pair for multicast sessions + + + + the client port pair for receiving data. For TCP + based transports, applications can use this field to store the + sender and receiver ports of the client. + + + + the server port pair for receiving data. For TCP + based transports, applications can use this field to store the + sender and receiver ports of the server. + + + + the ssrc that the sender/receiver will use + + + + + + + + + Convert @transport into a string that can be used to signal the transport in +an RTSP SETUP response. + + + a string describing the RTSP transport or %NULL when the transport +is invalid. + + + + + a #GstRTSPTransport + + + + + + Free the memory used by @transport. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + + + Get the media type of @transport. This media type is typically +used to generate #GstCaps events. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + media type of @transport + + + + + + Initialize @transport so that it can be used. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + + + Get the #GstElement that can handle the buffers transported over @trans. + +It is possible that there are several managers available, use @option to +selected one. + +@manager will contain an element name or %NULL when no manager is +needed/available for @trans. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + option index. + + + + + + Get the mime type of the transport mode @trans. This mime type is typically +used to generate #GstCaps events. + This functions only deals with the GstRTSPTransMode and only + returns the mime type for #GST_RTSP_PROFILE_AVP. Use + gst_rtsp_transport_get_media_type() instead. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + + + Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free() +after usage. + + + a #GstRTSPResult. + + + + + location to hold the new #GstRTSPTransport + + + + + + Parse the RTSP transport string @str into @transport. + + + a #GstRTSPResult. + + + + + a transport string + + + + a #GstRTSPTransport + + + + + + + Provides helper functions to handle RTSP urls. + + + the transports allowed + + + + the family + + + + the user + + + + the password + + + + the host + + + + the port + + + + the absolute path + + + + additional query parameters + + + + Make a copy of @url. + + + a copy of @url. Free with gst_rtsp_url_free () after usage. + + + + + a #GstRTSPUrl + + + + + + Splits the path of @url on '/' boundaries, decoding the resulting components, + +The decoding performed by this routine is "URI decoding", as defined in RFC +3986, commonly known as percent-decoding. For example, a string "foo\%2fbar" +will decode to "foo/bar" -- the \%2f being replaced by the corresponding byte +with hex value 0x2f. Note that there is no guarantee that the resulting byte +sequence is valid in any given encoding. As a special case, \%00 is not +unescaped to NUL, as that would prematurely terminate the string. + +Also note that since paths usually start with a slash, the first component +will usually be the empty string. + + + %NULL-terminated array of URL components. Free with +g_strfreev() when no longer needed. + + + + + + + a #GstRTSPUrl + + + + + + Free the memory used by @url. + + + + + + + a #GstRTSPUrl + + + + + + Get the port number of @url. + + + #GST_RTSP_OK. + + + + + a #GstRTSPUrl + + + + location to hold the port + + + + + + Get a newly allocated string describing the request URI for @url. + + + a string with the request URI. g_free() after usage. + + + + + a #GstRTSPUrl + + + + + + Get a newly allocated string describing the request URI for @url +combined with the control path for @control_path + + + a string with the request URI combined with the control path. +g_free() after usage. + + + + + a #GstRTSPUrl + + + + an RTSP aggregate control path + + + + + + Set the port number in @url to @port. + + + #GST_RTSP_OK. + + + + + a #GstRTSPUrl + + + + the port + + + + + + Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage +with gst_rtsp_url_free(). + + + a #GstRTSPResult. + + + + + the url string to parse + + + + location to hold the result. + + + + + + + The supported RTSP versions. + + unknown/invalid version + + + version 1.0 + + + version 1.1. + + + version 2.0. + + + Convert @version to a string. + + + a string representation of @version. + + + + + a #GstRTSPVersion + + + + + + + Opaque RTSP watch object that can be used for asynchronous RTSP +operations. + + + Adds a #GstRTSPWatch to a context so that it will be executed within that context. + + + the ID (greater than 0) for the watch within the GMainContext. + + + + + a #GstRTSPWatch + + + + a GMainContext (if NULL, the default context will be used) + + + + + + Get the maximum amount of bytes and messages that will be queued in @watch. +See gst_rtsp_watch_set_send_backlog(). + + + + + + + a #GstRTSPWatch + + + + maximum bytes + + + + maximum messages + + + + + + Reset @watch, this is usually called after gst_rtsp_connection_do_tunnel() +when the file descriptors of the connection might have changed. + + + + + + + a #GstRTSPWatch + + + + + + Send a @message using the connection of the @watch. If it cannot be sent +immediately, it will be queued for transmission in @watch. The contents of +@message will then be serialized and transmitted when the connection of the +@watch becomes writable. In case the @message is queued, the ID returned in +@id will be non-zero and used as the ID argument in the message_sent +callback. + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPWatch + + + + a #GstRTSPMessage + + + + location for a message ID or %NULL + + + + + + Sends @messages using the connection of the @watch. If they cannot be sent +immediately, they will be queued for transmission in @watch. The contents of +@messages will then be serialized and transmitted when the connection of the +@watch becomes writable. In case the @messages are queued, the ID returned in +@id will be non-zero and used as the ID argument in the message_sent +callback once the last message is sent. The callback will only be called +once for the last message. + + + #GST_RTSP_OK on success. + + + + + a #GstRTSPWatch + + + + the messages to send + + + + + + the number of messages to send + + + + location for a message ID or %NULL + + + + + + When @flushing is %TRUE, abort a call to gst_rtsp_watch_wait_backlog() +and make sure gst_rtsp_watch_write_data() returns immediately with +#GST_RTSP_EINTR. And empty the queue. + + + + + + + a #GstRTSPWatch + + + + new flushing state + + + + + + Set the maximum amount of bytes and messages that will be queued in @watch. +When the maximum amounts are exceeded, gst_rtsp_watch_write_data() and +gst_rtsp_watch_send_message() will return #GST_RTSP_ENOMEM. + +A value of 0 for @bytes or @messages means no limits. + + + + + + + a #GstRTSPWatch + + + + maximum bytes + + + + maximum messages + + + + + + Decreases the reference count of @watch by one. If the resulting reference +count is zero the watch and associated memory will be destroyed. + + + + + + + a #GstRTSPWatch + + + + + + Wait until there is place in the backlog queue, @timeout is reached +or @watch is set to flushing. + +If @timeout is %NULL this function can block forever. If @timeout +contains a valid timeout, this function will return %GST_RTSP_ETIMEOUT +after the timeout expired. + +The typically use of this function is when gst_rtsp_watch_write_data +returns %GST_RTSP_ENOMEM. The caller then calls this function to wait for +free space in the backlog queue and try again. + + + %GST_RTSP_OK when if there is room in queue. + %GST_RTSP_ETIMEOUT when @timeout was reached. + %GST_RTSP_EINTR when @watch is flushing + %GST_RTSP_EINVAL when called with invalid parameters. + + + + + a #GstRTSPWatch + + + + a GTimeVal timeout + + + + + + Wait until there is place in the backlog queue, @timeout is reached +or @watch is set to flushing. + +If @timeout is 0 this function can block forever. If @timeout +contains a valid timeout, this function will return %GST_RTSP_ETIMEOUT +after the timeout expired. + +The typically use of this function is when gst_rtsp_watch_write_data +returns %GST_RTSP_ENOMEM. The caller then calls this function to wait for +free space in the backlog queue and try again. + + + %GST_RTSP_OK when if there is room in queue. + %GST_RTSP_ETIMEOUT when @timeout was reached. + %GST_RTSP_EINTR when @watch is flushing + %GST_RTSP_EINVAL when called with invalid parameters. + + + + + a #GstRTSPWatch + + + + a timeout in microseconds + + + + + + Write @data using the connection of the @watch. If it cannot be sent +immediately, it will be queued for transmission in @watch. The contents of +@message will then be serialized and transmitted when the connection of the +@watch becomes writable. In case the @message is queued, the ID returned in +@id will be non-zero and used as the ID argument in the message_sent +callback. + +This function will take ownership of @data and g_free() it after use. + +If the amount of queued data exceeds the limits set with +gst_rtsp_watch_set_send_backlog(), this function will return +#GST_RTSP_ENOMEM. + + + #GST_RTSP_OK on success. #GST_RTSP_ENOMEM when the backlog limits +are reached. #GST_RTSP_EINTR when @watch was flushing. + + + + + a #GstRTSPWatch + + + + the data to queue + + + + + + the size of @data + + + + location for a message ID or %NULL + + + + + + Create a watch object for @conn. The functions provided in @funcs will be +called with @user_data when activity happened on the watch. + +The new watch is usually created so that it can be attached to a +maincontext with gst_rtsp_watch_attach(). + +@conn must exist for the entire lifetime of the watch. + + + a #GstRTSPWatch that can be used for asynchronous RTSP +communication. Free with gst_rtsp_watch_unref () after usage. + + + + + a #GstRTSPConnection + + + + watch functions + + + + user data to pass to @funcs + + + + notify when @user_data is not referenced anymore + + + + + + + Callback functions from a #GstRTSPWatch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Macro that checks the return value of @stmt and jumps to @label when it does +not equal #GST_RTSP_OK. + + + + a statement + + + a label + + + + + The default RTSP port to connect to. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides common defines for the RTSP library. + + + Free a %NULL-terminated array of credentials returned from +gst_rtsp_message_parse_auth_credentials(). + + + + + + + a %NULL-terminated array of #GstRTSPAuthCredential + + + + + + Accept a new connection on @socket and create a new #GstRTSPConnection for +handling communication on new socket. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a socket + + + + storage for a #GstRTSPConnection + + + + a #GCancellable to cancel the operation + + + + + + Create a newly allocated #GstRTSPConnection from @url and store it in @conn. +The connection will not yet attempt to connect to @url, use +gst_rtsp_connection_connect(). + +A copy of @url will be made. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GstRTSPUrl + + + + storage for a #GstRTSPConnection + + + + + + Create a new #GstRTSPConnection for handling communication on the existing +socket @socket. The @initial_buffer contains zero terminated data already +read from @socket which should be used before starting to read new data. + + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GSocket + + + + the IP address of the other end + + + + the port used by the other end + + + + data already read from @fd + + + + storage for a #GstRTSPConnection + + + + + + Convert @header to a #GstRTSPHeaderField. + + + a #GstRTSPHeaderField for @header or #GST_RTSP_HDR_INVALID if the +header field is unknown. + + + + + a header string + + + + + + Convert @method to a #GstRTSPMethod. + + + a #GstRTSPMethod for @method or #GST_RTSP_INVALID if the +method is unknown. + + + + + a method + + + + + + Calculates the digest auth response from the values given by the server and +the username and password. See RFC2069 for details. + +Currently only supported algorithm "md5". + + + Authentication response or %NULL if unsupported + + + + + Hash algorithm to use, or %NULL for MD5 + + + + Request method, e.g. PLAY + + + + Realm + + + + Username + + + + Password + + + + Original request URI + + + + Nonce + + + + + + Calculates the digest auth response from the values given by the server and +the md5sum. See RFC2069 for details. + +This function is useful when the passwords are not stored in clear text, +but instead in the same format as the .htdigest file. + +Currently only supported algorithm "md5". + + + Authentication response or %NULL if unsupported + + + + + Hash algorithm to use, or %NULL for MD5 + + + + Request method, e.g. PLAY + + + + The md5 sum of username:realm:password + + + + Original request URI + + + + Nonce + + + + + + Check whether @field may appear multiple times in a message. + + + %TRUE if multiple headers are allowed. + + + + + a #GstRTSPHeaderField + + + + + + Convert @field to a string. + + + a string representation of @field. + + + + + a #GstRTSPHeaderField + + + + + + Create a new initialized #GstRTSPMessage. Free with gst_rtsp_message_free(). + + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + + + Create a new data #GstRTSPMessage with @channel and store the +result message in @msg. Free with gst_rtsp_message_free(). + + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the channel + + + + + + Create a new #GstRTSPMessage with @method and @uri and store the result +request message in @msg. Free with gst_rtsp_message_free(). + + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the request method to use + + + + the uri of the request + + + + + + Create a new response #GstRTSPMessage with @code and @reason and store the +result message in @msg. Free with gst_rtsp_message_free(). + +When @reason is %NULL, the default reason for @code will be used. + +When @request is not %NULL, the relevant headers will be copied to the new +response message. + + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the status code + + + + the status reason or %NULL + + + + the request that triggered the response or %NULL + + + + + + Convert @method to a string. + + + a string representation of @method. + + + + + a #GstRTSPMethod + + + + + + Convert @options to a string. + + + a new string of @options. g_free() after usage. + + + + + one or more #GstRTSPMethod + + + + + + Convert the comma separated list @options to a #GstRTSPMethod bitwise or +of methods. This functions is the reverse of gst_rtsp_options_as_text(). + + + a #GstRTSPMethod + + + + + a comma separated list of options + + + + + + Converts the range in-place between different types of units. +Ranges containing the special value #GST_RTSP_TIME_NOW can not be +converted as these are only valid for #GST_RTSP_RANGE_NPT. + + + %TRUE if the range could be converted + + + + + a #GstRTSPTimeRange + + + + the unit to convert the range into + + + + + + Free the memory allocated by @range. + + + + + + + a #GstRTSPTimeRange + + + + + + Retrieve the minimum and maximum values from @range converted to +#GstClockTime in @min and @max. + +A value of %GST_CLOCK_TIME_NONE will be used to signal #GST_RTSP_TIME_NOW +and #GST_RTSP_TIME_END for @min and @max respectively. + +UTC times will be converted to nanoseconds since 1900. + + + %TRUE on success. + + + + + a #GstRTSPTimeRange + + + + result minimum #GstClockTime + + + + result maximum #GstClockTime + + + + + + Parse @rangestr to a #GstRTSPTimeRange. + + + #GST_RTSP_OK on success. + + + + + a range string to parse + + + + location to hold the #GstRTSPTimeRange result + + + + + + Convert @range into a string representation. + + + The string representation of @range. g_free() after usage. + + + + + a #GstRTSPTimeRange + + + + + + Convert @code to a string. + + + a string representation of @code. + + + + + a #GstRTSPStatusCode + + + + + + Convert @result in a human readable string. + + + a newly allocated string. g_free() after usage. + + + + + a #GstRTSPResult + + + + + + Get the #GstElement that can handle the buffers transported over @trans. + +It is possible that there are several managers available, use @option to +selected one. + +@manager will contain an element name or %NULL when no manager is +needed/available for @trans. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + option index. + + + + + + Get the mime type of the transport mode @trans. This mime type is typically +used to generate #GstCaps events. + This functions only deals with the GstRTSPTransMode and only + returns the mime type for #GST_RTSP_PROFILE_AVP. Use + gst_rtsp_transport_get_media_type() instead. + + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + + + Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free() +after usage. + + + a #GstRTSPResult. + + + + + location to hold the new #GstRTSPTransport + + + + + + Parse the RTSP transport string @str into @transport. + + + a #GstRTSPResult. + + + + + a transport string + + + + a #GstRTSPTransport + + + + + + Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage +with gst_rtsp_url_free(). + + + a #GstRTSPResult. + + + + + the url string to parse + + + + location to hold the result. + + + + + + Convert @version to a string. + + + a string representation of @version. + + + + + a #GstRTSPVersion + + + + + + Create a watch object for @conn. The functions provided in @funcs will be +called with @user_data when activity happened on the watch. + +The new watch is usually created so that it can be attached to a +maincontext with gst_rtsp_watch_attach(). + +@conn must exist for the entire lifetime of the watch. + + + a #GstRTSPWatch that can be used for asynchronous RTSP +communication. Free with gst_rtsp_watch_unref () after usage. + + + + + a #GstRTSPConnection + + + + watch functions + + + + user data to pass to @funcs + + + + notify when @user_data is not referenced anymore + + + + + + diff --git a/girs/GstSdp-1.0.gir b/girs/GstSdp-1.0.gir new file mode 100644 index 0000000000..a3ce4c518c --- /dev/null +++ b/girs/GstSdp-1.0.gir @@ -0,0 +1,6619 @@ + + + + + + + + + The different cache types + + + The envelope key MUST NOT be cached + + + The envelope key MUST be cached + + + The envelope key MUST be cached, but only + to be used for the specific CSB. + + + + + + + The encryption algorithm used to encrypt the Encr data field + + + no encryption + + + AES-CM using a 128-bit key + + + AES Key Wrap using a 128-bit key + + + AES-GCM using a 128-bit key (Since: 1.16) + + + + + + + The key validity type + + + No specific usage rule + + + The key is associated with the SPI/MKI + + + The key has a start and expiration time + + + + The type of key. + + + a TEK Generation Key + + + Traffic-Encrypting Key + + + + Specifies the authentication algorithm used + + + no authentication + + + HMAC-SHA-1-160 + + + + The Security policy Map item for SRTP + + + The security policy applied for the stream with @ssrc + + + + the SSRC that must be used for the stream + + + + current rollover counter + + + + + Specifies the method of uniquely mapping Crypto Sessions to the security +protocol sessions. + + + SRTP + + + + Structure holding the information of the MIKEY message + + + + + + the version + + + + the #GstMIKEYType message type + + + + verify flag + + + + a #GstMIKEYPRFFunc + + + + Identifies the Crypto Session Bundle + + + + a #GstMIKEYMapType + + + + map info array of type depending on @map_type + + + + + + the payload array of #GstMIKEYPayload + + + + + + Make a new MIKEY message. + + + a new #GstMIKEYMessage on success + + + + + Make a new #GstMIKEYMessage from @bytes. + + + a new #GstMIKEYMessage + + + + + a #GBytes + + + + a #GstMIKEYDecryptInfo + + + + + + Makes mikey message including: + - Security Policy Payload + - Key Data Transport Payload + - Key Data Sub-Payload + + + a #GstMIKEYMessage, +or %NULL if there is no srtp information in the caps. + + + + + a #GstCaps, including SRTP parameters (srtp/srtcp cipher, authorization, key data) + + + + + + Parse @size bytes from @data into a #GstMIKEYMessage. @info contains the +parameters to decrypt and verify the data. + + + a #GstMIKEYMessage on success or %NULL when parsing failed and +@error will be set. + + + + + bytes to read + + + + + + length of @data + + + + #GstMIKEYDecryptInfo + + + + + + Add a Crypto policy for SRTP to @msg. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + The security policy applied for the stream with @ssrc + + + + the SSRC that must be used for the stream + + + + current rollover counter + + + + + + Add a new payload to @msg. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYPayload + + + + + + Add a new PKE payload to @msg with the given parameters. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + envelope key cache indicator + + + + the length of @data + + + + the encrypted envelope key + + + + + + + + Add a new RAND payload to @msg with the given parameters. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the length of @rand + + + + random data + + + + + + + + Add a new RAND payload to @msg with @len random bytes. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + length + + + + + + Add a new T payload to @msg with the given parameters. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + specifies the timestamp type used + + + + The timestamp value of the specified @type + + + + + + + + Add a new T payload to @msg that contains the current time +in NTP-UTC format. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + + + + + a #gchar, base64-encoded data + + + + + a #GstMIKEYMessage + + + + + + Find the @nth occurrence of the payload with @type in @msg. + + + the @nth #GstMIKEYPayload of @type. + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYPayloadType + + + + payload to find + + + + + + Get the policy information of @msg at @idx. + + + a #GstMIKEYMapSRTP + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Get the number of crypto sessions in @msg. + + + the number of crypto sessions + + + + + a #GstMIKEYMessage + + + + + + Get the number of payloads in @msg. + + + the number of payloads in @msg + + + + + a #GstMIKEYMessage + + + + + + Get the #GstMIKEYPayload at @idx in @msg + + + the #GstMIKEYPayload at @idx. The payload +remains valid for as long as it is part of @msg. + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Insert a Crypto Session map for SRTP in @msg at @idx + +When @idx is -1, the policy will be appended. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to insert at + + + + the map info + + + + + + Insert the @payload at index @idx in @msg. If @idx is -1, the payload +will be appended to @msg. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + a #GstMIKEYPayload + + + + + + Remove the SRTP policy at @idx. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to remove + + + + + + Remove the payload in @msg at @idx + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Replace a Crypto Session map for SRTP in @msg at @idx with @map. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to insert at + + + + the map info + + + + + + Replace the payload at @idx in @msg with @payload. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + a #GstMIKEYPayload + + + + + + Set the information in @msg. + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a version + + + + a #GstMIKEYType + + + + verify flag + + + + the #GstMIKEYPRFFunc function to use + + + + the Crypto Session Bundle id + + + + the #GstMIKEYMapType + + + + + + Convert @msg to a #GBytes. + + + a new #GBytes for @msg. + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYEncryptInfo + + + + + + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a #GstCaps to be filled with SRTP parameters (srtp/srtcp cipher, authorization, key data) + + + + + + + The PRF function that has been/will be used for key derivation + + + MIKEY-1 PRF function + + + + Hold the common fields for all payloads + + + + + + the payload type + + + + length of the payload + + + + Make a new #GstMIKEYPayload with @type. + + + a new #GstMIKEYPayload or %NULL on failure. + + + + + a #GstMIKEYPayloadType + + + + + + Add a new sub payload to @payload. + + + %TRUE on success. + + + + + a #GstMIKEYPayload + + + + a #GstMIKEYPayload to add + + + + + + Get the number of sub payloads of @payload. @payload should be of type +%GST_MIKEY_PT_KEMAC. + + + the number of sub payloads in @payload + + + + + a #GstMIKEYPayload + + + + + + Get the sub payload of @payload at @idx. @payload should be of type +%GST_MIKEY_PT_KEMAC. + + + the #GstMIKEYPayload at @idx. + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Remove the sub payload at @idx in @payload. + + + %TRUE on success. + + + + + a #GstMIKEYPayload + + + + the index to remove + + + + + + Set the KEMAC parameters. @payload should point to a %GST_MIKEY_PT_KEMAC +payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the #GstMIKEYEncAlg + + + + a #GstMIKEYMacAlg + + + + + + Set the key validity period in the %GST_MIKEY_PT_KEY_DATA @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @vf_data + + + + the Valid From data + + + + + + the length of @vt_data + + + + the Valid To data + + + + + + + + Set @key_len bytes of @key_data of type @key_type as the key for the +%GST_MIKEY_PT_KEY_DATA @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + a #GstMIKEYKeyDataType + + + + the length of @key_data + + + + the key of type @key_type + + + + + + + + Set the salt key data. If @salt_len is 0 and @salt_data is %NULL, the +salt data will be removed. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @salt_data + + + + the salt + + + + + + + + Set the SPI/MKI validity in the %GST_MIKEY_PT_KEY_DATA @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @spi_data + + + + the SPI/MKI data + + + + + + + + Set the PKE values in @payload. @payload must be of type +%GST_MIKEY_PT_PKE. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + envelope key cache indicator + + + + the length of @data + + + + the encrypted envelope key + + + + + + + + Set the random values in a %GST_MIKEY_PT_RAND @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @rand + + + + random values + + + + + + + + Add a new parameter to the %GST_MIKEY_PT_SP @payload with @type, @len +and @val. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + a type + + + + a length + + + + @len bytes of data + + + + + + + + Get the number of security policy parameters in a %GST_MIKEY_PT_SP +@payload. + + + the number of parameters in @payload + + + + + a #GstMIKEYPayload + + + + + + Get the Security Policy parameter in a %GST_MIKEY_PT_SP @payload +at @idx. + + + the #GstMIKEYPayloadSPParam at @idx in @payload + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Remove the Security Policy parameters from a %GST_MIKEY_PT_SP +@payload at @idx. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Set the Security Policy parameters for @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the policy number + + + + a #GstMIKEYSecProto + + + + + + Set the timestamp in a %GST_MIKEY_PT_T @payload. + + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the #GstMIKEYTSType + + + + the timestamp value + + + + + + + + + A structure holding the KEMAC payload + + + the common #GstMIKEYPayload + + + + the #GstMIKEYEncAlg + + + + the #GstMIKEYMacAlg + + + + the subpayloads + + + + + + + The Key data payload contains key material. It should be added as sub +payload to the KEMAC. + + + the payload header + + + + the #GstMIKEYKeyDataType of @key_data + + + + length of @key_data + + + + the key data + + + + the length of @salt_data, can be 0 + + + + salt data + + + + the Key Validity type + + + + length of @kv_data + + + + + + key validity data + + + + + + + The Envelope data payload contains the encrypted envelope key that is +used in the public-key transport to protect the data in the Key data +transport payload. The encryption algorithm used is implicit from +the certificate/public key used. + + + the common #GstMIKEYPayload + + + + envelope key cache indicator + + + + length of @data + + + + the encrypted envelope key + + + + + The RAND payload consists of a (pseudo-)random bit-string + + + the payload header + + + + the length of @rand + + + + random values + + + + + The Security Policy payload defines a set of policies that apply to a +specific security protocol + + + the payload header + + + + the policy number + + + + the security protocol + + + + array of #GstMIKEYPayloadSPParam + + + + + + + A Type/Length/Value field for security parameters + + + specifies the type of the parameter + + + + specifies the length of @val + + + + specifies the value of the parameter + + + + + The timestamp payload carries the timestamp information + + + the payload header + + + + a #GstMIKEYTSType + + + + the timestamp value + + + + + Different MIKEY Payload types. + + + Last payload + + + Key data transport payload + + + Envelope data payload + + + DH data payload + + + Signature payload + + + Timestamp payload + + + ID payload + + + Certificate Payload + + + Cert hash payload + + + Verification message payload + + + Security Policy payload + + + RAND payload + + + Error payload + + + Key data sub-payload + + + General Extension Payload + + + + Specifies the security protocol + + + SRTP + + + + This policy specifies the parameters for SRTP and SRTCP + + + Encryption algorithm + + + Session Encr. key length + + + Authentication algorithm + + + Session Auth. key length + + + Session Salt key length + + + SRTP Pseudo Random Function + + + Key derivation rate + + + SRTP encryption off/on, 0 if off, 1 if on + + + SRTCP encryption off/on, 0 if off, 1 if on + + + sender's FEC order + + + SRTP authentication off/on, 0 if off, 1 if on + + + Authentication tag length + + + SRTP prefix length + + + AEAD authentication tag length (Since: 1.16) + + + + Specifies the timestamp type. + + + an NTP time in UTC timezone + + + an NTP time + + + a counter + + + + Different MIKEY data types. + + + Invalid type + + + Initiator's pre-shared key message + + + Verification message of a Pre-shared key message + + + Initiator's public-key transport message + + + Verification message of a public-key message + + + Initiator's DH exchange message + + + Responder's DH exchange message + + + Error message + + + + The supported MIKEY version 1. + + + + + The contents of the SDP "a=" field which contains a key/value pair. + + + the attribute key + + + + the attribute value or NULL when it was a property attribute + + + + Clear the attribute. + + + @GST_SDP_OK. + + + + + a #GstSDPAttribute + + + + + + Set the attribute with @key and @value. + + + @GST_SDP_OK. + + + + + a #GstSDPAttribute + + + + the key + + + + the value + + + + + + + The contents of the SDP "b=" field which specifies the proposed bandwidth to +be used by the session or media. + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + Reset the bandwidth information in @bw. + + + a #GstSDPResult. + + + + + a #GstSDPBandwidth + + + + + + Set bandwidth information in @bw. + + + a #GstSDPResult. + + + + + a #GstSDPBandwidth + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + + The contents of the SDP "c=" field which contains connection data. + + + the type of network. "IN" is defined to have the meaning + "Internet". + + + + the type of @address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + Clear the connection. + + + @GST_SDP_OK. + + + + + a #GstSDPConnection + + + + + + Set the connection with the given parameters. + + + @GST_SDP_OK. + + + + + a #GstSDPConnection + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + + The contents of the SDP "k=" field which is used to convey encryption +keys. + + + the encryption type + + + + the encryption data + + + + + The contents of the SDP "m=" field with all related fields. + + + the media type + + + + the transport port to which the media stream will be sent + + + + the number of ports or -1 if only one port was specified + + + + the transport protocol + + + + an array of #gchar formats + + + + + + the media title + + + + array of #GstSDPConnection with media connection information + + + + + + array of #GstSDPBandwidth with media bandwidth information + + + + + + the encryption key + + + + array of #GstSDPAttribute with the additional media attributes + + + + + + Add the attribute with @key and @value to @media. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + a key + + + + a value + + + + + + Add the bandwidth information with @bwtype and @bandwidth to @media. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + Add the given connection parameters to @media. + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + Add the format information to @media. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the format + + + + + + Convert the contents of @media to a text string. + + + A dynamically allocated string representing the media. + + + + + a #GstSDPMedia + + + + + + Get the number of attribute fields in @media. + + + the number of attributes in @media. + + + + + a #GstSDPMedia + + + + + + Mapping of attributes of #GstSDPMedia to #GstCaps + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + a #GstCaps + + + + + + Get the number of bandwidth fields in @media. + + + the number of bandwidths in @media. + + + + + a #GstSDPMedia + + + + + + Get the number of connection fields in @media. + + + the number of connections in @media. + + + + + a #GstSDPMedia + + + + + + Allocate a new copy of @media and store the result in @copy. The value in +@copy should be release with gst_sdp_media_free function. + + + a #GstSDPResult + + + + + a #GstSDPMedia + + + + pointer to new #GstSDPMedia + + + + + + Get the number of formats in @media. + + + the number of formats in @media. + + + + + a #GstSDPMedia + + + + + + Free all resources allocated by @media. @media should not be used anymore after +this function. This function should be used when @media was dynamically +allocated with gst_sdp_media_new(). + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Get the attribute at position @idx in @media. + + + the #GstSDPAttribute at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the first attribute value for @key in @media. + + + the first attribute value for @key. + + + + + a #GstSDPMedia + + + + a key + + + + + + Get the @nth attribute value for @key in @media. + + + the @nth attribute value. + + + + + a #GstSDPMedia + + + + a key + + + + an index + + + + + + Get the bandwidth at position @idx in @media. + + + the #GstSDPBandwidth at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Mapping of caps from SDP fields: + +a=rtpmap:(payload) (encoding_name)/(clock_rate)[/(encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + +Note that the extmap attribute is set only by gst_sdp_media_attributes_to_caps(). + + + a #GstCaps, or %NULL if an error happened + + + + + a #GstSDPMedia + + + + a payload type + + + + + + Get the connection at position @idx in @media. + + + the #GstSDPConnection at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the format information at position @idx in @media. + + + the format at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the information of @media + + + the information of @media. + + + + + a #GstSDPMedia + + + + + + Get the encryption information from @media. + + + a #GstSDPKey. + + + + + a #GstSDPMedia + + + + + + Get the media description of @media. + + + the media description. + + + + + a #GstSDPMedia + + + + + + Get the number of ports for @media. + + + the number of ports for @media. + + + + + a #GstSDPMedia + + + + + + Get the port number for @media. + + + the port number of @media. + + + + + a #GstSDPMedia + + + + + + Get the transport protocol of @media + + + the transport protocol of @media. + + + + + a #GstSDPMedia + + + + + + Initialize @media so that its contents are as if it was freshly allocated +with gst_sdp_media_new(). This function is mostly used to initialize a media +allocated on the stack. gst_sdp_media_uninit() undoes this operation. + +When this function is invoked on newly allocated data (with malloc or on the +stack), its contents should be set to 0 before calling this function. + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Insert the attribute to @media at @idx. When @idx is -1, +the attribute is appended. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPAttribute + + + + + + Insert the bandwidth information to @media at @idx. When @idx is -1, +the bandwidth is appended. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPBandwidth + + + + + + Insert the connection information to @media at @idx. When @idx is -1, +the connection is appended. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPConnection + + + + + + Insert the format information to @media at @idx. When @idx is -1, +the format is appended. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + the format + + + + + + Creates a new #GstMIKEYMessage after parsing the key-mgmt attribute +from a #GstSDPMedia. + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + pointer to new #GstMIKEYMessage + + + + + + Remove the attribute in @media at @idx. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the bandwidth information in @media at @idx. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the connection information in @media at @idx. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the format information in @media at @idx. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Replace the attribute in @media at @idx with @attr. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPAttribute + + + + + + Replace the bandwidth information in @media at @idx with @bw. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPBandwidth + + + + + + Replace the connection information in @media at @idx with @conn. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPConnection + + + + + + Replace the format information in @media at @idx with @format. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + the format + + + + + + Set the media information of @media to @information. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media information + + + + + + Adds the encryption information to @media. + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + the encryption type + + + + the encryption data + + + + + + Set the media description of @media to @med. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media description + + + + + + Set the port information in @media. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the port number + + + + the number of ports + + + + + + Set the media transport protocol of @media to @proto. + + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media transport protocol + + + + + + Free all resources allocated in @media. @media should not be used anymore after +this function. This function should be used when @media was allocated on the +stack and initialized with gst_sdp_media_init(). + + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Allocate a new GstSDPMedia and store the result in @media. + + + a #GstSDPResult. + + + + + pointer to new #GstSDPMedia + + + + + + Mapping of caps to SDP fields: + +a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + +a=rtcp-fb:(payload) (param1) [param2]... + +a=extmap:(id)[/direction] (extensionname) (extensionattributes) + + + a #GstSDPResult. + + + + + a #GstCaps + + + + a #GstSDPMedia + + + + + + + The GstSDPMessage helper functions makes it easy to parse and create SDP +messages. + + + the protocol version + + + + owner/creator and session identifier + + + + session name + + + + session information + + + + URI of description + + + + array of #gchar with email addresses + + + + + + array of #gchar with phone numbers + + + + + + connection information for the session + + + + array of #GstSDPBandwidth with bandwidth information + + + + + + array of #GstSDPTime with time descriptions + + + + + + array of #GstSDPZone with time zone adjustments + + + + + + encryption key + + + + array of #GstSDPAttribute with session attributes + + + + + + array of #GstSDPMedia with media descriptions + + + + + + Add the attribute with @key and @value to @msg. + + + @GST_SDP_OK. + + + + + a #GstSDPMessage + + + + the key + + + + the value + + + + + + Add the specified bandwidth information to @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + Add @email to the list of emails in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email + + + + + + Adds @media to the array of medias in @msg. This function takes ownership of +the contents of @media so that @media will have to be reinitialized with +gst_sdp_media_init() before it can be used again. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a #GstSDPMedia to add + + + + + + Add @phone to the list of phones in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone + + + + + + Add time information @start and @stop to @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the start time + + + + the stop time + + + + the repeat times + + + + + + + + Add time zone information to @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + + + Convert the contents of @msg to a text string. + + + A dynamically allocated string representing the SDP description. + + + + + a #GstSDPMessage + + + + + + Get the number of attributes in @msg. + + + the number of attributes in @msg. + + + + + a #GstSDPMessage + + + + + + Mapping of attributes of #GstSDPMessage to #GstCaps + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a #GstCaps + + + + + + Get the number of bandwidth information in @msg. + + + the number of bandwidth information in @msg. + + + + + a #GstSDPMessage + + + + + + Allocate a new copy of @msg and store the result in @copy. The value in +@copy should be release with gst_sdp_message_free function. + + + a #GstSDPResult + + + + + a #GstSDPMessage + + + + pointer to new #GstSDPMessage + + + + + + Dump the parsed contents of @msg to stdout. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the number of emails in @msg. + + + the number of emails in @msg. + + + + + a #GstSDPMessage + + + + + + Free all resources allocated by @msg. @msg should not be used anymore after +this function. This function should be used when @msg was dynamically +allocated with gst_sdp_message_new(). + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the attribute at position @idx in @msg. + + + the #GstSDPAttribute at position @idx. + + + + + a #GstSDPMessage + + + + the index + + + + + + Get the first attribute with key @key in @msg. + + + the attribute value of the first attribute with @key. + + + + + a #GstSDPMessage + + + + the key + + + + + + Get the @nth attribute with key @key in @msg. + + + the attribute value of the @nth attribute with @key. + + + + + a #GstSDPMessage + + + + the key + + + + the index + + + + + + Get the bandwidth at index @idx from @msg. + + + a #GstSDPBandwidth. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + + + Get the connection of @msg. + + + a #GstSDPConnection. The result remains valid as long as @msg is valid. + + + + + a #GstSDPMessage + + + + + + Get the email with number @idx from @msg. + + + the email at position @idx. + + + + + a #GstSDPMessage + + + + an email index + + + + + + Get the information in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the encryption information from @msg. + + + a #GstSDPKey. + + + + + a #GstSDPMessage + + + + + + Get the media description at index @idx in @msg. + + + a #GstSDPMedia. + + + + + a #GstSDPMessage + + + + the index + + + + + + Get the origin of @msg. + + + a #GstSDPOrigin. The result remains valid as long as @msg is valid. + + + + + a #GstSDPMessage + + + + + + Get the phone with number @idx from @msg. + + + the phone at position @idx. + + + + + a #GstSDPMessage + + + + a phone index + + + + + + Get the session name in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get time information with index @idx from @msg. + + + a #GstSDPTime. + + + + + a #GstSDPMessage + + + + the time index + + + + + + Get the URI in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the version in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get time zone information with index @idx from @msg. + + + a #GstSDPZone. + + + + + a #GstSDPMessage + + + + the zone index + + + + + + Initialize @msg so that its contents are as if it was freshly allocated +with gst_sdp_message_new(). This function is mostly used to initialize a message +allocated on the stack. gst_sdp_message_uninit() undoes this operation. + +When this function is invoked on newly allocated data (with malloc or on the +stack), its contents should be set to 0 before calling this function. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Insert attribute into the array of attributes in @msg +at index @idx. +When -1 is given as @idx, the attribute is inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + a #GstSDPAttribute + + + + + + Insert bandwidth parameters into the array of bandwidths in @msg +at index @idx. +When -1 is given as @idx, the bandwidth is inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + the bandwidth + + + + + + Insert @email into the array of emails in @msg at index @idx. +When -1 is given as @idx, the email is inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + an email + + + + + + Insert @phone into the array of phone numbers in @msg at index @idx. +When -1 is given as @idx, the phone is inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + a phone + + + + + + Insert time parameters into the array of times in @msg +at index @idx. +When -1 is given as @idx, the times are inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + a #GstSDPTime + + + + + + Insert zone parameters into the array of zones in @msg +at index @idx. +When -1 is given as @idx, the zone is inserted at the end. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + a #GstSDPZone + + + + + + Get the number of media descriptions in @msg. + + + the number of media descriptions in @msg. + + + + + a #GstSDPMessage + + + + + + Creates a new #GstMIKEYMessage after parsing the key-mgmt attribute +from a #GstSDPMessage. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + pointer to new #GstMIKEYMessage + + + + + + Get the number of phones in @msg. + + + the number of phones in @msg. + + + + + a #GstSDPMessage + + + + + + Remove the attribute in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Remove the bandwidth information in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + + + Remove the email in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email index + + + + + + Remove the phone number in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + + + Remove the time information in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Remove the zone information in @msg at index @idx. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Replace the attribute in @msg at index @idx with @attr. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPAttribute + + + + + + Replace the bandwidth information in @msg at index @idx with @bw. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + the bandwidth + + + + + + Replace the email in @msg at index @idx with @email. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email index + + + + an email + + + + + + Replace the phone number in @msg at index @idx with @phone. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + a phone + + + + + + Replace the time information in @msg at index @idx with @t. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPTime + + + + + + Replace the zone information in @msg at index @idx with @zone. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPZone + + + + + + Configure the SDP connection in @msg with the given parameters. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + Set the information in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the information + + + + + + Adds the encryption information to @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the encryption type + + + + the encryption data + + + + + + Configure the SDP origin in @msg with the given parameters. + + + #GST_SDP_OK. + + + + + a #GstSDPMessage + + + + the user name + + + + a session id + + + + a session version + + + + a network type + + + + an address type + + + + an address + + + + + + Set the session name in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the session name + + + + + + Set the URI in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the URI + + + + + + Set the version in @msg. + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the version + + + + + + Get the number of time information entries in @msg. + + + the number of time information entries in @msg. + + + + + a #GstSDPMessage + + + + + + Free all resources allocated in @msg. @msg should not be used anymore after +this function. This function should be used when @msg was allocated on the +stack and initialized with gst_sdp_message_init(). + + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the number of time zone information entries in @msg. + + + the number of time zone information entries in @msg. + + + + + a #GstSDPMessage + + + + + + Creates a uri from @msg with the given @scheme. The uri has the format: + + \@scheme:///[#type=value *[&type=value]] + + Where each value is url encoded. + + + a uri for @msg. + + + + + the uri scheme + + + + the #GstSDPMessage + + + + + + Allocate a new GstSDPMessage and store the result in @msg. + + + a #GstSDPResult. + + + + + pointer to new #GstSDPMessage + + + + + + Parse @text and create a new SDPMessage from these. + + + a #GstSDPResult. + + + + + A dynamically allocated string representing the SDP description + + + + pointer to new #GstSDPMessage + + + + + + Parse the contents of @size bytes pointed to by @data and store the result in +@msg. + + + #GST_SDP_OK on success. + + + + + the start of the buffer + + + + + + the size of the buffer + + + + the result #GstSDPMessage + + + + + + Parse the null-terminated @uri and store the result in @msg. + +The uri should be of the form: + + scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] + [#type=value *[&type=value]] + + where value is url encoded. This looslely resembles + http://tools.ietf.org/html/draft-fujikawa-sdp-url-01 + + + #GST_SDP_OK on success. + + + + + the start of the uri + + + + the result #GstSDPMessage + + + + + + + The contents of the SDP "o=" field which gives the originator of the session +(their username and the address of the user's host) plus a session id and +session version number. + + + the user's login on the originating host, or it is "-" + if the originating host does not support the concept of user ids. + + + + is a numeric string such that the tuple of @username, @sess_id, + @nettype, @addrtype and @addr form a globally unique identifier for the + session. + + + + a version number for this announcement + + + + the type of network. "IN" is defined to have the meaning + "Internet". + + + + the type of @addr. + + + + the globally unique address of the machine from which the session was + created. + + + + + Return values for the SDP functions. + + + A successful return value + + + a function was given invalid parameters + + + + The contents of the SDP "t=" field which specify the start and stop times for +a conference session. + + + start time for the conference. The value is the decimal + representation of Network Time Protocol (NTP) time values in seconds + + + + stop time for the conference. The value is the decimal + representation of Network Time Protocol (NTP) time values in seconds + + + + repeat times for a session + + + + + + Reset the time information in @t. + + + a #GstSDPResult. + + + + + a #GstSDPTime + + + + + + Set time information @start, @stop and @repeat in @t. + + + a #GstSDPResult. + + + + + a #GstSDPTime + + + + the start time + + + + the stop time + + + + the repeat times + + + + + + + + + The contents of the SDP "z=" field which allows the sender to +specify a list of time zone adjustments and offsets from the base +time. + + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + Reset the zone information in @zone. + + + a #GstSDPResult. + + + + + a #GstSDPZone + + + + + + Set zone information in @zone. + + + a #GstSDPResult. + + + + + a #GstSDPZone + + + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + + + + The Application-Specific Maximum bandwidth modifier. + + + + + The Conference Total bandwidth modifier. + + + + + The extension prefix bandwidth modifier. + + + + + RTCP bandwidth allocated to data receivers (RFC 3556). + + + + + RTCP bandwidth allocated to active data senders (RFC 3556). + + + + + Transport Independent Application Specific Maximum bandwidth (RFC 3890). + + + + + + + + + + + + + + + + + + + The GstMIKEY helper functions makes it easy to parse and create MIKEY +messages. + + + Check if the given @addr is a multicast address. + + + TRUE when @addr is multicast. + + + + + a network type + + + + an address type + + + + an address + + + + + + Makes key management data + + + a #gchar key-mgmt data, + + + + + a #gchar URI + + + + a #gchar base64-encoded key data + + + + + + Allocate a new GstSDPMedia and store the result in @media. + + + a #GstSDPResult. + + + + + pointer to new #GstSDPMedia + + + + + + Mapping of caps to SDP fields: + +a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + +a=rtcp-fb:(payload) (param1) [param2]... + +a=extmap:(id)[/direction] (extensionname) (extensionattributes) + + + a #GstSDPResult. + + + + + a #GstCaps + + + + a #GstSDPMedia + + + + + + Creates a uri from @msg with the given @scheme. The uri has the format: + + \@scheme:///[#type=value *[&type=value]] + + Where each value is url encoded. + + + a uri for @msg. + + + + + the uri scheme + + + + the #GstSDPMessage + + + + + + Allocate a new GstSDPMessage and store the result in @msg. + + + a #GstSDPResult. + + + + + pointer to new #GstSDPMessage + + + + + + Parse @text and create a new SDPMessage from these. + + + a #GstSDPResult. + + + + + A dynamically allocated string representing the SDP description + + + + pointer to new #GstSDPMessage + + + + + + Parse the contents of @size bytes pointed to by @data and store the result in +@msg. + + + #GST_SDP_OK on success. + + + + + the start of the buffer + + + + + + the size of the buffer + + + + the result #GstSDPMessage + + + + + + Parse the null-terminated @uri and store the result in @msg. + +The uri should be of the form: + + scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] + [#type=value *[&type=value]] + + where value is url encoded. This looslely resembles + http://tools.ietf.org/html/draft-fujikawa-sdp-url-01 + + + #GST_SDP_OK on success. + + + + + the start of the uri + + + + the result #GstSDPMessage + + + + + + diff --git a/girs/GstTag-1.0.gir b/girs/GstTag-1.0.gir new file mode 100644 index 0000000000..eb10e2ba3f --- /dev/null +++ b/girs/GstTag-1.0.gir @@ -0,0 +1,2639 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AcoustID Fingerprint (Chromaprint) + + + + + AcoustID Identifier + + + + + Direction of contrast processing applied when capturing an image. (string) + +The allowed values are: + "normal" + "soft" + "hard" + + + + + Digital zoom ratio used when capturing an image. (double) + + + + + Exposure compensation using when capturing an image in EV. (double) + + + + + Exposure mode used when capturing an image. (string) + +The allowed values are: + "auto-exposure" + "manual-exposure" + "auto-bracket" + + + + + Type of exposure control used when capturing an image. (string) + +The allowed values are: + "undefined" + "manual" + "normal" - automatically controlled + "aperture-priority" - user selects aperture value + "shutter-priority" - user selects shutter speed + "creative" - biased towards depth of field + "action" - biased towards fast shutter speed + "portrait" - closeup, leaving background out of focus + "landscape" - landscape photos, background in focus + + + + + If flash was fired during the capture of an image. (boolean) + +Note that if this tag isn't present, it should not be assumed that +the flash did not fire. It should be treated as unknown. + + + + + The flash mode selected during the capture of an image. (string) + +The allowed values are: + "auto" + "always" + "never" + + + + + Focal length used when capturing an image, in mm. (double) + + + + + 35 mm equivalent focal length used when capturing an image, in mm. (double) + + + + + Focal ratio (f-number) used when capturing an image. (double) + +The value stored is the denominator of the focal ratio (f-number). +For example, if this tag value is 2, the focal ratio is f/2. + + + + + Gain adjustment applied to an image. (string) + +The allowed values are: + "none" + "low-gain-up" + "high-gain-up" + "low-gain-down" + "high-gain-down" + + + + + ISO speed used when capturing an image. (integer) + + + + + Defines the way a camera determines the exposure. (string) + +The allowed values are: + "unknown" + "average" + "center-weighted-average" + "spot" + "multi-spot" + "pattern" + "partial" + "other" + + + + + Direction of saturation processing applied when capturing an image. (string) + +The allowed values are: + "normal" + "low-saturation" + "high-saturation" + + + + + Scene mode used when capturing an image. (string) + +The allowed values are: + "standard" + "landscape" + "portrait" + "night-scene" + + + + + Direction of sharpness processing applied when capturing an image. (string) + +The allowed values are: + "normal" + "soft" + "hard" + + + + + Shutter speed used when capturing an image, in seconds. (fraction) + + + + + Indicates the source of capture. The device/medium used to do the +capture. (string) + +Allowed values are: + "dsc" (= digital still camera) + "transparent-scanner" + "reflex-scanner" + "other" + + + + + White balance mode used when capturing an image. (string) + +The allowed values are: + "auto" + "manual" + "daylight" + "cloudy" + "tungsten" + "fluorescent" + "fluorescent h" (newer daylight-calibrated fluorescents) + "flash" + + + + + CDDB disc id in its short form (e.g. 'aa063d0f') + + + + + CDDB disc id including all details + + + + + Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-') + + + + + Musicbrainz disc id details + + + + + Annodex CMML clip element tag + + + + + Annodex CMML head element tag + + + + + Annodex CMML stream element tag + + + + + + + + + + + + + + + + + + + ID3V2 header size considered minimum input for some functions such as +gst_tag_list_from_id3v2_tag() and gst_tag_get_id3v2_tag_size() for example. + + + + + Media (image/video) intended horizontal pixel density in ppi. (double) + + + + + Media (image/video) intended vertical pixel density in ppi. (double) + + + + + Musical key in which the sound starts. It is represented as a string +with a maximum length of three characters. The ground keys are +represented with "A","B","C","D","E", "F" and "G" and halfkeys +represented with "b" and "#". Minor is represented as "m" (e.g. "Dbm"). +Off key is represented with an "o" only. +This notation might be extended in the future to support non-minor/major +keys. + + + + + MusicBrainz album artist ID + + + + + MusicBrainz album ID + + + + + MusicBrainz artist ID + + + + + MusicBrainz Release Group ID + + + + + MusicBrainz Release Track ID + + + + + MusicBrainz track ID + + + + + MusicBrainz track TRM ID + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides a base class for demuxing tags at the beginning or end of a +stream and handles things like typefinding, querying, seeking, and +different modes of operation (chain-based, pull_range-based, and providing +downstream elements with random access if upstream supports that). The tag +is stripped from the output, and all offsets are adjusted for the tag +sizes, so that to the downstream element the stream will appear as if +there was no tag at all. Also, once the tag has been parsed, GstTagDemux +will try to determine the media type of the resulting stream and add a +source pad with the appropriate caps in order to facilitate auto-plugging. + +## Deriving from GstTagDemux + +Subclasses have to do four things: + + * In their base init function, they must add a pad template for the sink + pad to the element class, describing the media type they can parse in + the caps of the pad template. + * In their class init function, they must override + GST_TAG_DEMUX_CLASS(demux_klass)->identify_tag with their own identify + function. + * In their class init function, they must override + GST_TAG_DEMUX_CLASS(demux_klass)->parse_tag with their own parse + function. + * In their class init function, they must also set + GST_TAG_DEMUX_CLASS(demux_klass)->min_start_size and/or + GST_TAG_DEMUX_CLASS(demux_klass)->min_end_size to the minimum size required + for the identify function to decide whether the stream has a supported tag + or not. A class parsing ID3v1 tags, for example, would set min_end_size to + 128 bytes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + parent element + + + + + + + + + + + + + The #GstTagDemuxClass structure. See documentation at beginning of section +for details about what subclasses need to override and do. + + + the parent class. + + + + minimum size required to identify a tag at the start and +determine its total size. Set to 0 if not interested in start tags. +Subclasses should set this in their class_init function. + + + + minimum size required to identify a tag at the end and +determine its total size. Set to 0 if not interested in end tags. +Subclasses should set this in their class_init function. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Result values from the parse_tag virtual function. + + cannot parse tag, just skip it + + + call again with less or more data + + + parsed tag successfully + + + + Type of image contained in an image tag (specified as "image-type" field in +the info structure in the image's #GstSample) + + No image type. Can be used to + tell functions such as gst_tag_image_data_to_image_sample() that no + image type should be set. + + + Undefined/other image type + + + Cover (front) + + + Cover (back) + + + Leaflet page + + + Medium (e.g. label side of CD) + + + Lead artist/lead performer/soloist + + + Artist/performer + + + Conductor + + + Band/orchestra + + + Composer + + + Lyricist/text writer + + + Recording location + + + During recording + + + During performance + + + Movie/video screen capture + + + A fish as funny as the ID3v2 spec + + + Illustration + + + Band/artist logotype + + + Publisher/studio logotype + + + + See http://creativecommons.org/ns for more information. + + making multiple copies + is allowed + + + distribution, public display + and public performance are allowed + + + distribution of derivative + works is allowed + + + commercial derivatives are allowed, + but only non-commercial distribution is allowed + + + copyright and license notices + must be kept intact + + + credit must be given to + copyright holder and/or author + + + derivative works must be + licensed under the same terms or compatible terms as the original work + + + source code (the preferred + form for making modifications) must be provided when exercising some + rights granted by the license + + + derivative and combined works + must be licensed under specified terms, similar to those of the original + work + + + derivative works must be + licensed under specified terms, with at least the same conditions as + the original work; combinations with the work may be licensed under + different terms + + + exercising rights for + commercial purposes is prohibited + + + use in a + non-developing country is prohibited + + + this license was created + by the Creative Commons project + + + this license was + created by the Free Software Foundation (FSF) + + + + Provides a base class for adding tags at the beginning or end of a +stream. + +## Deriving from GstTagMux + +Subclasses have to do the following things: + + * In their base init function, they must add pad templates for the sink + pad and the source pad to the element class, describing the media type + they accept and output in the caps of the pad template. + * In their class init function, they must override the + GST_TAG_MUX_CLASS(mux_klass)->render_start_tag and/or + GST_TAG_MUX_CLASS(mux_klass)->render_end_tag vfuncs and set up a render + function. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + parent element + + + + + + + + + + + + + The #GstTagMuxClass structure. Subclasses need to override at least one +of the two render vfuncs. + + + the parent class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This interface is implemented by elements that are able to do XMP serialization. Examples for +such elements are #jifmux and #qtmux. + +Applications can use this interface to configure which XMP schemas should be used when serializing +tags into XMP. Schemas are represented by their names, a full list of the supported schemas can be +obtained from gst_tag_xmp_list_schemas(). By default, all schemas are used. + + + + Adds all available XMP schemas to the configuration. Meaning that +all will be used. + + + + + + + a #GstTagXmpWriter + + + + + + Adds @schema to the list schemas + + + + + + + a #GstTagXmpWriter + + + + the schema to be added + + + + + + Checks if @schema is going to be used + + + %TRUE if it is going to be used + + + + + a #GstTagXmpWriter + + + + the schema to test + + + + + + Removes all schemas from the list of schemas to use. Meaning that no +XMP will be generated. + + + + + + + a #GstTagXmpWriter + + + + + + Removes a schema from the list of schemas to use. Nothing is done if +the schema wasn't in the list + + + + + + + a #GstTagXmpWriter + + + + the schema to remove + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains additional standardized GStreamer tag definitions for plugins +and applications, and functions to register them with the GStreamer +tag system. + + + Contains utility function to parse #GstTagList<!-- -->s from exif +buffers and to create exif buffers from #GstTagList<!-- -->s + +Note that next IFD fields on the created exif buffers are set to 0. + + + Contains various utility functions for plugins to parse or create +ID3 tags and map ID3v2 identifiers to and from GStreamer identifiers. + + + Provides helper functions to convert between the various ISO-639 language +codes, and to map language codes to language names. + + + Provides information about Creative Commons media licenses, which are +often expressed in media files as a license URI in tags. Also useful +for applications creating media files, in case the user wants to license +the content under a Creative Commons license. + + + Contains various utility functions for plugins to parse or create +vorbiscomments and map them to and from #GstTagList<!-- -->s. + + + Contains various utility functions for plugins to parse or create +xmp packets and map them to and from #GstTagList<!-- -->s. + +Please note that the xmp parser is very lightweight and not strict at all. + + + Check if a given string contains a known ISO 639 language code. + +This is useful in situations where it's not clear whether a given +string is a language code (which should be put into a #GST_TAG_LANGUAGE_CODE +tag) or a free-form language name descriptor (which should be put into a +#GST_TAG_LANGUAGE_NAME tag instead). + + + TRUE if the two- or three-letter language code in @lang_code + is a valid ISO-639 language code. + + + + + ISO-639 language code (e.g. "deu" or "ger" or "de") + + + + + + Convenience function to read a string with unknown character encoding. If +the string is already in UTF-8 encoding, it will be returned right away. +If not it tries to detect byte-order-mark for UTF-16/32 cases and use that. +Otherwise, the environment will be searched for a number of environment +variables (whose names are specified in the NULL-terminated string array +@env_vars) containing a list of character encodings to try/use. If none +are specified, the current locale will be tried. If that also doesn't work, +WINDOWS-1252/ISO-8859-1 is assumed (which will almost always succeed). + + + a newly-allocated string in UTF-8 encoding, or NULL + + + + + string data + + + + + + length of string data, or -1 if the string is NUL-terminated + + + + + a NULL-terminated string array of environment variable names, or NULL + + + + + + + + Looks up the GStreamer tag for a ID3v2 tag. + + + The corresponding GStreamer tag or NULL if none exists. + + + + + ID3v2 tag to convert to GStreamer tag + + + + + + Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in +TXXX frame or owner in UFID frame). + + + The corresponding GStreamer tag or NULL if none exists. + + + + + the type of ID3v2 user tag (e.g. "TXXX" or "UDIF") + + + + ID3v2 user tag to convert to GStreamer tag + + + + + + Looks up the GStreamer tag for a vorbiscomment tag. + + + The corresponding GStreamer tag or NULL if none exists. + + + + + vorbiscomment tag to convert to GStreamer tag + + + + + + Determines size of an ID3v2 tag on buffer containing at least ID3v2 header, +i.e. at least #GST_TAG_ID3V2_HEADER_SIZE (10) bytes; + + + Size of tag, or 0 if header is invalid or too small. + + + + + buffer holding ID3v2 tag (or at least the start of one) + + + + + + Convenience macro wrapping gst_tag_get_language_code_iso_639_1(). + + + + ISO-639 language code (e.g. "deu" or "ger" or "de") + + + + + Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 +language code or two-letter ISO-639-1 language code (both are accepted for +convenience). + +Language codes are case-sensitive and expected to be lower case. + + + two-letter ISO-639-1 language code string that maps to @lang_code, + or NULL if no mapping is known. The returned string must not be + modified or freed. + + + + + ISO-639 language code (e.g. "deu" or "ger" or "de") + + + + + + Returns three-letter ISO-639-2 "bibliographic" language code given a +two-letter ISO-639-1 language code or a three-letter ISO-639-2 language +code (both are accepted for convenience). + +The "bibliographic" code is derived from the English name of the language +(e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the +"terminological" codes are preferred. + +Language codes are case-sensitive and expected to be lower case. + + + three-letter ISO-639-2 language code string that maps to @lang_code, + or NULL if no mapping is known. The returned string must not be + modified or freed. + + + + + ISO-639 language code (e.g. "deu" or "ger" or "de") + + + + + + Returns three-letter ISO-639-2 "terminological" language code given a +two-letter ISO-639-1 language code or a three-letter ISO-639-2 language +code (both are accepted for convenience). + +The "terminological" code is derived from the local name of the language +(e.g. "deu" for German instead of "ger"). In most scenarios, the +"terminological" codes are preferred over the "bibliographic" ones. + +Language codes are case-sensitive and expected to be lower case. + + + three-letter ISO-639-2 language code string that maps to @lang_code, + or NULL if no mapping is known. The returned string must not be + modified or freed. + + + + + ISO-639 language code (e.g. "deu" or "ger" or "de") + + + + + + Returns a list of known language codes (in form of two-letter ISO-639-1 +codes). This is useful for UIs to build a list of available languages for +tagging purposes (e.g. to tag an audio track appropriately in a video or +audio editor). + + + NULL-terminated string array with two-letter + language codes. Free with g_strfreev() when no longer needed. + + + + + + + Returns the name of the language given an ISO-639 language code as +found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated +according to the current locale (if the library was built against the +iso-codes package, otherwise the English name will be returned). + +Language codes are case-sensitive and expected to be lower case. + + + language name in UTF-8 format, or NULL if @language_code could + not be mapped to a language name. The returned string must not be + modified and does not need to freed; it will stay valid until the + application is terminated. + + + + + two or three-letter ISO-639 language code + + + + + + Get the description of a license, which is a translated description +of the license's main features. + + + the description of the license, or NULL if the license is unknown + or a description is not available. + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Get the flags of a license, which describe most of the features of +a license in their most general form. + + + the flags of the license, or 0 if the license is unknown + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Get the jurisdiction code of a license. This is usually a two-letter +ISO 3166-1 alpha-2 code, but there is also the special case of Scotland, +for which no code exists and which is thus represented as "scotland". + +Known jurisdictions: ar, at, au, be, bg, br, ca, ch, cl, cn, co, de, +dk, es, fi, fr, hr, hu, il, in, it, jp, kr, mk, mt, mx, my, nl, pe, pl, +pt, scotland, se, si, tw, uk, us, za. + + + the jurisdiction code of the license, or NULL if the license is + unknown or is not specific to a particular jurisdiction. + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Get the nick name of a license, which is a short (untranslated) string +such as e.g. "CC BY-NC-ND 2.0 UK". + + + the nick name of the license, or NULL if the license is unknown + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Get the title of a license, which is a short translated description +of the license's features (generally not very pretty though). + + + the title of the license, or NULL if the license is unknown or + no title is available. + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Get the version of a license. + + + the version of the license, or NULL if the license is not known or + has no version + + + + + a license reference string in form of a URI, + e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/" + + + + + + Returns a list of known license references (in form of URIs). This is +useful for UIs to build a list of available licenses for tagging purposes +(e.g. to tag an audio track appropriately in a video or audio editor, or +an image in a camera application). + + + NULL-terminated array of license strings. Free + with g_strfreev() when no longer needed. + + + + + + + Gets the number of ID3v1 genres that can be identified. Winamp genres are +included. + + + the number of ID3v1 genres that can be identified + + + + + Gets the ID3v1 genre name for a given ID. + + + the genre or NULL if no genre is associated with that ID. + + + + + ID of genre to query + + + + + + Helper function for tag-reading plugins to create a #GstSample suitable to +add to a #GstTagList as an image tag (such as #GST_TAG_IMAGE or +#GST_TAG_PREVIEW_IMAGE) from the encoded image data and an (optional) image +type. + +Background: cover art and other images in tags are usually stored as a +blob of binary image data, often accompanied by a MIME type or some other +content type string (e.g. 'png', 'jpeg', 'jpg'). Sometimes there is also an +'image type' to indicate what kind of image this is (e.g. front cover, +back cover, artist, etc.). The image data may also be an URI to the image +rather than the image itself. + +In GStreamer, image tags are #GstSample<!-- -->s containing the raw image +data, with the sample caps describing the content type of the image +(e.g. image/jpeg, image/png, text/uri-list). The sample info may contain +an additional 'image-type' field of #GstTagImageType to describe +the type of image (front cover, back cover etc.). #GST_TAG_PREVIEW_IMAGE +tags should not carry an image type, their type is already indicated via +the special tag name. + +This function will do various checks and typefind the encoded image +data (we can't trust the declared mime type). + + + a newly-allocated image sample for use in tag lists, or NULL + + + + + the (encoded) image + + + + + + the length of the encoded image data at @image_data + + + + type of the image, or #GST_TAG_IMAGE_TYPE_UNDEFINED. Pass + #GST_TAG_IMAGE_TYPE_NONE if no image type should be set at all (e.g. + for preview images) + + + + + + Adds an image from an ID3 APIC frame (or similar, such as used in FLAC) +to the given tag list. Also see gst_tag_image_data_to_image_sample() for +more information on image tags in GStreamer. + + + %TRUE if the image was processed, otherwise %FALSE + + + + + a tag list + + + + the (encoded) image + + + + + + the length of the encoded image data at @image_data + + + + picture type as per the ID3 (v2.4.0) specification for + the APIC frame (0 = unknown/other) + + + + + + Parses the IFD and IFD tags data contained in the buffer and puts it +on a taglist. The base_offset is used to subtract from the offset in +the tag entries and be able to get the offset relative to the buffer +start + + + The parsed taglist + + + + + The exif buffer + + + + byte order of the data + + + + Offset from the tiff header to this buffer + + + + + + Parses the exif tags starting with a tiff header structure. + + + The taglist + + + + + The exif buffer + + + + + + Creates a new tag list that contains the information parsed out of a +ID3 tag. + + + A new #GstTagList with all tags that could be extracted from the + given vorbiscomment buffer or NULL on error. + + + + + buffer to convert + + + + + + Creates a new tag list that contains the information parsed out of a +vorbiscomment packet. + + + A new #GstTagList with all tags that could be extracted from the + given vorbiscomment buffer or NULL on error. + + + + + data to convert + + + + + + size of @data + + + + identification data at start of stream + + + + + + length of identification data + + + + pointer to a string that should take the + vendor string of this vorbis comment or NULL if you don't need it. + + + + + + Creates a new tag list that contains the information parsed out of a +vorbiscomment packet. + + + A new #GstTagList with all tags that could be extracted from the + given vorbiscomment buffer or NULL on error. + + + + + buffer to convert + + + + identification data at start of stream + + + + + + length of identification data + + + + pointer to a string that should take the + vendor string of this vorbis comment or NULL if you don't need it. + + + + + + Parse a xmp packet into a taglist. + + + new taglist or %NULL, free the list when done + + + + + buffer + + + + + + Parses the data containing an ID3v1 tag and returns a #GstTagList from the +parsed data. + + + A new tag list or NULL if the data was not an ID3v1 tag. + + + + + 128 bytes of data containing the ID3v1 tag + + + + + + + + Formats the tags in taglist on exif format. The resulting buffer contains +the tags IFD and is followed by the data pointed by the tag entries. + + + A GstBuffer containing the tag entries followed by the tag data + + + + + The taglist + + + + byte order used in writing (G_LITTLE_ENDIAN or G_BIG_ENDIAN) + + + + Offset from the tiff header first byte + + + + + + Formats the tags in taglist into exif structure, a tiff header +is put in the beginning of the buffer. + + + A GstBuffer containing the data + + + + + The taglist + + + + + + Creates a new vorbiscomment buffer from a tag list. + + + A new #GstBuffer containing a vorbiscomment buffer with all tags + that could be converted from the given tag list. + + + + + tag list to convert + + + + identification data at start of stream + + + + + + length of identification data, may be 0 if @id_data is NULL + + + + string that describes the vendor string or NULL + + + + + + Formats a taglist as a xmp packet using only the selected +schemas. An empty list (%NULL) means that all schemas should +be used + + + new buffer or %NULL, unref the buffer when done + + + + + tags + + + + does the container forbid inplace editing + + + + + %NULL terminated array of schemas to be used on serialization + + + + + + + + Convenience function to parse a GST_TAG_EXTENDED_COMMENT string and +separate it into its components. + +If successful, @key, @lang and/or @value will be set to newly allocated +strings that you need to free with g_free() when done. @key and @lang +may also be set to NULL by this function if there is no key or no language +code in the extended comment string. + + + TRUE if the string could be parsed, otherwise FALSE + + + + + an extended comment string, see #GST_TAG_EXTENDED_COMMENT + + + + + return location for the comment description key, or NULL + + + + + return location for the comment ISO-639 language code, or NULL + + + + return location for the actual comment string, or NULL + + + + whether to fail if strings are not in key=value form + + + + + + Registers additional musicbrainz-specific tags with the GStreamer tag +system. Plugins and applications that use these tags should call this +function before using them. Can be called multiple times. + + + + + + + Looks up the ID3v2 tag for a GStreamer tag. + + + The corresponding ID3v2 tag or NULL if none exists. + + + + + GStreamer tag to convert to vorbiscomment tag + + + + + + Creates a new tag list that contains the information parsed out of a +vorbiscomment packet. + + + A #GList of newly-allocated + key=value strings. Free with g_list_foreach (list, (GFunc) g_free, NULL) + plus g_list_free (list) + + + + + + + a #GstTagList + + + + a GStreamer tag identifier, such as #GST_TAG_ARTIST + + + + + + Looks up the vorbiscomment tag for a GStreamer tag. + + + The corresponding vorbiscomment tag or NULL if none exists. + + + + + GStreamer tag to convert to vorbiscomment tag + + + + + + Gets the list of supported schemas in the xmp lib + + + a %NULL terminated array of strings with the + schema names + + + + + + + Convenience function using gst_tag_from_vorbis_tag(), parsing +a vorbis comment string into the right type and adding it to the +given taglist @list. + +Unknown vorbiscomment tags will be added to the tag list in form +of a #GST_TAG_EXTENDED_COMMENT. + + + + + + + a #GstTagList + + + + a vorbiscomment tag string (key in key=value), must be valid UTF-8 + + + + a vorbiscomment value string (value in key=value), must be valid UTF-8 + + + + + + diff --git a/girs/GstVideo-1.0.gir b/girs/GstVideo-1.0.gir new file mode 100644 index 0000000000..1a579da007 --- /dev/null +++ b/girs/GstVideo-1.0.gir @@ -0,0 +1,25578 @@ + + + + + + + + + + + + + + A bufferpool option to enable extra padding. When a bufferpool supports this +option, gst_buffer_pool_config_set_video_alignment() can be called. + +When this option is enabled on the bufferpool, +#GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled. + + + + + An option that can be activated on a bufferpool to request gl texture upload +meta on buffers from the pool. + +When this option is enabled on the bufferpool, +@GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled. + + + + + An option that can be activated on bufferpool to request video metadata +on buffers from the pool. + + + + + Name of the caps feature indicating that the stream is interlaced. + +Currently it is only used for video with 'interlace-mode=alternate' +to ensure backwards compatibility for this new mode. +In this mode each buffer carries a single field of interlaced video. +@GST_VIDEO_BUFFER_FLAG_TOP_FIELD and @GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD +indicate whether the buffer carries a top or bottom field. The order of +buffers/fields in the stream and the timestamps on the buffers indicate the +temporal order of the fields. +Top and bottom fields are expected to alternate in this mode. +The frame rate in the caps still signals the frame rate, so the notional field +rate will be twice the frame rate from the caps +(see @GST_VIDEO_INFO_FIELD_RATE_N). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This interface is implemented by elements which can perform some color +balance operation on video frames they process. For example, modifying +the brightness, contrast, hue or saturation. + +Example elements are 'xvimagesink' and 'colorbalance' + + + Get the #GstColorBalanceType of this implementation. + + + A the #GstColorBalanceType. + + + + + The #GstColorBalance implementation + + + + + + Retrieve the current value of the indicated channel, between min_value +and max_value. + +See Also: The #GstColorBalanceChannel.min_value and + #GstColorBalanceChannel.max_value members of the + #GstColorBalanceChannel object. + + + The current value of the channel. + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + + + Retrieve a list of the available channels. + + + A + GList containing pointers to #GstColorBalanceChannel + objects. The list is owned by the #GstColorBalance + instance and must not be freed. + + + + + + + A #GstColorBalance instance + + + + + + Sets the current value of the channel to the passed value, which must +be between min_value and max_value. + +See Also: The #GstColorBalanceChannel.min_value and + #GstColorBalanceChannel.max_value members of the + #GstColorBalanceChannel object. + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + The new value for the channel. + + + + + + A helper function called by implementations of the GstColorBalance +interface. It fires the #GstColorBalance::value-changed signal on the +instance, and the #GstColorBalanceChannel::value-changed signal on the +channel object. + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel whose value has changed + + + + The new value of the channel + + + + + + Get the #GstColorBalanceType of this implementation. + + + A the #GstColorBalanceType. + + + + + The #GstColorBalance implementation + + + + + + Retrieve the current value of the indicated channel, between min_value +and max_value. + +See Also: The #GstColorBalanceChannel.min_value and + #GstColorBalanceChannel.max_value members of the + #GstColorBalanceChannel object. + + + The current value of the channel. + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + + + Retrieve a list of the available channels. + + + A + GList containing pointers to #GstColorBalanceChannel + objects. The list is owned by the #GstColorBalance + instance and must not be freed. + + + + + + + A #GstColorBalance instance + + + + + + Sets the current value of the channel to the passed value, which must +be between min_value and max_value. + +See Also: The #GstColorBalanceChannel.min_value and + #GstColorBalanceChannel.max_value members of the + #GstColorBalanceChannel object. + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + The new value for the channel. + + + + + + A helper function called by implementations of the GstColorBalance +interface. It fires the #GstColorBalance::value-changed signal on the +instance, and the #GstColorBalanceChannel::value-changed signal on the +channel object. + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel whose value has changed + + + + The new value of the channel + + + + + + Fired when the value of the indicated channel has changed. + + + + + + The #GstColorBalanceChannel + + + + The new value + + + + + + + The #GstColorBalanceChannel object represents a parameter +for modifying the color balance implemented by an element providing the +#GstColorBalance interface. For example, Hue or Saturation. + + + + + + + + + + + + + + + + + + + + A string containing a descriptive name for this channel + + + + The minimum valid value for this channel. + + + + The maximum valid value for this channel. + + + + + + + + + Fired when the value of the indicated channel has changed. + + + + + + The new value + + + + + + + Color-balance channel class. + + + the parent class + + + + + + + + + + + + + + + + + + + + + + + + + + Color-balance interface. + + + the parent interface + + + + + + + A + GList containing pointers to #GstColorBalanceChannel + objects. The list is owned by the #GstColorBalance + instance and must not be freed. + + + + + + + A #GstColorBalance instance + + + + + + + + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + The new value for the channel. + + + + + + + + + + The current value of the channel. + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel instance + + + + + + + + + + A the #GstColorBalanceType. + + + + + The #GstColorBalance implementation + + + + + + + + + + + + + + A #GstColorBalance instance + + + + A #GstColorBalanceChannel whose value has changed + + + + The new value of the channel + + + + + + + + + + + + + An enumeration indicating whether an element implements color balancing +operations in software or in dedicated hardware. In general, dedicated +hardware implementations (such as those provided by xvimagesink) are +preferred. + + Color balance is implemented with dedicated + hardware. + + + Color balance is implemented via software + processing. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This metadata stays relevant as long as video colorspace is unchanged. + + + + + This metadata stays relevant as long as video orientation is unchanged. + + + + + This metadata stays relevant as long as video size is unchanged. + + + + + This metadata is relevant for video streams. + + + + + + + + + + + + + + + + + + + The Navigation interface is used for creating and injecting navigation related +events such as mouse button presses, cursor motion and key presses. The associated +library also provides methods for parsing received events, and for sending and +receiving navigation related bus events. One main usecase is DVD menu navigation. + +The main parts of the API are: + +* The GstNavigation interface, implemented by elements which provide an application + with the ability to create and inject navigation events into the pipeline. +* GstNavigation event handling API. GstNavigation events are created in response to + calls on a GstNavigation interface implementation, and sent in the pipeline. Upstream + elements can use the navigation event API functions to parse the contents of received + messages. + +* GstNavigation message handling API. GstNavigation messages may be sent on the message + bus to inform applications of navigation related changes in the pipeline, such as the + mouse moving over a clickable region, or the set of available angles changing. + +The GstNavigation message functions provide functions for creating and parsing +custom bus messages for signaling GstNavigation changes. + + + Inspect a #GstEvent and return the #GstNavigationEventType of the event, or +#GST_NAVIGATION_EVENT_INVALID if the event is not a #GstNavigation event. + + + + + + + A #GstEvent to inspect. + + + + + + Inspect a #GstNavigation command event and retrieve the enum value of the +associated command. + + + TRUE if the navigation command could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to GstNavigationCommand to receive the + type of the navigation event. + + + + + + + + + + + + A #GstEvent to inspect. + + + + A pointer to a location to receive + the string identifying the key press. The returned string is owned by the + event, and valid only until the event is unreffed. + + + + + + Retrieve the details of either a #GstNavigation mouse button press event or +a mouse button release event. Determine which type the event is using +gst_navigation_event_get_type() to retrieve the #GstNavigationEventType. + + + TRUE if the button number and both coordinates could be extracted, + otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gint that will receive the button + number associated with the event. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse button event. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse button event. + + + + + + Inspect a #GstNavigation mouse movement event and extract the coordinates +of the event. + + + TRUE if both coordinates could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse movement. + + + + + + Inspect a #GstNavigation mouse scroll event and extract the coordinates +of the event. + + + TRUE if all coordinates could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the delta_x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the delta_y coordinate of the + mouse movement. + + + + + + Check a bus message to see if it is a #GstNavigation event, and return +the #GstNavigationMessageType identifying the type of the message if so. + + + The type of the #GstMessage, or +#GST_NAVIGATION_MESSAGE_INVALID if the message is not a #GstNavigation +notification. + + + + + A #GstMessage to inspect. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_ANGLES_CHANGED for notifying an application +that the current angle, or current number of angles available in a +multiangle video has changed. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + The currently selected angle. + + + + The number of viewing angles now available. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_EVENT. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + A navigation #GstEvent + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_MOUSE_OVER. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + %TRUE if the mouse has entered a clickable area of the display. +%FALSE if it over a non-clickable area. + + + + + + Parse a #GstNavigation message of type GST_NAVIGATION_MESSAGE_ANGLES_CHANGED +and extract the @cur_angle and @n_angles parameters. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + A pointer to a #guint to receive the new + current angle number, or NULL + + + + A pointer to a #guint to receive the new angle + count, or NULL. + + + + + + Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_EVENT +and extract contained #GstEvent. The caller must unref the @event when done +with it. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + a pointer to a #GstEvent to receive + the contained navigation event. + + + + + + Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_MOUSE_OVER +and extract the active/inactive flag. If the mouse over event is marked +active, it indicates that the mouse is over a clickable area. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + A pointer to a gboolean to receive the + active/inactive state, or NULL. + + + + + + Inspect a #GstQuery and return the #GstNavigationQueryType associated with +it if it is a #GstNavigation query. + + + The #GstNavigationQueryType of the query, or +#GST_NAVIGATION_QUERY_INVALID + + + + + The query to inspect + + + + + + Create a new #GstNavigation angles query. When executed, it will +query the pipeline for the set of currently available angles, which may be +greater than one in a multiangle video. + + + The new query. + + + + + Create a new #GstNavigation commands query. When executed, it will +query the pipeline for the set of currently available commands. + + + The new query. + + + + + Parse the current angle number in the #GstNavigation angles @query into the +#guint pointed to by the @cur_angle variable, and the number of available +angles into the #guint pointed to by the @n_angles variable. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + Pointer to a #guint into which to store the + currently selected angle value from the query, or NULL + + + + Pointer to a #guint into which to store the + number of angles value from the query, or NULL + + + + + + Parse the number of commands in the #GstNavigation commands @query. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + the number of commands in this query. + + + + + + Parse the #GstNavigation command query and retrieve the @nth command from +it into @cmd. If the list contains less elements than @nth, @cmd will be +set to #GST_NAVIGATION_COMMAND_INVALID. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + the nth command to retrieve. + + + + a pointer to store the nth command into. + + + + + + Set the #GstNavigation angles query result field in @query. + + + + + + + a #GstQuery + + + + the current viewing angle to set. + + + + the number of viewing angles to set. + + + + + + Set the #GstNavigation command query result fields in @query. The number +of commands passed must be equal to @n_commands. + + + + + + + a #GstQuery + + + + the number of commands to set. + + + + A list of @GstNavigationCommand values, @n_cmds entries long. + + + + + + Set the #GstNavigation command query result fields in @query. The number +of commands passed must be equal to @n_commands. + + + + + + + a #GstQuery + + + + the number of commands to set. + + + + An array containing @n_cmds + @GstNavigationCommand values. + + + + + + + + + + + + + + + + + + + + + + Sends the indicated command to the navigation interface. + + + + + + + The navigation interface instance + + + + The command to issue + + + + + + + + + + + + + + + + + + + + + + + + + + The navigation interface instance + + + + The type of the key event. Recognised values are "key-press" and +"key-release" + + + + Character representation of the key. This is typically as produced +by XKeysymToString. + + + + + + Sends a mouse event to the navigation interface. Mouse event coordinates +are sent relative to the display space of the related output area. This is +usually the size in pixels of the window associated with the element +implementing the #GstNavigation interface. + + + + + + + The navigation interface instance + + + + The type of mouse event, as a text string. Recognised values are +"mouse-button-press", "mouse-button-release" and "mouse-move". + + + + The button number of the button being pressed or released. Pass 0 +for mouse-move events. + + + + The x coordinate of the mouse event. + + + + The y coordinate of the mouse event. + + + + + + Sends a mouse scroll event to the navigation interface. Mouse event coordinates +are sent relative to the display space of the related output area. This is +usually the size in pixels of the window associated with the element +implementing the #GstNavigation interface. + + + + + + + The navigation interface instance + + + + The x coordinate of the mouse event. + + + + The y coordinate of the mouse event. + + + + The delta_x coordinate of the mouse event. + + + + The delta_y coordinate of the mouse event. + + + + + + + A set of commands that may be issued to an element providing the +#GstNavigation interface. The available commands can be queried via +the gst_navigation_query_new_commands() query. + +For convenience in handling DVD navigation, the MENU commands are aliased as: + GST_NAVIGATION_COMMAND_DVD_MENU = @GST_NAVIGATION_COMMAND_MENU1 + GST_NAVIGATION_COMMAND_DVD_TITLE_MENU = @GST_NAVIGATION_COMMAND_MENU2 + GST_NAVIGATION_COMMAND_DVD_ROOT_MENU = @GST_NAVIGATION_COMMAND_MENU3 + GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU = @GST_NAVIGATION_COMMAND_MENU4 + GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU = @GST_NAVIGATION_COMMAND_MENU5 + GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU = @GST_NAVIGATION_COMMAND_MENU6 + GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU = @GST_NAVIGATION_COMMAND_MENU7 + + An invalid command entry + + + Execute navigation menu command 1. For DVD, +this enters the DVD root menu, or exits back to the title from the menu. + + + Execute navigation menu command 2. For DVD, +this jumps to the DVD title menu. + + + Execute navigation menu command 3. For DVD, +this jumps into the DVD root menu. + + + Execute navigation menu command 4. For DVD, +this jumps to the Subpicture menu. + + + Execute navigation menu command 5. For DVD, +the jumps to the audio menu. + + + Execute navigation menu command 6. For DVD, +this jumps to the angles menu. + + + Execute navigation menu command 7. For DVD, +this jumps to the chapter menu. + + + Select the next button to the left in a menu, +if such a button exists. + + + Select the next button to the right in a menu, +if such a button exists. + + + Select the button above the current one in a +menu, if such a button exists. + + + Select the button below the current one in a +menu, if such a button exists. + + + Activate (click) the currently selected +button in a menu, if such a button exists. + + + Switch to the previous angle in a +multiangle feature. + + + Switch to the next angle in a multiangle +feature. + + + + Enum values for the various events that an element implementing the +GstNavigation interface might send up the pipeline. + + Returned from +gst_navigation_event_get_type() when the passed event is not a navigation event. + + + A key press event. Use +gst_navigation_event_parse_key_event() to extract the details from the event. + + + A key release event. Use +gst_navigation_event_parse_key_event() to extract the details from the event. + + + A mouse button press event. Use +gst_navigation_event_parse_mouse_button_event() to extract the details from the +event. + + + A mouse button release event. Use +gst_navigation_event_parse_mouse_button_event() to extract the details from the +event. + + + A mouse movement event. Use +gst_navigation_event_parse_mouse_move_event() to extract the details from the +event. + + + A navigation command event. Use +gst_navigation_event_parse_command() to extract the details from the event. + + + A mouse scroll event. Use +gst_navigation_event_parse_mouse_scroll_event() to extract the details from +the event. (Since: 1.18) + + + + Navigation interface. + + + the parent interface + + + + + + + + + + + + + + + + + + + + + A set of notifications that may be received on the bus when navigation +related status changes. + + Returned from +gst_navigation_message_get_type() when the passed message is not a +navigation message. + + + Sent when the mouse moves over or leaves a +clickable region of the output, such as a DVD menu button. + + + Sent when the set of available commands +changes and should re-queried by interested applications. + + + Sent when display angles in a multi-angle +feature (such as a multiangle DVD) change - either angles have appeared or +disappeared. + + + Sent when a navigation event was not handled +by any element in the pipeline (Since: 1.6) + + + + Types of navigation interface queries. + + invalid query + + + command query + + + viewing angle query + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the #GstVideoAncillaryDID16 of the ancillary data. + + + + a #GstVideoAncillary + + + + + Check if GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD is set on @buf (Since: 1.18). + + + + a #GstBuffer + + + + + Check if GST_VIDEO_BUFFER_FLAG_TOP_FIELD is set on @buf (Since: 1.18). + + + + a #GstBuffer + + + + + + + + + + + + + + + + + + + Generic caps string for video, for use in pad templates. + + + + string format that describes the pixel layout, as string + (e.g. "I420", "RGB", "YV12", "YUY2", "AYUV", etc.) + + + + + Generic caps string for video, for use in pad templates. + + + + Requires caps features as a string, e.g. + "memory:SystemMemory". + + + string format that describes the pixel layout, as string + (e.g. "I420", "RGB", "YV12", "YUY2", "AYUV", etc.) + + + + + The entire set of flags for the @frame + + + + a #GstVideoCodecFrame + + + + + Checks whether the given @flag is set + + + + a #GstVideoCodecFrame + + + a flag to check for + + + + + This macro sets the given bits + + + + a #GstVideoCodecFrame + + + Flag to set, can be any number of bits in guint32. + + + + + This macro usets the given bits. + + + + a #GstVideoCodecFrame + + + Flag to unset + + + + + Tests if the buffer should only be decoded but not sent downstream. + + + + a #GstVideoCodecFrame + + + + + Tests if the frame must be encoded as a keyframe. Applies only to +frames provided to encoders. Decoders can safely ignore this field. + + + + a #GstVideoCodecFrame + + + + + Tests if encoder should output stream headers before outputting the +resulting encoded buffer for the given frame. + +Applies only to frames provided to encoders. Decoders can safely +ignore this field. + + + + a #GstVideoCodecFrame + + + + + Tests if the frame is a synchronization point (like a keyframe). + +Decoder implementations can use this to detect keyframes. + + + + a #GstVideoCodecFrame + + + + + Sets the buffer to not be sent downstream. + +Decoder implementation can use this if they have frames that +are not meant to be displayed. + +Encoder implementation can safely ignore this field. + + + + a #GstVideoCodecFrame + + + + + + + + + + + + + + + + + + + Sets the frame to be a synchronization point (like a keyframe). + +Encoder implementations should set this accordingly. + +Decoder implementing parsing features should set this when they +detect such a synchronization point. + + + + a #GstVideoCodecFrame + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstVideoAlphaMode, the alpha mode to use. +Default is #GST_VIDEO_ALPHA_MODE_COPY. + + + + + #G_TYPE_DOUBLE, the alpha color value to use. +Default to 1.0 + + + + + #G_TYPE_UINT, the border color to use if #GST_VIDEO_CONVERTER_OPT_FILL_BORDER +is set to %TRUE. The color is in ARGB format. +Default 0xff000000 + + + + + #GstVideoChromaMode, set the chroma resample mode subsampled +formats. Default is #GST_VIDEO_CHROMA_MODE_FULL. + + + + + #GstVideoChromaMethod, The resampler method to use for +chroma resampling. Other options for the resampler can be used, see +the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_LINEAR + + + + + #G_TYPE_INT, height in the destination frame, default destination height + + + + + #G_TYPE_INT, width in the destination frame, default destination width + + + + + #G_TYPE_INT, x position in the destination frame, default 0 + + + + + #G_TYPE_INT, y position in the destination frame, default 0 + + + + + #GstVideoDitherMethod, The dither method to use when +changing bit depth. +Default is #GST_VIDEO_DITHER_BAYER. + + + + + #G_TYPE_UINT, The quantization amount to dither to. Components will be +quantized to multiples of this value. +Default is 1 + + + + + #G_TYPE_BOOLEAN, if the destination rectangle does not fill the complete +destination image, render a border with +#GST_VIDEO_CONVERTER_OPT_BORDER_ARGB. Otherwise the unusded pixels in the +destination are untouched. Default %TRUE. + + + + + #GstVideoGammaMode, set the gamma mode. +Default is #GST_VIDEO_GAMMA_MODE_NONE. + + + + + #GstVideoMatrixMode, set the color matrix conversion mode for +converting between Y'PbPr and non-linear RGB (R'G'B'). +Default is #GST_VIDEO_MATRIX_MODE_FULL. + + + + + #GstVideoPrimariesMode, set the primaries conversion mode. +Default is #GST_VIDEO_PRIMARIES_MODE_NONE. + + + + + #GstVideoResamplerMethod, The resampler method to use for +resampling. Other options for the resampler can be used, see +the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_CUBIC + + + + + #G_TYPE_UINT, The number of taps for the resampler. +Default is 0: let the resampler choose a good value. + + + + + #G_TYPE_INT, source height to convert, default source height + + + + + #G_TYPE_INT, source width to convert, default source width + + + + + #G_TYPE_INT, source x position to start conversion, default 0 + + + + + #G_TYPE_INT, source y position to start conversion, default 0 + + + + + #G_TYPE_UINT, maximum number of threads to use. Default 1, 0 for the number +of cores. + + + + + + + + + + + + + + + + + + + + + + + + + + Utility function that video decoder elements can use in case they encountered +a data processing error that may be fatal for the current "data unit" but +need not prevent subsequent decoding. Such errors are counted and if there +are too many, as configured in the context's max_errors, the pipeline will +post an error message and the application will be requested to stop further +media processing. Otherwise, it is considered a "glitch" and only a warning +is logged. In either case, @ret is set to the proper value to +return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK). + + + + the base video decoder element that generates the error + + + element defined weight of the error, added to error count + + + like CORE, LIBRARY, RESOURCE or STREAM (see #gstreamer-GstGError) + + + error code defined for that domain (see #gstreamer-GstGError) + + + the message to display (format string and args enclosed in + parentheses) + + + debugging information for the message (format string and args + enclosed in parentheses) + + + variable to receive return value + + + + + + + + + + + + Gives the segment of the element. + + + + base decoder instance + + + + + Default maximum number of errors tolerated before signaling error. + + + + + Gives the segment of the element. + + + + base decoder instance + + + + + The name of the templates for the sink pad. + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + a #GstVideoDecoder + + + + + The name of the templates for the source pad. + + + + + Gives the pointer to the source #GstPad object of the element. + + + + a #GstVideoDecoder + + + + + Obtain a lock to protect the decoder function from concurrent access. + + + + video decoder instance + + + + + Release the lock that protects the decoder function from concurrent access. + + + + video decoder instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gives the segment of the element. + + + + base parse instance + + + + + Gives the segment of the element. + + + + base parse instance + + + + + The name of the templates for the sink pad. + + + + + Gives the pointer to the sink #GstPad object of the element. + + + + a #GstVideoEncoder + + + + + The name of the templates for the source pad. + + + + + Gives the pointer to the source #GstPad object of the element. + + + + a #GstVideoEncoder + + + + + Obtain a lock to protect the encoder function from concurrent access. + + + + video encoder instance + + + + + Release the lock that protects the encoder function from concurrent access. + + + + video encoder instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of all video formats, for use in template caps strings. + +Formats are sorted by decreasing "quality", using these criteria by priority: + - number of components + - depth + - subsampling factor of the width + - subsampling factor of the height + - number of planes + - native endianness preferred + - pixel stride + - poffset + - prefer non-complex formats + - prefer YUV formats over RGB ones + - prefer I420 over YV12 + - format name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Number of planes. This is the number of planes the pixel layout is +organized in in memory. The number of planes can be less than the +number of components (e.g. Y,U,V,A or R, G, B, A) when multiple +components are packed into one plane. + +Examples: RGB/RGBx/RGBA: 1 plane, 3/3/4 components; +I420: 3 planes, 3 components; NV21/NV12: 2 planes, 3 components. + + + + a #GstVideoFormatInfo + + + + + + + + + + + + + + + + Plane number where the given component can be found. A plane may +contain data for multiple components. + + + + a #GstVideoFormatInfo + + + the component index + + + + + + + + + + + + + + pixel stride for the given component. This is the amount of bytes to the +pixel immediately to the right, so basically bytes from one pixel to the +next. When bits < 8, the stride is expressed in bits. + +Examples: for 24-bit RGB, the pixel stride would be 3 bytes, while it +would be 4 bytes for RGBx or ARGB, and 8 bytes for ARGB64 or AYUV64. +For planar formats such as I420 the pixel stride is usually 1. For +YUY2 it would be 2 bytes. + + + + a #GstVideoFormatInfo + + + the component index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Row stride in bytes, that is number of bytes from the first pixel component +of a row to the first pixel component in the next row. This might include +some row padding (memory not actually used for anything, to make sure the +beginning of the next row is aligned in a particular way). + + + + a #GstVideoFormatInfo + + + an array of strides + + + the component index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The height of a field. It's the height of the full frame unless split-field +(alternate) interlacing is in use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The padded height in pixels of a plane (padded size divided by the plane stride). +In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, this macro returns the +plane heights used to hold a single field, not the full frame. + +The size passed as third argument is the size of the pixel data and should +not contain any extra metadata padding. + +It is not valid to use this macro with a TILED format. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + G_TYPE_DOUBLE, B parameter of the cubic filter. The B +parameter controls the bluriness. Values between 0.0 and +2.0 are accepted. 1/3 is the default. + +Below are some values of popular filters: + B C +Hermite 0.0 0.0 +Spline 1.0 0.0 +Catmull-Rom 0.0 1/2 +Mitchell 1/3 1/3 +Robidoux 0.3782 0.3109 +Robidoux + Sharp 0.2620 0.3690 +Robidoux + Soft 0.6796 0.1602 + + + + + G_TYPE_DOUBLE, C parameter of the cubic filter. The C +parameter controls the Keys alpha value. Values between 0.0 and +2.0 are accepted. 1/3 is the default. + +See #GST_VIDEO_RESAMPLER_OPT_CUBIC_B for some more common values + + + + + G_TYPE_DOUBLE, specifies the size of filter envelope for +@GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between +1.0 and 5.0. 2.0 is the default. + + + + + G_TYPE_INT, limits the maximum number of taps to use. +16 is the default. + + + + + G_TYPE_DOUBLE, specifies sharpening of the filter for +@GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between +0.0 and 1.0. 0.0 is the default. + + + + + G_TYPE_DOUBLE, specifies sharpness of the filter for +@GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between +0.5 and 1.5. 1.0 is the default. + + + + + #GstVideoDitherMethod, The dither method to use for propagating +quatization errors. + + + + + + + + + + + + Cast @obj to a #GstVideoSink without runtime type check. + + + + a #GstVideoSink or derived object + + + + + + + + + + + + + + + + + + + + + + + + + + Get the sink #GstPad of @obj. + + + + a #GstVideoSink + + + + + + + + + + + + + + + + + + + + + + + + + use this macro to create new tile modes. + + + + the mode number to create + + + the tile mode type + + + + + Encode the number of tile in X and Y into the stride. + + + + number of tiles in X + + + number of tiles in Y + + + + + Check if @mode is an indexed tile type + + + + a tile mode + + + + + Get the tile mode type of @mode + + + + the tile mode + + + + + + + + + + + + + Extract the number of tiles in X from the stride value. + + + + plane stride + + + + + + + + + Extract the number of tiles in Y from the stride value. + + + + plane stride + + + + + + + + + Active Format Description (AFD) + +For details, see Table 6.14 Active Format in: + +ATSC Digital Television Standard: +Part 4 – MPEG-2 Video System Characteristics + +https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + +and Active Format Description in Complete list of AFD codes + +https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes + +and SMPTE ST2016-1 + + + parent #GstMeta + + + + 0 for progressive or field 1 and 1 for field 2 + + + + #GstVideoAFDSpec that applies to @afd + + + + #GstVideoAFDValue AFD value + + + + + + + + + + + Enumeration of the different standards that may apply to AFD data: + +0) ETSI/DVB: +https://www.etsi.org/deliver/etsi_ts/101100_101199/101154/02.01.01_60/ts_101154v020101p.pdf + +1) ATSC A/53: +https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + +2) SMPTE ST2016-1: + + AFD value is from DVB/ETSI standard + + + AFD value is from ATSC A/53 standard + + + + + + Enumeration of the various values for Active Format Description (AFD) + +AFD should be included in video user data whenever the rectangular +picture area containing useful information does not extend to the full height or width of the coded +frame. AFD data may also be included in user data when the rectangular picture area containing +useful information extends to the full height and width of the coded frame. + +For details, see Table 6.14 Active Format in: + +ATSC Digital Television Standard: +Part 4 – MPEG-2 Video System Characteristics + +https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + +and Active Format Description in Complete list of AFD codes + +https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes + +and SMPTE ST2016-1 + +Notes: + +1) AFD 0 is undefined for ATSC and SMPTE ST2016-1, indicating that AFD data is not available: +If Bar Data is not present, AFD '0000' indicates that exact information +is not available and the active image should be assumed to be the same as the coded frame. AFD '0000'. +AFD '0000' accompanied by Bar Data signals that the active image’s aspect ratio is narrower than 16:9, +but is not 4:3 or 14:9. As the exact aspect ratio cannot be conveyed by AFD alone, wherever possible, +AFD ‘0000’ should be accompanied by Bar Data to define the exact vertical or horizontal extent +of the active image. +2) AFD 0 is reserved for DVB/ETSI +3) values 1, 5, 6, 7, and 12 are reserved for both ATSC and DVB/ETSI +4) values 2 and 3 are not recommended for ATSC, but are valid for DVB/ETSI + + Unavailable (see note 0 below). + + + For 4:3 coded frame, letterbox 16:9 image, + at top of the coded frame. For 16:9 coded frame, full frame 16:9 image, + the same as the coded frame. + + + For 4:3 coded frame, letterbox 14:9 image, + at top of the coded frame. For 16:9 coded frame, pillarbox 14:9 image, + horizontally centered in the coded frame. + + + For 4:3 coded frame, letterbox image with an aspect ratio + greater than 16:9, vertically centered in the coded frame. For 16:9 coded frame, + letterbox image with an aspect ratio greater than 16:9. + + + For 4:3 coded frame, full frame 4:3 image, + the same as the coded frame. For 16:9 coded frame, full frame 16:9 image, the same as + the coded frame. + + + For 4:3 coded frame, full frame 4:3 image, the same as + the coded frame. For 16:9 coded frame, pillarbox 4:3 image, horizontally centered in the + coded frame. + + + For 4:3 coded frame, letterbox 16:9 image, vertically centered in + the coded frame with all image areas protected. For 16:9 coded frame, full frame 16:9 image, + with all image areas protected. + + + For 4:3 coded frame, letterbox 14:9 image, vertically centered in + the coded frame. For 16:9 coded frame, pillarbox 14:9 image, horizontally centered in the + coded frame. + + + For 4:3 coded frame, full frame 4:3 image, with alternative 14:9 + center. For 16:9 coded frame, pillarbox 4:3 image, with alternative 14:9 center. + + + For 4:3 coded frame, letterbox 16:9 image, with alternative 14:9 + center. For 16:9 coded frame, full frame 16:9 image, with alternative 14:9 center. + + + For 4:3 coded frame, letterbox 16:9 image, with alternative 4:3 + center. For 16:9 coded frame, full frame 16:9 image, with alternative 4:3 center. + + + + + + + + + + + + + + + + + + Extra buffer metadata for performing an affine transformation using a 4x4 +matrix. The transformation matrix can be composed with +gst_video_affine_transformation_meta_apply_matrix(). + +The vertices operated on are all in the range 0 to 1, not in +Normalized Device Coordinates (-1 to +1). Transforming points in this space +are assumed to have an origin at (0.5, 0.5, 0.5) in a left-handed coordinate +system with the x-axis moving horizontally (positive values to the right), +the y-axis moving vertically (positive values up the screen) and the z-axis +perpendicular to the screen (positive values into the screen). + + + parent #GstMeta + + + + the column-major 4x4 transformation matrix + + + + + + Apply a transformation using the given 4x4 transformation matrix. +Performs the multiplication, meta->matrix X matrix. + + + + + + + a #GstVideoAffineTransformationMeta + + + + a 4x4 transformation matrix to be applied + + + + + + + + + + + + + + + VideoAggregator can accept AYUV, ARGB and BGRA video streams. For each of the requested +sink pads it will compare the incoming geometry and framerate to define the +output parameters. Indeed output video frames will have the geometry of the +biggest incoming video stream and the framerate of the fastest incoming one. + +VideoAggregator will do colorspace conversion. + +Zorder for each input stream can be configured on the +#GstVideoAggregatorPad. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstVideoInfo representing the currently set +srcpad caps. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation of GstPad that can be used with #GstVideoAggregator. + +See #GstVideoAggregator for more details. + + + + + + + + + + + + + + + + + + + + Requests the pad to check and update the converter before the next usage to +update for any changes that have happened. + + + + + + + a #GstVideoAggregatorPad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the currently queued buffer that is going to be used +for the current output frame. + +This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method, +or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads. + +The return value is only valid until #GstVideoAggregatorClass::aggregate_frames or #GstVideoAggregatorPadClass::prepare_frame +returns. + + + The currently queued buffer + + + + + a #GstVideoAggregatorPad + + + + + + Returns the currently prepared video frame that has to be aggregated into +the current output frame. + +This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method, +or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads. + +The return value is only valid until #GstVideoAggregatorClass::aggregate_frames or #GstVideoAggregatorPadClass::prepare_frame +returns. + + + The currently prepared video frame + + + + + a #GstVideoAggregatorPad + + + + + + Checks if the pad currently has a buffer queued that is going to be used +for the current output frame. + +This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method, +or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads. + + + %TRUE if the pad has currently a buffer queued + + + + + a #GstVideoAggregatorPad + + + + + + Allows selecting that this pad requires an output format with alpha + + + + + + + a #GstVideoAggregatorPad + + + + %TRUE if this pad requires alpha output + + + + + + + + + + + + + + + + + + The #GstVideoInfo currently set on the pad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extra alignment parameters for the memory of video buffers. This +structure is usually used to configure the bufferpool if it supports the +#GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT. + + + extra pixels on the top + + + + extra pixels on the bottom + + + + extra pixels on the left side + + + + extra pixels on the right side + + + + array with extra alignment requirements for the strides + + + + + + Set @align to its default values with no padding and no alignment. + + + + + + + a #GstVideoAlignment + + + + + + + Different alpha modes. + + When input and output have alpha, it will be copied. + When the input has no alpha, alpha will be set to + #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE + + + set all alpha to + #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE + + + multiply all alpha with + #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE. + When the input format has no alpha but the output format has, the + alpha value will be set to #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE + + + + Video Ancillary data, according to SMPTE-291M specification. + +Note that the contents of the data are always stored as 8bit data (i.e. do not contain +the parity check bits). + + + The Data Identifier + + + + The Secondary Data Identifier (if type 2) or the Data + Block Number (if type 1) + + + + The amount of data (in bytes) in @data (max 255 bytes) + + + + The user data content of the Ancillary packet. + Does not contain the ADF, DID, SDID nor CS. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Some know types of Ancillary Data identifiers. + + CEA 708 Ancillary data according to SMPTE 334 + + + CEA 608 Ancillary data according to SMPTE 334 + + + AFD/Bar Ancillary data according to SMPTE 2016-3 (Since: 1.18) + + + + Bar data should be included in video user data +whenever the rectangular picture area containing useful information +does not extend to the full height or width of the coded frame +and AFD alone is insufficient to describe the extent of the image. + +Note: either vertical or horizontal bars are specified, but not both. + +For more details, see: + +https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + +and SMPTE ST2016-1 + + + parent #GstMeta + + + + 0 for progressive or field 1 and 1 for field 2 + + + + if true then bar data specifies letterbox, otherwise pillarbox + + + + If @is_letterbox is true, then the value specifies the + last line of a horizontal letterbox bar area at top of reconstructed frame. + Otherwise, it specifies the last horizontal luminance sample of a vertical pillarbox + bar area at the left side of the reconstructed frame + + + + If @is_letterbox is true, then the value specifies the + first line of a horizontal letterbox bar area at bottom of reconstructed frame. + Otherwise, it specifies the first horizontal + luminance sample of a vertical pillarbox bar area at the right side of the reconstructed frame. + + + + + + + + + + + Additional video buffer flags. These flags can potentially be used on any +buffers carrying closed caption data, or video data - even encoded data. + +Note that these are only valid for #GstCaps of type: video/... and caption/... +They can conflict with other extended buffer flags. + + If the #GstBuffer is interlaced. In mixed + interlace-mode, this flags specifies if the frame is + interlaced or progressive. + + + If the #GstBuffer is interlaced, then the first field + in the video frame is the top field. If unset, the + bottom field is first. + + + If the #GstBuffer is interlaced, then the first field + (as defined by the %GST_VIDEO_BUFFER_FLAG_TFF flag setting) + is repeated. + + + If the #GstBuffer is interlaced, then only the + first field (as defined by the %GST_VIDEO_BUFFER_FLAG_TFF + flag setting) is to be displayed (Since: 1.16). + + + The #GstBuffer contains one or more specific views, + such as left or right eye view. This flags is set on + any buffer that contains non-mono content - even for + streams that contain only a single viewpoint. In mixed + mono / non-mono streams, the absence of the flag marks + mono buffers. + + + When conveying stereo/multiview content with + frame-by-frame methods, this flag marks the first buffer + in a bundle of frames that belong together. + + + The video frame has the top field only. This is the + same as GST_VIDEO_BUFFER_FLAG_TFF | + GST_VIDEO_BUFFER_FLAG_ONEFIELD (Since: 1.16). + Use GST_VIDEO_BUFFER_IS_TOP_FIELD() to check for this flag. + + + If the #GstBuffer is interlaced, then only the + first field (as defined by the %GST_VIDEO_BUFFER_FLAG_TFF + flag setting) is to be displayed (Since: 1.16). + + + The video frame has the bottom field only. This is + the same as GST_VIDEO_BUFFER_FLAG_ONEFIELD + (GST_VIDEO_BUFFER_FLAG_TFF flag unset) (Since: 1.16). + Use GST_VIDEO_BUFFER_IS_BOTTOM_FIELD() to check for this flag. + + + The #GstBuffer contains the end of a video field or frame + boundary such as the last subframe or packet (Since: 1.18). + + + Offset to define more flags + + + + + + Create a new bufferpool that can allocate video frames. This bufferpool +supports all the video bufferpool options. + + + a new #GstBufferPool to allocate video frames + + + + + + + + + + + + + + + + + + + + + Extra buffer metadata providing Closed Caption. + + + parent #GstMeta + + + + The type of Closed Caption contained in the meta. + + + + The Closed Caption data. + + + + + + The size in bytes of @data + + + + + + + + + + + The various known types of Closed Caption (CC). + + Unknown type of CC + + + CEA-608 as byte pairs. Note that + this format is not recommended since is does not specify to + which field the caption comes from and therefore assumes + it comes from the first field (and that there is no information + on the second field). Use @GST_VIDEO_CAPTION_TYPE_CEA708_RAW + if you wish to store CEA-608 from two fields and prefix each byte pair + with 0xFC for the first field and 0xFD for the second field. + + + CEA-608 as byte triplets as defined + in SMPTE S334-1 Annex A. The second and third byte of the byte triplet + is the raw CEA608 data, the first byte is a bitfield: The top/7th bit is + 0 for the second field, 1 for the first field, bit 6 and 5 are 0 and + bits 4 to 0 are a 5 bit unsigned integer that represents the line + offset relative to the base-line of the original image format (line 9 + for 525-line field 1, line 272 for 525-line field 2, line 5 for + 625-line field 1 and line 318 for 625-line field 2). + + + CEA-708 as cc_data byte triplets. They + can also contain 608-in-708 and the first byte of each triplet has to + be inspected for detecting the type. + + + CEA-708 (and optionally CEA-608) in + a CDP (Caption Distribution Packet) defined by SMPTE S-334-2. + Contains the whole CDP (starting with 0x9669). + + + Parses fixed Closed Caption #GstCaps and returns the corresponding caption +type, or %GST_VIDEO_CAPTION_TYPE_UNKNOWN. + + + #GstVideoCaptionType. + + + + + Fixed #GstCaps to parse + + + + + + Creates new caps corresponding to @type. + + + new #GstCaps + + + + + #GstVideoCaptionType + + + + + + + Extra flags that influence the result from gst_video_chroma_resample_new(). + + no flags + + + the input is interlaced + + + + Different subsampling and upsampling methods + + Duplicates the chroma samples when + upsampling and drops when subsampling + + + Uses linear interpolation to reconstruct + missing chroma and averaging to subsample + + + + Different chroma downsampling and upsampling modes + + do full chroma up and down sampling + + + only perform chroma upsampling + + + only perform chroma downsampling + + + disable chroma resampling + + + + + + Perform resampling of @width chroma pixels in @lines. + + + + + + + a #GstVideoChromaResample + + + + pixel lines + + + + the number of pixels on one line + + + + + + Free @resample + + + + + + + a #GstVideoChromaResample + + + + + + The resampler must be fed @n_lines at a time. The first line should be +at @offset. + + + + + + + a #GstVideoChromaResample + + + + the number of input lines + + + + the first line + + + + + + Create a new resampler object for the given parameters. When @h_factor or +@v_factor is > 0, upsampling will be used, otherwise subsampling is +performed. + + + a new #GstVideoChromaResample that should be freed with + gst_video_chroma_resample_free() after usage. + + + + + a #GstVideoChromaMethod + + + + a #GstVideoChromaSite + + + + #GstVideoChromaFlags + + + + the #GstVideoFormat + + + + horizontal resampling factor + + + + vertical resampling factor + + + + + + + Various Chroma sitings. + + unknown cositing + + + no cositing + + + chroma is horizontally cosited + + + chroma is vertically cosited + + + choma samples are sited on alternate lines + + + chroma samples cosited with luma samples + + + jpeg style cositing, also for mpeg1 and mjpeg + + + mpeg2 style cositing + + + DV style cositing + + + + A #GstVideoCodecFrame represents a video frame both in raw and +encoded form. + + + + + + + + + Unique identifier for the frame. Use this if you need + to get hold of the frame later (like when data is being decoded). + Typical usage in decoders is to set this on the opaque value provided + to the library and get back the frame using gst_video_decoder_get_frame() + + + + + + + + + + Decoding timestamp + + + + Presentation timestamp + + + + Duration of the frame + + + + Distance in frames from the last synchronization point. + + + + the input #GstBuffer that created this frame. The buffer is owned + by the frame and references to the frame instead of the buffer should + be kept. + + + + the output #GstBuffer. Implementations should set this either + directly, or by using the + @gst_video_decoder_allocate_output_frame() or + @gst_video_decoder_allocate_output_buffer() methods. The buffer is + owned by the frame and references to the frame instead of the + buffer should be kept. + + + + Running time when the frame will be used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets private data set on the frame by the subclass via +gst_video_codec_frame_set_user_data() previously. + + + The previously set user_data + + + + + a #GstVideoCodecFrame + + + + + + Increases the refcount of the given frame by one. + + + @buf + + + + + a #GstVideoCodecFrame + + + + + + Sets @user_data on the frame and the #GDestroyNotify that will be called when +the frame is freed. Allows to attach private data by the subclass to frames. + +If a @user_data was previously set, then the previous set @notify will be called +before the @user_data is replaced. + + + + + + + a #GstVideoCodecFrame + + + + private data + + + + a #GDestroyNotify + + + + + + Decreases the refcount of the frame. If the refcount reaches 0, the frame +will be freed. + + + + + + + a #GstVideoCodecFrame + + + + + + + Flags for #GstVideoCodecFrame + + + is the frame only meant to be decoded + + + is the frame a synchronization point (keyframe) + + + should the output frame be made a keyframe + + + should the encoder output stream headers + + + The buffer data is corrupted. + + + + Structure representing the state of an incoming or outgoing video +stream for encoders and decoders. + +Decoders and encoders will receive such a state through their +respective @set_format vmethods. + +Decoders and encoders can set the downstream state, by using the +@gst_video_decoder_set_output_state() or +@gst_video_encoder_set_output_state() methods. + + + + + + The #GstVideoInfo describing the stream + + + + The #GstCaps used in the caps negotiation of the pad. + + + + a #GstBuffer corresponding to the + 'codec_data' field of a stream, or NULL. + + + + The #GstCaps for allocation query and pool + negotiation. Since: 1.10 + + + + + + + + + Increases the refcount of the given state by one. + + + @buf + + + + + a #GstVideoCodecState + + + + + + Decreases the refcount of the state. If the refcount reaches 0, the state +will be freed. + + + + + + + a #GstVideoCodecState + + + + + + + The color matrix is used to convert between Y'PbPr and +non-linear RGB (R'G'B') + + unknown matrix + + + identity matrix. Order of coefficients is +actually GBR, also IEC 61966-2-1 (sRGB) + + + FCC Title 47 Code of Federal Regulations 73.682 (a)(20) + + + ITU-R BT.709 color matrix, also ITU-R BT1361 +/ IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B + + + ITU-R BT.601 color matrix, also SMPTE170M / ITU-R BT1358 525 / ITU-R BT1700 NTSC + + + SMPTE 240M color matrix + + + ITU-R BT.2020 color matrix. Since: 1.6 + + + Converts the @value to the #GstVideoColorMatrix +The matrix coefficients (MatrixCoefficients) value is +defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +and "ITU-T H.273 Table 4". +"H.264 Table E-5" and "H.265 Table E.5" share the identical values. + + + the matched #GstVideoColorMatrix + + + + + a ITU-T H.273 matrix coefficients value + + + + + + Get the coefficients used to convert between Y'PbPr and R'G'B' using @matrix. + +When: + +|[ + 0.0 <= [Y',R',G',B'] <= 1.0) + (-0.5 <= [Pb,Pr] <= 0.5) +]| + +the general conversion is given by: + +|[ + Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B' + Pb = (B'-Y')/(2*(1-Kb)) + Pr = (R'-Y')/(2*(1-Kr)) +]| + +and the other way around: + +|[ + R' = Y' + Cr*2*(1-Kr) + G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb) + B' = Y' + Cb*2*(1-Kb) +]| + + + TRUE if @matrix was a YUV color format and @Kr and @Kb contain valid + values. + + + + + a #GstVideoColorMatrix + + + + result red channel coefficient + + + + result blue channel coefficient + + + + + + Converts #GstVideoColorMatrix to the "matrix coefficients" +(MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +and "ITU-T H.273 Table 4". +"H.264 Table E-5" and "H.265 Table E.5" share the identical values. + + + The value of ISO/IEC 23001-8 matrix coefficients. + + + + + a #GstVideoColorMatrix + + + + + + + The color primaries define the how to transform linear RGB values to and from +the CIE XYZ colorspace. + + unknown color primaries + + + BT709 primaries, also ITU-R BT1361 / IEC +61966-2-4 / SMPTE RP177 Annex B + + + BT470M primaries, also FCC Title 47 Code +of Federal Regulations 73.682 (a)(20) + + + BT470BG primaries, also ITU-R BT601-6 +625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM + + + SMPTE170M primaries, also ITU-R +BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC + + + SMPTE240M primaries + + + Generic film (colour filters using +Illuminant C) + + + ITU-R BT2020 primaries. Since: 1.6 + + + Adobe RGB primaries. Since: 1.8 + + + SMPTE ST 428 primaries (CIE 1931 +XYZ). Since: 1.16 + + + SMPTE RP 431 primaries (ST 431-2 +(2011) / DCI P3). Since: 1.16 + + + SMPTE EG 432 primaries (ST 432-1 +(2010) / P3 D65). Since: 1.16 + + + EBU 3213 primaries (JEDEC P22 +phosphors). Since: 1.16 + + + Converts the @value to the #GstVideoColorPrimaries +The colour primaries (ColourPrimaries) value is +defined by "ISO/IEC 23001-8 Section 7.1 Table 2" and "ITU-T H.273 Table 2". +"H.264 Table E-3" and "H.265 Table E.3" share the identical values. + + + the matched #GstVideoColorPrimaries + + + + + a ITU-T H.273 colour primaries value + + + + + + Get information about the chromaticity coordinates of @primaries. + + + a #GstVideoColorPrimariesInfo for @primaries. + + + + + a #GstVideoColorPrimaries + + + + + + Converts #GstVideoColorPrimaries to the "colour primaries" (ColourPrimaries) +value defined by "ISO/IEC 23001-8 Section 7.1 Table 2" +and "ITU-T H.273 Table 2". +"H.264 Table E-3" and "H.265 Table E.3" share the identical values. + + + The value of ISO/IEC 23001-8 colour primaries. + + + + + a #GstVideoColorPrimaries + + + + + + + Structure describing the chromaticity coordinates of an RGB system. These +values can be used to construct a matrix to transform RGB to and from the +XYZ colorspace. + + + a #GstVideoColorPrimaries + + + + reference white x coordinate + + + + reference white y coordinate + + + + red x coordinate + + + + red y coordinate + + + + green x coordinate + + + + green y coordinate + + + + blue x coordinate + + + + blue y coordinate + + + + + Possible color range values. These constants are defined for 8 bit color +values and can be scaled for other bit depths. + + unknown range + + + [0..255] for 8 bit components + + + [16..235] for 8 bit components. Chroma has + [16..240] range. + + + Compute the offset and scale values for each component of @info. For each +component, (c[i] - offset[i]) / scale[i] will scale the component c[i] to the +range [0.0 .. 1.0]. + +The reverse operation (c[i] * scale[i]) + offset[i] can be used to convert +the component values in range [0.0 .. 1.0] back to their representation in +@info and @range. + + + + + + + a #GstVideoColorRange + + + + a #GstVideoFormatInfo + + + + output offsets + + + + + + output scale + + + + + + + + + Structure describing the color info. + + + the color range. This is the valid range for the samples. + It is used to convert the samples to Y'PbPr values. + + + + the color matrix. Used to convert between Y'PbPr and + non-linear RGB (R'G'B') + + + + the transfer function. used to convert between R'G'B' and RGB + + + + color primaries. used to convert between R'G'B' and CIE XYZ + + + + Parse the colorimetry string and update @cinfo with the parsed +values. + + + %TRUE if @color points to valid colorimetry info. + + + + + a #GstVideoColorimetry + + + + a colorimetry string + + + + + + Compare the 2 colorimetry sets for equality + + + %TRUE if @cinfo and @other are equal. + + + + + a #GstVideoColorimetry + + + + another #GstVideoColorimetry + + + + + + Check if the colorimetry information in @info matches that of the +string @color. + + + %TRUE if @color conveys the same colorimetry info as the color +information in @info. + + + + + a #GstVideoInfo + + + + a colorimetry string + + + + + + Make a string representation of @cinfo. + + + a string representation of @cinfo +or %NULL if all the entries of @cinfo are unknown values. + + + + + a #GstVideoColorimetry + + + + + + + Content light level information specified in CEA-861.3, Appendix A. + + + the maximum content light level + (abbreviated to MaxCLL) in candelas per square meter (cd/m^2 and nit) + + + + the maximum frame average light level + (abbreviated to MaxFLL) in candelas per square meter (cd/m^2 and nit) + + + + + + + + + Parse @caps and update @linfo + + + %TRUE if @linfo was successfully set to @caps + + + + + a #GstVideoContentLightLevel + + + + a #GstCaps + + + + + + Parse @caps and update @linfo + + + if @caps has #GstVideoContentLightLevel and could be parsed + + + + + a #GstVideoContentLightLevel + + + + a #GstCaps + + + + + + Parse the value of content-light-level caps field and update @minfo +with the parsed values. + + + %TRUE if @linfo points to valid #GstVideoContentLightLevel. + + + + + a #GstVideoContentLightLevel + + + + a content-light-level string from caps + + + + + + Initialize @linfo + + + + + + + a #GstVideoContentLightLevel + + + + + + Convert @linfo to its string representation. + + + a string representation of @linfo. + + + + + a #GstVideoContentLightLevel + + + + + + + + + + + + + + + + + + + + + + + + + + Convert the pixels of @src into @dest using @convert. + + + + + + + a #GstVideoConverter + + + + a #GstVideoFrame + + + + a #GstVideoFrame + + + + + + Free @convert + + + + + + + a #GstVideoConverter + + + + + + Get the current configuration of @convert. + + + a #GstStructure that remains valid for as long as @convert is valid + or until gst_video_converter_set_config() is called. + + + + + a #GstVideoConverter + + + + + + Set @config as extra configuration for @convert. + +If the parameters in @config can not be set exactly, this function returns +%FALSE and will try to update as much state as possible. The new state can +then be retrieved and refined with gst_video_converter_get_config(). + +Look at the `GST_VIDEO_CONVERTER_OPT_*` fields to check valid configuration +option and values. + + + %TRUE when @config could be set. + + + + + a #GstVideoConverter + + + + a #GstStructure + + + + + + Create a new converter object to convert between @in_info and @out_info +with @config. + + + a #GstVideoConverter or %NULL if conversion is not possible. + + + + + a #GstVideoInfo + + + + a #GstVideoInfo + + + + a #GstStructure with configuration options + + + + + + Create a new converter object to convert between @in_info and @out_info +with @config. + +The optional @pool can be used to spawn threads, this is useful when +creating new converters rapidly, for example when updating cropping. + + + a #GstVideoConverter or %NULL if conversion is not possible. + + + + + a #GstVideoInfo + + + + a #GstVideoInfo + + + + a #GstStructure with configuration options + + + + a #GstTaskPool to spawn threads from + + + + + + + Extra buffer metadata describing image cropping. + + + parent #GstMeta + + + + the horizontal offset + + + + the vertical offset + + + + the cropped width + + + + the cropped height + + + + + + + + + + + This base class is for video decoders turning encoded data into raw video +frames. + +The GstVideoDecoder base class and derived subclasses should cooperate as +follows: + +## Configuration + + * Initially, GstVideoDecoder calls @start when the decoder element + is activated, which allows the subclass to perform any global setup. + + * GstVideoDecoder calls @set_format to inform the subclass of caps + describing input video data that it is about to receive, including + possibly configuration data. + While unlikely, it might be called more than once, if changing input + parameters require reconfiguration. + + * Incoming data buffers are processed as needed, described in Data + Processing below. + + * GstVideoDecoder calls @stop at end of all processing. + +## Data processing + + * The base class gathers input data, and optionally allows subclass + to parse this into subsequently manageable chunks, typically + corresponding to and referred to as 'frames'. + + * Each input frame is provided in turn to the subclass' @handle_frame + callback. + The ownership of the frame is given to the @handle_frame callback. + + * If codec processing results in decoded data, the subclass should call + @gst_video_decoder_finish_frame to have decoded data pushed. + downstream. Otherwise, the subclass must call + @gst_video_decoder_drop_frame, to allow the base class to do timestamp + and offset tracking, and possibly to requeue the frame for a later + attempt in the case of reverse playback. + +## Shutdown phase + + * The GstVideoDecoder class calls @stop to inform the subclass that data + parsing will be stopped. + +## Additional Notes + + * Seeking/Flushing + + * When the pipeline is seeked or otherwise flushed, the subclass is + informed via a call to its @reset callback, with the hard parameter + set to true. This indicates the subclass should drop any internal data + queues and timestamps and prepare for a fresh set of buffers to arrive + for parsing and decoding. + + * End Of Stream + + * At end-of-stream, the subclass @parse function may be called some final + times with the at_eos parameter set to true, indicating that the element + should not expect any more data to be arriving, and it should parse and + remaining frames and call gst_video_decoder_have_frame() if possible. + +The subclass is responsible for providing pad template caps for +source and sink pads. The pads need to be named "sink" and "src". It also +needs to provide information about the output caps, when they are known. +This may be when the base class calls the subclass' @set_format function, +though it might be during decoding, before calling +@gst_video_decoder_finish_frame. This is done via +@gst_video_decoder_set_output_state + +The subclass is also responsible for providing (presentation) timestamps +(likely based on corresponding input ones). If that is not applicable +or possible, the base class provides limited framerate based interpolation. + +Similarly, the base class provides some limited (legacy) seeking support +if specifically requested by the subclass, as full-fledged support +should rather be left to upstream demuxer, parser or alike. This simple +approach caters for seeking and duration reporting using estimated input +bitrates. To enable it, a subclass should call +@gst_video_decoder_set_estimate_rate to enable handling of incoming +byte-streams. + +The base class provides some support for reverse playback, in particular +in case incoming data is not packetized or upstream does not provide +fragments on keyframe boundaries. However, the subclass should then be +prepared for the parsing and frame processing stage to occur separately +(in normal forward processing, the latter immediately follows the former), +The subclass also needs to ensure the parsing stage properly marks +keyframes, unless it knows the upstream elements will do so properly for +incoming data. + +The bare minimum that a functional subclass needs to implement is: + + * Provide pad templates + * Inform the base class of output caps via + @gst_video_decoder_set_output_state + + * Parse input data, if it is not considered packetized from upstream + Data will be provided to @parse which should invoke + @gst_video_decoder_add_to_frame and @gst_video_decoder_have_frame to + separate the data belonging to each video frame. + + * Accept data in @handle_frame and provide decoded results to + @gst_video_decoder_finish_frame, or call @gst_video_decoder_drop_frame. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiate with downstream elements to currently configured #GstVideoCodecState. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoDecoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Removes next @n_bytes of input data and adds it to currently parsed frame. + + + + + + + a #GstVideoDecoder + + + + the number of bytes to add + + + + + + Helper function that allocates a buffer to hold a video frame for @decoder's +current #GstVideoCodecState. + +You should use gst_video_decoder_allocate_output_frame() instead of this +function, if possible at all. + + + allocated buffer, or NULL if no buffer could be + allocated (e.g. when downstream is flushing or shutting down) + + + + + a #GstVideoDecoder + + + + + + Helper function that allocates a buffer to hold a video frame for @decoder's +current #GstVideoCodecState. Subclass should already have configured video +state and set src pad caps. + +The buffer allocated here is owned by the frame and you should only +keep references to the frame, not the buffer. + + + %GST_FLOW_OK if an output buffer could be allocated + + + + + a #GstVideoDecoder + + + + a #GstVideoCodecFrame + + + + + + Same as #gst_video_decoder_allocate_output_frame except it allows passing +#GstBufferPoolAcquireParams to the sub call gst_buffer_pool_acquire_buffer. + + + %GST_FLOW_OK if an output buffer could be allocated + + + + + a #GstVideoDecoder + + + + a #GstVideoCodecFrame + + + + a #GstBufferPoolAcquireParams + + + + + + Similar to gst_video_decoder_finish_frame(), but drops @frame in any +case and posts a QoS message with the frame's details on the bus. +In any case, the frame is considered finished and released. + + + a #GstFlowReturn, usually GST_FLOW_OK. + + + + + a #GstVideoDecoder + + + + the #GstVideoCodecFrame to drop + + + + + + @frame should have a valid decoded data buffer, whose metadata fields +are then appropriately set according to frame data and pushed downstream. +If no output data is provided, @frame is considered skipped. +In any case, the frame is considered finished and released. + +After calling this function the output buffer of the frame is to be +considered read-only. This function will also change the metadata +of the buffer. + + + a #GstFlowReturn resulting from sending data downstream + + + + + a #GstVideoDecoder + + + + a decoded #GstVideoCodecFrame + + + + + + Lets #GstVideoDecoder sub-classes to know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after use it. + + + + + + + a #GstVideoDecoder + + + + the #GstAllocator +used + + + + the +#GstAllocationParams of @allocator + + + + + + + + the instance of the #GstBufferPool used +by the decoder; free it after use it + + + + + a #GstVideoDecoder + + + + + + + + currently configured byte to time conversion setting + + + + + a #GstVideoDecoder + + + + + + Get a pending unfinished #GstVideoCodecFrame + + + pending unfinished #GstVideoCodecFrame identified by @frame_number. + + + + + a #GstVideoDecoder + + + + system_frame_number of a frame + + + + + + Get all pending unfinished #GstVideoCodecFrame + + + pending unfinished #GstVideoCodecFrame. + + + + + + + a #GstVideoDecoder + + + + + + Query the configured decoder latency. Results will be returned via +@min_latency and @max_latency. + + + + + + + a #GstVideoDecoder + + + + address of variable in which to store the + configured minimum latency, or %NULL + + + + address of variable in which to store the + configured mximum latency, or %NULL + + + + + + Determines maximum possible decoding time for @frame that will +allow it to decode and arrive in time (as determined by QoS events). +In particular, a negative result means decoding in time is no longer possible +and should therefore occur as soon/skippy as possible. + + + max decoding time. + + + + + a #GstVideoDecoder + + + + a #GstVideoCodecFrame + + + + + + + + currently configured decoder tolerated error count. + + + + + a #GstVideoDecoder + + + + + + Queries decoder required format handling. + + + %TRUE if required format handling is enabled. + + + + + a #GstVideoDecoder + + + + + + Queries if the decoder requires a sync point before it starts outputting +data in the beginning. + + + %TRUE if a sync point is required in the beginning. + + + + + a #GstVideoDecoder + + + + + + Get the oldest pending unfinished #GstVideoCodecFrame + + + oldest pending unfinished #GstVideoCodecFrame. + + + + + a #GstVideoDecoder + + + + + + Get the #GstVideoCodecState currently describing the output stream. + + + #GstVideoCodecState describing format of video data. + + + + + a #GstVideoDecoder + + + + + + Queries whether input data is considered packetized or not by the +base class. + + + TRUE if input data is considered packetized. + + + + + a #GstVideoDecoder + + + + + + Returns the number of bytes previously added to the current frame +by calling gst_video_decoder_add_to_frame(). + + + The number of bytes pending for the current frame + + + + + a #GstVideoDecoder + + + + + + + + The current QoS proportion. + + + + + a #GstVideoDecoder + current QoS proportion, or %NULL + + + + + + Gathers all data collected for currently parsed frame, gathers corresponding +metadata and passes it along for further processing, i.e. @handle_frame. + + + a #GstFlowReturn + + + + + a #GstVideoDecoder + + + + + + Sets the audio decoder tags and how they should be merged with any +upstream stream tags. This will override any tags previously-set +with gst_audio_decoder_merge_tags(). + +Note that this is provided for convenience, and the subclass is +not required to use this and can still do tag handling on its own. + +MT safe. + + + + + + + a #GstVideoDecoder + + + + a #GstTagList to merge, or NULL to unset + previously-set tags + + + + the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE + + + + + + Negotiate with downstream elements to currently configured #GstVideoCodecState. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoDecoder + + + + + + Returns caps that express @caps (or sink template caps if @caps == NULL) +restricted to resolution/format/... combinations supported by downstream +elements. + + + a #GstCaps owned by caller + + + + + a #GstVideoDecoder + + + + initial caps + + + + filter caps + + + + + + Similar to gst_video_decoder_drop_frame(), but simply releases @frame +without any processing other than removing it from list of pending frames, +after which it is considered finished and released. + + + + + + + a #GstVideoDecoder + + + + the #GstVideoCodecFrame to release + + + + + + Allows the #GstVideoDecoder subclass to request from the base class that +a new sync should be requested from upstream, and that @frame was the frame +when the subclass noticed that a new sync point is required. A reason for +the subclass to do this could be missing reference frames, for example. + +The base class will then request a new sync point from upstream as long as +the time that passed since the last one is exceeding +#GstVideoDecoder:min-force-key-unit-interval. + +The subclass can signal via @flags how the frames until the next sync point +should be handled: + + * If %GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT is selected then + all following input frames until the next sync point are discarded. + This can be useful if the lack of a sync point will prevent all further + decoding and the decoder implementation is not very robust in handling + missing references frames. + * If %GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT is selected + then all output frames following @frame are marked as corrupted via + %GST_BUFFER_FLAG_CORRUPTED. Corrupted frames can be automatically + dropped by the base class, see #GstVideoDecoder:discard-corrupted-frames. + Subclasses can manually mark frames as corrupted via %GST_VIDEO_CODEC_FRAME_FLAG_CORRUPTED + before calling gst_video_decoder_finish_frame(). + + + + + + + a #GstVideoDecoder + + + + a #GstVideoCodecFrame + + + + #GstVideoDecoderRequestSyncPointFlags + + + + + + Allows baseclass to perform byte to time estimated conversion. + + + + + + + a #GstVideoDecoder + + + + whether to enable byte to time conversion + + + + + + Same as #gst_video_decoder_set_output_state() but also allows you to also set +the interlacing mode. + + + the newly configured output state. + + + + + a #GstVideoDecoder + + + + a #GstVideoFormat + + + + A #GstVideoInterlaceMode + + + + The width in pixels + + + + The height in pixels + + + + An optional reference #GstVideoCodecState + + + + + + Lets #GstVideoDecoder sub-classes tell the baseclass what the decoder +latency is. Will also post a LATENCY message on the bus so the pipeline +can reconfigure its global latency. + + + + + + + a #GstVideoDecoder + + + + minimum latency + + + + maximum latency + + + + + + Sets numbers of tolerated decoder errors, where a tolerated one is then only +warned about, but more than tolerated will lead to fatal error. You can set +-1 for never returning fatal errors. Default is set to +GST_VIDEO_DECODER_MAX_ERRORS. + +The '-1' option was added in 1.4 + + + + + + + a #GstVideoDecoder + + + + max tolerated errors + + + + + + Configures decoder format needs. If enabled, subclass needs to be +negotiated with format caps before it can process any data. It will then +never be handed any data before it has been configured. +Otherwise, it might be handed data without having been configured and +is then expected being able to do so either by default +or based on the input data. + + + + + + + a #GstVideoDecoder + + + + new state + + + + + + Configures whether the decoder requires a sync point before it starts +outputting data in the beginning. If enabled, the base class will discard +all non-sync point frames in the beginning and after a flush and does not +pass it to the subclass. + +If the first frame is not a sync point, the base class will request a sync +point via the force-key-unit event. + + + + + + + a #GstVideoDecoder + + + + new state + + + + + + Creates a new #GstVideoCodecState with the specified @fmt, @width and @height +as the output state for the decoder. +Any previously set output state on @decoder will be replaced by the newly +created one. + +If the subclass wishes to copy over existing fields (like pixel aspec ratio, +or framerate) from an existing #GstVideoCodecState, it can be provided as a +@reference. + +If the subclass wishes to override some fields from the output state (like +pixel-aspect-ratio or framerate) it can do so on the returned #GstVideoCodecState. + +The new output state will only take effect (set on pads and buffers) starting +from the next call to #gst_video_decoder_finish_frame(). + + + the newly configured output state. + + + + + a #GstVideoDecoder + + + + a #GstVideoFormat + + + + The width in pixels + + + + The height in pixels + + + + An optional reference #GstVideoCodecState + + + + + + Allows baseclass to consider input data as packetized or not. If the +input is packetized, then the @parse method will not be called. + + + + + + + a #GstVideoDecoder + + + + whether the input data should be considered as packetized. + + + + + + Lets #GstVideoDecoder sub-classes decide if they want the sink pad +to use the default pad query handler to reply to accept-caps queries. + +By setting this to true it is possible to further customize the default +handler with %GST_PAD_SET_ACCEPT_INTERSECT and +%GST_PAD_SET_ACCEPT_TEMPLATE + + + + + + + a #GstVideoDecoder + + + + if the default pad accept-caps query handling should be used + + + + + + If set to %TRUE the decoder will discard frames that are marked as +corrupted instead of outputting them. + + + + Maximum number of tolerated consecutive decode errors. See +gst_video_decoder_set_max_errors() for more details. + + + + Minimum interval between force-key-unit events sent upstream by the +decoder. Setting this to 0 will cause every event to be handled, setting +this to %GST_CLOCK_TIME_NONE will cause every event to be ignored. + +See gst_video_event_new_upstream_force_key_unit() for more details about +force-key-unit events. + + + + If set to %TRUE the decoder will handle QoS events received +from downstream elements. +This includes dropping output frames which are detected as late +using the metrics reported by those events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum @handle_frame needs to be overridden, and @set_format +and likely as well. If non-packetized input is supported or expected, +@parse needs to be overridden as well. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoDecoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Flags to be used in combination with gst_video_decoder_request_sync_point(). +See the function documentation for more details. + + + discard all following + input until the next sync point. + + + discard all following + output until the next sync point. + + + + The interface allows unified access to control flipping and rotation +operations of video-sources or operators. + + + + + + + #GstVideoDirectionInterface interface. + + + parent interface type. + + + + + GstVideoDither provides implementations of several dithering algorithms +that can be applied to lines of video pixels to quantize and dither them. + + + Free @dither + + + + + + + a #GstVideoDither + + + + + + Dither @width pixels starting from offset @x in @line using @dither. + +@y is the line number of @line in the output image. + + + + + + + a #GstVideoDither + + + + pointer to the pixels of the line + + + + x coordinate + + + + y coordinate + + + + the width + + + + + + Make a new dither object for dithering lines of @format using the +algorithm described by @method. + +Each component will be quantized to a multiple of @quantizer. Better +performance is achieved when @quantizer is a power of 2. + +@width is the width of the lines that this ditherer will handle. + + + a new #GstVideoDither + + + + + a #GstVideoDitherMethod + + + + a #GstVideoDitherFlags + + + + a #GstVideoFormat + + + + quantizer + + + + the width of the lines + + + + + + + Extra flags that influence the result from gst_video_chroma_resample_new(). + + no flags + + + the input is interlaced + + + quantize values in addition to adding dither. + + + + Different dithering methods to use. + + no dithering + + + propagate rounding errors downwards + + + Dither with floyd-steinberg error diffusion + + + Dither with Sierra Lite error diffusion + + + ordered dither using a bayer pattern + + + + This base class is for video encoders turning raw video into +encoded video data. + +GstVideoEncoder and subclass should cooperate as follows. + +## Configuration + + * Initially, GstVideoEncoder calls @start when the encoder element + is activated, which allows subclass to perform any global setup. + * GstVideoEncoder calls @set_format to inform subclass of the format + of input video data that it is about to receive. Subclass should + setup for encoding and configure base class as appropriate + (e.g. latency). While unlikely, it might be called more than once, + if changing input parameters require reconfiguration. Baseclass + will ensure that processing of current configuration is finished. + * GstVideoEncoder calls @stop at end of all processing. + +## Data processing + + * Base class collects input data and metadata into a frame and hands + this to subclass' @handle_frame. + + * If codec processing results in encoded data, subclass should call + @gst_video_encoder_finish_frame to have encoded data pushed + downstream. + + * If implemented, baseclass calls subclass @pre_push just prior to + pushing to allow subclasses to modify some metadata on the buffer. + If it returns GST_FLOW_OK, the buffer is pushed downstream. + + * GstVideoEncoderClass will handle both srcpad and sinkpad events. + Sink events will be passed to subclass if @event callback has been + provided. + +## Shutdown phase + + * GstVideoEncoder class calls @stop to inform the subclass that data + parsing will be stopped. + +Subclass is responsible for providing pad template caps for +source and sink pads. The pads need to be named "sink" and "src". It should +also be able to provide fixed src pad caps in @getcaps by the time it calls +@gst_video_encoder_finish_frame. + +Things that subclass need to take care of: + + * Provide pad templates + * Provide source pad caps before pushing the first buffer + * Accept data in @handle_frame and provide encoded results to + @gst_video_encoder_finish_frame. + + +The #GstVideoEncoder:qos property will enable the Quality-of-Service +features of the encoder which gather statistics about the real-time +performance of the downstream elements. If enabled, subclasses can +use gst_video_encoder_get_max_encode_time() to check if input frames +are already late and drop them right away to give a chance to the +pipeline to catch up. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Negotiate with downstream elements to currently configured #GstVideoCodecState. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoEncoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper function that allocates a buffer to hold an encoded video frame +for @encoder's current #GstVideoCodecState. + + + allocated buffer + + + + + a #GstVideoEncoder + + + + size of the buffer + + + + + + Helper function that allocates a buffer to hold an encoded video frame for @encoder's +current #GstVideoCodecState. Subclass should already have configured video +state and set src pad caps. + +The buffer allocated here is owned by the frame and you should only +keep references to the frame, not the buffer. + + + %GST_FLOW_OK if an output buffer could be allocated + + + + + a #GstVideoEncoder + + + + a #GstVideoCodecFrame + + + + size of the buffer + + + + + + @frame must have a valid encoded data buffer, whose metadata fields +are then appropriately set according to frame data or no buffer at +all if the frame should be dropped. +It is subsequently pushed downstream or provided to @pre_push. +In any case, the frame is considered finished and released. + +After calling this function the output buffer of the frame is to be +considered read-only. This function will also change the metadata +of the buffer. + + + a #GstFlowReturn resulting from sending data downstream + + + + + a #GstVideoEncoder + + + + an encoded #GstVideoCodecFrame + + + + + + If multiple subframes are produced for one input frame then use this method +for each subframe, except for the last one. Before calling this function, +you need to fill frame->output_buffer with the encoded buffer to push. + +You must call #gst_video_encoder_finish_frame() for the last sub-frame +to tell the encoder that the frame has been fully encoded. + +This function will change the metadata of @frame and frame->output_buffer +will be pushed downstream. + + + a #GstFlowReturn resulting from pushing the buffer downstream. + + + + + a #GstVideoEncoder + + + + a #GstVideoCodecFrame being encoded + + + + + + Lets #GstVideoEncoder sub-classes to know the memory @allocator +used by the base class and its @params. + +Unref the @allocator after use it. + + + + + + + a #GstVideoEncoder + + + + the #GstAllocator +used + + + + the +#GstAllocationParams of @allocator + + + + + + Get a pending unfinished #GstVideoCodecFrame + + + pending unfinished #GstVideoCodecFrame identified by @frame_number. + + + + + a #GstVideoEncoder + + + + system_frame_number of a frame + + + + + + Get all pending unfinished #GstVideoCodecFrame + + + pending unfinished #GstVideoCodecFrame. + + + + + + + a #GstVideoEncoder + + + + + + Query the configured encoding latency. Results will be returned via +@min_latency and @max_latency. + + + + + + + a #GstVideoEncoder + + + + address of variable in which to store the + configured minimum latency, or %NULL + + + + address of variable in which to store the + configured maximum latency, or %NULL + + + + + + Determines maximum possible encoding time for @frame that will +allow it to encode and arrive in time (as determined by QoS events). +In particular, a negative result means encoding in time is no longer possible +and should therefore occur as soon/skippy as possible. + +If no QoS events have been received from downstream, or if +#GstVideoEncoder:qos is disabled this function returns #G_MAXINT64. + + + max decoding time. + + + + + a #GstVideoEncoder + + + + a #GstVideoCodecFrame + + + + + + Returns the minimum force-keyunit interval, see gst_video_encoder_set_min_force_key_unit_interval() +for more details. + + + the minimum force-keyunit interval + + + + + the encoder + + + + + + Get the oldest unfinished pending #GstVideoCodecFrame + + + oldest unfinished pending #GstVideoCodecFrame + + + + + a #GstVideoEncoder + + + + + + Get the current #GstVideoCodecState + + + #GstVideoCodecState describing format of video data. + + + + + a #GstVideoEncoder + + + + + + Checks if @encoder is currently configured to handle Quality-of-Service +events from downstream. + + + %TRUE if the encoder is configured to perform Quality-of-Service. + + + + + the encoder + + + + + + Sets the video encoder tags and how they should be merged with any +upstream stream tags. This will override any tags previously-set +with gst_video_encoder_merge_tags(). + +Note that this is provided for convenience, and the subclass is +not required to use this and can still do tag handling on its own. + +MT safe. + + + + + + + a #GstVideoEncoder + + + + a #GstTagList to merge, or NULL to unset + previously-set tags + + + + the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE + + + + + + Negotiate with downstream elements to currently configured #GstVideoCodecState. +Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if +negotiate fails. + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoEncoder + + + + + + Returns caps that express @caps (or sink template caps if @caps == NULL) +restricted to resolution/format/... combinations supported by downstream +elements (e.g. muxers). + + + a #GstCaps owned by caller + + + + + a #GstVideoEncoder + + + + initial caps + + + + filter caps + + + + + + Set the codec headers to be sent downstream whenever requested. + + + + + + + a #GstVideoEncoder + + + + a list of #GstBuffer containing the codec header + + + + + + + + Informs baseclass of encoding latency. + + + + + + + a #GstVideoEncoder + + + + minimum latency + + + + maximum latency + + + + + + Sets the minimum interval for requesting keyframes based on force-keyunit +events. Setting this to 0 will allow to handle every event, setting this to +%GST_CLOCK_TIME_NONE causes force-keyunit events to be ignored. + + + + + + + the encoder + + + + minimum interval + + + + + + Request minimal value for PTS passed to handle_frame. + +For streams with reordered frames this can be used to ensure that there +is enough time to accommodate first DTS, which may be less than first PTS + + + + + + + a #GstVideoEncoder + + + + minimal PTS that will be passed to handle_frame + + + + + + Creates a new #GstVideoCodecState with the specified caps as the output state +for the encoder. +Any previously set output state on @encoder will be replaced by the newly +created one. + +The specified @caps should not contain any resolution, pixel-aspect-ratio, +framerate, codec-data, .... Those should be specified instead in the returned +#GstVideoCodecState. + +If the subclass wishes to copy over existing fields (like pixel aspect ratio, +or framerate) from an existing #GstVideoCodecState, it can be provided as a +@reference. + +If the subclass wishes to override some fields from the output state (like +pixel-aspect-ratio or framerate) it can do so on the returned #GstVideoCodecState. + +The new output state will only take effect (set on pads and buffers) starting +from the next call to #gst_video_encoder_finish_frame(). + + + the newly configured output state. + + + + + a #GstVideoEncoder + + + + the #GstCaps to use for the output + + + + An optional reference @GstVideoCodecState + + + + + + Configures @encoder to handle Quality-of-Service events from downstream. + + + + + + + the encoder + + + + the new qos value. + + + + + + Minimum interval between force-keyunit requests in nanoseconds. See +gst_video_encoder_set_min_force_key_unit_interval() for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subclasses can override any of the available virtual methods or not, as +needed. At minimum @handle_frame needs to be overridden, and @set_format +and @get_caps are likely needed as well. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %TRUE if the negotiation succeeded, else %FALSE. + + + + + a #GstVideoEncoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Field order of interlaced content. This is only valid for +interlace-mode=interleaved and not interlace-mode=mixed. In the case of +mixed or GST_VIDEO_FIELD_ORDER_UNKOWN, the field order is signalled via +buffer flags. + + unknown field order for interlaced content. + The actual field order is signalled via buffer flags. + + + top field is first + + + bottom field is first + + + Convert @order to a #GstVideoFieldOrder + + + the #GstVideoFieldOrder of @order or + #GST_VIDEO_FIELD_ORDER_UNKNOWN when @order is not a valid + string representation for a #GstVideoFieldOrder. + + + + + a field order + + + + + + Convert @order to its string representation. + + + @order as a string or NULL if @order in invalid. + + + + + a #GstVideoFieldOrder + + + + + + + Provides useful functions and a base class for video filters. + +The videofilter will by default enable QoS on the parent GstBaseTransform +to implement frame dropping. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The video filter class structure. + + + the parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extra video flags + + no flags + + + a variable fps is selected, fps_n and fps_d + denote the maximum fps of the video + + + Each color has been scaled by the alpha + value. + + + + Enum value describing the most common video formats. + +See the [GStreamer raw video format design document](https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html#formats) +for details about the layout and packing of these formats in memory. + + Unknown or unset video format id + + + Encoded video format. Only ever use that in caps for + special video formats in combination with non-system + memory GstCapsFeatures where it does not make sense + to specify a real video format. + + + planar 4:2:0 YUV + + + planar 4:2:0 YVU (like I420 but UV planes swapped) + + + packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...) + + + packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) + + + packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...) + + + sparse rgb packed into 32 bit, space last + + + sparse reverse rgb packed into 32 bit, space last + + + sparse rgb packed into 32 bit, space first + + + sparse reverse rgb packed into 32 bit, space first + + + rgb with alpha channel last + + + reverse rgb with alpha channel last + + + rgb with alpha channel first + + + reverse rgb with alpha channel first + + + RGB packed into 24 bits without padding (`R-G-B-R-G-B`) + + + reverse RGB packed into 24 bits without padding (`B-G-R-B-G-R`) + + + planar 4:1:1 YUV + + + planar 4:2:2 YUV + + + packed 4:2:2 YUV (Y0-V0-Y1-U0 Y2-V2-Y3-U2 Y4 ...) + + + planar 4:4:4 YUV + + + packed 4:2:2 10-bit YUV, complex format + + + packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order + + + planar 4:2:0 YUV with interleaved UV plane + + + planar 4:2:0 YUV with interleaved VU plane + + + 8-bit grayscale + + + 16-bit grayscale, most significant byte first + + + 16-bit grayscale, least significant byte first + + + packed 4:4:4 YUV (Y-U-V ...) + + + rgb 5-6-5 bits per component + + + reverse rgb 5-6-5 bits per component + + + rgb 5-5-5 bits per component + + + reverse rgb 5-5-5 bits per component + + + packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) + + + planar 4:4:2:0 AYUV + + + 8-bit paletted RGB + + + planar 4:1:0 YUV + + + planar 4:1:0 YUV (like YUV9 but UV planes swapped) + + + packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) + + + rgb with alpha channel first, 16 bits per channel + + + packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) + + + packed 4:4:4 RGB, 10 bits per channel + + + planar 4:2:0 YUV, 10 bits per channel + + + planar 4:2:0 YUV, 10 bits per channel + + + planar 4:2:2 YUV, 10 bits per channel + + + planar 4:2:2 YUV, 10 bits per channel + + + planar 4:4:4 YUV, 10 bits per channel (Since: 1.2) + + + planar 4:4:4 YUV, 10 bits per channel (Since: 1.2) + + + planar 4:4:4 RGB, 8 bits per channel (Since: 1.2) + + + planar 4:4:4 RGB, 10 bits per channel (Since: 1.2) + + + planar 4:4:4 RGB, 10 bits per channel (Since: 1.2) + + + planar 4:2:2 YUV with interleaved UV plane (Since: 1.2) + + + planar 4:4:4 YUV with interleaved UV plane (Since: 1.2) + + + NV12 with 64x32 tiling in zigzag pattern (Since: 1.4) + + + planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6) + + + planar 4:2:2 YUV with interleaved VU plane (Since: 1.6) + + + planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10) + + + planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10) + + + packed 4:4:4 YUV (U-Y-V ...) (Since: 1.10) + + + packed 4:2:2 YUV (V0-Y0-U0-Y1 V2-Y2-U2-Y3 V4 ...) + + + planar 4:4:4:4 ARGB, 8 bits per channel (Since: 1.12) + + + planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12) + + + planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12) + + + planar 4:4:4 RGB, 12 bits per channel (Since: 1.12) + + + planar 4:4:4 RGB, 12 bits per channel (Since: 1.12) + + + planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12) + + + planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12) + + + planar 4:2:0 YUV, 12 bits per channel (Since: 1.12) + + + planar 4:2:0 YUV, 12 bits per channel (Since: 1.12) + + + planar 4:2:2 YUV, 12 bits per channel (Since: 1.12) + + + planar 4:2:2 YUV, 12 bits per channel (Since: 1.12) + + + planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) + + + planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) + + + 10-bit grayscale, packed into 32bit words (2 bits padding) (Since: 1.14) + + + 10-bit variant of @GST_VIDEO_FORMAT_NV12, packed into 32bit words (MSB 2 bits padding) (Since: 1.14) + + + 10-bit variant of @GST_VIDEO_FORMAT_NV16, packed into 32bit words (MSB 2 bits padding) (Since: 1.14) + + + Fully packed variant of NV12_10LE32 (Since: 1.16) + + + packed 4:2:2 YUV, 10 bits per channel (Since: 1.16) + + + packed 4:4:4 YUV, 10 bits per channel(A-V-Y-U...) (Since: 1.16) + + + packed 4:4:4 YUV with alpha channel (V0-U0-Y0-A0...) (Since: 1.16) + + + packed 4:4:4 RGB with alpha channel(B-G-R-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.16) + + + packed 4:4:4 RGB with alpha channel(R-G-B-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.18) + + + planar 4:4:4 YUV, 16 bits per channel (Since: 1.18) + + + planar 4:4:4 YUV, 16 bits per channel (Since: 1.18) + + + planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18) + + + planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18) + + + planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18) + + + planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18) + + + packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18) + + + packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18) + + + packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18) + + + packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18) + + + NV12 with 4x4 tiles in linear order. + + + NV12 with 32x32 tiles in linear order. + + + Converts a FOURCC value into the corresponding #GstVideoFormat. +If the FOURCC cannot be represented by #GstVideoFormat, +#GST_VIDEO_FORMAT_UNKNOWN is returned. + + + the #GstVideoFormat describing the FOURCC value + + + + + a FOURCC value representing raw YUV video + + + + + + Find the #GstVideoFormat for the given parameters. + + + a #GstVideoFormat or GST_VIDEO_FORMAT_UNKNOWN when the parameters to +not specify a known format. + + + + + the amount of bits used for a pixel + + + + the amount of bits used to store a pixel. This value is bigger than + @depth + + + + the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN + + + + the red mask + + + + the green mask + + + + the blue mask + + + + the alpha mask, or 0 if no alpha mask + + + + + + Convert the @format string to its #GstVideoFormat. + + + the #GstVideoFormat for @format or GST_VIDEO_FORMAT_UNKNOWN when the +string is not a known format. + + + + + a format string + + + + + + Get the #GstVideoFormatInfo for @format + + + The #GstVideoFormatInfo for @format. + + + + + a #GstVideoFormat + + + + + + Get the default palette of @format. This the palette used in the pack +function for paletted formats. + + + the default palette of @format or %NULL when +@format does not have a palette. + + + + + a #GstVideoFormat + + + + size of the palette in bytes + + + + + + Converts a #GstVideoFormat value into the corresponding FOURCC. Only +a few YUV formats have corresponding FOURCC values. If @format has +no corresponding FOURCC value, 0 is returned. + + + the FOURCC corresponding to @format + + + + + a #GstVideoFormat video format + + + + + + Returns a string containing a descriptive name for +the #GstVideoFormat if there is one, or NULL otherwise. + + + the name corresponding to @format + + + + + a #GstVideoFormat video format + + + + + + + The different video flags that a format info can have. + + The video format is YUV, components are numbered + 0=Y, 1=U, 2=V. + + + The video format is RGB, components are numbered + 0=R, 1=G, 2=B. + + + The video is gray, there is one gray component + with index 0. + + + The video format has an alpha components with + the number 3. + + + The video format has data stored in little + endianness. + + + The video format has a palette. The palette + is stored in the second plane and indexes are stored in the first plane. + + + The video format has a complex layout that + can't be described with the usual information in the #GstVideoFormatInfo. + + + This format can be used in a + #GstVideoFormatUnpack and #GstVideoFormatPack function. + + + The format is tiled, there is tiling information + in the last plane. + + + + Information for a video format. + + + #GstVideoFormat + + + + string representation of the format + + + + use readable description of the format + + + + #GstVideoFormatFlags + + + + The number of bits used to pack data items. This can be less than 8 + when multiple pixels are stored in a byte. for values > 8 multiple bytes + should be read according to the endianness flag before applying the shift + and mask. + + + + the number of components in the video format. + + + + the number of bits to shift away to get the component data + + + + + + the depth in bits for each component + + + + + + the pixel stride of each component. This is the amount of + bytes to the pixel immediately to the right. When bits < 8, the stride is + expressed in bits. For 24-bit RGB, this would be 3 bytes, for example, + while it would be 4 bytes for RGBx or ARGB. + + + + + + the number of planes for this format. The number of planes can be + less than the amount of components when multiple components are packed into + one plane. + + + + the plane number where a component can be found + + + + + + the offset in the plane where the first pixel of the components + can be found. + + + + + + subsampling factor of the width for the component. Use + GST_VIDEO_SUB_SCALE to scale a width. + + + + + + subsampling factor of the height for the component. Use + GST_VIDEO_SUB_SCALE to scale a height. + + + + + + the format of the unpacked pixels. This format must have the + #GST_VIDEO_FORMAT_FLAG_UNPACK flag set. + + + + an unpack function for this format + + + + the amount of lines that will be packed + + + + an pack function for this format + + + + The tiling mode + + + + The width of a tile, in bytes, represented as a shift + + + + The height of a tile, in bytes, represented as a shift + + + + + + + + + Fill @components with the number of all the components packed in plane @p +for the format @info. A value of -1 in @components indicates that no more +components are packed in the plane. + + + + + + + #GstVideoFormatInfo + + + + a plane number + + + + array used to store component numbers + + + + + + + Packs @width pixels from @src to the given planes and strides in the +format @info. The pixels from source have each component interleaved +and will be packed into the planes in @data. + +This function operates on pack_lines lines, meaning that @src should +contain at least pack_lines lines with a stride of @sstride and @y +should be a multiple of pack_lines. + +Subsampled formats will use the horizontally and vertically cosited +component from the source. Subsampling should be performed before +packing. + +Because this function does not have a x coordinate, it is not possible to +pack pixels starting from an unaligned position. For tiled images this +means that packing should start from a tile coordinate. For subsampled +formats this means that a complete pixel needs to be packed. + + + + + + + a #GstVideoFormatInfo + + + + flags to control the packing + + + + a source array + + + + the source array stride + + + + pointers to the destination data planes + + + + strides of the destination planes + + + + the chroma siting of the target when subsampled (not used) + + + + the y position in the image to pack to + + + + the amount of pixels to pack. + + + + + + Unpacks @width pixels from the given planes and strides containing data of +format @info. The pixels will be unpacked into @dest with each component +interleaved as per @info's unpack_format, which will usually be one of +#GST_VIDEO_FORMAT_ARGB, #GST_VIDEO_FORMAT_AYUV, #GST_VIDEO_FORMAT_ARGB64 or +#GST_VIDEO_FORMAT_AYUV64 depending on the format to unpack. +@dest should at least be big enough to hold @width * bytes_per_pixel bytes +where bytes_per_pixel relates to the unpack format and will usually be +either 4 or 8 depending on the unpack format. bytes_per_pixel will be +the same as the pixel stride for plane 0 for the above formats. + +For subsampled formats, the components will be duplicated in the destination +array. Reconstruction of the missing components can be performed in a +separate step after unpacking. + + + + + + + a #GstVideoFormatInfo + + + + flags to control the unpacking + + + + a destination array + + + + pointers to the data planes + + + + strides of the planes + + + + the x position in the image to start from + + + + the y position in the image to start from + + + + the amount of pixels to unpack. + + + + + + A video frame obtained from gst_video_frame_map() + + + the #GstVideoInfo + + + + #GstVideoFrameFlags for the frame + + + + the mapped buffer + + + + pointer to metadata if any + + + + id of the mapped frame. the id can for example be used to + identify the frame in case of multiview video. + + + + pointers to the plane data + + + + + + mappings of the planes + + + + + + + + + + + Copy the contents from @src to @dest. + +Note: Since: 1.18, @dest dimensions are allowed to be +smaller than @src dimensions. + + + TRUE if the contents could be copied. + + + + + a #GstVideoFrame + + + + a #GstVideoFrame + + + + + + Copy the plane with index @plane from @src to @dest. + +Note: Since: 1.18, @dest dimensions are allowed to be +smaller than @src dimensions. + + + TRUE if the contents could be copied. + + + + + a #GstVideoFrame + + + + a #GstVideoFrame + + + + a plane + + + + + + Use @info and @buffer to fill in the values of @frame. @frame is usually +allocated on the stack, and you will pass the address to the #GstVideoFrame +structure allocated on the stack; gst_video_frame_map() will then fill in +the structures with the various video-specific information you need to access +the pixels of the video buffer. You can then use accessor macros such as +GST_VIDEO_FRAME_COMP_DATA(), GST_VIDEO_FRAME_PLANE_DATA(), +GST_VIDEO_FRAME_COMP_STRIDE(), GST_VIDEO_FRAME_PLANE_STRIDE() etc. +to get to the pixels. + +|[<!-- language="C" --> + GstVideoFrame vframe; + ... + // set RGB pixels to black one at a time + if (gst_video_frame_map (&amp;vframe, video_info, video_buffer, GST_MAP_WRITE)) { + guint8 *pixels = GST_VIDEO_FRAME_PLANE_DATA (vframe, 0); + guint stride = GST_VIDEO_FRAME_PLANE_STRIDE (vframe, 0); + guint pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (vframe, 0); + + for (h = 0; h < height; ++h) { + for (w = 0; w < width; ++w) { + guint8 *pixel = pixels + h * stride + w * pixel_stride; + + memset (pixel, 0, pixel_stride); + } + } + + gst_video_frame_unmap (&amp;vframe); + } + ... +]| + +All video planes of @buffer will be mapped and the pointers will be set in +@frame->data. + +The purpose of this function is to make it easy for you to get to the video +pixels in a generic way, without you having to worry too much about details +such as whether the video data is allocated in one contiguous memory chunk +or multiple memory chunks (e.g. one for each plane); or if custom strides +and custom plane offsets are used or not (as signalled by GstVideoMeta on +each buffer). This function will just fill the #GstVideoFrame structure +with the right values and if you use the accessor macros everything will +just work and you can access the data easily. It also maps the underlying +memory chunks for you. + + + %TRUE on success. + + + + + pointer to #GstVideoFrame + + + + a #GstVideoInfo + + + + the buffer to map + + + + #GstMapFlags + + + + + + Use @info and @buffer to fill in the values of @frame with the video frame +information of frame @id. + +When @id is -1, the default frame is mapped. When @id != -1, this function +will return %FALSE when there is no GstVideoMeta with that id. + +All video planes of @buffer will be mapped and the pointers will be set in +@frame->data. + + + %TRUE on success. + + + + + pointer to #GstVideoFrame + + + + a #GstVideoInfo + + + + the buffer to map + + + + the frame id to map + + + + #GstMapFlags + + + + + + Unmap the memory previously mapped with gst_video_frame_map. + + + + + + + a #GstVideoFrame + + + + + + + Extra video frame flags + + no flags + + + The video frame is interlaced. In mixed + interlace-mode, this flag specifies if the frame is interlaced or + progressive. + + + The video frame has the top field first + + + The video frame has the repeat flag + + + The video frame has one field + + + The video contains one or + more non-mono views + + + The video frame is the first + in a set of corresponding views provided as sequential frames. + + + The video frame has the top field only. This + is the same as GST_VIDEO_FRAME_FLAG_TFF | GST_VIDEO_FRAME_FLAG_ONEFIELD + (Since: 1.16). + + + The video frame has one field + + + The video frame has the bottom field + only. This is the same as GST_VIDEO_FRAME_FLAG_ONEFIELD + (GST_VIDEO_FRAME_FLAG_TFF flag unset) (Since: 1.16). + + + + Additional mapping flags for gst_video_frame_map(). + + Don't take another reference of the buffer and store it in + the GstVideoFrame. This makes sure that the buffer stays + writable while the frame is mapped, but requires that the + buffer reference stays valid until the frame is unmapped again. + + + Offset to define more flags + + + + The orientation of the GL texture. + + + Top line first in memory, left row first + + + Bottom line first in memory, left row first + + + Top line first in memory, right row first + + + Bottom line first in memory, right row first + + + + The GL texture type. + + + Luminance texture, GL_LUMINANCE + + + Luminance-alpha texture, GL_LUMINANCE_ALPHA + + + RGB 565 texture, GL_RGB + + + RGB texture, GL_RGB + + + RGBA texture, GL_RGBA + + + R texture, GL_RED_EXT + + + RG texture, GL_RG_EXT + + + + + + + + + + + + + + + + + + Extra buffer metadata for uploading a buffer to an OpenGL texture +ID. The caller of gst_video_gl_texture_upload_meta_upload() must +have OpenGL set up and call this from a thread where it is valid +to upload something to an OpenGL texture. + + + parent #GstMeta + + + + Orientation of the textures + + + + Number of textures that are generated + + + + Type of each texture + + + + + + + + + + + + + + + + + + + + + Uploads the buffer which owns the meta to a specific texture ID. + + + %TRUE if uploading succeeded, %FALSE otherwise. + + + + + a #GstVideoGLTextureUploadMeta + + + + the texture IDs to upload to + + + + + + + + + + + + + + disable gamma handling + + + convert between input and output gamma +Different gamma conversion modes + + + + Information describing image properties. This information can be filled +in from GstCaps with gst_video_info_from_caps(). The information is also used +to store the specific video info when mapping a video frame with +gst_video_frame_map(). + +Use the provided macros to access the info in this structure. + + + the format info of the video + + + + the interlace mode + + + + additional video flags + + + + the width of the video + + + + the height of the video + + + + the default size of one frame + + + + the number of views for multiview video + + + + a #GstVideoChromaSite. + + + + the colorimetry info + + + + the pixel-aspect-ratio numerator + + + + the pixel-aspect-ratio denominator + + + + the framerate numerator + + + + the framerate denominator + + + + offsets of the planes + + + + + + strides of the planes + + + + + + + + + + + + + + + + + + + + + + + + + + Allocate a new #GstVideoInfo that is also initialized with +gst_video_info_init(). + + + a new #GstVideoInfo. free with gst_video_info_free(). + + + + + Adjust the offset and stride fields in @info so that the padding and +stride alignment in @align is respected. + +Extra padding will be added to the right side when stride alignment padding +is required and @align will be updated with the new padding values. + + + %FALSE if alignment could not be applied, e.g. because the + size of a frame can't be represented as a 32 bit integer (Since: 1.12) + + + + + a #GstVideoInfo + + + + alignment parameters + + + + + + This variant of gst_video_info_align() provides the updated size, in bytes, +of each video plane after the alignment, including all horizontal and vertical +paddings. + +In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, the returned sizes are the +ones used to hold a single field, not the full frame. + + + %FALSE if alignment could not be applied, e.g. because the + size of a frame can't be represented as a 32 bit integer + + + + + a #GstVideoInfo + + + + alignment parameters + + + + array used to store the plane sizes + + + + + + Converts among various #GstFormat types. This function handles +GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For +raw video, GST_FORMAT_DEFAULT corresponds to video frames. This +function can be used to handle pad queries of the type GST_QUERY_CONVERT. + + + TRUE if the conversion was successful. + + + + + a #GstVideoInfo + + + + #GstFormat of the @src_value + + + + value to convert + + + + #GstFormat of the @dest_value + + + + pointer to destination value + + + + + + Copy a GstVideoInfo structure. + + + a new #GstVideoInfo. free with gst_video_info_free. + + + + + a #GstVideoInfo + + + + + + Free a GstVideoInfo structure previously allocated with gst_video_info_new() +or gst_video_info_copy(). + + + + + + + a #GstVideoInfo + + + + + + Parse @caps and update @info. + + + TRUE if @caps could be parsed + + + + + a #GstVideoInfo + + + + a #GstCaps + + + + + + Initialize @info with default values. + + + + + + + a #GstVideoInfo + + + + + + Compares two #GstVideoInfo and returns whether they are equal or not + + + %TRUE if @info and @other are equal, else %FALSE. + + + + + a #GstVideoInfo + + + + a #GstVideoInfo + + + + + + Set the default info for a video frame of @format and @width and @height. + +Note: This initializes @info first, no values are preserved. This function +does not set the offsets correctly for interlaced vertically +subsampled formats. + + + %FALSE if the returned video info is invalid, e.g. because the + size of a frame can't be represented as a 32 bit integer (Since: 1.12) + + + + + a #GstVideoInfo + + + + the format + + + + a width + + + + a height + + + + + + Same as #gst_video_info_set_format but also allowing to set the interlaced +mode. + + + %FALSE if the returned video info is invalid, e.g. because the + size of a frame can't be represented as a 32 bit integer. + + + + + a #GstVideoInfo + + + + the format + + + + a #GstVideoInterlaceMode + + + + a width + + + + a height + + + + + + Convert the values of @info into a #GstCaps. + + + a new #GstCaps containing the info of @info. + + + + + a #GstVideoInfo + + + + + + + The possible values of the #GstVideoInterlaceMode describing the interlace +mode of the stream. + + all frames are progressive + + + 2 fields are interleaved in one video + frame. Extra buffer flags describe the field order. + + + frames contains both interlaced and + progressive video, the buffer flags describe the frame and fields. + + + 2 fields are stored in one buffer, use the + frame ID to get access to the required field. For multiview (the + 'views' property > 1) the fields of view N can be found at frame ID + (N * 2) and (N * 2) + 1. + Each field has only half the amount of lines as noted in the + height property. This mode requires multiple GstVideoMeta metadata + to describe the fields. + + + 1 field is stored in one buffer, + @GST_VIDEO_BUFFER_FLAG_TF or @GST_VIDEO_BUFFER_FLAG_BF indicates if + the buffer is carrying the top or bottom field, respectively. The top and + bottom buffers must alternate in the pipeline, with this mode + (Since: 1.16). + + + Convert @mode to a #GstVideoInterlaceMode + + + the #GstVideoInterlaceMode of @mode or + #GST_VIDEO_INTERLACE_MODE_PROGRESSIVE when @mode is not a valid + string representation for a #GstVideoInterlaceMode. + + + + + a mode + + + + + + Convert @mode to its string representation. + + + @mode as a string or NULL if @mode in invalid. + + + + + a #GstVideoInterlaceMode + + + + + + + Mastering display color volume information defined by SMPTE ST 2086 +(a.k.a static HDR metadata). + + + the xy coordinates of primaries in the CIE 1931 color space. + the index 0 contains red, 1 is for green and 2 is for blue. + each value is normalized to 50000 (meaning that in unit of 0.00002) + + + + + + the xy coordinates of white point in the CIE 1931 color space. + each value is normalized to 50000 (meaning that in unit of 0.00002) + + + + the maximum value of display luminance + in unit of 0.0001 candelas per square metre (cd/m^2 and nit) + + + + the minimum value of display luminance + in unit of 0.0001 candelas per square metre (cd/m^2 and nit) + + + + + + + + + Set string representation of @minfo to @caps + + + %TRUE if @minfo was successfully set to @caps + + + + + a #GstVideoMasteringDisplayInfo + + + + a #GstCaps + + + + + + Parse @caps and update @minfo + + + %TRUE if @caps has #GstVideoMasteringDisplayInfo and could be parsed + + + + + a #GstVideoMasteringDisplayInfo + + + + a #GstCaps + + + + + + Initialize @minfo + + + + + + + a #GstVideoMasteringDisplayInfo + + + + + + Checks equality between @minfo and @other. + + + %TRUE if @minfo and @other are equal. + + + + + a #GstVideoMasteringDisplayInfo + + + + a #GstVideoMasteringDisplayInfo + + + + + + Convert @minfo to its string representation + + + a string representation of @minfo + + + + + a #GstVideoMasteringDisplayInfo + + + + + + Extract #GstVideoMasteringDisplayInfo from @mastering + + + %TRUE if @minfo was filled with @mastering + + + + + a #GstVideoMasteringDisplayInfo + + + + a #GstStructure representing #GstVideoMasteringDisplayInfo + + + + + + + Used to represent display_primaries and white_point of +#GstVideoMasteringDisplayInfo struct. See #GstVideoMasteringDisplayInfo + + + the x coordinate of CIE 1931 color space in unit of 0.00002. + + + + the y coordinate of CIE 1931 color space in unit of 0.00002. + + + + + Different color matrix conversion modes + + do conversion between color matrices + + + use the input color matrix to convert + to and from R'G'B + + + use the output color matrix to convert + to and from R'G'B + + + disable color matrix conversion. + + + + Extra buffer metadata describing image properties + +This meta can also be used by downstream elements to specifiy their +buffer layout requirements for upstream. Upstream should try to +fit those requirements, if possible, in order to prevent buffer copies. + +This is done by passing a custom #GstStructure to +gst_query_add_allocation_meta() when handling the ALLOCATION query. +This structure should be named 'video-meta' and can have the following +fields: +- padding-top (uint): extra pixels on the top +- padding-bottom (uint): extra pixels on the bottom +- padding-left (uint): extra pixels on the left side +- padding-right (uint): extra pixels on the right side +The padding fields have the same semantic as #GstVideoMeta.alignment +and so represent the paddings requested on produced video buffers. + + + parent #GstMeta + + + + the buffer this metadata belongs to + + + + additional video flags + + + + the video format + + + + identifier of the frame + + + + the video width + + + + the video height + + + + the number of planes in the image + + + + array of offsets for the planes. This field might not always be + valid, it is used by the default implementation of @map. + + + + + + array of strides for the planes. This field might not always be + valid, it is used by the default implementation of @map. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the paddings and alignment constraints of the video buffer. +It is up to the caller of `gst_buffer_add_video_meta_full()` to set it +using gst_video_meta_set_alignment(), if they did not it defaults +to no padding and no alignment. Since: 1.18 + + + + Compute the padded height of each plane from @meta (padded size +divided by stride). + +It is not valid to call this function with a meta associated to a +TILED video format. + + + %TRUE if @meta's alignment is valid and @plane_height has been +updated, %FALSE otherwise + + + + + a #GstVideoMeta + + + + array used to store the plane height + + + + + + Compute the size, in bytes, of each video plane described in @meta including +any padding and alignment constraint defined in @meta->alignment. + + + %TRUE if @meta's alignment is valid and @plane_size has been +updated, %FALSE otherwise + + + + + a #GstVideoMeta + + + + array used to store the plane sizes + + + + + + Map the video plane with index @plane in @meta and return a pointer to the +first byte of the plane and the stride of the plane. + + + TRUE if the map operation was successful. + + + + + a #GstVideoMeta + + + + a plane + + + + a #GstMapInfo + + + + the data of @plane + + + + the stride of @plane + + + + @GstMapFlags + + + + + + Set the alignment of @meta to @alignment. This function checks that +the paddings defined in @alignment are compatible with the strides +defined in @meta and will fail to update if they are not. + + + %TRUE if @alignment's meta has been updated, %FALSE if not + + + + + a #GstVideoMeta + + + + a #GstVideoAlignment + + + + + + Unmap a previously mapped plane with gst_video_meta_map(). + + + TRUE if the memory was successfully unmapped. + + + + + a #GstVideoMeta + + + + a plane + + + + a #GstMapInfo + + + + + + + + + + + + + Extra data passed to a video transform #GstMetaTransformFunction such as: +"gst-video-scale". + + + the input #GstVideoInfo + + + + the output #GstVideoInfo + + + + Get the #GQuark for the "gst-video-scale" metadata transform operation. + + + a #GQuark + + + + + + GstVideoMultiviewFlags are used to indicate extra properties of a +stereo/multiview stream beyond the frame layout and buffer mapping +that is conveyed in the #GstVideoMultiviewMode. + + No flags + + + For stereo streams, the + normal arrangement of left and right views is reversed. + + + The left view is vertically + mirrored. + + + The left view is horizontally + mirrored. + + + The right view is + vertically mirrored. + + + The right view is + horizontally mirrored. + + + For frame-packed + multiview modes, indicates that the individual + views have been encoded with half the true width or height + and should be scaled back up for display. This flag + is used for overriding input layout interpretation + by adjusting pixel-aspect-ratio. + For side-by-side, column interleaved or checkerboard packings, the + pixel width will be doubled. For row interleaved and top-bottom + encodings, pixel height will be doubled. + + + The video stream contains both + mono and multiview portions, signalled on each buffer by the + absence or presence of the @GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW + buffer flag. + + + + See #GstVideoMultiviewFlags. + + + #GstVideoMultiviewFramePacking represents the subset of #GstVideoMultiviewMode +values that can be applied to any video frame without needing extra metadata. +It can be used by elements that provide a property to override the +multiview interpretation of a video stream when the video doesn't contain +any markers. + +This enum is used (for example) on playbin, to re-interpret a played +video stream as a stereoscopic video. The individual enum values are +equivalent to and have the same value as the matching #GstVideoMultiviewMode. + + A special value indicating +no frame packing info. + + + All frames are monoscopic. + + + All frames represent a left-eye view. + + + All frames represent a right-eye view. + + + Left and right eye views are +provided in the left and right half of the frame respectively. + + + Left and right eye +views are provided in the left and right half of the frame, but +have been sampled using quincunx method, with half-pixel offset +between the 2 views. + + + Alternating vertical +columns of pixels represent the left and right eye view respectively. + + + Alternating horizontal +rows of pixels represent the left and right eye view respectively. + + + The top half of the frame +contains the left eye, and the bottom half the right eye. + + + Pixels are arranged with +alternating pixels representing left and right eye views in a +checkerboard fashion. + + + + All possible stereoscopic 3D and multiview representations. +In conjunction with #GstVideoMultiviewFlags, describes how +multiview content is being transported in the stream. + + A special value indicating +no multiview information. Used in GstVideoInfo and other places to +indicate that no specific multiview handling has been requested or +provided. This value is never carried on caps. + + + All frames are monoscopic. + + + All frames represent a left-eye view. + + + All frames represent a right-eye view. + + + Left and right eye views are +provided in the left and right half of the frame respectively. + + + Left and right eye +views are provided in the left and right half of the frame, but +have been sampled using quincunx method, with half-pixel offset +between the 2 views. + + + Alternating vertical +columns of pixels represent the left and right eye view respectively. + + + Alternating horizontal +rows of pixels represent the left and right eye view respectively. + + + The top half of the frame +contains the left eye, and the bottom half the right eye. + + + Pixels are arranged with +alternating pixels representing left and right eye views in a +checkerboard fashion. + + + Left and right eye views +are provided in separate frames alternately. + + + Multiple +independent views are provided in separate frames in sequence. +This method only applies to raw video buffers at the moment. +Specific view identification is via the `GstVideoMultiviewMeta` +and #GstVideoMeta(s) on raw video buffers. + + + Multiple views are +provided as separate #GstMemory framebuffers attached to each +#GstBuffer, described by the `GstVideoMultiviewMeta` +and #GstVideoMeta(s) + + + + + The #GstVideoMultiviewMode value + +Given a string from a caps multiview-mode field, +output the corresponding #GstVideoMultiviewMode +or #GST_VIDEO_MULTIVIEW_MODE_NONE + + + + + multiview-mode field string from caps + + + + + + + + The caps string representation of the mode, or NULL if invalid. + +Given a #GstVideoMultiviewMode returns the multiview-mode caps string +for insertion into a caps structure + + + + + A #GstVideoMultiviewMode value + + + + + + + The interface allows unified access to control flipping and autocenter +operation of video-sources or operators. + + + Get the horizontal centering offset from the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the horizontal flipping state (%TRUE for flipped) from the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the vertical centering offset from the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the vertical flipping state (%TRUE for flipped) from the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Set the horizontal centering offset for the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + Set the horizontal flipping state (%TRUE for flipped) for the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + Set the vertical centering offset for the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + Set the vertical flipping state (%TRUE for flipped) for the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + Get the horizontal centering offset from the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the horizontal flipping state (%TRUE for flipped) from the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the vertical centering offset from the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Get the vertical flipping state (%TRUE for flipped) from the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + Set the horizontal centering offset for the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + Set the horizontal flipping state (%TRUE for flipped) for the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + Set the vertical centering offset for the given object. + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + Set the vertical flipping state (%TRUE for flipped) for the given object. + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + + #GstVideoOrientationInterface interface. + + + parent interface type. + + + + + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + + + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + + + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + + + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + return location for the result + + + + + + + + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + + + + + %TRUE in case the element supports flipping + + + + + #GstVideoOrientation interface of a #GstElement + + + + use flipping + + + + + + + + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + + + + + %TRUE in case the element supports centering + + + + + #GstVideoOrientation interface of a #GstElement + + + + centering offset + + + + + + + + The different video orientation methods. + + Identity (no rotation) + + + Rotate clockwise 90 degrees + + + Rotate 180 degrees + + + Rotate counter-clockwise 90 degrees + + + Flip horizontally + + + Flip vertically + + + Flip across upper left/lower right diagonal + + + Flip across upper right/lower left diagonal + + + Select flip method based on image-orientation tag + + + Current status depends on plugin internal setup + + + + The #GstVideoOverlay interface is used for 2 main purposes : + +* To get a grab on the Window where the video sink element is going to render. + This is achieved by either being informed about the Window identifier that + the video sink element generated, or by forcing the video sink element to use + a specific Window identifier for rendering. +* To force a redrawing of the latest video frame the video sink element + displayed on the Window. Indeed if the #GstPipeline is in #GST_STATE_PAUSED + state, moving the Window around will damage its content. Application + developers will want to handle the Expose events themselves and force the + video sink element to refresh the Window's content. + +Using the Window created by the video sink is probably the simplest scenario, +in some cases, though, it might not be flexible enough for application +developers if they need to catch events such as mouse moves and button +clicks. + +Setting a specific Window identifier on the video sink element is the most +flexible solution but it has some issues. Indeed the application needs to set +its Window identifier at the right time to avoid internal Window creation +from the video sink element. To solve this issue a #GstMessage is posted on +the bus to inform the application that it should set the Window identifier +immediately. Here is an example on how to do that correctly: +|[ +static GstBusSyncReply +create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) +{ + // ignore anything but 'prepare-window-handle' element messages + if (!gst_is_video_overlay_prepare_window_handle_message (message)) + return GST_BUS_PASS; + + win = XCreateSimpleWindow (disp, root, 0, 0, 320, 240, 0, 0, 0); + + XSetWindowBackgroundPixmap (disp, win, None); + + XMapRaised (disp, win); + + XSync (disp, FALSE); + + gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), + win); + + gst_message_unref (message); + + return GST_BUS_DROP; +} +... +int +main (int argc, char **argv) +{ +... + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, pipeline, + NULL); +... +} +]| + +## Two basic usage scenarios + +There are two basic usage scenarios: in the simplest case, the application +uses #playbin or #playsink or knows exactly what particular element is used +for video output, which is usually the case when the application creates +the videosink to use (e.g. #xvimagesink, #ximagesink, etc.) itself; in this +case, the application can just create the videosink element, create and +realize the window to render the video on and then +call gst_video_overlay_set_window_handle() directly with the XID or native +window handle, before starting up the pipeline. +As #playbin and #playsink implement the video overlay interface and proxy +it transparently to the actual video sink even if it is created later, this +case also applies when using these elements. + +In the other and more common case, the application does not know in advance +what GStreamer video sink element will be used for video output. This is +usually the case when an element such as #autovideosink is used. +In this case, the video sink element itself is created +asynchronously from a GStreamer streaming thread some time after the +pipeline has been started up. When that happens, however, the video sink +will need to know right then whether to render onto an already existing +application window or whether to create its own window. This is when it +posts a prepare-window-handle message, and that is also why this message needs +to be handled in a sync bus handler which will be called from the streaming +thread directly (because the video sink will need an answer right then). + +As response to the prepare-window-handle element message in the bus sync +handler, the application may use gst_video_overlay_set_window_handle() to tell +the video sink to render onto an existing window surface. At this point the +application should already have obtained the window handle / XID, so it +just needs to set it. It is generally not advisable to call any GUI toolkit +functions or window system functions from the streaming thread in which the +prepare-window-handle message is handled, because most GUI toolkits and +windowing systems are not thread-safe at all and a lot of care would be +required to co-ordinate the toolkit and window system calls of the +different threads (Gtk+ users please note: prior to Gtk+ 2.18 +`GDK_WINDOW_XID` was just a simple structure access, so generally fine to do +within the bus sync handler; this macro was changed to a function call in +Gtk+ 2.18 and later, which is likely to cause problems when called from a +sync handler; see below for a better approach without `GDK_WINDOW_XID` +used in the callback). + +## GstVideoOverlay and Gtk+ + +|[ +#include &lt;gst/video/videooverlay.h&gt; +#include &lt;gtk/gtk.h&gt; +#ifdef GDK_WINDOWING_X11 +#include &lt;gdk/gdkx.h&gt; // for GDK_WINDOW_XID +#endif +#ifdef GDK_WINDOWING_WIN32 +#include &lt;gdk/gdkwin32.h&gt; // for GDK_WINDOW_HWND +#endif +... +static guintptr video_window_handle = 0; +... +static GstBusSyncReply +bus_sync_handler (GstBus * bus, GstMessage * message, gpointer user_data) +{ + // ignore anything but 'prepare-window-handle' element messages + if (!gst_is_video_overlay_prepare_window_handle_message (message)) + return GST_BUS_PASS; + + if (video_window_handle != 0) { + GstVideoOverlay *overlay; + + // GST_MESSAGE_SRC (message) will be the video sink element + overlay = GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)); + gst_video_overlay_set_window_handle (overlay, video_window_handle); + } else { + g_warning ("Should have obtained video_window_handle by now!"); + } + + gst_message_unref (message); + return GST_BUS_DROP; +} +... +static void +video_widget_realize_cb (GtkWidget * widget, gpointer data) +{ +#if GTK_CHECK_VERSION(2,18,0) + // Tell Gtk+/Gdk to create a native window for this widget instead of + // drawing onto the parent widget. + // This is here just for pedagogical purposes, GDK_WINDOW_XID will call + // it as well in newer Gtk versions + if (!gdk_window_ensure_native (widget->window)) + g_error ("Couldn't create native window needed for GstVideoOverlay!"); +#endif + +#ifdef GDK_WINDOWING_X11 + { + gulong xid = GDK_WINDOW_XID (gtk_widget_get_window (video_window)); + video_window_handle = xid; + } +#endif +#ifdef GDK_WINDOWING_WIN32 + { + HWND wnd = GDK_WINDOW_HWND (gtk_widget_get_window (video_window)); + video_window_handle = (guintptr) wnd; + } +#endif +} +... +int +main (int argc, char **argv) +{ + GtkWidget *video_window; + GtkWidget *app_window; + ... + app_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + ... + video_window = gtk_drawing_area_new (); + g_signal_connect (video_window, "realize", + G_CALLBACK (video_widget_realize_cb), NULL); + gtk_widget_set_double_buffered (video_window, FALSE); + ... + // usually the video_window will not be directly embedded into the + // application window like this, but there will be many other widgets + // and the video window will be embedded in one of them instead + gtk_container_add (GTK_CONTAINER (ap_window), video_window); + ... + // show the GUI + gtk_widget_show_all (app_window); + + // realize window now so that the video window gets created and we can + // obtain its XID/HWND before the pipeline is started up and the videosink + // asks for the XID/HWND of the window to render onto + gtk_widget_realize (video_window); + + // we should have the XID/HWND now + g_assert (video_window_handle != 0); + ... + // set up sync handler for setting the xid once the pipeline is started + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler, NULL, + NULL); + gst_object_unref (bus); + ... + gst_element_set_state (pipeline, GST_STATE_PLAYING); + ... +} +]| + +## GstVideoOverlay and Qt + +|[ +#include <glib.h>; +#include <gst/gst.h>; +#include <gst/video/videooverlay.h>; + +#include <QApplication>; +#include <QTimer>; +#include <QWidget>; + +int main(int argc, char *argv[]) +{ + if (!g_thread_supported ()) + g_thread_init (NULL); + + gst_init (&argc, &argv); + QApplication app(argc, argv); + app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit ())); + + // prepare the pipeline + + GstElement *pipeline = gst_pipeline_new ("xvoverlay"); + GstElement *src = gst_element_factory_make ("videotestsrc", NULL); + GstElement *sink = gst_element_factory_make ("xvimagesink", NULL); + gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL); + gst_element_link (src, sink); + + // prepare the ui + + QWidget window; + window.resize(320, 240); + window.show(); + + WId xwinid = window.winId(); + gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), xwinid); + + // run the pipeline + + GstStateChangeReturn sret = gst_element_set_state (pipeline, + GST_STATE_PLAYING); + if (sret == GST_STATE_CHANGE_FAILURE) { + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + // Exit application + QTimer::singleShot(0, QApplication::activeWindow(), SLOT(quit())); + } + + int ret = app.exec(); + + window.hide(); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + + return ret; +} +]| + + + This helper shall be used by classes implementing the #GstVideoOverlay +interface that want the render rectangle to be controllable using +properties. This helper will install "render-rectangle" property into the +class. + + + + + + + The class on which the properties will be installed + + + + The first free property ID to use + + + + + + This helper shall be used by classes implementing the #GstVideoOverlay +interface that want the render rectangle to be controllable using +properties. This helper will parse and set the render rectangle calling +gst_video_overlay_set_render_rectangle(). + + + %TRUE if the @property_id matches the GstVideoOverlay property + + + + + The instance on which the property is set + + + + The highest property ID. + + + + The property ID + + + + The #GValue to be set + + + + + + Tell an overlay that it has been exposed. This will redraw the current frame +in the drawable even if the pipeline is PAUSED. + + + + + + + a #GstVideoOverlay to expose. + + + + + + Tell an overlay that it should handle events from the window system. These +events are forwarded upstream as navigation events. In some window system, +events are not propagated in the window hierarchy if a client is listening +for them. This method allows you to disable events handling completely +from the #GstVideoOverlay. + + + + + + + a #GstVideoOverlay to expose. + + + + a #gboolean indicating if events should be handled or not. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This will call the video overlay's set_window_handle method. You +should use this method to tell to an overlay to display video output to a +specific window (e.g. an XWindow on X11). Passing 0 as the @handle will +tell the overlay to stop using that window and create an internal one. + + + + + + + a #GstVideoOverlay to set the window on. + + + + a handle referencing the window. + + + + + + Tell an overlay that it has been exposed. This will redraw the current frame +in the drawable even if the pipeline is PAUSED. + + + + + + + a #GstVideoOverlay to expose. + + + + + + This will post a "have-window-handle" element message on the bus. + +This function should only be used by video overlay plugin developers. + + + + + + + a #GstVideoOverlay which got a window + + + + a platform-specific handle referencing the window + + + + + + Tell an overlay that it should handle events from the window system. These +events are forwarded upstream as navigation events. In some window system, +events are not propagated in the window hierarchy if a client is listening +for them. This method allows you to disable events handling completely +from the #GstVideoOverlay. + + + + + + + a #GstVideoOverlay to expose. + + + + a #gboolean indicating if events should be handled or not. + + + + + + This will post a "prepare-window-handle" element message on the bus +to give applications an opportunity to call +gst_video_overlay_set_window_handle() before a plugin creates its own +window. + +This function should only be used by video overlay plugin developers. + + + + + + + a #GstVideoOverlay which does not yet have an Window handle set + + + + + + Configure a subregion as a video target within the window set by +gst_video_overlay_set_window_handle(). If this is not used or not supported +the video will fill the area of the window set as the overlay to 100%. +By specifying the rectangle, the video can be overlayed to a specific region +of that window only. After setting the new rectangle one should call +gst_video_overlay_expose() to force a redraw. To unset the region pass -1 for +the @width and @height parameters. + +This method is needed for non fullscreen video overlay in UI toolkits that +do not support subwindows. + + + %FALSE if not supported by the sink. + + + + + a #GstVideoOverlay + + + + the horizontal offset of the render area inside the window + + + + the vertical offset of the render area inside the window + + + + the width of the render area inside the window + + + + the height of the render area inside the window + + + + + + This will call the video overlay's set_window_handle method. You +should use this method to tell to an overlay to display video output to a +specific window (e.g. an XWindow on X11). Passing 0 as the @handle will +tell the overlay to stop using that window and create an internal one. + + + + + + + a #GstVideoOverlay to set the window on. + + + + a handle referencing the window. + + + + + + + Functions to create and handle overlay compositions on video buffers. + +An overlay composition describes one or more overlay rectangles to be +blended on top of a video buffer. + +This API serves two main purposes: + +* it can be used to attach overlay information (subtitles or logos) + to non-raw video buffers such as GL/VAAPI/VDPAU surfaces. The actual + blending of the overlay can then be done by e.g. the video sink that + processes these non-raw buffers. + +* it can also be used to blend overlay rectangles on top of raw video + buffers, thus consolidating blending functionality for raw video in + one place. + +Together, this allows existing overlay elements to easily handle raw +and non-raw video as input in without major changes (once the overlays +have been put into a #GstVideoOverlayComposition object anyway) - for raw +video the overlay can just use the blending function to blend the data +on top of the video, and for surface buffers it can just attach them to +the buffer and let the sink render the overlays. + + + Creates a new video overlay composition object to hold one or more +overlay rectangles. + + + a new #GstVideoOverlayComposition. Unref with + gst_video_overlay_composition_unref() when no longer needed. + + + + + a #GstVideoOverlayRectangle to add to the + composition + + + + + + Adds an overlay rectangle to an existing overlay composition object. This +must be done right after creating the overlay composition. + + + + + + + a #GstVideoOverlayComposition + + + + a #GstVideoOverlayRectangle to add to the + composition + + + + + + Blends the overlay rectangles in @comp on top of the raw video data +contained in @video_buf. The data in @video_buf must be writable and +mapped appropriately. + +Since @video_buf data is read and will be modified, it ought be +mapped with flag GST_MAP_READWRITE. + + + + + + + a #GstVideoOverlayComposition + + + + a #GstVideoFrame containing raw video data in a + supported format. It should be mapped using GST_MAP_READWRITE + + + + + + Makes a copy of @comp and all contained rectangles, so that it is possible +to modify the composition and contained rectangles (e.g. add additional +rectangles or change the render co-ordinates or render dimension). The +actual overlay pixel data buffers contained in the rectangles are not +copied. + + + a new #GstVideoOverlayComposition equivalent + to @comp. + + + + + a #GstVideoOverlayComposition to copy + + + + + + Returns the @n-th #GstVideoOverlayRectangle contained in @comp. + + + the @n-th rectangle, or NULL if @n is out of + bounds. Will not return a new reference, the caller will need to + obtain her own reference using gst_video_overlay_rectangle_ref() + if needed. + + + + + a #GstVideoOverlayComposition + + + + number of the rectangle to get + + + + + + Returns the sequence number of this composition. Sequence numbers are +monotonically increasing and unique for overlay compositions and rectangles +(meaning there will never be a rectangle with the same sequence number as +a composition). + + + the sequence number of @comp + + + + + a #GstVideoOverlayComposition + + + + + + Takes ownership of @comp and returns a version of @comp that is writable +(i.e. can be modified). Will either return @comp right away, or create a +new writable copy of @comp and unref @comp itself. All the contained +rectangles will also be copied, but the actual overlay pixel data buffers +contained in the rectangles are not copied. + + + a writable #GstVideoOverlayComposition + equivalent to @comp. + + + + + a #GstVideoOverlayComposition to copy + + + + + + Returns the number of #GstVideoOverlayRectangle<!-- -->s contained in @comp. + + + the number of rectangles + + + + + a #GstVideoOverlayComposition + + + + + + + Extra buffer metadata describing image overlay data. + + + parent #GstMeta + + + + the attached #GstVideoOverlayComposition + + + + + + + + + + + Overlay format flags. + + no flags + + + RGB are premultiplied by A/255. + + + a global-alpha value != 1 is set. + + + + #GstVideoOverlay interface + + + parent interface type. + + + + + + + + + + + a #GstVideoOverlay to expose. + + + + + + + + + + + + + + a #GstVideoOverlay to expose. + + + + a #gboolean indicating if events should be handled or not. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstVideoOverlay to set the window on. + + + + a handle referencing the window. + + + + + + + + An opaque video overlay rectangle object. A rectangle contains a single +overlay rectangle which can be added to a composition. + + + Creates a new video overlay rectangle with ARGB or AYUV pixel data. +The layout in case of ARGB of the components in memory is B-G-R-A +on little-endian platforms +(corresponding to #GST_VIDEO_FORMAT_BGRA) and A-R-G-B on big-endian +platforms (corresponding to #GST_VIDEO_FORMAT_ARGB). In other words, +pixels are treated as 32-bit words and the lowest 8 bits then contain +the blue component value and the highest 8 bits contain the alpha +component value. Unless specified in the flags, the RGB values are +non-premultiplied. This is the format that is used by most hardware, +and also many rendering libraries such as Cairo, for example. +The pixel data buffer must have #GstVideoMeta set. + + + a new #GstVideoOverlayRectangle. Unref with + gst_video_overlay_rectangle_unref() when no longer needed. + + + + + a #GstBuffer pointing to the pixel memory + + + + the X co-ordinate on the video where the top-left corner of this + overlay rectangle should be rendered to + + + + the Y co-ordinate on the video where the top-left corner of this + overlay rectangle should be rendered to + + + + the render width of this rectangle on the video + + + + the render height of this rectangle on the video + + + + flags + + + + + + Makes a copy of @rectangle, so that it is possible to modify it +(e.g. to change the render co-ordinates or render dimension). The +actual overlay pixel data buffers contained in the rectangle are not +copied. + + + a new #GstVideoOverlayRectangle equivalent + to @rectangle. + + + + + a #GstVideoOverlayRectangle to copy + + + + + + Retrieves the flags associated with a #GstVideoOverlayRectangle. +This is useful if the caller can handle both premultiplied alpha and +non premultiplied alpha, for example. By knowing whether the rectangle +uses premultiplied or not, it can request the pixel data in the format +it is stored in, to avoid unnecessary conversion. + + + the #GstVideoOverlayFormatFlags associated with the rectangle. + + + + + a #GstVideoOverlayRectangle + + + + + + Retrieves the global-alpha value associated with a #GstVideoOverlayRectangle. + + + the global-alpha value associated with the rectangle. + + + + + a #GstVideoOverlayRectangle + + + + + + + + a #GstBuffer holding the ARGB pixel data with + width and height of the render dimensions as per + gst_video_overlay_rectangle_get_render_rectangle(). This function does + not return a reference, the caller should obtain a reference of her own + with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + + + a #GstBuffer holding the AYUV pixel data with + width and height of the render dimensions as per + gst_video_overlay_rectangle_get_render_rectangle(). This function does + not return a reference, the caller should obtain a reference of her own + with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + + + a #GstBuffer holding the pixel data with + format as originally provided and specified in video meta with + width and height of the render dimensions as per + gst_video_overlay_rectangle_get_render_rectangle(). This function does + not return a reference, the caller should obtain a reference of her own + with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + Retrieves the pixel data as it is. This is useful if the caller can +do the scaling itself when handling the overlaying. The rectangle will +need to be scaled to the render dimensions, which can be retrieved using +gst_video_overlay_rectangle_get_render_rectangle(). + + + a #GstBuffer holding the ARGB pixel data with + #GstVideoMeta set. This function does not return a reference, the caller + should obtain a reference of her own with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags. + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + Retrieves the pixel data as it is. This is useful if the caller can +do the scaling itself when handling the overlaying. The rectangle will +need to be scaled to the render dimensions, which can be retrieved using +gst_video_overlay_rectangle_get_render_rectangle(). + + + a #GstBuffer holding the AYUV pixel data with + #GstVideoMeta set. This function does not return a reference, the caller + should obtain a reference of her own with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags. + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + Retrieves the pixel data as it is. This is useful if the caller can +do the scaling itself when handling the overlaying. The rectangle will +need to be scaled to the render dimensions, which can be retrieved using +gst_video_overlay_rectangle_get_render_rectangle(). + + + a #GstBuffer holding the pixel data with + #GstVideoMeta set. This function does not return a reference, the caller + should obtain a reference of her own with gst_buffer_ref() if needed. + + + + + a #GstVideoOverlayRectangle + + + + flags. + If a global_alpha value != 1 is set for the rectangle, the caller + should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag + if he wants to apply global-alpha himself. If the flag is not set + global_alpha is applied internally before returning the pixel-data. + + + + + + Retrieves the render position and render dimension of the overlay +rectangle on the video. + + + TRUE if valid render dimensions were retrieved. + + + + + a #GstVideoOverlayRectangle + + + + address where to store the X render offset + + + + address where to store the Y render offset + + + + address where to store the render width + + + + address where to store the render height + + + + + + Returns the sequence number of this rectangle. Sequence numbers are +monotonically increasing and unique for overlay compositions and rectangles +(meaning there will never be a rectangle with the same sequence number as +a composition). + +Using the sequence number of a rectangle as an indicator for changed +pixel-data of a rectangle is dangereous. Some API calls, like e.g. +gst_video_overlay_rectangle_set_global_alpha(), automatically update +the per rectangle sequence number, which is misleading for renderers/ +consumers, that handle global-alpha themselves. For them the +pixel-data returned by gst_video_overlay_rectangle_get_pixels_*() +won't be different for different global-alpha values. In this case a +renderer could also use the GstBuffer pointers as a hint for changed +pixel-data. + + + the sequence number of @rectangle + + + + + a #GstVideoOverlayRectangle + + + + + + Sets the global alpha value associated with a #GstVideoOverlayRectangle. Per- +pixel alpha values are multiplied with this value. Valid +values: 0 <= global_alpha <= 1; 1 to deactivate. + +@rectangle must be writable, meaning its refcount must be 1. You can +make the rectangles inside a #GstVideoOverlayComposition writable using +gst_video_overlay_composition_make_writable() or +gst_video_overlay_composition_copy(). + + + + + + + a #GstVideoOverlayRectangle + + + + Global alpha value (0 to 1.0) + + + + + + Sets the render position and dimensions of the rectangle on the video. +This function is mainly for elements that modify the size of the video +in some way (e.g. through scaling or cropping) and need to adjust the +details of any overlays to match the operation that changed the size. + +@rectangle must be writable, meaning its refcount must be 1. You can +make the rectangles inside a #GstVideoOverlayComposition writable using +gst_video_overlay_composition_make_writable() or +gst_video_overlay_composition_copy(). + + + + + + + a #GstVideoOverlayRectangle + + + + render X position of rectangle on video + + + + render Y position of rectangle on video + + + + render width of rectangle + + + + render height of rectangle + + + + + + + The different flags that can be used when packing and unpacking. + + No flag + + + When the source has a smaller depth + than the target format, set the least significant bits of the target + to 0. This is likely slightly faster but less accurate. When this flag + is not specified, the most significant bits of the source are duplicated + in the least significant bits of the destination. + + + The source is interlaced. The unpacked + format will be interlaced as well with each line containing + information from alternating fields. (Since: 1.2) + + + + Different primaries conversion modes + + disable conversion between primaries + + + do conversion between primaries only + when it can be merged with color matrix conversion. + + + fast conversion between primaries + + + + Helper structure representing a rectangular area. + + + X coordinate of rectangle's top-left point + + + + Y coordinate of rectangle's top-left point + + + + width of the rectangle + + + + height of the rectangle + + + + + Extra buffer metadata describing an image region of interest + + + parent #GstMeta + + + + GQuark describing the semantic of the Roi (f.i. a face, a pedestrian) + + + + identifier of this particular ROI + + + + identifier of its parent ROI, used f.i. for ROI hierarchisation. + + + + x component of upper-left corner + + + + y component of upper-left corner + + + + bounding box width + + + + bounding box height + + + + list of #GstStructure containing element-specific params for downstream, + see gst_video_region_of_interest_meta_add_param(). (Since: 1.14) + + + + + + Attach element-specific parameters to @meta meant to be used by downstream +elements which may handle this ROI. +The name of @s is used to identify the element these parameters are meant for. + +This is typically used to tell encoders how they should encode this specific region. +For example, a structure named "roi/x264enc" could be used to give the +QP offsets this encoder should use when encoding the region described in @meta. +Multiple parameters can be defined for the same meta so different encoders +can be supported by cross platform applications). + + + + + + + a #GstVideoRegionOfInterestMeta + + + + a #GstStructure + + + + + + Retrieve the parameter for @meta having @name as structure name, +or %NULL if there is none. + +See also: gst_video_region_of_interest_meta_add_param() + + + a #GstStructure + + + + + a #GstVideoRegionOfInterestMeta + + + + a name. + + + + + + + + + + + + + #GstVideoResampler is a structure which holds the information +required to perform various kinds of resampling filtering. + + + the input size + + + + the output size + + + + the maximum number of taps + + + + the number of phases + + + + array with the source offset for each output element + + + + array with the phase to use for each output element + + + + array with new number of taps for each phase + + + + the taps for all phases + + + + + + + + + Clear a previously initialized #GstVideoResampler @resampler. + + + + + + + a #GstVideoResampler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Different resampler flags. + + no flags + + + when no taps are given, half the + number of calculated taps. This can be used when making scalers + for the different fields of an interlaced picture. Since: 1.10 + + + + Different subsampling and upsampling methods + + Duplicates the samples when + upsampling and drops when downsampling + + + Uses linear interpolation to reconstruct + missing samples and averaging to downsample + + + Uses cubic interpolation + + + Uses sinc interpolation + + + Uses lanczos interpolation + + + + #GstVideoScaler is a utility object for rescaling and resampling +video frames using various interpolation / sampling methods. + + + Scale a rectangle of pixels in @src with @src_stride to @dest with +@dest_stride using the horizontal scaler @hscaler and the vertical +scaler @vscale. + +One or both of @hscale and @vscale can be NULL to only perform scaling in +one dimension or do a copy without scaling. + +@x and @y are the coordinates in the destination image to process. + + + + + + + a horizontal #GstVideoScaler + + + + a vertical #GstVideoScaler + + + + a #GstVideoFormat for @srcs and @dest + + + + source pixels + + + + source pixels stride + + + + destination pixels + + + + destination pixels stride + + + + the horizontal destination offset + + + + the vertical destination offset + + + + the number of output pixels to scale + + + + the number of output lines to scale + + + + + + Combine a scaler for Y and UV into one scaler for the packed @format. + + + a new horizontal videoscaler for @format. + + + + + a scaler for the Y component + + + + a scaler for the U and V components + + + + the input video format + + + + the output video format + + + + + + Free a previously allocated #GstVideoScaler @scale. + + + + + + + a #GstVideoScaler + + + + + + For a given pixel at @out_offset, get the first required input pixel at +@in_offset and the @n_taps filter coefficients. + +Note that for interlaced content, @in_offset needs to be incremented with +2 to get the next input line. + + + an array of @n_tap gdouble values with filter coefficients. + + + + + a #GstVideoScaler + + + + an output offset + + + + result input offset + + + + result n_taps + + + + + + Get the maximum number of taps for @scale. + + + the maximum number of taps + + + + + a #GstVideoScaler + + + + + + Horizontally scale the pixels in @src to @dest, starting from @dest_offset +for @width samples. + + + + + + + a #GstVideoScaler + + + + a #GstVideoFormat for @src and @dest + + + + source pixels + + + + destination pixels + + + + the horizontal destination offset + + + + the number of pixels to scale + + + + + + Vertically combine @width pixels in the lines in @src_lines to @dest. +@dest is the location of the target line at @dest_offset and +@srcs are the input lines for @dest_offset. + + + + + + + a #GstVideoScaler + + + + a #GstVideoFormat for @srcs and @dest + + + + source pixels lines + + + + destination pixels + + + + the vertical destination offset + + + + the number of pixels to scale + + + + + + Make a new @method video scaler. @in_size source lines/pixels will +be scaled to @out_size destination lines/pixels. + +@n_taps specifies the amount of pixels to use from the source for one output +pixel. If n_taps is 0, this function chooses a good value automatically based +on the @method and @in_size/@out_size. + + + a #GstVideoScaler + + + + + a #GstVideoResamplerMethod + + + + #GstVideoScalerFlags + + + + number of taps to use + + + + number of source elements + + + + number of destination elements + + + + extra options + + + + + + + Different scale flags. + + no flags + + + Set up a scaler for interlaced content + + + + Provides useful functions and a base class for video sinks. + +GstVideoSink will configure the default base sink to drop frames that +arrive later than 20ms as this is considered the default threshold for +observing out-of-sync frames. + + + Takes @src rectangle and position it at the center of @dst rectangle with or +without @scaling. It handles clipping if the @src rectangle is bigger than +the @dst one and @scaling is set to FALSE. + + + + + + + the #GstVideoRectangle describing the source area + + + + the #GstVideoRectangle describing the destination area + + + + a pointer to a #GstVideoRectangle which will receive the result area + + + + a #gboolean indicating if scaling should be applied or not + + + + + + + + + + + + + + + + + + + + Whether to show video frames during preroll. If set to %FALSE, video +frames will only be rendered in PLAYING state. + + + + + + + video width (derived class needs to set this) + + + + video height (derived class needs to set this) + + + + + + + + + + + + + The video sink class structure. Derived classes should override the +@show_frame virtual function. + + + the parent class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enum value describing the available tiling modes. + + Unknown or unset tile mode + + + Every four adjacent blocks - two + horizontally and two vertically are grouped together and are located + in memory in Z or flipped Z order. In case of odd rows, the last row + of blocks is arranged in linear order. + + + Tiles are in row order. + + + + Enum value describing the most common tiling types. + + Tiles are indexed. Use + gst_video_tile_get_index () to retrieve the tile at the requested + coordinates. + + + + @field_count must be 0 for progressive video and 1 or 2 for interlaced. + +A representation of a SMPTE time code. + +@hours must be positive and less than 24. Will wrap around otherwise. +@minutes and @seconds must be positive and less than 60. +@frames must be less than or equal to @config.fps_n / @config.fps_d +These values are *NOT* automatically normalized. + + + the corresponding #GstVideoTimeCodeConfig + + + + the hours field of #GstVideoTimeCode + + + + the minutes field of #GstVideoTimeCode + + + + the seconds field of #GstVideoTimeCode + + + + the frames field of #GstVideoTimeCode + + + + Interlaced video field count + + + + @field_count is 0 for progressive, 1 or 2 for interlaced. +@latest_daiy_jam reference is stolen from caller. + + + a new #GstVideoTimeCode with the given values. +The values are not checked for being in a valid range. To see if your +timecode actually has valid content, use gst_video_time_code_is_valid(). + + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + The latest daily jam of the #GstVideoTimeCode + + + + #GstVideoTimeCodeFlags + + + + the hours field of #GstVideoTimeCode + + + + the minutes field of #GstVideoTimeCode + + + + the seconds field of #GstVideoTimeCode + + + + the frames field of #GstVideoTimeCode + + + + Interlaced video field count + + + + + + + + a new empty, invalid #GstVideoTimeCode + + + + + The resulting config->latest_daily_jam is set to +midnight, and timecode is set to the given time. + +This might return a completely invalid timecode, use +gst_video_time_code_new_from_date_time_full() to ensure +that you would get %NULL instead in that case. + + + the #GstVideoTimeCode representation of @dt. + + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + #GDateTime to convert + + + + #GstVideoTimeCodeFlags + + + + Interlaced video field count + + + + + + The resulting config->latest_daily_jam is set to +midnight, and timecode is set to the given time. + + + the #GstVideoTimeCode representation of @dt, or %NULL if + no valid timecode could be created. + + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + #GDateTime to convert + + + + #GstVideoTimeCodeFlags + + + + Interlaced video field count + + + + + + + + a new #GstVideoTimeCode from the given string or %NULL + if the string could not be passed. + + + + + The string that represents the #GstVideoTimeCode + + + + + + Adds or subtracts @frames amount of frames to @tc. tc needs to +contain valid data, as verified by gst_video_time_code_is_valid(). + + + + + + + a valid #GstVideoTimeCode + + + + How many frames to add or subtract + + + + + + This makes a component-wise addition of @tc_inter to @tc. For example, +adding ("01:02:03:04", "00:01:00:00") will return "01:03:03:04". +When it comes to drop-frame timecodes, +adding ("00:00:00;00", "00:01:00:00") will return "00:01:00;02" +because of drop-frame oddities. However, +adding ("00:09:00;02", "00:01:00:00") will return "00:10:00;00" +because this time we can have an exact minute. + + + A new #GstVideoTimeCode with @tc_inter added or %NULL + if the interval can't be added. + + + + + The #GstVideoTimeCode where the diff should be added. This +must contain valid timecode values. + + + + The #GstVideoTimeCodeInterval to add to @tc. +The interval must contain valid values, except that for drop-frame +timecode, it may also contain timecodes which would normally +be dropped. These are then corrected to the next reasonable timecode. + + + + + + Initializes @tc with empty/zero/NULL values and frees any memory +it might currently use. + + + + + + + a #GstVideoTimeCode + + + + + + Compares @tc1 and @tc2. If both have latest daily jam information, it is +taken into account. Otherwise, it is assumed that the daily jam of both +@tc1 and @tc2 was at the same time. Both time codes must be valid. + + + 1 if @tc1 is after @tc2, -1 if @tc1 is before @tc2, 0 otherwise. + + + + + a valid #GstVideoTimeCode + + + + another valid #GstVideoTimeCode + + + + + + + + a new #GstVideoTimeCode with the same values as @tc. + + + + + a #GstVideoTimeCode + + + + + + + + how many frames have passed since the daily jam of @tc. + + + + + a valid #GstVideoTimeCode + + + + + + Frees @tc. + + + + + + + a #GstVideoTimeCode + + + + + + Adds one frame to @tc. + + + + + + + a valid #GstVideoTimeCode + + + + + + @field_count is 0 for progressive, 1 or 2 for interlaced. +@latest_daiy_jam reference is stolen from caller. + +Initializes @tc with the given values. +The values are not checked for being in a valid range. To see if your +timecode actually has valid content, use gst_video_time_code_is_valid(). + + + + + + + a #GstVideoTimeCode + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + The latest daily jam of the #GstVideoTimeCode + + + + #GstVideoTimeCodeFlags + + + + the hours field of #GstVideoTimeCode + + + + the minutes field of #GstVideoTimeCode + + + + the seconds field of #GstVideoTimeCode + + + + the frames field of #GstVideoTimeCode + + + + Interlaced video field count + + + + + + The resulting config->latest_daily_jam is set to midnight, and timecode is +set to the given time. + +Will assert on invalid parameters, use gst_video_time_code_init_from_date_time_full() +for being able to handle invalid parameters. + + + + + + + an uninitialized #GstVideoTimeCode + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + #GDateTime to convert + + + + #GstVideoTimeCodeFlags + + + + Interlaced video field count + + + + + + The resulting config->latest_daily_jam is set to +midnight, and timecode is set to the given time. + + + %TRUE if @tc could be correctly initialized to a valid timecode + + + + + a #GstVideoTimeCode + + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + #GDateTime to convert + + + + #GstVideoTimeCodeFlags + + + + Interlaced video field count + + + + + + + + whether @tc is a valid timecode (supported frame rate, +hours/minutes/seconds/frames not overflowing) + + + + + #GstVideoTimeCode to check + + + + + + + + how many nsec have passed since the daily jam of @tc. + + + + + a valid #GstVideoTimeCode + + + + + + The @tc.config->latest_daily_jam is required to be non-NULL. + + + the #GDateTime representation of @tc or %NULL if @tc + has no daily jam. + + + + + A valid #GstVideoTimeCode to convert + + + + + + + + the SMPTE ST 2059-1:2015 string representation of @tc. That will +take the form hh:mm:ss:ff. The last separator (between seconds and frames) +may vary: + +';' for drop-frame, non-interlaced content and for drop-frame interlaced +field 2 +',' for drop-frame interlaced field 1 +':' for non-drop-frame, non-interlaced content and for non-drop-frame +interlaced field 2 +'.' for non-drop-frame interlaced field 1 + + + + + A #GstVideoTimeCode to convert + + + + + + + Supported frame rates: 30000/1001, 60000/1001 (both with and without drop +frame), and integer frame rates e.g. 25/1, 30/1, 50/1, 60/1. + +The configuration of the time code. + + + Numerator of the frame rate + + + + Denominator of the frame rate + + + + the corresponding #GstVideoTimeCodeFlags + + + + The latest daily jam information, if present, or NULL + + + + + Flags related to the time code information. +For drop frame, only 30000/1001 and 60000/1001 frame rates are supported. + + No flags + + + Whether we have drop frame rate + + + Whether we have interlaced video + + + + A representation of a difference between two #GstVideoTimeCode instances. +Will not necessarily correspond to a real timecode (e.g. 00:00:10;00) + + + the hours field of #GstVideoTimeCodeInterval + + + + the minutes field of #GstVideoTimeCodeInterval + + + + the seconds field of #GstVideoTimeCodeInterval + + + + the frames field of #GstVideoTimeCodeInterval + + + + + + a new #GstVideoTimeCodeInterval with the given values. + + + + + the hours field of #GstVideoTimeCodeInterval + + + + the minutes field of #GstVideoTimeCodeInterval + + + + the seconds field of #GstVideoTimeCodeInterval + + + + the frames field of #GstVideoTimeCodeInterval + + + + + + @tc_inter_str must only have ":" as separators. + + + a new #GstVideoTimeCodeInterval from the given string + or %NULL if the string could not be passed. + + + + + The string that represents the #GstVideoTimeCodeInterval + + + + + + Initializes @tc with empty/zero/NULL values. + + + + + + + a #GstVideoTimeCodeInterval + + + + + + + + a new #GstVideoTimeCodeInterval with the same values as @tc. + + + + + a #GstVideoTimeCodeInterval + + + + + + Frees @tc. + + + + + + + a #GstVideoTimeCodeInterval + + + + + + Initializes @tc with the given values. + + + + + + + a #GstVideoTimeCodeInterval + + + + the hours field of #GstVideoTimeCodeInterval + + + + the minutes field of #GstVideoTimeCodeInterval + + + + the seconds field of #GstVideoTimeCodeInterval + + + + the frames field of #GstVideoTimeCodeInterval + + + + + + + Extra buffer metadata describing the GstVideoTimeCode of the frame. + +Each frame is assumed to have its own timecode, i.e. they are not +automatically incremented/interpolated. + + + parent #GstMeta + + + + the GstVideoTimeCode to attach + + + + + + + + + + + The video transfer function defines the formula for converting between +non-linear RGB (R'G'B') and linear RGB + + unknown transfer function + + + linear RGB, gamma 1.0 curve + + + Gamma 1.8 curve + + + Gamma 2.0 curve + + + Gamma 2.2 curve + + + Gamma 2.2 curve with a linear segment in the lower + range, also ITU-R BT470M / ITU-R BT1700 625 PAL & + SECAM / ITU-R BT1361 + + + Gamma 2.2 curve with a linear segment in the + lower range + + + Gamma 2.4 curve with a linear segment in the lower + range. IEC 61966-2-1 (sRGB or sYCC) + + + Gamma 2.8 curve, also ITU-R BT470BG + + + Logarithmic transfer characteristic + 100:1 range + + + Logarithmic transfer characteristic + 316.22777:1 range (100 * sqrt(10) : 1) + + + Gamma 2.2 curve with a linear segment in the lower + range. Used for BT.2020 with 12 bits per + component. Since: 1.6 + + + Gamma 2.19921875. Since: 1.8 + + + Rec. ITU-R BT.2020-2 with 10 bits per component. + (functionally the same as the values + GST_VIDEO_TRANSFER_BT709 and GST_VIDEO_TRANSFER_BT601). + Since: 1.18 + + + SMPTE ST 2084 for 10, 12, 14, and 16-bit systems. + Known as perceptual quantization (PQ) + Since: 1.18 + + + Association of Radio Industries and Businesses (ARIB) + STD-B67 and Rec. ITU-R BT.2100-1 hybrid loggamma (HLG) system + Since: 1.18 + + + also known as SMPTE170M / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC + + + Convert @val to its gamma decoded value. This is the inverse operation of +@gst_video_color_transfer_encode(). + +For a non-linear value L' in the range [0..1], conversion to the linear +L is in general performed with a power function like: + +|[ + L = L' ^ gamma +]| + +Depending on @func, different formulas might be applied. Some formulas +encode a linear segment in the lower range. + + + the gamma decoded value of @val + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Convert @val to its gamma encoded value. + +For a linear value L in the range [0..1], conversion to the non-linear +(gamma encoded) L' is in general performed with a power function like: + +|[ + L' = L ^ (1 / gamma) +]| + +Depending on @func, different formulas might be applied. Some formulas +encode a linear segment in the lower range. + + + the gamma encoded value of @val + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Converts the @value to the #GstVideoTransferFunction +The transfer characteristics (TransferCharacteristics) value is +defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +and "ITU-T H.273 Table 3". +"H.264 Table E-4" and "H.265 Table E.4" share the identical values. + + + the matched #GstVideoTransferFunction + + + + + a ITU-T H.273 transfer characteristics value + + + + + + Returns whether @from_func and @to_func are equivalent. There are cases +(e.g. BT601, BT709, and BT2020_10) where several functions are functionally +identical. In these cases, when doing conversion, we should consider them +as equivalent. Also, BT2020_12 is the same as the aforementioned three for +less than 12 bits per pixel. + + + TRUE if @from_func and @to_func can be considered equivalent. + + + + + #GstVideoTransferFunction to convert from + + + + bits per pixel to convert from + + + + #GstVideoTransferFunction to convert into + + + + bits per pixel to convert into + + + + + + Converts #GstVideoTransferFunction to the "transfer characteristics" +(TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +and "ITU-T H.273 Table 3". +"H.264 Table E-4" and "H.265 Table E.4" share the identical values. + + + The value of ISO/IEC 23001-8 transfer characteristics. + + + + + a #GstVideoTransferFunction + + + + + + + An encoder for writing ancillary data to the +Vertical Blanking Interval lines of component signals. + + + Create a new #GstVideoVBIEncoder for the specified @format and @pixel_width. + + + The new #GstVideoVBIEncoder or %NULL if the @format and/or @pixel_width +is not supported. + + + + + a #GstVideoFormat + + + + The width in pixel to use + + + + + + Stores Video Ancillary data, according to SMPTE-291M specification. + +Note that the contents of the data are always read as 8bit data (i.e. do not contain +the parity check bits). + + + %TRUE if enough space was left in the current line, %FALSE + otherwise. + + + + + a #GstVideoVBIEncoder + + + + %TRUE if composite ADF should be created, component otherwise + + + + The Data Identifier + + + + The Secondary Data Identifier (if type 2) or the Data + Block Number (if type 1) + + + + The user data content of the Ancillary packet. + Does not contain the ADF, DID, SDID nor CS. + + + + + + The amount of data (in bytes) in @data (max 255 bytes) + + + + + + + + + + + + + + + + + Frees the @encoder. + + + + + + + a #GstVideoVBIEncoder + + + + + + + + + + + + + + + + + + + + + A parser for detecting and extracting @GstVideoAncillary data from +Vertical Blanking Interval lines of component signals. + + + Create a new #GstVideoVBIParser for the specified @format and @pixel_width. + + + The new #GstVideoVBIParser or %NULL if the @format and/or @pixel_width +is not supported. + + + + + a #GstVideoFormat + + + + The width in pixel to use + + + + + + Provide a new line of data to the @parser. Call gst_video_vbi_parser_get_ancillary() +to get the Ancillary data that might be present on that line. + + + + + + + a #GstVideoVBIParser + + + + The line of data to parse + + + + + + + + + + + + + + + + + + + Frees the @parser. + + + + + + + a #GstVideoVBIParser + + + + + + Parse the line provided previously by gst_video_vbi_parser_add_line(). + + + %GST_VIDEO_VBI_PARSER_RESULT_OK if ancillary data was found and +@anc was filled. %GST_VIDEO_VBI_PARSER_RESULT_DONE if there wasn't any +data. + + + + + a #GstVideoVBIParser + + + + a #GstVideoAncillary to start the eventual ancillary data + + + + + + + Return values for #GstVideoVBIParser + + No line were provided, or no more Ancillary data was found. + + + A #GstVideoAncillary was found. + + + An error occurred + + + + Attaches #GstVideoAFDMeta metadata to @buffer with the given +parameters. + + + the #GstVideoAFDMeta on @buffer. + + + + + a #GstBuffer + + + + 0 for progressive or field 1 and 1 for field 2 + + + + #GstVideoAFDSpec that applies to AFD value + + + + #GstVideoAFDValue AFD enumeration + + + + + + Attaches GstVideoAffineTransformationMeta metadata to @buffer with +the given parameters. + + + the #GstVideoAffineTransformationMeta on @buffer. + + + + + a #GstBuffer + + + + + + Attaches #GstVideoBarMeta metadata to @buffer with the given +parameters. + + + the #GstVideoBarMeta on @buffer. + +See Table 6.11 Bar Data Syntax + +https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + + + + + a #GstBuffer + + + + 0 for progressive or field 1 and 1 for field 2 + + + + if true then bar data specifies letterbox, otherwise pillarbox + + + + If @is_letterbox is true, then the value specifies the + last line of a horizontal letterbox bar area at top of reconstructed frame. + Otherwise, it specifies the last horizontal luminance sample of a vertical pillarbox + bar area at the left side of the reconstructed frame + + + + If @is_letterbox is true, then the value specifies the + first line of a horizontal letterbox bar area at bottom of reconstructed frame. + Otherwise, it specifies the first horizontal + luminance sample of a vertical pillarbox bar area at the right side of the reconstructed frame. + + + + + + Attaches #GstVideoCaptionMeta metadata to @buffer with the given +parameters. + + + the #GstVideoCaptionMeta on @buffer. + + + + + a #GstBuffer + + + + The type of Closed Caption to add + + + + The Closed Caption data + + + + + + The size of @data in bytes + + + + + + + + + + + + + Attaches GstVideoGLTextureUploadMeta metadata to @buffer with the given +parameters. + + + the #GstVideoGLTextureUploadMeta on @buffer. + + + + + a #GstBuffer + + + + the #GstVideoGLTextureOrientation + + + + the number of textures + + + + array of #GstVideoGLTextureType + + + + the function to upload the buffer to a specific texture ID + + + + user data for the implementor of @upload + + + + function to copy @user_data + + + + function to free @user_data + + + + + + Attaches GstVideoMeta metadata to @buffer with the given parameters and the +default offsets and strides for @format and @width x @height. + +This function calculates the default offsets and strides and then calls +gst_buffer_add_video_meta_full() with them. + + + the #GstVideoMeta on @buffer. + + + + + a #GstBuffer + + + + #GstVideoFrameFlags + + + + a #GstVideoFormat + + + + the width + + + + the height + + + + + + Attaches GstVideoMeta metadata to @buffer with the given parameters. + + + the #GstVideoMeta on @buffer. + + + + + a #GstBuffer + + + + #GstVideoFrameFlags + + + + a #GstVideoFormat + + + + the width + + + + the height + + + + number of planes + + + + offset of each plane + + + + + + stride of each plane + + + + + + + + Sets an overlay composition on a buffer. The buffer will obtain its own +reference to the composition, meaning this function does not take ownership +of @comp. + + + a #GstVideoOverlayCompositionMeta + + + + + a #GstBuffer + + + + a #GstVideoOverlayComposition + + + + + + Attaches #GstVideoRegionOfInterestMeta metadata to @buffer with the given +parameters. + + + the #GstVideoRegionOfInterestMeta on @buffer. + + + + + a #GstBuffer + + + + Type of the region of interest (e.g. "face") + + + + X position + + + + Y position + + + + width + + + + height + + + + + + Attaches #GstVideoRegionOfInterestMeta metadata to @buffer with the given +parameters. + + + the #GstVideoRegionOfInterestMeta on @buffer. + + + + + a #GstBuffer + + + + Type of the region of interest (e.g. "face") + + + + X position + + + + Y position + + + + width + + + + height + + + + + + Attaches #GstVideoTimeCodeMeta metadata to @buffer with the given +parameters. + + + the #GstVideoTimeCodeMeta on @buffer, or +(since 1.16) %NULL if the timecode was invalid. + + + + + a #GstBuffer + + + + a #GstVideoTimeCode + + + + + + Attaches #GstVideoTimeCodeMeta metadata to @buffer with the given +parameters. + + + the #GstVideoTimeCodeMeta on @buffer, or +(since 1.16) %NULL if the timecode was invalid. + + + + + a #GstBuffer + + + + framerate numerator + + + + framerate denominator + + + + a #GDateTime for the latest daily jam + + + + a #GstVideoTimeCodeFlags + + + + hours since the daily jam + + + + minutes since the daily jam + + + + seconds since the daily jam + + + + frames since the daily jam + + + + fields since the daily jam + + + + + + Gets the #GstVideoAFDMeta that might be present on @b. + +Note: there may be two #GstVideoAFDMeta structs for interlaced video. + + + + A #GstBuffer + + + + + + + + + + + + Gets the #GstVideoBarMeta that might be present on @b. + + + + A #GstBuffer + + + + + Gets the #GstVideoCaptionMeta that might be present on @b. + + + + A #GstBuffer + + + + + + + + + + + + + + + + + + + Find the #GstVideoMeta on @buffer with the lowest @id. + +Buffers can contain multiple #GstVideoMeta metadata items when dealing with +multiview buffers. + + + the #GstVideoMeta with lowest id (usually 0) or %NULL when there +is no such metadata on @buffer. + + + + + a #GstBuffer + + + + + + Find the #GstVideoMeta on @buffer with the given @id. + +Buffers can contain multiple #GstVideoMeta metadata items when dealing with +multiview buffers. + + + the #GstVideoMeta with @id or %NULL when there is no such metadata +on @buffer. + + + + + a #GstBuffer + + + + a metadata id + + + + + + + + + + + + + + + + + + + + + + + + + + + Find the #GstVideoRegionOfInterestMeta on @buffer with the given @id. + +Buffers can contain multiple #GstVideoRegionOfInterestMeta metadata items if +multiple regions of interests are marked on a frame. + + + the #GstVideoRegionOfInterestMeta with @id or %NULL when there is +no such metadata on @buffer. + + + + + a #GstBuffer + + + + a metadata id + + + + + + + + + + + + + Get the video alignment from the bufferpool configuration @config in +in @align + + + %TRUE if @config could be parsed correctly. + + + + + a #GstStructure + + + + a #GstVideoAlignment + + + + + + Set the video alignment in @align to the bufferpool configuration +@config + + + + + + + a #GstStructure + + + + a #GstVideoAlignment + + + + + + + + + + + + + + + This library contains some helper functions and includes the +videosink and videofilter base classes. + + + A collection of objects and methods to assist with handling Ancillary Data +present in Vertical Blanking Interval as well as Closed Caption. + + + The functions gst_video_chroma_from_string() and gst_video_chroma_to_string() convert +between #GstVideoChromaSite and string descriptions. + +#GstVideoChromaResample is a utility object for resampling chroma planes +and converting between different chroma sampling sitings. + + + Special GstBufferPool subclass for raw video buffers. + +Allows configuration of video-specific requirements such as +stride alignments or pixel padding, and can also be configured +to automatically add #GstVideoMeta to the buffers. + + + Convenience function to check if the given message is a +"prepare-window-handle" message from a #GstVideoOverlay. + + + whether @msg is a "prepare-window-handle" message + + + + + a #GstMessage + + + + + + Inspect a #GstEvent and return the #GstNavigationEventType of the event, or +#GST_NAVIGATION_EVENT_INVALID if the event is not a #GstNavigation event. + + + + + + + A #GstEvent to inspect. + + + + + + Inspect a #GstNavigation command event and retrieve the enum value of the +associated command. + + + TRUE if the navigation command could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to GstNavigationCommand to receive the + type of the navigation event. + + + + + + + + + + + + A #GstEvent to inspect. + + + + A pointer to a location to receive + the string identifying the key press. The returned string is owned by the + event, and valid only until the event is unreffed. + + + + + + Retrieve the details of either a #GstNavigation mouse button press event or +a mouse button release event. Determine which type the event is using +gst_navigation_event_get_type() to retrieve the #GstNavigationEventType. + + + TRUE if the button number and both coordinates could be extracted, + otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gint that will receive the button + number associated with the event. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse button event. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse button event. + + + + + + Inspect a #GstNavigation mouse movement event and extract the coordinates +of the event. + + + TRUE if both coordinates could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse movement. + + + + + + Inspect a #GstNavigation mouse scroll event and extract the coordinates +of the event. + + + TRUE if all coordinates could be extracted, otherwise FALSE. + + + + + A #GstEvent to inspect. + + + + Pointer to a gdouble to receive the x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the y coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the delta_x coordinate of the + mouse movement. + + + + Pointer to a gdouble to receive the delta_y coordinate of the + mouse movement. + + + + + + Check a bus message to see if it is a #GstNavigation event, and return +the #GstNavigationMessageType identifying the type of the message if so. + + + The type of the #GstMessage, or +#GST_NAVIGATION_MESSAGE_INVALID if the message is not a #GstNavigation +notification. + + + + + A #GstMessage to inspect. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_ANGLES_CHANGED for notifying an application +that the current angle, or current number of angles available in a +multiangle video has changed. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + The currently selected angle. + + + + The number of viewing angles now available. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_EVENT. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + A navigation #GstEvent + + + + + + Creates a new #GstNavigation message with type +#GST_NAVIGATION_MESSAGE_MOUSE_OVER. + + + The new #GstMessage. + + + + + A #GstObject to set as source of the new message. + + + + %TRUE if the mouse has entered a clickable area of the display. +%FALSE if it over a non-clickable area. + + + + + + Parse a #GstNavigation message of type GST_NAVIGATION_MESSAGE_ANGLES_CHANGED +and extract the @cur_angle and @n_angles parameters. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + A pointer to a #guint to receive the new + current angle number, or NULL + + + + A pointer to a #guint to receive the new angle + count, or NULL. + + + + + + Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_EVENT +and extract contained #GstEvent. The caller must unref the @event when done +with it. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + a pointer to a #GstEvent to receive + the contained navigation event. + + + + + + Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_MOUSE_OVER +and extract the active/inactive flag. If the mouse over event is marked +active, it indicates that the mouse is over a clickable area. + + + %TRUE if the message could be successfully parsed. %FALSE if not. + + + + + A #GstMessage to inspect. + + + + A pointer to a gboolean to receive the + active/inactive state, or NULL. + + + + + + Inspect a #GstQuery and return the #GstNavigationQueryType associated with +it if it is a #GstNavigation query. + + + The #GstNavigationQueryType of the query, or +#GST_NAVIGATION_QUERY_INVALID + + + + + The query to inspect + + + + + + Create a new #GstNavigation angles query. When executed, it will +query the pipeline for the set of currently available angles, which may be +greater than one in a multiangle video. + + + The new query. + + + + + Create a new #GstNavigation commands query. When executed, it will +query the pipeline for the set of currently available commands. + + + The new query. + + + + + Parse the current angle number in the #GstNavigation angles @query into the +#guint pointed to by the @cur_angle variable, and the number of available +angles into the #guint pointed to by the @n_angles variable. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + Pointer to a #guint into which to store the + currently selected angle value from the query, or NULL + + + + Pointer to a #guint into which to store the + number of angles value from the query, or NULL + + + + + + Parse the number of commands in the #GstNavigation commands @query. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + the number of commands in this query. + + + + + + Parse the #GstNavigation command query and retrieve the @nth command from +it into @cmd. If the list contains less elements than @nth, @cmd will be +set to #GST_NAVIGATION_COMMAND_INVALID. + + + %TRUE if the query could be successfully parsed. %FALSE if not. + + + + + a #GstQuery + + + + the nth command to retrieve. + + + + a pointer to store the nth command into. + + + + + + Set the #GstNavigation angles query result field in @query. + + + + + + + a #GstQuery + + + + the current viewing angle to set. + + + + the number of viewing angles to set. + + + + + + Set the #GstNavigation command query result fields in @query. The number +of commands passed must be equal to @n_commands. + + + + + + + a #GstQuery + + + + the number of commands to set. + + + + An array containing @n_cmds + @GstNavigationCommand values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lets you blend the @src image into the @dest image + + + + + + + The #GstVideoFrame where to blend @src in + + + + the #GstVideoFrame that we want to blend into + + + + The x offset in pixel where the @src image should be blended + + + + the y offset in pixel where the @src image should be blended + + + + the global_alpha each per-pixel alpha value is multiplied + with + + + + + + Scales a buffer containing RGBA (or AYUV) video. This is an internal +helper function which is used to scale subtitle overlays, and may be +deprecated in the near future. Use #GstVideoScaler to scale video buffers +instead. + + + + + + + the #GstVideoInfo describing the video data in @src_buffer + + + + the source buffer containing video pixels to scale + + + + the height in pixels to scale the video data in @src_buffer to + + + + the width in pixels to scale the video data in @src_buffer to + + + + pointer to a #GstVideoInfo structure that will be filled in + with the details for @dest_buffer + + + + a pointer to a #GstBuffer variable, which will be + set to a newly-allocated buffer containing the scaled pixels. + + + + + + Given the Pixel Aspect Ratio and size of an input video frame, and the +pixel aspect ratio of the intended display device, calculates the actual +display ratio the video will be rendered with. + + + A boolean indicating success and a calculated Display Ratio in the +dar_n and dar_d parameters. +The return value is FALSE in the case of integer overflow or other error. + + + + + Numerator of the calculated display_ratio + + + + Denominator of the calculated display_ratio + + + + Width of the video frame in pixels + + + + Height of the video frame in pixels + + + + Numerator of the pixel aspect ratio of the input video. + + + + Denominator of the pixel aspect ratio of the input video. + + + + Numerator of the pixel aspect ratio of the display device + + + + Denominator of the pixel aspect ratio of the display device + + + + + + + + + + + + + + + + + + Parses fixed Closed Caption #GstCaps and returns the corresponding caption +type, or %GST_VIDEO_CAPTION_TYPE_UNKNOWN. + + + #GstVideoCaptionType. + + + + + Fixed #GstCaps to parse + + + + + + Creates new caps corresponding to @type. + + + new #GstCaps + + + + + #GstVideoCaptionType + + + + + + Convert @s to a #GstVideoChromaSite + + + a #GstVideoChromaSite or %GST_VIDEO_CHROMA_SITE_UNKNOWN when @s does +not contain a valid chroma description. + + + + + a chromasite string + + + + + + Perform resampling of @width chroma pixels in @lines. + + + + + + + a #GstVideoChromaResample + + + + pixel lines + + + + the number of pixels on one line + + + + + + Create a new resampler object for the given parameters. When @h_factor or +@v_factor is > 0, upsampling will be used, otherwise subsampling is +performed. + + + a new #GstVideoChromaResample that should be freed with + gst_video_chroma_resample_free() after usage. + + + + + a #GstVideoChromaMethod + + + + a #GstVideoChromaSite + + + + #GstVideoChromaFlags + + + + the #GstVideoFormat + + + + horizontal resampling factor + + + + vertical resampling factor + + + + + + Converts @site to its string representation. + + + a string describing @site. + + + + + a #GstVideoChromaSite + + + + + + Converts the @value to the #GstVideoColorMatrix +The matrix coefficients (MatrixCoefficients) value is +defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +and "ITU-T H.273 Table 4". +"H.264 Table E-5" and "H.265 Table E.5" share the identical values. + + + the matched #GstVideoColorMatrix + + + + + a ITU-T H.273 matrix coefficients value + + + + + + Get the coefficients used to convert between Y'PbPr and R'G'B' using @matrix. + +When: + +|[ + 0.0 <= [Y',R',G',B'] <= 1.0) + (-0.5 <= [Pb,Pr] <= 0.5) +]| + +the general conversion is given by: + +|[ + Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B' + Pb = (B'-Y')/(2*(1-Kb)) + Pr = (R'-Y')/(2*(1-Kr)) +]| + +and the other way around: + +|[ + R' = Y' + Cr*2*(1-Kr) + G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb) + B' = Y' + Cb*2*(1-Kb) +]| + + + TRUE if @matrix was a YUV color format and @Kr and @Kb contain valid + values. + + + + + a #GstVideoColorMatrix + + + + result red channel coefficient + + + + result blue channel coefficient + + + + + + Converts #GstVideoColorMatrix to the "matrix coefficients" +(MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4" +and "ITU-T H.273 Table 4". +"H.264 Table E-5" and "H.265 Table E.5" share the identical values. + + + The value of ISO/IEC 23001-8 matrix coefficients. + + + + + a #GstVideoColorMatrix + + + + + + Converts the @value to the #GstVideoColorPrimaries +The colour primaries (ColourPrimaries) value is +defined by "ISO/IEC 23001-8 Section 7.1 Table 2" and "ITU-T H.273 Table 2". +"H.264 Table E-3" and "H.265 Table E.3" share the identical values. + + + the matched #GstVideoColorPrimaries + + + + + a ITU-T H.273 colour primaries value + + + + + + Get information about the chromaticity coordinates of @primaries. + + + a #GstVideoColorPrimariesInfo for @primaries. + + + + + a #GstVideoColorPrimaries + + + + + + Converts #GstVideoColorPrimaries to the "colour primaries" (ColourPrimaries) +value defined by "ISO/IEC 23001-8 Section 7.1 Table 2" +and "ITU-T H.273 Table 2". +"H.264 Table E-3" and "H.265 Table E.3" share the identical values. + + + The value of ISO/IEC 23001-8 colour primaries. + + + + + a #GstVideoColorPrimaries + + + + + + Compute the offset and scale values for each component of @info. For each +component, (c[i] - offset[i]) / scale[i] will scale the component c[i] to the +range [0.0 .. 1.0]. + +The reverse operation (c[i] * scale[i]) + offset[i] can be used to convert +the component values in range [0.0 .. 1.0] back to their representation in +@info and @range. + + + + + + + a #GstVideoColorRange + + + + a #GstVideoFormatInfo + + + + output offsets + + + + + + output scale + + + + + + + + Use gst_video_transfer_function_decode() instead. + + + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Use gst_video_transfer_function_encode() instead. + + + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Converts a raw video buffer into the specified output caps. + +The output caps can be any raw video formats or any image formats (jpeg, png, ...). + +The width, height and pixel-aspect-ratio can also be specified in the output caps. + + + The converted #GstSample, or %NULL if an error happened (in which case @err +will point to the #GError). + + + + + a #GstSample + + + + the #GstCaps to convert to + + + + the maximum amount of time allowed for the processing. + + + + + + Converts a raw video buffer into the specified output caps. + +The output caps can be any raw video formats or any image formats (jpeg, png, ...). + +The width, height and pixel-aspect-ratio can also be specified in the output caps. + +@callback will be called after conversion, when an error occurred or if conversion didn't +finish after @timeout. @callback will always be called from the thread default +%GMainContext, see g_main_context_get_thread_default(). If GLib before 2.22 is used, +this will always be the global default main context. + +@destroy_notify will be called after the callback was called and @user_data is not needed +anymore. + + + + + + + a #GstSample + + + + the #GstCaps to convert to + + + + the maximum amount of time allowed for the processing. + + + + %GstVideoConvertSampleCallback that will be called after conversion. + + + + extra data that will be passed to the @callback + + + + %GDestroyNotify to be called after @user_data is not needed anymore + + + + + + Create a new converter object to convert between @in_info and @out_info +with @config. + + + a #GstVideoConverter or %NULL if conversion is not possible. + + + + + a #GstVideoInfo + + + + a #GstVideoInfo + + + + a #GstStructure with configuration options + + + + + + Create a new converter object to convert between @in_info and @out_info +with @config. + +The optional @pool can be used to spawn threads, this is useful when +creating new converters rapidly, for example when updating cropping. + + + a #GstVideoConverter or %NULL if conversion is not possible. + + + + + a #GstVideoInfo + + + + a #GstVideoInfo + + + + a #GstStructure with configuration options + + + + a #GstTaskPool to spawn threads from + + + + + + + + + + + + + + + + + + Make a new dither object for dithering lines of @format using the +algorithm described by @method. + +Each component will be quantized to a multiple of @quantizer. Better +performance is achieved when @quantizer is a power of 2. + +@width is the width of the lines that this ditherer will handle. + + + a new #GstVideoDither + + + + + a #GstVideoDitherMethod + + + + a #GstVideoDitherFlags + + + + a #GstVideoFormat + + + + quantizer + + + + the width of the lines + + + + + + Checks if an event is a force key unit event. Returns true for both upstream +and downstream force key unit events. + + + %TRUE if the event is a valid force key unit event + + + + + A #GstEvent to check + + + + + + Creates a new downstream force key unit event. A downstream force key unit +event can be sent down the pipeline to request downstream elements to produce +a key unit. A downstream force key unit event must also be sent when handling +an upstream force key unit event to notify downstream that the latter has been +handled. + +To parse an event created by gst_video_event_new_downstream_force_key_unit() use +gst_video_event_parse_downstream_force_key_unit(). + + + The new GstEvent + + + + + the timestamp of the buffer that starts a new key unit + + + + the stream_time of the buffer that starts a new key unit + + + + the running_time of the buffer that starts a new key unit + + + + %TRUE to produce headers when starting a new key unit + + + + integer that can be used to number key units + + + + + + Creates a new Still Frame event. If @in_still is %TRUE, then the event +represents the start of a still frame sequence. If it is %FALSE, then +the event ends a still frame sequence. + +To parse an event created by gst_video_event_new_still_frame() use +gst_video_event_parse_still_frame(). + + + The new GstEvent + + + + + boolean value for the still-frame state of the event. + + + + + + Creates a new upstream force key unit event. An upstream force key unit event +can be sent to request upstream elements to produce a key unit. + +@running_time can be set to request a new key unit at a specific +running_time. If set to GST_CLOCK_TIME_NONE, upstream elements will produce a +new key unit as soon as possible. + +To parse an event created by gst_video_event_new_downstream_force_key_unit() use +gst_video_event_parse_downstream_force_key_unit(). + + + The new GstEvent + + + + + the running_time at which a new key unit should be produced + + + + %TRUE to produce headers when starting a new key unit + + + + integer that can be used to number key units + + + + + + Get timestamp, stream-time, running-time, all-headers and count in the force +key unit event. See gst_video_event_new_downstream_force_key_unit() for a +full description of the downstream force key unit event. + +@running_time will be adjusted for any pad offsets of pads it was passing through. + + + %TRUE if the event is a valid downstream force key unit event. + + + + + A #GstEvent to parse + + + + A pointer to the timestamp in the event + + + + A pointer to the stream-time in the event + + + + A pointer to the running-time in the event + + + + A pointer to the all_headers flag in the event + + + + A pointer to the count field of the event + + + + + + Parse a #GstEvent, identify if it is a Still Frame event, and +return the still-frame state from the event if it is. +If the event represents the start of a still frame, the in_still +variable will be set to TRUE, otherwise FALSE. It is OK to pass NULL for the +in_still variable order to just check whether the event is a valid still-frame +event. + +Create a still frame event using gst_video_event_new_still_frame() + + + %TRUE if the event is a valid still-frame event. %FALSE if not + + + + + A #GstEvent to parse + + + + + A boolean to receive the still-frame status from the event, or NULL + + + + + + Get running-time, all-headers and count in the force key unit event. See +gst_video_event_new_upstream_force_key_unit() for a full description of the +upstream force key unit event. + +Create an upstream force key unit event using gst_video_event_new_upstream_force_key_unit() + +@running_time will be adjusted for any pad offsets of pads it was passing through. + + + %TRUE if the event is a valid upstream force-key-unit event. %FALSE if not + + + + + A #GstEvent to parse + + + + A pointer to the running_time in the event + + + + A pointer to the all_headers flag in the event + + + + A pointer to the count field in the event + + + + + + Convert @order to a #GstVideoFieldOrder + + + the #GstVideoFieldOrder of @order or + #GST_VIDEO_FIELD_ORDER_UNKNOWN when @order is not a valid + string representation for a #GstVideoFieldOrder. + + + + + a field order + + + + + + Convert @order to its string representation. + + + @order as a string or NULL if @order in invalid. + + + + + a #GstVideoFieldOrder + + + + + + Converts a FOURCC value into the corresponding #GstVideoFormat. +If the FOURCC cannot be represented by #GstVideoFormat, +#GST_VIDEO_FORMAT_UNKNOWN is returned. + + + the #GstVideoFormat describing the FOURCC value + + + + + a FOURCC value representing raw YUV video + + + + + + Find the #GstVideoFormat for the given parameters. + + + a #GstVideoFormat or GST_VIDEO_FORMAT_UNKNOWN when the parameters to +not specify a known format. + + + + + the amount of bits used for a pixel + + + + the amount of bits used to store a pixel. This value is bigger than + @depth + + + + the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN + + + + the red mask + + + + the green mask + + + + the blue mask + + + + the alpha mask, or 0 if no alpha mask + + + + + + Convert the @format string to its #GstVideoFormat. + + + the #GstVideoFormat for @format or GST_VIDEO_FORMAT_UNKNOWN when the +string is not a known format. + + + + + a format string + + + + + + Get the #GstVideoFormatInfo for @format + + + The #GstVideoFormatInfo for @format. + + + + + a #GstVideoFormat + + + + + + Get the default palette of @format. This the palette used in the pack +function for paletted formats. + + + the default palette of @format or %NULL when +@format does not have a palette. + + + + + a #GstVideoFormat + + + + size of the palette in bytes + + + + + + Converts a #GstVideoFormat value into the corresponding FOURCC. Only +a few YUV formats have corresponding FOURCC values. If @format has +no corresponding FOURCC value, 0 is returned. + + + the FOURCC corresponding to @format + + + + + a #GstVideoFormat video format + + + + + + Returns a string containing a descriptive name for +the #GstVideoFormat if there is one, or NULL otherwise. + + + the name corresponding to @format + + + + + a #GstVideoFormat video format + + + + + + Return all the raw video formats supported by GStreamer. + + + an array of #GstVideoFormat + + + + + + + the number of elements in the returned array + + + + + + + + + + + + + + + + + + Given the nominal duration of one video frame, +this function will check some standard framerates for +a close match (within 0.1%) and return one if possible, + +It will calculate an arbitrary framerate if no close +match was found, and return %FALSE. + +It returns %FALSE if a duration of 0 is passed. + + + %TRUE if a close "standard" framerate was +recognised, and %FALSE otherwise. + + + + + Nominal duration of one frame + + + + Numerator of the calculated framerate + + + + Denominator of the calculated framerate + + + + + + Convert @mode to a #GstVideoInterlaceMode + + + the #GstVideoInterlaceMode of @mode or + #GST_VIDEO_INTERLACE_MODE_PROGRESSIVE when @mode is not a valid + string representation for a #GstVideoInterlaceMode. + + + + + a mode + + + + + + Convert @mode to its string representation. + + + @mode as a string or NULL if @mode in invalid. + + + + + a #GstVideoInterlaceMode + + + + + + Return a generic raw video caps for formats defined in @formats. +If @formats is %NULL returns a caps for all the supported raw video formats, +see gst_video_formats_raw(). + + + a video @GstCaps + + + + + an array of raw #GstVideoFormat, or %NULL + + + + + + the size of @formats + + + + + + Return a generic raw video caps for formats defined in @formats with features +@features. +If @formats is %NULL returns a caps for all the supported video formats, +see gst_video_formats_raw(). + + + a video @GstCaps + + + + + an array of raw #GstVideoFormat, or %NULL + + + + + + the size of @formats + + + + the #GstCapsFeatures to set on the caps + + + + + + Extract #GstVideoMasteringDisplayInfo from @mastering + + + %TRUE if @minfo was filled with @mastering + + + + + a #GstVideoMasteringDisplayInfo + + + + a #GstStructure representing #GstVideoMasteringDisplayInfo + + + + + + + + + + + + + + + + + + Get the #GQuark for the "gst-video-scale" metadata transform operation. + + + a #GQuark + + + + + + + A const #GValue containing a list of stereo video modes + +Utility function that returns a #GValue with a GstList of packed stereo +video modes with double the height of a single view for use in +caps negotiations. Currently this is top-bottom and row-interleaved. + + + + + + + A const #GValue containing a list of stereo video modes + +Utility function that returns a #GValue with a GstList of packed +stereo video modes that have double the width/height of a single +view for use in caps negotiation. Currently this is just +'checkerboard' layout. + + + + + + + A const #GValue containing a list of stereo video modes + +Utility function that returns a #GValue with a GstList of packed stereo +video modes with double the width of a single view for use in +caps negotiations. Currently this is side-by-side, side-by-side-quincunx +and column-interleaved. + + + + + + + A const #GValue containing a list of mono video modes + +Utility function that returns a #GValue with a GstList of mono video +modes (mono/left/right) for use in caps negotiations. + + + + + + + A const #GValue containing a list of 'unpacked' stereo video modes + +Utility function that returns a #GValue with a GstList of unpacked +stereo video modes (separated/frame-by-frame/frame-by-frame-multiview) +for use in caps negotiations. + + + + + + + A boolean indicating whether the + #GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT flag should be set. + +Utility function that heuristically guess whether a +frame-packed stereoscopic video contains half width/height +encoded views, or full-frame views by looking at the +overall display aspect ratio. + + + + + A #GstVideoMultiviewMode + + + + Video frame width in pixels + + + + Video frame height in pixels + + + + Numerator of the video pixel-aspect-ratio + + + + Denominator of the video pixel-aspect-ratio + + + + + + + + The #GstVideoMultiviewMode value + +Given a string from a caps multiview-mode field, +output the corresponding #GstVideoMultiviewMode +or #GST_VIDEO_MULTIVIEW_MODE_NONE + + + + + multiview-mode field string from caps + + + + + + + + The caps string representation of the mode, or NULL if invalid. + +Given a #GstVideoMultiviewMode returns the multiview-mode caps string +for insertion into a caps structure + + + + + A #GstVideoMultiviewMode value + + + + + + Utility function that transforms the width/height/PAR +and multiview mode and flags of a #GstVideoInfo into +the requested mode. + + + + + + + A #GstVideoInfo structure to operate on + + + + A #GstVideoMultiviewMode value + + + + A set of #GstVideoMultiviewFlags + + + + + + + + + + + + + + + + + + This helper shall be used by classes implementing the #GstVideoOverlay +interface that want the render rectangle to be controllable using +properties. This helper will install "render-rectangle" property into the +class. + + + + + + + The class on which the properties will be installed + + + + The first free property ID to use + + + + + + This helper shall be used by classes implementing the #GstVideoOverlay +interface that want the render rectangle to be controllable using +properties. This helper will parse and set the render rectangle calling +gst_video_overlay_set_render_rectangle(). + + + %TRUE if the @property_id matches the GstVideoOverlay property + + + + + The instance on which the property is set + + + + The highest property ID. + + + + The property ID + + + + The #GValue to be set + + + + + + + + + + + + + + + + + + Make a new @method video scaler. @in_size source lines/pixels will +be scaled to @out_size destination lines/pixels. + +@n_taps specifies the amount of pixels to use from the source for one output +pixel. If n_taps is 0, this function chooses a good value automatically based +on the @method and @in_size/@out_size. + + + a #GstVideoScaler + + + + + a #GstVideoResamplerMethod + + + + #GstVideoScalerFlags + + + + number of taps to use + + + + number of source elements + + + + number of destination elements + + + + extra options + + + + + + Get the tile index of the tile at coordinates @x and @y in the tiled +image of @x_tiles by @y_tiles. + +Use this method when @mode is of type %GST_VIDEO_TILE_TYPE_INDEXED. + + + the index of the tile at @x and @y in the tiled image of + @x_tiles by @y_tiles. + + + + + a #GstVideoTileMode + + + + x coordinate + + + + y coordinate + + + + number of horizintal tiles + + + + number of vertical tiles + + + + + + + + + + + + + + + + + + Convert @val to its gamma decoded value. This is the inverse operation of +@gst_video_color_transfer_encode(). + +For a non-linear value L' in the range [0..1], conversion to the linear +L is in general performed with a power function like: + +|[ + L = L' ^ gamma +]| + +Depending on @func, different formulas might be applied. Some formulas +encode a linear segment in the lower range. + + + the gamma decoded value of @val + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Convert @val to its gamma encoded value. + +For a linear value L in the range [0..1], conversion to the non-linear +(gamma encoded) L' is in general performed with a power function like: + +|[ + L' = L ^ (1 / gamma) +]| + +Depending on @func, different formulas might be applied. Some formulas +encode a linear segment in the lower range. + + + the gamma encoded value of @val + + + + + a #GstVideoTransferFunction + + + + a value + + + + + + Converts the @value to the #GstVideoTransferFunction +The transfer characteristics (TransferCharacteristics) value is +defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +and "ITU-T H.273 Table 3". +"H.264 Table E-4" and "H.265 Table E.4" share the identical values. + + + the matched #GstVideoTransferFunction + + + + + a ITU-T H.273 transfer characteristics value + + + + + + Returns whether @from_func and @to_func are equivalent. There are cases +(e.g. BT601, BT709, and BT2020_10) where several functions are functionally +identical. In these cases, when doing conversion, we should consider them +as equivalent. Also, BT2020_12 is the same as the aforementioned three for +less than 12 bits per pixel. + + + TRUE if @from_func and @to_func can be considered equivalent. + + + + + #GstVideoTransferFunction to convert from + + + + bits per pixel to convert from + + + + #GstVideoTransferFunction to convert into + + + + bits per pixel to convert into + + + + + + Converts #GstVideoTransferFunction to the "transfer characteristics" +(TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3" +and "ITU-T H.273 Table 3". +"H.264 Table E-4" and "H.265 Table E.4" share the identical values. + + + The value of ISO/IEC 23001-8 transfer characteristics. + + + + + a #GstVideoTransferFunction + + + + + + This object is used to convert video frames from one format to another. +The object can perform conversion of: + + * video format + * video colorspace + * chroma-siting + * video size + + + diff --git a/girs/GstWebRTC-1.0.gir b/girs/GstWebRTC-1.0.gir new file mode 100644 index 0000000000..e6712f0d14 --- /dev/null +++ b/girs/GstWebRTC-1.0.gir @@ -0,0 +1,1742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 +for more information. + + none + + + balanced + + + max-compat + + + max-bundle + + + + + none + + + actpass + + + sendonly + + + recvonly + + + + + + + + + + + + + + + + + + + + + + + + + + + + + new + + + closed + + + failed + + + connecting + + + connected + + + + + + Close the @channel. + + + + + + + a #GstWebRTCDataChannel + + + + + + Send @data as a data message over @channel. + + + + + + + a #GstWebRTCDataChannel + + + + a #GBytes or %NULL + + + + + + Send @str as a string message over @channel. + + + + + + + a #GstWebRTCDataChannel + + + + a string or %NULL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Close the data channel + + + + + + + + + + + + + + + + + + + + + the #GError thrown + + + + + + + + + + + a #GBytes of the data received + + + + + + + + + + + the data received as a string + + + + + + + + + + + + + + + + a #GBytes with the data + + + + + + + + + + + the data to send as a string + + + + + + + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcdatachannelstate> + + new + + + connection + + + open + + + closing + + + closed + + + + + none + + + ulpfec + red + + + + + RTP component + + + RTCP component + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate> + + new + + + checking + + + connected + + + completed + + + failed + + + disconnected + + + closed + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate> + + new + + + gathering + + + complete + + + + + controlled + + + controlling + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 +for more information. + + all + + + relay + + + + https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-kind + + Kind has not yet been set + + + Kind is audio + + + Kind is audio + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate> + + new + + + connecting + + + connected + + + disconnected + + + failed + + + closed + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + + very-low + + + low + + + medium + + + high + + + + + + The DTLS transport for this receiver + + + + + + + + + + Sets the content of the IPv4 Type of Service (ToS), also known as DSCP +(Differentiated Services Code Point). +This also sets the Traffic Class field of IPv6. + + + + + + + a #GstWebRTCRTPSender + + + + The priority of this sender + + + + + + The priority from which to set the DSCP field on packets + + + + The DTLS transport for this sender + + + + + + + + + + Caps representing the codec preferences. + + + + The transceiver's current directionality, or none if the +transceiver is stopped or has never participated in an exchange +of offers and answers. To change the transceiver's +directionality, set the value of the direction property. + + + + Direction of the transceiver. + + + + The kind of media this transceiver transports + + + + The media ID of the m-line associated with this transceiver. This +association is established, when possible, whenever either a +local or remote description is applied. This field is null if +neither a local or remote description has been applied, or if its +associated m-line is rejected by either a remote offer or any +answer. + + + + + + + + + + + + + + + + + + none + + + inactive + + + sendonly + + + recvonly + + + sendrecv + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcsctptransportstate> + + new + + + connecting + + + connected + + + closed + + + + See <http://w3c.github.io/webrtc-pc/#rtcsdptype> + + offer + + + pranswer + + + answer + + + rollback + + + + + the string representation of @type or "unknown" when @type is not + recognized. + + + + + a #GstWebRTCSDPType + + + + + + + See <https://www.w3.org/TR/webrtc/#rtcsessiondescription-class> + + + the #GstWebRTCSDPType of the description + + + + the #GstSDPMessage of the description + + + + + + a new #GstWebRTCSessionDescription from @type + and @sdp + + + + + a #GstWebRTCSDPType + + + + a #GstSDPMessage + + + + + + + + a new copy of @src + + + + + a #GstWebRTCSessionDescription + + + + + + Free @desc and all associated resources + + + + + + + a #GstWebRTCSessionDescription + + + + + + + See <http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate> + + stable + + + closed + + + have-local-offer + + + have-remote-offer + + + have-local-pranswer + + + have-remote-pranswer + + + + + codec + + + inbound-rtp + + + outbound-rtp + + + remote-inbound-rtp + + + remote-outbound-rtp + + + csrc + + + peer-connectiion + + + data-channel + + + stream + + + transport + + + candidate-pair + + + local-candidate + + + remote-candidate + + + certificate + + + + <https://www.w3.org/TR/webrtc/#rtcdatachannel> + + + <https://www.w3.org/TR/webrtc/#rtcdtlstransport> + + + <https://www.w3.org/TR/webrtc/#rtcicetransport> + + + <https://www.w3.org/TR/webrtc/#rtcrtpreceiver-interface> + + + <https://www.w3.org/TR/webrtc/#rtcrtpsender-interface> + + + <https://www.w3.org/TR/webrtc/#rtcsessiondescription-class> + + + <https://www.w3.org/TR/webrtc/#rtcrtptransceiver-interface> + + + + + the string representation of @type or "unknown" when @type is not + recognized. + + + + + a #GstWebRTCSDPType + + + + + + diff --git a/gstreamer-sharp-1.0.pc.in b/gstreamer-sharp-1.0.pc.in new file mode 100644 index 0000000000..b8176a2369 --- /dev/null +++ b/gstreamer-sharp-1.0.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=@libdir@ +gapidir=@gapidir@ + +Name: @ASSEMBLY_TITLE@ +Description: @ASSEMBLY_DESCRIPTION@ +Version: @VERSION@ +Requires: glib-sharp-3.0 gio-sharp-3.0 +Cflags: -I:${gapidir}/gstreamer-sharp-api.xml +Libs: -r:${libdir}/mono/@ASSEMBLY_NAME@/@ASSEMBLY_NAME@.dll diff --git a/gstreamer-sharp.csproj b/gstreamer-sharp.csproj new file mode 100644 index 0000000000..bf751548aa --- /dev/null +++ b/gstreamer-sharp.csproj @@ -0,0 +1,48 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {64358320-CAC2-4B22-836C-268269DAB031} + Library + gstreamersharp + gstreamer-sharp + true + gstreamer-sharp.snk + v2.0 + + + true + full + false + out + DEBUG; + prompt + 4 + false + true + 2002 + + + true + out + prompt + 4 + false + true + 2002 + + + + + + + + + + + + + diff --git a/gstreamer-sharp.sln b/gstreamer-sharp.sln new file mode 100644 index 0000000000..15d78f301b --- /dev/null +++ b/gstreamer-sharp.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "gstreamer-sharp", "gstreamer-sharp.csproj", "{64358320-CAC2-4B22-836C-268269DAB031}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64358320-CAC2-4B22-836C-268269DAB031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64358320-CAC2-4B22-836C-268269DAB031}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64358320-CAC2-4B22-836C-268269DAB031}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64358320-CAC2-4B22-836C-268269DAB031}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = gstreamer-sharp.csproj + EndGlobalSection +EndGlobal diff --git a/gstreamer-sharp.snk b/gstreamer-sharp.snk new file mode 100644 index 0000000000..f1f07772ba Binary files /dev/null and b/gstreamer-sharp.snk differ diff --git a/meson.build b/meson.build new file mode 100644 index 0000000000..fb91e96ed0 --- /dev/null +++ b/meson.build @@ -0,0 +1,185 @@ +project('gstreamer-sharp', ['cs', 'c'], version: '1.19.2', + meson_version : '>= 0.54', license: 'LGPL') + +if host_machine.system() == 'osx' + lib_prefix='' + lib_suffix='.dylib' +else + lib_prefix='.so' + lib_suffix='' +endif + +gtk_sharp_required_version = '>=3.22.6' + +csc = meson.get_compiler('cs') +if csc.get_id() == 'mono' + add_project_arguments('-keyfile:' + join_paths(meson.current_source_dir(), meson.project_name() + '.snk'), + language: ['cs']) +endif + + +subproject('gtk-sharp', default_options: ['install=false']) +gtk_sharp = subproject('gtk-sharp') + +glib_sharp_dep = gtk_sharp.get_variable('glib_sharp_dep') +glib_sharp = gtk_sharp.get_variable('glib_sharp') + +gio_sharp_dep = gtk_sharp.get_variable('gio_sharp_dep') +gio_sharp = gtk_sharp.get_variable('gio_sharp') + +gapi_fixup = gtk_sharp.get_variable('gapi_fixup') +gapi_codegen = gtk_sharp.get_variable('gapi_codegen') + +glib_api_includes = gtk_sharp.get_variable('glib_api_includes') +gio_api_includes = gtk_sharp.get_variable('gio_api_includes') +has_gtk = gtk_sharp.get_variable('has_gtk') +if has_gtk + gtk_sharp_dep = [gtk_sharp.get_variable('gtk_sharp_dep'), + gtk_sharp.get_variable('atk_sharp_dep')] +else + gtk_sharp_dep = dependency('gtk-sharp-3.0', version: gtk_sharp_required_version, + required: false) +endif + +mono_path = [gtk_sharp.get_variable('mono_path'), join_paths(meson.current_build_dir(), 'sources')] + +codegen_dependencies = [gapi_codegen, gapi_fixup, glib_sharp, gio_sharp] +gapi_fixup = gapi_fixup.full_path() +gapi_codegen = gapi_codegen.full_path() + +gacutil = find_program('gacutil') +generate_api = find_program('generate_code.py') +nuget = find_program('nuget.py') +diff = find_program('Tests/test_abi.py') + +# TODO Handle monodoc + +apiversion = '1.0' +gst_required_version = '>=@0@'.format(meson.project_version()) +gst_deps = [] + +# dependency name, [subproject-name, internal-dep-name, library-name'] +gst_deps_defs = [ + ['gstreamer', ['gstreamer', 'gst_dep'], 'libgst'], + ['gstreamer-app', ['gst-plugins-base', 'app_dep'], 'gstapp'], + ['gstreamer-audio', ['gst-plugins-base', 'audio_dep'], 'gstaudio'], + ['gstreamer-base', ['gstreamer', 'gst_base_dep'], 'gst_base'], + ['gstreamer-controller', ['gstreamer', 'gst_controller_dep'], 'gst_controller'], + ['gstreamer-fft', ['gst-plugins-base', 'fft_dep'], 'gstfft'], + ['gstreamer-net', ['gstreamer', 'gst_net_dep'], 'gst_net'], + ['gstreamer-pbutils', ['gst-plugins-base', 'pbutils_dep'], 'pbutils'], + ['gstreamer-riff', ['gst-plugins-base', 'riff_dep'], 'gstriff'], + ['gstreamer-rtp', ['gst-plugins-base', 'rtp_dep'], 'gst_rtp'], + ['gstreamer-rtsp', ['gst-plugins-base', 'rtsp_dep'], 'gst_rtsp'], + ['gstreamer-sdp', ['gst-plugins-base', 'sdp_dep'], 'gstsdp'], + ['gstreamer-tag', ['gst-plugins-base', 'tag_dep'], 'gsttag'], + ['gstreamer-video', ['gst-plugins-base', 'video_dep'], 'gstvideo'], + ['gstreamer-webrtc', ['gst-plugins-bad', 'gstwebrtc_dep'], 'gstwebrtc'], +] + +foreach dep: gst_deps_defs + gst_deps += [dependency(dep.get(0) + '-' + apiversion, version: gst_required_version, + fallback: dep.get(1))] +endforeach + +ges_dep = dependency('gst-editing-services-' + apiversion, version: gst_required_version, + fallback: ['gst-editing-services', 'ges_dep'], required: false) + +if ges_dep.found() + gst_deps_defs += [ + ['gst-editing-services', ['gst-editing-services', 'ges_dep'], 'libges'], + ] + mono_path += [join_paths(meson.current_build_dir(), 'ges')] +endif + +testsenv = environment() +testsenv.prepend('MONO_PATH', mono_path) +i = 0 +testsenv_ld_library_path = [] +foreach dep: gst_deps + [ges_dep] + if dep.type_name() == 'pkgconfig' + testsenv_ld_library_path += [dep.get_pkgconfig_variable('libdir')] + else + depdef = gst_deps_defs[i][1] + libname = gst_deps_defs[i].get(2, '') + if libname != '' + proj = subproject(depdef[0]) + libpath = proj.get_variable(libname).full_path().split('/') + dirname = '' + j = 1 + foreach comp: libpath + if j < libpath.length() + dirname += '/' + comp + endif + j += 1 + endforeach + testsenv_ld_library_path += [dirname] + endif + endif + i += 1 +endforeach +# FIXME: port this to macOS and Windows +testsenv.prepend('LD_LIBRARY_PATH', testsenv_ld_library_path) + +subdir('sources') +if ges_dep.found() + subdir('ges') + custom_target('GESSharp-nuget', + command: [nuget, '--package-name', 'GESSharp', + '--assembly', ges_sharp.full_path(), + '--dependency=GstSharp:' + meson.project_version(), + '--project-url', 'https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html', + '--icon-url', 'https://gstreamer.freedesktop.org/images/header-logo-top.png', + '--license-url', 'https://cgit.freedesktop.org/gstreamer/gstreamer-sharp/plain/COPYING', + '--version', meson.project_version(), + '--tags', 'GStreamer GES GstSharp bindings', + '--builddir', meson.current_build_dir(), + '--dependency', 'GstSharp:' + meson.project_version(), + ], + output: 'GESSharp.' + meson.project_version() + '.nupkg' + ) +endif + +custom_target('GstSharp-nuget', + command: [nuget, '--package-name', 'GstSharp', + '--assembly', gst_sharp.full_path(), + '--assembly', gio_sharp.full_path(), + '--assembly', glib_sharp.full_path(), + '--project-url', 'https://gstreamer.freedesktop.org/modules/gstreamer-sharp.html', + '--icon-url', 'https://gstreamer.freedesktop.org/images/header-logo-top.png', + '--license-url', 'https://cgit.freedesktop.org/gstreamer/gstreamer-sharp/plain/COPYING', + '--version', meson.project_version(), + '--tags', 'GStreamer GstSharp bindings', + '--builddir', meson.current_build_dir(), + ], + output: 'GstSharp.' + meson.project_version() + '.nupkg', +) + +subdir('samples') +subdir('Tests') + +bindinator = subproject('bindinator', default_options: ['gapi_fixup=@0@'.format(gapi_fixup)]) +if bindinator.get_variable('found') + bindinate = bindinator.get_variable('bindinate') + run_target('bindinate_gstreamer', + command: [bindinate, + '--name=gstreamer', '--regenerate=true', + '--merge-with=GstApp-1.0,GstAudio-1.0,GstBase-1.0,GstController-1.0,GstNet-1.0,GstPbutils-1.0,GstRtp-1.0,GstRtsp-1.0,GstSdp-1.0,GstTag-1.0,GstVideo-1.0,GstWebRTC-1.0', + '--gir=Gst-1.0', + '--copy-girs=@0@'.format(join_paths(meson.current_source_dir(), 'girs'))], + depends: [] + ) + run_target('bindinate_ges', + command: ['sh', '-c', + '''@0@ --name=gst-editing-services --regenerate=true --gir=GES-1.0 && mv @1@/sources/gst-editing-services-sharp-api.raw @1@/ges/gst-editing-services-api.raw '''.format( + bindinate.path(), + meson.current_source_dir()), + ], + depends: [] + ) + python3 = import('python3').find_python() + run_target('update-code', command: [find_program('update_sources.py')]) + run_target('update-all', command: [find_program('update_sources.py'), 'bindinate']) +else + warning('Bindinator not usable as some required dependencies are not avalaible.') +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000000..b27c329ec8 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('tests', type : 'feature', value : 'auto', yield : true) \ No newline at end of file diff --git a/nuget.py b/nuget.py new file mode 100644 index 0000000000..177899e278 --- /dev/null +++ b/nuget.py @@ -0,0 +1,195 @@ +#!/usr/bin/python3 +import argparse +import getpass +import os +import sys +import shutil +import subprocess +from datetime import datetime +from urllib.request import urlretrieve +from zipfile import ZipFile + +NUSPEC_TEMPLATE = """ + + + {package_name} + {author} + {owner} + {license_url} + {project_url} + {icon_url} + false + {description}. + {copyright} + {tags} + {version} + +{dependencies} + + +{files} + +""" + +TARGETS_TEMPLATE = r""" + + + + + + + + +""" + + +class Nugetifier: + def cleanup_args(self): + self.nugetdir = os.path.join(self.builddir, + self.package_name + 'nupkg') + self.frameworkdir = 'net45' + self.nuget_build_dir = os.path.join( + self.nugetdir, 'build', self.frameworkdir) + self.nuget_lib_dir = os.path.join( + self.nugetdir, 'lib', self.frameworkdir) + self.nuspecfile = os.path.join( + self.nugetdir, '%s.nuspec' % self.package_name) + self.nugettargets = os.path.join( + self.nuget_build_dir, "%s.targets" % self.package_name) + self.nuget = shutil.which('nuget') + if not self.nuget: + print("Could not find the `nuget` tool, install it and retry!") + return -1 + + for d in [self.nugetdir, self.nuget_lib_dir, self.nuget_build_dir]: + os.makedirs(d, exist_ok=True) + if not self.description: + self.description = "%s c# bindings" % self.package_name + if not self.copyright: + self.copyright = "Copyright %s" % datetime.now().year + if not self.tags: + self.tags = self.package_name + + return 0 + + def run(self): + res = self.cleanup_args() + if res: + return res + + self.files = '' + + def add_file(path, target="lib"): + f = ' \n' % ( + path, os.path.join(target, os.path.basename(path))) + self.files += f + + self.dependencies = '' + for dependency in self.dependency: + _id, version = dependency.split(":") + self.dependencies += ' \n' % ( + _id, version) + + for assembly in self.assembly: + add_file(assembly, os.path.join('lib', self.frameworkdir)) + + for f in [assembly + '.config', assembly[:-3] + 'pdb']: + if os.path.exists(f): + add_file(f, os.path.join('build', self.frameworkdir)) + + with open(self.nugettargets, 'w') as _: + print(TARGETS_TEMPLATE.format(**self.__dict__), file=_) + add_file(self.nugettargets, 'build') + + with open(self.nuspecfile, 'w') as _: + print(NUSPEC_TEMPLATE.format(**self.__dict__), file=_) + + subprocess.check_call([self.nuget, 'pack', self.nuspecfile], + cwd=self.builddir) + + +class NugetDownloader: + def reporthook(self, blocknum, blocksize, totalsize): + readsofar = blocknum * blocksize + if totalsize > 0: + percent = readsofar * 1e2 / totalsize + s = "\r%5.1f%% %*d / %d" % ( + percent, len(str(totalsize)), readsofar, totalsize) + sys.stderr.write(s) + if readsofar >= totalsize: # near the end + sys.stderr.write("\n") + else: # total size is unknown + sys.stderr.write("read %d\n" % (readsofar,)) + + def run(self): + url = "https://www.nuget.org/api/v2/package/{nuget_name}/{nuget_version}".format( + **self.__dict__) + workdir = os.path.join(self.current_builddir, + self.nuget_name, self.nuget_version) + os.makedirs(workdir, exist_ok=True) + + try: + with open(os.path.join(workdir, 'linkline'), 'r') as f: + print(f.read()) + return + except FileNotFoundError: + pass + nugetpath = os.path.join(workdir, self.nuget_name) + '.zip' + print("Downloading %s into %s" % (url, nugetpath), file=sys.stderr) + urlretrieve(url, nugetpath, self.reporthook) + + lib_path = os.path.join('lib', self.csharp_version) + dll_path = os.path.join(self.nuget_name, self.nuget_version) + extract_dir = os.path.join(self.current_builddir, dll_path) + os.makedirs(extract_dir, exist_ok=True) + linkline = '' + + print("%s - %s" % (self.builddir, extract_dir), file=sys.stderr) + with ZipFile(nugetpath) as zip: + for f in zip.infolist(): + if f.filename.startswith(lib_path): + zip.extract(f, path=extract_dir) + if f.filename.endswith('.dll'): + linkline += ' -r:' + \ + os.path.relpath(os.path.join( + extract_dir, f.filename), self.builddir) + + with open(os.path.join(workdir, 'linkline'), 'w') as f: + print(linkline.strip(), file=f) + + print(linkline.strip()) + + +if __name__ == "__main__": + if "get" not in sys.argv: + parser = argparse.ArgumentParser() + parser.add_argument('--builddir') + parser.add_argument('--package-name') + parser.add_argument('--author', default=getpass.getuser()) + parser.add_argument('--owner', default=getpass.getuser()) + parser.add_argument('--native', action='append', default=[]) + parser.add_argument('--assembly', action='append', default=[]) + parser.add_argument('--out') + parser.add_argument('--description') + parser.add_argument('--copyright') + parser.add_argument('--version') + parser.add_argument('--icon-url', default='') + parser.add_argument('--project-url', default='') + parser.add_argument('--license-url', default='') + parser.add_argument('--tags', default='') + parser.add_argument('--dependency', default=[], action='append') + + runner = Nugetifier() + else: + sys.argv.remove('get') + parser = argparse.ArgumentParser() + parser.add_argument('--builddir') + parser.add_argument('--current-builddir') + parser.add_argument('--nuget-name') + parser.add_argument('--nuget-version') + parser.add_argument('--csharp-version') + + runner = NugetDownloader() + + options = parser.parse_args(namespace=runner) + exit(runner.run()) diff --git a/samples/BasicTutorial1.cs b/samples/BasicTutorial1.cs new file mode 100644 index 0000000000..1747d5abba --- /dev/null +++ b/samples/BasicTutorial1.cs @@ -0,0 +1,30 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; + +namespace GstreamerSharp +{ + class Playback + { + public static void Main (string[] args) + { + // Initialize Gstreamer + Application.Init(ref args); + + // Build the pipeline + var pipeline = Parse.Launch("playbin uri=http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"); + + // Start playing + pipeline.SetState(State.Playing); + + // Wait until error or EOS + var bus = pipeline.Bus; + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error); + + // Free resources + pipeline.SetState (State.Null); + } + } +} diff --git a/samples/BasicTutorial12.cs b/samples/BasicTutorial12.cs new file mode 100644 index 0000000000..5eb572a2fd --- /dev/null +++ b/samples/BasicTutorial12.cs @@ -0,0 +1,91 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + static bool IsLive; + static Element Pipeline; + static GLib.MainLoop MainLoop; + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + + // Build the pipeline + Pipeline = Parse.Launch ("playbin uri=http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"); + var bus = Pipeline.Bus; + + // Start playing + var ret = Pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } else if (ret == StateChangeReturn.NoPreroll) { + IsLive = true; + } + + MainLoop = new GLib.MainLoop (); + + bus.AddSignalWatch (); + bus.Message += HandleMessage; + + MainLoop.Run (); + + // Free resources + Pipeline.SetState (State.Null); + } + + static void HandleMessage (object o, MessageArgs args) + { + var msg = args.Message; + switch (msg.Type) { + case MessageType.Error: { + GLib.GException err; + string debug; + + msg.ParseError (out err, out debug); + Console.WriteLine ("Error: {0}", err.Message); + + Pipeline.SetState (State.Ready); + MainLoop.Quit (); + break; + } + case MessageType.Eos: + // end-of-stream + Pipeline.SetState (State.Ready); + MainLoop.Quit (); + break; + case MessageType.Buffering: { + int percent = 0; + + // If the stream is live, we do not care about buffering. + if (IsLive) break; + + percent = msg.ParseBuffering (); + Console.WriteLine ("Buffering ({0})", percent); + // Wait until buffering is complete before start/resume playing + if (percent < 100) + Pipeline.SetState (State.Paused); + else + Pipeline.SetState (State.Playing); + break; + } + case MessageType.ClockLost: + // Get a new clock + Pipeline.SetState (State.Paused); + Pipeline.SetState (State.Playing); + break; + default: + // Unhandled message + break; + } + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial13.cs b/samples/BasicTutorial13.cs new file mode 100644 index 0000000000..1fcda15686 --- /dev/null +++ b/samples/BasicTutorial13.cs @@ -0,0 +1,121 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + static bool Playing; // Playing or Paused + static double Rate; //Current playback rate (can be negative) + static Element Pipeline, VideoSink; + + // Send seek event to change rate + static void SendSeekEvent () { + var format = Format.Time; + long position; + + // Obtain the current position, needed for the seek event + if (!Pipeline.QueryPosition (format, out position)) { + Console.WriteLine ("Unable to retrieve current position."); + return; + } + + Event seekEvent; + // Create the seek event + if (Rate > 0) { + seekEvent = Event.NewSeek (Rate, Format.Time, SeekFlags.Flush | SeekFlags.Accurate, SeekType.Set, position, SeekType.None, 0); + } else { + seekEvent = Event.NewSeek (Rate, Format.Time, SeekFlags.Flush | SeekFlags.Accurate, SeekType.Set, 0, SeekType.Set, position); + } + + if (VideoSink == null) { + // If we have not done so, obtain the sink through which we will send the seek events + VideoSink = (Element)Pipeline ["video-sink"]; + } + + // Send the event + VideoSink.SendEvent (seekEvent); + + Console.WriteLine ("Current rate: {0}", Rate); + } + + // Process keyboard input + static void HandleKeyboard () { + ConsoleKeyInfo x; + bool terminate = false; + while (!terminate) { + x = Console.ReadKey (); + switch (x.Key) { + case ConsoleKey.P : + Playing = !Playing; + Pipeline.SetState (Playing ? State.Playing : State.Paused); + Console.WriteLine ("Setting state to {0}", Playing ? "PLAYING" : "PAUSE"); + break; + case ConsoleKey.S: + if (x.Modifiers == ConsoleModifiers.Shift) + Rate *= 2.0; + else + Rate /= 2.0; + SendSeekEvent (); + break; + case ConsoleKey.D: + Rate *= -1.0; + SendSeekEvent (); + break; + case ConsoleKey.N: + if (VideoSink == null) { + // If we have not done so, obtain the sink through which we will send the step events + VideoSink = (Element)Pipeline ["video-sink"]; + } + var evnt = Event.NewStep (Format.Buffers, 1, Rate, true, false); + VideoSink.SendEvent (evnt); + + Console.WriteLine ("Stepping one frame"); + break; + case ConsoleKey.Q: + terminate = true; + break; + default: + break; + } + } + } + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + + // Print usage map + Console.WriteLine ("USAGE: Choose one of the following options, then press enter:"); + Console.WriteLine (" 'P' to toggle between PAUSE and PLAY"); + Console.WriteLine (" 'S' to increase playback speed, 's' to decrease playback speed"); + Console.WriteLine (" 'D' to toggle playback direction"); + Console.WriteLine (" 'N' to move to next frame (in the current direction, better in PAUSE)"); + Console.WriteLine (" 'Q' to quit"); + + // Build the pipeline + //Pipeline = Parse.Launch ("playbin uri=http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"); + Pipeline = Parse.Launch ("playbin uri=file:///home/stephan/Downloads/sintel_trailer-1080p.mp4"); + + // Start playing + var ret = Pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + Playing = true; + Rate = 1.0; + + // Process input + HandleKeyboard (); + + // Free resources + Pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial2.cs b/samples/BasicTutorial2.cs new file mode 100644 index 0000000000..b6b29c3080 --- /dev/null +++ b/samples/BasicTutorial2.cs @@ -0,0 +1,72 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; + +namespace GstreamerSharp +{ + class Playback + { + public static void Main (string[] args) + { + // Initialize Gstreamer + Application.Init(ref args); + + // Build the pipeline + var source = ElementFactory.Make ("videotestsrc", "source"); + var sink = ElementFactory.Make ("autovideosink", "sink"); + + // Create the empty pipeline + var pipeline = new Pipeline ("test-pipeline"); + + if (pipeline == null || source == null || sink == null) { + Console.WriteLine ("Not all elements could be created"); + return; + } + + // Build the pipeline + pipeline.Add (source, sink); + if (!source.Link (sink)) { + Console.WriteLine ("Elements could not be linked"); + return; + } + + // Modify the source's properties + source ["pattern"] = 0; + + // Start playing + var ret = pipeline.SetState(State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state"); + return; + } + + // Wait until error or EOS + var bus = pipeline.Bus; + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error); + + // Free resources + if (msg != null) { + switch (msg.Type) { + case MessageType.Error: + GLib.GException exc; + string debug; + msg.ParseError (out exc, out debug); + Console.WriteLine (String.Format ("Error received from element {0}: {1}", msg.Src.Name, exc.Message)); + Console.WriteLine (String.Format ("Debugging information {0}", debug)); + break; + case MessageType.Eos: + Console.WriteLine ("End-Of-Stream reached"); + break; + default: + // We should not reach here because we only asked for ERRORs and EOS + Console.WriteLine ("Unexpected messag received"); + break; + } + } + + pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial3.cs b/samples/BasicTutorial3.cs new file mode 100644 index 0000000000..c43e4fbf78 --- /dev/null +++ b/samples/BasicTutorial3.cs @@ -0,0 +1,125 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; + +namespace GstreamerSharp +{ + class Playback + { + static Pipeline pipeline; + static Element source; + static Element convert; + static Element sink; + + public static void Main (string[] args) + { + // Initialize Gstreamer + Application.Init(ref args); + + // Create the elements + source = ElementFactory.Make ("uridecodebin", "source"); + convert = ElementFactory.Make ("audioconvert", "convert"); + sink = ElementFactory.Make ("autoaudiosink", "sink"); + + // Create the empty pipeline + pipeline = new Pipeline ("test-pipeline"); + + if (source == null || convert == null || sink == null || pipeline == null) { + Console.WriteLine ("Not all elements could be created"); + return; + } + + // Build the pipeline. Note that we are NOT linking the source at this point. + // We will do it later. + pipeline.Add (source, convert, sink); + if (!convert.Link (sink)) { + Console.WriteLine ("Elements could not be linked"); + return; + } + + // Set the URI to play + source ["uri"] = "http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"; + + // Connect to the pad-added signal + source.PadAdded += HandlePadAdded; + + // Start playing + var ret = pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Listen to the bus + var bus = pipeline.Bus; + bool terminated = false; + do { + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.StateChanged | MessageType.Error | MessageType.Eos); + + if (msg != null) { + switch (msg.Type) { + case MessageType.Error: + string debug; + GLib.GException exc; + msg.ParseError (out exc, out debug); + Console.WriteLine (string.Format ("Error received from element {0}: {1}", msg.Src.Name, exc.Message)); + Console.WriteLine ("Debugging information: {0}", debug); + terminated = true; + break; + case MessageType.Eos: + Console.WriteLine("End-Of-Stream reached."); + terminated = true; + break; + case MessageType.StateChanged: + // We are only interested in state-changed messages from the pipeline + if (msg.Src == pipeline) { + State oldState, newState, pendingState; + msg.ParseStateChanged(out oldState, out newState, out pendingState); + Console.WriteLine ("Pipeline state changed from {0} to {1}:", Element.StateGetName(oldState), Element.StateGetName(newState)); + } + break; + default: + // We should not reach here + Console.WriteLine ("Unexpected message received."); + break; + } + } + } while (!terminated); + + pipeline.SetState (State.Null); + } + + static void HandlePadAdded (object o, PadAddedArgs args) + { + var src = (Element)o; + var newPad = args.NewPad; + var sinkPad = convert.GetStaticPad ("sink"); + + Console.WriteLine (string.Format ("Received new pad '{0}' from '{1}':", newPad.Name, src.Name)); + + // If our converter is already linked, we have nothing to do here + if (sinkPad.IsLinked) { + Console.WriteLine ("We are already linked. Ignoring."); + return; + } + + // Check the new pad's type + var newPadCaps = newPad.Caps; + var newPadStruct = newPadCaps.GetStructure (0); + var newPadType = newPadStruct.Name; + if (!newPadType.StartsWith ("audio/x-raw")) { + Console.WriteLine ("It has type '{0}' which is not raw audio. Ignoring.", newPadType); + return; + } + + // Attempt the link + var ret = newPad.Link (sinkPad); + if (ret != PadLinkReturn.Ok) + Console.WriteLine ("Type is '{0} but link failed.", newPadType); + else + Console.WriteLine ("Link succeeded (type '{0}').", newPadType); + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial4.cs b/samples/BasicTutorial4.cs new file mode 100644 index 0000000000..814cced177 --- /dev/null +++ b/samples/BasicTutorial4.cs @@ -0,0 +1,136 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; + +namespace GstreamerSharp +{ + class Playback + { + static Element playbin; + static bool playing; + static bool terminate; + static bool seekEnabled; + static bool seekDone; + static long duration; + + public static void Main (string[] args) + { + // Initialize Gstreamer + Application.Init(ref args); + + // Create the elements + playbin = ElementFactory.Make ("playbin", "playbin"); + + if (playbin == null) { + Console.WriteLine ("Not all elements could be created"); + return; + } + + // Set the URI to play. + playbin ["uri"] = "http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"; + + // Start playing + var ret = playbin.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Listen to the bus + var bus = playbin.Bus; + do { + var msg = bus.TimedPopFiltered (100 * Constants.MSECOND, MessageType.StateChanged | MessageType.Error | MessageType.DurationChanged); + + // Parse message + if (msg != null) { + HandleMessage (msg); + } + else { + // We got no message, this means the timeout expired + if (playing) { + var fmt = Format.Time; + var current = -1L; + + // Query the current position of the stream + if (!playbin.QueryPosition (fmt, out current)) { + Console.WriteLine ("Could not query current position."); + } + + // if we didn't know it yet, query the stream position + if (duration <= 0) { + if (!playbin.QueryDuration (fmt, out duration)) { + Console.WriteLine ("Could not query current duration."); + } + } + + // Print current position and total duration + Console.Write("Position {0} / {1}\r", new TimeSpan (current), new TimeSpan (duration)); + + if (seekEnabled && !seekDone && current > 10L * Constants.SECOND) { + Console.WriteLine ("\nRead 10s, performing seek..."); + playbin.SeekSimple (fmt, SeekFlags.KeyUnit | SeekFlags.Flush, 30L * Constants.SECOND); + seekDone = true; + } + } + } + } while (!terminate); + } + + private static void HandleMessage (Message msg) { + switch (msg.Type) { + case MessageType.Error: + string debug; + GLib.GException exc; + msg.ParseError (out exc, out debug); + Console.WriteLine (string.Format ("Error received from element {0}: {1}", msg.Src.Name, exc.Message)); + Console.WriteLine ("Debugging information: {0}", debug); + terminate = true; + break; + case MessageType.Eos: + Console.WriteLine("End-Of-Stream reached."); + terminate = true; + break; + case MessageType.DurationChanged: + // The duration has changed, mark the current one as invalid + duration = -1; + break; + case MessageType.StateChanged: + // We are only interested in state-changed messages from the pipeline + if (msg.Src == playbin) { + State oldState, newState, pendingState; + msg.ParseStateChanged(out oldState, out newState, out pendingState); + Console.WriteLine ("Pipeline state changed from {0} to {1}:", Element.StateGetName(oldState), Element.StateGetName(newState)); + + // Remember wheather we are in the PLAYING state + playing = newState == State.Playing; + + if (playing) { + // We have just moved to PLAYING. Check if seeking is possible + var query = Query.NewSeeking (Format.Time); + long start, end; + Format fmt = Format.Time; + + if (playbin.Query (query)) { + query.ParseSeeking (out fmt, out seekEnabled, out start, out end); + + if (seekEnabled) { + Console.WriteLine ("Seeking is ENABLED from {0} to {1}", new TimeSpan(start), new TimeSpan(end)); + } else { + Console.WriteLine ("Seeking DISABLED for this stream."); + } + } else { + Console.WriteLine ("Seeking query failed."); + } + } + } + break; + default: + // We should not reach here + Console.WriteLine ("Unexpected message received."); + break; + } + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial5.cs b/samples/BasicTutorial5.cs new file mode 100644 index 0000000000..7ccec96c04 --- /dev/null +++ b/samples/BasicTutorial5.cs @@ -0,0 +1,367 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using Gtk; +using System.Runtime.InteropServices; +using Gst.Video; + +namespace GstreamerSharp +{ + class Playback + { + static Element Playbin; + static Gtk.Range Slider; + static TextView StreamsList; + static ulong silderUpdateSignalID; + + static State State; + static long Duration = -1; + static int ignoreCount = 0; + + static void HandleValueChanged (object sender, EventArgs e) + { + var range = (Gtk.Range)sender; + var value = range.Value; + Playbin.SeekSimple (Format.Time, SeekFlags.Flush | SeekFlags.KeyUnit, (long)(value * Gst.Constants.SECOND)); + } + + // This method is called when the STOP button is clicked + static void HandleStop (object sender, EventArgs e) + { + Playbin.SetState (State.Ready); + } + + // This method is called when the PAUSE button is clicked + static void HandlePause (object sender, EventArgs e) + { + Playbin.SetState (State.Paused); + } + + // This method is called when the PLAY button is clicked + static void HandlePlay (object sender, EventArgs e) + { + Playbin.SetState (State.Playing); + + } + + static void HandleRealized (object sender, EventArgs e) + { + var widget = (Widget)sender; + var window = widget.Window; + IntPtr windowID = IntPtr.Zero; + + // Retrieve window handler from GDK + switch (System.Environment.OSVersion.Platform) { + case PlatformID.Unix: + windowID = gdk_x11_window_get_xid (window.Handle); + break; + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + windowID = gdk_win32_drawable_get_handle (window.Handle); + break; + } + + Element overlay = null; + if(Playbin is Gst.Bin) + overlay = ((Gst.Bin) Playbin).GetByInterface (VideoOverlayAdapter.GType); + + VideoOverlayAdapter adapter = new VideoOverlayAdapter (overlay.Handle); + adapter.WindowHandle = windowID; + adapter.HandleEvents (true); + } + + // This function is called when the main window is closed + static void HandleDelete (object o, DeleteEventArgs args) + { + HandleStop (null, null); + Gtk.Application.Quit (); + } + + //This function is called everytime the video window needs to be redrawn (due to damage/exposure, rescaling, etc). GStreamer takes care of this in the PAUSED and PLAYING states, otherwise, we simply draw a black rectangle to avoid garbage showing up. */ + static void HandleDamage (object o, DamageEventArgs args) + { + var widget = (Widget)o; + + if (State != State.Paused && State != State.Playing) { + var window = widget.Window; + var allocation = widget.Allocation; + + var cr = Gdk.CairoHelper.Create (window); + cr.SetSourceRGB (0, 0, 0); + cr.Rectangle (0, 0, allocation.Width, allocation.Height); + cr.Fill (); + cr.Dispose (); + } + + args.RetVal = false; + } + + static void CreateUI () { + var mainWindow = new Window (WindowType.Toplevel); + mainWindow.DeleteEvent += HandleDelete; + + var videoWindow = new DrawingArea (); + videoWindow.DoubleBuffered = false; + videoWindow.Realized += HandleRealized; + videoWindow.DamageEvent += HandleDamage; + + var playButton = new Button (Stock.MediaPlay); + playButton.Clicked += HandlePlay; + + var pauseButton = new Button (Stock.MediaPause); + pauseButton.Clicked += HandlePause; + + var stopButton = new Button (Stock.MediaStop); + stopButton.Clicked += HandleStop; + + Slider = new HScale (0, 100, 1); + ((Scale)Slider).DrawValue = false; + Slider.ValueChanged += HandleValueChanged; + + StreamsList = new TextView (); + StreamsList.Editable = false; + + var controls = new HBox (false, 0); + controls.PackStart (playButton, false, false, 2); + controls.PackStart (pauseButton, false, false, 2); + controls.PackStart (stopButton, false, false, 2); + controls.PackStart (Slider, true, true, 2); + + var mainHBox = new HBox (false, 0); + mainHBox.PackStart (videoWindow, true, true, 0); + mainHBox.PackStart (StreamsList, false, false, 2); + + var mainBox = new VBox (false, 0); + mainBox.PackStart (mainHBox, true, true, 0); + mainBox.PackStart (controls, false, false, 0); + mainWindow.Add (mainBox); + mainWindow.SetDefaultSize (640, 480); + + mainWindow.ShowAll (); + } + + // This function is called periodically to refresh the GUI + static bool RefreshUI () { + var fmt = Format.Time; + long current = 0; + + // We do not want to update anything nless we are in the PAUSED or PLAYING states + if (State != State.Playing && State != State.Paused) + return true; + + // If we didn't know it yet, query the stream duration + if (Duration < 0) { + if (!Playbin.QueryDuration (fmt, out Duration)) + Console.WriteLine ("Could not query the current duration."); + else { + // Set the range of the silder to the clip duration, in SECONDS + Slider.SetRange (0, Duration / (double)Gst.Constants.SECOND); + } + } + + if (Playbin.QueryPosition (fmt, out current)) { + // Block the "value-changed" signal, so the HandleSlider function is not called (which would trigger a seek the user has not requested) + ignoreCount++; + Slider.ValueChanged -= HandleValueChanged; + // Set the position of the slider to the current pipeline position, in SECONDS + Slider.Value = current / (double)Gst.Constants.SECOND; + Slider.ValueChanged += HandleValueChanged; + + } + return true; + } + + + + // This function is called when an error message is posted on the bus + static void HandleTags (object sender, GLib.SignalArgs args) { + // We are possibly in the Gstreamer working thread, so we notify the main thread of this event through a message in the bus + var s = new Structure ("tags-changed"); + Playbin.PostMessage (Message.NewApplication (Playbin, s)); + } + + // This function is called when an error message is posted on the bus + static void HandleError (object sender, GLib.SignalArgs args) { + var msg = (Message)args.Args [0]; + string debug; + GLib.GException exc; + msg.ParseError (out exc, out debug); + Console.WriteLine (string.Format ("Error received from element {0}: {1}", msg.Src.Name, exc.Message)); + Console.WriteLine ("Debugging information: {0}", debug); + // Set the pipeline to READY (which stops playback) + Playbin.SetState (State.Ready); + } + + // This function is called when an End-Of-Stream message is posted on the bus. We just set the pipelien to READY (which stops playback) + static void HandleEos (object sender, GLib.SignalArgs args) { + Console.WriteLine ("End-Of-Stream reached."); + Playbin.SetState (State.Ready); + } + + // This function is called when the pipeline changes states. We use it to keep track of the current state. + static void HandleStateChanged (object sender, GLib.SignalArgs args) { + var msg = (Message) args.Args [0]; + State oldState, newState, pendingState; + msg.ParseStateChanged (out oldState, out newState, out pendingState); + if (msg.Src == Playbin) { + State = newState; + Console.WriteLine ("State set to {0}", Element.StateGetName (newState)); + if (oldState == State.Ready && newState == State.Paused) { + // For extra responsiveness, we refresh the GUI as soon as we reach the PAUSED state + RefreshUI (); + } + } + + } + + // Extract metadata from all the streams and write it to the text widget in the GUI + static void AnalyzeStreams () { + TagList tags; + String str, totalStr; + uint rate; + + // Clean current contents of the widget + var text = StreamsList.Buffer; + text.Text = String.Empty; + + // Read some properties + var nVideo = (int) Playbin ["n-video"]; + var nAudio = (int) Playbin ["n-audio"]; + var nText = (int) Playbin ["n-text"]; + + for (int i = 0; i < nVideo; i++) { + // Retrieve the stream's video tags + tags = (TagList)Playbin.Emit ("get-video-tags", i); + + if (tags != null) { + totalStr = string.Format ("video stream {0}:\n", i); + text.InsertAtCursor (totalStr); + tags.GetString (Gst.Constants.TAG_VIDEO_CODEC, out str); + totalStr = string.Format (" codec: {0}\n", str != null ? str : "unknown"); + text.InsertAtCursor (totalStr); + } + } + + for (int i = 0; i < nAudio; i++) { + // Retrieve the stream's audio tags + tags = (TagList)Playbin.Emit ("get-audio-tags", i); + + if (tags != null) { + totalStr = string.Format ("audio stream {0}:\n", i); + text.InsertAtCursor (totalStr); + + str = String.Empty; + if (tags.GetString (Gst.Constants.TAG_AUDIO_CODEC, out str)) { + totalStr = string.Format (" codec: {0}\n", str); + text.InsertAtCursor (totalStr); + } + str = String.Empty; + + if (tags.GetString (Gst.Constants.TAG_LANGUAGE_CODE+"dr", out str)) { + totalStr = string.Format (" language: {0}\n", str); + text.InsertAtCursor (totalStr); + } + str = String.Empty; + + if (tags.GetUint (Gst.Constants.TAG_BITRATE, out rate)) { + totalStr = string.Format (" bitrate: {0}\n", rate); + text.InsertAtCursor (totalStr); + } + } + } + + for (int i = 0; i < nText; i++) { + // Retrieve the stream's text tags + tags = (TagList)Playbin.Emit ("get-text-tags", i); + + if (tags != null) { + totalStr = string.Format ("subtitle stream {0}:\n", i); + text.InsertAtCursor (totalStr); + + if (tags.GetString (Gst.Constants.TAG_LANGUAGE_CODE, out str)) { + totalStr = string.Format (" language: {0}\n", str); + text.InsertAtCursor (totalStr); + } + } + } + } + + // This function is called when an "application" message is posted on the bus. Here we retrieve the message posted by the HandleTags callback + static void HandleApplication (object sender, GLib.SignalArgs args) { + var msg = (Message)args.Args [0]; + + if (msg.Structure.Name.Equals ("tags-changed")) { + // If the message is the "tags-changed" (only one we are currently issuing), update the stream info GUI + AnalyzeStreams (); + } + } + + public static void Main (string[] args) + { + // Initialize GTK + Gtk.Application.Init (); + + // Initialize Gstreamer + Gst.Application.Init(ref args); + + // Create the elements + Playbin = ElementFactory.Make ("playbin", "playbin"); + + if (Playbin == null) { + Console.WriteLine ("Not all elements could be created"); + return; + } + + // Set the URI to play. + Playbin ["uri"] = "http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"; + + // Connect to interesting signals in playbin + Playbin.Connect ("video-tags-changed", HandleTags); + Playbin.Connect ("audio-tags-changed", HandleTags); + Playbin.Connect ("text-tags-changed", HandleTags); + + + // Create the GUI + CreateUI (); + + // Instruct the bus to emit signals for each received message, and connect to the interesting signals + var bus = Playbin.Bus; + bus.AddSignalWatch (); + bus.Connect ("message::error", HandleError); + bus.Connect ("message::eos", HandleEos); + bus.Connect ("message::state-changed", HandleStateChanged); + bus.Connect ("message::application", HandleApplication); + + + // Start playing + var ret = Playbin.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Register a function that GLib will call every second + GLib.Timeout.Add (1, RefreshUI); + + // Start the GTK main loop- We will not regain control until gtk_main_quit is called + Gtk.Application.Run (); + + // Free resources + Playbin.SetState (State.Null); + + } + + [DllImport ("libgdk-3.so.0") ] + static extern IntPtr gdk_x11_window_get_xid (IntPtr handle); + + [DllImport ("gdk-win32-3.0-0.dll") ] + static extern IntPtr gdk_win32_drawable_get_handle (IntPtr handle); + + [DllImport ("libX11.so.6")] + static extern int XInitThreads (); + } +} diff --git a/samples/BasicTutorial6.cs b/samples/BasicTutorial6.cs new file mode 100644 index 0000000000..e5dbf2d611 --- /dev/null +++ b/samples/BasicTutorial6.cs @@ -0,0 +1,196 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + // Functions below print the capabilities in a human-friendly format + static void PrintCaps (Caps caps, string pfx) { + + if (caps == null) + return; + + if (caps.IsAny) { + Console.WriteLine ("{0}ANY", pfx); + return; + } + + if (caps.IsEmpty) { + Console.WriteLine ("{0}EMPTY", pfx); + return; + } + + for (uint i = 0; i < caps.Size; i++) { + var structure = caps.GetStructure (i); + + Console.WriteLine ("{0}{1}", pfx, structure.Name); + structure.Foreach ((field_id, value) => { + var ptr = g_quark_to_string (field_id); + var quark = GLib.Marshaller.Utf8PtrToString (ptr); + Console.WriteLine ("{0} {1}: {2}", pfx, quark, value.Val); + return true; + }); + } + } + + // Prints information about a Pad Template, including its Capabilities*/ + static void PrintPadTemplateInformation (ElementFactory factory) { + + Console.WriteLine ("Pad Templates for {0}:", factory.Name); + if (factory.NumPadTemplates == 0) { + Console.WriteLine (" none"); + return; + } + + var pads = factory.StaticPadTemplates; + foreach (var p in pads) { + var pad = (StaticPadTemplate) p; + + if (pad.Direction == PadDirection.Src) + Console.WriteLine (" SRC template: '{0}'", pad.NameTemplate); + else if (pad.Direction == PadDirection.Sink) + Console.WriteLine (" SINK template: '{0}'", pad.NameTemplate); + else + Console.WriteLine (" UNKNOWN!!! template: '{0}'", pad.NameTemplate); + + if (pad.Presence == PadPresence.Always) + Console.WriteLine (" Availability: Always"); + else if (pad.Presence == PadPresence.Sometimes) + Console.WriteLine (" Availability: Sometimes"); + else if (pad.Presence == PadPresence.Request) { + Console.WriteLine (" Availability: On request"); + } else + Console.WriteLine (" Availability: UNKNOWN!!!"); + + if (pad.StaticCaps.String != null) { + Console.WriteLine (" Capabilities:"); + PrintCaps (pad.StaticCaps.Get (), " "); + } + + Console.WriteLine (); + } + } + + // Shows the CURRENT capabilities of the requested pad in the given element */ + static void PrintPadCapabilities (Element element, string padName) { + + // Retrieve pad + var pad = element.GetStaticPad (padName); + if (pad == null) { + Console.WriteLine ("Could not retrieve pad '{0}'", padName); + return; + } + + // Retrieve negotiated caps (or acceptable caps if negotiation is not finished yet) + var caps = pad.CurrentCaps; + if (caps == null) + caps = pad.Caps; + + /* Print and free */ + Console.WriteLine ("Caps for the {0} pad:", padName); + PrintCaps (caps, " "); + } + + public static void Main (string[] args) + { + // Initialize Gstreamer + Gst.Application.Init(ref args); + + // Create the element factories + var sourceFactory = ElementFactory.Find ("audiotestsrc"); + var sinkFactory = ElementFactory.Find ("autoaudiosink"); + + + + if (sourceFactory == null || sinkFactory == null) { + Console.WriteLine ("Not all element factories could be created."); + return; + } + + // Print information about the pad templates of these factories + PrintPadTemplateInformation (sourceFactory); + PrintPadTemplateInformation (sinkFactory); + + // Ask the factories to instantiate actual elements + var source = sourceFactory.Create ("source"); + var sink = sinkFactory.Create ("sink"); + + // Create the empty pipeline + var pipeline = new Pipeline ("test-pipeline"); + + if (pipeline == null || source == null || sink == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + // Build the pipeline + pipeline.Add (source, sink); + if (!source.Link (sink)) { + Console.WriteLine ("Elements could not be linked."); + return; + } + + // Print initial negotiated caps (in NULL state) + Console.WriteLine ("In NULL state:"); + PrintPadCapabilities (sink, "sink"); + + // Start playing + var ret = pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state (check the bus for error messages)."); + } + + // Wait until error, EOS or State Change + var bus = pipeline.Bus; + var terminate = false; + + do { + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Error | MessageType.Eos | MessageType.StateChanged); + + // Parse message + if (msg != null) { + switch (msg.Type) { + case MessageType.Error: + string debug; + GLib.GException exc; + msg.ParseError (out exc, out debug); + Console.WriteLine ("Error received from element {0}: {1}", msg.Src.Name, exc.Message); + Console.WriteLine ("Debugging information: {0}", debug != null ? debug : "none"); + terminate = true; + break; + case MessageType.Eos: + Console.WriteLine ("End-Of-Stream reached.\n"); + terminate = true; + break; + case MessageType.StateChanged: + // We are only interested in state-changed messages from the pipeline + if (msg.Src == pipeline) { + State oldState, newState, pendingState; + msg.ParseStateChanged (out oldState, out newState, out pendingState); + Console.WriteLine ("Pipeline state changed from {0} to {1}:", + Element.StateGetName (oldState), Element.StateGetName (newState)); + // Print the current capabilities of the sink element + PrintPadCapabilities (sink, "sink"); + } + break; + default: + // We should not reach here because we only asked for ERRORs, EOS and STATE_CHANGED + Console.WriteLine ("Unexpected message received."); + break; + } + } + } while (!terminate); + + // Free resources + pipeline.SetState (State.Null); + } + + [DllImport ("glib-2.0.dll")] + static extern IntPtr g_quark_to_string (uint quark); + } +} \ No newline at end of file diff --git a/samples/BasicTutorial7.cs b/samples/BasicTutorial7.cs new file mode 100644 index 0000000000..7c4f5c1da9 --- /dev/null +++ b/samples/BasicTutorial7.cs @@ -0,0 +1,80 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + public static void Main (string[] args) + { + // Initialize Gstreamer + Gst.Application.Init(ref args); + + // Create the elements + var audioSource = ElementFactory.Make ("audiotestsrc", "audio_source"); + var tee = ElementFactory.Make ("tee", "tee"); + var audioQueue = ElementFactory.Make ("queue", "audio_queue"); + var audioConvert = ElementFactory.Make ("audioconvert", "audio_convert"); + var audioResample = ElementFactory.Make ("audioresample", "audio_resample"); + var audioSink = ElementFactory.Make ("autoaudiosink", "audio_sink"); + var videoQueue = ElementFactory.Make ("queue", "video_queue"); + var visual = ElementFactory.Make ("wavescope", "visual"); + var videoConvert = ElementFactory.Make ("videoconvert", "csp"); + var videoSink = ElementFactory.Make ("autovideosink", "video_sink"); + + // Create the empty pipeline + var pipeline = new Pipeline ("test-pipeline"); + + if (audioSource == null || tee == null || audioQueue == null || audioConvert == null || audioResample == null || + audioSink == null || videoQueue == null || visual == null || videoConvert == null || videoSink == null || pipeline == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + + // Link all elements that can be automatically linked because they have "Always" pads + pipeline.Add (audioSource, tee, audioQueue, audioConvert, audioResample, audioSink, + videoQueue, visual, videoConvert, videoSink); + if (!audioSource.Link (tee) || + !Element.Link (audioQueue, audioConvert, audioResample, audioSink) || + !Element.Link (videoQueue, visual, videoConvert, videoSink)) { + Console.WriteLine ("Elements could not be linked."); + return; + } + + // Manually link the Tee, which has "Request" pads + var teeSrcPadTemplate = tee.GetPadTemplate ("src_%u"); + var teeAudioPad = tee.RequestPad (teeSrcPadTemplate, null, null); + Console.WriteLine ("Obtained request pad {0} for audio branch.", teeAudioPad.Name); + var queueAudioPad = audioQueue.GetStaticPad ("sink"); + var teeVideoPad = tee.RequestPad (teeSrcPadTemplate, null, null); + Console.WriteLine ("Obtained request pad {0} for video branch.", teeVideoPad.Name); + var queueVideoPad = videoQueue.GetStaticPad ("sink"); + if (teeAudioPad.Link (queueAudioPad) != PadLinkReturn.Ok || + teeVideoPad.Link(queueVideoPad) != PadLinkReturn.Ok) { + Console.WriteLine ("Tee could not be linked."); + return; + } + + // Start playing + var ret = pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state (check the bus for error messages)."); + } + + // Wait until error or EOS + pipeline.Bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Error | MessageType.Eos); + + // Release the request pads from the Tee, and unref them + tee.ReleaseRequestPad (teeAudioPad); + tee.ReleaseRequestPad (teeVideoPad); + + // Free resources + pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/BasicTutorial8.cs b/samples/BasicTutorial8.cs new file mode 100644 index 0000000000..34c4e6c868 --- /dev/null +++ b/samples/BasicTutorial8.cs @@ -0,0 +1,229 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + const int ChunkSize = 1024; + const int SampleRate = 44100; + + static Gst.App.AppSink AppSink; + static Gst.App.AppSrc AppSource; + static Element Pipeline, Tee, AudioQueue, AudioConvert1, AudioResample, AudioSink; + static Element VideoQueue, AudioConvert2, Visual, VideoConvert, VideoSink; + static Element AppQueue; + + static long NumSamples; // Number of samples generated so far (for timestamp generation) + static float a, b, c, d; // For waveform generation + + static uint Sourceid; // To control the GSource + + static GLib.MainLoop MainLoop; // GLib's Main Loop + + // This method is called by the idle GSource in the mainloop, to feed CHUNK_SIZE bytes into appsrc. + // The idle handler is added to the mainloop when appsrc requests us to start sending data (need-data signal) + // and is removed when appsrc has enough data (enough-data signal). + + static bool PushData () { + var numSamples = ChunkSize / 2; // Because each sample is 16 bits + MapInfo map; + + // Create a new empty buffer + var buffer = new Gst.Buffer (null, ChunkSize, AllocationParams.Zero); + + // Set its timestamp and duration + buffer.Pts = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + buffer.Dts = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + buffer.Duration = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + + // Generate some psychodelic waveforms + buffer.Map (out map, MapFlags.Write); + c += d; + d -= c / 1000f; + var freq = 1100f + 1000f * d; + short[] data = new short[numSamples]; + for (int i = 0; i < numSamples; i++) { + a += b; + b -= a / freq; + data[i] = (short)(500f * a); + } + // convert the short[] to a byte[] by marshalling + var native = Marshal.AllocHGlobal (data.Length * sizeof(short)); + Marshal.Copy (data, 0, native, data.Length); + byte[] bytedata = new byte[2 * data.Length]; + Marshal.Copy (native, bytedata, 0, data.Length * sizeof(short)); + + map.Data = bytedata; + buffer.Unmap (map); + NumSamples += numSamples; + + // Push the buffer into the appsrc + var ret = AppSource.PushBuffer (buffer); + + // Free the buffer now that we are done with it + buffer.Dispose (); + + if (ret != FlowReturn.Ok) { + // We got some error, stop sending data + return false; + } + return true; + } + + // This signal callback triggers when appsrc needs Here, we add an idle handler + // to the mainloop to start pushing data into the appsrc + static void StartFeed (object sender, Gst.App.NeedDataArgs args) { + if (Sourceid == 0) { + Console.WriteLine ("Start feeding"); + Sourceid = GLib.Idle.Add (PushData); + } + } + + // This callback triggers when appsrc has enough data and we can stop sending. + // We remove the idle handler from the mainloop + static void StopFeed (object sender, EventArgs args) { + if (Sourceid != 0) { + Console.WriteLine ("Stop feeding"); + GLib.Source.Remove (Sourceid); + Sourceid = 0; + } + } + + // The appsink has received a buffer + static void NewSample (object sender, GLib.SignalArgs args) { + var sink = (Gst.App.AppSink)sender; + + // Retrieve the buffer + var sample = sink.PullSample (); + if (sample != null) { + // The only thing we do in this example is print a * to indicate a received buffer + Console.Write ("*"); + sample.Dispose (); + } + } + + // This function is called when an error message is posted on the bus + static void HandleError (object sender, GLib.SignalArgs args) { + GLib.GException err; + string debug; + var msg = (Message) args.Args[0]; + + // Print error details on the screen + msg.ParseError (out err, out debug); + Console.WriteLine ("Error received from element {0}: {1}", msg.Src.Name, err.Message); + Console.WriteLine ("Debugging information: {0}", debug != null ? debug : "none"); + + MainLoop.Quit (); + } + + public static void Main (string[] args) + { + b = 1; + d = 1; + Gst.Audio.AudioInfo info = new Gst.Audio.AudioInfo(); + + // Initialize Gstreamer + Gst.Application.Init(ref args); + + // Create the elements + AppSource = new Gst.App.AppSrc ("app_src"); + Tee = ElementFactory.Make ("tee", "tee"); + AudioQueue = ElementFactory.Make ("queue", "audio_queue"); + AudioConvert1 = ElementFactory.Make ("audioconvert", "audio_convert1"); + AudioResample = ElementFactory.Make ("audioresample", "audio_resample"); + AudioSink = ElementFactory.Make ("autoaudiosink", "audio_sink"); + VideoQueue = ElementFactory.Make ("queue", "video_queue"); + AudioConvert2 = ElementFactory.Make ("audioconvert", "audio_convert2"); + Visual = ElementFactory.Make ("wavescope", "visual"); + VideoConvert = ElementFactory.Make ("videoconvert", "video_convert"); + VideoSink = ElementFactory.Make ("autovideosink", "video_sink"); + AppQueue = ElementFactory.Make ("queue", "app_queue"); + AppSink = new Gst.App.AppSink ("app_sink"); + + // Create the empty pipeline + var pipeline = new Pipeline ("test-pipeline"); + + if (AppSource == null || Tee == null || AudioQueue == null || AudioConvert1 == null || AudioResample == null || + AudioSink == null || VideoQueue == null || AudioConvert2 == null || Visual == null || VideoConvert == null || + AppQueue == null || AppSink == null ||pipeline == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + // Configure wavescope + Visual ["shader"] = 0; + Visual ["style"] = 0; + + // Configure appsrc + Gst.Audio.AudioChannelPosition[] position = {}; + info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, position); + var audioCaps = info.ToCaps (); + AppSource ["caps"] = audioCaps; + AppSource ["format"] = Format.Time; + + AppSource.NeedData += StartFeed; + AppSource.EnoughData += StopFeed; + + // Configure appsink + AppSink ["emit-signals"] = true; + AppSink ["caps"] = audioCaps; + AppSink.NewSample += NewSample; + + // Link all elements that can be automatically linked because they have "Always" pads + pipeline.Add (AppSource, Tee, AudioQueue, AudioConvert1, AudioResample, + AudioSink, VideoQueue, AudioConvert2, Visual, VideoConvert, VideoSink, AppQueue, AppSink); + if (!Element.Link (AppSource, Tee) || + !Element.Link (AudioQueue, AudioConvert1, AudioResample, AudioSink) || + !Element.Link (VideoQueue, AudioConvert2, Visual, VideoConvert, VideoSink) || + !Element.Link (AppQueue, AppSink)) { + Console.WriteLine ("Elements could not be linked."); + return; + } + + // Manually link the Tee, which has "Request" pads + var teeSrcPadTemplate = Tee.GetPadTemplate ("src_%u"); + var teeAudioPad = Tee.RequestPad (teeSrcPadTemplate); + Console.WriteLine ("Obtained request pad {0} for audio branch.", teeAudioPad.Name); + var queueAudioPad = AudioQueue.GetStaticPad ("sink"); + var teeVideoPad = Tee.RequestPad (teeSrcPadTemplate); + Console.WriteLine ("Obtained request pad {0} for video branch.", teeVideoPad.Name); + var queueVideoPad = VideoQueue.GetStaticPad ("sink"); + var teeAppPad = Tee.RequestPad (teeSrcPadTemplate); + Console.WriteLine ("Obtained request pad {0} for app branch.", teeAppPad.Name); + var queueAppPad = AppQueue.GetStaticPad ("sink"); + if (teeAudioPad.Link (queueAudioPad) != PadLinkReturn.Ok || + teeVideoPad.Link (queueVideoPad) != PadLinkReturn.Ok || + teeAppPad.Link (queueAppPad) != PadLinkReturn.Ok) { + Console.WriteLine ("Tee could not be linked"); + return; + } + + // Instruct the bus to emit signals for each received message, and connect to the interesting signals + var bus = pipeline.Bus; + bus.AddSignalWatch (); + bus.Connect ("message::error", HandleError); + + // Start playing the pipeline + pipeline.SetState (State.Playing); + + // Create a GLib Main Loop and set it to run + MainLoop = new GLib.MainLoop (); + MainLoop.Run (); + + // Release the request pads from the Tee, and unref them + Tee.ReleaseRequestPad(teeAudioPad); + Tee.ReleaseRequestPad(teeVideoPad); + Tee.ReleaseRequestPad(teeAppPad); + + // Free resources + pipeline.SetState (State.Null); + + Gst.Global.Deinit(); + } + } +} diff --git a/samples/BasicTutorial9.cs b/samples/BasicTutorial9.cs new file mode 100644 index 0000000000..85a58e2bc3 --- /dev/null +++ b/samples/BasicTutorial9.cs @@ -0,0 +1,180 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using Gst.PbUtils; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + static Discoverer Discoverer; + static GLib.MainLoop MainLoop; + + // Print a tag in a human-readable format (name: value) + static void PrintTagForeach (TagList tags, string tag, int depth) { + var val = GLib.Value.Empty; + + TagList.CopyValue (ref val, tags, tag); + + string str; + if (val.Val is string) + str = (string)val.Val; + else + str = Value.Serialize (val); + + Console.WriteLine ("{0}{1}: {2}", new string(' ', 2 * depth), Tag.GetNick (tag), str); + } + + // Print information regarding a stream + static void PrintStreamInfo (DiscovererStreamInfo info, int depth) { + + var caps = info.Caps; + + string desc = null; + if (caps != null) { + if (caps.IsFixed) + desc = Gst.PbUtils.Global.PbUtilsGetCodecDescription (caps); + else + desc = caps.ToString (); + } + + Console.WriteLine ("{0}{1}: {2}", new string (' ', 2 * depth), info.StreamTypeNick, (desc != null ? desc : "")); + + var tags = info.Tags; + if (tags != null) { + Console.WriteLine ("{0}Tags:", new string (' ', 2 * (depth + 1))); + tags.Foreach ((TagForeachFunc)delegate (TagList list, string tag) { + PrintTagForeach (list, tag, depth + 2); + }); + } + } + + // Print information regarding a stream and its substreams, if any + static void PrintTopology (DiscovererStreamInfo info, int depth) { + + if (info == null) + return; + + PrintStreamInfo (info, depth); + + var next = info.Next; + if (next != null) { + PrintTopology (next, depth + 1); + } else if (info is DiscovererContainerInfo) { + var streams = ((DiscovererContainerInfo)info).Streams; + foreach (var stream in streams) { + PrintTopology (stream, depth + 1); + } + } + } + + //This function is called every time the discoverer has information regarding one of the URIs we provided. + static void HandleDiscovered (object disc, DiscoveredArgs args) { + var info = args.Info; + var uri = info.Uri; + var result = info.Result; + var discoverer = (Discoverer)disc; + + switch (result) { + case DiscovererResult.UriInvalid: + Console.WriteLine ("Invalid URI '{0}'", uri); + break; + case DiscovererResult.Error: + var err = new GLib.GException (args.Error); + Console.WriteLine ("Discoverer error: {0}", err.Message); + break; + case DiscovererResult.Timeout: + Console.WriteLine ("Timeout"); + break; + case DiscovererResult.Busy: + Console.WriteLine ("Busy"); + break; + case DiscovererResult.MissingPlugins:{ + var s = info.Misc; + + if (s != null) { + Console.WriteLine ("Missing plugins: {0}", s); + } + break; + } + case DiscovererResult.Ok: + Console.WriteLine ("Discovered '{0}'", uri); + break; + } + + if (result != DiscovererResult.Ok) { + Console.WriteLine ("This URI cannot be played"); + return; + } + + // If we got no error, show the retrieved information + Console.WriteLine ("\nDuration: {0}", new TimeSpan((long)info.Duration)); + + var tags = info.Tags; + if (tags != null) { + Console.WriteLine ("Tags:"); + tags.Foreach ((TagForeachFunc)delegate (TagList list, string tag) { + PrintTagForeach (list, tag, 1); + }); + } + + Console.WriteLine ("Seekable: {0}", (info.Seekable ? "yes" : "no")); + + Console.WriteLine (); + + var sinfo = info.StreamInfo; + if (sinfo == null) + return; + + Console.WriteLine ("Stream information:"); + + PrintTopology (sinfo, 1); + + Console.WriteLine (); + } + + public static void Main (string[] args) + { + var uri = "http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4"; + + // if a URI was provided, use it instead of the default one + if (args.Length > 1) { + uri = args[0]; + } + + // Initialize GStreamer + Gst.Application.Init (ref args); + + Console.WriteLine ("Discovering '{0}'", uri); + + // Instantiate the Discoverer + Discoverer = new Discoverer (5L * Gst.Constants.SECOND); + + // Connect to the interesting signals + Discoverer.Discovered += HandleDiscovered; + Discoverer.Finished += (sender, e) => { + Console.WriteLine ("Finished discovering"); + MainLoop.Quit (); + }; + + // Start the discoverer process (nothing to do yet) + Discoverer.Start (); + + // Add a request to process asynchronously the URI passed through the command line + if (!Discoverer.DiscoverUriAsync (uri)) { + Console.WriteLine ("Failed to start discovering URI '{0}'", uri); + return; + } + + // Create a GLib Main Loop and set it to run, so we can wait for the signals + MainLoop = new GLib.MainLoop (); + MainLoop.Run (); + + // Stop the discoverer process + Discoverer.Stop (); + } + } +} \ No newline at end of file diff --git a/samples/ExampleVolume.cs b/samples/ExampleVolume.cs new file mode 100644 index 0000000000..ef62782df4 --- /dev/null +++ b/samples/ExampleVolume.cs @@ -0,0 +1,115 @@ +using GLib; +using Gst; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; + +namespace GstreamerSharp +{ + class Program + { + static void Main(string[] args) + { + Gst.Application.Init(ref args); + + Element src = ElementFactory.Make("audiotestsrc"); + Element convert = ElementFactory.Make("audioconvert"); + Element volume = new ExampleVolume(); + Element sink = ElementFactory.Make("autoaudiosink"); + + Pipeline pipeline = new Pipeline(); + pipeline.Add(src, convert, volume, sink); + Element.Link(src, convert, volume, sink); + + pipeline.SetState(State.Playing); + + MainLoop loop = new MainLoop(); + loop.Run(); + + pipeline.SetState(State.Null); + + Console.ReadLine(); + } + } + class ExampleVolume : Element + { + public ExampleVolume() + { + Volume = 0.5; + + _sink = new Pad(__sinkTemplate, "sink"); + _sink.ChainFunctionFull = Chain; + _sink.Flags |= PadFlags.ProxyCaps; + AddPad(_sink); + + _src = new Pad(__srcTemplate, "src"); + _src.Flags |= PadFlags.ProxyCaps; + AddPad(_src); + } + + public double Volume { get; set; } + + FlowReturn Chain(Pad pad, Gst.Object parent, Gst.Buffer buffer) + { + if (Volume == 1.0) + { + return _src.Push(buffer); + } + + buffer.MakeWritable(); + + MapInfo mapInfo; + buffer.Map(out mapInfo, MapFlags.Read | MapFlags.Write); + + ScaleInt16(mapInfo.DataPtr, mapInfo.Size / 2, Volume); + + buffer.Unmap(mapInfo); + + return _src.Push(buffer); + } + + private unsafe void ScaleInt16(IntPtr data, ulong size, double volume) + { + Int16* sample = (Int16*)data; + for (ulong i = 0; i < size; i++) + { + *sample = ClampInt16(*sample * volume); + sample++; + } + } + + private Int16 ClampInt16(double d) + { + int i = (int)Math.Round(d); + + if (i > Int16.MaxValue) + { + return Int16.MaxValue; + } + else if (i < Int16.MinValue) + { + return Int16.MinValue; + } + else + { + return (Int16)i; + } + } + + Pad _src; + Pad _sink; + + static ExampleVolume() + { + Caps audioCaps = Caps.FromString("audio/x-raw, format=(string) S16LE, rate=(int) [1, MAX], channels=(int) 2, layout=(string) interleaved"); + __srcTemplate = new PadTemplate("src", PadDirection.Src, PadPresence.Always, audioCaps); + __sinkTemplate = new PadTemplate("sink", PadDirection.Sink, PadPresence.Always, audioCaps); + } + + static PadTemplate __srcTemplate; + static PadTemplate __sinkTemplate; + } +} diff --git a/samples/GESExample.cs b/samples/GESExample.cs new file mode 100644 index 0000000000..6ba2dbd478 --- /dev/null +++ b/samples/GESExample.cs @@ -0,0 +1,70 @@ +// Authors +// Copyright (C) 2017 Thibault Saunier +// +// 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 + + +using System; +using Gst; +using System.Diagnostics; + +namespace GESSharp +{ + class GESExample + { + public static void Main (string[] args) + { + // Initialize Gstreamer + Gst.Application.Init(); + + // Build the pipeline + GES.Global.Init(); + var pipeline = new GES.Pipeline(); + var timeline = GES.Timeline.NewAudioVideo(); + var layer = timeline.AppendLayer(); + + pipeline["timeline"] = timeline; + + var clip = new GES.TitleClip(); + clip.Duration = Constants.SECOND * 5; + layer.AddClip(clip); + clip.SetChildProperty("text", new GLib.Value("Clip 1")); + + var clip1 = new GES.TitleClip(); + clip1.Start = Constants.SECOND * 5; + clip1.Duration = Constants.SECOND * 5; + layer.AddClip(clip1); + clip1.SetChildProperty("text", new GLib.Value("Clip 2")); + + timeline.Commit(); + + pipeline.SetState(State.Playing); + //// Wait until error or EOS + var bus = pipeline.Bus; + Message msg = null; + while (msg == null) { + var format = Format.Time; + long position; + msg = bus.TimedPopFiltered (Gst.Constants.SECOND, MessageType.Eos | MessageType.Error); + + pipeline.QueryPosition (format, out position); + Console.WriteLine("position: " + Global.TimeFormat(position) + + " / " + Global.TimeFormat(timeline.Duration)); + } + pipeline.SetState(State.Null); + } + } +} diff --git a/samples/Playback.cs b/samples/Playback.cs new file mode 100644 index 0000000000..fc53b5ce89 --- /dev/null +++ b/samples/Playback.cs @@ -0,0 +1,96 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +using System; +using Gst; + +namespace GstreamerSharp +{ + class Playback + { + static GLib.MainLoop Loop; + static Element element; + + public static void Main (string[] args) + { + Loop = new GLib.MainLoop(); + + Application.Init(ref args); + element = Gst.Parse.Launch("playbin uri=http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.1080p.DivX_Plus_HD.mkv"); + + element.Bus.AddSignalWatch(); + element.Bus.Message += Handle; + element.SetState(State.Playing); + Loop.Run(); + } + + static void Handle (object e, MessageArgs args) + { + + switch (args.Message.Type) { + case MessageType.StateChanged: + State oldstate, newstate, pendingstate; + args.Message.ParseStateChanged (out oldstate, out newstate, out pendingstate); + System.Console.WriteLine ("[StateChange] From " + oldstate + " to " + newstate + " pending at " + pendingstate); + break; + case MessageType.StreamStatus: + Element owner; + StreamStatusType type; + args.Message.ParseStreamStatus (out type, out owner); + System.Console.WriteLine ("[StreamStatus] Type" + type + " from " + owner); + break; + case MessageType.DurationChanged: + long duration; + element.QueryDuration (Format.Time, out duration); + System.Console.WriteLine ("[DurationChanged] New duration is " + (duration / Constants.SECOND) + " seconds"); + break; + case MessageType.ResetTime: + ulong runningtime = args.Message.ParseResetTime (); + System.Console.WriteLine ("[ResetTime] Running time is " + runningtime); + break; + case MessageType.AsyncDone: + ulong desiredrunningtime = args.Message.ParseAsyncDone (); + System.Console.WriteLine ("[AsyncDone] Running time is " + desiredrunningtime); + break; + case MessageType.NewClock: + Clock clock = args.Message.ParseNewClock (); + System.Console.WriteLine ("[NewClock] " + clock); + break; + case MessageType.Buffering: + int percent = args.Message.ParseBuffering (); + System.Console.WriteLine ("[Buffering] " + percent + " % done"); + break; + case MessageType.Tag: + TagList list = args.Message.ParseTag (); + System.Console.WriteLine ("[Tag] Information in scope " + list.Scope + " is " + list.ToString()); + break; + case MessageType.Error: + GLib.GException gerror; + string debug; + args.Message.ParseError (out gerror, out debug); + System.Console.WriteLine ("[Error] " + gerror.Message + " debug information " + debug + ". Exiting! "); + Loop.Quit (); + break; + case MessageType.Eos: + System.Console.WriteLine ("[Eos] Playback has ended. Exiting!"); + Loop.Quit (); + break; + default: + System.Console.WriteLine ("[Recv] " + args.Message.Type); + break; + } + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial1.cs b/samples/PlaybackTutorial1.cs new file mode 100644 index 0000000000..c0a9ba349a --- /dev/null +++ b/samples/PlaybackTutorial1.cs @@ -0,0 +1,186 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + // playbin flags + static uint Video = (1 << 0); // We want video output + static uint Audio = (1 << 1); // We want audio output + static uint Text = (1 << 2); // We want subtitle output + + static Element Playbin; + static int NAudio, NVideo, NText; + static int CurrentVideo, CurrentAudio, CurrentText; + static GLib.MainLoop MainLoop; + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + + // Create the elements + Playbin = ElementFactory.Make ("playbin", "playbin"); + + if (Playbin == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + // Set the URI to play + Playbin ["uri"] = "http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_cropped_multilingual.webm"; + + // Set flags to show Audio and Video but ignore Subtitles + var flags = (uint)Playbin ["flags"]; + flags |= Audio | Video; + flags &= ~Text; + Playbin ["flags"] = flags; + + // Set connection speed. This will affect some internal decisions of playbin2 + Playbin ["connection-speed"] = 56; + + // Add a bus watch, so we get notified when a message arrives + var bus = Playbin.Bus; + bus.AddSignalWatch (); + bus.Message += HandleMessage; + + // Start playing + var ret = Playbin.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Add a keyboard watch so we get notified of keystrokes + GLib.Idle.Add (HandleKeyboard); + MainLoop = new GLib.MainLoop (); + MainLoop.Run (); + + // Free resources + Playbin.SetState (State.Null); + } + + static void HandleMessage (object o, MessageArgs args) + { + var msg = args.Message; + switch (msg.Type) { + case MessageType.Error: + GLib.GException err; + string debug; + msg.ParseError (out err, out debug); + Console.WriteLine ("Error received from element {0}: {1}", msg.Src, err.Message); + Console.WriteLine ("Debugging information: {0}", debug != null ? debug : "none"); + MainLoop.Quit (); + break; + case MessageType.Eos: + Console.WriteLine ("End-Of-Stream reached."); + MainLoop.Quit (); + break; + case MessageType.StateChanged: { + State oldState, newState, pendingState; + msg.ParseStateChanged (out oldState, out newState, out pendingState); + if (msg.Src == Playbin) { + if (newState == State.Playing) { + // Once we are in the playing state, analyze the streams + AnalyzeStreams (); + } + } + } break; + default: + break; + } + + // We want to keep receiving messages + args.RetVal = true; + } + + // Extract some metadata from the streams and print it on the screen + static void AnalyzeStreams () { + // Read some properties + NVideo = (int)Playbin ["n-video"]; + NAudio = (int)Playbin ["n-audio"]; + NText = (int)Playbin ["n-text"]; + + Console.WriteLine ("{0} video stream(s), {1} audio stream(s), {2} text stream(s)", NVideo, NAudio, NText); + + Console.WriteLine (); + for (int i = 0; i < NVideo; i++) { + // Retrieve the stream's video tags + var tags = (TagList)Playbin.Emit ("get-video-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("video stream {0}", i); + string str; + tags.GetString (Constants.TAG_VIDEO_CODEC, out str); + Console.WriteLine (" codec: {0}", str != null ? str : "unknown"); + } + } + + Console.WriteLine (); + for (int i = 0; i < NAudio; i++) { + // Retrieve the stream's audio tags + var tags = (TagList)Playbin.Emit ("get-audio-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("audio stream {0}", i); + string str; + if (tags.GetString (Constants.TAG_AUDIO_CODEC, out str)) { + Console.WriteLine (" codec: {0}", str); + } + if (tags.GetString (Constants.TAG_LANGUAGE_CODE, out str)) { + Console.WriteLine (" language: {0}", str); + } + uint rate; + if (tags.GetUint (Constants.TAG_BITRATE, out rate)) { + Console.WriteLine (" bitrate: {0}", rate); + } + } + } + + Console.WriteLine (); + for (int i = 0; i < NText; i++) { + // Retrieve the stream's subtitle tags + var tags = (TagList)Playbin.Emit ("get-text-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("subtitle stream {0}", i); + string str; + if (tags.GetString (Constants.TAG_LANGUAGE_CODE, out str)) { + Console.WriteLine (" language: {0}", str); + } + } + } + + CurrentAudio = (int)Playbin ["current-audio"]; + CurrentVideo = (int)Playbin ["current-video"]; + CurrentText = (int)Playbin ["current-text"]; + + Console.WriteLine (); + Console.WriteLine ("Currently playing video stream {0}, audio stream {1} and text stream {2}", CurrentVideo, CurrentAudio, CurrentText); + Console.WriteLine ("Type any number to select a different audio stream"); + } + + // Process keyboard input + static bool HandleKeyboard () { + if (Console.KeyAvailable) { + var key = Console.ReadKey (false); + + if (char.IsDigit (key.KeyChar)) { + var digit = int.Parse (key.KeyChar.ToString ()); + + if (digit < 0 || digit > NAudio) { + Console.WriteLine ("Index out of bounds"); + } else { + // If the input was a valid audio stream index, set the current audio stream + Console.WriteLine ("Setting current audio stream to {0}", digit); + Playbin ["current-audio"] = digit; + + } + } + } + return true; + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial2.cs b/samples/PlaybackTutorial2.cs new file mode 100644 index 0000000000..20ff29d49e --- /dev/null +++ b/samples/PlaybackTutorial2.cs @@ -0,0 +1,185 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + // playbin flags + static uint Video = (1 << 0); // We want video output + static uint Audio = (1 << 1); // We want audio output + static uint Text = (1 << 2); // We want subtitle output + + static Element Playbin; + static int NAudio, NVideo, NText; + static int CurrentVideo, CurrentAudio, CurrentText; + static GLib.MainLoop MainLoop; + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + + // Create the elements + Playbin = ElementFactory.Make ("playbin", "playbin"); + + if (Playbin == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + // Set the URI to play + Playbin ["uri"] = "http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.ogv"; + + // Set the subtitle URI to play and some font description + Playbin ["suburi"] = "http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer_gr.srt"; + Playbin ["subtitle-font-desc"] = "Sans, 18"; + + // Set flags to show Audio and Video and Subtitles + var flags = (uint)Playbin ["flags"]; + flags |= Audio | Video | Text; + Playbin ["flags"] = flags; + + // Add a bus watch, so we get notified when a message arrives + var bus = Playbin.Bus; + bus.AddSignalWatch (); + bus.Message += HandleMessage; + + // Start playing + var ret = Playbin.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Add a keyboard watch so we get notified of keystrokes + GLib.Idle.Add (HandleKeyboard); + MainLoop = new GLib.MainLoop (); + MainLoop.Run (); + + // Free resources + Playbin.SetState (State.Null); + } + + static void HandleMessage (object o, MessageArgs args) + { + var msg = args.Message; + switch (msg.Type) { + case MessageType.Error: + GLib.GException err; + string debug; + msg.ParseError (out err, out debug); + Console.WriteLine ("Error received from element {0}: {1}", msg.Src, err.Message); + Console.WriteLine ("Debugging information: {0}", debug != null ? debug : "none"); + MainLoop.Quit (); + break; + case MessageType.Eos: + Console.WriteLine ("End-Of-Stream reached."); + MainLoop.Quit (); + break; + case MessageType.StateChanged: { + State oldState, newState, pendingState; + msg.ParseStateChanged (out oldState, out newState, out pendingState); + if (msg.Src == Playbin) { + if (newState == State.Playing) { + // Once we are in the playing state, analyze the streams + AnalyzeStreams (); + } + } + } break; + default: + break; + } + + // We want to keep receiving messages + args.RetVal = true; + } + + // Extract some metadata from the streams and print it on the screen + static void AnalyzeStreams () { + // Read some properties + NVideo = (int)Playbin ["n-video"]; + NAudio = (int)Playbin ["n-audio"]; + NText = (int)Playbin ["n-text"]; + + Console.WriteLine ("{0} video stream(s), {1} audio stream(s), {2} text stream(s)", NVideo, NAudio, NText); + + Console.WriteLine (); + for (int i = 0; i < NVideo; i++) { + // Retrieve the stream's video tags + var tags = (TagList)Playbin.Emit ("get-video-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("video stream {0}", i); + string str; + tags.GetString (Constants.TAG_VIDEO_CODEC, out str); + Console.WriteLine (" codec: {0}", str != null ? str : "unknown"); + } + } + + Console.WriteLine (); + for (int i = 0; i < NAudio; i++) { + // Retrieve the stream's audio tags + var tags = (TagList)Playbin.Emit ("get-audio-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("audio stream {0}", i); + string str; + if (tags.GetString (Constants.TAG_AUDIO_CODEC, out str)) { + Console.WriteLine (" codec: {0}", str); + } + if (tags.GetString (Constants.TAG_LANGUAGE_CODE, out str)) { + Console.WriteLine (" language: {0}", str); + } + uint rate; + if (tags.GetUint (Constants.TAG_BITRATE, out rate)) { + Console.WriteLine (" bitrate: {0}", rate); + } + } + } + + Console.WriteLine (); + for (int i = 0; i < NText; i++) { + // Retrieve the stream's subtitle tags + var tags = (TagList)Playbin.Emit ("get-text-tags", new object [] { i }); + if (tags != null) { + Console.WriteLine ("subtitle stream {0}", i); + string str; + if (tags.GetString (Constants.TAG_LANGUAGE_CODE, out str)) { + Console.WriteLine (" language: {0}", str); + } + } + } + + CurrentAudio = (int)Playbin ["current-audio"]; + CurrentVideo = (int)Playbin ["current-video"]; + CurrentText = (int)Playbin ["current-text"]; + + Console.WriteLine (); + Console.WriteLine ("Currently playing video stream {0}, audio stream {1} and text stream {2}", CurrentVideo, CurrentAudio, CurrentText); + Console.WriteLine ("Type any number to select a different subtitle stream"); + } + + // Process keyboard input + static bool HandleKeyboard () { + if (Console.KeyAvailable) { + var key = Console.ReadKey (false); + + if (char.IsDigit (key.KeyChar)) { + var digit = int.Parse (key.KeyChar.ToString ()); + + if (digit < 0 || digit > NText) { + Console.WriteLine ("Index out of bounds"); + } else { + // If the input was a valid subtitle stream index, set the current subtitle stream + Console.WriteLine ("Setting current subtitle stream to {0}", digit); + Playbin ["current-text"] = digit; + } + } + } + return true; + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial3.cs b/samples/PlaybackTutorial3.cs new file mode 100644 index 0000000000..c597ca68b5 --- /dev/null +++ b/samples/PlaybackTutorial3.cs @@ -0,0 +1,153 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; + +namespace GstreamerSharp +{ + class Playback + { + const int ChunkSize = 1024; + const int SampleRate = 44100; + + static Gst.App.AppSrc AppSource; + static Element Pipeline; + + static long NumSamples; // Number of samples generated so far (for timestamp generation) + static float a, b, c, d; // For waveform generation + + static uint Sourceid; // To control the GSource + + static GLib.MainLoop MainLoop; // GLib's Main Loop + + // This method is called by the idle GSource in the mainloop, to feed CHUNK_SIZE bytes into appsrc. + // The idle handler is added to the mainloop when appsrc requests us to start sending data (need-data signal) + // and is removed when appsrc has enough data (enough-data signal). + + static bool PushData () { + var numSamples = ChunkSize / 2; // Because each sample is 16 bits + MapInfo map; + + // Create a new empty buffer + var buffer = new Gst.Buffer (null, ChunkSize, AllocationParams.Zero); + + // Set its timestamp and duration + buffer.Pts = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + buffer.Dts = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + buffer.Duration = Util.Uint64Scale ((ulong)NumSamples, (ulong)Constants.SECOND, (ulong)SampleRate); + + // Generate some psychodelic waveforms + buffer.Map (out map, MapFlags.Write); + c += d; + d -= c / 1000f; + var freq = 1100f + 1000f * d; + short[] data = new short[numSamples]; + for (int i = 0; i < numSamples; i++) { + a += b; + b -= a / freq; + data[i] = (short)(500f * a); + } + // convert the short[] to a byte[] by marshalling + var native = Marshal.AllocHGlobal (data.Length * sizeof(short)); + Marshal.Copy (data, 0, native, data.Length); + byte[] bytedata = new byte[2 * data.Length]; + Marshal.Copy (native, bytedata, 0, data.Length * sizeof(short)); + + map.Data = bytedata; + buffer.Unmap (map); + NumSamples += numSamples; + + // Push the buffer into the appsrc + var ret = AppSource.PushBuffer (buffer); + + // Free the buffer now that we are done with it + buffer.Dispose (); + + if (ret != FlowReturn.Ok) { + // We got some error, stop sending data + return false; + } + return true; + } + + // This signal callback triggers when appsrc needs Here, we add an idle handler + // to the mainloop to start pushing data into the appsrc + static void StartFeed (object sender, Gst.App.NeedDataArgs args) { + if (Sourceid == 0) { + Console.WriteLine ("Start feeding"); + Sourceid = GLib.Idle.Add (PushData); + } + } + + // This callback triggers when appsrc has enough data and we can stop sending. + // We remove the idle handler from the mainloop + static void StopFeed (object sender, EventArgs args) { + if (Sourceid != 0) { + Console.WriteLine ("Stop feeding"); + GLib.Source.Remove (Sourceid); + Sourceid = 0; + } + } + + // This function is called when playbin has created the appsrc element, so we have a chance to configure it. + static void SourceSetup (object sender, GLib.SignalArgs args) { + var info = new Gst.Audio.AudioInfo (); + var source = new Gst.App.AppSrc(((Element)args.Args [0]).Handle); + Console.WriteLine ("Source has been created. Configuring."); + AppSource = source; + + // Configure appsrc + Gst.Audio.AudioChannelPosition[] position = {}; + info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, position); + var audioCaps = info.ToCaps (); + source ["caps"] = audioCaps; + source ["format"] = Format.Time; + source.NeedData += StartFeed; + source.EnoughData += StopFeed; + } + + // This function is called when an error message is posted on the bus + static void HandleError (object sender, GLib.SignalArgs args) { + GLib.GException err; + string debug; + var msg = (Message) args.Args[0]; + + // Print error details on the screen + msg.ParseError (out err, out debug); + Console.WriteLine ("Error received from element {0}: {1}", msg.Src.Name, err.Message); + Console.WriteLine ("Debugging information: {0}", debug != null ? debug : "none"); + + MainLoop.Quit (); + } + + public static void Main (string[] args) + { + b = 1; + d = 1; + + // Initialize Gstreamer + Gst.Application.Init(ref args); + + // Create the playbin element + Pipeline = Parse.Launch ("playbin uri=appsrc://"); + Pipeline.Connect ("source-setup", SourceSetup); + + // Instruct the bus to emit signals for each received message, and connect to the interesting signals + var bus = Pipeline.Bus; + bus.AddSignalWatch (); + bus.Connect ("message::error", HandleError); + + // Start playing the pipeline + Pipeline.SetState (State.Playing); + + // Create a GLib Main Loop and set it to run + MainLoop = new GLib.MainLoop (); + MainLoop.Run (); + + // Free resources + Pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial4.cs b/samples/PlaybackTutorial4.cs new file mode 100644 index 0000000000..c31e99d629 --- /dev/null +++ b/samples/PlaybackTutorial4.cs @@ -0,0 +1,147 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; +using System.Text; + +namespace GstreamerSharp +{ + class Playback + { + const int GraphLength = 78; + static uint PlayFlagDownload = (1 << 7); // Enable progressive download (on selected formats) + + static bool IsLive; + static Element Pipeline; + static GLib.MainLoop MainLoop; + static int BufferingLevel; + + static void GotLocation (object sender, GLib.SignalArgs args) { + var propObject = (Gst.Object)args.Args [0]; + var location = (string) propObject["temp-location"]; + Console.WriteLine ("Temporary file: {0}", location); + // Uncomment this line to keep the temporary file after the program exits + // g_object_set (G_OBJECT (prop_object), "temp-remove", FALSE, NULL); + } + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + BufferingLevel = 100; + + // Build the pipeline + Pipeline = Parse.Launch ("playbin uri=http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"); + var bus = Pipeline.Bus; + + // Set the download flag + var flags = (uint)Pipeline ["flags"]; + flags |= PlayFlagDownload; + Pipeline ["flags"] = flags; + + // Uncomment this line to limit the amount of downloaded data + // g_object_set (pipeline, "ring-buffer-max-size", (guint64)4000000, NULL); + + // Start playing + var ret = Pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } else if (ret == StateChangeReturn.NoPreroll) { + IsLive = true; + } + + MainLoop = new GLib.MainLoop (); + + bus.AddSignalWatch (); + bus.Message += HandleMessage; + Pipeline.Connect ("deep-notify::temp-location", GotLocation); + + // Register a function that GLib will call every second + GLib.Timeout.AddSeconds (1, RefreshUI); + + MainLoop.Run (); + + // Free resources + Pipeline.SetState (State.Null); + } + + static void HandleMessage (object o, MessageArgs args) + { + var msg = args.Message; + switch (msg.Type) { + case MessageType.Error: { + GLib.GException err; + string debug; + + msg.ParseError (out err, out debug); + Console.WriteLine ("Error: {0}", err.Message); + + Pipeline.SetState (State.Ready); + MainLoop.Quit (); + break; + } + case MessageType.Eos: + // end-of-stream + Pipeline.SetState (State.Ready); + MainLoop.Quit (); + break; + case MessageType.Buffering: { + int percent = 0; + + // If the stream is live, we do not care about buffering. + if (IsLive) break; + + percent = msg.ParseBuffering (); + // Wait until buffering is complete before start/resume playing + if (percent < 100) + Pipeline.SetState (State.Paused); + else + Pipeline.SetState (State.Playing); + break; + } + case MessageType.ClockLost: + // Get a new clock + Pipeline.SetState (State.Paused); + Pipeline.SetState (State.Playing); + break; + default: + // Unhandled message + break; + } + } + + static bool RefreshUI () { + var query = new Query (Format.Percent); + if (Pipeline.Query (query)) { + var graph = new StringBuilder (GraphLength); + long position = 0, duration = 0; + + var nRanges = query.NBufferingRanges; + for (uint range = 0; range < nRanges; range++) { + long start, stop; + query.ParseNthBufferingRange (range, out start, out stop); + start = start * GraphLength / (stop - start); + stop = stop * GraphLength / (stop - start); + for (int i = (int)start; i < stop; i++) + graph.Insert (i, '-'); + } + if (Pipeline.QueryPosition (Format.Time, out position) && position >= 0 + && Pipeline.QueryDuration (Format.Time, out duration) && duration >= 0) { + var i = (int)(GraphLength * (double)position / (double)(duration + 1)); + graph [i] = BufferingLevel < 100 ? 'X' : '>'; + } + Console.WriteLine ("[{0}]", graph); + if (BufferingLevel < 100) { + Console.WriteLine (" Buffering: {0}", BufferingLevel); + } else { + Console.WriteLine (" "); + } + Console.WriteLine (); + } + return true; + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial5.cs b/samples/PlaybackTutorial5.cs new file mode 100644 index 0000000000..8fd17b2b6b --- /dev/null +++ b/samples/PlaybackTutorial5.cs @@ -0,0 +1,126 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; +using System.Text; + +namespace GstreamerSharp +{ + class Playback + { + static Element Pipeline; + static GLib.MainLoop MainLoop; + + // Process a color balance command + static void UpdateColorChannel (string channelName, bool increase, Gst.Video.IColorBalance cb) { + + // Retrieve the list of channels and locate the requested one + var channels = cb.ListChannels (); + Gst.Video.ColorBalanceChannel channel = null; + foreach (var ch in channels) { + var label = ch.Label; + + if (label.Contains (channelName)) { + channel = ch; + break; + } + } + if (channel == null) + return; + + // Change the channel's value + var step = 0.1 * (channel.MaxValue - channel.MinValue); + var value = cb.GetValue (channel); + if (increase) { + value = (int)(value + step); + if (value > channel.MaxValue) + value = channel.MaxValue; + } else { + value = (int)(value - step); + if (value < channel.MinValue) + value = channel.MinValue; + } + cb.SetValue (channel, value); + } + + // Process keyboard input + static bool HandleKeyboard () { + if (Console.KeyAvailable) { + var key = Console.ReadKey (false); + var cb = new Gst.Video.ColorBalanceAdapter (Pipeline.Handle); + + switch (key.Key) { + case ConsoleKey.C: + UpdateColorChannel ("CONTRAST", key.Modifiers == ConsoleModifiers.Shift, cb); + break; + case ConsoleKey.B: + UpdateColorChannel ("BRIGHTNESS", key.Modifiers == ConsoleModifiers.Shift, cb); + break; + case ConsoleKey.H: + UpdateColorChannel ("HUE", key.Modifiers == ConsoleModifiers.Shift, cb); + break; + case ConsoleKey.S: + UpdateColorChannel ("SATURATION", key.Modifiers == ConsoleModifiers.Shift, cb); + break; + case ConsoleKey.Q: + MainLoop.Quit (); + break; + } + PrintCurrentValues (); + } + return true; + } + + + // Output the current values of all Color Balance channels + static void PrintCurrentValues () { + // Output Color Balance value + var cb = new Gst.Video.ColorBalanceAdapter (Pipeline.Handle); + var channels = cb.ListChannels (); + + foreach (var ch in channels) { + var value = cb.GetValue (ch); + Console.WriteLine ("{0}: {1}", ch.Label, 100 * (value - ch.MinValue) / (ch.MaxValue - ch.MinValue)); + } + Console.WriteLine (); + } + + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + + // Print usage map + Console.WriteLine ("USAGE: Choose one of the following options, then press enter:"); + Console.WriteLine (" 'C' to increase contrast, 'c' to decrease contrast"); + Console.WriteLine (" 'B' to increase brightness, 'b' to decrease brightness"); + Console.WriteLine (" 'H' to increase hue, 'h' to decrease hue"); + Console.WriteLine (" 'S' to increase saturation, 's' to decrease saturation"); + Console.WriteLine (" 'Q' to quit"); + + // Build the pipeline + Pipeline = Parse.Launch ("playbin uri=http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"); + + // Add a keyboard watch so we get notified of keystrokes + + // Start playing + var ret = Pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + PrintCurrentValues (); + + // Create a GLib Main Loop and set it to run + MainLoop = new GLib.MainLoop (); + GLib.Timeout.Add (50, HandleKeyboard); + MainLoop.Run (); + + // Free resources + Pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial6.cs b/samples/PlaybackTutorial6.cs new file mode 100644 index 0000000000..1b74260f21 --- /dev/null +++ b/samples/PlaybackTutorial6.cs @@ -0,0 +1,91 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; +using System.Text; + +namespace GstreamerSharp +{ + class Playback + { + const uint PlayFlagsVis = (1 << 3); + + static Element Pipeline; + + // Return TRUE if this is a Visualization element + static bool FilterVisFeatures (PluginFeature feature) { + + if (!(feature is ElementFactory)) + return false; + var factory = (ElementFactory)feature; + if (!factory.GetMetadata (Gst.Constants.ELEMENT_METADATA_KLASS).Contains ("Visualization")) + return false; + + return true; + } + + public static void Main (string[] args) + { + ElementFactory selectedFactory = null; + + // Initialize GStreamer + Application.Init (ref args); + + // Get a list of all visualization plugins + var list = Registry.Get().FeatureFilter (FilterVisFeatures, false); + + // Print their names + Console.WriteLine ("Available visualization plugins:"); + foreach (var walk in list) { + var factory = (ElementFactory)walk; + var name = factory.Name; + Console.WriteLine(" {0}", name); + + if (selectedFactory == null && name.StartsWith ("goom")) { + selectedFactory = factory; + } + } + + // Don't use the factory if it's still empty + // e.g. no visualization plugins found + if (selectedFactory == null) { + Console.WriteLine ("No visualization plugins found!"); + return; + } + + // We have now selected a factory for the visualization element + Console.WriteLine ("Selected '{0}'", selectedFactory.Name); + var visPlugin = selectedFactory.Create (); + if (visPlugin == null) + return; + + + // Build the pipeline + Pipeline = Parse.Launch ("playbin uri=http://1live.akacast.akamaistream.net/7/706/119434/v1/gnl.akacast.akamaistream.net/1live"); + + // Set the visualization flag + var flags = (uint)Pipeline ["flags"]; + flags |= PlayFlagsVis; + Pipeline ["flags"] = flags; + + // set vis plugin for playbin + Pipeline ["vis-plugin"] = visPlugin; + + // Start playing + var ret = Pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Wait until error or EOS + var bus = Pipeline.Bus; + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Error | MessageType.Eos); + + // Free resources + Pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/PlaybackTutorial7.cs b/samples/PlaybackTutorial7.cs new file mode 100644 index 0000000000..f268fc21c0 --- /dev/null +++ b/samples/PlaybackTutorial7.cs @@ -0,0 +1,61 @@ +// Authors +// Copyright (C) 2014 Stephan Sundermann + +using System; +using Gst; +using System.Runtime.InteropServices; +using System.Text; + +namespace GstreamerSharp +{ + class Playback + { + public static void Main (string[] args) + { + // Initialize GStreamer + Application.Init (ref args); + + // Build the pipeline + var pipeline = Parse.Launch ("playbin uri=http://freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"); + + // Create the elements inside the sink bin + var equalizer = ElementFactory.Make ("equalizer-3bands", "equalizer"); + var convert = ElementFactory.Make ("audioconvert", "convert"); + var sink = ElementFactory.Make ("autoaudiosink", "audio_sink"); + if (equalizer == null || convert == null || sink == null) { + Console.WriteLine ("Not all elements could be created."); + return; + } + + // Create the sink bin, add the elements and link them + var bin = new Bin ("audio_sink_bin"); + bin.Add (equalizer, convert, sink); + Element.Link (equalizer, convert, sink); + var pad = equalizer.GetStaticPad ("sink"); + var ghostPad = new GhostPad ("sink", pad); + ghostPad.SetActive (true); + bin.AddPad (ghostPad); + + // Configure the equalizer + equalizer["band1"] = (double)-24.0; + equalizer["band2"] = (double)-24.0; + + // Set playbin's audio sink to be our sink bin + pipeline["audio-sink"] = bin; + + // Start playing + var ret = pipeline.SetState (State.Playing); + if (ret == StateChangeReturn.Failure) { + Console.WriteLine ("Unable to set the pipeline to the playing state."); + return; + } + + // Wait until error or EOS + var bus = pipeline.Bus; + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Error | MessageType.Eos); + + // Free resources + pipeline.SetState (State.Null); + } + } +} \ No newline at end of file diff --git a/samples/VideoOverlay.cs b/samples/VideoOverlay.cs new file mode 100644 index 0000000000..7bc9b1a296 --- /dev/null +++ b/samples/VideoOverlay.cs @@ -0,0 +1,274 @@ +// Authors +// Copyright (C) 2008 Paul Burton +// Copyright (C) 2010 Andoni Morales +// Copyright (C) 2013 Stephan Sundermann + +using System; +using System; +using System.Runtime.InteropServices; + +using Gtk; +using Gst; +using Gst.Video; +using Gst.Base; + +namespace Gstreameroverlay +{ + public class MainWindow : Gtk.Window { + DrawingArea _da; + IntPtr _xWindowId; + Element _playbin; + HScale _scale; + Label _lbl; + bool _updatingScale; + bool _pipelineOK = false; + + public static void Main (string[] args) { + if (System.Environment.OSVersion.Platform == PlatformID.Unix) + XInitThreads (); + + Gtk.Application.Init (); + Gst.Application.Init (); + MainWindow window = new MainWindow (); + window.ShowAll (); + + switch (System.Environment.OSVersion.Platform) { + case PlatformID.Unix: + window._xWindowId = gdk_x11_window_get_xid (window._da.GdkWindow.Handle); + break; + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + window._xWindowId = gdk_win32_drawable_get_handle (window._da.GdkWindow.Handle); + break; + } + + Gtk.Application.Run (); + } + + public MainWindow () + : base ("Overlaytest") { + VBox vBox = new VBox (); + + _da = new DrawingArea (); + _da.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0)); + _da.SetSizeRequest (400, 300); + _da.DoubleBuffered = false; + vBox.PackStart (_da, false, false, 0); + + _scale = new HScale (0, 1, 0.01); + _scale.DrawValue = false; + _scale.ValueChanged += ScaleValueChanged; + vBox.PackStart (_scale, false, false, 0); + + HBox hBox = new HBox (); + + Button btnOpen = new Button (); + btnOpen.Label = "Open"; + btnOpen.Clicked += ButtonOpenClicked; + + hBox.PackStart (btnOpen, false, false, 0); + + Button btnPlay = new Button (); + btnPlay.Label = "Play"; + btnPlay.Clicked += ButtonPlayClicked; + + hBox.PackStart (btnPlay, false, false, 0); + + Button btnPause = new Button (); + btnPause.Label = "Pause"; + btnPause.Clicked += ButtonPauseClicked; + + hBox.PackStart (btnPause, false, false, 0); + + _lbl = new Label (); + _lbl.Text = "00:00 / 00:00"; + + hBox.PackEnd (_lbl, false, false, 0); + + vBox.PackStart (hBox, false, false, 3); + + Add (vBox); + + WindowPosition = Gtk.WindowPosition.Center; + DeleteEvent += OnDeleteEvent; + + GLib.Timeout.Add (1000, new GLib.TimeoutHandler (UpdatePos)); + } + + void OnDeleteEvent (object sender, DeleteEventArgs args) { + Gtk.Application.Quit (); + + + if (_playbin != null) { + _playbin.SetState (Gst.State.Null); + _playbin.Dispose (); + _playbin = null; + } + + args.RetVal = true; + } + + void ButtonOpenClicked (object sender, EventArgs args) { + FileChooserDialog dialog = new FileChooserDialog ("Open", this, FileChooserAction.Open, new object[] { "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept }); + dialog.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); + + if (dialog.Run () == (int) ResponseType.Accept) { + _pipelineOK = false; + + if (_playbin != null) { + _playbin.SetState (Gst.State.Null); + } else { + _playbin = ElementFactory.Make ("playbin", "playbin"); + } + + _scale.Value = 0; + + if (_playbin == null) + Console.WriteLine ("Unable to create element 'playbin'"); + + _playbin.Bus.EnableSyncMessageEmission (); + _playbin.Bus.AddSignalWatch (); + + _playbin.Bus.SyncMessage += delegate (object bus, SyncMessageArgs sargs) { + Gst.Message msg = sargs.Message; + + if (!Gst.Video.Global.IsVideoOverlayPrepareWindowHandleMessage (msg)) + return; + + Element src = msg.Src as Element; + if (src == null) + return; + + try { + src["force-aspect-ratio"] = true; + } + catch (PropertyNotFoundException) {} + Element overlay = null; + if(src is Gst.Bin) + overlay = ((Gst.Bin) src).GetByInterface (VideoOverlayAdapter.GType); + + VideoOverlayAdapter adapter = new VideoOverlayAdapter (overlay.Handle); + adapter.WindowHandle = _xWindowId; + adapter.HandleEvents (true); + }; + + _playbin.Bus.Message += delegate (object bus, MessageArgs margs) { + Message message = margs.Message; + + switch (message.Type) { + case Gst.MessageType.Error: + GLib.GException err; + string msg; + + message.ParseError (out err, out msg); + Console.WriteLine (String.Format ("Error message: {0}", msg)); + _pipelineOK = false; + break; + case Gst.MessageType.Eos: + Console.WriteLine ("EOS"); + break; + } + }; + + switch (System.Environment.OSVersion.Platform) { + case PlatformID.Unix: + _playbin["uri"] = "file://" + dialog.Filename; + break; + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + _playbin["uri"] = "file:///" + dialog.Filename.Replace("\\","/"); + break; + } + + StateChangeReturn sret = _playbin.SetState (Gst.State.Playing); + + if (sret == StateChangeReturn.Async) { + State state, pending; + sret = _playbin.GetState (out state, out pending, Gst.Constants.SECOND * 5L); + } + + if (sret == StateChangeReturn.Success) { + Console.WriteLine ("State change successful"); + _pipelineOK = true; + } else { + Console.WriteLine ("State change failed for {0} ({1})\n", dialog.Filename, sret); + } + } + + dialog.Destroy (); + } + + void ButtonPlayClicked (object sender, EventArgs args) { + if ( (_playbin != null) && _pipelineOK) + _playbin.SetState (Gst.State.Playing); + } + + void ButtonPauseClicked (object sender, EventArgs args) { + if ( (_playbin != null) && _pipelineOK) + _playbin.SetState (Gst.State.Paused); + } + + void ScaleValueChanged (object sender, EventArgs args) { + if (_updatingScale) + return; + + long duration; + Gst.Format fmt = Gst.Format.Time; + Console.WriteLine ("Trying to seek"); + + if ( (_playbin != null) && _pipelineOK && _playbin.QueryDuration (fmt, out duration) && duration != -1) { + long pos = (long) (duration * _scale.Value); + Console.WriteLine ("Seek to {0}/{1} ({2}%)", pos, duration, _scale.Value); + + bool ret = _playbin.SeekSimple (Format.Time, SeekFlags.Flush | SeekFlags.KeyUnit, pos); + + Console.WriteLine ("Seeked {0}successfully", (ret ? "" : "not ")); + } + } + + bool UpdatePos () { + Gst.Format fmt = Gst.Format.Time; + long duration, pos; + pos = 0; + if ( (_playbin != null) && _pipelineOK && + _playbin.QueryDuration (fmt, out duration) && + _playbin.QueryPosition (fmt, out pos)) { + _lbl.Text = string.Format ("{0} / {1}", TimeString (pos), TimeString (duration)); + + _updatingScale = true; + _scale.Value = (double) pos / duration; + _updatingScale = false; + } + + return true; + } + + string TimeString (long t) { + long secs = t / 1000000000; + int mins = (int) (secs / 60); + secs = secs - (mins * 60); + + if (mins >= 60) { + int hours = (int) (mins / 60); + mins = mins - (hours * 60); + + return string.Format ("{0}:{1:d2}:{2:d2}", hours, mins, secs); + } + + return string.Format ("{0}:{1:d2}", mins, secs); + } + + [DllImport ("libgdk-3.so.0") ] + static extern IntPtr gdk_x11_window_get_xid (IntPtr handle); + + [DllImport ("gdk-win32-3.0-0.dll") ] + static extern IntPtr gdk_win32_drawable_get_handle (IntPtr handle); + + [DllImport ("libX11.so.6")] + static extern int XInitThreads (); + } +} diff --git a/samples/meson.build b/samples/meson.build new file mode 100644 index 0000000000..5a6db9fb97 --- /dev/null +++ b/samples/meson.build @@ -0,0 +1,42 @@ +examples = [ + ['playback', 'Playback.cs'], + ['video-overlay' , 'VideoOverlay.cs', has_gtk, gtk_sharp_dep], + ['basic-tutorial-1' , 'BasicTutorial1.cs',], + ['basic-tutorial-2' , 'BasicTutorial2.cs',], + ['basic-tutorial-3' , 'BasicTutorial3.cs',], + ['basic-tutorial-4' , 'BasicTutorial4.cs',], + ['basic-tutorial-5' , 'BasicTutorial5.cs', has_gtk, gtk_sharp_dep], + ['basic-tutorial-6' , 'BasicTutorial6.cs',], + ['basic-tutorial-7' , 'BasicTutorial7.cs',], + ['basic-tutorial-8' , 'BasicTutorial8.cs',], + ['basic-tutorial-9' , 'BasicTutorial9.cs',], + ['basic-tutorial-12' , 'BasicTutorial12.cs',], + ['basic-tutorial-13' , 'BasicTutorial13.cs',], + ['example-volume' , 'ExampleVolume.cs',], + ['playback-tutorial-1' , 'PlaybackTutorial1.cs',], + ['playback-tutorial-2' , 'PlaybackTutorial2.cs',], + ['playback-tutorial-3' , 'PlaybackTutorial3.cs',], + ['playback-tutorial-4' , 'PlaybackTutorial4.cs',], + ['playback-tutorial-5' , 'PlaybackTutorial5.cs',], + ['playback-tutorial-6' , 'PlaybackTutorial6.cs',], + ['playback-tutorial-7' , 'PlaybackTutorial7.cs',], +] + +foreach example: examples + deps = [gst_sharp_dep] + if example.length() == 2 or example.get(2) + if example.length() > 2 + deps += example.get(3) + endif + + executable(example.get(0), example.get(1), + cs_args: ['-unsafe'], dependencies: deps) + endif +endforeach + +if ges_dep.found() + executable('ges-example', 'GESExample.cs', + cs_args: ['-unsafe'], + dependencies: [gst_sharp_dep], + link_with: ges_sharp) +endif diff --git a/sources/AssemblyInfo.cs.in b/sources/AssemblyInfo.cs.in new file mode 100644 index 0000000000..c2cc758786 --- /dev/null +++ b/sources/AssemblyInfo.cs.in @@ -0,0 +1,27 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("@ASSEMBLY_TITLE@")] +[assembly: AssemblyDescription("@ASSEMBLY_DESCRIPTION@")] +[assembly: AssemblyCompany("@ASSEMBLY_COMPANY@")] +[assembly: AssemblyCopyright("@ASSEMBLY_COPYRIGHT@")] +[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")] +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("@ASSEMBLY_NAME@.snk")] diff --git a/sources/Gst-1.0-merged.metadata b/sources/Gst-1.0-merged.metadata new file mode 100644 index 0000000000..66702f4abb --- /dev/null +++ b/sources/Gst-1.0-merged.metadata @@ -0,0 +1,5 @@ + + + + + diff --git a/sources/custom/Adapter.cs b/sources/custom/Adapter.cs new file mode 100644 index 0000000000..f418cac51a --- /dev/null +++ b/sources/custom/Adapter.cs @@ -0,0 +1,52 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst.Base { + using System; + using System.Runtime.InteropServices; + + public partial class Adapter + { + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_adapter_copy(IntPtr raw, out IntPtr dest, int offset, int size); + + public byte[] Copy(int offset, int size) { + + IntPtr mem = Marshal.AllocHGlobal (size); + + gst_adapter_copy(Handle, out mem, offset, size); + + byte[] bytes = new byte[size]; + Marshal.Copy (mem, bytes, 0, size); + + return bytes; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_map(IntPtr raw, out int size); + + public byte[] Map() { + int size; + + IntPtr mem = gst_adapter_map (Handle, out size); + byte[] ret = new byte[size]; + Marshal.Copy (mem, ret , 0, size); + + return ret; + } + } +} diff --git a/sources/custom/AppSink.cs b/sources/custom/AppSink.cs new file mode 100644 index 0000000000..2f21822d06 --- /dev/null +++ b/sources/custom/AppSink.cs @@ -0,0 +1,35 @@ +// +// AppSink.cs +// +// Authors: +// Stephan Sundermann +// +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst.App { + using System; + using System.Runtime.InteropServices; + + partial class AppSink + { + public AppSink (String name) { + var element = ElementFactory.Make ("appsink", name); + Raw = element.Handle; + } + } +} diff --git a/sources/custom/AppSrc.cs b/sources/custom/AppSrc.cs new file mode 100644 index 0000000000..536725dbf5 --- /dev/null +++ b/sources/custom/AppSrc.cs @@ -0,0 +1,35 @@ +// +// AppSrc.cs +// +// Authors: +// Stephan Sundermann +// +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst.App { + using System; + using System.Runtime.InteropServices; + + partial class AppSrc + { + public AppSrc (String name) { + var element = ElementFactory.Make ("appsrc", name); + Raw = element.Handle; + } + } +} diff --git a/sources/custom/Application.cs b/sources/custom/Application.cs new file mode 100644 index 0000000000..2cbf40d61e --- /dev/null +++ b/sources/custom/Application.cs @@ -0,0 +1,100 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial class Application + { + // Because of: https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30 + private static uint MIN_GSTREAMER_MINOR = 14; + + static Application () { + GLib.GType.Register (List.GType, typeof(List)); + GLib.GType.Register (Fraction.GType, typeof(Fraction)); + GLib.GType.Register (DoubleRange.GType, typeof(DoubleRange)); + GLib.GType.Register (IntRange.GType, typeof(IntRange)); + GLib.GType.Register (FractionRange.GType, typeof(FractionRange)); + GLib.GType.Register (DateTime.GType, typeof(DateTime)); + GLib.GType.Register (Gst.Array.GType, typeof(Gst.Array)); + GLib.GType.Register(Promise.GType, typeof(Promise)); + GLib.GType.Register(Gst.WebRTC.WebRTCSessionDescription.GType, typeof(Gst.WebRTC.WebRTCSessionDescription)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_init(ref int argc, ref IntPtr[] argv); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_init(IntPtr argc, IntPtr argv); + + private static void CheckVersion() { + if (Gst.Version.Minor < MIN_GSTREAMER_MINOR) + throw new Exception(Gst.Version.Description + " found but GStreamer 1." + + MIN_GSTREAMER_MINOR + " required."); + } + + public static void Init() { + gst_init (IntPtr.Zero, IntPtr.Zero); + CheckVersion(); + } + + public static void Init(ref string[] argv) { + int cnt_argv = argv == null ? 0 : argv.Length; + System.Collections.Generic.List native_arg_list = new System.Collections.Generic.List(); + for (int i = 0; i < cnt_argv; i++) + native_arg_list.Add (GLib.Marshaller.StringToPtrGStrdup(argv[i])); + IntPtr[] native_argv = native_arg_list.ToArray(); + gst_init(ref cnt_argv, ref native_argv); + foreach (var native_arg in native_arg_list) + GLib.Marshaller.Free (native_arg); + + CheckVersion(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_init_check(ref int argc, ref IntPtr[] argv, out IntPtr error); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_init_check(IntPtr argc, IntPtr argv, out IntPtr error); + + public static bool InitCheck() { + IntPtr error = IntPtr.Zero; + bool ret = gst_init_check (IntPtr.Zero, IntPtr.Zero, out error); + + CheckVersion(); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static bool InitCheck(ref string[] argv) { + int cnt_argv = argv == null ? 0 : argv.Length; + System.Collections.Generic.List native_arg_list = new System.Collections.Generic.List(); + for (int i = 0; i < cnt_argv; i++) + native_arg_list.Add (GLib.Marshaller.StringToPtrGStrdup(argv[i])); + IntPtr[] native_argv = native_arg_list.ToArray(); + IntPtr error = IntPtr.Zero; + bool ret = gst_init_check(ref cnt_argv, ref native_argv, out error); + foreach (var native_arg in native_arg_list) + GLib.Marshaller.Free (native_arg); + if (error != IntPtr.Zero) throw new GLib.GException (error); + + CheckVersion(); + return ret; + } + } +} diff --git a/sources/custom/AudioFilter.cs b/sources/custom/AudioFilter.cs new file mode 100644 index 0000000000..2f20914343 --- /dev/null +++ b/sources/custom/AudioFilter.cs @@ -0,0 +1,37 @@ +// +// AudioFilter.cs +// +// Authors: +// Stephan Sundermann +// +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst.Audio { + using System; + using System.Runtime.InteropServices; + + partial class AudioFilter + { + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_filter_class_add_pad_templates(IntPtr klass, IntPtr allowed_caps); + + public void AddPadTemplates(Gst.Caps allowed_caps) { + gst_audio_filter_class_add_pad_templates(LookupGType().GetClassPtr (), allowed_caps == null ? IntPtr.Zero : allowed_caps.Handle); + } + } +} diff --git a/sources/custom/Bin.cs b/sources/custom/Bin.cs new file mode 100644 index 0000000000..1dadb104fe --- /dev/null +++ b/sources/custom/Bin.cs @@ -0,0 +1,38 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Collections; + using System.Runtime.InteropServices; + + partial class Bin { + public Bin () : this (null) {} + + public void Add (params Element [] elements) { + foreach (var elem in elements) { + Add (elem); + } + } + + public void Remove (params Element [] elements) { + foreach (var elem in elements) { + Remove (elem); + } + } + } +} diff --git a/sources/custom/Buffer.cs b/sources/custom/Buffer.cs new file mode 100644 index 0000000000..5d0cb6861f --- /dev/null +++ b/sources/custom/Buffer.cs @@ -0,0 +1,60 @@ +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Collections; + using System.Runtime.InteropServices; + + partial class Buffer { + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_extract(IntPtr raw, UIntPtr offset, byte[] dest, UIntPtr size); + + public ulong Extract(ulong offset, ref byte[] dest) { + UIntPtr raw_ret = gst_buffer_extract(Handle, new UIntPtr (offset), dest, new UIntPtr ((ulong)dest.Length)); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_extract_dup(IntPtr raw, UIntPtr offset, UIntPtr size, out IntPtr dest, out UIntPtr dest_size); + + public ulong ExtractDup(ulong offset, ulong size, out byte[] dest) { + UIntPtr native_dest_size; + IntPtr ptr; + gst_buffer_extract_dup(Handle, new UIntPtr (offset), new UIntPtr (size), out ptr, out native_dest_size); + + byte[] bytes = new byte[(ulong)native_dest_size]; + Marshal.Copy (ptr, bytes, 0, (int)native_dest_size); + + dest = bytes; + GLib.Marshaller.Free (ptr); + + return (ulong) native_dest_size; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_new_wrapped(IntPtr data, UIntPtr n_length); + + public Buffer (byte[] data) + { + IntPtr ptr = GLib.Marshaller.Malloc((ulong) data.Length); + Marshal.Copy(data, 0, ptr, data.Length); + Raw = gst_buffer_new_wrapped(ptr, new UIntPtr((ulong) data.Length)); + } + } +} diff --git a/sources/custom/Bus.cs b/sources/custom/Bus.cs new file mode 100644 index 0000000000..72135d3f11 --- /dev/null +++ b/sources/custom/Bus.cs @@ -0,0 +1,31 @@ +// Copyright (C) 2013 Bertrand Lorentz +// +// 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 + +using System; + +namespace Gst +{ + partial class Bus + { + public uint AddWatch (Gst.BusFunc func) { + // https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS + int G_PRIORITY_DEFAULT = 0; + return AddWatchFull (G_PRIORITY_DEFAULT, func); + } + } +} + diff --git a/sources/custom/Caps.cs b/sources/custom/Caps.cs new file mode 100644 index 0000000000..22cdba27c9 --- /dev/null +++ b/sources/custom/Caps.cs @@ -0,0 +1,75 @@ +// Iterator.cs - Custom caps wrapper for IEnumerable +// +// Authors: +// Sebastian Dröge +// Stephan Sundermann +// +// Copyright (c) 2013 Stephan Sundermann +// Copyright (c) 2009 Sebastian Dröge +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the Lesser GNU General +// Public License as published by the Free Software Foundation. +// +// This program 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 program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +namespace Gst { + using System; + using System.Collections; + using System.Runtime.InteropServices; + + partial class Caps : IEnumerable + { + public Structure this [uint index] { + get { + if (index >= Size) + throw new ArgumentOutOfRangeException (); + + Structure structure = GetStructure ((uint) index); + return structure; + } + } + + private class StructureEnumerator : IEnumerator { + Gst.Caps caps; + long index; + + public StructureEnumerator (Gst.Caps caps) { + this.caps = caps; + index = -1; + } + + public object Current { + get { + if (index >= caps.Size) + throw new ArgumentOutOfRangeException (); + if (index == -1) + throw new ArgumentException (); + + return caps[ (uint) index]; + } + } + + public bool MoveNext () { + index += 1; + return (index < caps.Size); + } + + public void Reset () { + index = -1; + } + } + + public IEnumerator GetEnumerator() { + return new StructureEnumerator (this); + } + } +} \ No newline at end of file diff --git a/sources/custom/DeviceProvider.cs b/sources/custom/DeviceProvider.cs new file mode 100644 index 0000000000..72a0277432 --- /dev/null +++ b/sources/custom/DeviceProvider.cs @@ -0,0 +1,87 @@ +// +// DeviceProvider.cs +// +// Authors: +// Stephan Sundermann +// +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial class DeviceProvider + { + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_class_add_metadata(IntPtr klass, IntPtr key, IntPtr value); + + public void AddMetadata(string key, string value) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_device_provider_class_add_metadata(LookupGType().GetClassPtr (), native_key, native_value); + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_class_add_static_metadata(IntPtr klass, IntPtr key, IntPtr value); + + public void AddStaticMetadata(string key, string value) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_device_provider_class_add_static_metadata(LookupGType().GetClassPtr (), native_key, native_value); + + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_class_set_metadata(IntPtr klass, IntPtr longname, IntPtr classification, IntPtr description, IntPtr author); + + public void SetMetadata(string longname, string classification, string description, string author) { + IntPtr native_longname = GLib.Marshaller.StringToPtrGStrdup (longname); + IntPtr native_classification = GLib.Marshaller.StringToPtrGStrdup (classification); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_author = GLib.Marshaller.StringToPtrGStrdup (author); + gst_device_provider_class_set_metadata(LookupGType().GetClassPtr (), native_longname, native_classification, native_description, native_author); + GLib.Marshaller.Free (native_longname); + GLib.Marshaller.Free (native_classification); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_author); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_class_set_static_metadata(IntPtr klass, IntPtr longname, IntPtr classification, IntPtr description, IntPtr author); + + public void SetStaticMetadata(string longname, string classification, string description, string author) { + IntPtr native_longname = GLib.Marshaller.StringToPtrGStrdup (longname); + IntPtr native_classification = GLib.Marshaller.StringToPtrGStrdup (classification); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_author = GLib.Marshaller.StringToPtrGStrdup (author); + + gst_device_provider_class_set_static_metadata(LookupGType().GetClassPtr (), native_longname, native_classification, native_description, native_author); + + GLib.Marshaller.Free (native_longname); + GLib.Marshaller.Free (native_classification); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_author); + } + + + } +} diff --git a/sources/custom/DynamicSignal.cs b/sources/custom/DynamicSignal.cs new file mode 100644 index 0000000000..f335eba9cd --- /dev/null +++ b/sources/custom/DynamicSignal.cs @@ -0,0 +1,462 @@ +// 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 + +// +// +// Copyright (C) 2006 Novell Inc. +// Copyright (C) 2009 Sebastian Dröge +// Copyright (C) 2013 Stephan Sundermann +// +// This class implements functions to bind callbacks to GObject signals +// dynamically and to emit signals dynamically. +// +// + +using GLib; +using System; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Collections; + +namespace Gst +{ + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + delegate void GClosureMarshal (IntPtr closure, ref GLib.Value retval, uint argc, IntPtr argsPtr, + IntPtr invocation_hint, IntPtr data); + + public delegate void SignalHandler (object o, SignalArgs args); + + public static class DynamicSignal + { + + private static readonly int gvalue_struct_size = Marshal.SizeOf (typeof(GLib.Value)); + + class ObjectSignalKey + { + object o; + string signal_name; + + public ObjectSignalKey (object o, string name) + { + this.o = o; + signal_name = name; + } + + public override bool Equals (object o) + { + if (o is ObjectSignalKey) { + ObjectSignalKey k = (ObjectSignalKey)o; + return k.o.Equals (this.o) && signal_name.Equals (k.signal_name); + } + return base.Equals (o); + } + + public override int GetHashCode () + { + return o.GetHashCode () ^ signal_name.GetHashCode (); + } + } + + class SignalInfo : IDisposable + { + uint handlerId; + IntPtr closure; + Delegate registeredHandler; + Type argsType; + GCHandle gch; + + public IntPtr Closure { + get { + return closure; + } + set { + closure = value; + } + } + + public uint HandlerId { + get { + return handlerId; + } + set { + handlerId = value; + } + } + + public Delegate RegisteredHandler { + get { + return registeredHandler; + } + set { + registeredHandler = value; + } + } + + public Type ArgsType { + get { + return argsType; + } + set { + argsType = value; + } + } + + public SignalInfo (uint handlerId, IntPtr closure, Delegate registeredHandler, GCHandle gch) + { + this.handlerId = handlerId; + this.closure = closure; + this.registeredHandler = registeredHandler; + this.gch = gch; + + if (!IsValidDelegate (registeredHandler)) + throw new Exception ("Invalid delegate"); + + MethodInfo mi = registeredHandler.Method; + ParameterInfo[] parms = mi.GetParameters (); + this.argsType = parms [1].ParameterType; + } + + public void UpdateArgsType (Delegate d) + { + if (!IsCompatibleDelegate (d)) + throw new Exception ("Incompatible delegate"); + + MethodInfo mi = d.Method; + ParameterInfo[] parms = mi.GetParameters (); + + Type t1 = parms [1].ParameterType; + Type t2 = argsType; + + if (t1 == t2) + return; + + if (t1.IsSubclassOf (t2)) + argsType = t1; + else if (t2.IsSubclassOf (t1)) + argsType = t2; + else + throw new Exception ("Incompatible delegate"); + } + + public bool IsCompatibleDelegate (Delegate d) + { + if (!IsValidDelegate (d)) + return false; + + MethodInfo mi = d.Method; + ParameterInfo[] parms = mi.GetParameters (); + + if (parms [1].ParameterType != this.argsType && + !parms [1].ParameterType.IsSubclassOf (this.argsType) && + !this.argsType.IsSubclassOf (parms [1].ParameterType)) + return false; + + return true; + } + + public void Dispose () + { + registeredHandler = null; + gch.Free (); + GC.SuppressFinalize (this); + } + + public static bool IsValidDelegate (Delegate d) + { + MethodInfo mi = d.Method; + + if (mi.ReturnType != typeof(void)) + return false; + + ParameterInfo[] parms = mi.GetParameters (); + if (parms.Length != 2) + return false; + + if (parms [1].ParameterType != typeof(GLib.SignalArgs) && + !parms [1].ParameterType.IsSubclassOf (typeof(GLib.SignalArgs))) + return false; + + return true; + } + } + + static Hashtable SignalHandlers = new Hashtable (); + + static GClosureMarshal marshalHandler = new GClosureMarshal (OnMarshal); + + public static void Connect (GLib.Object o, string name, SignalHandler handler) + { + Connect (o, name, false, (Delegate)handler); + } + + public static void Connect (GLib.Object o, string name, + bool after, SignalHandler handler) + { + Connect (o, name, after, (Delegate)handler); + } + + public static void Connect (GLib.Object o, string name, Delegate handler) + { + Connect (o, name, false, handler); + } + + public static void Connect (GLib.Object o, string name, + bool after, Delegate handler) + { + Delegate newHandler; + + ObjectSignalKey k = new ObjectSignalKey (o, name); + + if (!SignalInfo.IsValidDelegate (handler)) + throw new Exception ("Invalid delegate"); + + if (SignalHandlers [k] != null) { + SignalInfo si = (SignalInfo)SignalHandlers [k]; + if (!si.IsCompatibleDelegate (handler)) + throw new Exception ("Incompatible delegate"); + + newHandler = Delegate.Combine (si.RegisteredHandler, handler); + si.UpdateArgsType (handler); + si.RegisteredHandler = newHandler; + } else { + if (!SignalInfo.IsValidDelegate (handler)) + throw new Exception ("Invalid delegate"); + + // Let's allocate 64bytes for the GClosure, it should be more than necessary. + IntPtr closure = g_closure_new_simple (64, IntPtr.Zero); + GCHandle gch = GCHandle.Alloc (k); + g_closure_set_meta_marshal (closure, (IntPtr)gch, marshalHandler); + uint signalId = g_signal_connect_closure (o.Handle, name, closure, after); + SignalHandlers.Add (k, new SignalInfo (signalId, closure, handler, gch)); + } + } + + public static void Disconnect (GLib.Object o, string name, Delegate handler) + { + ObjectSignalKey k = new ObjectSignalKey (o, name); + if (SignalHandlers [k] != null) { + SignalInfo si = (SignalInfo)SignalHandlers [k]; + Delegate newHandler = Delegate.Remove (si.RegisteredHandler, handler); + if (newHandler == null || handler == null) { + g_signal_handler_disconnect (o.Handle, si.HandlerId); + SignalHandlers.Remove (k); + si.Dispose (); + } else { + si.RegisteredHandler = newHandler; + } + } + } + + static void OnMarshal (IntPtr closure, ref GLib.Value retval, uint argc, IntPtr argsPtr, + IntPtr ihint, IntPtr data) + { + object[] args = new object[argc - 1]; + object o = ((GLib.Value)Marshal.PtrToStructure (argsPtr, typeof(GLib.Value))).Val; + + for (int i = 1; i < argc; i++) { + IntPtr struct_ptr = (IntPtr)((long)argsPtr + (i * gvalue_struct_size)); + GLib.Value argument = (GLib.Value)Marshal.PtrToStructure (struct_ptr, typeof(GLib.Value)); + args [i - 1] = argument.Val; + } + + if (data == IntPtr.Zero) { + Console.Error.WriteLine ("No available data"); + return; + } + + ObjectSignalKey k = (ObjectSignalKey)((GCHandle)data).Target; + if (k != null) { + SignalInfo si = (SignalInfo)SignalHandlers [k]; + GLib.SignalArgs arg = (GLib.SignalArgs)Activator.CreateInstance (si.ArgsType); + arg.Args = args; + si.RegisteredHandler.DynamicInvoke (new object[] { o, arg }); + if (arg.RetVal != null) { + retval.Val = arg.RetVal; + } + } + } + + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr g_closure_new_simple (int size, IntPtr data); + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint g_signal_connect_closure (IntPtr instance, + string name, IntPtr closure, bool after); + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_closure_set_meta_marshal (IntPtr closure, IntPtr data, GClosureMarshal marshal); + + class GTypeSignalKey + { + GType type; + string signal_name; + + public GTypeSignalKey (GType type, string name) + { + this.type = type; + signal_name = name; + } + + public override bool Equals (object o) + { + if (o is GTypeSignalKey) { + GTypeSignalKey k = (GTypeSignalKey)o; + return k.type.Equals (this.type) && signal_name.Equals (k.signal_name); + } + return base.Equals (o); + } + + public override int GetHashCode () + { + return type.GetHashCode () ^ signal_name.GetHashCode (); + } + } + + struct SignalQuery + { + public uint signal_id; + public string signal_name; + public GType itype; + public uint signal_flags; + public GType return_type; + public uint n_params; + public Type[] param_types; + } + + static Hashtable SignalEmitInfo = new Hashtable (); + + public static object Emit (GLib.Object o, string name, params object[] parameters) + { + SignalQuery query; + GType gtype = o.NativeType; + IntPtr type = gtype.Val; + string signal_name, signal_detail; + uint signal_detail_quark = 0; + int colon; + + colon = name.LastIndexOf ("::"); + + if (colon == -1) { + signal_name = name; + signal_detail = String.Empty; + } else { + signal_name = name.Substring (0, colon); + signal_detail = name.Substring (colon + 2); + } + + GTypeSignalKey key = new GTypeSignalKey (gtype, signal_name); + + if (SignalEmitInfo [key] == null) { + IntPtr native_string = GLib.Marshaller.StringToPtrGStrdup (signal_name); + uint signal_id = g_signal_lookup (native_string, type); + GLib.Marshaller.Free (native_string); + + if (signal_id == 0) + throw new NotSupportedException (String.Format ("{0} has no signal of name {1}", o, name)); + GSignalQuery q = new GSignalQuery (); + g_signal_query (signal_id, ref q); + + if (q.signal_id == 0) + throw new NotSupportedException (String.Format ("{0} couldn't be queried for signal with name {1}", o, name)); + + query = new SignalQuery (); + + query.signal_id = signal_id; + query.signal_name = GLib.Marshaller.Utf8PtrToString (q.signal_name); + query.itype = new GType (q.itype); + query.signal_flags = q.signal_flags; + query.return_type = new GType (q.return_type); + query.n_params = q.n_params; + query.param_types = new Type[q.n_params]; + + for (int i = 0; i < query.n_params; i++) { + IntPtr t = Marshal.ReadIntPtr (q.param_types, i * IntPtr.Size); + GType g = new GType (t); + + query.param_types [i] = (Type)g; + } + + SignalEmitInfo.Add (key, query); + } + + query = (SignalQuery)SignalEmitInfo [key]; + GLib.Value[] signal_parameters = new GLib.Value[query.n_params + 1]; + signal_parameters [0] = new GLib.Value (o); + + if (parameters.Length != query.n_params) + throw new ApplicationException (String.Format ("Invalid number of parameters: expected {0}, got {1}", query.n_params, parameters.Length)); + + for (int i = 0; i < query.n_params; i++) { + Type expected_type = (Type)query.param_types [i]; + Type given_type = parameters [i].GetType (); + + if (expected_type != given_type && !given_type.IsSubclassOf (given_type)) + throw new ApplicationException (String.Format ("Invalid parameter type: expected {0}, got {1}", expected_type, given_type)); + + signal_parameters [i + 1] = new GLib.Value (parameters [i]); + } + + GLib.Value return_value = new GLib.Value (); + if (query.return_type != GType.Invalid && query.return_type != GType.None) + return_value.Init (query.return_type); + + if (signal_detail != String.Empty) { + IntPtr native_string = GLib.Marshaller.StringToPtrGStrdup (signal_detail); + signal_detail_quark = g_quark_from_string (native_string); + GLib.Marshaller.Free (native_string); + } + + g_signal_emitv (signal_parameters, query.signal_id, signal_detail_quark, ref return_value); + + foreach (GLib.Value v in signal_parameters) + v.Dispose (); + + object ret = (query.return_type != GType.Invalid && query.return_type != GType.None) ? return_value.Val : null; + + if (ret != null) + return_value.Dispose (); + + return ret; + } + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int g_signal_handler_disconnect (IntPtr o, uint handler_id); + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint g_signal_lookup (IntPtr name, IntPtr itype); + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint g_quark_from_string (IntPtr str); + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_signal_emitv (GLib.Value[] parameters, uint signal_id, uint detail, ref GLib.Value return_value); + + [StructLayout (LayoutKind.Sequential)] + struct GSignalQuery + { + public uint signal_id; + public IntPtr signal_name; + public IntPtr itype; + public uint signal_flags; + public IntPtr return_type; + public uint n_params; + public IntPtr param_types; + } + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_signal_query (uint signal_id, ref GSignalQuery query); + } +} diff --git a/sources/custom/Element.cs b/sources/custom/Element.cs new file mode 100644 index 0000000000..73de646f23 --- /dev/null +++ b/sources/custom/Element.cs @@ -0,0 +1,109 @@ +// +// Element.cs +// +// Authors: +// Khaled Mohammed +// Sebastian Dröge +// Stephan Sundermann +// +// Copyright (C) 2006 Khaled Mohammed +// Copyright (C) 2006 Novell, Inc. +// Copyright (C) 2009 Sebastian Dröge +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial class Element + { + public static bool Link (params Element [] elements) { + for (int i = 0; i < elements.Length - 1; i++) { + if (!elements[i].Link (elements[i+1])) + return false; + } + return true; + } + + public static void Unlink (params Element [] elements) { + for (int i = 0; i < elements.Length - 1; i++) { + elements[i].Unlink (elements[i+1]); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_class_add_metadata(IntPtr klass, IntPtr key, IntPtr value); + + public void AddMetadata(string key, string value) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_element_class_add_metadata(LookupGType().GetClassPtr (), native_key, native_value); + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_class_add_pad_template(IntPtr klass, IntPtr templ); + + public void AddPadTemplate(Gst.PadTemplate templ) { + gst_element_class_add_pad_template(LookupGType().GetClassPtr (), templ == null ? IntPtr.Zero : templ.OwnedHandle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_class_add_static_metadata(IntPtr klass, IntPtr key, IntPtr value); + + public void AddStaticMetadata(string key, string value) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_element_class_add_static_metadata(LookupGType().GetClassPtr (), native_key, native_value); + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_class_set_metadata(IntPtr klass, IntPtr longname, IntPtr classification, IntPtr description, IntPtr author); + + public void SetMetadata(string longname, string classification, string description, string author) { + IntPtr native_longname = GLib.Marshaller.StringToPtrGStrdup (longname); + IntPtr native_classification = GLib.Marshaller.StringToPtrGStrdup (classification); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_author = GLib.Marshaller.StringToPtrGStrdup (author); + gst_element_class_set_metadata(LookupGType().GetClassPtr (), native_longname, native_classification, native_description, native_author); + GLib.Marshaller.Free (native_longname); + GLib.Marshaller.Free (native_classification); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_author); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_class_set_static_metadata(IntPtr klass, IntPtr longname, IntPtr classification, IntPtr description, IntPtr author); + + public void SetStaticMetadata(string longname, string classification, string description, string author) { + IntPtr native_longname = GLib.Marshaller.StringToPtrGStrdup (longname); + IntPtr native_classification = GLib.Marshaller.StringToPtrGStrdup (classification); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_author = GLib.Marshaller.StringToPtrGStrdup (author); + gst_element_class_set_static_metadata(LookupGType().GetClassPtr (), native_longname, native_classification, native_description, native_author); + GLib.Marshaller.Free (native_longname); + GLib.Marshaller.Free (native_classification); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_author); + } + + } +} diff --git a/sources/custom/FFTF32.cs b/sources/custom/FFTF32.cs new file mode 100644 index 0000000000..70a7e1968d --- /dev/null +++ b/sources/custom/FFTF32.cs @@ -0,0 +1,48 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + + public partial class FFTF32 : GLib.Opaque { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_fft_f32_new (int len, bool inverse); + + public FFTF32 (int len, bool inverse) { + Raw = gst_fft_f32_new (len, inverse); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f32_fft(IntPtr raw, float[] timedata, [MarshalAs (UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct)] FFTF32Complex[] freqdata); + + public void Fft(float[] timedata, Gst.FFT.FFTF32Complex[] freqdata) { + gst_fft_f32_fft(Handle, timedata, freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f32_window(IntPtr raw, float[] timedata, int window); + + public void Window(float[] timedata, Gst.FFT.FFTWindow window) { + gst_fft_f32_window(Handle, timedata, (int) window); + } + } +} diff --git a/sources/custom/Global.cs b/sources/custom/Global.cs new file mode 100644 index 0000000000..640ddd2f28 --- /dev/null +++ b/sources/custom/Global.cs @@ -0,0 +1,40 @@ +// Copyright (C) 2017 Thibault Saunier +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial class Global + { + public static string TimeFormat(ulong time) { + return (time / (Gst.Constants.SECOND * 60 * 60)) + ":" + + (time / (Gst.Constants.SECOND * 60)) % 60 + ":" + + (time / (Gst.Constants.SECOND)) % 60 + ":" + + (time % 60); + } + + public static string TimeFormat(long time) { + return (time / (Gst.Constants.SECOND * 60 * 60)) + ":" + + (time / (Gst.Constants.SECOND * 60)) % 60 + ":" + + (time / (Gst.Constants.SECOND)) % 60 + ":" + + (time % 60); + } + + } +} + diff --git a/sources/custom/Iterator.cs b/sources/custom/Iterator.cs new file mode 100644 index 0000000000..36db444b21 --- /dev/null +++ b/sources/custom/Iterator.cs @@ -0,0 +1,115 @@ +// Iterator.cs - Custom iterator wrapper for IEnumerable +// +// Authors: +// Maarten Bosmans +// Sebastian Dröge +// Stephan Sundermann +// +// Copyright (c) 2009 Maarten Bosmans +// Copyright (c) 2009 Sebastian Dröge +// Copyright (c) 2013 Stephan Sundermann +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the Lesser GNU General +// Public License as published by the Free Software Foundation. +// +// This program 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 program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + using GLib; + + public partial class Iterator : IEnumerable { + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr g_value_reset (ref GLib.Value val); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_iterator_next(IntPtr raw, ref GLib.Value elem); + + public Gst.IteratorResult Next(ref GLib.Value elem) { + int raw_ret = gst_iterator_next(Handle, ref elem); + Gst.IteratorResult ret = (Gst.IteratorResult) raw_ret; + return ret; + } + + private class Enumerator : IEnumerator { + Iterator iterator; + Hashtable seen = new Hashtable (); + + private object current = null; + public object Current { + get { + return current; + } + } + + public bool MoveNext () { + IntPtr raw_ret; + bool retry = false; + + if (iterator.Handle == IntPtr.Zero) + return false; + + do { + GLib.Value value = new GLib.Value (GLib.GType.Boolean); + value.Dispose (); + + IteratorResult ret = iterator.Next (ref value); + + switch (ret) { + case IteratorResult.Done: + return false; + case IteratorResult.Ok: + if (seen.Contains (value)) { + retry = true; + break; + } + seen.Add (value , null); + current = value.Val; + return true; + case IteratorResult.Resync: + iterator.Resync (); + retry = true; + break; + default: + case IteratorResult.Error: + throw new Exception ("Error while iterating"); + } + } while (retry); + + return false; + } + + public void Reset () { + seen.Clear (); + if (iterator.Handle != IntPtr.Zero) + iterator.Resync (); + } + + public Enumerator (Iterator iterator) { + this.iterator = iterator; + } + } + + private Enumerator enumerator = null; + + public IEnumerator GetEnumerator () { + if (this.enumerator == null) + this.enumerator = new Enumerator (this); + return this.enumerator; + } + } +} diff --git a/sources/custom/MapInfo.cs b/sources/custom/MapInfo.cs new file mode 100644 index 0000000000..ab2cf2a71b --- /dev/null +++ b/sources/custom/MapInfo.cs @@ -0,0 +1,47 @@ +// +// MapInfo.cs +// +// Authors: +// Stephan Sundermann +// +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial struct MapInfo + { + public byte[] Data { + get { + byte[] data = new byte[Size]; + Marshal.Copy (_data, data, 0, (int)Size); + return data; + } + set { + Marshal.Copy (value, 0, _data, value.Length); + } + } + + public IntPtr DataPtr { + get { + return _data; + } + } + } +} diff --git a/sources/custom/Message.cs b/sources/custom/Message.cs new file mode 100644 index 0000000000..99483a5e86 --- /dev/null +++ b/sources/custom/Message.cs @@ -0,0 +1,66 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + + partial class Message + { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_error (IntPtr msg, out IntPtr err, out IntPtr debug); + + public void ParseError (out GLib.GException error, out string debug) { + + IntPtr err; + IntPtr dbg; + + gst_message_parse_error (Handle, out err, out dbg); + + if (dbg != IntPtr.Zero) + debug = GLib.Marshaller.Utf8PtrToString (dbg); + else + debug = null; + + if (err == IntPtr.Zero) + throw new Exception (); + + error = new GLib.GException (err); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_get_stream_status_object(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_stream_status_object(IntPtr raw, IntPtr value); + + public GLib.Value StreamStatusObject { + get { + IntPtr raw_ret = gst_message_get_stream_status_object(Handle); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_message_set_stream_status_object(Handle, native_value); + value = (GLib.Value) Marshal.PtrToStructure (native_value, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + } + } + } +} diff --git a/sources/custom/MiniObject.cs b/sources/custom/MiniObject.cs new file mode 100644 index 0000000000..84062b0852 --- /dev/null +++ b/sources/custom/MiniObject.cs @@ -0,0 +1,58 @@ +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + + partial class MiniObject + { + protected MiniObject () {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mini_object_replace(IntPtr olddata, IntPtr newdata); + + public static bool Replace(ref Gst.MiniObject olddata, Gst.MiniObject newdata) { + return gst_mini_object_replace(olddata.Handle, newdata == null ? IntPtr.Zero : newdata.Handle); + } + + public static bool Replace(ref Gst.MiniObject olddata) { + return Replace (ref olddata, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mini_object_take(IntPtr olddata, IntPtr newdata); + + public static bool Take(ref Gst.MiniObject olddata, Gst.MiniObject newdata) { + return gst_mini_object_take(olddata.Handle, newdata == null ? IntPtr.Zero : newdata.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mini_object_make_writable(IntPtr mini_object); + + public void MakeWritable() { + IntPtr raw = gst_mini_object_make_writable (Raw); + if (raw == Raw) + return; + Raw = raw; + if (raw != IntPtr.Zero) + Unref (raw); + } + + } +} diff --git a/sources/custom/NavigationAdapter.cs b/sources/custom/NavigationAdapter.cs new file mode 100644 index 0000000000..479c55df54 --- /dev/null +++ b/sources/custom/NavigationAdapter.cs @@ -0,0 +1,49 @@ +// +// Authors: +// Sebastian Dröge +// +// Copyright (C) 2009 Sebastian Dröge +// +// 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 + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + + public partial class NavigationAdapter { + + public static bool ParseCommands (Gst.Query query, out NavigationCommand[] cmds) { + uint len; + + cmds = null; + if (!QueryParseCommandsLength (query, out len)) + return false; + + cmds = new NavigationCommand[len]; + + for (uint i = 0; i < len; i++) { + NavigationCommand cmd; + + if (!QueryParseCommandsNth (query, i, out cmd)) + return false; + cmds[i] = cmd; + } + + return true; + } + } +} diff --git a/sources/custom/Object.cs b/sources/custom/Object.cs new file mode 100644 index 0000000000..bc9346c788 --- /dev/null +++ b/sources/custom/Object.cs @@ -0,0 +1,118 @@ +// +// Authors: +// Andrés G. Aragoneses +// Sebastian Dröge +// Stephan Sundermann +// +// Copyright (c) 2009 Sebastian Dröge +// Copyright (c) 2013 Andrés G. Aragoneses +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Gst { + + public class PropertyNotFoundException : Exception {} + + [StructLayout (LayoutKind.Sequential)] + struct GstObject { + IntPtr _lock; + public string name; + public Object parent; + public uint flags; + IntPtr controlBindings; + public int control_rate; + public int last_sync; + + private IntPtr[] _gstGstReserved; + } + + partial class Object + { + private Dictionary PropertyNameCache = new Dictionary (); + + [DllImport ("gobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); + + bool PropertyExists (string name) { + if (PropertyNameCache.ContainsKey (name)) + return PropertyNameCache [name]; + + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + var ptr = g_object_class_find_property (Marshal.ReadIntPtr (Handle), native_name); + var result = ptr != IntPtr.Zero; + + // just cache the positive results because there might + // actually be new properties getting installed + if (result) + PropertyNameCache [name] = result; + + GLib.Marshaller.Free (native_name); + return result; + } + + public object this[string property] { + get { + if (PropertyExists (property)) { + using (GLib.Value v = GetProperty (property)) { + return v.Val; + } + } else + throw new PropertyNotFoundException (); + } set { + if (PropertyExists (property)) { + if (value == null) { + throw new ArgumentNullException (); + } + var type = value.GetType (); + var gtype = (GLib.GType)type; + if (gtype == null) { + throw new Exception ("Could not find a GType for type " + type.FullName); + } + GLib.Value v = new GLib.Value ((GLib.GType)value.GetType ()); + v.Val = value; + SetProperty (property, v); + v.Dispose (); + } else + throw new PropertyNotFoundException (); + } + } + + public void Connect (string signal, SignalHandler handler) { + DynamicSignal.Connect (this, signal, handler); + } + + public void Disconnect (string signal, SignalHandler handler) { + DynamicSignal.Disconnect (this, signal, handler); + } + + public void Connect (string signal, Delegate handler) { + DynamicSignal.Connect (this, signal, handler); + } + + public void Disconnect (string signal, Delegate handler) { + DynamicSignal.Disconnect (this, signal, handler); + } + + public object Emit (string signal, params object[] parameters) { + return DynamicSignal.Emit (this, signal, parameters); + } + } +} diff --git a/sources/custom/Pad.cs b/sources/custom/Pad.cs new file mode 100644 index 0000000000..6b597b5d58 --- /dev/null +++ b/sources/custom/Pad.cs @@ -0,0 +1,42 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst { + using System; + using System.Runtime.InteropServices; + + partial class Pad + { + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + GLib.Value val = GetProperty ("caps"); + Gst.Caps ret = (Gst.Caps) val.Val; + val.Dispose (); + return ret; + } + } + public new PadFlags Flags { + get { + return (PadFlags)base.Flags; + } + set { + base.Flags = (uint)value; + } + } + } +} diff --git a/sources/custom/Pipeline.cs b/sources/custom/Pipeline.cs new file mode 100644 index 0000000000..d4c639313f --- /dev/null +++ b/sources/custom/Pipeline.cs @@ -0,0 +1,28 @@ +// +// Pipeline.cs +// +// Authors: +// Sebastian Dröge +// +// Copyright (C) 2009 Sebastian Dröge +// +// 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 + +namespace Gst { + partial class Pipeline { + public Pipeline () : this (null) {} + } +} diff --git a/sources/custom/TagList.cs b/sources/custom/TagList.cs new file mode 100644 index 0000000000..8be903de06 --- /dev/null +++ b/sources/custom/TagList.cs @@ -0,0 +1,68 @@ +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +namespace Gst +{ + using System; + using System.Runtime.InteropServices; + + public partial class TagList + { + public object this [string tag, uint index] { + get { return GetValueIndex (tag, index).Val; } + } + + public object this [string tag] { + get { + var v = GLib.Value.Empty; + bool success; + + success = CopyValue (ref v, this, tag); + + if (!success) + return null; + + object ret = (object)v.Val; + v.Dispose (); + + return ret; + } + } + + public string[] Tags { + get { + int size = NTags (); + string[] tags = new string[size]; + for (uint i = 0; i < size; i++) + tags [i] = NthTagName (i); + + return tags; + } + } + + public void Add (Gst.TagMergeMode mode, string tag, object value) + { + if (!Tag.Exists (tag)) + throw new ArgumentException (String.Format ("Invalid tag name '{0}'", tag)); + + GLib.Value v = new GLib.Value (value); + + AddValue (mode, tag, v); + v.Dispose (); + } + } +} diff --git a/sources/custom/Value.cs b/sources/custom/Value.cs new file mode 100644 index 0000000000..9c8c34db49 --- /dev/null +++ b/sources/custom/Value.cs @@ -0,0 +1,652 @@ +// Copyright (C) 2009 Sebastian Dröge +// Copyright (C) 2013 Stephan Sundermann +// +// 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 + +// Wrapper for GLib.Value to add support for GstFraction, GstFourcc, Gst*Range, ... +using System; +using System.Text; +using System.Collections; +using System.Runtime.InteropServices; +using GLib; + +/* TODO: intersect, compare, substract, .... */ +namespace Gst +{ + public struct Fraction + { + public int Numerator { + get { + return numerator; + } + + set { + numerator = value; + Reduce (); + } + } + + public int Denominator { + get { + return denominator; + } + + set { + if (denominator == 0) + throw new ArgumentException (); + + denominator = value; + Reduce (); + } + } + + private int numerator; + private int denominator; + + public static GLib.GType GType { + get { + return new GType (gst_fraction_get_type ()); + } + } + + private void Reduce () + { + int gcd = GreatestCommonDivisor (this); + + if (gcd != 0) { + this.numerator /= gcd; + this.denominator /= gcd; + } + } + + private static int GreatestCommonDivisor (Fraction fraction) + { + int a = fraction.numerator; + int b = fraction.denominator; + + while (b != 0) { + int temp = a; + + a = b; + b = temp % b; + } + return Math.Abs (a); + } + + public Fraction (int numerator, int denominator) + { + if (denominator == 0) + throw new ArgumentException (); + + this.numerator = numerator; + this.denominator = denominator; + Reduce (); + } + + public Fraction (GLib.Value val) : this () + { + this.numerator = gst_value_get_fraction_numerator (ref val); + this.denominator = gst_value_get_fraction_denominator (ref val); + } + + public void SetGValue (ref GLib.Value val) + { + gst_value_set_fraction (ref val, Numerator, Denominator); + } + + public override string ToString () + { + return String.Format ("{0}/{1}", numerator, denominator); + } + + public static explicit operator GLib.Value (Fraction fraction) + { + GLib.Value val = new GLib.Value (Fraction.GType); + gst_value_set_fraction (ref val, fraction.Numerator, fraction.Denominator); + + return val; + } + + public static explicit operator double (Fraction fraction) + { + return ((double)fraction.numerator) / ((double)fraction.denominator); + } + + public static Fraction operator + (Fraction a, Fraction b) + { + return new Fraction ((a.Numerator * b.Denominator) + (b.Numerator * a.Denominator), a.Denominator * b.Denominator); + } + + public static Fraction operator - (Fraction a, Fraction b) + { + return new Fraction ((a.Numerator * b.Denominator) - (b.Numerator * a.Denominator), a.Denominator * b.Denominator); + } + + public static Fraction operator * (Fraction a, Fraction b) + { + return new Fraction (a.Numerator * b.Numerator, a.Denominator * b.Denominator); + } + + public static Fraction operator / (Fraction a, Fraction b) + { + return new Fraction (a.Numerator * b.Denominator, a.Denominator * b.Numerator); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_set_fraction (ref GLib.Value v, int numerator, int denominator); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern int gst_value_get_fraction_numerator (ref GLib.Value v); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern int gst_value_get_fraction_denominator (ref GLib.Value v); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_fraction_get_type (); + } + + public struct DoubleRange + { + public double Min; + public double Max; + + public static GLib.GType GType { + get { + return new GType (gst_double_range_get_type ()); + } + } + + public DoubleRange (double min, double max) + { + if (min > max) + throw new ArgumentException (); + + this.Min = min; + this.Max = max; + } + + public DoubleRange (GLib.Value val) : this () + { + this.Min = gst_value_get_double_range_min (ref val); + this.Max = gst_value_get_double_range_max (ref val); + } + + public override string ToString () + { + return String.Format ("[{0}, {1}]", Min, Max); + } + + public void SetGValue (ref GLib.Value val) + { + gst_value_set_double_range (ref val, Min, Max); + } + + public static explicit operator GLib.Value (DoubleRange range) + { + GLib.Value val = new GLib.Value (DoubleRange.GType); + + gst_value_set_double_range (ref val, range.Min, range.Max); + return val; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_double_range_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_set_double_range (ref GLib.Value v, double min, double max); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern double gst_value_get_double_range_min (ref GLib.Value v); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern double gst_value_get_double_range_max (ref GLib.Value v); + } + + public struct IntRange + { + public int Min; + public int Max; + + public static GLib.GType GType { + get { + return new GType (gst_int_range_get_type ()); + } + } + + public IntRange (int min, int max) + { + if (min > max) + throw new ArgumentException (); + + this.Min = min; + this.Max = max; + } + + public IntRange (GLib.Value val) : this () + { + this.Min = gst_value_get_int_range_min (ref val); + this.Max = gst_value_get_int_range_max (ref val); + } + + public void SetGValue (ref GLib.Value val) + { + gst_value_set_int_range (ref val, Min, Max); + } + + public override string ToString () + { + return String.Format ("[{0}, {1}]", Min, Max); + } + + public static explicit operator GLib.Value (IntRange range) + { + GLib.Value val = new GLib.Value (IntRange.GType); + + gst_value_set_int_range (ref val, range.Min, range.Max); + return val; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_int_range_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_set_int_range (ref GLib.Value v, int min, int max); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern int gst_value_get_int_range_min (ref GLib.Value v); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern int gst_value_get_int_range_max (ref GLib.Value v); + } + + public struct FractionRange + { + public Fraction Min; + public Fraction Max; + + public static GLib.GType GType { + get { + return new GType (gst_fraction_range_get_type ()); + } + } + + public FractionRange (Fraction min, Fraction max) + { + double a = (double)min, b = (double)max; + + if (a > b) + throw new ArgumentException (); + + this.Min = min; + this.Max = max; + } + + public FractionRange (GLib.Value val) : this () + { + IntPtr min_ptr, max_ptr; + GLib.Value min, max; + + min_ptr = gst_value_get_fraction_range_min (ref val); + max_ptr = gst_value_get_fraction_range_max (ref val); + + min = (GLib.Value)Marshal.PtrToStructure (min_ptr, typeof(GLib.Value)); + max = (GLib.Value)Marshal.PtrToStructure (max_ptr, typeof(GLib.Value)); + this.Min = (Fraction)min.Val; + this.Max = (Fraction)max.Val; + } + + public void SetGValue (ref GLib.Value val) + { + GLib.Value min = new GLib.Value (Min); + GLib.Value max = new GLib.Value (Max); + gst_value_set_fraction_range (ref val, ref min, ref max); + min.Dispose (); + max.Dispose (); + } + + public override string ToString () + { + return String.Format ("[{0}, {1}]", Min, Max); + } + + public static explicit operator GLib.Value (FractionRange range) + { + GLib.Value val = new GLib.Value (FractionRange.GType); + + GLib.Value min = new GLib.Value (range.Min); + GLib.Value max = new GLib.Value (range.Max); + gst_value_set_fraction_range (ref val, ref min, ref max); + min.Dispose (); + max.Dispose (); + return val; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_fraction_range_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_set_fraction_range (ref GLib.Value v, ref GLib.Value min, ref GLib.Value max); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_get_fraction_range_min (ref GLib.Value v); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_get_fraction_range_max (ref GLib.Value v); + } + + public class Date : IWrapper + { + public DateTime Val; + private IntPtr handle; + + public IntPtr Handle { + get { + return handle; + } + } + + public static GLib.GType GType { + get { + return new GType (gst_date_get_type ()); + } + } + + ~Date () + { + g_date_free (handle); + } + + public Date (DateTime date) + { + this.Val = date; + handle = g_date_new_dmy ((byte)Val.Day, (int)Val.Month, (ushort)Val.Year); + } + + public Date (int day, int month, int year) + { + this.Val = new DateTime (year, month, day); + handle = g_date_new_dmy ((byte)Val.Day, (int)Val.Month, (ushort)Val.Year); + } + + public Date (GLib.Value val) + { + IntPtr date = gst_value_get_date (ref val); + + this.Val = new DateTime (g_date_get_year (date), g_date_get_month (date), g_date_get_day (date)); + handle = g_date_new_dmy ((byte)Val.Day, (int)Val.Month, (ushort)Val.Year); + } + + public static Date New (IntPtr date) + { + return new Date (g_date_get_day (date), g_date_get_month (date), g_date_get_year (date)); + } + + public void SetGValue (ref GLib.Value val) + { + IntPtr date_ptr = g_date_new_dmy ((byte)Val.Day, (int)Val.Month, (ushort)Val.Year); + + gst_value_set_date (ref val, date_ptr); + + GLib.Marshaller.Free (date_ptr); + } + + public override string ToString () + { + return String.Format ("{0}-{1}-{2}", Val.Year, Val.Month, Val.Day); + } + + public static explicit operator GLib.Value (Date date) + { + GLib.Value val = new GLib.Value (Date.GType); + + date.SetGValue (ref val); + + return val; + } + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern byte g_date_get_day (IntPtr date); + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern int g_date_get_month (IntPtr date); + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern ushort g_date_get_year (IntPtr date); + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr g_date_new_dmy (byte day, int month, ushort year); + + [DllImport ("glib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern void g_date_free (IntPtr date); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_date_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_get_date (ref GLib.Value val); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_set_date (ref GLib.Value val, IntPtr date); + } + + public struct List : IEnumerable + { + private IList content; + + public static GLib.GType GType { + get { + return new GType (gst_value_list_get_type ()); + } + } + + public List (IList content) + { + this.content = content; + } + + public List (GLib.Value val) + { + this.content = new ArrayList (); + + uint n = gst_value_list_get_size (ref val); + for (uint i = 0; i < n; i++) { + IntPtr v_ptr = gst_value_list_get_value (ref val, i); + GLib.Value v = (GLib.Value)Marshal.PtrToStructure (v_ptr, typeof(GLib.Value)); + this.content.Add (v.Val); + } + } + + public void SetGValue (ref GLib.Value val) + { + foreach (object o in content) { + GLib.Value v = new GLib.Value (o); + gst_value_list_append_value (ref val, ref v); + v.Dispose (); + } + } + + public override string ToString () + { + StringBuilder sb = new StringBuilder (); + + sb.Append ("< "); + for (int i = 0; i < content.Count; i++) { + sb.Append (content [i]); + if (i < content.Count - 1) + sb.Append (", "); + } + sb.Append (" >"); + + return sb.ToString (); + } + + public static explicit operator GLib.Value (List l) + { + GLib.Value val = new GLib.Value (List.GType); + + foreach (object o in l.content) { + GLib.Value v = new GLib.Value (o); + gst_value_list_append_value (ref val, ref v); + v.Dispose (); + } + + return val; + } + + public IEnumerator GetEnumerator () + { + return content.GetEnumerator (); + } + + public object this [int index] { + set { + content [index] = value; + } + get { + return content [index]; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_list_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern uint gst_value_list_get_size (ref GLib.Value val); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_list_get_value (ref GLib.Value val, uint index); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_list_append_value (ref GLib.Value val, ref GLib.Value el); + } + + public struct Array : IEnumerable + { + private IList content; + + public static GLib.GType GType { + get { + return new GType (gst_value_array_get_type ()); + } + } + + public Array (IList content) + { + this.content = content; + } + + public Array (GLib.Value val) + { + this.content = new ArrayList (); + + uint n = gst_value_array_get_size (ref val); + for (uint i = 0; i < n; i++) { + IntPtr v_ptr = gst_value_array_get_value (ref val, i); + GLib.Value v = (GLib.Value)Marshal.PtrToStructure (v_ptr, typeof(GLib.Value)); + this.content.Add (v.Val); + } + } + + public void SetGValue (ref GLib.Value val) + { + foreach (object o in content) { + GLib.Value v = new GLib.Value (o); + gst_value_array_append_value (ref val, ref v); + v.Dispose (); + } + } + + public static explicit operator GLib.Value (Array a) + { + GLib.Value val = new GLib.Value (Gst.Array.GType); + + foreach (object o in a.content) { + GLib.Value v = new GLib.Value (o); + gst_value_array_append_value (ref val, ref v); + v.Dispose (); + } + + return val; + } + + public override string ToString () + { + StringBuilder sb = new StringBuilder (); + + sb.Append ("{ "); + for (int i = 0; i < content.Count; i++) { + sb.Append (content [i]); + if (i < content.Count - 1) + sb.Append (", "); + } + sb.Append (" }"); + + return sb.ToString (); + } + + public IEnumerator GetEnumerator () + { + return content.GetEnumerator (); + } + + public object this [int index] { + set { + content [index] = value; + } + get { + return content [index]; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_array_get_type (); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern uint gst_value_array_get_size (ref GLib.Value val); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern IntPtr gst_value_array_get_value (ref GLib.Value val, uint index); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + + private static extern void gst_value_array_append_value (ref GLib.Value val, ref GLib.Value el); + } +} diff --git a/sources/custom/Version.cs b/sources/custom/Version.cs new file mode 100644 index 0000000000..9b6af17437 --- /dev/null +++ b/sources/custom/Version.cs @@ -0,0 +1,84 @@ +// +// Version.cs: Lightweight Version Object for GStreamer +// +// Authors: +// Aaron Bockover +// Stephan Sundermann +// +// Copyright (C) 2006 Novell, Inc. +// +// 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 + +using System; +using System.Runtime.InteropServices; + +namespace Gst +{ + public static class Version + { + private static uint major; + private static uint minor; + private static uint micro; + private static uint nano; + private static string version_string; + + static Version () + { + gst_version (out major, out minor, out micro, out nano); + } + + public static string Description { + get { + if (version_string == null) { + IntPtr version_string_ptr = gst_version_string (); + version_string = GLib.Marshaller.Utf8PtrToString (version_string_ptr); + } + + return version_string; + } + } + + public static uint Major { + get { + return major; + } + } + + public static uint Minor { + get { + return minor; + } + } + + public static uint Micro { + get { + return micro; + } + } + + public static uint Nano { + get { + return nano; + } + } + + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern void gst_version (out uint major, out uint minor, out uint micro, out uint nano); + + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr gst_version_string (); + } +} diff --git a/sources/custom/VideoGLUploadMeta.cs b/sources/custom/VideoGLUploadMeta.cs new file mode 100644 index 0000000000..38502869dd --- /dev/null +++ b/sources/custom/VideoGLUploadMeta.cs @@ -0,0 +1,29 @@ +// Copyright (C) 2014 Stephan Sundermann +// +// 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 + +namespace Gst.Video { + using System; + using System.Runtime.InteropServices; + + partial struct VideoGLTextureUploadMeta + { + public bool Equals (VideoGLTextureUploadMeta other) + { + return Meta.Equals (other.Meta) && TextureOrientation.Equals (other.TextureOrientation) && NTextures.Equals (other.NTextures) && TextureType.Equals (other.TextureType); + } + } +} diff --git a/sources/generated/Gst.App/AppSink.cs b/sources/generated/Gst.App/AppSink.cs new file mode 100644 index 0000000000..939a713165 --- /dev/null +++ b/sources/generated/Gst.App/AppSink.cs @@ -0,0 +1,701 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AppSink : Gst.Base.BaseSink, Gst.IURIHandler { + + public AppSink (IntPtr raw) : base(raw) {} + + protected AppSink() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("buffer-list")] + public bool BufferList { + get { + GLib.Value val = GetProperty ("buffer-list"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("buffer-list", val); + val.Dispose (); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_get_caps(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_caps(IntPtr raw, IntPtr caps); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_app_sink_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + gst_app_sink_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_sink_get_drop(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_drop(IntPtr raw, bool drop); + + [GLib.Property ("drop")] + public bool Drop { + get { + bool raw_ret = gst_app_sink_get_drop(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_app_sink_set_drop(Handle, value); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_sink_get_emit_signals(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_emit_signals(IntPtr raw, bool emit); + + [GLib.Property ("emit-signals")] + public bool EmitSignals { + get { + bool raw_ret = gst_app_sink_get_emit_signals(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_app_sink_set_emit_signals(Handle, value); + } + } + + [GLib.Property ("eos")] + public bool EosProp + { + get { + GLib.Value val = GetProperty ("eos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_app_sink_get_max_buffers(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_max_buffers(IntPtr raw, uint max); + + [GLib.Property ("max-buffers")] + public uint MaxBuffers { + get { + uint raw_ret = gst_app_sink_get_max_buffers(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_app_sink_set_max_buffers(Handle, value); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_sink_get_wait_on_eos(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_wait_on_eos(IntPtr raw, bool wait); + + [GLib.Property ("wait-on-eos")] + public bool WaitOnEos { + get { + bool raw_ret = gst_app_sink_get_wait_on_eos(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_app_sink_set_wait_on_eos(Handle, value); + } + } + + [GLib.Signal("try-pull-sample")] + public event Gst.App.TryPullSampleEventHandler TryPullSampleEvent { + add { + this.AddSignalHandler ("try-pull-sample", value, typeof (Gst.App.TryPullSampleEventArgs)); + } + remove { + this.RemoveSignalHandler ("try-pull-sample", value); + } + } + + [GLib.Signal("eos")] + public event System.EventHandler Eos { + add { + this.AddSignalHandler ("eos", value); + } + remove { + this.RemoveSignalHandler ("eos", value); + } + } + + [GLib.Signal("try-pull-preroll")] + public event Gst.App.TryPullPrerollEventHandler TryPullPrerollEvent { + add { + this.AddSignalHandler ("try-pull-preroll", value, typeof (Gst.App.TryPullPrerollEventArgs)); + } + remove { + this.RemoveSignalHandler ("try-pull-preroll", value); + } + } + + [GLib.Signal("new-preroll")] + public event Gst.App.NewPrerollHandler NewPreroll { + add { + this.AddSignalHandler ("new-preroll", value, typeof (Gst.App.NewPrerollArgs)); + } + remove { + this.RemoveSignalHandler ("new-preroll", value); + } + } + + [GLib.Signal("new-sample")] + public event Gst.App.NewSampleHandler NewSample { + add { + this.AddSignalHandler ("new-sample", value, typeof (Gst.App.NewSampleArgs)); + } + remove { + this.RemoveSignalHandler ("new-sample", value); + } + } + + static EosNativeDelegate Eos_cb_delegate; + static EosNativeDelegate EosVMCallback { + get { + if (Eos_cb_delegate == null) + Eos_cb_delegate = new EosNativeDelegate (Eos_cb); + return Eos_cb_delegate; + } + } + + static void OverrideEos (GLib.GType gtype) + { + OverrideEos (gtype, EosVMCallback); + } + + static void OverrideEos (GLib.GType gtype, EosNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("eos")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void EosNativeDelegate (IntPtr inst); + + static void Eos_cb (IntPtr inst) + { + try { + AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink; + __obj.OnEos (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideEos")] + protected virtual void OnEos () + { + InternalEos (); + } + + private void InternalEos () + { + EosNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("eos")); + unmanaged = (EosNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EosNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static NewPrerollNativeDelegate NewPreroll_cb_delegate; + static NewPrerollNativeDelegate NewPrerollVMCallback { + get { + if (NewPreroll_cb_delegate == null) + NewPreroll_cb_delegate = new NewPrerollNativeDelegate (NewPreroll_cb); + return NewPreroll_cb_delegate; + } + } + + static void OverrideNewPreroll (GLib.GType gtype) + { + OverrideNewPreroll (gtype, NewPrerollVMCallback); + } + + static void OverrideNewPreroll (GLib.GType gtype, NewPrerollNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("new_preroll")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int NewPrerollNativeDelegate (IntPtr inst); + + static int NewPreroll_cb (IntPtr inst) + { + try { + AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink; + Gst.FlowReturn __result; + __result = __obj.OnNewPreroll (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideNewPreroll")] + protected virtual Gst.FlowReturn OnNewPreroll () + { + return InternalNewPreroll (); + } + + private Gst.FlowReturn InternalNewPreroll () + { + NewPrerollNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("new_preroll")); + unmanaged = (NewPrerollNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NewPrerollNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static NewSampleNativeDelegate NewSample_cb_delegate; + static NewSampleNativeDelegate NewSampleVMCallback { + get { + if (NewSample_cb_delegate == null) + NewSample_cb_delegate = new NewSampleNativeDelegate (NewSample_cb); + return NewSample_cb_delegate; + } + } + + static void OverrideNewSample (GLib.GType gtype) + { + OverrideNewSample (gtype, NewSampleVMCallback); + } + + static void OverrideNewSample (GLib.GType gtype, NewSampleNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("new_sample")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int NewSampleNativeDelegate (IntPtr inst); + + static int NewSample_cb (IntPtr inst) + { + try { + AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink; + Gst.FlowReturn __result; + __result = __obj.OnNewSample (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideNewSample")] + protected virtual Gst.FlowReturn OnNewSample () + { + return InternalNewSample (); + } + + private Gst.FlowReturn InternalNewSample () + { + NewSampleNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("new_sample")); + unmanaged = (NewSampleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NewSampleNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static TryPullPrerollEventNativeDelegate TryPullPrerollEvent_cb_delegate; + static TryPullPrerollEventNativeDelegate TryPullPrerollEventVMCallback { + get { + if (TryPullPrerollEvent_cb_delegate == null) + TryPullPrerollEvent_cb_delegate = new TryPullPrerollEventNativeDelegate (TryPullPrerollEvent_cb); + return TryPullPrerollEvent_cb_delegate; + } + } + + static void OverrideTryPullPrerollEvent (GLib.GType gtype) + { + OverrideTryPullPrerollEvent (gtype, TryPullPrerollEventVMCallback); + } + + static void OverrideTryPullPrerollEvent (GLib.GType gtype, TryPullPrerollEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_preroll")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr TryPullPrerollEventNativeDelegate (IntPtr inst, ulong timeout); + + static IntPtr TryPullPrerollEvent_cb (IntPtr inst, ulong timeout) + { + try { + AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink; + Gst.Sample __result; + __result = __obj.OnTryPullPrerollEvent (timeout); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideTryPullPrerollEvent")] + protected virtual Gst.Sample OnTryPullPrerollEvent (ulong timeout) + { + return InternalTryPullPrerollEvent (timeout); + } + + private Gst.Sample InternalTryPullPrerollEvent (ulong timeout) + { + TryPullPrerollEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_preroll")); + unmanaged = (TryPullPrerollEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TryPullPrerollEventNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, timeout); + return __result == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (__result, typeof (Gst.Sample), true); + } + + static TryPullSampleEventNativeDelegate TryPullSampleEvent_cb_delegate; + static TryPullSampleEventNativeDelegate TryPullSampleEventVMCallback { + get { + if (TryPullSampleEvent_cb_delegate == null) + TryPullSampleEvent_cb_delegate = new TryPullSampleEventNativeDelegate (TryPullSampleEvent_cb); + return TryPullSampleEvent_cb_delegate; + } + } + + static void OverrideTryPullSampleEvent (GLib.GType gtype) + { + OverrideTryPullSampleEvent (gtype, TryPullSampleEventVMCallback); + } + + static void OverrideTryPullSampleEvent (GLib.GType gtype, TryPullSampleEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_sample")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr TryPullSampleEventNativeDelegate (IntPtr inst, ulong timeout); + + static IntPtr TryPullSampleEvent_cb (IntPtr inst, ulong timeout) + { + try { + AppSink __obj = GLib.Object.GetObject (inst, false) as AppSink; + Gst.Sample __result; + __result = __obj.OnTryPullSampleEvent (timeout); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSink), ConnectionMethod="OverrideTryPullSampleEvent")] + protected virtual Gst.Sample OnTryPullSampleEvent (ulong timeout) + { + return InternalTryPullSampleEvent (timeout); + } + + private Gst.Sample InternalTryPullSampleEvent (ulong timeout) + { + TryPullSampleEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("try_pull_sample")); + unmanaged = (TryPullSampleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TryPullSampleEventNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, timeout); + return __result == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (__result, typeof (Gst.Sample), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("eos" + , Gst.Base.BaseSink.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // eos + , null + , "new_preroll" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("new_preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // new_preroll + , "eos" + , "new_sample" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("new_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // new_sample + , "new_preroll" + , "pull_preroll" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pull_preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pull_preroll + , "new_sample" + , "pull_sample" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pull_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pull_sample + , "pull_preroll" + , "try_pull_preroll" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("try_pull_preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // try_pull_preroll + , "pull_sample" + , "try_pull_sample" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("try_pull_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // try_pull_sample + , "try_pull_preroll" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved + , "try_pull_sample" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_app_sink_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_sink_get_buffer_list_support(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_sink_set_buffer_list_support(IntPtr raw, bool enable_lists); + + public bool BufferListSupport { + get { + bool raw_ret = gst_app_sink_get_buffer_list_support(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_app_sink_set_buffer_list_support(Handle, value); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_sink_is_eos(IntPtr raw); + + public bool IsEos { + get { + bool raw_ret = gst_app_sink_is_eos(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_pull_preroll(IntPtr raw); + + public Gst.Sample PullPreroll() { + IntPtr raw_ret = gst_app_sink_pull_preroll(Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_pull_sample(IntPtr raw); + + public Gst.Sample PullSample() { + IntPtr raw_ret = gst_app_sink_pull_sample(Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_try_pull_preroll(IntPtr raw, ulong timeout); + + public Gst.Sample TryPullPreroll(ulong timeout) { + IntPtr raw_ret = gst_app_sink_try_pull_preroll(Handle, timeout); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_sink_try_pull_sample(IntPtr raw, ulong timeout); + + public Gst.Sample TryPullSample(ulong timeout) { + IntPtr raw_ret = gst_app_sink_try_pull_sample(Handle, timeout); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_handler_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_uri_handler_get_uri(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_uri_handler_get_uri_type(IntPtr raw); + + public Gst.URIType UriType { + get { + int raw_ret = gst_uri_handler_get_uri_type(Handle); + Gst.URIType ret = (Gst.URIType) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public bool SetUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static AppSink () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Base.BaseSink.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.App/AppSinkCallbacks.cs b/sources/generated/Gst.App/AppSinkCallbacks.cs new file mode 100644 index 0000000000..07cfa2d297 --- /dev/null +++ b/sources/generated/Gst.App/AppSinkCallbacks.cs @@ -0,0 +1,49 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AppSinkCallbacks : IEquatable { + + private IntPtr _eos; + private IntPtr _new_preroll; + private IntPtr _new_sample; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.App.AppSinkCallbacks Zero = new Gst.App.AppSinkCallbacks (); + + public static Gst.App.AppSinkCallbacks New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.App.AppSinkCallbacks.Zero; + return (Gst.App.AppSinkCallbacks) Marshal.PtrToStructure (raw, typeof (Gst.App.AppSinkCallbacks)); + } + + public bool Equals (AppSinkCallbacks other) + { + return true && _eos.Equals (other._eos) && _new_preroll.Equals (other._new_preroll) && _new_sample.Equals (other._new_sample); + } + + public override bool Equals (object other) + { + return other is AppSinkCallbacks && Equals ((AppSinkCallbacks) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ _eos.GetHashCode () ^ _new_preroll.GetHashCode () ^ _new_sample.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.App/AppSrc.cs b/sources/generated/Gst.App/AppSrc.cs new file mode 100644 index 0000000000..8b4642353f --- /dev/null +++ b/sources/generated/Gst.App/AppSrc.cs @@ -0,0 +1,929 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AppSrc : Gst.Base.BaseSrc, Gst.IURIHandler { + + public AppSrc (IntPtr raw) : base(raw) {} + + protected AppSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("block")] + public bool Block { + get { + GLib.Value val = GetProperty ("block"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("block", val); + val.Dispose (); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_src_get_caps(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_caps(IntPtr raw, IntPtr caps); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_app_src_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + gst_app_src_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_app_src_get_current_level_bytes(IntPtr raw); + + [GLib.Property ("current-level-bytes")] + public ulong CurrentLevelBytes { + get { + ulong raw_ret = gst_app_src_get_current_level_bytes(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_app_src_get_duration(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_duration(IntPtr raw, ulong duration); + + [GLib.Property ("duration")] + public ulong Duration { + get { + ulong raw_ret = gst_app_src_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_app_src_set_duration(Handle, value); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_app_src_get_emit_signals(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_emit_signals(IntPtr raw, bool emit); + + [GLib.Property ("emit-signals")] + public bool EmitSignals { + get { + bool raw_ret = gst_app_src_get_emit_signals(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_app_src_set_emit_signals(Handle, value); + } + } + + [GLib.Property ("format")] + public Gst.Format Format { + get { + GLib.Value val = GetProperty ("format"); + Gst.Format ret = (Gst.Format) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("format", val); + val.Dispose (); + } + } + + [GLib.Property ("handle-segment-change")] + public bool HandleSegmentChange { + get { + GLib.Value val = GetProperty ("handle-segment-change"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("handle-segment-change", val); + val.Dispose (); + } + } + + [GLib.Property ("is-live")] + public bool IsLive { + get { + GLib.Value val = GetProperty ("is-live"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("is-live", val); + val.Dispose (); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_app_src_get_max_bytes(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_max_bytes(IntPtr raw, ulong max); + + [GLib.Property ("max-bytes")] + public ulong MaxBytes { + get { + ulong raw_ret = gst_app_src_get_max_bytes(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_app_src_set_max_bytes(Handle, value); + } + } + + [GLib.Property ("max-latency")] + public long MaxLatency { + get { + GLib.Value val = GetProperty ("max-latency"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-latency", val); + val.Dispose (); + } + } + + [GLib.Property ("min-latency")] + public long MinLatency { + get { + GLib.Value val = GetProperty ("min-latency"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("min-latency", val); + val.Dispose (); + } + } + + [GLib.Property ("min-percent")] + public uint MinPercent { + get { + GLib.Value val = GetProperty ("min-percent"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("min-percent", val); + val.Dispose (); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_app_src_get_size(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_size(IntPtr raw, long size); + + [GLib.Property ("size")] + public long Size { + get { + long raw_ret = gst_app_src_get_size(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_app_src_set_size(Handle, value); + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_app_src_get_stream_type(IntPtr raw); + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_stream_type(IntPtr raw, int type); + + [GLib.Property ("stream-type")] + public Gst.App.AppStreamType StreamType { + get { + int raw_ret = gst_app_src_get_stream_type(Handle); + Gst.App.AppStreamType ret = (Gst.App.AppStreamType) raw_ret; + return ret; + } + set { + gst_app_src_set_stream_type(Handle, (int) value); + } + } + + [GLib.Signal("seek-data")] + public event Gst.App.SeekDataHandler SeekData { + add { + this.AddSignalHandler ("seek-data", value, typeof (Gst.App.SeekDataArgs)); + } + remove { + this.RemoveSignalHandler ("seek-data", value); + } + } + + [GLib.Signal("push-sample")] + public event Gst.App.PushSampleEventHandler PushSampleEvent { + add { + this.AddSignalHandler ("push-sample", value, typeof (Gst.App.PushSampleEventArgs)); + } + remove { + this.RemoveSignalHandler ("push-sample", value); + } + } + + [GLib.Signal("enough-data")] + public event System.EventHandler EnoughData { + add { + this.AddSignalHandler ("enough-data", value); + } + remove { + this.RemoveSignalHandler ("enough-data", value); + } + } + + [GLib.Signal("need-data")] + public event Gst.App.NeedDataHandler NeedData { + add { + this.AddSignalHandler ("need-data", value, typeof (Gst.App.NeedDataArgs)); + } + remove { + this.RemoveSignalHandler ("need-data", value); + } + } + + [GLib.Signal("end-of-stream")] + public event Gst.App.EndOfStreamEventHandler EndOfStreamEvent { + add { + this.AddSignalHandler ("end-of-stream", value, typeof (Gst.App.EndOfStreamEventArgs)); + } + remove { + this.RemoveSignalHandler ("end-of-stream", value); + } + } + + [GLib.Signal("push-buffer")] + public event Gst.App.PushBufferEventHandler PushBufferEvent { + add { + this.AddSignalHandler ("push-buffer", value, typeof (Gst.App.PushBufferEventArgs)); + } + remove { + this.RemoveSignalHandler ("push-buffer", value); + } + } + + [GLib.Signal("push-buffer-list")] + public event Gst.App.PushBufferListEventHandler PushBufferListEvent { + add { + this.AddSignalHandler ("push-buffer-list", value, typeof (Gst.App.PushBufferListEventArgs)); + } + remove { + this.RemoveSignalHandler ("push-buffer-list", value); + } + } + + static NeedDataNativeDelegate NeedData_cb_delegate; + static NeedDataNativeDelegate NeedDataVMCallback { + get { + if (NeedData_cb_delegate == null) + NeedData_cb_delegate = new NeedDataNativeDelegate (NeedData_cb); + return NeedData_cb_delegate; + } + } + + static void OverrideNeedData (GLib.GType gtype) + { + OverrideNeedData (gtype, NeedDataVMCallback); + } + + static void OverrideNeedData (GLib.GType gtype, NeedDataNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("need_data")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NeedDataNativeDelegate (IntPtr inst, uint _object); + + static void NeedData_cb (IntPtr inst, uint _object) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + __obj.OnNeedData (_object); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideNeedData")] + protected virtual void OnNeedData (uint _object) + { + InternalNeedData (_object); + } + + private void InternalNeedData (uint _object) + { + NeedDataNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("need_data")); + unmanaged = (NeedDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NeedDataNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, _object); + } + + static EnoughDataNativeDelegate EnoughData_cb_delegate; + static EnoughDataNativeDelegate EnoughDataVMCallback { + get { + if (EnoughData_cb_delegate == null) + EnoughData_cb_delegate = new EnoughDataNativeDelegate (EnoughData_cb); + return EnoughData_cb_delegate; + } + } + + static void OverrideEnoughData (GLib.GType gtype) + { + OverrideEnoughData (gtype, EnoughDataVMCallback); + } + + static void OverrideEnoughData (GLib.GType gtype, EnoughDataNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("enough_data")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void EnoughDataNativeDelegate (IntPtr inst); + + static void EnoughData_cb (IntPtr inst) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + __obj.OnEnoughData (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideEnoughData")] + protected virtual void OnEnoughData () + { + InternalEnoughData (); + } + + private void InternalEnoughData () + { + EnoughDataNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("enough_data")); + unmanaged = (EnoughDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EnoughDataNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static SeekDataNativeDelegate SeekData_cb_delegate; + static SeekDataNativeDelegate SeekDataVMCallback { + get { + if (SeekData_cb_delegate == null) + SeekData_cb_delegate = new SeekDataNativeDelegate (SeekData_cb); + return SeekData_cb_delegate; + } + } + + static void OverrideSeekData (GLib.GType gtype) + { + OverrideSeekData (gtype, SeekDataVMCallback); + } + + static void OverrideSeekData (GLib.GType gtype, SeekDataNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("seek_data")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SeekDataNativeDelegate (IntPtr inst, ulong _object); + + static bool SeekData_cb (IntPtr inst, ulong _object) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + bool __result; + __result = __obj.OnSeekData (_object); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideSeekData")] + protected virtual bool OnSeekData (ulong _object) + { + return InternalSeekData (_object); + } + + private bool InternalSeekData (ulong _object) + { + SeekDataNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("seek_data")); + unmanaged = (SeekDataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SeekDataNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, _object); + return __result; + } + + static PushBufferEventNativeDelegate PushBufferEvent_cb_delegate; + static PushBufferEventNativeDelegate PushBufferEventVMCallback { + get { + if (PushBufferEvent_cb_delegate == null) + PushBufferEvent_cb_delegate = new PushBufferEventNativeDelegate (PushBufferEvent_cb); + return PushBufferEvent_cb_delegate; + } + } + + static void OverridePushBufferEvent (GLib.GType gtype) + { + OverridePushBufferEvent (gtype, PushBufferEventVMCallback); + } + + static void OverridePushBufferEvent (GLib.GType gtype, PushBufferEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PushBufferEventNativeDelegate (IntPtr inst, IntPtr _object); + + static int PushBufferEvent_cb (IntPtr inst, IntPtr _object) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + Gst.FlowReturn __result; + __result = __obj.OnPushBufferEvent (_object == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_object, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushBufferEvent")] + protected virtual Gst.FlowReturn OnPushBufferEvent (Gst.Buffer _object) + { + return InternalPushBufferEvent (_object); + } + + private Gst.FlowReturn InternalPushBufferEvent (Gst.Buffer _object) + { + PushBufferEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer")); + unmanaged = (PushBufferEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushBufferEventNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle); + return (Gst.FlowReturn) __result; + } + + static EndOfStreamEventNativeDelegate EndOfStreamEvent_cb_delegate; + static EndOfStreamEventNativeDelegate EndOfStreamEventVMCallback { + get { + if (EndOfStreamEvent_cb_delegate == null) + EndOfStreamEvent_cb_delegate = new EndOfStreamEventNativeDelegate (EndOfStreamEvent_cb); + return EndOfStreamEvent_cb_delegate; + } + } + + static void OverrideEndOfStreamEvent (GLib.GType gtype) + { + OverrideEndOfStreamEvent (gtype, EndOfStreamEventVMCallback); + } + + static void OverrideEndOfStreamEvent (GLib.GType gtype, EndOfStreamEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("end_of_stream")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int EndOfStreamEventNativeDelegate (IntPtr inst); + + static int EndOfStreamEvent_cb (IntPtr inst) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + Gst.FlowReturn __result; + __result = __obj.OnEndOfStreamEvent (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverrideEndOfStreamEvent")] + protected virtual Gst.FlowReturn OnEndOfStreamEvent () + { + return InternalEndOfStreamEvent (); + } + + private Gst.FlowReturn InternalEndOfStreamEvent () + { + EndOfStreamEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("end_of_stream")); + unmanaged = (EndOfStreamEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EndOfStreamEventNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static PushSampleEventNativeDelegate PushSampleEvent_cb_delegate; + static PushSampleEventNativeDelegate PushSampleEventVMCallback { + get { + if (PushSampleEvent_cb_delegate == null) + PushSampleEvent_cb_delegate = new PushSampleEventNativeDelegate (PushSampleEvent_cb); + return PushSampleEvent_cb_delegate; + } + } + + static void OverridePushSampleEvent (GLib.GType gtype) + { + OverridePushSampleEvent (gtype, PushSampleEventVMCallback); + } + + static void OverridePushSampleEvent (GLib.GType gtype, PushSampleEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_sample")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PushSampleEventNativeDelegate (IntPtr inst, IntPtr _object); + + static int PushSampleEvent_cb (IntPtr inst, IntPtr _object) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + Gst.FlowReturn __result; + __result = __obj.OnPushSampleEvent (_object == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (_object, typeof (Gst.Sample), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushSampleEvent")] + protected virtual Gst.FlowReturn OnPushSampleEvent (Gst.Sample _object) + { + return InternalPushSampleEvent (_object); + } + + private Gst.FlowReturn InternalPushSampleEvent (Gst.Sample _object) + { + PushSampleEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_sample")); + unmanaged = (PushSampleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushSampleEventNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle); + return (Gst.FlowReturn) __result; + } + + static PushBufferListEventNativeDelegate PushBufferListEvent_cb_delegate; + static PushBufferListEventNativeDelegate PushBufferListEventVMCallback { + get { + if (PushBufferListEvent_cb_delegate == null) + PushBufferListEvent_cb_delegate = new PushBufferListEventNativeDelegate (PushBufferListEvent_cb); + return PushBufferListEvent_cb_delegate; + } + } + + static void OverridePushBufferListEvent (GLib.GType gtype) + { + OverridePushBufferListEvent (gtype, PushBufferListEventVMCallback); + } + + static void OverridePushBufferListEvent (GLib.GType gtype, PushBufferListEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer_list")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PushBufferListEventNativeDelegate (IntPtr inst, IntPtr _object); + + static int PushBufferListEvent_cb (IntPtr inst, IntPtr _object) + { + try { + AppSrc __obj = GLib.Object.GetObject (inst, false) as AppSrc; + Gst.FlowReturn __result; + __result = __obj.OnPushBufferListEvent (_object == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (_object, typeof (Gst.BufferList), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.App.AppSrc), ConnectionMethod="OverridePushBufferListEvent")] + protected virtual Gst.FlowReturn OnPushBufferListEvent (Gst.BufferList _object) + { + return InternalPushBufferListEvent (_object); + } + + private Gst.FlowReturn InternalPushBufferListEvent (Gst.BufferList _object) + { + PushBufferListEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push_buffer_list")); + unmanaged = (PushBufferListEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushBufferListEventNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("need_data" + , Gst.Base.BaseSrc.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // need_data + , null + , "enough_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("enough_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // enough_data + , "need_data" + , "seek_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("seek_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // seek_data + , "enough_data" + , "push_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("push_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // push_buffer + , "seek_data" + , "end_of_stream" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("end_of_stream" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // end_of_stream + , "push_buffer" + , "push_sample" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("push_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // push_sample + , "end_of_stream" + , "push_buffer_list" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("push_buffer_list" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // push_buffer_list + , "push_sample" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved + , "push_buffer_list" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_app_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_app_src_end_of_stream(IntPtr raw); + + public Gst.FlowReturn EndOfStream() { + int raw_ret = gst_app_src_end_of_stream(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_get_latency(IntPtr raw, out ulong min, out ulong max); + + public void GetLatency(out ulong min, out ulong max) { + gst_app_src_get_latency(Handle, out min, out max); + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_app_src_push_buffer(IntPtr raw, IntPtr buffer); + + public Gst.FlowReturn PushBuffer(Gst.Buffer buffer) { + buffer.Owned = false; + int raw_ret = gst_app_src_push_buffer(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_app_src_push_buffer_list(IntPtr raw, IntPtr buffer_list); + + public Gst.FlowReturn PushBufferList(Gst.BufferList buffer_list) { + buffer_list.Owned = false; + int raw_ret = gst_app_src_push_buffer_list(Handle, buffer_list == null ? IntPtr.Zero : buffer_list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_app_src_push_sample(IntPtr raw, IntPtr sample); + + public Gst.FlowReturn PushSample(Gst.Sample sample) { + int raw_ret = gst_app_src_push_sample(Handle, sample == null ? IntPtr.Zero : sample.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_app_src_set_latency(IntPtr raw, ulong min, ulong max); + + public void SetLatency(ulong min, ulong max) { + gst_app_src_set_latency(Handle, min, max); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_handler_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_uri_handler_get_uri(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_uri_handler_get_uri_type(IntPtr raw); + + public Gst.URIType UriType { + get { + int raw_ret = gst_uri_handler_get_uri_type(Handle); + Gst.URIType ret = (Gst.URIType) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public bool SetUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static AppSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Base.BaseSrc.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.App/AppSrcCallbacks.cs b/sources/generated/Gst.App/AppSrcCallbacks.cs new file mode 100644 index 0000000000..3850eff309 --- /dev/null +++ b/sources/generated/Gst.App/AppSrcCallbacks.cs @@ -0,0 +1,49 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AppSrcCallbacks : IEquatable { + + private IntPtr _need_data; + private IntPtr _enough_data; + private IntPtr _seek_data; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.App.AppSrcCallbacks Zero = new Gst.App.AppSrcCallbacks (); + + public static Gst.App.AppSrcCallbacks New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.App.AppSrcCallbacks.Zero; + return (Gst.App.AppSrcCallbacks) Marshal.PtrToStructure (raw, typeof (Gst.App.AppSrcCallbacks)); + } + + public bool Equals (AppSrcCallbacks other) + { + return true && _need_data.Equals (other._need_data) && _enough_data.Equals (other._enough_data) && _seek_data.Equals (other._seek_data); + } + + public override bool Equals (object other) + { + return other is AppSrcCallbacks && Equals ((AppSrcCallbacks) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ _need_data.GetHashCode () ^ _enough_data.GetHashCode () ^ _seek_data.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.App/AppStreamType.cs b/sources/generated/Gst.App/AppStreamType.cs new file mode 100644 index 0000000000..40fa0d697e --- /dev/null +++ b/sources/generated/Gst.App/AppStreamType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.App.AppStreamTypeGType))] + public enum AppStreamType { + + Stream = 0, + Seekable = 1, + RandomAccess = 2, + } + + internal class AppStreamTypeGType { + [DllImport ("gstapp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_app_stream_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_app_stream_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.App/Constants.cs b/sources/generated/Gst.App/Constants.cs new file mode 100644 index 0000000000..0d6dda79e8 --- /dev/null +++ b/sources/generated/Gst.App/Constants.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + +#endregion + } +} diff --git a/sources/generated/Gst.App/EndOfStreamEventHandler.cs b/sources/generated/Gst.App/EndOfStreamEventHandler.cs new file mode 100644 index 0000000000..de83ee769d --- /dev/null +++ b/sources/generated/Gst.App/EndOfStreamEventHandler.cs @@ -0,0 +1,12 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void EndOfStreamEventHandler(object o, EndOfStreamEventArgs args); + + public class EndOfStreamEventArgs : GLib.SignalArgs { + } +} diff --git a/sources/generated/Gst.App/Global.cs b/sources/generated/Gst.App/Global.cs new file mode 100644 index 0000000000..fedd8e4512 --- /dev/null +++ b/sources/generated/Gst.App/Global.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + +#endregion + } +} diff --git a/sources/generated/Gst.App/NeedDataHandler.cs b/sources/generated/Gst.App/NeedDataHandler.cs new file mode 100644 index 0000000000..d049fe9de5 --- /dev/null +++ b/sources/generated/Gst.App/NeedDataHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void NeedDataHandler(object o, NeedDataArgs args); + + public class NeedDataArgs : GLib.SignalArgs { + public uint Object{ + get { + return (uint) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/NewPrerollHandler.cs b/sources/generated/Gst.App/NewPrerollHandler.cs new file mode 100644 index 0000000000..6fc4b88713 --- /dev/null +++ b/sources/generated/Gst.App/NewPrerollHandler.cs @@ -0,0 +1,12 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void NewPrerollHandler(object o, NewPrerollArgs args); + + public class NewPrerollArgs : GLib.SignalArgs { + } +} diff --git a/sources/generated/Gst.App/NewSampleHandler.cs b/sources/generated/Gst.App/NewSampleHandler.cs new file mode 100644 index 0000000000..dcafc1339c --- /dev/null +++ b/sources/generated/Gst.App/NewSampleHandler.cs @@ -0,0 +1,12 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void NewSampleHandler(object o, NewSampleArgs args); + + public class NewSampleArgs : GLib.SignalArgs { + } +} diff --git a/sources/generated/Gst.App/PushBufferEventHandler.cs b/sources/generated/Gst.App/PushBufferEventHandler.cs new file mode 100644 index 0000000000..af3fb527d6 --- /dev/null +++ b/sources/generated/Gst.App/PushBufferEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void PushBufferEventHandler(object o, PushBufferEventArgs args); + + public class PushBufferEventArgs : GLib.SignalArgs { + public Gst.Buffer Object{ + get { + return (Gst.Buffer) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/PushBufferListEventHandler.cs b/sources/generated/Gst.App/PushBufferListEventHandler.cs new file mode 100644 index 0000000000..3edfc07bbe --- /dev/null +++ b/sources/generated/Gst.App/PushBufferListEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void PushBufferListEventHandler(object o, PushBufferListEventArgs args); + + public class PushBufferListEventArgs : GLib.SignalArgs { + public Gst.BufferList Object{ + get { + return (Gst.BufferList) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/PushSampleEventHandler.cs b/sources/generated/Gst.App/PushSampleEventHandler.cs new file mode 100644 index 0000000000..7d9b059e93 --- /dev/null +++ b/sources/generated/Gst.App/PushSampleEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void PushSampleEventHandler(object o, PushSampleEventArgs args); + + public class PushSampleEventArgs : GLib.SignalArgs { + public Gst.Sample Object{ + get { + return (Gst.Sample) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/SeekDataHandler.cs b/sources/generated/Gst.App/SeekDataHandler.cs new file mode 100644 index 0000000000..324b06145d --- /dev/null +++ b/sources/generated/Gst.App/SeekDataHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void SeekDataHandler(object o, SeekDataArgs args); + + public class SeekDataArgs : GLib.SignalArgs { + public ulong Object{ + get { + return (ulong) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/TryPullPrerollEventHandler.cs b/sources/generated/Gst.App/TryPullPrerollEventHandler.cs new file mode 100644 index 0000000000..c6f2469e34 --- /dev/null +++ b/sources/generated/Gst.App/TryPullPrerollEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void TryPullPrerollEventHandler(object o, TryPullPrerollEventArgs args); + + public class TryPullPrerollEventArgs : GLib.SignalArgs { + public ulong Timeout{ + get { + return (ulong) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.App/TryPullSampleEventHandler.cs b/sources/generated/Gst.App/TryPullSampleEventHandler.cs new file mode 100644 index 0000000000..dc8274ed8c --- /dev/null +++ b/sources/generated/Gst.App/TryPullSampleEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.App { + + using System; + + public delegate void TryPullSampleEventHandler(object o, TryPullSampleEventArgs args); + + public class TryPullSampleEventArgs : GLib.SignalArgs { + public ulong Timeout{ + get { + return (ulong) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Audio/AudioBaseSink.cs b/sources/generated/Gst.Audio/AudioBaseSink.cs new file mode 100644 index 0000000000..dc8445e916 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSink.cs @@ -0,0 +1,527 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioBaseSink : Gst.Base.BaseSink { + + public AudioBaseSink (IntPtr raw) : base(raw) {} + + protected AudioBaseSink() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_base_sink_get_alignment_threshold(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_alignment_threshold(IntPtr raw, ulong alignment_threshold); + + [GLib.Property ("alignment-threshold")] + public ulong AlignmentThreshold { + get { + ulong raw_ret = gst_audio_base_sink_get_alignment_threshold(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_audio_base_sink_set_alignment_threshold(Handle, value); + } + } + + [GLib.Property ("buffer-time")] + public long BufferTime { + get { + GLib.Value val = GetProperty ("buffer-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("buffer-time", val); + val.Dispose (); + } + } + + [GLib.Property ("can-activate-pull")] + public bool CanActivatePull { + get { + GLib.Value val = GetProperty ("can-activate-pull"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("can-activate-pull", val); + val.Dispose (); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_base_sink_get_discont_wait(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_discont_wait(IntPtr raw, ulong discont_wait); + + [GLib.Property ("discont-wait")] + public ulong DiscontWait { + get { + ulong raw_ret = gst_audio_base_sink_get_discont_wait(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_audio_base_sink_set_discont_wait(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_audio_base_sink_get_drift_tolerance(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_drift_tolerance(IntPtr raw, long drift_tolerance); + + [GLib.Property ("drift-tolerance")] + public long DriftTolerance { + get { + long raw_ret = gst_audio_base_sink_get_drift_tolerance(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_audio_base_sink_set_drift_tolerance(Handle, value); + } + } + + [GLib.Property ("latency-time")] + public long LatencyTime { + get { + GLib.Value val = GetProperty ("latency-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("latency-time", val); + val.Dispose (); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_base_sink_get_provide_clock(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_provide_clock(IntPtr raw, bool provide); + + [GLib.Property ("provide-clock")] + public bool ProvideClock { + get { + bool raw_ret = gst_audio_base_sink_get_provide_clock(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_base_sink_set_provide_clock(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_base_sink_get_slave_method(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_slave_method(IntPtr raw, int method); + + [GLib.Property ("slave-method")] + public Gst.Audio.AudioBaseSinkSlaveMethod SlaveMethod { + get { + int raw_ret = gst_audio_base_sink_get_slave_method(Handle); + Gst.Audio.AudioBaseSinkSlaveMethod ret = (Gst.Audio.AudioBaseSinkSlaveMethod) raw_ret; + return ret; + } + set { + gst_audio_base_sink_set_slave_method(Handle, (int) value); + } + } + + public Gst.Audio.AudioRingBuffer Ringbuffer { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer; + } + } + } + + public ulong BufferTimeField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time")); + return (*raw_ptr); + } + } + } + + public ulong LatencyTimeField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time")); + return (*raw_ptr); + } + } + } + + public ulong NextSample { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample")); + return (*raw_ptr); + } + } + } + + public Gst.Clock ProvidedClock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock; + } + } + } + + public bool EosRendering { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("eos_rendering")); + return (*raw_ptr); + } + } + } + + static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate; + static CreateRingbufferNativeDelegate CreateRingbufferVMCallback { + get { + if (CreateRingbuffer_cb_delegate == null) + CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb); + return CreateRingbuffer_cb_delegate; + } + } + + static void OverrideCreateRingbuffer (GLib.GType gtype) + { + OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback); + } + + static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst); + + static IntPtr CreateRingbuffer_cb (IntPtr inst) + { + try { + AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink; + Gst.Audio.AudioRingBuffer __result; + __result = __obj.OnCreateRingbuffer (); + return __result == null ? IntPtr.Zero : __result.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverrideCreateRingbuffer")] + protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer () + { + return InternalCreateRingbuffer (); + } + + private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer () + { + CreateRingbufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer")); + unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle); + return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer; + } + + static PayloadNativeDelegate Payload_cb_delegate; + static PayloadNativeDelegate PayloadVMCallback { + get { + if (Payload_cb_delegate == null) + Payload_cb_delegate = new PayloadNativeDelegate (Payload_cb); + return Payload_cb_delegate; + } + } + + static void OverridePayload (GLib.GType gtype) + { + OverridePayload (gtype, PayloadVMCallback); + } + + static void OverridePayload (GLib.GType gtype, PayloadNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("payload")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr PayloadNativeDelegate (IntPtr inst, IntPtr buffer); + + static IntPtr Payload_cb (IntPtr inst, IntPtr buffer) + { + try { + AudioBaseSink __obj = GLib.Object.GetObject (inst, false) as AudioBaseSink; + Gst.Buffer __result; + __result = __obj.OnPayload (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSink), ConnectionMethod="OverridePayload")] + protected virtual Gst.Buffer OnPayload (Gst.Buffer buffer) + { + return InternalPayload (buffer); + } + + private Gst.Buffer InternalPayload (Gst.Buffer buffer) + { + PayloadNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("payload")); + unmanaged = (PayloadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PayloadNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_ringbuffer" + , Gst.Base.BaseSink.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer + , null + , "payload" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("payload" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // payload + , "create_ringbuffer" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "payload" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_sink_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_base_sink_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_sink_create_ringbuffer(IntPtr raw); + + public Gst.Audio.AudioRingBuffer CreateRingbuffer() { + IntPtr raw_ret = gst_audio_base_sink_create_ringbuffer(Handle); + Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_report_device_failure(IntPtr raw); + + public void ReportDeviceFailure() { + gst_audio_base_sink_report_device_failure(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_sink_set_custom_slaving_callback(IntPtr raw, Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative cb, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.Audio.AudioBaseSinkCustomSlavingCallback CustomSlavingCallback { + set { + Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper value_wrapper = new Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_audio_base_sink_set_custom_slaving_callback(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + + static AudioBaseSink () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("ringbuffer" + , Gst.Base.BaseSink.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer + , null + , "buffer_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("buffer_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time + , "ringbuffer" + , "latency_time" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_buffer_timeAlign), "buffer_time") + , 0 + ), + new GLib.AbiField("latency_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time + , "buffer_time" + , "next_sample" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_latency_timeAlign), "latency_time") + , 0 + ), + new GLib.AbiField("next_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample + , "latency_time" + , "provided_clock" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_next_sampleAlign), "next_sample") + , 0 + ), + new GLib.AbiField("provided_clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock + , "next_sample" + , "eos_rendering" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("eos_rendering" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // eos_rendering + , "provided_clock" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSink_eos_renderingAlign), "eos_rendering") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "eos_rendering" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSink_buffer_timeAlign + { + sbyte f1; + private ulong buffer_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSink_latency_timeAlign + { + sbyte f1; + private ulong latency_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSink_next_sampleAlign + { + sbyte f1; + private ulong next_sample; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSink_eos_renderingAlign + { + sbyte f1; + private bool eos_rendering; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioBaseSinkCustomSlavingCallback.cs b/sources/generated/Gst.Audio/AudioBaseSinkCustomSlavingCallback.cs new file mode 100644 index 0000000000..45085ffa98 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSinkCustomSlavingCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + + public delegate void AudioBaseSinkCustomSlavingCallback(Gst.Audio.AudioBaseSink sink, ulong etime, ulong itime, long requested_skew, Gst.Audio.AudioBaseSinkDiscontReason discont_reason); + +} diff --git a/sources/generated/Gst.Audio/AudioBaseSinkDiscontReason.cs b/sources/generated/Gst.Audio/AudioBaseSinkDiscontReason.cs new file mode 100644 index 0000000000..4cc218a616 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSinkDiscontReason.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioBaseSinkDiscontReasonGType))] + public enum AudioBaseSinkDiscontReason { + + NoDiscont = 0, + NewCaps = 1, + Flush = 2, + SyncLatency = 3, + Alignment = 4, + DeviceFailure = 5, + } + + internal class AudioBaseSinkDiscontReasonGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_sink_discont_reason_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_base_sink_discont_reason_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioBaseSinkSlaveMethod.cs b/sources/generated/Gst.Audio/AudioBaseSinkSlaveMethod.cs new file mode 100644 index 0000000000..a44b9a6e8b --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSinkSlaveMethod.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioBaseSinkSlaveMethodGType))] + public enum AudioBaseSinkSlaveMethod { + + Resample = 0, + Skew = 1, + None = 2, + Custom = 3, + } + + internal class AudioBaseSinkSlaveMethodGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_sink_slave_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_base_sink_slave_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioBaseSrc.cs b/sources/generated/Gst.Audio/AudioBaseSrc.cs new file mode 100644 index 0000000000..d62c7c4aa6 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSrc.cs @@ -0,0 +1,362 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioBaseSrc : Gst.Base.PushSrc { + + public AudioBaseSrc (IntPtr raw) : base(raw) {} + + protected AudioBaseSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("actual-buffer-time")] + public long ActualBufferTime { + get { + GLib.Value val = GetProperty ("actual-buffer-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("actual-latency-time")] + public long ActualLatencyTime { + get { + GLib.Value val = GetProperty ("actual-latency-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("buffer-time")] + public long BufferTime { + get { + GLib.Value val = GetProperty ("buffer-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("buffer-time", val); + val.Dispose (); + } + } + + [GLib.Property ("latency-time")] + public long LatencyTime { + get { + GLib.Value val = GetProperty ("latency-time"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("latency-time", val); + val.Dispose (); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_base_src_get_provide_clock(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_src_set_provide_clock(IntPtr raw, bool provide); + + [GLib.Property ("provide-clock")] + public bool ProvideClock { + get { + bool raw_ret = gst_audio_base_src_get_provide_clock(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_base_src_set_provide_clock(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_base_src_get_slave_method(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_base_src_set_slave_method(IntPtr raw, int method); + + [GLib.Property ("slave-method")] + public Gst.Audio.AudioBaseSrcSlaveMethod SlaveMethod { + get { + int raw_ret = gst_audio_base_src_get_slave_method(Handle); + Gst.Audio.AudioBaseSrcSlaveMethod ret = (Gst.Audio.AudioBaseSrcSlaveMethod) raw_ret; + return ret; + } + set { + gst_audio_base_src_set_slave_method(Handle, (int) value); + } + } + + public Gst.Audio.AudioRingBuffer Ringbuffer { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer; + } + } + } + + public ulong BufferTimeField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time")); + return (*raw_ptr); + } + } + } + + public ulong LatencyTimeField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time")); + return (*raw_ptr); + } + } + } + + public ulong NextSample { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample")); + return (*raw_ptr); + } + } + } + + public Gst.Clock Clock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock; + } + } + } + + static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate; + static CreateRingbufferNativeDelegate CreateRingbufferVMCallback { + get { + if (CreateRingbuffer_cb_delegate == null) + CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb); + return CreateRingbuffer_cb_delegate; + } + } + + static void OverrideCreateRingbuffer (GLib.GType gtype) + { + OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback); + } + + static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst); + + static IntPtr CreateRingbuffer_cb (IntPtr inst) + { + try { + AudioBaseSrc __obj = GLib.Object.GetObject (inst, false) as AudioBaseSrc; + Gst.Audio.AudioRingBuffer __result; + __result = __obj.OnCreateRingbuffer (); + return __result == null ? IntPtr.Zero : __result.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSrc), ConnectionMethod="OverrideCreateRingbuffer")] + protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer () + { + return InternalCreateRingbuffer (); + } + + private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer () + { + CreateRingbufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer")); + unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle); + return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_ringbuffer" + , Gst.Base.PushSrc.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "create_ringbuffer" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_base_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_src_create_ringbuffer(IntPtr raw); + + public Gst.Audio.AudioRingBuffer CreateRingbuffer() { + IntPtr raw_ret = gst_audio_base_src_create_ringbuffer(Handle); + Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer; + return ret; + } + + + static AudioBaseSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("ringbuffer" + , Gst.Base.PushSrc.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer + , null + , "buffer_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("buffer_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time + , "ringbuffer" + , "latency_time" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_buffer_timeAlign), "buffer_time") + , 0 + ), + new GLib.AbiField("latency_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time + , "buffer_time" + , "next_sample" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_latency_timeAlign), "latency_time") + , 0 + ), + new GLib.AbiField("next_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample + , "latency_time" + , "clock" + , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_next_sampleAlign), "next_sample") + , 0 + ), + new GLib.AbiField("clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock + , "next_sample" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "clock" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSrc_buffer_timeAlign + { + sbyte f1; + private ulong buffer_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSrc_latency_timeAlign + { + sbyte f1; + private ulong latency_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioBaseSrc_next_sampleAlign + { + sbyte f1; + private ulong next_sample; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioBaseSrcSlaveMethod.cs b/sources/generated/Gst.Audio/AudioBaseSrcSlaveMethod.cs new file mode 100644 index 0000000000..4d62679f2d --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBaseSrcSlaveMethod.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioBaseSrcSlaveMethodGType))] + public enum AudioBaseSrcSlaveMethod { + + Resample = 0, + ReTimestamp = 1, + Skew = 2, + None = 3, + } + + internal class AudioBaseSrcSlaveMethodGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_base_src_slave_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_base_src_slave_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioBuffer.cs b/sources/generated/Gst.Audio/AudioBuffer.cs new file mode 100644 index 0000000000..5cfe42093a --- /dev/null +++ b/sources/generated/Gst.Audio/AudioBuffer.cs @@ -0,0 +1,145 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioBuffer : IEquatable { + + private IntPtr _info; + public Gst.Audio.AudioInfo Info { + get { + return _info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Audio.AudioInfo), false); + } + set { + _info = value == null ? IntPtr.Zero : value.Handle; + } + } + private UIntPtr n_samples; + public ulong NSamples { + get { + return (ulong) n_samples; + } + set { + n_samples = new UIntPtr (value); + } + } + public int NPlanes; + private IntPtr _planes; + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _map_infos; + + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Audio.AudioBuffer Zero = new Gst.Audio.AudioBuffer (); + + public static Gst.Audio.AudioBuffer New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioBuffer.Zero; + return (Gst.Audio.AudioBuffer) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioBuffer)); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_buffer_map(IntPtr raw, IntPtr info, IntPtr gstbuffer, int flags); + + public bool Map(Gst.Audio.AudioInfo info, Gst.Buffer gstbuffer, Gst.MapFlags flags) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_buffer_map(this_as_native, info == null ? IntPtr.Zero : info.Handle, gstbuffer == null ? IntPtr.Zero : gstbuffer.Handle, (int) flags); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_buffer_unmap(IntPtr raw); + + public void Unmap() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_buffer_unmap(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_buffer_clip(IntPtr buffer, IntPtr segment, int rate, int bpf); + + public static Gst.Buffer Clip(Gst.Buffer buffer, Gst.Segment segment, int rate, int bpf) { + buffer.Owned = false; + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + IntPtr raw_ret = gst_audio_buffer_clip(buffer == null ? IntPtr.Zero : buffer.Handle, native_segment, rate, bpf); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_segment); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_buffer_reorder_channels(IntPtr buffer, int format, int channels, int[] from, int[] to); + + public static bool ReorderChannels(Gst.Buffer buffer, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) { + int cnt_from = from == null ? 0 : from.Length; + int[] native_from = new int [cnt_from]; + for (int i = 0; i < cnt_from; i++) + native_from [i] = (int) from[i]; + int cnt_to = to == null ? 0 : to.Length; + int[] native_to = new int [cnt_to]; + for (int i = 0; i < cnt_to; i++) + native_to [i] = (int) to[i]; + bool raw_ret = gst_audio_buffer_reorder_channels(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, channels, native_from, native_to); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_buffer_truncate(IntPtr buffer, int bpf, UIntPtr trim, UIntPtr samples); + + public static Gst.Buffer Truncate(Gst.Buffer buffer, int bpf, ulong trim, ulong samples) { + buffer.Owned = false; + IntPtr raw_ret = gst_audio_buffer_truncate(buffer == null ? IntPtr.Zero : buffer.Handle, bpf, new UIntPtr (trim), new UIntPtr (samples)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Audio.AudioBuffer target) + { + target = New (native); + } + + public bool Equals (AudioBuffer other) + { + return true && Info.Equals (other.Info) && NSamples.Equals (other.NSamples) && NPlanes.Equals (other.NPlanes) && _planes.Equals (other._planes) && Buffer.Equals (other.Buffer) && _map_infos.Equals (other._map_infos); + } + + public override bool Equals (object other) + { + return other is AudioBuffer && Equals ((AudioBuffer) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Info.GetHashCode () ^ NSamples.GetHashCode () ^ NPlanes.GetHashCode () ^ _planes.GetHashCode () ^ Buffer.GetHashCode () ^ _map_infos.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioCdSrc.cs b/sources/generated/Gst.Audio/AudioCdSrc.cs new file mode 100644 index 0000000000..23a54c38a4 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioCdSrc.cs @@ -0,0 +1,414 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioCdSrc : Gst.Base.PushSrc, Gst.IURIHandler { + + public AudioCdSrc (IntPtr raw) : base(raw) {} + + protected AudioCdSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("device")] + public string Device { + get { + GLib.Value val = GetProperty ("device"); + string ret = (string) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("device", val); + val.Dispose (); + } + } + + [GLib.Property ("mode")] + public Gst.Audio.AudioCdSrcMode Mode { + get { + GLib.Value val = GetProperty ("mode"); + Gst.Audio.AudioCdSrcMode ret = (Gst.Audio.AudioCdSrcMode) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("mode", val); + val.Dispose (); + } + } + + [GLib.Property ("track")] + public uint Track { + get { + GLib.Value val = GetProperty ("track"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("track", val); + val.Dispose (); + } + } + + public Gst.TagList Tags { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("tags")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.TagList), false); + } + } + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst, IntPtr device); + + static bool Open_cb (IntPtr inst, IntPtr device) + { + try { + AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc; + bool __result; + __result = __obj.OnOpen (GLib.Marshaller.Utf8PtrToString (device)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen (string device) + { + return InternalOpen (device); + } + + private bool InternalOpen (string device) + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_device = GLib.Marshaller.StringToPtrGStrdup (device); + bool __result = unmanaged (this.Handle, native_device); + GLib.Marshaller.Free (native_device); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CloseNativeDelegate (IntPtr inst); + + static void Close_cb (IntPtr inst) + { + try { + AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc; + __obj.OnClose (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideClose")] + protected virtual void OnClose () + { + InternalClose (); + } + + private void InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static ReadSectorNativeDelegate ReadSector_cb_delegate; + static ReadSectorNativeDelegate ReadSectorVMCallback { + get { + if (ReadSector_cb_delegate == null) + ReadSector_cb_delegate = new ReadSectorNativeDelegate (ReadSector_cb); + return ReadSector_cb_delegate; + } + } + + static void OverrideReadSector (GLib.GType gtype) + { + OverrideReadSector (gtype, ReadSectorVMCallback); + } + + static void OverrideReadSector (GLib.GType gtype, ReadSectorNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read_sector")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ReadSectorNativeDelegate (IntPtr inst, int sector); + + static IntPtr ReadSector_cb (IntPtr inst, int sector) + { + try { + AudioCdSrc __obj = GLib.Object.GetObject (inst, false) as AudioCdSrc; + Gst.Buffer __result; + __result = __obj.OnReadSector (sector); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioCdSrc), ConnectionMethod="OverrideReadSector")] + protected virtual Gst.Buffer OnReadSector (int sector) + { + return InternalReadSector (sector); + } + + private Gst.Buffer InternalReadSector (int sector) + { + ReadSectorNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read_sector")); + unmanaged = (ReadSectorNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadSectorNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, sector); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open" + , Gst.Base.PushSrc.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , null + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "open" + , "read_sector" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("read_sector" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // read_sector + , "close" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "read_sector" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_cd_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_cd_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_cd_src_add_track(IntPtr raw, IntPtr track); + + public bool AddTrack(Gst.Audio.AudioCdSrcTrack track) { + IntPtr native_track = GLib.Marshaller.StructureToPtrAlloc (track); + bool raw_ret = gst_audio_cd_src_add_track(Handle, native_track); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_track); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_handler_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_uri_handler_get_uri(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_uri_handler_get_uri_type(IntPtr raw); + + public Gst.URIType UriType { + get { + int raw_ret = gst_uri_handler_get_uri_type(Handle); + Gst.URIType ret = (Gst.URIType) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public bool SetUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static AudioCdSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("tags" + , Gst.Base.PushSrc.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // tags + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "tags" + , "_gst_reserved1" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved1" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) * 2 // _gst_reserved1 + , "priv" + , "_gst_reserved2" + , (long) Marshal.OffsetOf(typeof(GstAudioCdSrc__gst_reserved1Align), "_gst_reserved1") + , 0 + ), + new GLib.AbiField("_gst_reserved2" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved2 + , "_gst_reserved1" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioCdSrc__gst_reserved1Align + { + sbyte f1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + private uint[] _gst_reserved1; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioCdSrcMode.cs b/sources/generated/Gst.Audio/AudioCdSrcMode.cs new file mode 100644 index 0000000000..64988117f5 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioCdSrcMode.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioCdSrcModeGType))] + public enum AudioCdSrcMode { + + Normal = 0, + Continuous = 1, + } + + internal class AudioCdSrcModeGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_cd_src_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_cd_src_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioCdSrcTrack.cs b/sources/generated/Gst.Audio/AudioCdSrcTrack.cs new file mode 100644 index 0000000000..8537cfcaa5 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioCdSrcTrack.cs @@ -0,0 +1,61 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioCdSrcTrack : IEquatable { + + public bool IsAudio; + public uint Num; + public uint Start; + public uint End; + private IntPtr _tags; + public Gst.TagList Tags { + get { + return _tags == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (_tags, typeof (Gst.TagList), false); + } + set { + _tags = value == null ? IntPtr.Zero : value.Handle; + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + private uint[] _gstGstReserved1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + private IntPtr[] _gstGstReserved2; + + public static Gst.Audio.AudioCdSrcTrack Zero = new Gst.Audio.AudioCdSrcTrack (); + + public static Gst.Audio.AudioCdSrcTrack New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioCdSrcTrack.Zero; + return (Gst.Audio.AudioCdSrcTrack) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioCdSrcTrack)); + } + + public bool Equals (AudioCdSrcTrack other) + { + return true && IsAudio.Equals (other.IsAudio) && Num.Equals (other.Num) && Start.Equals (other.Start) && End.Equals (other.End) && Tags.Equals (other.Tags); + } + + public override bool Equals (object other) + { + return other is AudioCdSrcTrack && Equals ((AudioCdSrcTrack) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ IsAudio.GetHashCode () ^ Num.GetHashCode () ^ Start.GetHashCode () ^ End.GetHashCode () ^ Tags.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioChannelMixer.cs b/sources/generated/Gst.Audio/AudioChannelMixer.cs new file mode 100644 index 0000000000..29f0256ac9 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioChannelMixer.cs @@ -0,0 +1,70 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioChannelMixer : GLib.Opaque { + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_channel_mixer_is_passthrough(IntPtr raw); + + public bool IsPassthrough { + get { + bool raw_ret = gst_audio_channel_mixer_is_passthrough(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_channel_mixer_samples(IntPtr raw, IntPtr in_param, IntPtr out_param, int samples); + + public void Samples(IntPtr in_param, IntPtr out_param, int samples) { + gst_audio_channel_mixer_samples(Handle, in_param, out_param, samples); + } + + public void Samples(int samples) { + Samples (IntPtr.Zero, IntPtr.Zero, samples); + } + + public AudioChannelMixer(IntPtr raw) : base(raw) {} + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_channel_mixer_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_audio_channel_mixer_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_audio_channel_mixer_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioChannelMixerFlags.cs b/sources/generated/Gst.Audio/AudioChannelMixerFlags.cs new file mode 100644 index 0000000000..335d784683 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioChannelMixerFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioChannelMixerFlagsGType))] + public enum AudioChannelMixerFlags : uint { + + None = 0, + NonInterleavedIn = 1, + NonInterleavedOut = 2, + UnpositionedIn = 4, + UnpositionedOut = 8, + } + + internal class AudioChannelMixerFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_channel_mixer_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_channel_mixer_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioChannelPosition.cs b/sources/generated/Gst.Audio/AudioChannelPosition.cs new file mode 100644 index 0000000000..8eb793d2a5 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioChannelPosition.cs @@ -0,0 +1,57 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioChannelPositionGType))] + public enum AudioChannelPosition { + + None = -3, + Mono = -2, + Invalid = -1, + FrontLeft = 0, + FrontRight = 1, + FrontCenter = 2, + Lfe1 = 3, + RearLeft = 4, + RearRight = 5, + FrontLeftOfCenter = 6, + FrontRightOfCenter = 7, + RearCenter = 8, + Lfe2 = 9, + SideLeft = 10, + SideRight = 11, + TopFrontLeft = 12, + TopFrontRight = 13, + TopFrontCenter = 14, + TopCenter = 15, + TopRearLeft = 16, + TopRearRight = 17, + TopSideLeft = 18, + TopSideRight = 19, + TopRearCenter = 20, + BottomFrontCenter = 21, + BottomFrontLeft = 22, + BottomFrontRight = 23, + WideLeft = 24, + WideRight = 25, + SurroundLeft = 26, + SurroundRight = 27, + } + + internal class AudioChannelPositionGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_channel_position_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_channel_position_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioClippingMeta.cs b/sources/generated/Gst.Audio/AudioClippingMeta.cs new file mode 100644 index 0000000000..c107482c1f --- /dev/null +++ b/sources/generated/Gst.Audio/AudioClippingMeta.cs @@ -0,0 +1,59 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioClippingMeta : IEquatable { + + public Gst.Meta Meta; + public Gst.Format Format; + public ulong Start; + public ulong End; + + public static Gst.Audio.AudioClippingMeta Zero = new Gst.Audio.AudioClippingMeta (); + + public static Gst.Audio.AudioClippingMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioClippingMeta.Zero; + return (Gst.Audio.AudioClippingMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioClippingMeta)); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_clipping_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_audio_clipping_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (AudioClippingMeta other) + { + return true && Meta.Equals (other.Meta) && Format.Equals (other.Format) && Start.Equals (other.Start) && End.Equals (other.End); + } + + public override bool Equals (object other) + { + return other is AudioClippingMeta && Equals ((AudioClippingMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Format.GetHashCode () ^ Start.GetHashCode () ^ End.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioClock.cs b/sources/generated/Gst.Audio/AudioClock.cs new file mode 100644 index 0000000000..d43aeb2772 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioClock.cs @@ -0,0 +1,215 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioClock : Gst.SystemClock { + + public AudioClock (IntPtr raw) : base(raw) {} + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_clock_new(IntPtr name, Gst.AudioSharp.AudioClockGetTimeFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify); + + public AudioClock (string name, Gst.Audio.AudioClockGetTimeFunc func, IntPtr user_data, GLib.DestroyNotify destroy_notify) : base (IntPtr.Zero) + { + if (GetType () != typeof (AudioClock)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Gst.AudioSharp.AudioClockGetTimeFuncWrapper func_wrapper = new Gst.AudioSharp.AudioClockGetTimeFuncWrapper (func); + Raw = gst_audio_clock_new(native_name, func_wrapper.NativeDelegate, user_data, destroy_notify); + GLib.Marshaller.Free (native_name); + } + + public Gst.Audio.AudioClockGetTimeFunc Func { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("func")); + Gst.AudioSharp.AudioClockGetTimeFuncNative del = (Gst.AudioSharp.AudioClockGetTimeFuncNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(Gst.AudioSharp.AudioClockGetTimeFuncNative)); + return Gst.AudioSharp.AudioClockGetTimeFuncWrapper.GetManagedDelegate ((del)); + } + } + } + + public IntPtr UserData { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data")); + return (*raw_ptr); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.SystemClock.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_clock_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_clock_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_clock_adjust(IntPtr raw, ulong time); + + public ulong Adjust(ulong time) { + ulong raw_ret = gst_audio_clock_adjust(Handle, time); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_clock_get_time(IntPtr raw); + + public new ulong Time { + get { + ulong raw_ret = gst_audio_clock_get_time(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_clock_invalidate(IntPtr raw); + + public void Invalidate() { + gst_audio_clock_invalidate(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_clock_reset(IntPtr raw, ulong time); + + public void Reset(ulong time) { + gst_audio_clock_reset(Handle, time); + } + + + static AudioClock () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("func" + , Gst.SystemClock.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // func + , null + , "user_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("user_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data + , "func" + , "destroy_notify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("destroy_notify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // destroy_notify + , "user_data" + , "last_time" + , (long) Marshal.OffsetOf(typeof(GstAudioClock_destroy_notifyAlign), "destroy_notify") + , 0 + ), + new GLib.AbiField("last_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // last_time + , "destroy_notify" + , "time_offset" + , (long) Marshal.OffsetOf(typeof(GstAudioClock_last_timeAlign), "last_time") + , 0 + ), + new GLib.AbiField("time_offset" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // time_offset + , "last_time" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstAudioClock_time_offsetAlign), "time_offset") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "time_offset" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioClock_destroy_notifyAlign + { + sbyte f1; + private GLib.DestroyNotify destroy_notify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioClock_last_timeAlign + { + sbyte f1; + private ulong last_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioClock_time_offsetAlign + { + sbyte f1; + private long time_offset; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioClockGetTimeFunc.cs b/sources/generated/Gst.Audio/AudioClockGetTimeFunc.cs new file mode 100644 index 0000000000..5e73474867 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioClockGetTimeFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + + public delegate ulong AudioClockGetTimeFunc(Gst.Clock clock); + +} diff --git a/sources/generated/Gst.Audio/AudioConverter.cs b/sources/generated/Gst.Audio/AudioConverter.cs new file mode 100644 index 0000000000..01b9b85ae6 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioConverter.cs @@ -0,0 +1,207 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioConverter : IEquatable { + + + public static Gst.Audio.AudioConverter Zero = new Gst.Audio.AudioConverter (); + + public static Gst.Audio.AudioConverter New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioConverter.Zero; + return (Gst.Audio.AudioConverter) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioConverter)); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_new(int flags, IntPtr in_info, IntPtr out_info, IntPtr config); + + public static AudioConverter New(Gst.Audio.AudioConverterFlags flags, Gst.Audio.AudioInfo in_info, Gst.Audio.AudioInfo out_info, Gst.Structure config) + { + config.Owned = false; + AudioConverter result = AudioConverter.New (gst_audio_converter_new((int) flags, in_info == null ? IntPtr.Zero : in_info.Handle, out_info == null ? IntPtr.Zero : out_info.Handle, config == null ? IntPtr.Zero : config.Handle)); + return result; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_converter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_get_config(IntPtr raw, out int in_rate, out int out_rate); + + public Gst.Structure GetConfig(out int in_rate, out int out_rate) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_audio_converter_get_config(this_as_native, out in_rate, out out_rate); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_converter_get_in_frames(IntPtr raw, UIntPtr out_frames); + + public ulong GetInFrames(ulong out_frames) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_in_frames(this_as_native, new UIntPtr (out_frames)); + ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_converter_get_max_latency(IntPtr raw); + + public ulong MaxLatency { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_max_latency(this_as_native); + ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_converter_get_out_frames(IntPtr raw, UIntPtr in_frames); + + public ulong GetOutFrames(ulong in_frames) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_out_frames(this_as_native, new UIntPtr (in_frames)); + ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_converter_is_passthrough(IntPtr raw); + + public bool IsPassthrough { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_converter_is_passthrough(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_converter_reset(IntPtr raw); + + public void Reset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_converter_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_converter_samples(IntPtr raw, int flags, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames); + + public bool Samples(Gst.Audio.AudioConverterFlags flags, IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_converter_samples(this_as_native, (int) flags, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames)); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + public bool Samples(Gst.Audio.AudioConverterFlags flags, ulong in_frames, ulong out_frames) { + return Samples (flags, IntPtr.Zero, in_frames, IntPtr.Zero, out_frames); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_converter_supports_inplace(IntPtr raw); + + public bool SupportsInplace() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_converter_supports_inplace(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_converter_update_config(IntPtr raw, int in_rate, int out_rate, IntPtr config); + + public bool UpdateConfig(int in_rate, int out_rate, Gst.Structure config) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + config.Owned = false; + bool raw_ret = gst_audio_converter_update_config(this_as_native, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + public bool UpdateConfig(int in_rate, int out_rate) { + return UpdateConfig (in_rate, out_rate, null); + } + + static void ReadNative (IntPtr native, ref Gst.Audio.AudioConverter target) + { + target = New (native); + } + + public bool Equals (AudioConverter other) + { + return true; + } + + public override bool Equals (object other) + { + return other is AudioConverter && Equals ((AudioConverter) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Audio.AudioConverter boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Audio.AudioConverter.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Audio.AudioConverter (GLib.Value val) + { + return (Gst.Audio.AudioConverter) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioConverterFlags.cs b/sources/generated/Gst.Audio/AudioConverterFlags.cs new file mode 100644 index 0000000000..0d44cc57e1 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioConverterFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioConverterFlagsGType))] + public enum AudioConverterFlags : uint { + + None = 0, + InWritable = 1, + VariableRate = 2, + } + + internal class AudioConverterFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_converter_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioDecoder.cs b/sources/generated/Gst.Audio/AudioDecoder.cs new file mode 100644 index 0000000000..ba5492d722 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioDecoder.cs @@ -0,0 +1,1689 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioDecoder : Gst.Element { + + protected AudioDecoder (IntPtr raw) : base(raw) {} + + protected AudioDecoder() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_get_max_errors(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_max_errors(IntPtr raw, int num); + + [GLib.Property ("max-errors")] + public int MaxErrors { + get { + int raw_ret = gst_audio_decoder_get_max_errors(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_max_errors(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_decoder_get_min_latency(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_min_latency(IntPtr raw, ulong num); + + [GLib.Property ("min-latency")] + public ulong MinLatency { + get { + ulong raw_ret = gst_audio_decoder_get_min_latency(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_min_latency(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_get_plc(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_plc(IntPtr raw, bool enabled); + + [GLib.Property ("plc")] + public bool Plc { + get { + bool raw_ret = gst_audio_decoder_get_plc(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_plc(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_decoder_get_tolerance(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_tolerance(IntPtr raw, ulong tolerance); + + [GLib.Property ("tolerance")] + public ulong Tolerance { + get { + ulong raw_ret = gst_audio_decoder_get_tolerance(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_tolerance(Handle, value); + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public GLib.RecMutex StreamLock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_lock")); + return new GLib.RecMutex((*raw_ptr)); + } + } + } + + public Gst.Segment InputSegment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("input_segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + public Gst.Segment OutputSegment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("output_segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SetFormatNativeDelegate SetFormat_cb_delegate; + static SetFormatNativeDelegate SetFormatVMCallback { + get { + if (SetFormat_cb_delegate == null) + SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb); + return SetFormat_cb_delegate; + } + } + + static void OverrideSetFormat (GLib.GType gtype) + { + OverrideSetFormat (gtype, SetFormatVMCallback); + } + + static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetFormat_cb (IntPtr inst, IntPtr caps) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnSetFormat (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSetFormat")] + protected virtual bool OnSetFormat (Gst.Caps caps) + { + return InternalSetFormat (caps); + } + + private bool InternalSetFormat (Gst.Caps caps) + { + SetFormatNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + unmanaged = (SetFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetFormatNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static ParseNativeDelegate Parse_cb_delegate; + static ParseNativeDelegate ParseVMCallback { + get { + if (Parse_cb_delegate == null) + Parse_cb_delegate = new ParseNativeDelegate (Parse_cb); + return Parse_cb_delegate; + } + } + + static void OverrideParse (GLib.GType gtype) + { + OverrideParse (gtype, ParseVMCallback); + } + + static void OverrideParse (GLib.GType gtype, ParseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ParseNativeDelegate (IntPtr inst, IntPtr adapter, int offset, int length); + + static int Parse_cb (IntPtr inst, IntPtr adapter, int offset, int length) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + Gst.FlowReturn __result; + __result = __obj.OnParse (GLib.Object.GetObject(adapter) as Gst.Base.Adapter, offset, length); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideParse")] + protected virtual Gst.FlowReturn OnParse (Gst.Base.Adapter adapter, int offset, int length) + { + return InternalParse (adapter, offset, length); + } + + private Gst.FlowReturn InternalParse (Gst.Base.Adapter adapter, int offset, int length) + { + ParseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("parse")); + unmanaged = (ParseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ParseNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, adapter == null ? IntPtr.Zero : adapter.Handle, offset, length); + return (Gst.FlowReturn) __result; + } + + static HandleFrameNativeDelegate HandleFrame_cb_delegate; + static HandleFrameNativeDelegate HandleFrameVMCallback { + get { + if (HandleFrame_cb_delegate == null) + HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb); + return HandleFrame_cb_delegate; + } + } + + static void OverrideHandleFrame (GLib.GType gtype) + { + OverrideHandleFrame (gtype, HandleFrameVMCallback); + } + + static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr buffer); + + static int HandleFrame_cb (IntPtr inst, IntPtr buffer) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + Gst.FlowReturn __result; + __result = __obj.OnHandleFrame (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideHandleFrame")] + protected virtual Gst.FlowReturn OnHandleFrame (Gst.Buffer buffer) + { + return InternalHandleFrame (buffer); + } + + private Gst.FlowReturn InternalHandleFrame (Gst.Buffer buffer) + { + HandleFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FlushNativeDelegate (IntPtr inst, bool hard); + + static void Flush_cb (IntPtr inst, bool hard) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + __obj.OnFlush (hard); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideFlush")] + protected virtual void OnFlush (bool hard) + { + InternalFlush (hard); + } + + private void InternalFlush (bool hard) + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, hard); + } + + static PrePushNativeDelegate PrePush_cb_delegate; + static PrePushNativeDelegate PrePushVMCallback { + get { + if (PrePush_cb_delegate == null) + PrePush_cb_delegate = new PrePushNativeDelegate (PrePush_cb); + return PrePush_cb_delegate; + } + } + + static void OverridePrePush (GLib.GType gtype) + { + OverridePrePush (gtype, PrePushVMCallback); + } + + static void OverridePrePush (GLib.GType gtype, PrePushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrePushNativeDelegate (IntPtr inst, IntPtr buffer); + + static int PrePush_cb (IntPtr inst, IntPtr buffer) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + Gst.FlowReturn __result; + __result = __obj.OnPrePush (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverridePrePush")] + protected virtual Gst.FlowReturn OnPrePush (Gst.Buffer buffer) + { + return InternalPrePush (buffer); + } + + private Gst.FlowReturn InternalPrePush (Gst.Buffer buffer) + { + PrePushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + unmanaged = (PrePushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrePushNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr query) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query query) + { + return InternalProposeAllocation (query); + } + + private bool InternalProposeAllocation (Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr query) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Query query) + { + return InternalSinkQuery (query); + } + + private bool InternalSinkQuery (Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static GetcapsNativeDelegate Getcaps_cb_delegate; + static GetcapsNativeDelegate GetcapsVMCallback { + get { + if (Getcaps_cb_delegate == null) + Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb); + return Getcaps_cb_delegate; + } + } + + static void OverrideGetcaps (GLib.GType gtype) + { + OverrideGetcaps (gtype, GetcapsVMCallback); + } + + static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + Gst.Caps __result; + __result = __obj.OnGetcaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideGetcaps")] + protected virtual Gst.Caps OnGetcaps (Gst.Caps filter) + { + return InternalGetcaps (filter); + } + + private Gst.Caps InternalGetcaps (Gst.Caps filter) + { + GetcapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static TransformMetaNativeDelegate TransformMeta_cb_delegate; + static TransformMetaNativeDelegate TransformMetaVMCallback { + get { + if (TransformMeta_cb_delegate == null) + TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); + return TransformMeta_cb_delegate; + } + } + + static void OverrideTransformMeta (GLib.GType gtype) + { + OverrideTransformMeta (gtype, TransformMetaVMCallback); + } + + static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf); + + static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf) + { + try { + AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder; + bool __result; + __result = __obj.OnTransformMeta (outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false), Gst.Meta.New (meta), inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideTransformMeta")] + protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + return InternalTransformMeta (outbuf, meta, inbuf); + } + + private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + TransformMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle, native_meta, inbuf == null ? IntPtr.Zero : inbuf.Handle); + Marshal.FreeHGlobal (native_meta); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("start" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , null + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "set_format" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_format" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format + , "stop" + , "parse" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("parse" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parse + , "set_format" + , "handle_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame + , "parse" + , "flush" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , "handle_frame" + , "pre_push" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pre_push" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push + , "flush" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "pre_push" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "open" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("open" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , "src_event" + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "open" + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "close" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "negotiate" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "decide_allocation" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "propose_allocation" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "sink_query" + , "getcaps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getcaps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps + , "src_query" + , "transform_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta + , "getcaps" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 16 // _gst_reserved + , "transform_meta" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_decoder_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_decoder_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_decoder_allocate_output_buffer(IntPtr raw, UIntPtr size); + + public Gst.Buffer AllocateOutputBuffer(ulong size) { + IntPtr raw_ret = gst_audio_decoder_allocate_output_buffer(Handle, new UIntPtr (size)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_finish_frame(IntPtr raw, IntPtr buf, int frames); + + public Gst.FlowReturn FinishFrame(Gst.Buffer buf, int frames) { + buf.Owned = false; + int raw_ret = gst_audio_decoder_finish_frame(Handle, buf == null ? IntPtr.Zero : buf.Handle, frames); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + public Gst.FlowReturn FinishFrame(int frames) { + return FinishFrame (null, frames); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_finish_subframe(IntPtr raw, IntPtr buf); + + public Gst.FlowReturn FinishSubframe(Gst.Buffer buf) { + buf.Owned = false; + int raw_ret = gst_audio_decoder_finish_subframe(Handle, buf == null ? IntPtr.Zero : buf.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + public Gst.FlowReturn FinishSubframe() { + return FinishSubframe (null); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_audio_decoder_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_decoder_get_audio_info(IntPtr raw); + + public Gst.Audio.AudioInfo AudioInfo { + get { + IntPtr raw_ret = gst_audio_decoder_get_audio_info(Handle); + Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_get_delay(IntPtr raw); + + public int Delay { + get { + int raw_ret = gst_audio_decoder_get_delay(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_get_drainable(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_drainable(IntPtr raw, bool enabled); + + public bool Drainable { + get { + bool raw_ret = gst_audio_decoder_get_drainable(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_drainable(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_get_estimate_rate(IntPtr raw); + + public int EstimateRate { + get { + int raw_ret = gst_audio_decoder_get_estimate_rate(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_get_latency(IntPtr raw, out ulong min, out ulong max); + + public void GetLatency(out ulong min, out ulong max) { + gst_audio_decoder_get_latency(Handle, out min, out max); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_get_needs_format(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_needs_format(IntPtr raw, bool enabled); + + public bool NeedsFormat { + get { + bool raw_ret = gst_audio_decoder_get_needs_format(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_decoder_set_needs_format(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_get_parse_state(IntPtr raw, out bool sync, out bool eos); + + public void GetParseState(out bool sync, out bool eos) { + gst_audio_decoder_get_parse_state(Handle, out sync, out eos); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_decoder_get_plc_aware(IntPtr raw); + + public int PlcAware { + get { + int raw_ret = gst_audio_decoder_get_plc_aware(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + gst_audio_decoder_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_audio_decoder_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_decoder_proxy_getcaps(IntPtr raw, IntPtr caps, IntPtr filter); + + public Gst.Caps ProxyGetcaps(Gst.Caps caps, Gst.Caps filter) { + IntPtr raw_ret = gst_audio_decoder_proxy_getcaps(Handle, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps ProxyGetcaps() { + return ProxyGetcaps (null, null); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_allocation_caps(IntPtr raw, IntPtr allocation_caps); + + public Gst.Caps AllocationCaps { + set { + gst_audio_decoder_set_allocation_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_estimate_rate(IntPtr raw, bool enabled); + + public void SetEstimateRate(bool enabled) { + gst_audio_decoder_set_estimate_rate(Handle, enabled); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_latency(IntPtr raw, ulong min, ulong max); + + public void SetLatency(ulong min, ulong max) { + gst_audio_decoder_set_latency(Handle, min, max); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_set_output_caps(IntPtr raw, IntPtr caps); + + public bool SetOutputCaps(Gst.Caps caps) { + bool raw_ret = gst_audio_decoder_set_output_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_decoder_set_output_format(IntPtr raw, IntPtr info); + + public bool SetOutputFormat(Gst.Audio.AudioInfo info) { + bool raw_ret = gst_audio_decoder_set_output_format(Handle, info == null ? IntPtr.Zero : info.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_plc_aware(IntPtr raw, bool plc); + + public void SetPlcAware(bool plc) { + gst_audio_decoder_set_plc_aware(Handle, plc); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_decoder_set_use_default_pad_acceptcaps(IntPtr raw, bool use); + + public bool UseDefaultPadAcceptcaps { + set { + gst_audio_decoder_set_use_default_pad_acceptcaps(Handle, value); + } + } + + + static AudioDecoder () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "stream_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock + , "srcpad" + , "input_segment" + , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_stream_lockAlign), "stream_lock") + , 0 + ), + new GLib.AbiField("input_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment + , "stream_lock" + , "output_segment" + , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_input_segmentAlign), "input_segment") + , 0 + ), + new GLib.AbiField("output_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment + , "input_segment" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_output_segmentAlign), "output_segment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "output_segment" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioDecoder_stream_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioDecoder_input_segmentAlign + { + sbyte f1; + private Gst.Segment input_segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioDecoder_output_segmentAlign + { + sbyte f1; + private Gst.Segment output_segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioDitherMethod.cs b/sources/generated/Gst.Audio/AudioDitherMethod.cs new file mode 100644 index 0000000000..96f89f58ea --- /dev/null +++ b/sources/generated/Gst.Audio/AudioDitherMethod.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioDitherMethodGType))] + public enum AudioDitherMethod { + + None = 0, + Rpdf = 1, + Tpdf = 2, + TpdfHf = 3, + } + + internal class AudioDitherMethodGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_dither_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_dither_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioDownmixMeta.cs b/sources/generated/Gst.Audio/AudioDownmixMeta.cs new file mode 100644 index 0000000000..bc577a3039 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioDownmixMeta.cs @@ -0,0 +1,61 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioDownmixMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _from_position; + private IntPtr _to_position; + public int FromChannels; + public int ToChannels; + public float Matrix; + + public static Gst.Audio.AudioDownmixMeta Zero = new Gst.Audio.AudioDownmixMeta (); + + public static Gst.Audio.AudioDownmixMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioDownmixMeta.Zero; + return (Gst.Audio.AudioDownmixMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioDownmixMeta)); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_downmix_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_audio_downmix_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (AudioDownmixMeta other) + { + return true && Meta.Equals (other.Meta) && _from_position.Equals (other._from_position) && _to_position.Equals (other._to_position) && FromChannels.Equals (other.FromChannels) && ToChannels.Equals (other.ToChannels) && Matrix.Equals (other.Matrix); + } + + public override bool Equals (object other) + { + return other is AudioDownmixMeta && Equals ((AudioDownmixMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ _from_position.GetHashCode () ^ _to_position.GetHashCode () ^ FromChannels.GetHashCode () ^ ToChannels.GetHashCode () ^ Matrix.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioEncoder.cs b/sources/generated/Gst.Audio/AudioEncoder.cs new file mode 100644 index 0000000000..50bcea0e7a --- /dev/null +++ b/sources/generated/Gst.Audio/AudioEncoder.cs @@ -0,0 +1,1727 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioEncoder : Gst.Element, Gst.IPreset { + + protected AudioEncoder (IntPtr raw) : base(raw) {} + + protected AudioEncoder() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_get_hard_resync(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_hard_resync(IntPtr raw, bool enabled); + + [GLib.Property ("hard-resync")] + public bool HardResync { + get { + bool raw_ret = gst_audio_encoder_get_hard_resync(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_hard_resync(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_get_mark_granule(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_mark_granule(IntPtr raw, bool enabled); + + [GLib.Property ("mark-granule")] + public bool MarkGranule { + get { + bool raw_ret = gst_audio_encoder_get_mark_granule(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_mark_granule(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_get_perfect_timestamp(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_perfect_timestamp(IntPtr raw, bool enabled); + + [GLib.Property ("perfect-timestamp")] + public bool PerfectTimestamp { + get { + bool raw_ret = gst_audio_encoder_get_perfect_timestamp(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_perfect_timestamp(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_encoder_get_tolerance(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_tolerance(IntPtr raw, ulong tolerance); + + [GLib.Property ("tolerance")] + public ulong Tolerance { + get { + ulong raw_ret = gst_audio_encoder_get_tolerance(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_tolerance(Handle, value); + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public GLib.RecMutex StreamLock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_lock")); + return new GLib.RecMutex((*raw_ptr)); + } + } + } + + public Gst.Segment InputSegment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("input_segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + public Gst.Segment OutputSegment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("output_segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SetFormatNativeDelegate SetFormat_cb_delegate; + static SetFormatNativeDelegate SetFormatVMCallback { + get { + if (SetFormat_cb_delegate == null) + SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb); + return SetFormat_cb_delegate; + } + } + + static void OverrideSetFormat (GLib.GType gtype) + { + OverrideSetFormat (gtype, SetFormatVMCallback); + } + + static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr info); + + static bool SetFormat_cb (IntPtr inst, IntPtr info) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnSetFormat (info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (info, typeof (Gst.Audio.AudioInfo), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideSetFormat")] + protected virtual bool OnSetFormat (Gst.Audio.AudioInfo info) + { + return InternalSetFormat (info); + } + + private bool InternalSetFormat (Gst.Audio.AudioInfo info) + { + SetFormatNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + unmanaged = (SetFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetFormatNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle); + return __result; + } + + static HandleFrameNativeDelegate HandleFrame_cb_delegate; + static HandleFrameNativeDelegate HandleFrameVMCallback { + get { + if (HandleFrame_cb_delegate == null) + HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb); + return HandleFrame_cb_delegate; + } + } + + static void OverrideHandleFrame (GLib.GType gtype) + { + OverrideHandleFrame (gtype, HandleFrameVMCallback); + } + + static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr buffer); + + static int HandleFrame_cb (IntPtr inst, IntPtr buffer) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + Gst.FlowReturn __result; + __result = __obj.OnHandleFrame (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideHandleFrame")] + protected virtual Gst.FlowReturn OnHandleFrame (Gst.Buffer buffer) + { + return InternalHandleFrame (buffer); + } + + private Gst.FlowReturn InternalHandleFrame (Gst.Buffer buffer) + { + HandleFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FlushNativeDelegate (IntPtr inst); + + static void Flush_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + __obj.OnFlush (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideFlush")] + protected virtual void OnFlush () + { + InternalFlush (); + } + + private void InternalFlush () + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static PrePushNativeDelegate PrePush_cb_delegate; + static PrePushNativeDelegate PrePushVMCallback { + get { + if (PrePush_cb_delegate == null) + PrePush_cb_delegate = new PrePushNativeDelegate (PrePush_cb); + return PrePush_cb_delegate; + } + } + + static void OverridePrePush (GLib.GType gtype) + { + OverridePrePush (gtype, PrePushVMCallback); + } + + static void OverridePrePush (GLib.GType gtype, PrePushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrePushNativeDelegate (IntPtr inst, IntPtr buffer); + + static int PrePush_cb (IntPtr inst, IntPtr buffer) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + Gst.FlowReturn __result; + __result = __obj.OnPrePush (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverridePrePush")] + protected virtual Gst.FlowReturn OnPrePush (Gst.Buffer buffer) + { + return InternalPrePush (buffer); + } + + private Gst.FlowReturn InternalPrePush (Gst.Buffer buffer) + { + PrePushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + unmanaged = (PrePushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrePushNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static GetcapsNativeDelegate Getcaps_cb_delegate; + static GetcapsNativeDelegate GetcapsVMCallback { + get { + if (Getcaps_cb_delegate == null) + Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb); + return Getcaps_cb_delegate; + } + } + + static void OverrideGetcaps (GLib.GType gtype) + { + OverrideGetcaps (gtype, GetcapsVMCallback); + } + + static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + Gst.Caps __result; + __result = __obj.OnGetcaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideGetcaps")] + protected virtual Gst.Caps OnGetcaps (Gst.Caps filter) + { + return InternalGetcaps (filter); + } + + private Gst.Caps InternalGetcaps (Gst.Caps filter) + { + GetcapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr query) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query query) + { + return InternalProposeAllocation (query); + } + + private bool InternalProposeAllocation (Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static TransformMetaNativeDelegate TransformMeta_cb_delegate; + static TransformMetaNativeDelegate TransformMetaVMCallback { + get { + if (TransformMeta_cb_delegate == null) + TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); + return TransformMeta_cb_delegate; + } + } + + static void OverrideTransformMeta (GLib.GType gtype) + { + OverrideTransformMeta (gtype, TransformMetaVMCallback); + } + + static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf); + + static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnTransformMeta (outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false), Gst.Meta.New (meta), inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideTransformMeta")] + protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + return InternalTransformMeta (outbuf, meta, inbuf); + } + + private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + TransformMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle, native_meta, inbuf == null ? IntPtr.Zero : inbuf.Handle); + Marshal.FreeHGlobal (native_meta); + return __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr query) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Query query) + { + return InternalSinkQuery (query); + } + + private bool InternalSinkQuery (Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + AudioEncoder __obj = GLib.Object.GetObject (inst, false) as AudioEncoder; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioEncoder), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("start" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , null + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "set_format" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_format" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format + , "stop" + , "handle_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame + , "set_format" + , "flush" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , "handle_frame" + , "pre_push" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pre_push" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push + , "flush" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "pre_push" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "getcaps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getcaps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps + , "src_event" + , "open" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("open" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , "getcaps" + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "open" + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "close" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "negotiate" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "decide_allocation" + , "transform_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta + , "propose_allocation" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "transform_meta" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "sink_query" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 17 // _gst_reserved + , "src_query" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_encoder_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_encoder_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_encoder_allocate_output_buffer(IntPtr raw, UIntPtr size); + + public Gst.Buffer AllocateOutputBuffer(ulong size) { + IntPtr raw_ret = gst_audio_encoder_allocate_output_buffer(Handle, new UIntPtr (size)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_encoder_finish_frame(IntPtr raw, IntPtr buffer, int samples); + + public Gst.FlowReturn FinishFrame(Gst.Buffer buffer, int samples) { + buffer.Owned = false; + int raw_ret = gst_audio_encoder_finish_frame(Handle, buffer == null ? IntPtr.Zero : buffer.Handle, samples); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + public Gst.FlowReturn FinishFrame(int samples) { + return FinishFrame (null, samples); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_audio_encoder_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_encoder_get_audio_info(IntPtr raw); + + public Gst.Audio.AudioInfo AudioInfo { + get { + IntPtr raw_ret = gst_audio_encoder_get_audio_info(Handle); + Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_get_drainable(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_drainable(IntPtr raw, bool enabled); + + public bool Drainable { + get { + bool raw_ret = gst_audio_encoder_get_drainable(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_drainable(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_encoder_get_frame_max(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_frame_max(IntPtr raw, int num); + + public int FrameMax { + get { + int raw_ret = gst_audio_encoder_get_frame_max(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_frame_max(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_encoder_get_frame_samples_max(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_frame_samples_max(IntPtr raw, int num); + + public int FrameSamplesMax { + get { + int raw_ret = gst_audio_encoder_get_frame_samples_max(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_frame_samples_max(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_encoder_get_frame_samples_min(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_frame_samples_min(IntPtr raw, int num); + + public int FrameSamplesMin { + get { + int raw_ret = gst_audio_encoder_get_frame_samples_min(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_frame_samples_min(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_get_hard_min(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_hard_min(IntPtr raw, bool enabled); + + public bool HardMin { + get { + bool raw_ret = gst_audio_encoder_get_hard_min(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_hard_min(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_get_latency(IntPtr raw, out ulong min, out ulong max); + + public void GetLatency(out ulong min, out ulong max) { + gst_audio_encoder_get_latency(Handle, out min, out max); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_encoder_get_lookahead(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_lookahead(IntPtr raw, int num); + + public int Lookahead { + get { + int raw_ret = gst_audio_encoder_get_lookahead(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_audio_encoder_set_lookahead(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + gst_audio_encoder_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_audio_encoder_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_encoder_proxy_getcaps(IntPtr raw, IntPtr caps, IntPtr filter); + + public Gst.Caps ProxyGetcaps(Gst.Caps caps, Gst.Caps filter) { + IntPtr raw_ret = gst_audio_encoder_proxy_getcaps(Handle, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps ProxyGetcaps() { + return ProxyGetcaps (null, null); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_allocation_caps(IntPtr raw, IntPtr allocation_caps); + + public Gst.Caps AllocationCaps { + set { + gst_audio_encoder_set_allocation_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_headers(IntPtr raw, IntPtr headers); + + public GLib.List Headers { + set { + gst_audio_encoder_set_headers(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_encoder_set_latency(IntPtr raw, ulong min, ulong max); + + public void SetLatency(ulong min, ulong max) { + gst_audio_encoder_set_latency(Handle, min, max); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_encoder_set_output_format(IntPtr raw, IntPtr caps); + + public bool SetOutputFormat(Gst.Caps caps) { + bool raw_ret = gst_audio_encoder_set_output_format(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_delete_preset(IntPtr raw, IntPtr name); + + public bool DeletePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_delete_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_get_meta(IntPtr raw, IntPtr name, IntPtr tag, out IntPtr value); + + public bool GetMeta(string name, string tag, out string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_preset_get_meta(Handle, native_name, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_preset_names(IntPtr raw); + + public string[] PresetNames { + get { + IntPtr raw_ret = gst_preset_get_preset_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_property_names(IntPtr raw); + + public string[] PropertyNames { + get { + IntPtr raw_ret = gst_preset_get_property_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_is_editable(IntPtr raw); + + public bool IsEditable { + get { + bool raw_ret = gst_preset_is_editable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_load_preset(IntPtr raw, IntPtr name); + + public bool LoadPreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_load_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_rename_preset(IntPtr raw, IntPtr old_name, IntPtr new_name); + + public bool RenamePreset(string old_name, string new_name) { + IntPtr native_old_name = GLib.Marshaller.StringToPtrGStrdup (old_name); + IntPtr native_new_name = GLib.Marshaller.StringToPtrGStrdup (new_name); + bool raw_ret = gst_preset_rename_preset(Handle, native_old_name, native_new_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_old_name); + GLib.Marshaller.Free (native_new_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_save_preset(IntPtr raw, IntPtr name); + + public bool SavePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_save_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_set_meta(IntPtr raw, IntPtr name, IntPtr tag, IntPtr value); + + public bool SetMeta(string name, string tag, string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = gst_preset_set_meta(Handle, native_name, native_tag, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + GLib.Marshaller.Free (native_value); + return ret; + } + + public bool SetMeta(string name, string tag) { + return SetMeta (name, tag, null); + } + + + static AudioEncoder () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "stream_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock + , "srcpad" + , "input_segment" + , (long) Marshal.OffsetOf(typeof(GstAudioEncoder_stream_lockAlign), "stream_lock") + , 0 + ), + new GLib.AbiField("input_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment + , "stream_lock" + , "output_segment" + , (long) Marshal.OffsetOf(typeof(GstAudioEncoder_input_segmentAlign), "input_segment") + , 0 + ), + new GLib.AbiField("output_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment + , "input_segment" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstAudioEncoder_output_segmentAlign), "output_segment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "output_segment" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioEncoder_stream_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioEncoder_input_segmentAlign + { + sbyte f1; + private Gst.Segment input_segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioEncoder_output_segmentAlign + { + sbyte f1; + private Gst.Segment output_segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioFilter.cs b/sources/generated/Gst.Audio/AudioFilter.cs new file mode 100644 index 0000000000..b8ececc143 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFilter.cs @@ -0,0 +1,177 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioFilter : Gst.Base.BaseTransform { + + protected AudioFilter (IntPtr raw) : base(raw) {} + + protected AudioFilter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public Gst.Audio.AudioInfo Info { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false); + } + } + } + + static SetupNativeDelegate Setup_cb_delegate; + static SetupNativeDelegate SetupVMCallback { + get { + if (Setup_cb_delegate == null) + Setup_cb_delegate = new SetupNativeDelegate (Setup_cb); + return Setup_cb_delegate; + } + } + + static void OverrideSetup (GLib.GType gtype) + { + OverrideSetup (gtype, SetupVMCallback); + } + + static void OverrideSetup (GLib.GType gtype, SetupNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("setup")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetupNativeDelegate (IntPtr inst, IntPtr info); + + static bool Setup_cb (IntPtr inst, IntPtr info) + { + try { + AudioFilter __obj = GLib.Object.GetObject (inst, false) as AudioFilter; + bool __result; + __result = __obj.OnSetup (info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (info, typeof (Gst.Audio.AudioInfo), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioFilter), ConnectionMethod="OverrideSetup")] + protected virtual bool OnSetup (Gst.Audio.AudioInfo info) + { + return InternalSetup (info); + } + + private bool InternalSetup (Gst.Audio.AudioInfo info) + { + SetupNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("setup")); + unmanaged = (SetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetupNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("setup" + , Gst.Base.BaseTransform.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // setup + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "setup" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_filter_class_add_pad_templates(IntPtr allowed_caps); + + public static void AddAudioPadTemplate(Gst.Caps allowed_caps) { + gst_audio_filter_class_add_pad_templates(allowed_caps == null ? IntPtr.Zero : allowed_caps.Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_filter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_filter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioFilter () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("info" + , Gst.Base.BaseTransform.abi_info.Fields + , Gst.Audio.AudioInfo.abi_info.Size // info + , null + , "_gst_reserved" + , Gst.Audio.AudioInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "info" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioFlags.cs b/sources/generated/Gst.Audio/AudioFlags.cs new file mode 100644 index 0000000000..8173d87ea1 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioFlagsGType))] + public enum AudioFlags : uint { + + None = 0, + Unpositioned = 1, + } + + internal class AudioFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioFormat.cs b/sources/generated/Gst.Audio/AudioFormat.cs new file mode 100644 index 0000000000..763e1e6570 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFormat.cs @@ -0,0 +1,72 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioFormatGType))] + public enum AudioFormat { + + Unknown = 0, + Encoded = 1, + S8 = 2, + U8 = 3, + S16le = 4, + S16 = 4, + S16be = 5, + U16le = 6, + U16 = 6, + U16be = 7, + S2432le = 8, + S2432 = 8, + S2432be = 9, + U2432le = 10, + U2432 = 10, + U2432be = 11, + S32le = 12, + S32 = 12, + S32be = 13, + U32le = 14, + U32 = 14, + U32be = 15, + S24le = 16, + S24 = 16, + S24be = 17, + U24le = 18, + U24 = 18, + U24be = 19, + S20le = 20, + S20 = 20, + S20be = 21, + U20le = 22, + U20 = 22, + U20be = 23, + S18le = 24, + S18 = 24, + S18be = 25, + U18le = 26, + U18 = 26, + U18be = 27, + F32le = 28, + F32 = 28, + F32be = 29, + F64le = 30, + F64 = 30, + F64be = 31, + } + + internal class AudioFormatGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_format_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_format_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioFormatFlags.cs b/sources/generated/Gst.Audio/AudioFormatFlags.cs new file mode 100644 index 0000000000..b997ca9025 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFormatFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioFormatFlagsGType))] + public enum AudioFormatFlags : uint { + + Integer = 1, + Float = 2, + Signed = 4, + Complex = 16, + Unpack = 32, + } + + internal class AudioFormatFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_format_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_format_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioFormatInfo.cs b/sources/generated/Gst.Audio/AudioFormatInfo.cs new file mode 100644 index 0000000000..51e5784aef --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFormatInfo.cs @@ -0,0 +1,68 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioFormatInfo : IEquatable { + + public Gst.Audio.AudioFormat Format; + public string Name; + public string Description; + public Gst.Audio.AudioFormatFlags Flags; + public int Endianness; + public int Width; + public int Depth; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=8)] + public byte[] Silence; + public Gst.Audio.AudioFormat UnpackFormat; + private Gst.AudioSharp.AudioFormatUnpackNative _unpack_func; + public Gst.Audio.AudioFormatUnpack UnpackFunc { + get { + return Gst.AudioSharp.AudioFormatUnpackWrapper.GetManagedDelegate (_unpack_func); + } + } + private Gst.AudioSharp.AudioFormatPackNative _pack_func; + public Gst.Audio.AudioFormatPack PackFunc { + get { + return Gst.AudioSharp.AudioFormatPackWrapper.GetManagedDelegate (_pack_func); + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Audio.AudioFormatInfo Zero = new Gst.Audio.AudioFormatInfo (); + + public static Gst.Audio.AudioFormatInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioFormatInfo.Zero; + return (Gst.Audio.AudioFormatInfo) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioFormatInfo)); + } + + public bool Equals (AudioFormatInfo other) + { + return true && Format.Equals (other.Format) && Name.Equals (other.Name) && Description.Equals (other.Description) && Flags.Equals (other.Flags) && Endianness.Equals (other.Endianness) && Width.Equals (other.Width) && Depth.Equals (other.Depth) && Silence.Equals (other.Silence) && UnpackFormat.Equals (other.UnpackFormat) && UnpackFunc.Equals (other.UnpackFunc) && PackFunc.Equals (other.PackFunc); + } + + public override bool Equals (object other) + { + return other is AudioFormatInfo && Equals ((AudioFormatInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Format.GetHashCode () ^ Name.GetHashCode () ^ Description.GetHashCode () ^ Flags.GetHashCode () ^ Endianness.GetHashCode () ^ Width.GetHashCode () ^ Depth.GetHashCode () ^ Silence.GetHashCode () ^ UnpackFormat.GetHashCode () ^ UnpackFunc.GetHashCode () ^ PackFunc.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioFormatPack.cs b/sources/generated/Gst.Audio/AudioFormatPack.cs new file mode 100644 index 0000000000..bd45f25eae --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFormatPack.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + + public delegate void AudioFormatPack(Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] src, byte[] data); + +} diff --git a/sources/generated/Gst.Audio/AudioFormatUnpack.cs b/sources/generated/Gst.Audio/AudioFormatUnpack.cs new file mode 100644 index 0000000000..9623e5b03d --- /dev/null +++ b/sources/generated/Gst.Audio/AudioFormatUnpack.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + + public delegate void AudioFormatUnpack(Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] dest, byte[] data); + +} diff --git a/sources/generated/Gst.Audio/AudioInfo.cs b/sources/generated/Gst.Audio/AudioInfo.cs new file mode 100644 index 0000000000..ac929c7687 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioInfo.cs @@ -0,0 +1,331 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioInfo : GLib.Opaque { + + public Gst.Audio.AudioFormatInfo Finfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo")); + return Gst.Audio.AudioFormatInfo.New ((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + public Gst.Audio.AudioFlags Flags { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + return (Gst.Audio.AudioFlags) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + *raw_ptr = (int) value; + } + } + } + + public Gst.Audio.AudioLayout Layout { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout")); + return (Gst.Audio.AudioLayout) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout")); + *raw_ptr = (int) value; + } + } + } + + public int Rate { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate")); + *raw_ptr = value; + } + } + } + + public int Channels { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels")); + *raw_ptr = value; + } + } + } + + public int Bpf { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf")); + *raw_ptr = value; + } + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_info_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_info_convert(IntPtr raw, int src_fmt, long src_val, int dest_fmt, out long dest_val); + + public bool Convert(Gst.Format src_fmt, long src_val, Gst.Format dest_fmt, out long dest_val) { + bool raw_ret = gst_audio_info_convert(Handle, (int) src_fmt, src_val, (int) dest_fmt, out dest_val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_info_copy(IntPtr raw); + + public Gst.Audio.AudioInfo Copy() { + IntPtr raw_ret = gst_audio_info_copy(Handle); + Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_info_from_caps(IntPtr raw, IntPtr caps); + + public bool FromCaps(Gst.Caps caps) { + bool raw_ret = gst_audio_info_from_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_info_init(IntPtr raw); + + public void Init() { + gst_audio_info_init(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_info_is_equal(IntPtr raw, IntPtr other); + + public bool IsEqual(Gst.Audio.AudioInfo other) { + bool raw_ret = gst_audio_info_is_equal(Handle, other == null ? IntPtr.Zero : other.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_info_set_format(IntPtr raw, int format, int rate, int channels, int[] position); + + public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels, Gst.Audio.AudioChannelPosition[] position) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + gst_audio_info_set_format(Handle, (int) format, rate, channels, native_position); + } + + public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) { + SetFormat (format, rate, channels, null); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_info_to_caps(IntPtr raw); + + public Gst.Caps ToCaps() { + IntPtr raw_ret = gst_audio_info_to_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public AudioInfo(IntPtr raw) : base(raw) {} + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_info_new(); + + public AudioInfo () + { + Raw = gst_audio_info_new(); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_info_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_audio_info_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_audio_info_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("finfo" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finfo + , null + , "flags" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flags" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioFlags))) // flags + , "finfo" + , "layout" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_flagsAlign), "flags") + , 0 + ), + new GLib.AbiField("layout" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioLayout))) // layout + , "flags" + , "rate" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_layoutAlign), "layout") + , 0 + ), + new GLib.AbiField("rate" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // rate + , "layout" + , "channels" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_rateAlign), "rate") + , 0 + ), + new GLib.AbiField("channels" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // channels + , "rate" + , "bpf" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_channelsAlign), "channels") + , 0 + ), + new GLib.AbiField("bpf" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // bpf + , "channels" + , "position" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_bpfAlign), "bpf") + , 0 + ), + new GLib.AbiField("position" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioChannelPosition))) * 64 // position + , "bpf" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstAudioInfo_positionAlign), "position") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "position" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_flagsAlign + { + sbyte f1; + private Gst.Audio.AudioFlags flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_layoutAlign + { + sbyte f1; + private Gst.Audio.AudioLayout layout; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_rateAlign + { + sbyte f1; + private int rate; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_channelsAlign + { + sbyte f1; + private int channels; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_bpfAlign + { + sbyte f1; + private int bpf; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioInfo_positionAlign + { + sbyte f1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=64)] + private Gst.Audio.AudioChannelPosition[] position; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioLayout.cs b/sources/generated/Gst.Audio/AudioLayout.cs new file mode 100644 index 0000000000..94363b9c89 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioLayout.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioLayoutGType))] + public enum AudioLayout { + + Interleaved = 0, + NonInterleaved = 1, + } + + internal class AudioLayoutGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_layout_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_layout_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioMeta.cs b/sources/generated/Gst.Audio/AudioMeta.cs new file mode 100644 index 0000000000..18ff416d31 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioMeta.cs @@ -0,0 +1,74 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _info; + public Gst.Audio.AudioInfo Info { + get { + return _info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Audio.AudioInfo), false); + } + set { + _info = value == null ? IntPtr.Zero : value.Handle; + } + } + private UIntPtr samples; + public ulong Samples { + get { + return (ulong) samples; + } + set { + samples = new UIntPtr (value); + } + } + private UIntPtr offsets; + public ulong Offsets { + get { + return (ulong) offsets; + } + set { + offsets = new UIntPtr (value); + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Audio.AudioMeta Zero = new Gst.Audio.AudioMeta (); + + public static Gst.Audio.AudioMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioMeta.Zero; + return (Gst.Audio.AudioMeta) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioMeta)); + } + + public bool Equals (AudioMeta other) + { + return true && Meta.Equals (other.Meta) && Info.Equals (other.Info) && Samples.Equals (other.Samples) && Offsets.Equals (other.Offsets); + } + + public override bool Equals (object other) + { + return other is AudioMeta && Equals ((AudioMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Info.GetHashCode () ^ Samples.GetHashCode () ^ Offsets.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioNoiseShapingMethod.cs b/sources/generated/Gst.Audio/AudioNoiseShapingMethod.cs new file mode 100644 index 0000000000..250f89919e --- /dev/null +++ b/sources/generated/Gst.Audio/AudioNoiseShapingMethod.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioNoiseShapingMethodGType))] + public enum AudioNoiseShapingMethod { + + None = 0, + ErrorFeedback = 1, + Simple = 2, + Medium = 3, + High = 4, + } + + internal class AudioNoiseShapingMethodGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_noise_shaping_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_noise_shaping_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioPackFlags.cs b/sources/generated/Gst.Audio/AudioPackFlags.cs new file mode 100644 index 0000000000..7ec8beb1b1 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioPackFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioPackFlagsGType))] + public enum AudioPackFlags : uint { + + None = 0, + TruncateRange = 1, + } + + internal class AudioPackFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_pack_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_pack_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioQuantize.cs b/sources/generated/Gst.Audio/AudioQuantize.cs new file mode 100644 index 0000000000..adb9cab120 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioQuantize.cs @@ -0,0 +1,66 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioQuantize : GLib.Opaque { + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_quantize_reset(IntPtr raw); + + public void Reset() { + gst_audio_quantize_reset(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_quantize_samples(IntPtr raw, IntPtr in_param, IntPtr out_param, uint samples); + + public void Samples(IntPtr in_param, IntPtr out_param, uint samples) { + gst_audio_quantize_samples(Handle, in_param, out_param, samples); + } + + public void Samples(uint samples) { + Samples (IntPtr.Zero, IntPtr.Zero, samples); + } + + public AudioQuantize(IntPtr raw) : base(raw) {} + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_quantize_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_audio_quantize_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_audio_quantize_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioQuantizeFlags.cs b/sources/generated/Gst.Audio/AudioQuantizeFlags.cs new file mode 100644 index 0000000000..10622fe81c --- /dev/null +++ b/sources/generated/Gst.Audio/AudioQuantizeFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioQuantizeFlagsGType))] + public enum AudioQuantizeFlags : uint { + + None = 0, + NonInterleaved = 1, + } + + internal class AudioQuantizeFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_quantize_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_quantize_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioResampler.cs b/sources/generated/Gst.Audio/AudioResampler.cs new file mode 100644 index 0000000000..7fb437a91c --- /dev/null +++ b/sources/generated/Gst.Audio/AudioResampler.cs @@ -0,0 +1,120 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioResampler : GLib.Opaque { + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_resampler_get_in_frames(IntPtr raw, UIntPtr out_frames); + + public ulong GetInFrames(ulong out_frames) { + UIntPtr raw_ret = gst_audio_resampler_get_in_frames(Handle, new UIntPtr (out_frames)); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_resampler_get_max_latency(IntPtr raw); + + public ulong MaxLatency { + get { + UIntPtr raw_ret = gst_audio_resampler_get_max_latency(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_audio_resampler_get_out_frames(IntPtr raw, UIntPtr in_frames); + + public ulong GetOutFrames(ulong in_frames) { + UIntPtr raw_ret = gst_audio_resampler_get_out_frames(Handle, new UIntPtr (in_frames)); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_resampler_resample(IntPtr raw, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames); + + public void Resample(IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) { + gst_audio_resampler_resample(Handle, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames)); + } + + public void Resample(ulong in_frames, ulong out_frames) { + Resample (IntPtr.Zero, in_frames, IntPtr.Zero, out_frames); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_resampler_reset(IntPtr raw); + + public void Reset() { + gst_audio_resampler_reset(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_resampler_update(IntPtr raw, int in_rate, int out_rate, IntPtr options); + + public bool Update(int in_rate, int out_rate, Gst.Structure options) { + bool raw_ret = gst_audio_resampler_update(Handle, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_new(int method, int flags, int format, int channels, int in_rate, int out_rate, IntPtr options); + + public static Gst.Audio.AudioResampler New(Gst.Audio.AudioResamplerMethod method, Gst.Audio.AudioResamplerFlags flags, Gst.Audio.AudioFormat format, int channels, int in_rate, int out_rate, Gst.Structure options) { + IntPtr raw_ret = gst_audio_resampler_new((int) method, (int) flags, (int) format, channels, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle); + Gst.Audio.AudioResampler ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioResampler) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioResampler), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_resampler_options_set_quality(int method, uint quality, int in_rate, int out_rate, IntPtr options); + + public static void OptionsSetQuality(Gst.Audio.AudioResamplerMethod method, uint quality, int in_rate, int out_rate, Gst.Structure options) { + gst_audio_resampler_options_set_quality((int) method, quality, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle); + } + + public AudioResampler(IntPtr raw) : base(raw) {} + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_resampler_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_audio_resampler_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_audio_resampler_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioResamplerFilterInterpolation.cs b/sources/generated/Gst.Audio/AudioResamplerFilterInterpolation.cs new file mode 100644 index 0000000000..2b3730f098 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioResamplerFilterInterpolation.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioResamplerFilterInterpolationGType))] + public enum AudioResamplerFilterInterpolation { + + None = 0, + Linear = 1, + Cubic = 2, + } + + internal class AudioResamplerFilterInterpolationGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_filter_interpolation_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_resampler_filter_interpolation_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioResamplerFilterMode.cs b/sources/generated/Gst.Audio/AudioResamplerFilterMode.cs new file mode 100644 index 0000000000..8d3dc61a44 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioResamplerFilterMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioResamplerFilterModeGType))] + public enum AudioResamplerFilterMode { + + Interpolated = 0, + Full = 1, + Auto = 2, + } + + internal class AudioResamplerFilterModeGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_filter_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_resampler_filter_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioResamplerFlags.cs b/sources/generated/Gst.Audio/AudioResamplerFlags.cs new file mode 100644 index 0000000000..7126c0fc1a --- /dev/null +++ b/sources/generated/Gst.Audio/AudioResamplerFlags.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Audio.AudioResamplerFlagsGType))] + public enum AudioResamplerFlags : uint { + + None = 0, + NonInterleavedIn = 1, + NonInterleavedOut = 2, + VariableRate = 4, + } + + internal class AudioResamplerFlagsGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_resampler_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioResamplerMethod.cs b/sources/generated/Gst.Audio/AudioResamplerMethod.cs new file mode 100644 index 0000000000..daaae3d556 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioResamplerMethod.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioResamplerMethodGType))] + public enum AudioResamplerMethod { + + Nearest = 0, + Linear = 1, + Cubic = 2, + BlackmanNuttall = 3, + Kaiser = 4, + } + + internal class AudioResamplerMethodGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_resampler_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioRingBuffer.cs b/sources/generated/Gst.Audio/AudioRingBuffer.cs new file mode 100644 index 0000000000..e2abf218c0 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioRingBuffer.cs @@ -0,0 +1,1537 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioRingBuffer : Gst.Object { + + protected AudioRingBuffer (IntPtr raw) : base(raw) {} + + protected AudioRingBuffer() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public GLib.Cond Cond { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("cond")); + return new GLib.Cond((*raw_ptr)); + } + } + } + + public bool Open { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("open")); + return (*raw_ptr); + } + } + } + + public bool Acquired { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("acquired")); + return (*raw_ptr); + } + } + } + + public byte Memory { + get { + unsafe { + byte* raw_ptr = (byte*)(((byte*)Handle) + abi_info.GetFieldOffset("memory")); + return (*raw_ptr); + } + } + } + + public ulong Size { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + return (ulong) (*raw_ptr); + } + } + } + + public Gst.Audio.AudioRingBufferSpec Spec { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("spec")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioRingBufferSpec), false); + } + } + } + + public int SamplesPerSeg { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("samples_per_seg")); + return (*raw_ptr); + } + } + } + + public byte EmptySeg { + get { + unsafe { + byte* raw_ptr = (byte*)(((byte*)Handle) + abi_info.GetFieldOffset("empty_seg")); + return (*raw_ptr); + } + } + } + + public int State { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("state")); + return (*raw_ptr); + } + } + } + + public int Segdone { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segdone")); + return (*raw_ptr); + } + } + } + + public int Segbase { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segbase")); + return (*raw_ptr); + } + } + } + + public int Waiting { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("waiting")); + return (*raw_ptr); + } + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + set { + gst_audio_ring_buffer_set_flushing(Handle, value); + } + } + + static OpenDeviceNativeDelegate OpenDevice_cb_delegate; + static OpenDeviceNativeDelegate OpenDeviceVMCallback { + get { + if (OpenDevice_cb_delegate == null) + OpenDevice_cb_delegate = new OpenDeviceNativeDelegate (OpenDevice_cb); + return OpenDevice_cb_delegate; + } + } + + static void OverrideOpenDevice (GLib.GType gtype) + { + OverrideOpenDevice (gtype, OpenDeviceVMCallback); + } + + static void OverrideOpenDevice (GLib.GType gtype, OpenDeviceNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open_device")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenDeviceNativeDelegate (IntPtr inst); + + static bool OpenDevice_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnOpenDevice (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideOpenDevice")] + protected virtual bool OnOpenDevice () + { + return InternalOpenDevice (); + } + + private bool InternalOpenDevice () + { + OpenDeviceNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open_device")); + unmanaged = (OpenDeviceNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenDeviceNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static AcquireNativeDelegate Acquire_cb_delegate; + static AcquireNativeDelegate AcquireVMCallback { + get { + if (Acquire_cb_delegate == null) + Acquire_cb_delegate = new AcquireNativeDelegate (Acquire_cb); + return Acquire_cb_delegate; + } + } + + static void OverrideAcquire (GLib.GType gtype) + { + OverrideAcquire (gtype, AcquireVMCallback); + } + + static void OverrideAcquire (GLib.GType gtype, AcquireNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("acquire")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool AcquireNativeDelegate (IntPtr inst, IntPtr spec); + + static bool Acquire_cb (IntPtr inst, IntPtr spec) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnAcquire (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideAcquire")] + protected virtual bool OnAcquire (Gst.Audio.AudioRingBufferSpec spec) + { + return InternalAcquire (spec); + } + + private bool InternalAcquire (Gst.Audio.AudioRingBufferSpec spec) + { + AcquireNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("acquire")); + unmanaged = (AcquireNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AcquireNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle); + return __result; + } + + static ReleaseNativeDelegate Release_cb_delegate; + static ReleaseNativeDelegate ReleaseVMCallback { + get { + if (Release_cb_delegate == null) + Release_cb_delegate = new ReleaseNativeDelegate (Release_cb); + return Release_cb_delegate; + } + } + + static void OverrideRelease (GLib.GType gtype) + { + OverrideRelease (gtype, ReleaseVMCallback); + } + + static void OverrideRelease (GLib.GType gtype, ReleaseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("release")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ReleaseNativeDelegate (IntPtr inst); + + static bool Release_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnRelease (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideRelease")] + protected virtual bool OnRelease () + { + return InternalRelease (); + } + + private bool InternalRelease () + { + ReleaseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("release")); + unmanaged = (ReleaseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReleaseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseDeviceNativeDelegate CloseDevice_cb_delegate; + static CloseDeviceNativeDelegate CloseDeviceVMCallback { + get { + if (CloseDevice_cb_delegate == null) + CloseDevice_cb_delegate = new CloseDeviceNativeDelegate (CloseDevice_cb); + return CloseDevice_cb_delegate; + } + } + + static void OverrideCloseDevice (GLib.GType gtype) + { + OverrideCloseDevice (gtype, CloseDeviceVMCallback); + } + + static void OverrideCloseDevice (GLib.GType gtype, CloseDeviceNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close_device")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseDeviceNativeDelegate (IntPtr inst); + + static bool CloseDevice_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnCloseDevice (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideCloseDevice")] + protected virtual bool OnCloseDevice () + { + return InternalCloseDevice (); + } + + private bool InternalCloseDevice () + { + CloseDeviceNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close_device")); + unmanaged = (CloseDeviceNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseDeviceNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static PauseNativeDelegate Pause_cb_delegate; + static PauseNativeDelegate PauseVMCallback { + get { + if (Pause_cb_delegate == null) + Pause_cb_delegate = new PauseNativeDelegate (Pause_cb); + return Pause_cb_delegate; + } + } + + static void OverridePause (GLib.GType gtype) + { + OverridePause (gtype, PauseVMCallback); + } + + static void OverridePause (GLib.GType gtype, PauseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PauseNativeDelegate (IntPtr inst); + + static bool Pause_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnPause (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverridePause")] + protected virtual bool OnPause () + { + return InternalPause (); + } + + private bool InternalPause () + { + PauseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + unmanaged = (PauseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static ResumeNativeDelegate Resume_cb_delegate; + static ResumeNativeDelegate ResumeVMCallback { + get { + if (Resume_cb_delegate == null) + Resume_cb_delegate = new ResumeNativeDelegate (Resume_cb); + return Resume_cb_delegate; + } + } + + static void OverrideResume (GLib.GType gtype) + { + OverrideResume (gtype, ResumeVMCallback); + } + + static void OverrideResume (GLib.GType gtype, ResumeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ResumeNativeDelegate (IntPtr inst); + + static bool Resume_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnResume (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideResume")] + protected virtual bool OnResume () + { + return InternalResume (); + } + + private bool InternalResume () + { + ResumeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + unmanaged = (ResumeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResumeNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DelayNativeDelegate Delay_cb_delegate; + static DelayNativeDelegate DelayVMCallback { + get { + if (Delay_cb_delegate == null) + Delay_cb_delegate = new DelayNativeDelegate (Delay_cb); + return Delay_cb_delegate; + } + } + + static void OverrideDelay (GLib.GType gtype) + { + OverrideDelay (gtype, DelayVMCallback); + } + + static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint DelayNativeDelegate (IntPtr inst); + + static uint Delay_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + uint __result; + __result = __obj.OnDelay (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideDelay")] + protected virtual uint OnDelay () + { + return InternalDelay (); + } + + private uint InternalDelay () + { + DelayNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle); + return __result; + } + + static ActivateNativeDelegate Activate_cb_delegate; + static ActivateNativeDelegate ActivateVMCallback { + get { + if (Activate_cb_delegate == null) + Activate_cb_delegate = new ActivateNativeDelegate (Activate_cb); + return Activate_cb_delegate; + } + } + + static void OverrideActivate (GLib.GType gtype) + { + OverrideActivate (gtype, ActivateVMCallback); + } + + static void OverrideActivate (GLib.GType gtype, ActivateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ActivateNativeDelegate (IntPtr inst, bool active); + + static bool Activate_cb (IntPtr inst, bool active) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + bool __result; + __result = __obj.OnActivate (active); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideActivate")] + protected virtual bool OnActivate (bool active) + { + return InternalActivate (active); + } + + private bool InternalActivate (bool active) + { + ActivateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("activate")); + unmanaged = (ActivateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActivateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, active); + return __result; + } + + static CommitNativeDelegate Commit_cb_delegate; + static CommitNativeDelegate CommitVMCallback { + get { + if (Commit_cb_delegate == null) + Commit_cb_delegate = new CommitNativeDelegate (Commit_cb); + return Commit_cb_delegate; + } + } + + static void OverrideCommit (GLib.GType gtype) + { + OverrideCommit (gtype, CommitVMCallback); + } + + static void OverrideCommit (GLib.GType gtype, CommitNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("commit")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint CommitNativeDelegate (IntPtr inst, ulong sample, byte[] data, int in_samples, int out_samples, ref int accum); + + static uint Commit_cb (IntPtr inst, ulong sample, byte[] data, int in_samples, int out_samples, ref int accum) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + uint __result; + __result = __obj.OnCommit (sample, data, in_samples, out_samples, ref accum); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideCommit")] + protected virtual uint OnCommit (ulong sample, byte[] data, int in_samples, int out_samples, ref int accum) + { + return InternalCommit (sample, data, in_samples, out_samples, ref accum); + } + + private uint InternalCommit (ulong sample, byte[] data, int in_samples, int out_samples, ref int accum) + { + CommitNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("commit")); + unmanaged = (CommitNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CommitNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle, sample, data, in_samples, out_samples, ref accum); + return __result; + } + + static ClearAllNativeDelegate ClearAll_cb_delegate; + static ClearAllNativeDelegate ClearAllVMCallback { + get { + if (ClearAll_cb_delegate == null) + ClearAll_cb_delegate = new ClearAllNativeDelegate (ClearAll_cb); + return ClearAll_cb_delegate; + } + } + + static void OverrideClearAll (GLib.GType gtype) + { + OverrideClearAll (gtype, ClearAllVMCallback); + } + + static void OverrideClearAll (GLib.GType gtype, ClearAllNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("clear_all")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ClearAllNativeDelegate (IntPtr inst); + + static void ClearAll_cb (IntPtr inst) + { + try { + AudioRingBuffer __obj = GLib.Object.GetObject (inst, false) as AudioRingBuffer; + __obj.OnClearAll (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioRingBuffer), ConnectionMethod="OverrideClearAll")] + protected virtual void OnClearAll () + { + InternalClearAll (); + } + + private void InternalClearAll () + { + ClearAllNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("clear_all")); + unmanaged = (ClearAllNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ClearAllNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open_device" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open_device + , null + , "acquire" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("acquire" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // acquire + , "open_device" + , "release" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("release" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // release + , "acquire" + , "close_device" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close_device" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close_device + , "release" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "close_device" + , "pause" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pause" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pause + , "start" + , "resume" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("resume" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // resume + , "pause" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "resume" + , "delay" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("delay" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay + , "stop" + , "activate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activate + , "delay" + , "commit" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("commit" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // commit + , "activate" + , "clear_all" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clear_all" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clear_all + , "commit" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "clear_all" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_ring_buffer_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_ring_buffer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_debug_spec_buff(IntPtr spec); + + public static void DebugSpecBuff(Gst.Audio.AudioRingBufferSpec spec) { + gst_audio_ring_buffer_debug_spec_buff(spec == null ? IntPtr.Zero : spec.Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_debug_spec_caps(IntPtr spec); + + public static void DebugSpecCaps(Gst.Audio.AudioRingBufferSpec spec) { + gst_audio_ring_buffer_debug_spec_caps(spec == null ? IntPtr.Zero : spec.Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_parse_caps(IntPtr spec, IntPtr caps); + + public static bool ParseCaps(Gst.Audio.AudioRingBufferSpec spec, Gst.Caps caps) { + bool raw_ret = gst_audio_ring_buffer_parse_caps(spec == null ? IntPtr.Zero : spec.Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_acquire(IntPtr raw, IntPtr spec); + + public bool Acquire(Gst.Audio.AudioRingBufferSpec spec) { + bool raw_ret = gst_audio_ring_buffer_acquire(Handle, spec == null ? IntPtr.Zero : spec.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_activate(IntPtr raw, bool active); + + public bool Activate(bool active) { + bool raw_ret = gst_audio_ring_buffer_activate(Handle, active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_advance(IntPtr raw, uint advance); + + public void Advance(uint advance) { + gst_audio_ring_buffer_advance(Handle, advance); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_clear(IntPtr raw, int segment); + + public void Clear(int segment) { + gst_audio_ring_buffer_clear(Handle, segment); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_clear_all(IntPtr raw); + + public void ClearAll() { + gst_audio_ring_buffer_clear_all(Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_close_device(IntPtr raw); + + public bool CloseDevice() { + bool raw_ret = gst_audio_ring_buffer_close_device(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_audio_ring_buffer_commit(IntPtr raw, ulong sample, byte[] data, int in_samples, int out_samples, ref int accum); + + public uint Commit(ulong sample, byte[] data, int in_samples, int out_samples, ref int accum) { + uint raw_ret = gst_audio_ring_buffer_commit(Handle, sample, data, in_samples, out_samples, ref accum); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_convert(IntPtr raw, int src_fmt, long src_val, int dest_fmt, out long dest_val); + + public bool Convert(Gst.Format src_fmt, long src_val, Gst.Format dest_fmt, out long dest_val) { + bool raw_ret = gst_audio_ring_buffer_convert(Handle, (int) src_fmt, src_val, (int) dest_fmt, out dest_val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_audio_ring_buffer_delay(IntPtr raw); + + public uint Delay() { + uint raw_ret = gst_audio_ring_buffer_delay(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_device_is_open(IntPtr raw); + + public bool DeviceIsOpen() { + bool raw_ret = gst_audio_ring_buffer_device_is_open(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_is_acquired(IntPtr raw); + + public bool IsAcquired { + get { + bool raw_ret = gst_audio_ring_buffer_is_acquired(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_is_active(IntPtr raw); + + public bool IsActive { + get { + bool raw_ret = gst_audio_ring_buffer_is_active(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_is_flushing(IntPtr raw); + + public bool IsFlushing { + get { + bool raw_ret = gst_audio_ring_buffer_is_flushing(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_may_start(IntPtr raw, bool allowed); + + public void MayStart(bool allowed) { + gst_audio_ring_buffer_may_start(Handle, allowed); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_open_device(IntPtr raw); + + public bool OpenDevice() { + bool raw_ret = gst_audio_ring_buffer_open_device(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_pause(IntPtr raw); + + public bool Pause() { + bool raw_ret = gst_audio_ring_buffer_pause(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_audio_ring_buffer_read(IntPtr raw, ulong sample, byte[] data, uint len, out ulong timestamp); + + public uint Read(ulong sample, byte[] data, uint len, out ulong timestamp) { + uint raw_ret = gst_audio_ring_buffer_read(Handle, sample, data, len, out timestamp); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_release(IntPtr raw); + + public bool Release() { + bool raw_ret = gst_audio_ring_buffer_release(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_ring_buffer_samples_done(IntPtr raw); + + public ulong SamplesDone() { + ulong raw_ret = gst_audio_ring_buffer_samples_done(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_set_callback_full(IntPtr raw, Gst.AudioSharp.AudioRingBufferCallbackNative cb, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.Audio.AudioRingBufferCallback CallbackFull { + set { + Gst.AudioSharp.AudioRingBufferCallbackWrapper value_wrapper = new Gst.AudioSharp.AudioRingBufferCallbackWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_audio_ring_buffer_set_callback_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_set_channel_positions(IntPtr raw, int[] position); + + public Gst.Audio.AudioChannelPosition[] ChannelPositions { + set { + int cnt_value = value == null ? 0 : value.Length; + int[] native_value = new int [cnt_value]; + for (int i = 0; i < cnt_value; i++) + native_value [i] = (int) value[i]; + gst_audio_ring_buffer_set_channel_positions(Handle, native_value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_set_sample(IntPtr raw, ulong sample); + + public ulong Sample { + set { + gst_audio_ring_buffer_set_sample(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_ring_buffer_set_timestamp(IntPtr raw, int readseg, ulong timestamp); + + public void SetTimestamp(int readseg, ulong timestamp) { + gst_audio_ring_buffer_set_timestamp(Handle, readseg, timestamp); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_start(IntPtr raw); + + public bool Start() { + bool raw_ret = gst_audio_ring_buffer_start(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_ring_buffer_stop(IntPtr raw); + + public bool Stop() { + bool raw_ret = gst_audio_ring_buffer_stop(Handle); + bool ret = raw_ret; + return ret; + } + + + static AudioRingBuffer () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("cond" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // cond + , null + , "open" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_condAlign), "cond") + , 0 + ), + new GLib.AbiField("open" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // open + , "cond" + , "acquired" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_openAlign), "open") + , 0 + ), + new GLib.AbiField("acquired" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // acquired + , "open" + , "memory" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_acquiredAlign), "acquired") + , 0 + ), + new GLib.AbiField("memory" + , -1 + , (uint) Marshal.SizeOf(typeof(byte)) // memory + , "acquired" + , "size" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_memoryAlign), "memory") + , 0 + ), + new GLib.AbiField("size" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // size + , "memory" + , "timestamps" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_sizeAlign), "size") + , 0 + ), + new GLib.AbiField("timestamps" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // timestamps + , "size" + , "spec" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_timestampsAlign), "timestamps") + , 0 + ), + new GLib.AbiField("spec" + , -1 + , Gst.Audio.AudioRingBufferSpec.abi_info.Size // spec + , "timestamps" + , "samples_per_seg" + , Gst.Audio.AudioRingBufferSpec.abi_info.Align + , 0 + ), + new GLib.AbiField("samples_per_seg" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // samples_per_seg + , "spec" + , "empty_seg" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_samples_per_segAlign), "samples_per_seg") + , 0 + ), + new GLib.AbiField("empty_seg" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // empty_seg + , "samples_per_seg" + , "state" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("state" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // state + , "empty_seg" + , "segdone" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_stateAlign), "state") + , 0 + ), + new GLib.AbiField("segdone" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // segdone + , "state" + , "segbase" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_segdoneAlign), "segdone") + , 0 + ), + new GLib.AbiField("segbase" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // segbase + , "segdone" + , "waiting" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_segbaseAlign), "segbase") + , 0 + ), + new GLib.AbiField("waiting" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // waiting + , "segbase" + , "callback" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_waitingAlign), "waiting") + , 0 + ), + new GLib.AbiField("callback" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // callback + , "waiting" + , "cb_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cb_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cb_data + , "callback" + , "need_reorder" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("need_reorder" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // need_reorder + , "cb_data" + , "channel_reorder_map" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_need_reorderAlign), "need_reorder") + , 0 + ), + new GLib.AbiField("channel_reorder_map" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) * 64 // channel_reorder_map + , "need_reorder" + , "flushing" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_channel_reorder_mapAlign), "channel_reorder_map") + , 0 + ), + new GLib.AbiField("flushing" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // flushing + , "channel_reorder_map" + , "may_start" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_flushingAlign), "flushing") + , 0 + ), + new GLib.AbiField("may_start" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // may_start + , "flushing" + , "active" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_may_startAlign), "may_start") + , 0 + ), + new GLib.AbiField("active" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // active + , "may_start" + , "cb_data_notify" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_activeAlign), "active") + , 0 + ), + new GLib.AbiField("cb_data_notify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cb_data_notify + , "active" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBuffer_cb_data_notifyAlign), "cb_data_notify") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _gst_reserved + , "cb_data_notify" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_condAlign + { + sbyte f1; + private GLib.Cond.ABI cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_openAlign + { + sbyte f1; + private bool open; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_acquiredAlign + { + sbyte f1; + private bool acquired; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_memoryAlign + { + sbyte f1; + private byte memory; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_sizeAlign + { + sbyte f1; + private UIntPtr size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_timestampsAlign + { + sbyte f1; + private ulong timestamps; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_samples_per_segAlign + { + sbyte f1; + private int samples_per_seg; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_stateAlign + { + sbyte f1; + private int state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_segdoneAlign + { + sbyte f1; + private int segdone; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_segbaseAlign + { + sbyte f1; + private int segbase; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_waitingAlign + { + sbyte f1; + private int waiting; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_need_reorderAlign + { + sbyte f1; + private bool need_reorder; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_channel_reorder_mapAlign + { + sbyte f1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=64)] + private int[] channel_reorder_map; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_flushingAlign + { + sbyte f1; + private bool flushing; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_may_startAlign + { + sbyte f1; + private int may_start; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_activeAlign + { + sbyte f1; + private bool active; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBuffer_cb_data_notifyAlign + { + sbyte f1; + private GLib.DestroyNotify cb_data_notify; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioRingBufferCallback.cs b/sources/generated/Gst.Audio/AudioRingBufferCallback.cs new file mode 100644 index 0000000000..03b5cc97b8 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioRingBufferCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + + public delegate void AudioRingBufferCallback(Gst.Audio.AudioRingBuffer rbuf, byte[] data, uint len); + +} diff --git a/sources/generated/Gst.Audio/AudioRingBufferFormatType.cs b/sources/generated/Gst.Audio/AudioRingBufferFormatType.cs new file mode 100644 index 0000000000..2c25a7bab1 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioRingBufferFormatType.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioRingBufferFormatTypeGType))] + public enum AudioRingBufferFormatType { + + Raw = 0, + MuLaw = 1, + ALaw = 2, + ImaAdpcm = 3, + Mpeg = 4, + Gsm = 5, + Iec958 = 6, + Ac3 = 7, + Eac3 = 8, + Dts = 9, + Mpeg2Aac = 10, + Mpeg4Aac = 11, + Mpeg2AacRaw = 12, + Mpeg4AacRaw = 13, + Flac = 14, + } + + internal class AudioRingBufferFormatTypeGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_ring_buffer_format_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_ring_buffer_format_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioRingBufferSpec.cs b/sources/generated/Gst.Audio/AudioRingBufferSpec.cs new file mode 100644 index 0000000000..92756a6d71 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioRingBufferSpec.cs @@ -0,0 +1,268 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioRingBufferSpec : GLib.Opaque { + + public Gst.Caps Caps { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("caps")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Caps), false); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("caps")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public Gst.Audio.AudioRingBufferFormatType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.Audio.AudioRingBufferFormatType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public Gst.Audio.AudioInfo Info { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public ulong LatencyTime { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time")); + *raw_ptr = value; + } + } + } + + public ulong BufferTime { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time")); + *raw_ptr = value; + } + } + } + + public int Segsize { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segsize")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segsize")); + *raw_ptr = value; + } + } + } + + public int Segtotal { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segtotal")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("segtotal")); + *raw_ptr = value; + } + } + } + + public int Seglatency { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("seglatency")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("seglatency")); + *raw_ptr = value; + } + } + } + + public AudioRingBufferSpec(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("caps" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // caps + , null + , "type" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("type" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioRingBufferFormatType))) // type + , "caps" + , "info" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_typeAlign), "type") + , 0 + ), + new GLib.AbiField("info" + , -1 + , Gst.Audio.AudioInfo.abi_info.Size // info + , "type" + , "latency_time" + , Gst.Audio.AudioInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("latency_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time + , "info" + , "buffer_time" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_latency_timeAlign), "latency_time") + , 0 + ), + new GLib.AbiField("buffer_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time + , "latency_time" + , "segsize" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_buffer_timeAlign), "buffer_time") + , 0 + ), + new GLib.AbiField("segsize" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // segsize + , "buffer_time" + , "segtotal" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_segsizeAlign), "segsize") + , 0 + ), + new GLib.AbiField("segtotal" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // segtotal + , "segsize" + , "seglatency" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_segtotalAlign), "segtotal") + , 0 + ), + new GLib.AbiField("seglatency" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // seglatency + , "segtotal" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstAudioRingBufferSpec_seglatencyAlign), "seglatency") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "seglatency" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_typeAlign + { + sbyte f1; + private Gst.Audio.AudioRingBufferFormatType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_latency_timeAlign + { + sbyte f1; + private ulong latency_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_buffer_timeAlign + { + sbyte f1; + private ulong buffer_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_segsizeAlign + { + sbyte f1; + private int segsize; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_segtotalAlign + { + sbyte f1; + private int segtotal; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioRingBufferSpec_seglatencyAlign + { + sbyte f1; + private int seglatency; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioRingBufferState.cs b/sources/generated/Gst.Audio/AudioRingBufferState.cs new file mode 100644 index 0000000000..7efb3bbb77 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioRingBufferState.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Audio.AudioRingBufferStateGType))] + public enum AudioRingBufferState { + + Stopped = 0, + Paused = 1, + Started = 2, + Error = 3, + } + + internal class AudioRingBufferStateGType { + [DllImport ("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_ring_buffer_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_ring_buffer_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/AudioSink.cs b/sources/generated/Gst.Audio/AudioSink.cs new file mode 100644 index 0000000000..79d918e3b8 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioSink.cs @@ -0,0 +1,735 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioSink : Gst.Audio.AudioBaseSink { + + public AudioSink (IntPtr raw) : base(raw) {} + + protected AudioSink() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static PrepareNativeDelegate Prepare_cb_delegate; + static PrepareNativeDelegate PrepareVMCallback { + get { + if (Prepare_cb_delegate == null) + Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb); + return Prepare_cb_delegate; + } + } + + static void OverridePrepare (GLib.GType gtype) + { + OverridePrepare (gtype, PrepareVMCallback); + } + + static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec); + + static bool Prepare_cb (IntPtr inst, IntPtr spec) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + bool __result; + __result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePrepare")] + protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec) + { + return InternalPrepare (spec); + } + + private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec) + { + PrepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle); + return __result; + } + + static UnprepareNativeDelegate Unprepare_cb_delegate; + static UnprepareNativeDelegate UnprepareVMCallback { + get { + if (Unprepare_cb_delegate == null) + Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb); + return Unprepare_cb_delegate; + } + } + + static void OverrideUnprepare (GLib.GType gtype) + { + OverrideUnprepare (gtype, UnprepareVMCallback); + } + + static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnprepareNativeDelegate (IntPtr inst); + + static bool Unprepare_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + bool __result; + __result = __obj.OnUnprepare (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideUnprepare")] + protected virtual bool OnUnprepare () + { + return InternalUnprepare (); + } + + private bool InternalUnprepare () + { + UnprepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare")); + unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static WriteNativeDelegate Write_cb_delegate; + static WriteNativeDelegate WriteVMCallback { + get { + if (Write_cb_delegate == null) + Write_cb_delegate = new WriteNativeDelegate (Write_cb); + return Write_cb_delegate; + } + } + + static void OverrideWrite (GLib.GType gtype) + { + OverrideWrite (gtype, WriteVMCallback); + } + + static void OverrideWrite (GLib.GType gtype, WriteNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("write")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int WriteNativeDelegate (IntPtr inst, IntPtr data, uint length); + + static int Write_cb (IntPtr inst, IntPtr data, uint length) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + int __result; + __result = __obj.OnWrite (data, length); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideWrite")] + protected virtual int OnWrite (IntPtr data, uint length) + { + return InternalWrite (data, length); + } + + private int InternalWrite (IntPtr data, uint length) + { + WriteNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("write")); + unmanaged = (WriteNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WriteNativeDelegate)); + } + if (unmanaged == null) return 0; + + int __result = unmanaged (this.Handle, data, length); + return __result; + } + + static DelayNativeDelegate Delay_cb_delegate; + static DelayNativeDelegate DelayVMCallback { + get { + if (Delay_cb_delegate == null) + Delay_cb_delegate = new DelayNativeDelegate (Delay_cb); + return Delay_cb_delegate; + } + } + + static void OverrideDelay (GLib.GType gtype) + { + OverrideDelay (gtype, DelayVMCallback); + } + + static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint DelayNativeDelegate (IntPtr inst); + + static uint Delay_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + uint __result; + __result = __obj.OnDelay (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideDelay")] + protected virtual uint OnDelay () + { + return InternalDelay (); + } + + private uint InternalDelay () + { + DelayNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle); + return __result; + } + + static ResetNativeDelegate Reset_cb_delegate; + static ResetNativeDelegate ResetVMCallback { + get { + if (Reset_cb_delegate == null) + Reset_cb_delegate = new ResetNativeDelegate (Reset_cb); + return Reset_cb_delegate; + } + } + + static void OverrideReset (GLib.GType gtype) + { + OverrideReset (gtype, ResetVMCallback); + } + + static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ResetNativeDelegate (IntPtr inst); + + static void Reset_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnReset (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideReset")] + protected virtual void OnReset () + { + InternalReset (); + } + + private void InternalReset () + { + ResetNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static PauseNativeDelegate Pause_cb_delegate; + static PauseNativeDelegate PauseVMCallback { + get { + if (Pause_cb_delegate == null) + Pause_cb_delegate = new PauseNativeDelegate (Pause_cb); + return Pause_cb_delegate; + } + } + + static void OverridePause (GLib.GType gtype) + { + OverridePause (gtype, PauseVMCallback); + } + + static void OverridePause (GLib.GType gtype, PauseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PauseNativeDelegate (IntPtr inst); + + static void Pause_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnPause (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePause")] + protected virtual void OnPause () + { + InternalPause (); + } + + private void InternalPause () + { + PauseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + unmanaged = (PauseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static ResumeNativeDelegate Resume_cb_delegate; + static ResumeNativeDelegate ResumeVMCallback { + get { + if (Resume_cb_delegate == null) + Resume_cb_delegate = new ResumeNativeDelegate (Resume_cb); + return Resume_cb_delegate; + } + } + + static void OverrideResume (GLib.GType gtype) + { + OverrideResume (gtype, ResumeVMCallback); + } + + static void OverrideResume (GLib.GType gtype, ResumeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ResumeNativeDelegate (IntPtr inst); + + static void Resume_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnResume (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideResume")] + protected virtual void OnResume () + { + InternalResume (); + } + + private void InternalResume () + { + ResumeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + unmanaged = (ResumeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResumeNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StopNativeDelegate (IntPtr inst); + + static void Stop_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnStop (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideStop")] + protected virtual void OnStop () + { + InternalStop (); + } + + private void InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open" + , Gst.Audio.AudioBaseSink.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , null + , "prepare" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare + , "open" + , "unprepare" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unprepare" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare + , "prepare" + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "unprepare" + , "write" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("write" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // write + , "close" + , "delay" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("delay" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay + , "write" + , "reset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset + , "delay" + , "pause" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pause" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pause + , "reset" + , "resume" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("resume" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // resume + , "pause" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "resume" + , "extension" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("extension" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // extension + , "stop" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_sink_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_sink_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioSink () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("thread" + , Gst.Audio.AudioBaseSink.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // thread + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "thread" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioSinkClassExtension.cs b/sources/generated/Gst.Audio/AudioSinkClassExtension.cs new file mode 100644 index 0000000000..3ef75bb2fb --- /dev/null +++ b/sources/generated/Gst.Audio/AudioSinkClassExtension.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioSinkClassExtension : IEquatable { + + private IntPtr _clear_all; + + public static Gst.Audio.AudioSinkClassExtension Zero = new Gst.Audio.AudioSinkClassExtension (); + + public static Gst.Audio.AudioSinkClassExtension New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioSinkClassExtension.Zero; + return (Gst.Audio.AudioSinkClassExtension) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioSinkClassExtension)); + } + + public bool Equals (AudioSinkClassExtension other) + { + return true && _clear_all.Equals (other._clear_all); + } + + public override bool Equals (object other) + { + return other is AudioSinkClassExtension && Equals ((AudioSinkClassExtension) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ _clear_all.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioSrc.cs b/sources/generated/Gst.Audio/AudioSrc.cs new file mode 100644 index 0000000000..a0f869ad7f --- /dev/null +++ b/sources/generated/Gst.Audio/AudioSrc.cs @@ -0,0 +1,552 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioSrc : Gst.Audio.AudioBaseSrc { + + public AudioSrc (IntPtr raw) : base(raw) {} + + protected AudioSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static PrepareNativeDelegate Prepare_cb_delegate; + static PrepareNativeDelegate PrepareVMCallback { + get { + if (Prepare_cb_delegate == null) + Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb); + return Prepare_cb_delegate; + } + } + + static void OverridePrepare (GLib.GType gtype) + { + OverridePrepare (gtype, PrepareVMCallback); + } + + static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec); + + static bool Prepare_cb (IntPtr inst, IntPtr spec) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + bool __result; + __result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverridePrepare")] + protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec) + { + return InternalPrepare (spec); + } + + private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec) + { + PrepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle); + return __result; + } + + static UnprepareNativeDelegate Unprepare_cb_delegate; + static UnprepareNativeDelegate UnprepareVMCallback { + get { + if (Unprepare_cb_delegate == null) + Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb); + return Unprepare_cb_delegate; + } + } + + static void OverrideUnprepare (GLib.GType gtype) + { + OverrideUnprepare (gtype, UnprepareVMCallback); + } + + static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnprepareNativeDelegate (IntPtr inst); + + static bool Unprepare_cb (IntPtr inst) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + bool __result; + __result = __obj.OnUnprepare (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideUnprepare")] + protected virtual bool OnUnprepare () + { + return InternalUnprepare (); + } + + private bool InternalUnprepare () + { + UnprepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare")); + unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static ReadNativeDelegate Read_cb_delegate; + static ReadNativeDelegate ReadVMCallback { + get { + if (Read_cb_delegate == null) + Read_cb_delegate = new ReadNativeDelegate (Read_cb); + return Read_cb_delegate; + } + } + + static void OverrideRead (GLib.GType gtype) + { + OverrideRead (gtype, ReadVMCallback); + } + + static void OverrideRead (GLib.GType gtype, ReadNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint ReadNativeDelegate (IntPtr inst, IntPtr data, uint length, ulong timestamp); + + static uint Read_cb (IntPtr inst, IntPtr data, uint length, ulong timestamp) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + uint __result; + __result = __obj.OnRead (data, length, timestamp); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideRead")] + protected virtual uint OnRead (IntPtr data, uint length, ulong timestamp) + { + return InternalRead (data, length, timestamp); + } + + private uint InternalRead (IntPtr data, uint length, ulong timestamp) + { + ReadNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read")); + unmanaged = (ReadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle, data, length, timestamp); + return __result; + } + + static DelayNativeDelegate Delay_cb_delegate; + static DelayNativeDelegate DelayVMCallback { + get { + if (Delay_cb_delegate == null) + Delay_cb_delegate = new DelayNativeDelegate (Delay_cb); + return Delay_cb_delegate; + } + } + + static void OverrideDelay (GLib.GType gtype) + { + OverrideDelay (gtype, DelayVMCallback); + } + + static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint DelayNativeDelegate (IntPtr inst); + + static uint Delay_cb (IntPtr inst) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + uint __result; + __result = __obj.OnDelay (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideDelay")] + protected virtual uint OnDelay () + { + return InternalDelay (); + } + + private uint InternalDelay () + { + DelayNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay")); + unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate)); + } + if (unmanaged == null) return 0; + + uint __result = unmanaged (this.Handle); + return __result; + } + + static ResetNativeDelegate Reset_cb_delegate; + static ResetNativeDelegate ResetVMCallback { + get { + if (Reset_cb_delegate == null) + Reset_cb_delegate = new ResetNativeDelegate (Reset_cb); + return Reset_cb_delegate; + } + } + + static void OverrideReset (GLib.GType gtype) + { + OverrideReset (gtype, ResetVMCallback); + } + + static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ResetNativeDelegate (IntPtr inst); + + static void Reset_cb (IntPtr inst) + { + try { + AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc; + __obj.OnReset (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideReset")] + protected virtual void OnReset () + { + InternalReset (); + } + + private void InternalReset () + { + ResetNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open" + , Gst.Audio.AudioBaseSrc.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , null + , "prepare" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare + , "open" + , "unprepare" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unprepare" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare + , "prepare" + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "unprepare" + , "read" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("read" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // read + , "close" + , "delay" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("delay" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay + , "read" + , "reset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset + , "delay" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "reset" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("thread" + , Gst.Audio.AudioBaseSrc.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // thread + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "thread" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/AudioStreamAlign.cs b/sources/generated/Gst.Audio/AudioStreamAlign.cs new file mode 100644 index 0000000000..df062245b5 --- /dev/null +++ b/sources/generated/Gst.Audio/AudioStreamAlign.cs @@ -0,0 +1,207 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioStreamAlign : IEquatable { + + + public static Gst.Audio.AudioStreamAlign Zero = new Gst.Audio.AudioStreamAlign (); + + public static Gst.Audio.AudioStreamAlign New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioStreamAlign.Zero; + return (Gst.Audio.AudioStreamAlign) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioStreamAlign)); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_stream_align_new(int rate, ulong alignment_threshold, ulong discont_wait); + + public static AudioStreamAlign New(int rate, ulong alignment_threshold, ulong discont_wait) + { + AudioStreamAlign result = AudioStreamAlign.New (gst_audio_stream_align_new(rate, alignment_threshold, discont_wait)); + return result; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_stream_align_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_stream_align_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_stream_align_get_alignment_threshold(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_stream_align_set_alignment_threshold(IntPtr raw, ulong alignment_threshold); + + public ulong AlignmentThreshold { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_audio_stream_align_get_alignment_threshold(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_stream_align_set_alignment_threshold(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_stream_align_get_discont_wait(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_stream_align_set_discont_wait(IntPtr raw, ulong discont_wait); + + public ulong DiscontWait { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_audio_stream_align_get_discont_wait(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_stream_align_set_discont_wait(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_stream_align_get_rate(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_stream_align_set_rate(IntPtr raw, int rate); + + public int Rate { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_audio_stream_align_get_rate(this_as_native); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_stream_align_set_rate(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_stream_align_get_samples_since_discont(IntPtr raw); + + public ulong SamplesSinceDiscont { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_audio_stream_align_get_samples_since_discont(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_stream_align_get_timestamp_at_discont(IntPtr raw); + + public ulong TimestampAtDiscont { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_audio_stream_align_get_timestamp_at_discont(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_stream_align_mark_discont(IntPtr raw); + + public void MarkDiscont() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_stream_align_mark_discont(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_stream_align_process(IntPtr raw, bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position); + + public bool Process(bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_stream_align_process(this_as_native, discont, timestamp, n_samples, out out_timestamp, out out_duration, out out_sample_position); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Audio.AudioStreamAlign target) + { + target = New (native); + } + + public bool Equals (AudioStreamAlign other) + { + return true; + } + + public override bool Equals (object other) + { + return other is AudioStreamAlign && Equals ((AudioStreamAlign) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Audio.AudioStreamAlign boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Audio.AudioStreamAlign.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Audio.AudioStreamAlign (GLib.Value val) + { + return (Gst.Audio.AudioStreamAlign) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/Constants.cs b/sources/generated/Gst.Audio/Constants.cs new file mode 100644 index 0000000000..336ec584e6 --- /dev/null +++ b/sources/generated/Gst.Audio/Constants.cs @@ -0,0 +1,49 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const string AUDIO_CHANNELS_RANGE = @"(int) [ 1, max ]"; + public const string AUDIO_CONVERTER_OPT_DITHER_METHOD = @"GstAudioConverter.dither-method"; + public const string AUDIO_CONVERTER_OPT_MIX_MATRIX = @"GstAudioConverter.mix-matrix"; + public const string AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD = @"GstAudioConverter.noise-shaping-method"; + public const string AUDIO_CONVERTER_OPT_QUANTIZATION = @"GstAudioConverter.quantization"; + public const string AUDIO_CONVERTER_OPT_RESAMPLER_METHOD = @"GstAudioConverter.resampler-method"; + public const int AUDIO_DECODER_MAX_ERRORS = 10; + public const string AUDIO_DECODER_SINK_NAME = @"sink"; + public const string AUDIO_DECODER_SRC_NAME = @"src"; + public const int AUDIO_DEF_CHANNELS = 2; + public const string AUDIO_DEF_FORMAT = @"S16LE"; + public const int AUDIO_DEF_RATE = 44100; + public const string AUDIO_ENCODER_SINK_NAME = @"sink"; + public const string AUDIO_ENCODER_SRC_NAME = @"src"; + public const string AUDIO_FORMATS_ALL = @"{ F64BE, F64LE, F32BE, F32LE, S32BE, S32LE, U32BE, U32LE, S24_32BE, S24_32LE, U24_32BE, U24_32LE, S24BE, S24LE, U24BE, U24LE, S20BE, S20LE, U20BE, U20LE, S18BE, S18LE, U18BE, U18LE, S16BE, S16LE, U16BE, U16LE, S8, U8 }"; + public const string AUDIO_RATE_RANGE = @"(int) [ 1, max ]"; + public const string AUDIO_RESAMPLER_OPT_CUBIC_B = @"GstAudioResampler.cubic-b"; + public const string AUDIO_RESAMPLER_OPT_CUBIC_C = @"GstAudioResampler.cubic-c"; + public const string AUDIO_RESAMPLER_OPT_CUTOFF = @"GstAudioResampler.cutoff"; + public const string AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION = @"GstAudioResampler.filter-interpolation"; + public const string AUDIO_RESAMPLER_OPT_FILTER_MODE = @"GstAudioResampler.filter-mode"; + public const string AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD = @"GstAudioResampler.filter-mode-threshold"; + public const string AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE = @"GstAudioResampler.filter-oversample"; + public const string AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR = @"GstAudioResampler.max-phase-error"; + public const string AUDIO_RESAMPLER_OPT_N_TAPS = @"GstAudioResampler.n-taps"; + public const string AUDIO_RESAMPLER_OPT_STOP_ATTENUATION = @"GstAudioResampler.stop-attenutation"; + public const string AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH = @"GstAudioResampler.transition-bandwidth"; + public const int AUDIO_RESAMPLER_QUALITY_DEFAULT = 4; + public const int AUDIO_RESAMPLER_QUALITY_MAX = 10; + public const int AUDIO_RESAMPLER_QUALITY_MIN = 0; + public const string META_TAG_AUDIO_CHANNELS_STR = @"channels"; + public const string META_TAG_AUDIO_RATE_STR = @"rate"; + public const string META_TAG_AUDIO_STR = @"audio"; +#endregion + } +} diff --git a/sources/generated/Gst.Audio/Global.cs b/sources/generated/Gst.Audio/Global.cs new file mode 100644 index 0000000000..f21e7ae446 --- /dev/null +++ b/sources/generated/Gst.Audio/Global.cs @@ -0,0 +1,385 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_buffer_clip(IntPtr buffer, IntPtr segment, int rate, int bpf); + + public static Gst.Buffer AudioBufferClip(Gst.Buffer buffer, Gst.Segment segment, int rate, int bpf) { + buffer.Owned = false; + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + IntPtr raw_ret = gst_audio_buffer_clip(buffer == null ? IntPtr.Zero : buffer.Handle, native_segment, rate, bpf); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_segment); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_buffer_reorder_channels(IntPtr buffer, int format, int channels, int[] from, int[] to); + + public static bool AudioBufferReorderChannels(Gst.Buffer buffer, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) { + int cnt_from = from == null ? 0 : from.Length; + int[] native_from = new int [cnt_from]; + for (int i = 0; i < cnt_from; i++) + native_from [i] = (int) from[i]; + int cnt_to = to == null ? 0 : to.Length; + int[] native_to = new int [cnt_to]; + for (int i = 0; i < cnt_to; i++) + native_to [i] = (int) to[i]; + bool raw_ret = gst_audio_buffer_reorder_channels(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, channels, native_from, native_to); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_buffer_truncate(IntPtr buffer, int bpf, UIntPtr trim, UIntPtr samples); + + public static Gst.Buffer AudioBufferTruncate(Gst.Buffer buffer, int bpf, ulong trim, ulong samples) { + buffer.Owned = false; + IntPtr raw_ret = gst_audio_buffer_truncate(buffer == null ? IntPtr.Zero : buffer.Handle, bpf, new UIntPtr (trim), new UIntPtr (samples)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_audio_channel_get_fallback_mask(int channels); + + public static ulong AudioChannelGetFallbackMask(int channels) { + ulong raw_ret = gst_audio_channel_get_fallback_mask(channels); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_channel_positions_from_mask(int channels, ulong channel_mask, int[] position); + + public static bool AudioChannelPositionsFromMask(int channels, ulong channel_mask, Gst.Audio.AudioChannelPosition[] position) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + bool raw_ret = gst_audio_channel_positions_from_mask(channels, channel_mask, native_position); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_channel_positions_to_mask(int[] position, int channels, bool force_order, out ulong channel_mask); + + public static bool AudioChannelPositionsToMask(Gst.Audio.AudioChannelPosition[] position, int channels, bool force_order, out ulong channel_mask) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + bool raw_ret = gst_audio_channel_positions_to_mask(native_position, channels, force_order, out channel_mask); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_channel_positions_to_string(int[] position, int channels); + + public static string AudioChannelPositionsToString(Gst.Audio.AudioChannelPosition[] position, int channels) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + IntPtr raw_ret = gst_audio_channel_positions_to_string(native_position, channels); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_channel_positions_to_valid_order(int[] position, int channels); + + public static bool AudioChannelPositionsToValidOrder(Gst.Audio.AudioChannelPosition[] position, int channels) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + bool raw_ret = gst_audio_channel_positions_to_valid_order(native_position, channels); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_check_valid_channel_positions(int[] position, int channels, bool force_order); + + public static bool AudioCheckValidChannelPositions(Gst.Audio.AudioChannelPosition[] position, int channels, bool force_order) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + bool raw_ret = gst_audio_check_valid_channel_positions(native_position, channels, force_order); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_clipping_meta_api_get_type(); + + public static GLib.GType AudioClippingMetaApiGetType() { + IntPtr raw_ret = gst_audio_clipping_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_clipping_meta_get_info(); + + public static Gst.MetaInfo AudioClippingMetaGetInfo() { + IntPtr raw_ret = gst_audio_clipping_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_downmix_meta_api_get_type(); + + public static GLib.GType AudioDownmixMetaApiGetType() { + IntPtr raw_ret = gst_audio_downmix_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_downmix_meta_get_info(); + + public static Gst.MetaInfo AudioDownmixMetaGetInfo() { + IntPtr raw_ret = gst_audio_downmix_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_format_build_integer(bool sign, int endianness, int width, int depth); + + public static Gst.Audio.AudioFormat AudioFormatBuildInteger(bool sign, int endianness, int width, int depth) { + int raw_ret = gst_audio_format_build_integer(sign, endianness, width, depth); + Gst.Audio.AudioFormat ret = (Gst.Audio.AudioFormat) raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_format_fill_silence(IntPtr info, byte[] dest, UIntPtr n_length); + + public static void AudioFormatFillSilence(Gst.Audio.AudioFormatInfo info, byte[] dest) { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + gst_audio_format_fill_silence(native_info, dest, new UIntPtr ((ulong) (dest == null ? 0 : dest.Length))); + Marshal.FreeHGlobal (native_info); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_audio_format_from_string(IntPtr format); + + public static Gst.Audio.AudioFormat AudioFormatFromString(string format) { + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + int raw_ret = gst_audio_format_from_string(native_format); + Gst.Audio.AudioFormat ret = (Gst.Audio.AudioFormat) raw_ret; + GLib.Marshaller.Free (native_format); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_format_get_info(int format); + + public static Gst.Audio.AudioFormatInfo AudioFormatGetInfo(Gst.Audio.AudioFormat format) { + IntPtr raw_ret = gst_audio_format_get_info((int) format); + Gst.Audio.AudioFormatInfo ret = Gst.Audio.AudioFormatInfo.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_format_info_get_type(); + + public static GLib.GType AudioFormatInfoGetType() { + IntPtr raw_ret = gst_audio_format_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_format_to_string(int format); + + public static string AudioFormatToString(Gst.Audio.AudioFormat format) { + IntPtr raw_ret = gst_audio_format_to_string((int) format); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_get_channel_reorder_map(int channels, int[] from, int[] to, int[] reorder_map); + + public static bool AudioGetChannelReorderMap(int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to, int[] reorder_map) { + int cnt_from = from == null ? 0 : from.Length; + int[] native_from = new int [cnt_from]; + for (int i = 0; i < cnt_from; i++) + native_from [i] = (int) from[i]; + int cnt_to = to == null ? 0 : to.Length; + int[] native_to = new int [cnt_to]; + for (int i = 0; i < cnt_to; i++) + native_to [i] = (int) to[i]; + bool raw_ret = gst_audio_get_channel_reorder_map(channels, native_from, native_to, reorder_map); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_audio_iec61937_frame_size(IntPtr spec); + + public static uint AudioIec61937FrameSize(Gst.Audio.AudioRingBufferSpec spec) { + uint raw_ret = gst_audio_iec61937_frame_size(spec == null ? IntPtr.Zero : spec.Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_iec61937_payload(byte[] src, uint src_n, byte[] dst, uint dst_n, IntPtr spec, int endianness); + + public static bool AudioIec61937Payload(byte[] src, uint src_n, byte[] dst, uint dst_n, Gst.Audio.AudioRingBufferSpec spec, int endianness) { + bool raw_ret = gst_audio_iec61937_payload(src, src_n, dst, dst_n, spec == null ? IntPtr.Zero : spec.Handle, endianness); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_make_raw_caps(int[] formats, uint len, int layout); + + public static Gst.Caps AudioMakeRawCaps(Gst.Audio.AudioFormat[] formats, uint len, Gst.Audio.AudioLayout layout) { + int cnt_formats = formats == null ? 0 : formats.Length; + int[] native_formats = new int [cnt_formats]; + for (int i = 0; i < cnt_formats; i++) + native_formats [i] = (int) formats[i]; + IntPtr raw_ret = gst_audio_make_raw_caps(native_formats, len, (int) layout); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public static Gst.Caps AudioMakeRawCaps(uint len, Gst.Audio.AudioLayout layout) { + return AudioMakeRawCaps (null, len, layout); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_meta_api_get_type(); + + public static GLib.GType AudioMetaApiGetType() { + IntPtr raw_ret = gst_audio_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_meta_get_info(); + + public static Gst.MetaInfo AudioMetaGetInfo() { + IntPtr raw_ret = gst_audio_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_audio_reorder_channels(byte[] data, UIntPtr n_length, int format, int channels, int[] from, int[] to); + + public static bool AudioReorderChannels(byte[] data, Gst.Audio.AudioFormat format, int channels, Gst.Audio.AudioChannelPosition[] from, Gst.Audio.AudioChannelPosition[] to) { + int cnt_from = from == null ? 0 : from.Length; + int[] native_from = new int [cnt_from]; + for (int i = 0; i < cnt_from; i++) + native_from [i] = (int) from[i]; + int cnt_to = to == null ? 0 : to.Length; + int[] native_to = new int [cnt_to]; + for (int i = 0; i < cnt_to; i++) + native_to [i] = (int) to[i]; + bool raw_ret = gst_audio_reorder_channels(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)), (int) format, channels, native_from, native_to); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_resampler_new(int method, int flags, int format, int channels, int in_rate, int out_rate, IntPtr options); + + public static Gst.Audio.AudioResampler AudioResamplerNew(Gst.Audio.AudioResamplerMethod method, Gst.Audio.AudioResamplerFlags flags, Gst.Audio.AudioFormat format, int channels, int in_rate, int out_rate, Gst.Structure options) { + IntPtr raw_ret = gst_audio_resampler_new((int) method, (int) flags, (int) format, channels, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle); + Gst.Audio.AudioResampler ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioResampler) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioResampler), true); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_audio_resampler_options_set_quality(int method, uint quality, int in_rate, int out_rate, IntPtr options); + + public static void AudioResamplerOptionsSetQuality(Gst.Audio.AudioResamplerMethod method, uint quality, int in_rate, int out_rate, Gst.Structure options) { + gst_audio_resampler_options_set_quality((int) method, quality, in_rate, out_rate, options == null ? IntPtr.Zero : options.Handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_audio_clipping_meta(IntPtr buffer, int format, ulong start, ulong end); + + public static Gst.Audio.AudioClippingMeta BufferAddAudioClippingMeta(Gst.Buffer buffer, Gst.Format format, ulong start, ulong end) { + IntPtr raw_ret = gst_buffer_add_audio_clipping_meta(buffer == null ? IntPtr.Zero : buffer.Handle, (int) format, start, end); + Gst.Audio.AudioClippingMeta ret = Gst.Audio.AudioClippingMeta.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_audio_downmix_meta(IntPtr buffer, int[] from_position, int from_channels, int[] to_position, int to_channels, float matrix); + + public static Gst.Audio.AudioDownmixMeta BufferAddAudioDownmixMeta(Gst.Buffer buffer, Gst.Audio.AudioChannelPosition[] from_position, int from_channels, Gst.Audio.AudioChannelPosition[] to_position, int to_channels, float matrix) { + int cnt_from_position = from_position == null ? 0 : from_position.Length; + int[] native_from_position = new int [cnt_from_position]; + for (int i = 0; i < cnt_from_position; i++) + native_from_position [i] = (int) from_position[i]; + int cnt_to_position = to_position == null ? 0 : to_position.Length; + int[] native_to_position = new int [cnt_to_position]; + for (int i = 0; i < cnt_to_position; i++) + native_to_position [i] = (int) to_position[i]; + IntPtr raw_ret = gst_buffer_add_audio_downmix_meta(buffer == null ? IntPtr.Zero : buffer.Handle, native_from_position, from_channels, native_to_position, to_channels, matrix); + Gst.Audio.AudioDownmixMeta ret = Gst.Audio.AudioDownmixMeta.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_audio_meta(IntPtr buffer, IntPtr info, UIntPtr samples, UIntPtr offsets); + + public static Gst.Audio.AudioMeta BufferAddAudioMeta(Gst.Buffer buffer, Gst.Audio.AudioInfo info, ulong samples, ulong offsets) { + IntPtr raw_ret = gst_buffer_add_audio_meta(buffer == null ? IntPtr.Zero : buffer.Handle, info == null ? IntPtr.Zero : info.Handle, new UIntPtr (samples), new UIntPtr (offsets)); + Gst.Audio.AudioMeta ret = Gst.Audio.AudioMeta.New (raw_ret); + return ret; + } + + public static Gst.Audio.AudioMeta BufferAddAudioMeta(Gst.Buffer buffer, Gst.Audio.AudioInfo info, ulong samples) { + return BufferAddAudioMeta (buffer, info, samples, 0); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_audio_downmix_meta_for_channels(IntPtr buffer, int[] to_position, int to_channels); + + public static Gst.Audio.AudioDownmixMeta BufferGetAudioDownmixMetaForChannels(Gst.Buffer buffer, Gst.Audio.AudioChannelPosition[] to_position, int to_channels) { + int cnt_to_position = to_position == null ? 0 : to_position.Length; + int[] native_to_position = new int [cnt_to_position]; + for (int i = 0; i < cnt_to_position; i++) + native_to_position [i] = (int) to_position[i]; + IntPtr raw_ret = gst_buffer_get_audio_downmix_meta_for_channels(buffer == null ? IntPtr.Zero : buffer.Handle, native_to_position, to_channels); + Gst.Audio.AudioDownmixMeta ret = Gst.Audio.AudioDownmixMeta.New (raw_ret); + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_stream_volume_convert_volume(int from, int to, double val); + + public static double StreamVolumeConvertVolume(Gst.Audio.StreamVolumeFormat from, Gst.Audio.StreamVolumeFormat to, double val) { + double raw_ret = gst_stream_volume_convert_volume((int) from, (int) to, val); + double ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative.cs b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative.cs new file mode 100644 index 0000000000..04cd762038 --- /dev/null +++ b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioBaseSinkCustomSlavingCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.AudioSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AudioBaseSinkCustomSlavingCallbackNative(IntPtr sink, ulong etime, ulong itime, long requested_skew, int discont_reason, IntPtr user_data); + + internal class AudioBaseSinkCustomSlavingCallbackInvoker { + + AudioBaseSinkCustomSlavingCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioBaseSinkCustomSlavingCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioBaseSinkCustomSlavingCallbackInvoker (AudioBaseSinkCustomSlavingCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Audio.AudioBaseSinkCustomSlavingCallback Handler { + get { + return new Gst.Audio.AudioBaseSinkCustomSlavingCallback(InvokeNative); + } + } + + void InvokeNative (Gst.Audio.AudioBaseSink sink, ulong etime, ulong itime, long requested_skew, Gst.Audio.AudioBaseSinkDiscontReason discont_reason) + { + native_cb (sink == null ? IntPtr.Zero : sink.Handle, etime, itime, requested_skew, (int) discont_reason, __data); + } + } + + internal class AudioBaseSinkCustomSlavingCallbackWrapper { + + public void NativeCallback (IntPtr sink, ulong etime, ulong itime, long requested_skew, int discont_reason, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject(sink) as Gst.Audio.AudioBaseSink, etime, itime, requested_skew, (Gst.Audio.AudioBaseSinkDiscontReason) discont_reason); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioBaseSinkCustomSlavingCallbackNative NativeDelegate; + Gst.Audio.AudioBaseSinkCustomSlavingCallback managed; + + public AudioBaseSinkCustomSlavingCallbackWrapper (Gst.Audio.AudioBaseSinkCustomSlavingCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioBaseSinkCustomSlavingCallbackNative (NativeCallback); + } + + public static Gst.Audio.AudioBaseSinkCustomSlavingCallback GetManagedDelegate (AudioBaseSinkCustomSlavingCallbackNative native) + { + if (native == null) + return null; + AudioBaseSinkCustomSlavingCallbackWrapper wrapper = (AudioBaseSinkCustomSlavingCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/Gst.AudioSharp.AudioClockGetTimeFuncNative.cs b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioClockGetTimeFuncNative.cs new file mode 100644 index 0000000000..e043dc2ed9 --- /dev/null +++ b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioClockGetTimeFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.AudioSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate ulong AudioClockGetTimeFuncNative(IntPtr clock, IntPtr user_data); + + internal class AudioClockGetTimeFuncInvoker { + + AudioClockGetTimeFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioClockGetTimeFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioClockGetTimeFuncInvoker (AudioClockGetTimeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Audio.AudioClockGetTimeFunc Handler { + get { + return new Gst.Audio.AudioClockGetTimeFunc(InvokeNative); + } + } + + ulong InvokeNative (Gst.Clock clock) + { + ulong __result = native_cb (clock == null ? IntPtr.Zero : clock.Handle, __data); + return __result; + } + } + + internal class AudioClockGetTimeFuncWrapper { + + public ulong NativeCallback (IntPtr clock, IntPtr user_data) + { + try { + ulong __ret = managed (GLib.Object.GetObject(clock) as Gst.Clock); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioClockGetTimeFuncNative NativeDelegate; + Gst.Audio.AudioClockGetTimeFunc managed; + + public AudioClockGetTimeFuncWrapper (Gst.Audio.AudioClockGetTimeFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioClockGetTimeFuncNative (NativeCallback); + } + + public static Gst.Audio.AudioClockGetTimeFunc GetManagedDelegate (AudioClockGetTimeFuncNative native) + { + if (native == null) + return null; + AudioClockGetTimeFuncWrapper wrapper = (AudioClockGetTimeFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatPackNative.cs b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatPackNative.cs new file mode 100644 index 0000000000..7e19ad6986 --- /dev/null +++ b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatPackNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.AudioSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AudioFormatPackNative(IntPtr info, int flags, byte[] src, byte[] data, int n_length); + + internal class AudioFormatPackInvoker { + + AudioFormatPackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioFormatPackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioFormatPackInvoker (AudioFormatPackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioFormatPackInvoker (AudioFormatPackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioFormatPackInvoker (AudioFormatPackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Audio.AudioFormatPack Handler { + get { + return new Gst.Audio.AudioFormatPack(InvokeNative); + } + } + + void InvokeNative (Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] src, byte[] data) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + native_cb (native_info, (int) flags, src, data, (data == null ? 0 : data.Length)); + Marshal.FreeHGlobal (native_info); + } + } + + internal class AudioFormatPackWrapper { + + public void NativeCallback (IntPtr info, int flags, byte[] src, byte[] data, int n_length) + { + try { + managed (Gst.Audio.AudioFormatInfo.New (info), (Gst.Audio.AudioPackFlags) flags, src, data); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioFormatPackNative NativeDelegate; + Gst.Audio.AudioFormatPack managed; + + public AudioFormatPackWrapper (Gst.Audio.AudioFormatPack managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioFormatPackNative (NativeCallback); + } + + public static Gst.Audio.AudioFormatPack GetManagedDelegate (AudioFormatPackNative native) + { + if (native == null) + return null; + AudioFormatPackWrapper wrapper = (AudioFormatPackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatUnpackNative.cs b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatUnpackNative.cs new file mode 100644 index 0000000000..ff8cbaf45f --- /dev/null +++ b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioFormatUnpackNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.AudioSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AudioFormatUnpackNative(IntPtr info, int flags, byte[] dest, byte[] data, int n_length); + + internal class AudioFormatUnpackInvoker { + + AudioFormatUnpackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioFormatUnpackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioFormatUnpackInvoker (AudioFormatUnpackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Audio.AudioFormatUnpack Handler { + get { + return new Gst.Audio.AudioFormatUnpack(InvokeNative); + } + } + + void InvokeNative (Gst.Audio.AudioFormatInfo info, Gst.Audio.AudioPackFlags flags, byte[] dest, byte[] data) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + native_cb (native_info, (int) flags, dest, data, (data == null ? 0 : data.Length)); + Marshal.FreeHGlobal (native_info); + } + } + + internal class AudioFormatUnpackWrapper { + + public void NativeCallback (IntPtr info, int flags, byte[] dest, byte[] data, int n_length) + { + try { + managed (Gst.Audio.AudioFormatInfo.New (info), (Gst.Audio.AudioPackFlags) flags, dest, data); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioFormatUnpackNative NativeDelegate; + Gst.Audio.AudioFormatUnpack managed; + + public AudioFormatUnpackWrapper (Gst.Audio.AudioFormatUnpack managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioFormatUnpackNative (NativeCallback); + } + + public static Gst.Audio.AudioFormatUnpack GetManagedDelegate (AudioFormatUnpackNative native) + { + if (native == null) + return null; + AudioFormatUnpackWrapper wrapper = (AudioFormatUnpackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/Gst.AudioSharp.AudioRingBufferCallbackNative.cs b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioRingBufferCallbackNative.cs new file mode 100644 index 0000000000..d2e3dd468e --- /dev/null +++ b/sources/generated/Gst.Audio/Gst.AudioSharp.AudioRingBufferCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.AudioSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AudioRingBufferCallbackNative(IntPtr rbuf, byte[] data, uint len, IntPtr user_data); + + internal class AudioRingBufferCallbackInvoker { + + AudioRingBufferCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioRingBufferCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioRingBufferCallbackInvoker (AudioRingBufferCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Audio.AudioRingBufferCallback Handler { + get { + return new Gst.Audio.AudioRingBufferCallback(InvokeNative); + } + } + + void InvokeNative (Gst.Audio.AudioRingBuffer rbuf, byte[] data, uint len) + { + native_cb (rbuf == null ? IntPtr.Zero : rbuf.Handle, data, len, __data); + } + } + + internal class AudioRingBufferCallbackWrapper { + + public void NativeCallback (IntPtr rbuf, byte[] data, uint len, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject(rbuf) as Gst.Audio.AudioRingBuffer, data, len); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioRingBufferCallbackNative NativeDelegate; + Gst.Audio.AudioRingBufferCallback managed; + + public AudioRingBufferCallbackWrapper (Gst.Audio.AudioRingBufferCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioRingBufferCallbackNative (NativeCallback); + } + + public static Gst.Audio.AudioRingBufferCallback GetManagedDelegate (AudioRingBufferCallbackNative native) + { + if (native == null) + return null; + AudioRingBufferCallbackWrapper wrapper = (AudioRingBufferCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/IStreamVolume.cs b/sources/generated/Gst.Audio/IStreamVolume.cs new file mode 100644 index 0000000000..7615560e47 --- /dev/null +++ b/sources/generated/Gst.Audio/IStreamVolume.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + +#region Autogenerated code + public partial interface IStreamVolume : GLib.IWrapper { + + double GetVolume(Gst.Audio.StreamVolumeFormat format); + void SetVolume(Gst.Audio.StreamVolumeFormat format, double val); + bool Mute { + get; set; + } + } + + [GLib.GInterface (typeof (StreamVolumeAdapter))] + public partial interface IStreamVolumeImplementor : GLib.IWrapper { + + [GLib.Property ("mute")] + bool Mute { + get; set; + } + } +#endregion +} diff --git a/sources/generated/Gst.Audio/StreamVolumeAdapter.cs b/sources/generated/Gst.Audio/StreamVolumeAdapter.cs new file mode 100644 index 0000000000..6cd7d72db1 --- /dev/null +++ b/sources/generated/Gst.Audio/StreamVolumeAdapter.cs @@ -0,0 +1,148 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class StreamVolumeAdapter : GLib.GInterfaceAdapter, Gst.Audio.IStreamVolume { + + [StructLayout (LayoutKind.Sequential)] + struct GstStreamVolumeInterface { + } + + static GstStreamVolumeInterface iface; + + static StreamVolumeAdapter () + { + GLib.GType.Register (_gtype, typeof (StreamVolumeAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public StreamVolumeAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public StreamVolumeAdapter (IStreamVolumeImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public StreamVolumeAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_volume_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_stream_volume_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IStreamVolume GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IStreamVolume GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IStreamVolumeImplementor) + return new StreamVolumeAdapter (obj as IStreamVolumeImplementor); + else if (obj as IStreamVolume == null) + return new StreamVolumeAdapter (obj.Handle); + else + return obj as IStreamVolume; + } + + public IStreamVolumeImplementor Implementor { + get { + return implementor as IStreamVolumeImplementor; + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_stream_volume_get_mute(IntPtr raw); + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_volume_set_mute(IntPtr raw, bool mute); + + [GLib.Property ("mute")] + public bool Mute { + get { + bool raw_ret = gst_stream_volume_get_mute(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_stream_volume_set_mute(Handle, value); + } + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_stream_volume_convert_volume(int from, int to, double val); + + public static double ConvertVolume(Gst.Audio.StreamVolumeFormat from, Gst.Audio.StreamVolumeFormat to, double val) { + double raw_ret = gst_stream_volume_convert_volume((int) from, (int) to, val); + double ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_stream_volume_get_volume(IntPtr raw, int format); + + public double GetVolume(Gst.Audio.StreamVolumeFormat format) { + double raw_ret = gst_stream_volume_get_volume(Handle, (int) format); + double ret = raw_ret; + return ret; + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_volume_set_volume(IntPtr raw, int format, double val); + + public void SetVolume(Gst.Audio.StreamVolumeFormat format, double val) { + gst_stream_volume_set_volume(Handle, (int) format, val); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Audio/StreamVolumeFormat.cs b/sources/generated/Gst.Audio/StreamVolumeFormat.cs new file mode 100644 index 0000000000..d5d6628185 --- /dev/null +++ b/sources/generated/Gst.Audio/StreamVolumeFormat.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum StreamVolumeFormat { + + Linear = 0, + Cubic = 1, + Db = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Base/Adapter.cs b/sources/generated/Gst.Base/Adapter.cs new file mode 100644 index 0000000000..c21ac9b254 --- /dev/null +++ b/sources/generated/Gst.Base/Adapter.cs @@ -0,0 +1,303 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Adapter : GLib.Object { + + public Adapter (IntPtr raw) : base(raw) {} + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_new(); + + public Adapter () : base (IntPtr.Zero) + { + if (GetType () != typeof (Adapter)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_adapter_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_adapter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_adapter_available(IntPtr raw); + + public ulong Available() { + UIntPtr raw_ret = gst_adapter_available(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_adapter_available_fast(IntPtr raw); + + public ulong AvailableFast() { + UIntPtr raw_ret = gst_adapter_available_fast(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_adapter_clear(IntPtr raw); + + public void Clear() { + gst_adapter_clear(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_copy_bytes(IntPtr raw, UIntPtr offset, UIntPtr size); + + public GLib.Bytes CopyBytes(ulong offset, ulong size) { + IntPtr raw_ret = gst_adapter_copy_bytes(Handle, new UIntPtr (offset), new UIntPtr (size)); + GLib.Bytes ret = new GLib.Bytes(raw_ret); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_distance_from_discont(IntPtr raw); + + public ulong DistanceFromDiscont() { + ulong raw_ret = gst_adapter_distance_from_discont(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_dts_at_discont(IntPtr raw); + + public ulong DtsAtDiscont() { + ulong raw_ret = gst_adapter_dts_at_discont(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_adapter_flush(IntPtr raw, UIntPtr flush); + + public void Flush(ulong flush) { + gst_adapter_flush(Handle, new UIntPtr (flush)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_get_buffer(IntPtr raw, UIntPtr nbytes); + + public Gst.Buffer GetBuffer(ulong nbytes) { + IntPtr raw_ret = gst_adapter_get_buffer(Handle, new UIntPtr (nbytes)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_get_buffer_fast(IntPtr raw, UIntPtr nbytes); + + public Gst.Buffer GetBufferFast(ulong nbytes) { + IntPtr raw_ret = gst_adapter_get_buffer_fast(Handle, new UIntPtr (nbytes)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_get_buffer_list(IntPtr raw, UIntPtr nbytes); + + public Gst.BufferList GetBufferList(ulong nbytes) { + IntPtr raw_ret = gst_adapter_get_buffer_list(Handle, new UIntPtr (nbytes)); + Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_get_list(IntPtr raw, UIntPtr nbytes); + + public GLib.List[] GetList(ulong nbytes) { + IntPtr raw_ret = gst_adapter_get_list(Handle, new UIntPtr (nbytes)); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List)); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_masked_scan_uint32(IntPtr raw, uint mask, uint pattern, UIntPtr offset, UIntPtr size); + + public long MaskedScanUint32(uint mask, uint pattern, ulong offset, ulong size) { + IntPtr raw_ret = gst_adapter_masked_scan_uint32(Handle, mask, pattern, new UIntPtr (offset), new UIntPtr (size)); + long ret = (long) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_masked_scan_uint32_peek(IntPtr raw, uint mask, uint pattern, UIntPtr offset, UIntPtr size, out uint value); + + public long MaskedScanUint32Peek(uint mask, uint pattern, ulong offset, ulong size, out uint value) { + IntPtr raw_ret = gst_adapter_masked_scan_uint32_peek(Handle, mask, pattern, new UIntPtr (offset), new UIntPtr (size), out value); + long ret = (long) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_offset_at_discont(IntPtr raw); + + public ulong OffsetAtDiscont() { + ulong raw_ret = gst_adapter_offset_at_discont(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_prev_dts(IntPtr raw, out ulong distance); + + public ulong PrevDts(out ulong distance) { + ulong raw_ret = gst_adapter_prev_dts(Handle, out distance); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_prev_dts_at_offset(IntPtr raw, UIntPtr offset, out ulong distance); + + public ulong PrevDtsAtOffset(ulong offset, out ulong distance) { + ulong raw_ret = gst_adapter_prev_dts_at_offset(Handle, new UIntPtr (offset), out distance); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_prev_offset(IntPtr raw, out ulong distance); + + public ulong PrevOffset(out ulong distance) { + ulong raw_ret = gst_adapter_prev_offset(Handle, out distance); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_prev_pts(IntPtr raw, out ulong distance); + + public ulong PrevPts(out ulong distance) { + ulong raw_ret = gst_adapter_prev_pts(Handle, out distance); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_prev_pts_at_offset(IntPtr raw, UIntPtr offset, out ulong distance); + + public ulong PrevPtsAtOffset(ulong offset, out ulong distance) { + ulong raw_ret = gst_adapter_prev_pts_at_offset(Handle, new UIntPtr (offset), out distance); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_adapter_pts_at_discont(IntPtr raw); + + public ulong PtsAtDiscont() { + ulong raw_ret = gst_adapter_pts_at_discont(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_adapter_push(IntPtr raw, IntPtr buf); + + public void Push(Gst.Buffer buf) { + buf.Owned = false; + gst_adapter_push(Handle, buf == null ? IntPtr.Zero : buf.Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_take_buffer(IntPtr raw, UIntPtr nbytes); + + public Gst.Buffer TakeBuffer(ulong nbytes) { + IntPtr raw_ret = gst_adapter_take_buffer(Handle, new UIntPtr (nbytes)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_take_buffer_fast(IntPtr raw, UIntPtr nbytes); + + public Gst.Buffer TakeBufferFast(ulong nbytes) { + IntPtr raw_ret = gst_adapter_take_buffer_fast(Handle, new UIntPtr (nbytes)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_take_buffer_list(IntPtr raw, UIntPtr nbytes); + + public Gst.BufferList TakeBufferList(ulong nbytes) { + IntPtr raw_ret = gst_adapter_take_buffer_list(Handle, new UIntPtr (nbytes)); + Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_adapter_take_list(IntPtr raw, UIntPtr nbytes); + + public GLib.List[] TakeList(ulong nbytes) { + IntPtr raw_ret = gst_adapter_take_list(Handle, new UIntPtr (nbytes)); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List)); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_adapter_unmap(IntPtr raw); + + public void Unmap() { + gst_adapter_unmap(Handle); + } + + + static Adapter () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/Aggregator.cs b/sources/generated/Gst.Base/Aggregator.cs new file mode 100644 index 0000000000..a3b2037f59 --- /dev/null +++ b/sources/generated/Gst.Base/Aggregator.cs @@ -0,0 +1,1830 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Aggregator : Gst.Element { + + protected Aggregator (IntPtr raw) : base(raw) {} + + protected Aggregator() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("emit-signals")] + public bool EmitSignals { + get { + GLib.Value val = GetProperty ("emit-signals"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("emit-signals", val); + val.Dispose (); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_aggregator_get_latency(IntPtr raw); + + [GLib.Property ("latency")] + public ulong Latency { + get { + ulong raw_ret = gst_aggregator_get_latency(Handle); + ulong ret = raw_ret; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("latency", val); + val.Dispose (); + } + } + + [GLib.Property ("min-upstream-latency")] + public ulong MinUpstreamLatency { + get { + GLib.Value val = GetProperty ("min-upstream-latency"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("min-upstream-latency", val); + val.Dispose (); + } + } + + [GLib.Property ("start-time")] + public ulong StartTime { + get { + GLib.Value val = GetProperty ("start-time"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("start-time", val); + val.Dispose (); + } + } + + [GLib.Property ("start-time-selection")] + public Gst.Base.AggregatorStartTimeSelection StartTimeSelection { + get { + GLib.Value val = GetProperty ("start-time-selection"); + Gst.Base.AggregatorStartTimeSelection ret = (Gst.Base.AggregatorStartTimeSelection) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("start-time-selection", val); + val.Dispose (); + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + [GLib.Signal("samples-selected")] + public event Gst.Base.SamplesSelectedHandler SamplesSelected { + add { + this.AddSignalHandler ("samples-selected", value, typeof (Gst.Base.SamplesSelectedArgs)); + } + remove { + this.RemoveSignalHandler ("samples-selected", value); + } + } + + static SamplesSelectedNativeDelegate SamplesSelected_cb_delegate; + static SamplesSelectedNativeDelegate SamplesSelectedVMCallback { + get { + if (SamplesSelected_cb_delegate == null) + SamplesSelected_cb_delegate = new SamplesSelectedNativeDelegate (SamplesSelected_cb); + return SamplesSelected_cb_delegate; + } + } + + static void OverrideSamplesSelected (GLib.GType gtype) + { + OverrideSamplesSelected (gtype, SamplesSelectedVMCallback); + } + + static void OverrideSamplesSelected (GLib.GType gtype, SamplesSelectedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "samples-selected", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SamplesSelectedNativeDelegate (IntPtr inst, IntPtr segment, ulong pts, ulong dts, ulong duration, IntPtr info); + + static void SamplesSelected_cb (IntPtr inst, IntPtr segment, ulong pts, ulong dts, ulong duration, IntPtr info) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + __obj.OnSamplesSelected (Gst.Segment.New (segment), pts, dts, duration, info == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (info, typeof (Gst.Structure), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSamplesSelected")] + protected virtual void OnSamplesSelected (Gst.Segment segment, ulong pts, ulong dts, ulong duration, Gst.Structure info) + { + InternalSamplesSelected (segment, pts, dts, duration, info); + } + + private void InternalSamplesSelected (Gst.Segment segment, ulong pts, ulong dts, ulong duration, Gst.Structure info) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (6); + GLib.Value[] vals = new GLib.Value [6]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (segment); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (pts); + inst_and_params.Append (vals [2]); + vals [3] = new GLib.Value (dts); + inst_and_params.Append (vals [3]); + vals [4] = new GLib.Value (duration); + inst_and_params.Append (vals [4]); + vals [5] = new GLib.Value (info); + inst_and_params.Append (vals [5]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FlushNativeDelegate (IntPtr inst); + + static int Flush_cb (IntPtr inst) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + __result = __obj.OnFlush (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideFlush")] + protected virtual Gst.FlowReturn OnFlush () + { + return InternalFlush (); + } + + private Gst.FlowReturn InternalFlush () + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static ClipNativeDelegate Clip_cb_delegate; + static ClipNativeDelegate ClipVMCallback { + get { + if (Clip_cb_delegate == null) + Clip_cb_delegate = new ClipNativeDelegate (Clip_cb); + return Clip_cb_delegate; + } + } + + static void OverrideClip (GLib.GType gtype) + { + OverrideClip (gtype, ClipVMCallback); + } + + static void OverrideClip (GLib.GType gtype, ClipNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("clip")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ClipNativeDelegate (IntPtr inst, IntPtr aggregator_pad, IntPtr buf); + + static IntPtr Clip_cb (IntPtr inst, IntPtr aggregator_pad, IntPtr buf) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.Buffer __result; + __result = __obj.OnClip (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad, buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideClip")] + protected virtual Gst.Buffer OnClip (Gst.Base.AggregatorPad aggregator_pad, Gst.Buffer buf) + { + return InternalClip (aggregator_pad, buf); + } + + private Gst.Buffer InternalClip (Gst.Base.AggregatorPad aggregator_pad, Gst.Buffer buf) + { + ClipNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("clip")); + unmanaged = (ClipNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ClipNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + static FinishBufferNativeDelegate FinishBuffer_cb_delegate; + static FinishBufferNativeDelegate FinishBufferVMCallback { + get { + if (FinishBuffer_cb_delegate == null) + FinishBuffer_cb_delegate = new FinishBufferNativeDelegate (FinishBuffer_cb); + return FinishBuffer_cb_delegate; + } + } + + static void OverrideFinishBuffer (GLib.GType gtype) + { + OverrideFinishBuffer (gtype, FinishBufferVMCallback); + } + + static void OverrideFinishBuffer (GLib.GType gtype, FinishBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("finish_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FinishBufferNativeDelegate (IntPtr inst, IntPtr buffer); + + static int FinishBuffer_cb (IntPtr inst, IntPtr buffer) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + __result = __obj.OnFinishBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), true)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideFinishBuffer")] + protected virtual Gst.FlowReturn OnFinishBuffer (Gst.Buffer buffer) + { + return InternalFinishBuffer (buffer); + } + + private Gst.FlowReturn InternalFinishBuffer (Gst.Buffer buffer) + { + FinishBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("finish_buffer")); + unmanaged = (FinishBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FinishBufferNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + buffer.Owned = false; + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr aggregator_pad, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr aggregator_pad, IntPtr evnt) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSinkEvent (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad, evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Base.AggregatorPad aggregator_pad, Gst.Event evnt) + { + return InternalSinkEvent (aggregator_pad, evnt); + } + + private bool InternalSinkEvent (Gst.Base.AggregatorPad aggregator_pad, Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr aggregator_pad, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr aggregator_pad, IntPtr query) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSinkQuery (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query) + { + return InternalSinkQuery (aggregator_pad, query); + } + + private bool InternalSinkQuery (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcActivateNativeDelegate SrcActivate_cb_delegate; + static SrcActivateNativeDelegate SrcActivateVMCallback { + get { + if (SrcActivate_cb_delegate == null) + SrcActivate_cb_delegate = new SrcActivateNativeDelegate (SrcActivate_cb); + return SrcActivate_cb_delegate; + } + } + + static void OverrideSrcActivate (GLib.GType gtype) + { + OverrideSrcActivate (gtype, SrcActivateVMCallback); + } + + static void OverrideSrcActivate (GLib.GType gtype, SrcActivateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_activate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcActivateNativeDelegate (IntPtr inst, int mode, bool active); + + static bool SrcActivate_cb (IntPtr inst, int mode, bool active) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSrcActivate ((Gst.PadMode) mode, active); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSrcActivate")] + protected virtual bool OnSrcActivate (Gst.PadMode mode, bool active) + { + return InternalSrcActivate (mode, active); + } + + private bool InternalSrcActivate (Gst.PadMode mode, bool active) + { + SrcActivateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_activate")); + unmanaged = (SrcActivateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcActivateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, (int) mode, active); + return __result; + } + + static AggregateNativeDelegate Aggregate_cb_delegate; + static AggregateNativeDelegate AggregateVMCallback { + get { + if (Aggregate_cb_delegate == null) + Aggregate_cb_delegate = new AggregateNativeDelegate (Aggregate_cb); + return Aggregate_cb_delegate; + } + } + + static void OverrideAggregate (GLib.GType gtype) + { + OverrideAggregate (gtype, AggregateVMCallback); + } + + static void OverrideAggregate (GLib.GType gtype, AggregateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("aggregate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AggregateNativeDelegate (IntPtr inst, bool timeout); + + static int Aggregate_cb (IntPtr inst, bool timeout) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + __result = __obj.OnAggregate (timeout); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideAggregate")] + protected virtual Gst.FlowReturn OnAggregate (bool timeout) + { + return InternalAggregate (timeout); + } + + private Gst.FlowReturn InternalAggregate (bool timeout) + { + AggregateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("aggregate")); + unmanaged = (AggregateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AggregateNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, timeout); + return (Gst.FlowReturn) __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static GetNextTimeNativeDelegate GetNextTime_cb_delegate; + static GetNextTimeNativeDelegate GetNextTimeVMCallback { + get { + if (GetNextTime_cb_delegate == null) + GetNextTime_cb_delegate = new GetNextTimeNativeDelegate (GetNextTime_cb); + return GetNextTime_cb_delegate; + } + } + + static void OverrideGetNextTime (GLib.GType gtype) + { + OverrideGetNextTime (gtype, GetNextTimeVMCallback); + } + + static void OverrideGetNextTime (GLib.GType gtype, GetNextTimeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_next_time")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate ulong GetNextTimeNativeDelegate (IntPtr inst); + + static ulong GetNextTime_cb (IntPtr inst) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + ulong __result; + __result = __obj.OnGetNextTime (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideGetNextTime")] + protected virtual ulong OnGetNextTime () + { + return InternalGetNextTime (); + } + + private ulong InternalGetNextTime () + { + GetNextTimeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_next_time")); + unmanaged = (GetNextTimeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetNextTimeNativeDelegate)); + } + if (unmanaged == null) return 0; + + ulong __result = unmanaged (this.Handle); + return __result; + } + + static UpdateSrcCapsNativeDelegate UpdateSrcCaps_cb_delegate; + static UpdateSrcCapsNativeDelegate UpdateSrcCapsVMCallback { + get { + if (UpdateSrcCaps_cb_delegate == null) + UpdateSrcCaps_cb_delegate = new UpdateSrcCapsNativeDelegate (UpdateSrcCaps_cb); + return UpdateSrcCaps_cb_delegate; + } + } + + static void OverrideUpdateSrcCaps (GLib.GType gtype) + { + OverrideUpdateSrcCaps (gtype, UpdateSrcCapsVMCallback); + } + + static void OverrideUpdateSrcCaps (GLib.GType gtype, UpdateSrcCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("update_src_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int UpdateSrcCapsNativeDelegate (IntPtr inst, IntPtr caps, out IntPtr _ret); + + static int UpdateSrcCaps_cb (IntPtr inst, IntPtr caps, out IntPtr _ret) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + Gst.Caps my_ret; + __result = __obj.OnUpdateSrcCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), out my_ret); + _ret = my_ret == null ? IntPtr.Zero : my_ret.Handle; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideUpdateSrcCaps")] + protected virtual Gst.FlowReturn OnUpdateSrcCaps (Gst.Caps caps, out Gst.Caps _ret) + { + return InternalUpdateSrcCaps (caps, out _ret); + } + + private Gst.FlowReturn InternalUpdateSrcCaps (Gst.Caps caps, out Gst.Caps _ret) + { + UpdateSrcCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("update_src_caps")); + unmanaged = (UpdateSrcCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UpdateSrcCapsNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native__ret; + int __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle, out native__ret); + _ret = native__ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native__ret, typeof (Gst.Caps), true); + return (Gst.FlowReturn) __result; + } + + static FixateSrcCapsNativeDelegate FixateSrcCaps_cb_delegate; + static FixateSrcCapsNativeDelegate FixateSrcCapsVMCallback { + get { + if (FixateSrcCaps_cb_delegate == null) + FixateSrcCaps_cb_delegate = new FixateSrcCapsNativeDelegate (FixateSrcCaps_cb); + return FixateSrcCaps_cb_delegate; + } + } + + static void OverrideFixateSrcCaps (GLib.GType gtype) + { + OverrideFixateSrcCaps (gtype, FixateSrcCapsVMCallback); + } + + static void OverrideFixateSrcCaps (GLib.GType gtype, FixateSrcCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_src_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr FixateSrcCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static IntPtr FixateSrcCaps_cb (IntPtr inst, IntPtr caps) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.Caps __result; + __result = __obj.OnFixateSrcCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideFixateSrcCaps")] + protected virtual Gst.Caps OnFixateSrcCaps (Gst.Caps caps) + { + return InternalFixateSrcCaps (caps); + } + + private Gst.Caps InternalFixateSrcCaps (Gst.Caps caps) + { + FixateSrcCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_src_caps")); + unmanaged = (FixateSrcCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FixateSrcCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static NegotiatedSrcCapsNativeDelegate NegotiatedSrcCaps_cb_delegate; + static NegotiatedSrcCapsNativeDelegate NegotiatedSrcCapsVMCallback { + get { + if (NegotiatedSrcCaps_cb_delegate == null) + NegotiatedSrcCaps_cb_delegate = new NegotiatedSrcCapsNativeDelegate (NegotiatedSrcCaps_cb); + return NegotiatedSrcCaps_cb_delegate; + } + } + + static void OverrideNegotiatedSrcCaps (GLib.GType gtype) + { + OverrideNegotiatedSrcCaps (gtype, NegotiatedSrcCapsVMCallback); + } + + static void OverrideNegotiatedSrcCaps (GLib.GType gtype, NegotiatedSrcCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiated_src_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiatedSrcCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool NegotiatedSrcCaps_cb (IntPtr inst, IntPtr caps) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnNegotiatedSrcCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideNegotiatedSrcCaps")] + protected virtual bool OnNegotiatedSrcCaps (Gst.Caps caps) + { + return InternalNegotiatedSrcCaps (caps); + } + + private bool InternalNegotiatedSrcCaps (Gst.Caps caps) + { + NegotiatedSrcCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiated_src_caps")); + unmanaged = (NegotiatedSrcCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiatedSrcCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr pad, IntPtr decide_query, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr pad, IntPtr decide_query, IntPtr query) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnProposeAllocation (GLib.Object.GetObject(pad) as Gst.Base.AggregatorPad, decide_query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (decide_query, typeof (Gst.Query), false), query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Base.AggregatorPad pad, Gst.Query decide_query, Gst.Query query) + { + return InternalProposeAllocation (pad, decide_query, query); + } + + private bool InternalProposeAllocation (Gst.Base.AggregatorPad pad, Gst.Query decide_query, Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle, decide_query == null ? IntPtr.Zero : decide_query.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SinkEventPreQueueNativeDelegate SinkEventPreQueue_cb_delegate; + static SinkEventPreQueueNativeDelegate SinkEventPreQueueVMCallback { + get { + if (SinkEventPreQueue_cb_delegate == null) + SinkEventPreQueue_cb_delegate = new SinkEventPreQueueNativeDelegate (SinkEventPreQueue_cb); + return SinkEventPreQueue_cb_delegate; + } + } + + static void OverrideSinkEventPreQueue (GLib.GType gtype) + { + OverrideSinkEventPreQueue (gtype, SinkEventPreQueueVMCallback); + } + + static void OverrideSinkEventPreQueue (GLib.GType gtype, SinkEventPreQueueNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event_pre_queue")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int SinkEventPreQueueNativeDelegate (IntPtr inst, IntPtr aggregator_pad, IntPtr evnt); + + static int SinkEventPreQueue_cb (IntPtr inst, IntPtr aggregator_pad, IntPtr evnt) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + __result = __obj.OnSinkEventPreQueue (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad, evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSinkEventPreQueue")] + protected virtual Gst.FlowReturn OnSinkEventPreQueue (Gst.Base.AggregatorPad aggregator_pad, Gst.Event evnt) + { + return InternalSinkEventPreQueue (aggregator_pad, evnt); + } + + private Gst.FlowReturn InternalSinkEventPreQueue (Gst.Base.AggregatorPad aggregator_pad, Gst.Event evnt) + { + SinkEventPreQueueNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event_pre_queue")); + unmanaged = (SinkEventPreQueueNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventPreQueueNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkQueryPreQueueNativeDelegate SinkQueryPreQueue_cb_delegate; + static SinkQueryPreQueueNativeDelegate SinkQueryPreQueueVMCallback { + get { + if (SinkQueryPreQueue_cb_delegate == null) + SinkQueryPreQueue_cb_delegate = new SinkQueryPreQueueNativeDelegate (SinkQueryPreQueue_cb); + return SinkQueryPreQueue_cb_delegate; + } + } + + static void OverrideSinkQueryPreQueue (GLib.GType gtype) + { + OverrideSinkQueryPreQueue (gtype, SinkQueryPreQueueVMCallback); + } + + static void OverrideSinkQueryPreQueue (GLib.GType gtype, SinkQueryPreQueueNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query_pre_queue")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryPreQueueNativeDelegate (IntPtr inst, IntPtr aggregator_pad, IntPtr query); + + static bool SinkQueryPreQueue_cb (IntPtr inst, IntPtr aggregator_pad, IntPtr query) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + bool __result; + __result = __obj.OnSinkQueryPreQueue (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideSinkQueryPreQueue")] + protected virtual bool OnSinkQueryPreQueue (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query) + { + return InternalSinkQueryPreQueue (aggregator_pad, query); + } + + private bool InternalSinkQueryPreQueue (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query) + { + SinkQueryPreQueueNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query_pre_queue")); + unmanaged = (SinkQueryPreQueueNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryPreQueueNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static FinishBufferListNativeDelegate FinishBufferList_cb_delegate; + static FinishBufferListNativeDelegate FinishBufferListVMCallback { + get { + if (FinishBufferList_cb_delegate == null) + FinishBufferList_cb_delegate = new FinishBufferListNativeDelegate (FinishBufferList_cb); + return FinishBufferList_cb_delegate; + } + } + + static void OverrideFinishBufferList (GLib.GType gtype) + { + OverrideFinishBufferList (gtype, FinishBufferListVMCallback); + } + + static void OverrideFinishBufferList (GLib.GType gtype, FinishBufferListNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("finish_buffer_list")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FinishBufferListNativeDelegate (IntPtr inst, IntPtr bufferlist); + + static int FinishBufferList_cb (IntPtr inst, IntPtr bufferlist) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.FlowReturn __result; + __result = __obj.OnFinishBufferList (bufferlist == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (bufferlist, typeof (Gst.BufferList), true)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverrideFinishBufferList")] + protected virtual Gst.FlowReturn OnFinishBufferList (Gst.BufferList bufferlist) + { + return InternalFinishBufferList (bufferlist); + } + + private Gst.FlowReturn InternalFinishBufferList (Gst.BufferList bufferlist) + { + FinishBufferListNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("finish_buffer_list")); + unmanaged = (FinishBufferListNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FinishBufferListNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + bufferlist.Owned = false; + int __result = unmanaged (this.Handle, bufferlist == null ? IntPtr.Zero : bufferlist.Handle); + return (Gst.FlowReturn) __result; + } + + static PeekNextSampleNativeDelegate PeekNextSample_cb_delegate; + static PeekNextSampleNativeDelegate PeekNextSampleVMCallback { + get { + if (PeekNextSample_cb_delegate == null) + PeekNextSample_cb_delegate = new PeekNextSampleNativeDelegate (PeekNextSample_cb); + return PeekNextSample_cb_delegate; + } + } + + static void OverridePeekNextSample (GLib.GType gtype) + { + OverridePeekNextSample (gtype, PeekNextSampleVMCallback); + } + + static void OverridePeekNextSample (GLib.GType gtype, PeekNextSampleNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("peek_next_sample")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr PeekNextSampleNativeDelegate (IntPtr inst, IntPtr aggregator_pad); + + static IntPtr PeekNextSample_cb (IntPtr inst, IntPtr aggregator_pad) + { + try { + Aggregator __obj = GLib.Object.GetObject (inst, false) as Aggregator; + Gst.Sample __result; + __result = __obj.OnPeekNextSample (GLib.Object.GetObject(aggregator_pad) as Gst.Base.AggregatorPad); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.Aggregator), ConnectionMethod="OverridePeekNextSample")] + protected virtual Gst.Sample OnPeekNextSample (Gst.Base.AggregatorPad aggregator_pad) + { + return InternalPeekNextSample (aggregator_pad); + } + + private Gst.Sample InternalPeekNextSample (Gst.Base.AggregatorPad aggregator_pad) + { + PeekNextSampleNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("peek_next_sample")); + unmanaged = (PeekNextSampleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PeekNextSampleNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, aggregator_pad == null ? IntPtr.Zero : aggregator_pad.Handle); + return __result == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (__result, typeof (Gst.Sample), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("flush" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , null + , "clip" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clip" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clip + , "flush" + , "finish_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("finish_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finish_buffer + , "clip" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "finish_buffer" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "sink_event" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_query" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "src_event" + , "src_activate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_activate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_activate + , "src_query" + , "aggregate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("aggregate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // aggregate + , "src_activate" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "aggregate" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "stop" + , "get_next_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_next_time" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_next_time + , "start" + , "create_new_pad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create_new_pad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_new_pad + , "get_next_time" + , "update_src_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("update_src_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // update_src_caps + , "create_new_pad" + , "fixate_src_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fixate_src_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixate_src_caps + , "update_src_caps" + , "negotiated_src_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiated_src_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiated_src_caps + , "fixate_src_caps" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "negotiated_src_caps" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "decide_allocation" + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "propose_allocation" + , "sink_event_pre_queue" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event_pre_queue" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event_pre_queue + , "negotiate" + , "sink_query_pre_queue" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query_pre_queue" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query_pre_queue + , "sink_event_pre_queue" + , "finish_buffer_list" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("finish_buffer_list" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finish_buffer_list + , "sink_query_pre_queue" + , "peek_next_sample" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("peek_next_sample" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // peek_next_sample + , "finish_buffer_list" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 15 // _gst_reserved + , "peek_next_sample" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_aggregator_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_aggregator_finish_buffer(IntPtr raw, IntPtr buffer); + + public Gst.FlowReturn FinishBuffer(Gst.Buffer buffer) { + buffer.Owned = false; + int raw_ret = gst_aggregator_finish_buffer(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_aggregator_finish_buffer_list(IntPtr raw, IntPtr bufferlist); + + public Gst.FlowReturn FinishBufferList(Gst.BufferList bufferlist) { + bufferlist.Owned = false; + int raw_ret = gst_aggregator_finish_buffer_list(Handle, bufferlist == null ? IntPtr.Zero : bufferlist.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_aggregator_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_aggregator_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_get_buffer_pool(IntPtr raw); + + public Gst.BufferPool BufferPool { + get { + IntPtr raw_ret = gst_aggregator_get_buffer_pool(Handle); + Gst.BufferPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.BufferPool; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_aggregator_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_aggregator_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_peek_next_sample(IntPtr raw, IntPtr pad); + + public Gst.Sample PeekNextSample(Gst.Base.AggregatorPad pad) { + IntPtr raw_ret = gst_aggregator_peek_next_sample(Handle, pad == null ? IntPtr.Zero : pad.Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_aggregator_selected_samples(IntPtr raw, ulong pts, ulong dts, ulong duration, IntPtr info); + + public void SelectedSamples(ulong pts, ulong dts, ulong duration, Gst.Structure info) { + gst_aggregator_selected_samples(Handle, pts, dts, duration, info == null ? IntPtr.Zero : info.Handle); + } + + public void SelectedSamples(ulong pts, ulong dts, ulong duration) { + SelectedSamples (pts, dts, duration, null); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_aggregator_set_latency(IntPtr raw, ulong min_latency, ulong max_latency); + + public void SetLatency(ulong min_latency, ulong max_latency) { + gst_aggregator_set_latency(Handle, min_latency, max_latency); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_aggregator_set_src_caps(IntPtr raw, IntPtr caps); + + public Gst.Caps SrcCaps { + set { + gst_aggregator_set_src_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_aggregator_simple_get_next_time(IntPtr raw); + + public ulong SimpleGetNextTime() { + ulong raw_ret = gst_aggregator_simple_get_next_time(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_aggregator_update_segment(IntPtr raw, IntPtr segment); + + public void UpdateSegment(Gst.Segment segment) { + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + gst_aggregator_update_segment(Handle, native_segment); + Marshal.FreeHGlobal (native_segment); + } + + + static Aggregator () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("srcpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "srcpad" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/AggregatorPad.cs b/sources/generated/Gst.Base/AggregatorPad.cs new file mode 100644 index 0000000000..0ad884c3f6 --- /dev/null +++ b/sources/generated/Gst.Base/AggregatorPad.cs @@ -0,0 +1,376 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AggregatorPad : Gst.Pad { + + public AggregatorPad (IntPtr raw) : base(raw) {} + + protected AggregatorPad() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("emit-signals")] + public bool EmitSignals { + get { + GLib.Value val = GetProperty ("emit-signals"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("emit-signals", val); + val.Dispose (); + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + [GLib.Signal("buffer-consumed")] + public event Gst.Base.BufferConsumedHandler BufferConsumed { + add { + this.AddSignalHandler ("buffer-consumed", value, typeof (Gst.Base.BufferConsumedArgs)); + } + remove { + this.RemoveSignalHandler ("buffer-consumed", value); + } + } + + static BufferConsumedNativeDelegate BufferConsumed_cb_delegate; + static BufferConsumedNativeDelegate BufferConsumedVMCallback { + get { + if (BufferConsumed_cb_delegate == null) + BufferConsumed_cb_delegate = new BufferConsumedNativeDelegate (BufferConsumed_cb); + return BufferConsumed_cb_delegate; + } + } + + static void OverrideBufferConsumed (GLib.GType gtype) + { + OverrideBufferConsumed (gtype, BufferConsumedVMCallback); + } + + static void OverrideBufferConsumed (GLib.GType gtype, BufferConsumedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "buffer-consumed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void BufferConsumedNativeDelegate (IntPtr inst, IntPtr _object); + + static void BufferConsumed_cb (IntPtr inst, IntPtr _object) + { + try { + AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad; + __obj.OnBufferConsumed (_object == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_object, typeof (Gst.Buffer), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideBufferConsumed")] + protected virtual void OnBufferConsumed (Gst.Buffer _object) + { + InternalBufferConsumed (_object); + } + + private void InternalBufferConsumed (Gst.Buffer _object) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FlushNativeDelegate (IntPtr inst, IntPtr aggregator); + + static int Flush_cb (IntPtr inst, IntPtr aggregator) + { + try { + AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad; + Gst.FlowReturn __result; + __result = __obj.OnFlush (GLib.Object.GetObject(aggregator) as Gst.Base.Aggregator); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideFlush")] + protected virtual Gst.FlowReturn OnFlush (Gst.Base.Aggregator aggregator) + { + return InternalFlush (aggregator); + } + + private Gst.FlowReturn InternalFlush (Gst.Base.Aggregator aggregator) + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, aggregator == null ? IntPtr.Zero : aggregator.Handle); + return (Gst.FlowReturn) __result; + } + + static SkipBufferNativeDelegate SkipBuffer_cb_delegate; + static SkipBufferNativeDelegate SkipBufferVMCallback { + get { + if (SkipBuffer_cb_delegate == null) + SkipBuffer_cb_delegate = new SkipBufferNativeDelegate (SkipBuffer_cb); + return SkipBuffer_cb_delegate; + } + } + + static void OverrideSkipBuffer (GLib.GType gtype) + { + OverrideSkipBuffer (gtype, SkipBufferVMCallback); + } + + static void OverrideSkipBuffer (GLib.GType gtype, SkipBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("skip_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SkipBufferNativeDelegate (IntPtr inst, IntPtr aggregator, IntPtr buffer); + + static bool SkipBuffer_cb (IntPtr inst, IntPtr aggregator, IntPtr buffer) + { + try { + AggregatorPad __obj = GLib.Object.GetObject (inst, false) as AggregatorPad; + bool __result; + __result = __obj.OnSkipBuffer (GLib.Object.GetObject(aggregator) as Gst.Base.Aggregator, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.AggregatorPad), ConnectionMethod="OverrideSkipBuffer")] + protected virtual bool OnSkipBuffer (Gst.Base.Aggregator aggregator, Gst.Buffer buffer) + { + return InternalSkipBuffer (aggregator, buffer); + } + + private bool InternalSkipBuffer (Gst.Base.Aggregator aggregator, Gst.Buffer buffer) + { + SkipBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("skip_buffer")); + unmanaged = (SkipBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SkipBufferNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, aggregator == null ? IntPtr.Zero : aggregator.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("flush" + , Gst.Pad.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , null + , "skip_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("skip_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // skip_buffer + , "flush" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "skip_buffer" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_aggregator_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_aggregator_pad_drop_buffer(IntPtr raw); + + public bool DropBuffer() { + bool raw_ret = gst_aggregator_pad_drop_buffer(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_aggregator_pad_has_buffer(IntPtr raw); + + public bool HasBuffer { + get { + bool raw_ret = gst_aggregator_pad_has_buffer(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_aggregator_pad_is_eos(IntPtr raw); + + public bool IsEos { + get { + bool raw_ret = gst_aggregator_pad_is_eos(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_pad_peek_buffer(IntPtr raw); + + public Gst.Buffer PeekBuffer() { + IntPtr raw_ret = gst_aggregator_pad_peek_buffer(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_pad_pop_buffer(IntPtr raw); + + public Gst.Buffer PopBuffer() { + IntPtr raw_ret = gst_aggregator_pad_pop_buffer(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + + static AggregatorPad () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("segment" + , Gst.Pad.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , null + , "priv" + , (long) Marshal.OffsetOf(typeof(GstAggregatorPad_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "segment" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAggregatorPad_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/AggregatorStartTimeSelection.cs b/sources/generated/Gst.Base/AggregatorStartTimeSelection.cs new file mode 100644 index 0000000000..df0d7ec507 --- /dev/null +++ b/sources/generated/Gst.Base/AggregatorStartTimeSelection.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Base.AggregatorStartTimeSelectionGType))] + public enum AggregatorStartTimeSelection { + + Zero = 0, + First = 1, + Set = 2, + } + + internal class AggregatorStartTimeSelectionGType { + [DllImport ("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_aggregator_start_time_selection_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_aggregator_start_time_selection_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/BaseParse.cs b/sources/generated/Gst.Base/BaseParse.cs new file mode 100644 index 0000000000..de7fe3d250 --- /dev/null +++ b/sources/generated/Gst.Base/BaseParse.cs @@ -0,0 +1,1139 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseParse : Gst.Element { + + protected BaseParse (IntPtr raw) : base(raw) {} + + protected BaseParse() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("disable-passthrough")] + public bool DisablePassthrough { + get { + GLib.Value val = GetProperty ("disable-passthrough"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("disable-passthrough", val); + val.Dispose (); + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public uint Flags { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + return (*raw_ptr); + } + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SetSinkCapsNativeDelegate SetSinkCaps_cb_delegate; + static SetSinkCapsNativeDelegate SetSinkCapsVMCallback { + get { + if (SetSinkCaps_cb_delegate == null) + SetSinkCaps_cb_delegate = new SetSinkCapsNativeDelegate (SetSinkCaps_cb); + return SetSinkCaps_cb_delegate; + } + } + + static void OverrideSetSinkCaps (GLib.GType gtype) + { + OverrideSetSinkCaps (gtype, SetSinkCapsVMCallback); + } + + static void OverrideSetSinkCaps (GLib.GType gtype, SetSinkCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_sink_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetSinkCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetSinkCaps_cb (IntPtr inst, IntPtr caps) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnSetSinkCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideSetSinkCaps")] + protected virtual bool OnSetSinkCaps (Gst.Caps caps) + { + return InternalSetSinkCaps (caps); + } + + private bool InternalSetSinkCaps (Gst.Caps caps) + { + SetSinkCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_sink_caps")); + unmanaged = (SetSinkCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetSinkCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static HandleFrameNativeDelegate HandleFrame_cb_delegate; + static HandleFrameNativeDelegate HandleFrameVMCallback { + get { + if (HandleFrame_cb_delegate == null) + HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb); + return HandleFrame_cb_delegate; + } + } + + static void OverrideHandleFrame (GLib.GType gtype) + { + OverrideHandleFrame (gtype, HandleFrameVMCallback); + } + + static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr frame, int skipsize); + + static int HandleFrame_cb (IntPtr inst, IntPtr frame, int skipsize) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + Gst.FlowReturn __result; + __result = __obj.OnHandleFrame (Gst.Base.BaseParseFrame.New (frame), skipsize); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideHandleFrame")] + protected virtual Gst.FlowReturn OnHandleFrame (Gst.Base.BaseParseFrame frame, int skipsize) + { + return InternalHandleFrame (frame, skipsize); + } + + private Gst.FlowReturn InternalHandleFrame (Gst.Base.BaseParseFrame frame, int skipsize) + { + HandleFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame, skipsize); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static PrePushFrameNativeDelegate PrePushFrame_cb_delegate; + static PrePushFrameNativeDelegate PrePushFrameVMCallback { + get { + if (PrePushFrame_cb_delegate == null) + PrePushFrame_cb_delegate = new PrePushFrameNativeDelegate (PrePushFrame_cb); + return PrePushFrame_cb_delegate; + } + } + + static void OverridePrePushFrame (GLib.GType gtype) + { + OverridePrePushFrame (gtype, PrePushFrameVMCallback); + } + + static void OverridePrePushFrame (GLib.GType gtype, PrePushFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrePushFrameNativeDelegate (IntPtr inst, IntPtr frame); + + static int PrePushFrame_cb (IntPtr inst, IntPtr frame) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + Gst.FlowReturn __result; + __result = __obj.OnPrePushFrame (Gst.Base.BaseParseFrame.New (frame)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverridePrePushFrame")] + protected virtual Gst.FlowReturn OnPrePushFrame (Gst.Base.BaseParseFrame frame) + { + return InternalPrePushFrame (frame); + } + + private Gst.FlowReturn InternalPrePushFrame (Gst.Base.BaseParseFrame frame) + { + PrePushFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push_frame")); + unmanaged = (PrePushFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrePushFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static ConvertNativeDelegate Convert_cb_delegate; + static ConvertNativeDelegate ConvertVMCallback { + get { + if (Convert_cb_delegate == null) + Convert_cb_delegate = new ConvertNativeDelegate (Convert_cb); + return Convert_cb_delegate; + } + } + + static void OverrideConvert (GLib.GType gtype) + { + OverrideConvert (gtype, ConvertVMCallback); + } + + static void OverrideConvert (GLib.GType gtype, ConvertNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("convert")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ConvertNativeDelegate (IntPtr inst, int src_format, long src_value, int dest_format, long dest_value); + + static bool Convert_cb (IntPtr inst, int src_format, long src_value, int dest_format, long dest_value) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnConvert ((Gst.Format) src_format, src_value, (Gst.Format) dest_format, dest_value); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideConvert")] + protected virtual bool OnConvert (Gst.Format src_format, long src_value, Gst.Format dest_format, long dest_value) + { + return InternalConvert (src_format, src_value, dest_format, dest_value); + } + + private bool InternalConvert (Gst.Format src_format, long src_value, Gst.Format dest_format, long dest_value) + { + ConvertNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("convert")); + unmanaged = (ConvertNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ConvertNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, (int) src_format, src_value, (int) dest_format, dest_value); + return __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static GetSinkCapsNativeDelegate GetSinkCaps_cb_delegate; + static GetSinkCapsNativeDelegate GetSinkCapsVMCallback { + get { + if (GetSinkCaps_cb_delegate == null) + GetSinkCaps_cb_delegate = new GetSinkCapsNativeDelegate (GetSinkCaps_cb); + return GetSinkCaps_cb_delegate; + } + } + + static void OverrideGetSinkCaps (GLib.GType gtype) + { + OverrideGetSinkCaps (gtype, GetSinkCapsVMCallback); + } + + static void OverrideGetSinkCaps (GLib.GType gtype, GetSinkCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_sink_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetSinkCapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr GetSinkCaps_cb (IntPtr inst, IntPtr filter) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + Gst.Caps __result; + __result = __obj.OnGetSinkCaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideGetSinkCaps")] + protected virtual Gst.Caps OnGetSinkCaps (Gst.Caps filter) + { + return InternalGetSinkCaps (filter); + } + + private Gst.Caps InternalGetSinkCaps (Gst.Caps filter) + { + GetSinkCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_sink_caps")); + unmanaged = (GetSinkCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSinkCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static DetectNativeDelegate Detect_cb_delegate; + static DetectNativeDelegate DetectVMCallback { + get { + if (Detect_cb_delegate == null) + Detect_cb_delegate = new DetectNativeDelegate (Detect_cb); + return Detect_cb_delegate; + } + } + + static void OverrideDetect (GLib.GType gtype) + { + OverrideDetect (gtype, DetectVMCallback); + } + + static void OverrideDetect (GLib.GType gtype, DetectNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("detect")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int DetectNativeDelegate (IntPtr inst, IntPtr buffer); + + static int Detect_cb (IntPtr inst, IntPtr buffer) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + Gst.FlowReturn __result; + __result = __obj.OnDetect (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideDetect")] + protected virtual Gst.FlowReturn OnDetect (Gst.Buffer buffer) + { + return InternalDetect (buffer); + } + + private Gst.FlowReturn InternalDetect (Gst.Buffer buffer) + { + DetectNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("detect")); + unmanaged = (DetectNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DetectNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr query) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Query query) + { + return InternalSinkQuery (query); + } + + private bool InternalSinkQuery (Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + BaseParse __obj = GLib.Object.GetObject (inst, false) as BaseParse; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseParse), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("start" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , null + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "set_sink_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_sink_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_sink_caps + , "stop" + , "handle_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame + , "set_sink_caps" + , "pre_push_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pre_push_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push_frame + , "handle_frame" + , "convert" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("convert" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // convert + , "pre_push_frame" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "convert" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "get_sink_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_sink_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_sink_caps + , "src_event" + , "detect" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("detect" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // detect + , "get_sink_caps" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "detect" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "sink_query" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 18 // _gst_reserved + , "src_query" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_parse_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_base_parse_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_parse_add_index_entry(IntPtr raw, ulong offset, ulong ts, bool key, bool force); + + public bool AddIndexEntry(ulong offset, ulong ts, bool key, bool force) { + bool raw_ret = gst_base_parse_add_index_entry(Handle, offset, ts, key, force); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_parse_convert_default(IntPtr raw, int src_format, long src_value, int dest_format, out long dest_value); + + public bool ConvertDefault(Gst.Format src_format, long src_value, Gst.Format dest_format, out long dest_value) { + bool raw_ret = gst_base_parse_convert_default(Handle, (int) src_format, src_value, (int) dest_format, out dest_value); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_drain(IntPtr raw); + + public void Drain() { + gst_base_parse_drain(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_parse_finish_frame(IntPtr raw, IntPtr frame, int size); + + public Gst.FlowReturn FinishFrame(Gst.Base.BaseParseFrame frame, int size) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_base_parse_finish_frame(Handle, native_frame, size); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + gst_base_parse_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_parse_push_frame(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn PushFrame(Gst.Base.BaseParseFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_base_parse_push_frame(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_average_bitrate(IntPtr raw, uint bitrate); + + public uint AverageBitrate { + set { + gst_base_parse_set_average_bitrate(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_duration(IntPtr raw, int fmt, long duration, int interval); + + public void SetDuration(Gst.Format fmt, long duration, int interval) { + gst_base_parse_set_duration(Handle, (int) fmt, duration, interval); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_frame_rate(IntPtr raw, uint fps_num, uint fps_den, uint lead_in, uint lead_out); + + public void SetFrameRate(uint fps_num, uint fps_den, uint lead_in, uint lead_out) { + gst_base_parse_set_frame_rate(Handle, fps_num, fps_den, lead_in, lead_out); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_has_timing_info(IntPtr raw, bool has_timing); + + public bool HasTimingInfo { + set { + gst_base_parse_set_has_timing_info(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_infer_ts(IntPtr raw, bool infer_ts); + + public bool InferTs { + set { + gst_base_parse_set_infer_ts(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_latency(IntPtr raw, ulong min_latency, ulong max_latency); + + public void SetLatency(ulong min_latency, ulong max_latency) { + gst_base_parse_set_latency(Handle, min_latency, max_latency); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_min_frame_size(IntPtr raw, uint min_size); + + public uint MinFrameSize { + set { + gst_base_parse_set_min_frame_size(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_passthrough(IntPtr raw, bool passthrough); + + public bool Passthrough { + set { + gst_base_parse_set_passthrough(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_pts_interpolation(IntPtr raw, bool pts_interpolate); + + public bool PtsInterpolation { + set { + gst_base_parse_set_pts_interpolation(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_syncable(IntPtr raw, bool syncable); + + public bool Syncable { + set { + gst_base_parse_set_syncable(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_set_ts_at_offset(IntPtr raw, UIntPtr offset); + + public ulong TsAtOffset { + set { + gst_base_parse_set_ts_at_offset(Handle, new UIntPtr (value)); + } + } + + + static BaseParse () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "flags" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flags" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // flags + , "srcpad" + , "segment" + , (long) Marshal.OffsetOf(typeof(GstBaseParse_flagsAlign), "flags") + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "flags" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstBaseParse_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "segment" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "_gst_reserved" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseParse_flagsAlign + { + sbyte f1; + private uint flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseParse_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/BaseParseFrame.cs b/sources/generated/Gst.Base/BaseParseFrame.cs new file mode 100644 index 0000000000..c38e0f7780 --- /dev/null +++ b/sources/generated/Gst.Base/BaseParseFrame.cs @@ -0,0 +1,116 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct BaseParseFrame : IEquatable { + + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _out_buffer; + public Gst.Buffer OutBuffer { + get { + return _out_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_out_buffer, typeof (Gst.Buffer), false); + } + set { + _out_buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint Flags; + public ulong Offset; + public int Overhead; + private int size; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + private uint[] _gstGstReservedI; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + private IntPtr[] _gstGstReservedP; + private uint _private_flags; + + public static Gst.Base.BaseParseFrame Zero = new Gst.Base.BaseParseFrame (); + + public static Gst.Base.BaseParseFrame New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.BaseParseFrame.Zero; + return (Gst.Base.BaseParseFrame) Marshal.PtrToStructure (raw, typeof (Gst.Base.BaseParseFrame)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_parse_frame_new(IntPtr buffer, int flags, int overhead); + + public static BaseParseFrame New(Gst.Buffer buffer, Gst.Base.BaseParseFrameFlags flags, int overhead) + { + BaseParseFrame result = BaseParseFrame.New (gst_base_parse_frame_new(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, overhead)); + return result; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_parse_frame_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_base_parse_frame_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_parse_frame_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_base_parse_frame_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Base.BaseParseFrame target) + { + target = New (native); + } + + public bool Equals (BaseParseFrame other) + { + return true && Buffer.Equals (other.Buffer) && OutBuffer.Equals (other.OutBuffer) && Flags.Equals (other.Flags) && Offset.Equals (other.Offset) && Overhead.Equals (other.Overhead) && size.Equals (other.size) && _private_flags.Equals (other._private_flags); + } + + public override bool Equals (object other) + { + return other is BaseParseFrame && Equals ((BaseParseFrame) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Buffer.GetHashCode () ^ OutBuffer.GetHashCode () ^ Flags.GetHashCode () ^ Offset.GetHashCode () ^ Overhead.GetHashCode () ^ size.GetHashCode () ^ _private_flags.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Base.BaseParseFrame boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Base.BaseParseFrame.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Base.BaseParseFrame (GLib.Value val) + { + return (Gst.Base.BaseParseFrame) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/BaseParseFrameFlags.cs b/sources/generated/Gst.Base/BaseParseFrameFlags.cs new file mode 100644 index 0000000000..b6da5b40cb --- /dev/null +++ b/sources/generated/Gst.Base/BaseParseFrameFlags.cs @@ -0,0 +1,21 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + public enum BaseParseFrameFlags : uint { + + None = 0, + NewFrame = 1, + NoFrame = 2, + Clip = 4, + Drop = 8, + Queue = 16, + } +#endregion +} diff --git a/sources/generated/Gst.Base/BaseSink.cs b/sources/generated/Gst.Base/BaseSink.cs new file mode 100644 index 0000000000..0ebb01fe4e --- /dev/null +++ b/sources/generated/Gst.Base/BaseSink.cs @@ -0,0 +1,1990 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseSink : Gst.Element { + + protected BaseSink (IntPtr raw) : base(raw) {} + + protected BaseSink() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("async")] + public bool Async { + get { + GLib.Value val = GetProperty ("async"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("async", val); + val.Dispose (); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_base_sink_get_blocksize(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_blocksize(IntPtr raw, uint blocksize); + + [GLib.Property ("blocksize")] + public uint Blocksize { + get { + uint raw_ret = gst_base_sink_get_blocksize(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_blocksize(Handle, value); + } + } + + [GLib.Property ("enable-last-sample")] + public bool EnableLastSample { + get { + GLib.Value val = GetProperty ("enable-last-sample"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("enable-last-sample", val); + val.Dispose (); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_sink_get_last_sample(IntPtr raw); + + [GLib.Property ("last-sample")] + public Gst.Sample LastSample { + get { + IntPtr raw_ret = gst_base_sink_get_last_sample(Handle); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_base_sink_get_max_bitrate(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_max_bitrate(IntPtr raw, ulong max_bitrate); + + [GLib.Property ("max-bitrate")] + public ulong MaxBitrate { + get { + ulong raw_ret = gst_base_sink_get_max_bitrate(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_max_bitrate(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_base_sink_get_max_lateness(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_max_lateness(IntPtr raw, long max_lateness); + + [GLib.Property ("max-lateness")] + public long MaxLateness { + get { + long raw_ret = gst_base_sink_get_max_lateness(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_max_lateness(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_base_sink_get_processing_deadline(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_processing_deadline(IntPtr raw, ulong processing_deadline); + + [GLib.Property ("processing-deadline")] + public ulong ProcessingDeadline { + get { + ulong raw_ret = gst_base_sink_get_processing_deadline(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_processing_deadline(Handle, value); + } + } + + [GLib.Property ("qos")] + public bool Qos { + get { + GLib.Value val = GetProperty ("qos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos", val); + val.Dispose (); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_base_sink_get_render_delay(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_render_delay(IntPtr raw, ulong delay); + + [GLib.Property ("render-delay")] + public ulong RenderDelay { + get { + ulong raw_ret = gst_base_sink_get_render_delay(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_render_delay(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_sink_get_stats(IntPtr raw); + + [GLib.Property ("stats")] + public Gst.Structure Stats { + get { + IntPtr raw_ret = gst_base_sink_get_stats(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_get_sync(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_sync(IntPtr raw, bool sync); + + [GLib.Property ("sync")] + public bool Sync { + get { + bool raw_ret = gst_base_sink_get_sync(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_sync(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_base_sink_get_throttle_time(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_throttle_time(IntPtr raw, ulong throttle); + + [GLib.Property ("throttle-time")] + public ulong ThrottleTime { + get { + ulong raw_ret = gst_base_sink_get_throttle_time(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_throttle_time(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_base_sink_get_ts_offset(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_ts_offset(IntPtr raw, long offset); + + [GLib.Property ("ts-offset")] + public long TsOffset { + get { + long raw_ret = gst_base_sink_get_ts_offset(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_ts_offset(Handle, value); + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.PadMode PadMode { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("pad_mode")); + return (Gst.PadMode) (*raw_ptr); + } + } + } + + public ulong Offset { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset")); + return (*raw_ptr); + } + } + } + + public bool CanActivatePull { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("can_activate_pull")); + return (*raw_ptr); + } + } + } + + public bool CanActivatePush { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("can_activate_push")); + return (*raw_ptr); + } + } + } + + public GLib.Mutex PrerollLock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("preroll_lock")); + return new GLib.Mutex((*raw_ptr)); + } + } + } + + public GLib.Cond PrerollCond { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("preroll_cond")); + return new GLib.Cond((*raw_ptr)); + } + } + } + + public bool Eos { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("eos")); + return (*raw_ptr); + } + } + } + + public bool NeedPreroll { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("need_preroll")); + return (*raw_ptr); + } + } + } + + public bool HavePreroll { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("have_preroll")); + return (*raw_ptr); + } + } + } + + public bool PlayingAsync { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("playing_async")); + return (*raw_ptr); + } + } + } + + public bool HaveNewsegment { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("have_newsegment")); + return (*raw_ptr); + } + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + static GetCapsNativeDelegate GetCaps_cb_delegate; + static GetCapsNativeDelegate GetCapsVMCallback { + get { + if (GetCaps_cb_delegate == null) + GetCaps_cb_delegate = new GetCapsNativeDelegate (GetCaps_cb); + return GetCaps_cb_delegate; + } + } + + static void OverrideGetCaps (GLib.GType gtype) + { + OverrideGetCaps (gtype, GetCapsVMCallback); + } + + static void OverrideGetCaps (GLib.GType gtype, GetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetCapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr GetCaps_cb (IntPtr inst, IntPtr filter) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.Caps __result; + __result = __obj.OnGetCaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideGetCaps")] + protected virtual Gst.Caps OnGetCaps (Gst.Caps filter) + { + return InternalGetCaps (filter); + } + + private Gst.Caps InternalGetCaps (Gst.Caps filter) + { + GetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + unmanaged = (GetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static SetCapsNativeDelegate SetCaps_cb_delegate; + static SetCapsNativeDelegate SetCapsVMCallback { + get { + if (SetCaps_cb_delegate == null) + SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); + return SetCaps_cb_delegate; + } + } + + static void OverrideSetCaps (GLib.GType gtype) + { + OverrideSetCaps (gtype, SetCapsVMCallback); + } + + static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetCaps_cb (IntPtr inst, IntPtr caps) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnSetCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideSetCaps")] + protected virtual bool OnSetCaps (Gst.Caps caps) + { + return InternalSetCaps (caps); + } + + private bool InternalSetCaps (Gst.Caps caps) + { + SetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static FixateNativeDelegate Fixate_cb_delegate; + static FixateNativeDelegate FixateVMCallback { + get { + if (Fixate_cb_delegate == null) + Fixate_cb_delegate = new FixateNativeDelegate (Fixate_cb); + return Fixate_cb_delegate; + } + } + + static void OverrideFixate (GLib.GType gtype) + { + OverrideFixate (gtype, FixateVMCallback); + } + + static void OverrideFixate (GLib.GType gtype, FixateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr FixateNativeDelegate (IntPtr inst, IntPtr caps); + + static IntPtr Fixate_cb (IntPtr inst, IntPtr caps) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.Caps __result; + __result = __obj.OnFixate (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideFixate")] + protected virtual Gst.Caps OnFixate (Gst.Caps caps) + { + return InternalFixate (caps); + } + + private Gst.Caps InternalFixate (Gst.Caps caps) + { + FixateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate")); + unmanaged = (FixateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FixateNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static ActivatePullNativeDelegate ActivatePull_cb_delegate; + static ActivatePullNativeDelegate ActivatePullVMCallback { + get { + if (ActivatePull_cb_delegate == null) + ActivatePull_cb_delegate = new ActivatePullNativeDelegate (ActivatePull_cb); + return ActivatePull_cb_delegate; + } + } + + static void OverrideActivatePull (GLib.GType gtype) + { + OverrideActivatePull (gtype, ActivatePullVMCallback); + } + + static void OverrideActivatePull (GLib.GType gtype, ActivatePullNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate_pull")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ActivatePullNativeDelegate (IntPtr inst, bool active); + + static bool ActivatePull_cb (IntPtr inst, bool active) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnActivatePull (active); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideActivatePull")] + protected virtual bool OnActivatePull (bool active) + { + return InternalActivatePull (active); + } + + private bool InternalActivatePull (bool active) + { + ActivatePullNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("activate_pull")); + unmanaged = (ActivatePullNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActivatePullNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, active); + return __result; + } + + static GetTimesNativeDelegate GetTimes_cb_delegate; + static GetTimesNativeDelegate GetTimesVMCallback { + get { + if (GetTimes_cb_delegate == null) + GetTimes_cb_delegate = new GetTimesNativeDelegate (GetTimes_cb); + return GetTimes_cb_delegate; + } + } + + static void OverrideGetTimes (GLib.GType gtype) + { + OverrideGetTimes (gtype, GetTimesVMCallback); + } + + static void OverrideGetTimes (GLib.GType gtype, GetTimesNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_times")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void GetTimesNativeDelegate (IntPtr inst, IntPtr buffer, ulong start, ulong end); + + static void GetTimes_cb (IntPtr inst, IntPtr buffer, ulong start, ulong end) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + __obj.OnGetTimes (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), start, end); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideGetTimes")] + protected virtual void OnGetTimes (Gst.Buffer buffer, ulong start, ulong end) + { + InternalGetTimes (buffer, start, end); + } + + private void InternalGetTimes (Gst.Buffer buffer, ulong start, ulong end) + { + GetTimesNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_times")); + unmanaged = (GetTimesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetTimesNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, start, end); + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr query) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query query) + { + return InternalProposeAllocation (query); + } + + private bool InternalProposeAllocation (Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static UnlockNativeDelegate Unlock_cb_delegate; + static UnlockNativeDelegate UnlockVMCallback { + get { + if (Unlock_cb_delegate == null) + Unlock_cb_delegate = new UnlockNativeDelegate (Unlock_cb); + return Unlock_cb_delegate; + } + } + + static void OverrideUnlock (GLib.GType gtype) + { + OverrideUnlock (gtype, UnlockVMCallback); + } + + static void OverrideUnlock (GLib.GType gtype, UnlockNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnlockNativeDelegate (IntPtr inst); + + static bool Unlock_cb (IntPtr inst) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnUnlock (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideUnlock")] + protected virtual bool OnUnlock () + { + return InternalUnlock (); + } + + private bool InternalUnlock () + { + UnlockNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock")); + unmanaged = (UnlockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnlockNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static UnlockStopNativeDelegate UnlockStop_cb_delegate; + static UnlockStopNativeDelegate UnlockStopVMCallback { + get { + if (UnlockStop_cb_delegate == null) + UnlockStop_cb_delegate = new UnlockStopNativeDelegate (UnlockStop_cb); + return UnlockStop_cb_delegate; + } + } + + static void OverrideUnlockStop (GLib.GType gtype) + { + OverrideUnlockStop (gtype, UnlockStopVMCallback); + } + + static void OverrideUnlockStop (GLib.GType gtype, UnlockStopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock_stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnlockStopNativeDelegate (IntPtr inst); + + static bool UnlockStop_cb (IntPtr inst) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnUnlockStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideUnlockStop")] + protected virtual bool OnUnlockStop () + { + return InternalUnlockStop (); + } + + private bool InternalUnlockStop () + { + UnlockStopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock_stop")); + unmanaged = (UnlockStopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnlockStopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static QueryNativeDelegate Query_cb_delegate; + static QueryNativeDelegate QueryVMCallback { + get { + if (Query_cb_delegate == null) + Query_cb_delegate = new QueryNativeDelegate (Query_cb); + return Query_cb_delegate; + } + } + + static void OverrideQuery (GLib.GType gtype) + { + OverrideQuery (gtype, QueryVMCallback); + } + + static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool QueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool Query_cb (IntPtr inst, IntPtr query) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideQuery")] + protected virtual bool OnQuery (Gst.Query query) + { + return InternalQuery (query); + } + + private bool InternalQuery (Gst.Query query) + { + QueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static EventNativeDelegate Event_cb_delegate; + static EventNativeDelegate EventVMCallback { + get { + if (Event_cb_delegate == null) + Event_cb_delegate = new EventNativeDelegate (Event_cb); + return Event_cb_delegate; + } + } + + static void OverrideEvent (GLib.GType gtype) + { + OverrideEvent (gtype, EventVMCallback); + } + + static void OverrideEvent (GLib.GType gtype, EventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("evnt")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool EventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool Event_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + bool __result; + __result = __obj.OnEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideEvent")] + protected virtual bool OnEvent (Gst.Event evnt) + { + return InternalEvent (evnt); + } + + private bool InternalEvent (Gst.Event evnt) + { + EventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("evnt")); + unmanaged = (EventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static WaitEventNativeDelegate WaitEvent_cb_delegate; + static WaitEventNativeDelegate WaitEventVMCallback { + get { + if (WaitEvent_cb_delegate == null) + WaitEvent_cb_delegate = new WaitEventNativeDelegate (WaitEvent_cb); + return WaitEvent_cb_delegate; + } + } + + static void OverrideWaitEvent (GLib.GType gtype) + { + OverrideWaitEvent (gtype, WaitEventVMCallback); + } + + static void OverrideWaitEvent (GLib.GType gtype, WaitEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int WaitEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static int WaitEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnWaitEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideWaitEvent")] + protected virtual Gst.FlowReturn OnWaitEvent (Gst.Event evnt) + { + return InternalWaitEvent (evnt); + } + + private Gst.FlowReturn InternalWaitEvent (Gst.Event evnt) + { + WaitEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_event")); + unmanaged = (WaitEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitEventNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return (Gst.FlowReturn) __result; + } + + static PrepareNativeDelegate Prepare_cb_delegate; + static PrepareNativeDelegate PrepareVMCallback { + get { + if (Prepare_cb_delegate == null) + Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb); + return Prepare_cb_delegate; + } + } + + static void OverridePrepare (GLib.GType gtype) + { + OverridePrepare (gtype, PrepareVMCallback); + } + + static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrepareNativeDelegate (IntPtr inst, IntPtr buffer); + + static int Prepare_cb (IntPtr inst, IntPtr buffer) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnPrepare (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverridePrepare")] + protected virtual Gst.FlowReturn OnPrepare (Gst.Buffer buffer) + { + return InternalPrepare (buffer); + } + + private Gst.FlowReturn InternalPrepare (Gst.Buffer buffer) + { + PrepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static PrepareListNativeDelegate PrepareList_cb_delegate; + static PrepareListNativeDelegate PrepareListVMCallback { + get { + if (PrepareList_cb_delegate == null) + PrepareList_cb_delegate = new PrepareListNativeDelegate (PrepareList_cb); + return PrepareList_cb_delegate; + } + } + + static void OverridePrepareList (GLib.GType gtype) + { + OverridePrepareList (gtype, PrepareListVMCallback); + } + + static void OverridePrepareList (GLib.GType gtype, PrepareListNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_list")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrepareListNativeDelegate (IntPtr inst, IntPtr buffer_list); + + static int PrepareList_cb (IntPtr inst, IntPtr buffer_list) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnPrepareList (buffer_list == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (buffer_list, typeof (Gst.BufferList), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverridePrepareList")] + protected virtual Gst.FlowReturn OnPrepareList (Gst.BufferList buffer_list) + { + return InternalPrepareList (buffer_list); + } + + private Gst.FlowReturn InternalPrepareList (Gst.BufferList buffer_list) + { + PrepareListNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_list")); + unmanaged = (PrepareListNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareListNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer_list == null ? IntPtr.Zero : buffer_list.Handle); + return (Gst.FlowReturn) __result; + } + + static PrerollNativeDelegate Preroll_cb_delegate; + static PrerollNativeDelegate PrerollVMCallback { + get { + if (Preroll_cb_delegate == null) + Preroll_cb_delegate = new PrerollNativeDelegate (Preroll_cb); + return Preroll_cb_delegate; + } + } + + static void OverridePreroll (GLib.GType gtype) + { + OverridePreroll (gtype, PrerollVMCallback); + } + + static void OverridePreroll (GLib.GType gtype, PrerollNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("preroll")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrerollNativeDelegate (IntPtr inst, IntPtr buffer); + + static int Preroll_cb (IntPtr inst, IntPtr buffer) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnPreroll (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverridePreroll")] + protected virtual Gst.FlowReturn OnPreroll (Gst.Buffer buffer) + { + return InternalPreroll (buffer); + } + + private Gst.FlowReturn InternalPreroll (Gst.Buffer buffer) + { + PrerollNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("preroll")); + unmanaged = (PrerollNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrerollNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static RenderNativeDelegate Render_cb_delegate; + static RenderNativeDelegate RenderVMCallback { + get { + if (Render_cb_delegate == null) + Render_cb_delegate = new RenderNativeDelegate (Render_cb); + return Render_cb_delegate; + } + } + + static void OverrideRender (GLib.GType gtype) + { + OverrideRender (gtype, RenderVMCallback); + } + + static void OverrideRender (GLib.GType gtype, RenderNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("render")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int RenderNativeDelegate (IntPtr inst, IntPtr buffer); + + static int Render_cb (IntPtr inst, IntPtr buffer) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnRender (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideRender")] + protected virtual Gst.FlowReturn OnRender (Gst.Buffer buffer) + { + return InternalRender (buffer); + } + + private Gst.FlowReturn InternalRender (Gst.Buffer buffer) + { + RenderNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("render")); + unmanaged = (RenderNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static RenderListNativeDelegate RenderList_cb_delegate; + static RenderListNativeDelegate RenderListVMCallback { + get { + if (RenderList_cb_delegate == null) + RenderList_cb_delegate = new RenderListNativeDelegate (RenderList_cb); + return RenderList_cb_delegate; + } + } + + static void OverrideRenderList (GLib.GType gtype) + { + OverrideRenderList (gtype, RenderListVMCallback); + } + + static void OverrideRenderList (GLib.GType gtype, RenderListNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("render_list")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int RenderListNativeDelegate (IntPtr inst, IntPtr buffer_list); + + static int RenderList_cb (IntPtr inst, IntPtr buffer_list) + { + try { + BaseSink __obj = GLib.Object.GetObject (inst, false) as BaseSink; + Gst.FlowReturn __result; + __result = __obj.OnRenderList (buffer_list == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (buffer_list, typeof (Gst.BufferList), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSink), ConnectionMethod="OverrideRenderList")] + protected virtual Gst.FlowReturn OnRenderList (Gst.BufferList buffer_list) + { + return InternalRenderList (buffer_list); + } + + private Gst.FlowReturn InternalRenderList (Gst.BufferList buffer_list) + { + RenderListNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("render_list")); + unmanaged = (RenderListNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderListNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer_list == null ? IntPtr.Zero : buffer_list.Handle); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_caps" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_caps + , null + , "set_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps + , "get_caps" + , "fixate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fixate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixate + , "set_caps" + , "activate_pull" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activate_pull" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activate_pull + , "fixate" + , "get_times" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_times" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_times + , "activate_pull" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "get_times" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "propose_allocation" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "unlock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlock + , "stop" + , "unlock_stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlock_stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlock_stop + , "unlock" + , "query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // query + , "unlock_stop" + , "event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // event + , "query" + , "wait_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("wait_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // wait_event + , "event" + , "prepare" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare + , "wait_event" + , "prepare_list" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare_list" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare_list + , "prepare" + , "preroll" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // preroll + , "prepare_list" + , "render" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("render" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // render + , "preroll" + , "render_list" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("render_list" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // render_list + , "render" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "render_list" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_sink_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_base_sink_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_sink_do_preroll(IntPtr raw, IntPtr obj); + + public Gst.FlowReturn DoPreroll(Gst.MiniObject obj) { + int raw_ret = gst_base_sink_do_preroll(Handle, obj == null ? IntPtr.Zero : obj.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_get_drop_out_of_segment(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_drop_out_of_segment(IntPtr raw, bool drop_out_of_segment); + + public bool DropOutOfSegment { + get { + bool raw_ret = gst_base_sink_get_drop_out_of_segment(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_base_sink_set_drop_out_of_segment(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_base_sink_get_latency(IntPtr raw); + + public ulong Latency { + get { + ulong raw_ret = gst_base_sink_get_latency(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_is_async_enabled(IntPtr raw); + + public bool IsAsyncEnabled { + get { + bool raw_ret = gst_base_sink_is_async_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_is_last_sample_enabled(IntPtr raw); + + public bool IsLastSampleEnabled { + get { + bool raw_ret = gst_base_sink_is_last_sample_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_is_qos_enabled(IntPtr raw); + + public bool IsQosEnabled { + get { + bool raw_ret = gst_base_sink_is_qos_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_sink_query_latency(IntPtr raw, out bool live, out bool upstream_live, out ulong min_latency, out ulong max_latency); + + public bool QueryLatency(out bool live, out bool upstream_live, out ulong min_latency, out ulong max_latency) { + bool raw_ret = gst_base_sink_query_latency(Handle, out live, out upstream_live, out min_latency, out max_latency); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_async_enabled(IntPtr raw, bool enabled); + + public bool AsyncEnabled { + set { + gst_base_sink_set_async_enabled(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_last_sample_enabled(IntPtr raw, bool enabled); + + public bool LastSampleEnabled { + set { + gst_base_sink_set_last_sample_enabled(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_sink_set_qos_enabled(IntPtr raw, bool enabled); + + public bool QosEnabled { + set { + gst_base_sink_set_qos_enabled(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_sink_wait(IntPtr raw, ulong time, out long jitter); + + public Gst.FlowReturn Wait(ulong time, out long jitter) { + int raw_ret = gst_base_sink_wait(Handle, time, out jitter); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_sink_wait_clock(IntPtr raw, ulong time, out long jitter); + + public Gst.ClockReturn WaitClock(ulong time, out long jitter) { + int raw_ret = gst_base_sink_wait_clock(Handle, time, out jitter); + Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_sink_wait_preroll(IntPtr raw); + + public Gst.FlowReturn WaitPreroll() { + int raw_ret = gst_base_sink_wait_preroll(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + + static BaseSink () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "pad_mode" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pad_mode" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.PadMode))) // pad_mode + , "sinkpad" + , "offset" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_pad_modeAlign), "pad_mode") + , 0 + ), + new GLib.AbiField("offset" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // offset + , "pad_mode" + , "can_activate_pull" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_offsetAlign), "offset") + , 0 + ), + new GLib.AbiField("can_activate_pull" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // can_activate_pull + , "offset" + , "can_activate_push" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_can_activate_pullAlign), "can_activate_pull") + , 0 + ), + new GLib.AbiField("can_activate_push" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // can_activate_push + , "can_activate_pull" + , "preroll_lock" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_can_activate_pushAlign), "can_activate_push") + , 0 + ), + new GLib.AbiField("preroll_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // preroll_lock + , "can_activate_push" + , "preroll_cond" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("preroll_cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // preroll_cond + , "preroll_lock" + , "eos" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_preroll_condAlign), "preroll_cond") + , 0 + ), + new GLib.AbiField("eos" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // eos + , "preroll_cond" + , "need_preroll" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_eosAlign), "eos") + , 0 + ), + new GLib.AbiField("need_preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // need_preroll + , "eos" + , "have_preroll" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_need_prerollAlign), "need_preroll") + , 0 + ), + new GLib.AbiField("have_preroll" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // have_preroll + , "need_preroll" + , "playing_async" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_have_prerollAlign), "have_preroll") + , 0 + ), + new GLib.AbiField("playing_async" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // playing_async + , "have_preroll" + , "have_newsegment" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_playing_asyncAlign), "playing_async") + , 0 + ), + new GLib.AbiField("have_newsegment" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // have_newsegment + , "playing_async" + , "segment" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_have_newsegmentAlign), "have_newsegment") + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "have_newsegment" + , "clock_id" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("clock_id" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock_id + , "segment" + , "sync" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sync" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // sync + , "clock_id" + , "flushing" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_syncAlign), "sync") + , 0 + ), + new GLib.AbiField("flushing" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // flushing + , "sync" + , "running" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_flushingAlign), "flushing") + , 0 + ), + new GLib.AbiField("running" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // running + , "flushing" + , "max_lateness" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_runningAlign), "running") + , 0 + ), + new GLib.AbiField("max_lateness" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // max_lateness + , "running" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstBaseSink_max_latenessAlign), "max_lateness") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "max_lateness" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_pad_modeAlign + { + sbyte f1; + private Gst.PadMode pad_mode; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_offsetAlign + { + sbyte f1; + private ulong offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_can_activate_pullAlign + { + sbyte f1; + private bool can_activate_pull; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_can_activate_pushAlign + { + sbyte f1; + private bool can_activate_push; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_preroll_condAlign + { + sbyte f1; + private GLib.Cond.ABI preroll_cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_eosAlign + { + sbyte f1; + private bool eos; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_need_prerollAlign + { + sbyte f1; + private bool need_preroll; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_have_prerollAlign + { + sbyte f1; + private bool have_preroll; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_playing_asyncAlign + { + sbyte f1; + private bool playing_async; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_have_newsegmentAlign + { + sbyte f1; + private bool have_newsegment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_syncAlign + { + sbyte f1; + private bool sync; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_flushingAlign + { + sbyte f1; + private bool flushing; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_runningAlign + { + sbyte f1; + private bool running; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSink_max_latenessAlign + { + sbyte f1; + private long max_lateness; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/BaseSrc.cs b/sources/generated/Gst.Base/BaseSrc.cs new file mode 100644 index 0000000000..f5cac39d7a --- /dev/null +++ b/sources/generated/Gst.Base/BaseSrc.cs @@ -0,0 +1,1947 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseSrc : Gst.Element { + + protected BaseSrc (IntPtr raw) : base(raw) {} + + protected BaseSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_base_src_get_blocksize(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_blocksize(IntPtr raw, uint blocksize); + + [GLib.Property ("blocksize")] + public uint Blocksize { + get { + uint raw_ret = gst_base_src_get_blocksize(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_base_src_set_blocksize(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_get_do_timestamp(IntPtr raw); + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_do_timestamp(IntPtr raw, bool timestamp); + + [GLib.Property ("do-timestamp")] + public bool DoTimestamp { + get { + bool raw_ret = gst_base_src_get_do_timestamp(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_base_src_set_do_timestamp(Handle, value); + } + } + + [GLib.Property ("num-buffers")] + public int NumBuffers { + get { + GLib.Value val = GetProperty ("num-buffers"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("num-buffers", val); + val.Dispose (); + } + } + + [GLib.Property ("typefind")] + public bool Typefind { + get { + GLib.Value val = GetProperty ("typefind"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("typefind", val); + val.Dispose (); + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public GLib.Mutex LiveLock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("live_lock")); + return new GLib.Mutex((*raw_ptr)); + } + } + } + + public GLib.Cond LiveCond { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("live_cond")); + return new GLib.Cond((*raw_ptr)); + } + } + } + + public bool IsLiveField { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("is_live")); + return (*raw_ptr); + } + } + } + + public bool LiveRunning { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("live_running")); + return (*raw_ptr); + } + } + } + + public uint BlocksizeField { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("blocksize")); + return (*raw_ptr); + } + } + } + + public bool CanActivatePush { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("can_activate_push")); + return (*raw_ptr); + } + } + } + + public bool RandomAccess { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("random_access")); + return (*raw_ptr); + } + } + } + + public IntPtr ClockId { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_id")); + return (*raw_ptr); + } + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + public bool NeedNewsegment { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("need_newsegment")); + return (*raw_ptr); + } + } + } + + public int NumBuffersField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("num_buffers")); + return (*raw_ptr); + } + } + } + + public int NumBuffersLeft { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("num_buffers_left")); + return (*raw_ptr); + } + } + } + + public bool TypefindField { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("typefind")); + return (*raw_ptr); + } + } + } + + public bool Running { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("running")); + return (*raw_ptr); + } + } + } + + public Gst.Event PendingSeek { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pending_seek")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Event), false); + } + } + } + + static GetCapsNativeDelegate GetCaps_cb_delegate; + static GetCapsNativeDelegate GetCapsVMCallback { + get { + if (GetCaps_cb_delegate == null) + GetCaps_cb_delegate = new GetCapsNativeDelegate (GetCaps_cb); + return GetCaps_cb_delegate; + } + } + + static void OverrideGetCaps (GLib.GType gtype) + { + OverrideGetCaps (gtype, GetCapsVMCallback); + } + + static void OverrideGetCaps (GLib.GType gtype, GetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetCapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr GetCaps_cb (IntPtr inst, IntPtr filter) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + Gst.Caps __result; + __result = __obj.OnGetCaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideGetCaps")] + protected virtual Gst.Caps OnGetCaps (Gst.Caps filter) + { + return InternalGetCaps (filter); + } + + private Gst.Caps InternalGetCaps (Gst.Caps filter) + { + GetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + unmanaged = (GetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static FixateNativeDelegate Fixate_cb_delegate; + static FixateNativeDelegate FixateVMCallback { + get { + if (Fixate_cb_delegate == null) + Fixate_cb_delegate = new FixateNativeDelegate (Fixate_cb); + return Fixate_cb_delegate; + } + } + + static void OverrideFixate (GLib.GType gtype) + { + OverrideFixate (gtype, FixateVMCallback); + } + + static void OverrideFixate (GLib.GType gtype, FixateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr FixateNativeDelegate (IntPtr inst, IntPtr caps); + + static IntPtr Fixate_cb (IntPtr inst, IntPtr caps) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + Gst.Caps __result; + __result = __obj.OnFixate (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideFixate")] + protected virtual Gst.Caps OnFixate (Gst.Caps caps) + { + return InternalFixate (caps); + } + + private Gst.Caps InternalFixate (Gst.Caps caps) + { + FixateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate")); + unmanaged = (FixateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FixateNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static SetCapsNativeDelegate SetCaps_cb_delegate; + static SetCapsNativeDelegate SetCapsVMCallback { + get { + if (SetCaps_cb_delegate == null) + SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); + return SetCaps_cb_delegate; + } + } + + static void OverrideSetCaps (GLib.GType gtype) + { + OverrideSetCaps (gtype, SetCapsVMCallback); + } + + static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetCaps_cb (IntPtr inst, IntPtr caps) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnSetCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideSetCaps")] + protected virtual bool OnSetCaps (Gst.Caps caps) + { + return InternalSetCaps (caps); + } + + private bool InternalSetCaps (Gst.Caps caps) + { + SetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static GetTimesNativeDelegate GetTimes_cb_delegate; + static GetTimesNativeDelegate GetTimesVMCallback { + get { + if (GetTimes_cb_delegate == null) + GetTimes_cb_delegate = new GetTimesNativeDelegate (GetTimes_cb); + return GetTimes_cb_delegate; + } + } + + static void OverrideGetTimes (GLib.GType gtype) + { + OverrideGetTimes (gtype, GetTimesVMCallback); + } + + static void OverrideGetTimes (GLib.GType gtype, GetTimesNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_times")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void GetTimesNativeDelegate (IntPtr inst, IntPtr buffer, out ulong start, out ulong end); + + static void GetTimes_cb (IntPtr inst, IntPtr buffer, out ulong start, out ulong end) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + __obj.OnGetTimes (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), out start, out end); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideGetTimes")] + protected virtual void OnGetTimes (Gst.Buffer buffer, out ulong start, out ulong end) + { + InternalGetTimes (buffer, out start, out end); + } + + private void InternalGetTimes (Gst.Buffer buffer, out ulong start, out ulong end) + { + GetTimesNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_times")); + unmanaged = (GetTimesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetTimesNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, out start, out end); + } + + static GetSizeNativeDelegate GetSize_cb_delegate; + static GetSizeNativeDelegate GetSizeVMCallback { + get { + if (GetSize_cb_delegate == null) + GetSize_cb_delegate = new GetSizeNativeDelegate (GetSize_cb); + return GetSize_cb_delegate; + } + } + + static void OverrideGetSize (GLib.GType gtype) + { + OverrideGetSize (gtype, GetSizeVMCallback); + } + + static void OverrideGetSize (GLib.GType gtype, GetSizeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_size")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetSizeNativeDelegate (IntPtr inst, ulong size); + + static bool GetSize_cb (IntPtr inst, ulong size) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnGetSize (size); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideGetSize")] + protected virtual bool OnGetSize (ulong size) + { + return InternalGetSize (size); + } + + private bool InternalGetSize (ulong size) + { + GetSizeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_size")); + unmanaged = (GetSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSizeNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, size); + return __result; + } + + static IsSeekableNativeDelegate IsSeekable_cb_delegate; + static IsSeekableNativeDelegate IsSeekableVMCallback { + get { + if (IsSeekable_cb_delegate == null) + IsSeekable_cb_delegate = new IsSeekableNativeDelegate (IsSeekable_cb); + return IsSeekable_cb_delegate; + } + } + + static void OverrideIsSeekable (GLib.GType gtype) + { + OverrideIsSeekable (gtype, IsSeekableVMCallback); + } + + static void OverrideIsSeekable (GLib.GType gtype, IsSeekableNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("is_seekable")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool IsSeekableNativeDelegate (IntPtr inst); + + static bool IsSeekable_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnIsSeekable (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideIsSeekable")] + protected virtual bool OnIsSeekable () + { + return InternalIsSeekable (); + } + + private bool InternalIsSeekable () + { + IsSeekableNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("is_seekable")); + unmanaged = (IsSeekableNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(IsSeekableNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static PrepareSeekSegmentNativeDelegate PrepareSeekSegment_cb_delegate; + static PrepareSeekSegmentNativeDelegate PrepareSeekSegmentVMCallback { + get { + if (PrepareSeekSegment_cb_delegate == null) + PrepareSeekSegment_cb_delegate = new PrepareSeekSegmentNativeDelegate (PrepareSeekSegment_cb); + return PrepareSeekSegment_cb_delegate; + } + } + + static void OverridePrepareSeekSegment (GLib.GType gtype) + { + OverridePrepareSeekSegment (gtype, PrepareSeekSegmentVMCallback); + } + + static void OverridePrepareSeekSegment (GLib.GType gtype, PrepareSeekSegmentNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_seek_segment")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PrepareSeekSegmentNativeDelegate (IntPtr inst, IntPtr seek, IntPtr segment); + + static bool PrepareSeekSegment_cb (IntPtr inst, IntPtr seek, IntPtr segment) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnPrepareSeekSegment (seek == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (seek, typeof (Gst.Event), false), Gst.Segment.New (segment)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverridePrepareSeekSegment")] + protected virtual bool OnPrepareSeekSegment (Gst.Event seek, Gst.Segment segment) + { + return InternalPrepareSeekSegment (seek, segment); + } + + private bool InternalPrepareSeekSegment (Gst.Event seek, Gst.Segment segment) + { + PrepareSeekSegmentNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_seek_segment")); + unmanaged = (PrepareSeekSegmentNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareSeekSegmentNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + bool __result = unmanaged (this.Handle, seek == null ? IntPtr.Zero : seek.Handle, native_segment); + Marshal.FreeHGlobal (native_segment); + return __result; + } + + static DoSeekNativeDelegate DoSeek_cb_delegate; + static DoSeekNativeDelegate DoSeekVMCallback { + get { + if (DoSeek_cb_delegate == null) + DoSeek_cb_delegate = new DoSeekNativeDelegate (DoSeek_cb); + return DoSeek_cb_delegate; + } + } + + static void OverrideDoSeek (GLib.GType gtype) + { + OverrideDoSeek (gtype, DoSeekVMCallback); + } + + static void OverrideDoSeek (GLib.GType gtype, DoSeekNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("do_seek")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DoSeekNativeDelegate (IntPtr inst, IntPtr segment); + + static bool DoSeek_cb (IntPtr inst, IntPtr segment) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnDoSeek (Gst.Segment.New (segment)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideDoSeek")] + protected virtual bool OnDoSeek (Gst.Segment segment) + { + return InternalDoSeek (segment); + } + + private bool InternalDoSeek (Gst.Segment segment) + { + DoSeekNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("do_seek")); + unmanaged = (DoSeekNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DoSeekNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + bool __result = unmanaged (this.Handle, native_segment); + Marshal.FreeHGlobal (native_segment); + return __result; + } + + static UnlockNativeDelegate Unlock_cb_delegate; + static UnlockNativeDelegate UnlockVMCallback { + get { + if (Unlock_cb_delegate == null) + Unlock_cb_delegate = new UnlockNativeDelegate (Unlock_cb); + return Unlock_cb_delegate; + } + } + + static void OverrideUnlock (GLib.GType gtype) + { + OverrideUnlock (gtype, UnlockVMCallback); + } + + static void OverrideUnlock (GLib.GType gtype, UnlockNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnlockNativeDelegate (IntPtr inst); + + static bool Unlock_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnUnlock (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideUnlock")] + protected virtual bool OnUnlock () + { + return InternalUnlock (); + } + + private bool InternalUnlock () + { + UnlockNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock")); + unmanaged = (UnlockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnlockNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static UnlockStopNativeDelegate UnlockStop_cb_delegate; + static UnlockStopNativeDelegate UnlockStopVMCallback { + get { + if (UnlockStop_cb_delegate == null) + UnlockStop_cb_delegate = new UnlockStopNativeDelegate (UnlockStop_cb); + return UnlockStop_cb_delegate; + } + } + + static void OverrideUnlockStop (GLib.GType gtype) + { + OverrideUnlockStop (gtype, UnlockStopVMCallback); + } + + static void OverrideUnlockStop (GLib.GType gtype, UnlockStopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock_stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool UnlockStopNativeDelegate (IntPtr inst); + + static bool UnlockStop_cb (IntPtr inst) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnUnlockStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideUnlockStop")] + protected virtual bool OnUnlockStop () + { + return InternalUnlockStop (); + } + + private bool InternalUnlockStop () + { + UnlockStopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unlock_stop")); + unmanaged = (UnlockStopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnlockStopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static QueryNativeDelegate Query_cb_delegate; + static QueryNativeDelegate QueryVMCallback { + get { + if (Query_cb_delegate == null) + Query_cb_delegate = new QueryNativeDelegate (Query_cb); + return Query_cb_delegate; + } + } + + static void OverrideQuery (GLib.GType gtype) + { + OverrideQuery (gtype, QueryVMCallback); + } + + static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool QueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool Query_cb (IntPtr inst, IntPtr query) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideQuery")] + protected virtual bool OnQuery (Gst.Query query) + { + return InternalQuery (query); + } + + private bool InternalQuery (Gst.Query query) + { + QueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static EventNativeDelegate Event_cb_delegate; + static EventNativeDelegate EventVMCallback { + get { + if (Event_cb_delegate == null) + Event_cb_delegate = new EventNativeDelegate (Event_cb); + return Event_cb_delegate; + } + } + + static void OverrideEvent (GLib.GType gtype) + { + OverrideEvent (gtype, EventVMCallback); + } + + static void OverrideEvent (GLib.GType gtype, EventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("evnt")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool EventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool Event_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + bool __result; + __result = __obj.OnEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideEvent")] + protected virtual bool OnEvent (Gst.Event evnt) + { + return InternalEvent (evnt); + } + + private bool InternalEvent (Gst.Event evnt) + { + EventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("evnt")); + unmanaged = (EventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static CreateNativeDelegate Create_cb_delegate; + static CreateNativeDelegate CreateVMCallback { + get { + if (Create_cb_delegate == null) + Create_cb_delegate = new CreateNativeDelegate (Create_cb); + return Create_cb_delegate; + } + } + + static void OverrideCreate (GLib.GType gtype) + { + OverrideCreate (gtype, CreateVMCallback); + } + + static void OverrideCreate (GLib.GType gtype, CreateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int CreateNativeDelegate (IntPtr inst, ulong offset, uint size, out IntPtr buf); + + static int Create_cb (IntPtr inst, ulong offset, uint size, out IntPtr buf) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + Gst.FlowReturn __result; + Gst.Buffer mybuf; + __result = __obj.OnCreate (offset, size, out mybuf); + buf = mybuf == null ? IntPtr.Zero : mybuf.Handle; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideCreate")] + protected virtual Gst.FlowReturn OnCreate (ulong offset, uint size, out Gst.Buffer buf) + { + return InternalCreate (offset, size, out buf); + } + + private Gst.FlowReturn InternalCreate (ulong offset, uint size, out Gst.Buffer buf) + { + CreateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create")); + unmanaged = (CreateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_buf; + int __result = unmanaged (this.Handle, offset, size, out native_buf); + buf = native_buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buf, typeof (Gst.Buffer), true); + return (Gst.FlowReturn) __result; + } + + static AllocNativeDelegate Alloc_cb_delegate; + static AllocNativeDelegate AllocVMCallback { + get { + if (Alloc_cb_delegate == null) + Alloc_cb_delegate = new AllocNativeDelegate (Alloc_cb); + return Alloc_cb_delegate; + } + } + + static void OverrideAlloc (GLib.GType gtype) + { + OverrideAlloc (gtype, AllocVMCallback); + } + + static void OverrideAlloc (GLib.GType gtype, AllocNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AllocNativeDelegate (IntPtr inst, ulong offset, uint size, IntPtr buf); + + static int Alloc_cb (IntPtr inst, ulong offset, uint size, IntPtr buf) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + Gst.FlowReturn __result; + __result = __obj.OnAlloc (offset, size, buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideAlloc")] + protected virtual Gst.FlowReturn OnAlloc (ulong offset, uint size, Gst.Buffer buf) + { + return InternalAlloc (offset, size, buf); + } + + private Gst.FlowReturn InternalAlloc (ulong offset, uint size, Gst.Buffer buf) + { + AllocNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + unmanaged = (AllocNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AllocNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, offset, size, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + static FillNativeDelegate Fill_cb_delegate; + static FillNativeDelegate FillVMCallback { + get { + if (Fill_cb_delegate == null) + Fill_cb_delegate = new FillNativeDelegate (Fill_cb); + return Fill_cb_delegate; + } + } + + static void OverrideFill (GLib.GType gtype) + { + OverrideFill (gtype, FillVMCallback); + } + + static void OverrideFill (GLib.GType gtype, FillNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fill")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FillNativeDelegate (IntPtr inst, ulong offset, uint size, IntPtr buf); + + static int Fill_cb (IntPtr inst, ulong offset, uint size, IntPtr buf) + { + try { + BaseSrc __obj = GLib.Object.GetObject (inst, false) as BaseSrc; + Gst.FlowReturn __result; + __result = __obj.OnFill (offset, size, buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseSrc), ConnectionMethod="OverrideFill")] + protected virtual Gst.FlowReturn OnFill (ulong offset, uint size, Gst.Buffer buf) + { + return InternalFill (offset, size, buf); + } + + private Gst.FlowReturn InternalFill (ulong offset, uint size, Gst.Buffer buf) + { + FillNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fill")); + unmanaged = (FillNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FillNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, offset, size, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_caps" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_caps + , null + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "get_caps" + , "fixate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fixate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixate + , "negotiate" + , "set_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps + , "fixate" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "set_caps" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "decide_allocation" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "get_times" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_times" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_times + , "stop" + , "get_size" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_size" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_size + , "get_times" + , "is_seekable" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("is_seekable" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // is_seekable + , "get_size" + , "prepare_seek_segment" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare_seek_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare_seek_segment + , "is_seekable" + , "do_seek" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("do_seek" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // do_seek + , "prepare_seek_segment" + , "unlock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlock + , "do_seek" + , "unlock_stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlock_stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlock_stop + , "unlock" + , "query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // query + , "unlock_stop" + , "event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // event + , "query" + , "create" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create + , "event" + , "alloc" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("alloc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // alloc + , "create" + , "fill" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fill" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fill + , "alloc" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "fill" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_base_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_base_src_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_src_get_buffer_pool(IntPtr raw); + + public Gst.BufferPool BufferPool { + get { + IntPtr raw_ret = gst_base_src_get_buffer_pool(Handle); + Gst.BufferPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.BufferPool; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_is_async(IntPtr raw); + + public bool IsAsync { + get { + bool raw_ret = gst_base_src_is_async(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_is_live(IntPtr raw); + + public bool IsLive { + get { + bool raw_ret = gst_base_src_is_live(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_base_src_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_new_seamless_segment(IntPtr raw, long start, long stop, long time); + + [Obsolete] + public bool NewSeamlessSegment(long start, long stop, long time) { + bool raw_ret = gst_base_src_new_seamless_segment(Handle, start, stop, time); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_new_segment(IntPtr raw, IntPtr segment); + + public bool NewSegment(Gst.Segment segment) { + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + bool raw_ret = gst_base_src_new_segment(Handle, native_segment); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_segment); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_query_latency(IntPtr raw, out bool live, out ulong min_latency, out ulong max_latency); + + public bool QueryLatency(out bool live, out ulong min_latency, out ulong max_latency) { + bool raw_ret = gst_base_src_query_latency(Handle, out live, out min_latency, out max_latency); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_async(IntPtr raw, bool async); + + public bool Async { + set { + gst_base_src_set_async(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_automatic_eos(IntPtr raw, bool automatic_eos); + + public bool AutomaticEos { + set { + gst_base_src_set_automatic_eos(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_src_set_caps(IntPtr raw, IntPtr caps); + + public bool SetCaps(Gst.Caps caps) { + bool raw_ret = gst_base_src_set_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_dynamic_size(IntPtr raw, bool dynamic); + + public bool DynamicSize { + set { + gst_base_src_set_dynamic_size(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_format(IntPtr raw, int format); + + public Gst.Format Format { + set { + gst_base_src_set_format(Handle, (int) value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_set_live(IntPtr raw, bool live); + + public bool Live { + set { + gst_base_src_set_live(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_start_complete(IntPtr raw, int _ret); + + public void StartComplete(Gst.FlowReturn _ret) { + gst_base_src_start_complete(Handle, (int) _ret); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_src_start_wait(IntPtr raw); + + public Gst.FlowReturn StartWait() { + int raw_ret = gst_base_src_start_wait(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_src_submit_buffer_list(IntPtr raw, IntPtr buffer_list); + + public void SubmitBufferList(Gst.BufferList buffer_list) { + buffer_list.Owned = false; + gst_base_src_submit_buffer_list(Handle, buffer_list == null ? IntPtr.Zero : buffer_list.Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_base_src_wait_playing(IntPtr raw); + + public Gst.FlowReturn WaitPlaying() { + int raw_ret = gst_base_src_wait_playing(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + + static BaseSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("srcpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , null + , "live_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("live_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // live_lock + , "srcpad" + , "live_cond" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("live_cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // live_cond + , "live_lock" + , "is_live" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_live_condAlign), "live_cond") + , 0 + ), + new GLib.AbiField("is_live" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // is_live + , "live_cond" + , "live_running" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_is_liveAlign), "is_live") + , 0 + ), + new GLib.AbiField("live_running" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // live_running + , "is_live" + , "blocksize" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_live_runningAlign), "live_running") + , 0 + ), + new GLib.AbiField("blocksize" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // blocksize + , "live_running" + , "can_activate_push" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_blocksizeAlign), "blocksize") + , 0 + ), + new GLib.AbiField("can_activate_push" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // can_activate_push + , "blocksize" + , "random_access" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_can_activate_pushAlign), "can_activate_push") + , 0 + ), + new GLib.AbiField("random_access" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // random_access + , "can_activate_push" + , "clock_id" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_random_accessAlign), "random_access") + , 0 + ), + new GLib.AbiField("clock_id" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock_id + , "random_access" + , "segment" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "clock_id" + , "need_newsegment" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("need_newsegment" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // need_newsegment + , "segment" + , "num_buffers" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_need_newsegmentAlign), "need_newsegment") + , 0 + ), + new GLib.AbiField("num_buffers" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // num_buffers + , "need_newsegment" + , "num_buffers_left" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_num_buffersAlign), "num_buffers") + , 0 + ), + new GLib.AbiField("num_buffers_left" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // num_buffers_left + , "num_buffers" + , "typefind" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_num_buffers_leftAlign), "num_buffers_left") + , 0 + ), + new GLib.AbiField("typefind" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // typefind + , "num_buffers_left" + , "running" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_typefindAlign), "typefind") + , 0 + ), + new GLib.AbiField("running" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // running + , "typefind" + , "pending_seek" + , (long) Marshal.OffsetOf(typeof(GstBaseSrc_runningAlign), "running") + , 0 + ), + new GLib.AbiField("pending_seek" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pending_seek + , "running" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "pending_seek" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_live_condAlign + { + sbyte f1; + private GLib.Cond.ABI live_cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_is_liveAlign + { + sbyte f1; + private bool is_live; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_live_runningAlign + { + sbyte f1; + private bool live_running; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_blocksizeAlign + { + sbyte f1; + private uint blocksize; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_can_activate_pushAlign + { + sbyte f1; + private bool can_activate_push; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_random_accessAlign + { + sbyte f1; + private bool random_access; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_need_newsegmentAlign + { + sbyte f1; + private bool need_newsegment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_num_buffersAlign + { + sbyte f1; + private int num_buffers; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_num_buffers_leftAlign + { + sbyte f1; + private int num_buffers_left; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_typefindAlign + { + sbyte f1; + private bool typefind; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseSrc_runningAlign + { + sbyte f1; + private bool running; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/BaseSrcFlags.cs b/sources/generated/Gst.Base/BaseSrcFlags.cs new file mode 100644 index 0000000000..17464db4f7 --- /dev/null +++ b/sources/generated/Gst.Base/BaseSrcFlags.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + public enum BaseSrcFlags : uint { + + Starting = 16384, + Started = 32768, + Last = 1048576, + } +#endregion +} diff --git a/sources/generated/Gst.Base/BaseTransform.cs b/sources/generated/Gst.Base/BaseTransform.cs new file mode 100644 index 0000000000..8b69ef4897 --- /dev/null +++ b/sources/generated/Gst.Base/BaseTransform.cs @@ -0,0 +1,1844 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BaseTransform : Gst.Element { + + protected BaseTransform (IntPtr raw) : base(raw) {} + + protected BaseTransform() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("qos")] + public bool Qos { + get { + GLib.Value val = GetProperty ("qos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos", val); + val.Dispose (); + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public bool HaveSegment { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("have_segment")); + return (*raw_ptr); + } + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + public Gst.Buffer QueuedBuf { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("queued_buf")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Buffer), false); + } + } + } + + static TransformCapsNativeDelegate TransformCaps_cb_delegate; + static TransformCapsNativeDelegate TransformCapsVMCallback { + get { + if (TransformCaps_cb_delegate == null) + TransformCaps_cb_delegate = new TransformCapsNativeDelegate (TransformCaps_cb); + return TransformCaps_cb_delegate; + } + } + + static void OverrideTransformCaps (GLib.GType gtype) + { + OverrideTransformCaps (gtype, TransformCapsVMCallback); + } + + static void OverrideTransformCaps (GLib.GType gtype, TransformCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr TransformCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps, IntPtr filter); + + static IntPtr TransformCaps_cb (IntPtr inst, int direction, IntPtr caps, IntPtr filter) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.Caps __result; + __result = __obj.OnTransformCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformCaps")] + protected virtual Gst.Caps OnTransformCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps filter) + { + return InternalTransformCaps (direction, caps, filter); + } + + private Gst.Caps InternalTransformCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps filter) + { + TransformCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_caps")); + unmanaged = (TransformCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static FixateCapsNativeDelegate FixateCaps_cb_delegate; + static FixateCapsNativeDelegate FixateCapsVMCallback { + get { + if (FixateCaps_cb_delegate == null) + FixateCaps_cb_delegate = new FixateCapsNativeDelegate (FixateCaps_cb); + return FixateCaps_cb_delegate; + } + } + + static void OverrideFixateCaps (GLib.GType gtype) + { + OverrideFixateCaps (gtype, FixateCapsVMCallback); + } + + static void OverrideFixateCaps (GLib.GType gtype, FixateCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr FixateCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps, IntPtr othercaps); + + static IntPtr FixateCaps_cb (IntPtr inst, int direction, IntPtr caps, IntPtr othercaps) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.Caps __result; + __result = __obj.OnFixateCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideFixateCaps")] + protected virtual Gst.Caps OnFixateCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps othercaps) + { + return InternalFixateCaps (direction, caps, othercaps); + } + + private Gst.Caps InternalFixateCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps othercaps) + { + FixateCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_caps")); + unmanaged = (FixateCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FixateCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, othercaps == null ? IntPtr.Zero : othercaps.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static AcceptCapsNativeDelegate AcceptCaps_cb_delegate; + static AcceptCapsNativeDelegate AcceptCapsVMCallback { + get { + if (AcceptCaps_cb_delegate == null) + AcceptCaps_cb_delegate = new AcceptCapsNativeDelegate (AcceptCaps_cb); + return AcceptCaps_cb_delegate; + } + } + + static void OverrideAcceptCaps (GLib.GType gtype) + { + OverrideAcceptCaps (gtype, AcceptCapsVMCallback); + } + + static void OverrideAcceptCaps (GLib.GType gtype, AcceptCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("accept_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool AcceptCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps); + + static bool AcceptCaps_cb (IntPtr inst, int direction, IntPtr caps) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnAcceptCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideAcceptCaps")] + protected virtual bool OnAcceptCaps (Gst.PadDirection direction, Gst.Caps caps) + { + return InternalAcceptCaps (direction, caps); + } + + private bool InternalAcceptCaps (Gst.PadDirection direction, Gst.Caps caps) + { + AcceptCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("accept_caps")); + unmanaged = (AcceptCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AcceptCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static SetCapsNativeDelegate SetCaps_cb_delegate; + static SetCapsNativeDelegate SetCapsVMCallback { + get { + if (SetCaps_cb_delegate == null) + SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); + return SetCaps_cb_delegate; + } + } + + static void OverrideSetCaps (GLib.GType gtype) + { + OverrideSetCaps (gtype, SetCapsVMCallback); + } + + static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr incaps, IntPtr outcaps); + + static bool SetCaps_cb (IntPtr inst, IntPtr incaps, IntPtr outcaps) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnSetCaps (incaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (incaps, typeof (Gst.Caps), false), outcaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (outcaps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSetCaps")] + protected virtual bool OnSetCaps (Gst.Caps incaps, Gst.Caps outcaps) + { + return InternalSetCaps (incaps, outcaps); + } + + private bool InternalSetCaps (Gst.Caps incaps, Gst.Caps outcaps) + { + SetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, incaps == null ? IntPtr.Zero : incaps.Handle, outcaps == null ? IntPtr.Zero : outcaps.Handle); + return __result; + } + + static QueryNativeDelegate Query_cb_delegate; + static QueryNativeDelegate QueryVMCallback { + get { + if (Query_cb_delegate == null) + Query_cb_delegate = new QueryNativeDelegate (Query_cb); + return Query_cb_delegate; + } + } + + static void OverrideQuery (GLib.GType gtype) + { + OverrideQuery (gtype, QueryVMCallback); + } + + static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool QueryNativeDelegate (IntPtr inst, int direction, IntPtr query); + + static bool Query_cb (IntPtr inst, int direction, IntPtr query) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnQuery ((Gst.PadDirection) direction, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideQuery")] + protected virtual bool OnQuery (Gst.PadDirection direction, Gst.Query query) + { + return InternalQuery (direction, query); + } + + private bool InternalQuery (Gst.PadDirection direction, Gst.Query query) + { + QueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, (int) direction, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static FilterMetaNativeDelegate FilterMeta_cb_delegate; + static FilterMetaNativeDelegate FilterMetaVMCallback { + get { + if (FilterMeta_cb_delegate == null) + FilterMeta_cb_delegate = new FilterMetaNativeDelegate (FilterMeta_cb); + return FilterMeta_cb_delegate; + } + } + + static void OverrideFilterMeta (GLib.GType gtype) + { + OverrideFilterMeta (gtype, FilterMetaVMCallback); + } + + static void OverrideFilterMeta (GLib.GType gtype, FilterMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("filter_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool FilterMetaNativeDelegate (IntPtr inst, IntPtr query, IntPtr api, IntPtr parms); + + static bool FilterMeta_cb (IntPtr inst, IntPtr query, IntPtr api, IntPtr parms) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnFilterMeta (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false), new GLib.GType(api), parms == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (parms, typeof (Gst.Structure), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideFilterMeta")] + protected virtual bool OnFilterMeta (Gst.Query query, GLib.GType api, Gst.Structure parms) + { + return InternalFilterMeta (query, api, parms); + } + + private bool InternalFilterMeta (Gst.Query query, GLib.GType api, Gst.Structure parms) + { + FilterMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("filter_meta")); + unmanaged = (FilterMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FilterMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle, api.Val, parms == null ? IntPtr.Zero : parms.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr decide_query, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr decide_query, IntPtr query) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnProposeAllocation (decide_query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (decide_query, typeof (Gst.Query), false), query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query decide_query, Gst.Query query) + { + return InternalProposeAllocation (decide_query, query); + } + + private bool InternalProposeAllocation (Gst.Query decide_query, Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, decide_query == null ? IntPtr.Zero : decide_query.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static TransformSizeNativeDelegate TransformSize_cb_delegate; + static TransformSizeNativeDelegate TransformSizeVMCallback { + get { + if (TransformSize_cb_delegate == null) + TransformSize_cb_delegate = new TransformSizeNativeDelegate (TransformSize_cb); + return TransformSize_cb_delegate; + } + } + + static void OverrideTransformSize (GLib.GType gtype) + { + OverrideTransformSize (gtype, TransformSizeVMCallback); + } + + static void OverrideTransformSize (GLib.GType gtype, TransformSizeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_size")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformSizeNativeDelegate (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize); + + static bool TransformSize_cb (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + ulong myothersize; + __result = __obj.OnTransformSize ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), (ulong) size, othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), false), out myothersize); + othersize = new UIntPtr (myothersize); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformSize")] + protected virtual bool OnTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) + { + return InternalTransformSize (direction, caps, size, othercaps, out othersize); + } + + private bool InternalTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) + { + TransformSizeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_size")); + unmanaged = (TransformSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformSizeNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + UIntPtr native_othersize; + bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, new UIntPtr (size), othercaps == null ? IntPtr.Zero : othercaps.Handle, out native_othersize); + othersize = (ulong) native_othersize; + return __result; + } + + static GetUnitSizeNativeDelegate GetUnitSize_cb_delegate; + static GetUnitSizeNativeDelegate GetUnitSizeVMCallback { + get { + if (GetUnitSize_cb_delegate == null) + GetUnitSize_cb_delegate = new GetUnitSizeNativeDelegate (GetUnitSize_cb); + return GetUnitSize_cb_delegate; + } + } + + static void OverrideGetUnitSize (GLib.GType gtype) + { + OverrideGetUnitSize (gtype, GetUnitSizeVMCallback); + } + + static void OverrideGetUnitSize (GLib.GType gtype, GetUnitSizeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_unit_size")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetUnitSizeNativeDelegate (IntPtr inst, IntPtr caps, out UIntPtr size); + + static bool GetUnitSize_cb (IntPtr inst, IntPtr caps, out UIntPtr size) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + ulong mysize; + __result = __obj.OnGetUnitSize (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), out mysize); + size = new UIntPtr (mysize); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGetUnitSize")] + protected virtual bool OnGetUnitSize (Gst.Caps caps, out ulong size) + { + return InternalGetUnitSize (caps, out size); + } + + private bool InternalGetUnitSize (Gst.Caps caps, out ulong size) + { + GetUnitSizeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_unit_size")); + unmanaged = (GetUnitSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetUnitSizeNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + UIntPtr native_size; + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle, out native_size); + size = (ulong) native_size; + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static PrepareOutputBufferNativeDelegate PrepareOutputBuffer_cb_delegate; + static PrepareOutputBufferNativeDelegate PrepareOutputBufferVMCallback { + get { + if (PrepareOutputBuffer_cb_delegate == null) + PrepareOutputBuffer_cb_delegate = new PrepareOutputBufferNativeDelegate (PrepareOutputBuffer_cb); + return PrepareOutputBuffer_cb_delegate; + } + } + + static void OverridePrepareOutputBuffer (GLib.GType gtype) + { + OverridePrepareOutputBuffer (gtype, PrepareOutputBufferVMCallback); + } + + static void OverridePrepareOutputBuffer (GLib.GType gtype, PrepareOutputBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_output_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrepareOutputBufferNativeDelegate (IntPtr inst, IntPtr input, out IntPtr outbuf); + + static int PrepareOutputBuffer_cb (IntPtr inst, IntPtr input, out IntPtr outbuf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.FlowReturn __result; + Gst.Buffer myoutbuf; + __result = __obj.OnPrepareOutputBuffer (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), out myoutbuf); + outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverridePrepareOutputBuffer")] + protected virtual Gst.FlowReturn OnPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) + { + return InternalPrepareOutputBuffer (input, out outbuf); + } + + private Gst.FlowReturn InternalPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) + { + PrepareOutputBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_output_buffer")); + unmanaged = (PrepareOutputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareOutputBufferNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_outbuf; + int __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, out native_outbuf); + outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); + return (Gst.FlowReturn) __result; + } + + static CopyMetadataNativeDelegate CopyMetadata_cb_delegate; + static CopyMetadataNativeDelegate CopyMetadataVMCallback { + get { + if (CopyMetadata_cb_delegate == null) + CopyMetadata_cb_delegate = new CopyMetadataNativeDelegate (CopyMetadata_cb); + return CopyMetadata_cb_delegate; + } + } + + static void OverrideCopyMetadata (GLib.GType gtype) + { + OverrideCopyMetadata (gtype, CopyMetadataVMCallback); + } + + static void OverrideCopyMetadata (GLib.GType gtype, CopyMetadataNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("copy_metadata")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CopyMetadataNativeDelegate (IntPtr inst, IntPtr input, IntPtr outbuf); + + static bool CopyMetadata_cb (IntPtr inst, IntPtr input, IntPtr outbuf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnCopyMetadata (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideCopyMetadata")] + protected virtual bool OnCopyMetadata (Gst.Buffer input, Gst.Buffer outbuf) + { + return InternalCopyMetadata (input, outbuf); + } + + private bool InternalCopyMetadata (Gst.Buffer input, Gst.Buffer outbuf) + { + CopyMetadataNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("copy_metadata")); + unmanaged = (CopyMetadataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CopyMetadataNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); + return __result; + } + + static TransformMetaNativeDelegate TransformMeta_cb_delegate; + static TransformMetaNativeDelegate TransformMetaVMCallback { + get { + if (TransformMeta_cb_delegate == null) + TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); + return TransformMeta_cb_delegate; + } + } + + static void OverrideTransformMeta (GLib.GType gtype) + { + OverrideTransformMeta (gtype, TransformMetaVMCallback); + } + + static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf); + + static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + bool __result; + __result = __obj.OnTransformMeta (outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false), Gst.Meta.New (meta), inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformMeta")] + protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + return InternalTransformMeta (outbuf, meta, inbuf); + } + + private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) + { + TransformMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle, native_meta, inbuf == null ? IntPtr.Zero : inbuf.Handle); + Marshal.FreeHGlobal (native_meta); + return __result; + } + + static BeforeTransformNativeDelegate BeforeTransform_cb_delegate; + static BeforeTransformNativeDelegate BeforeTransformVMCallback { + get { + if (BeforeTransform_cb_delegate == null) + BeforeTransform_cb_delegate = new BeforeTransformNativeDelegate (BeforeTransform_cb); + return BeforeTransform_cb_delegate; + } + } + + static void OverrideBeforeTransform (GLib.GType gtype) + { + OverrideBeforeTransform (gtype, BeforeTransformVMCallback); + } + + static void OverrideBeforeTransform (GLib.GType gtype, BeforeTransformNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("before_transform")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void BeforeTransformNativeDelegate (IntPtr inst, IntPtr buffer); + + static void BeforeTransform_cb (IntPtr inst, IntPtr buffer) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + __obj.OnBeforeTransform (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideBeforeTransform")] + protected virtual void OnBeforeTransform (Gst.Buffer buffer) + { + InternalBeforeTransform (buffer); + } + + private void InternalBeforeTransform (Gst.Buffer buffer) + { + BeforeTransformNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("before_transform")); + unmanaged = (BeforeTransformNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(BeforeTransformNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + static TransformNativeDelegate Transform_cb_delegate; + static TransformNativeDelegate TransformVMCallback { + get { + if (Transform_cb_delegate == null) + Transform_cb_delegate = new TransformNativeDelegate (Transform_cb); + return Transform_cb_delegate; + } + } + + static void OverrideTransform (GLib.GType gtype) + { + OverrideTransform (gtype, TransformVMCallback); + } + + static void OverrideTransform (GLib.GType gtype, TransformNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int TransformNativeDelegate (IntPtr inst, IntPtr inbuf, IntPtr outbuf); + + static int Transform_cb (IntPtr inst, IntPtr inbuf, IntPtr outbuf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.FlowReturn __result; + __result = __obj.OnTransform (inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false), outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransform")] + protected virtual Gst.FlowReturn OnTransform (Gst.Buffer inbuf, Gst.Buffer outbuf) + { + return InternalTransform (inbuf, outbuf); + } + + private Gst.FlowReturn InternalTransform (Gst.Buffer inbuf, Gst.Buffer outbuf) + { + TransformNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform")); + unmanaged = (TransformNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, inbuf == null ? IntPtr.Zero : inbuf.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); + return (Gst.FlowReturn) __result; + } + + static TransformIpNativeDelegate TransformIp_cb_delegate; + static TransformIpNativeDelegate TransformIpVMCallback { + get { + if (TransformIp_cb_delegate == null) + TransformIp_cb_delegate = new TransformIpNativeDelegate (TransformIp_cb); + return TransformIp_cb_delegate; + } + } + + static void OverrideTransformIp (GLib.GType gtype) + { + OverrideTransformIp (gtype, TransformIpVMCallback); + } + + static void OverrideTransformIp (GLib.GType gtype, TransformIpNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_ip")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int TransformIpNativeDelegate (IntPtr inst, IntPtr buf); + + static int TransformIp_cb (IntPtr inst, IntPtr buf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.FlowReturn __result; + __result = __obj.OnTransformIp (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformIp")] + protected virtual Gst.FlowReturn OnTransformIp (Gst.Buffer buf) + { + return InternalTransformIp (buf); + } + + private Gst.FlowReturn InternalTransformIp (Gst.Buffer buf) + { + TransformIpNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_ip")); + unmanaged = (TransformIpNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformIpNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + static SubmitInputBufferNativeDelegate SubmitInputBuffer_cb_delegate; + static SubmitInputBufferNativeDelegate SubmitInputBufferVMCallback { + get { + if (SubmitInputBuffer_cb_delegate == null) + SubmitInputBuffer_cb_delegate = new SubmitInputBufferNativeDelegate (SubmitInputBuffer_cb); + return SubmitInputBuffer_cb_delegate; + } + } + + static void OverrideSubmitInputBuffer (GLib.GType gtype) + { + OverrideSubmitInputBuffer (gtype, SubmitInputBufferVMCallback); + } + + static void OverrideSubmitInputBuffer (GLib.GType gtype, SubmitInputBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("submit_input_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int SubmitInputBufferNativeDelegate (IntPtr inst, bool is_discont, IntPtr input); + + static int SubmitInputBuffer_cb (IntPtr inst, bool is_discont, IntPtr input) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.FlowReturn __result; + __result = __obj.OnSubmitInputBuffer (is_discont, input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSubmitInputBuffer")] + protected virtual Gst.FlowReturn OnSubmitInputBuffer (bool is_discont, Gst.Buffer input) + { + return InternalSubmitInputBuffer (is_discont, input); + } + + private Gst.FlowReturn InternalSubmitInputBuffer (bool is_discont, Gst.Buffer input) + { + SubmitInputBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("submit_input_buffer")); + unmanaged = (SubmitInputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SubmitInputBufferNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, is_discont, input == null ? IntPtr.Zero : input.Handle); + return (Gst.FlowReturn) __result; + } + + static GenerateOutputNativeDelegate GenerateOutput_cb_delegate; + static GenerateOutputNativeDelegate GenerateOutputVMCallback { + get { + if (GenerateOutput_cb_delegate == null) + GenerateOutput_cb_delegate = new GenerateOutputNativeDelegate (GenerateOutput_cb); + return GenerateOutput_cb_delegate; + } + } + + static void OverrideGenerateOutput (GLib.GType gtype) + { + OverrideGenerateOutput (gtype, GenerateOutputVMCallback); + } + + static void OverrideGenerateOutput (GLib.GType gtype, GenerateOutputNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("generate_output")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GenerateOutputNativeDelegate (IntPtr inst, out IntPtr outbuf); + + static int GenerateOutput_cb (IntPtr inst, out IntPtr outbuf) + { + try { + BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; + Gst.FlowReturn __result; + Gst.Buffer myoutbuf; + __result = __obj.OnGenerateOutput (out myoutbuf); + outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGenerateOutput")] + protected virtual Gst.FlowReturn OnGenerateOutput (out Gst.Buffer outbuf) + { + return InternalGenerateOutput (out outbuf); + } + + private Gst.FlowReturn InternalGenerateOutput (out Gst.Buffer outbuf) + { + GenerateOutputNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("generate_output")); + unmanaged = (GenerateOutputNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GenerateOutputNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_outbuf; + int __result = unmanaged (this.Handle, out native_outbuf); + outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("passthrough_on_same_caps" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(bool)) // passthrough_on_same_caps + , null + , "transform_ip_on_passthrough" + , (long) Marshal.OffsetOf(typeof(GstBaseTransform_passthrough_on_same_capsAlign), "passthrough_on_same_caps") + , 0 + ), + new GLib.AbiField("transform_ip_on_passthrough" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // transform_ip_on_passthrough + , "passthrough_on_same_caps" + , "transform_caps" + , (long) Marshal.OffsetOf(typeof(GstBaseTransform_transform_ip_on_passthroughAlign), "transform_ip_on_passthrough") + , 0 + ), + new GLib.AbiField("transform_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_caps + , "transform_ip_on_passthrough" + , "fixate_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fixate_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixate_caps + , "transform_caps" + , "accept_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("accept_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // accept_caps + , "fixate_caps" + , "set_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps + , "accept_caps" + , "query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // query + , "set_caps" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "query" + , "filter_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("filter_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // filter_meta + , "decide_allocation" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "filter_meta" + , "transform_size" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_size" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_size + , "propose_allocation" + , "get_unit_size" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_unit_size" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_unit_size + , "transform_size" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "get_unit_size" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "stop" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "prepare_output_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare_output_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare_output_buffer + , "src_event" + , "copy_metadata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("copy_metadata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // copy_metadata + , "prepare_output_buffer" + , "transform_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta + , "copy_metadata" + , "before_transform" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("before_transform" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // before_transform + , "transform_meta" + , "transform" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform + , "before_transform" + , "transform_ip" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_ip" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_ip + , "transform" + , "submit_input_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("submit_input_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // submit_input_buffer + , "transform_ip" + , "generate_output" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("generate_output" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // generate_output + , "submit_input_buffer" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 18 // _gst_reserved + , "generate_output" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseTransform_passthrough_on_same_capsAlign + { + sbyte f1; + private bool passthrough_on_same_caps; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseTransform_transform_ip_on_passthroughAlign + { + sbyte f1; + private bool transform_ip_on_passthrough; + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_transform_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_base_transform_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_base_transform_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_base_transform_get_buffer_pool(IntPtr raw); + + public Gst.BufferPool BufferPool { + get { + IntPtr raw_ret = gst_base_transform_get_buffer_pool(Handle); + Gst.BufferPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.BufferPool; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_transform_is_in_place(IntPtr raw); + + public bool IsInPlace { + get { + bool raw_ret = gst_base_transform_is_in_place(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_transform_is_passthrough(IntPtr raw); + + public bool IsPassthrough { + get { + bool raw_ret = gst_base_transform_is_passthrough(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_transform_is_qos_enabled(IntPtr raw); + + public bool IsQosEnabled { + get { + bool raw_ret = gst_base_transform_is_qos_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_transform_reconfigure(IntPtr raw); + + public bool Reconfigure() { + bool raw_ret = gst_base_transform_reconfigure(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_reconfigure_sink(IntPtr raw); + + public void ReconfigureSink() { + gst_base_transform_reconfigure_sink(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_reconfigure_src(IntPtr raw); + + public void ReconfigureSrc() { + gst_base_transform_reconfigure_src(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_set_gap_aware(IntPtr raw, bool gap_aware); + + public bool GapAware { + set { + gst_base_transform_set_gap_aware(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_set_in_place(IntPtr raw, bool in_place); + + public bool InPlace { + set { + gst_base_transform_set_in_place(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_set_passthrough(IntPtr raw, bool passthrough); + + public bool Passthrough { + set { + gst_base_transform_set_passthrough(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_set_prefer_passthrough(IntPtr raw, bool prefer_passthrough); + + public bool PreferPassthrough { + set { + gst_base_transform_set_prefer_passthrough(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_set_qos_enabled(IntPtr raw, bool enabled); + + public bool QosEnabled { + set { + gst_base_transform_set_qos_enabled(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_base_transform_update_qos(IntPtr raw, double proportion, long diff, ulong timestamp); + + public void UpdateQos(double proportion, long diff, ulong timestamp) { + gst_base_transform_update_qos(Handle, proportion, diff, timestamp); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_base_transform_update_src_caps(IntPtr raw, IntPtr updated_caps); + + public bool UpdateSrcCaps(Gst.Caps updated_caps) { + bool raw_ret = gst_base_transform_update_src_caps(Handle, updated_caps == null ? IntPtr.Zero : updated_caps.Handle); + bool ret = raw_ret; + return ret; + } + + + static BaseTransform () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "have_segment" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("have_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // have_segment + , "srcpad" + , "segment" + , (long) Marshal.OffsetOf(typeof(GstBaseTransform_have_segmentAlign), "have_segment") + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "have_segment" + , "queued_buf" + , (long) Marshal.OffsetOf(typeof(GstBaseTransform_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("queued_buf" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // queued_buf + , "segment" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "queued_buf" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 19 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseTransform_have_segmentAlign + { + sbyte f1; + private bool have_segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBaseTransform_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/BitReader.cs b/sources/generated/Gst.Base/BitReader.cs new file mode 100644 index 0000000000..c26a699f1f --- /dev/null +++ b/sources/generated/Gst.Base/BitReader.cs @@ -0,0 +1,251 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct BitReader : IEquatable { + + [MarshalAs (UnmanagedType.ByValArray, SizeConst=0)] + public byte[] Data; + public uint Size; + public uint Byte; + public uint Bit; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Base.BitReader Zero = new Gst.Base.BitReader (); + + public static Gst.Base.BitReader New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.BitReader.Zero; + return (Gst.Base.BitReader) Marshal.PtrToStructure (raw, typeof (Gst.Base.BitReader)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bit_reader_free(IntPtr raw); + + public void Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_bit_reader_free(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_get_bits_uint16(IntPtr raw, out ushort val, uint nbits); + + public bool GetBitsUint16(out ushort val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_get_bits_uint16(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_get_bits_uint32(IntPtr raw, out uint val, uint nbits); + + public bool GetBitsUint32(out uint val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_get_bits_uint32(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_get_bits_uint64(IntPtr raw, out ulong val, uint nbits); + + public bool GetBitsUint64(out ulong val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_get_bits_uint64(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_get_bits_uint8(IntPtr raw, out byte val, uint nbits); + + public bool GetBitsUint8(out byte val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_get_bits_uint8(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_bit_reader_get_pos(IntPtr raw); + + public uint Pos { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_bit_reader_get_pos(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_bit_reader_get_remaining(IntPtr raw); + + public uint Remaining { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_bit_reader_get_remaining(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bit_reader_init(IntPtr raw, byte[] data, uint size); + + public void Init(byte[] data, uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_bit_reader_init(this_as_native, data, size); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_peek_bits_uint16(IntPtr raw, out ushort val, uint nbits); + + public bool PeekBitsUint16(out ushort val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_peek_bits_uint16(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_peek_bits_uint32(IntPtr raw, out uint val, uint nbits); + + public bool PeekBitsUint32(out uint val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_peek_bits_uint32(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_peek_bits_uint64(IntPtr raw, out ulong val, uint nbits); + + public bool PeekBitsUint64(out ulong val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_peek_bits_uint64(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_peek_bits_uint8(IntPtr raw, out byte val, uint nbits); + + public bool PeekBitsUint8(out byte val, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_peek_bits_uint8(this_as_native, out val, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_set_pos(IntPtr raw, uint pos); + + public bool SetPos(uint pos) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_set_pos(this_as_native, pos); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_skip(IntPtr raw, uint nbits); + + public bool Skip(uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_skip(this_as_native, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_reader_skip_to_byte(IntPtr raw); + + public bool SkipToByte() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_reader_skip_to_byte(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Base.BitReader target) + { + target = New (native); + } + + public bool Equals (BitReader other) + { + return true && Data.Equals (other.Data) && Size.Equals (other.Size) && Byte.Equals (other.Byte) && Bit.Equals (other.Bit); + } + + public override bool Equals (object other) + { + return other is BitReader && Equals ((BitReader) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Data.GetHashCode () ^ Size.GetHashCode () ^ Byte.GetHashCode () ^ Bit.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/BitWriter.cs b/sources/generated/Gst.Base/BitWriter.cs new file mode 100644 index 0000000000..b27af6493d --- /dev/null +++ b/sources/generated/Gst.Base/BitWriter.cs @@ -0,0 +1,225 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct BitWriter : IEquatable { + + public byte Data; + public uint BitSize; + private uint bit_capacity; + private bool auto_grow; + private bool owned; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Base.BitWriter Zero = new Gst.Base.BitWriter (); + + public static Gst.Base.BitWriter New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.BitWriter.Zero; + return (Gst.Base.BitWriter) Marshal.PtrToStructure (raw, typeof (Gst.Base.BitWriter)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_align_bytes(IntPtr raw, byte trailing_bit); + + public bool AlignBytes(byte trailing_bit) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_align_bytes(this_as_native, trailing_bit); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bit_writer_free(IntPtr raw); + + public void Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_bit_writer_free(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bit_writer_free_and_get_buffer(IntPtr raw); + + public Gst.Buffer FreeAndGetBuffer() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_bit_writer_free_and_get_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_bit_writer_get_remaining(IntPtr raw); + + public uint Remaining { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_bit_writer_get_remaining(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_bit_writer_get_size(IntPtr raw); + + public uint Size { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_bit_writer_get_size(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_put_bits_uint16(IntPtr raw, ushort value, uint nbits); + + public bool PutBitsUint16(ushort value, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_put_bits_uint16(this_as_native, value, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_put_bits_uint32(IntPtr raw, uint value, uint nbits); + + public bool PutBitsUint32(uint value, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_put_bits_uint32(this_as_native, value, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_put_bits_uint64(IntPtr raw, ulong value, uint nbits); + + public bool PutBitsUint64(ulong value, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_put_bits_uint64(this_as_native, value, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_put_bits_uint8(IntPtr raw, byte value, uint nbits); + + public bool PutBitsUint8(byte value, uint nbits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_put_bits_uint8(this_as_native, value, nbits); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_put_bytes(IntPtr raw, byte data, uint nbytes); + + public bool PutBytes(byte data, uint nbytes) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_put_bytes(this_as_native, data, nbytes); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bit_writer_reset(IntPtr raw); + + public void Reset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_bit_writer_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bit_writer_reset_and_get_buffer(IntPtr raw); + + public Gst.Buffer ResetAndGetBuffer() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_bit_writer_reset_and_get_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bit_writer_set_pos(IntPtr raw, uint pos); + + public bool SetPos(uint pos) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_bit_writer_set_pos(this_as_native, pos); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Base.BitWriter target) + { + target = New (native); + } + + public bool Equals (BitWriter other) + { + return true && Data.Equals (other.Data) && BitSize.Equals (other.BitSize) && bit_capacity.Equals (other.bit_capacity) && auto_grow.Equals (other.auto_grow) && owned.Equals (other.owned); + } + + public override bool Equals (object other) + { + return other is BitWriter && Equals ((BitWriter) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Data.GetHashCode () ^ BitSize.GetHashCode () ^ bit_capacity.GetHashCode () ^ auto_grow.GetHashCode () ^ owned.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/BufferConsumedHandler.cs b/sources/generated/Gst.Base/BufferConsumedHandler.cs new file mode 100644 index 0000000000..a191a14627 --- /dev/null +++ b/sources/generated/Gst.Base/BufferConsumedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void BufferConsumedHandler(object o, BufferConsumedArgs args); + + public class BufferConsumedArgs : GLib.SignalArgs { + public Gst.Buffer Object{ + get { + return (Gst.Buffer) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Base/ByteReader.cs b/sources/generated/Gst.Base/ByteReader.cs new file mode 100644 index 0000000000..3f8d83841c --- /dev/null +++ b/sources/generated/Gst.Base/ByteReader.cs @@ -0,0 +1,110 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ByteReader : GLib.Opaque { + + public uint Size { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + *raw_ptr = value; + } + } + } + + public uint Byte { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("byte")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("byte")); + *raw_ptr = value; + } + } + } + + public ByteReader(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("data" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // data + , null + , "size" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("size" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // size + , "data" + , "byte" + , (long) Marshal.OffsetOf(typeof(GstByteReader_sizeAlign), "size") + , 0 + ), + new GLib.AbiField("byte" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // byte + , "size" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstByteReader_byteAlign), "_byte") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "byte" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstByteReader_sizeAlign + { + sbyte f1; + private uint size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstByteReader_byteAlign + { + sbyte f1; + private uint _byte; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/ByteWriter.cs b/sources/generated/Gst.Base/ByteWriter.cs new file mode 100644 index 0000000000..52ee0d7cd3 --- /dev/null +++ b/sources/generated/Gst.Base/ByteWriter.cs @@ -0,0 +1,551 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ByteWriter : IEquatable { + + private IntPtr _parent; + public Gst.Base.ByteReader Parent { + get { + return _parent == IntPtr.Zero ? null : (Gst.Base.ByteReader) GLib.Opaque.GetOpaque (_parent, typeof (Gst.Base.ByteReader), false); + } + set { + _parent = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint AllocSize; + public bool Fixed; + public bool Owned; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Base.ByteWriter Zero = new Gst.Base.ByteWriter (); + + public static Gst.Base.ByteWriter New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.ByteWriter.Zero; + return (Gst.Base.ByteWriter) Marshal.PtrToStructure (raw, typeof (Gst.Base.ByteWriter)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_ensure_free_space(IntPtr raw, uint size); + + public bool EnsureFreeSpace(uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_ensure_free_space(this_as_native, size); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_fill(IntPtr raw, byte value, uint size); + + public bool Fill(byte value, uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_fill(this_as_native, value, size); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_byte_writer_free(IntPtr raw); + + public void Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_byte_writer_free(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_byte_writer_free_and_get_buffer(IntPtr raw); + + public Gst.Buffer FreeAndGetBuffer() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_byte_writer_free_and_get_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_byte_writer_free_and_get_data(IntPtr raw); + + public byte FreeAndGetData() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_byte_writer_free_and_get_data(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_byte_writer_get_remaining(IntPtr raw); + + public uint Remaining { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_byte_writer_get_remaining(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_byte_writer_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_byte_writer_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_byte_writer_init_with_data(IntPtr raw, byte[] data, uint size, bool initialized); + + public void InitWithData(byte[] data, uint size, bool initialized) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_byte_writer_init_with_data(this_as_native, data, size, initialized); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_byte_writer_init_with_size(IntPtr raw, uint size, bool mfixed); + + public void InitWithSize(uint size, bool mfixed) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_byte_writer_init_with_size(this_as_native, size, mfixed); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_buffer(IntPtr raw, IntPtr buffer, UIntPtr offset, IntPtr size); + + public bool PutBuffer(Gst.Buffer buffer, ulong offset, long size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_buffer(this_as_native, buffer == null ? IntPtr.Zero : buffer.Handle, new UIntPtr (offset), new IntPtr (size)); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_data(IntPtr raw, byte[] data, uint size); + + public bool PutData(byte[] data, uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_data(this_as_native, data, size); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_float32_be(IntPtr raw, float val); + + public bool PutFloat32Be(float val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_float32_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_float32_le(IntPtr raw, float val); + + public bool PutFloat32Le(float val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_float32_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_float64_be(IntPtr raw, double val); + + public bool PutFloat64Be(double val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_float64_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_float64_le(IntPtr raw, double val); + + public bool PutFloat64Le(double val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_float64_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int16_be(IntPtr raw, short val); + + public bool PutInt16Be(short val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int16_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int16_le(IntPtr raw, short val); + + public bool PutInt16Le(short val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int16_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int24_be(IntPtr raw, int val); + + public bool PutInt24Be(int val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int24_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int24_le(IntPtr raw, int val); + + public bool PutInt24Le(int val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int24_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int32_be(IntPtr raw, int val); + + public bool PutInt32Be(int val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int32_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int32_le(IntPtr raw, int val); + + public bool PutInt32Le(int val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int32_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int64_be(IntPtr raw, long val); + + public bool PutInt64Be(long val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int64_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int64_le(IntPtr raw, long val); + + public bool PutInt64Le(long val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int64_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_int8(IntPtr raw, sbyte val); + + public bool PutInt8(sbyte val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_int8(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_string_utf16(IntPtr raw, ushort[] data); + + public bool PutStringUtf16(ushort[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_string_utf16(this_as_native, data); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_string_utf32(IntPtr raw, uint[] data); + + public bool PutStringUtf32(uint[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_string_utf32(this_as_native, data); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_string_utf8(IntPtr raw, IntPtr data); + + public bool PutStringUtf8(string data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data); + bool raw_ret = gst_byte_writer_put_string_utf8(this_as_native, native_data); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint16_be(IntPtr raw, ushort val); + + public bool PutUint16Be(ushort val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint16_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint16_le(IntPtr raw, ushort val); + + public bool PutUint16Le(ushort val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint16_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint24_be(IntPtr raw, uint val); + + public bool PutUint24Be(uint val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint24_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint24_le(IntPtr raw, uint val); + + public bool PutUint24Le(uint val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint24_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint32_be(IntPtr raw, uint val); + + public bool PutUint32Be(uint val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint32_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint32_le(IntPtr raw, uint val); + + public bool PutUint32Le(uint val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint32_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint64_be(IntPtr raw, ulong val); + + public bool PutUint64Be(ulong val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint64_be(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint64_le(IntPtr raw, ulong val); + + public bool PutUint64Le(ulong val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint64_le(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_byte_writer_put_uint8(IntPtr raw, byte val); + + public bool PutUint8(byte val) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_byte_writer_put_uint8(this_as_native, val); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_byte_writer_reset(IntPtr raw); + + public void Reset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_byte_writer_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_byte_writer_reset_and_get_buffer(IntPtr raw); + + public Gst.Buffer ResetAndGetBuffer() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_byte_writer_reset_and_get_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Base.ByteWriter target) + { + target = New (native); + } + + public bool Equals (ByteWriter other) + { + return true && Parent.Equals (other.Parent) && AllocSize.Equals (other.AllocSize) && Fixed.Equals (other.Fixed) && Owned.Equals (other.Owned); + } + + public override bool Equals (object other) + { + return other is ByteWriter && Equals ((ByteWriter) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Parent.GetHashCode () ^ AllocSize.GetHashCode () ^ Fixed.GetHashCode () ^ Owned.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/CollectData.cs b/sources/generated/Gst.Base/CollectData.cs new file mode 100644 index 0000000000..e01051ef4d --- /dev/null +++ b/sources/generated/Gst.Base/CollectData.cs @@ -0,0 +1,75 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct CollectData : IEquatable { + + private IntPtr _collect; + public Gst.Base.CollectPads Collect { + get { + return GLib.Object.GetObject(_collect) as Gst.Base.CollectPads; + } + set { + _collect = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _pad; + public Gst.Pad Pad { + get { + return GLib.Object.GetObject(_pad) as Gst.Pad; + } + set { + _pad = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint Pos; + public Gst.Segment Segment; + private Gst.Base.CollectPadsStateFlags state; + private IntPtr _priv; + + public static Gst.Base.CollectData Zero = new Gst.Base.CollectData (); + + public static Gst.Base.CollectData New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.CollectData.Zero; + return (Gst.Base.CollectData) Marshal.PtrToStructure (raw, typeof (Gst.Base.CollectData)); + } + + public bool Equals (CollectData other) + { + return true && Collect.Equals (other.Collect) && Pad.Equals (other.Pad) && Buffer.Equals (other.Buffer) && Pos.Equals (other.Pos) && Segment.Equals (other.Segment) && state.Equals (other.state) && _priv.Equals (other._priv); + } + + public override bool Equals (object other) + { + return other is CollectData && Equals ((CollectData) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Collect.GetHashCode () ^ Pad.GetHashCode () ^ Buffer.GetHashCode () ^ Pos.GetHashCode () ^ Segment.GetHashCode () ^ state.GetHashCode () ^ _priv.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/CollectDataDestroyNotify.cs b/sources/generated/Gst.Base/CollectDataDestroyNotify.cs new file mode 100644 index 0000000000..f601654a46 --- /dev/null +++ b/sources/generated/Gst.Base/CollectDataDestroyNotify.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void CollectDataDestroyNotify(Gst.Base.CollectData data); + +} diff --git a/sources/generated/Gst.Base/CollectPads.cs b/sources/generated/Gst.Base/CollectPads.cs new file mode 100644 index 0000000000..450521276d --- /dev/null +++ b/sources/generated/Gst.Base/CollectPads.cs @@ -0,0 +1,364 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class CollectPads : Gst.Object { + + public CollectPads (IntPtr raw) : base(raw) {} + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_new(); + + public CollectPads () : base (IntPtr.Zero) + { + if (GetType () != typeof (CollectPads)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_collect_pads_new(); + } + + public GLib.SList Data { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("data")); + return new GLib.SList((*raw_ptr)); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_collect_pads_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_add_pad(IntPtr raw, IntPtr pad, uint size, Gst.BaseSharp.CollectDataDestroyNotifyNative destroy_notify, bool _lock); + + public Gst.Base.CollectData AddPad(Gst.Pad pad, uint size, Gst.Base.CollectDataDestroyNotify destroy_notify, bool _lock) { + Gst.BaseSharp.CollectDataDestroyNotifyWrapper destroy_notify_wrapper = new Gst.BaseSharp.CollectDataDestroyNotifyWrapper (destroy_notify); + destroy_notify_wrapper.PersistUntilCalled (); + IntPtr raw_ret = gst_collect_pads_add_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle, size, destroy_notify_wrapper.NativeDelegate, _lock); + Gst.Base.CollectData ret = Gst.Base.CollectData.New (raw_ret); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_collect_pads_available(IntPtr raw); + + public uint Available() { + uint raw_ret = gst_collect_pads_available(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_collect_pads_clip_running_time(IntPtr raw, IntPtr cdata, IntPtr buf, out IntPtr outbuf, IntPtr user_data); + + public Gst.FlowReturn ClipRunningTime(Gst.Base.CollectData cdata, Gst.Buffer buf, out Gst.Buffer outbuf, IntPtr user_data) { + IntPtr native_cdata = GLib.Marshaller.StructureToPtrAlloc (cdata); + IntPtr native_outbuf; + int raw_ret = gst_collect_pads_clip_running_time(Handle, native_cdata, buf == null ? IntPtr.Zero : buf.Handle, out native_outbuf, user_data); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_cdata); + outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_collect_pads_event_default(IntPtr raw, IntPtr data, IntPtr evnt, bool discard); + + public bool EventDefault(Gst.Base.CollectData data, Gst.Event evnt, bool discard) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + bool raw_ret = gst_collect_pads_event_default(Handle, native_data, evnt == null ? IntPtr.Zero : evnt.Handle, discard); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_collect_pads_flush(IntPtr raw, IntPtr data, uint size); + + public uint Flush(Gst.Base.CollectData data, uint size) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + uint raw_ret = gst_collect_pads_flush(Handle, native_data, size); + uint ret = raw_ret; + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_peek(IntPtr raw, IntPtr data); + + public Gst.Buffer Peek(Gst.Base.CollectData data) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + IntPtr raw_ret = gst_collect_pads_peek(Handle, native_data); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_pop(IntPtr raw, IntPtr data); + + public Gst.Buffer Pop(Gst.Base.CollectData data) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + IntPtr raw_ret = gst_collect_pads_pop(Handle, native_data); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_collect_pads_query_default(IntPtr raw, IntPtr data, IntPtr query, bool discard); + + public bool QueryDefault(Gst.Base.CollectData data, Gst.Query query, bool discard) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + bool raw_ret = gst_collect_pads_query_default(Handle, native_data, query == null ? IntPtr.Zero : query.Handle, discard); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_read_buffer(IntPtr raw, IntPtr data, uint size); + + public Gst.Buffer ReadBuffer(Gst.Base.CollectData data, uint size) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + IntPtr raw_ret = gst_collect_pads_read_buffer(Handle, native_data, size); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_data); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_collect_pads_remove_pad(IntPtr raw, IntPtr pad); + + public bool RemovePad(Gst.Pad pad) { + bool raw_ret = gst_collect_pads_remove_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_buffer_function(IntPtr raw, Gst.BaseSharp.CollectPadsBufferFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsBufferFunction BufferFunction { + set { + Gst.BaseSharp.CollectPadsBufferFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsBufferFunctionWrapper (value); + gst_collect_pads_set_buffer_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_clip_function(IntPtr raw, Gst.BaseSharp.CollectPadsClipFunctionNative clipfunc, IntPtr user_data); + + public Gst.Base.CollectPadsClipFunction ClipFunction { + set { + Gst.BaseSharp.CollectPadsClipFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsClipFunctionWrapper (value); + gst_collect_pads_set_clip_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_compare_function(IntPtr raw, Gst.BaseSharp.CollectPadsCompareFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsCompareFunction CompareFunction { + set { + Gst.BaseSharp.CollectPadsCompareFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsCompareFunctionWrapper (value); + gst_collect_pads_set_compare_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_event_function(IntPtr raw, Gst.BaseSharp.CollectPadsEventFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsEventFunction EventFunction { + set { + Gst.BaseSharp.CollectPadsEventFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsEventFunctionWrapper (value); + gst_collect_pads_set_event_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_flush_function(IntPtr raw, Gst.BaseSharp.CollectPadsFlushFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsFlushFunction FlushFunction { + set { + Gst.BaseSharp.CollectPadsFlushFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsFlushFunctionWrapper (value); + gst_collect_pads_set_flush_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + set { + gst_collect_pads_set_flushing(Handle, value); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_function(IntPtr raw, Gst.BaseSharp.CollectPadsFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsFunction Function { + set { + Gst.BaseSharp.CollectPadsFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsFunctionWrapper (value); + gst_collect_pads_set_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_query_function(IntPtr raw, Gst.BaseSharp.CollectPadsQueryFunctionNative func, IntPtr user_data); + + public Gst.Base.CollectPadsQueryFunction QueryFunction { + set { + Gst.BaseSharp.CollectPadsQueryFunctionWrapper value_wrapper = new Gst.BaseSharp.CollectPadsQueryFunctionWrapper (value); + gst_collect_pads_set_query_function(Handle, value_wrapper.NativeDelegate, IntPtr.Zero); + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_set_waiting(IntPtr raw, IntPtr data, bool waiting); + + public void SetWaiting(Gst.Base.CollectData data, bool waiting) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + gst_collect_pads_set_waiting(Handle, native_data, waiting); + Marshal.FreeHGlobal (native_data); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_collect_pads_src_event_default(IntPtr raw, IntPtr pad, IntPtr evnt); + + public bool SrcEventDefault(Gst.Pad pad, Gst.Event evnt) { + bool raw_ret = gst_collect_pads_src_event_default(Handle, pad == null ? IntPtr.Zero : pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_start(IntPtr raw); + + public void Start() { + gst_collect_pads_start(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_collect_pads_stop(IntPtr raw); + + public void Stop() { + gst_collect_pads_stop(Handle); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_collect_pads_take_buffer(IntPtr raw, IntPtr data, uint size); + + public Gst.Buffer TakeBuffer(Gst.Base.CollectData data, uint size) { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + IntPtr raw_ret = gst_collect_pads_take_buffer(Handle, native_data, size); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_data); + return ret; + } + + + static CollectPads () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("data" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // data + , null + , "stream_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock + , "data" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstCollectPads_stream_lockAlign), "stream_lock") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "stream_lock" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstCollectPads_stream_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_lock; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/CollectPadsBufferFunction.cs b/sources/generated/Gst.Base/CollectPadsBufferFunction.cs new file mode 100644 index 0000000000..1928376d06 --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsBufferFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate Gst.FlowReturn CollectPadsBufferFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst.Base/CollectPadsClipFunction.cs b/sources/generated/Gst.Base/CollectPadsClipFunction.cs new file mode 100644 index 0000000000..1962cf2e2e --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsClipFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate Gst.FlowReturn CollectPadsClipFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer inbuffer, out Gst.Buffer outbuffer); + +} diff --git a/sources/generated/Gst.Base/CollectPadsCompareFunction.cs b/sources/generated/Gst.Base/CollectPadsCompareFunction.cs new file mode 100644 index 0000000000..4180d2212d --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsCompareFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate int CollectPadsCompareFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData data1, ulong timestamp1, Gst.Base.CollectData data2, ulong timestamp2); + +} diff --git a/sources/generated/Gst.Base/CollectPadsEventFunction.cs b/sources/generated/Gst.Base/CollectPadsEventFunction.cs new file mode 100644 index 0000000000..f414bbd3d1 --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsEventFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate bool CollectPadsEventFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Event evnt); + +} diff --git a/sources/generated/Gst.Base/CollectPadsFlushFunction.cs b/sources/generated/Gst.Base/CollectPadsFlushFunction.cs new file mode 100644 index 0000000000..5e73f3bea3 --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsFlushFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void CollectPadsFlushFunction(Gst.Base.CollectPads pads); + +} diff --git a/sources/generated/Gst.Base/CollectPadsFunction.cs b/sources/generated/Gst.Base/CollectPadsFunction.cs new file mode 100644 index 0000000000..ecce141f3c --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate Gst.FlowReturn CollectPadsFunction(Gst.Base.CollectPads pads); + +} diff --git a/sources/generated/Gst.Base/CollectPadsQueryFunction.cs b/sources/generated/Gst.Base/CollectPadsQueryFunction.cs new file mode 100644 index 0000000000..a96ea7d081 --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsQueryFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate bool CollectPadsQueryFunction(Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Query query); + +} diff --git a/sources/generated/Gst.Base/CollectPadsStateFlags.cs b/sources/generated/Gst.Base/CollectPadsStateFlags.cs new file mode 100644 index 0000000000..d4932f7f0b --- /dev/null +++ b/sources/generated/Gst.Base/CollectPadsStateFlags.cs @@ -0,0 +1,20 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + public enum CollectPadsStateFlags : uint { + + Eos = 1, + Flushing = 2, + NewSegment = 4, + Waiting = 8, + Locked = 16, + } +#endregion +} diff --git a/sources/generated/Gst.Base/Constants.cs b/sources/generated/Gst.Base/Constants.cs new file mode 100644 index 0000000000..7c99046b6e --- /dev/null +++ b/sources/generated/Gst.Base/Constants.cs @@ -0,0 +1,20 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const int BASE_PARSE_FLAG_DRAINING = 2; + public const int BASE_PARSE_FLAG_LOST_SYNC = 1; + public const string BASE_TRANSFORM_SINK_NAME = @"sink"; + public const string BASE_TRANSFORM_SRC_NAME = @"src"; +#endregion + } +} diff --git a/sources/generated/Gst.Base/DataQueue.cs b/sources/generated/Gst.Base/DataQueue.cs new file mode 100644 index 0000000000..eaff332928 --- /dev/null +++ b/sources/generated/Gst.Base/DataQueue.cs @@ -0,0 +1,267 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DataQueue : GLib.Object { + + public DataQueue (IntPtr raw) : base(raw) {} + + protected DataQueue() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("current-level-bytes")] + public uint CurrentLevelBytes { + get { + GLib.Value val = GetProperty ("current-level-bytes"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("current-level-time")] + public ulong CurrentLevelTime { + get { + GLib.Value val = GetProperty ("current-level-time"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("current-level-visible")] + public uint CurrentLevelVisible { + get { + GLib.Value val = GetProperty ("current-level-visible"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Signal("empty")] + public event System.EventHandler Empty { + add { + this.AddSignalHandler ("empty", value); + } + remove { + this.RemoveSignalHandler ("empty", value); + } + } + + [GLib.Signal("full")] + public event System.EventHandler Full { + add { + this.AddSignalHandler ("full", value); + } + remove { + this.RemoveSignalHandler ("full", value); + } + } + + static EmptyNativeDelegate Empty_cb_delegate; + static EmptyNativeDelegate EmptyVMCallback { + get { + if (Empty_cb_delegate == null) + Empty_cb_delegate = new EmptyNativeDelegate (Empty_cb); + return Empty_cb_delegate; + } + } + + static void OverrideEmpty (GLib.GType gtype) + { + OverrideEmpty (gtype, EmptyVMCallback); + } + + static void OverrideEmpty (GLib.GType gtype, EmptyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("empty")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void EmptyNativeDelegate (IntPtr inst); + + static void Empty_cb (IntPtr inst) + { + try { + DataQueue __obj = GLib.Object.GetObject (inst, false) as DataQueue; + __obj.OnEmpty (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.DataQueue), ConnectionMethod="OverrideEmpty")] + protected virtual void OnEmpty () + { + InternalEmpty (); + } + + private void InternalEmpty () + { + EmptyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("empty")); + unmanaged = (EmptyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EmptyNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static FullNativeDelegate Full_cb_delegate; + static FullNativeDelegate FullVMCallback { + get { + if (Full_cb_delegate == null) + Full_cb_delegate = new FullNativeDelegate (Full_cb); + return Full_cb_delegate; + } + } + + static void OverrideFull (GLib.GType gtype) + { + OverrideFull (gtype, FullVMCallback); + } + + static void OverrideFull (GLib.GType gtype, FullNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("full")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FullNativeDelegate (IntPtr inst); + + static void Full_cb (IntPtr inst) + { + try { + DataQueue __obj = GLib.Object.GetObject (inst, false) as DataQueue; + __obj.OnFull (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.DataQueue), ConnectionMethod="OverrideFull")] + protected virtual void OnFull () + { + InternalFull (); + } + + private void InternalFull () + { + FullNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("full")); + unmanaged = (FullNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FullNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("empty" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // empty + , null + , "full" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("full" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // full + , "empty" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "full" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_data_queue_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_data_queue_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static DataQueue () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/DataQueueCheckFullFunction.cs b/sources/generated/Gst.Base/DataQueueCheckFullFunction.cs new file mode 100644 index 0000000000..73adb94002 --- /dev/null +++ b/sources/generated/Gst.Base/DataQueueCheckFullFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate bool DataQueueCheckFullFunction(Gst.Base.DataQueue queue, uint visible, uint bytes, ulong time, IntPtr checkdata); + +} diff --git a/sources/generated/Gst.Base/DataQueueEmptyCallback.cs b/sources/generated/Gst.Base/DataQueueEmptyCallback.cs new file mode 100644 index 0000000000..3a4edb02e6 --- /dev/null +++ b/sources/generated/Gst.Base/DataQueueEmptyCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void DataQueueEmptyCallback(Gst.Base.DataQueue queue, IntPtr checkdata); + +} diff --git a/sources/generated/Gst.Base/DataQueueFullCallback.cs b/sources/generated/Gst.Base/DataQueueFullCallback.cs new file mode 100644 index 0000000000..5f750cfed1 --- /dev/null +++ b/sources/generated/Gst.Base/DataQueueFullCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void DataQueueFullCallback(Gst.Base.DataQueue queue, IntPtr checkdata); + +} diff --git a/sources/generated/Gst.Base/DataQueueItem.cs b/sources/generated/Gst.Base/DataQueueItem.cs new file mode 100644 index 0000000000..a3e5a383dd --- /dev/null +++ b/sources/generated/Gst.Base/DataQueueItem.cs @@ -0,0 +1,59 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct DataQueueItem : IEquatable { + + private IntPtr _objekt; + public Gst.MiniObject Object { + get { + return _objekt == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (_objekt, typeof (Gst.MiniObject), false); + } + set { + _objekt = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint Size; + public ulong Duration; + public bool Visible; + public GLib.DestroyNotify Destroy; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Base.DataQueueItem Zero = new Gst.Base.DataQueueItem (); + + public static Gst.Base.DataQueueItem New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.DataQueueItem.Zero; + return (Gst.Base.DataQueueItem) Marshal.PtrToStructure (raw, typeof (Gst.Base.DataQueueItem)); + } + + public bool Equals (DataQueueItem other) + { + return true && Object.Equals (other.Object) && Size.Equals (other.Size) && Duration.Equals (other.Duration) && Visible.Equals (other.Visible) && Destroy.Equals (other.Destroy); + } + + public override bool Equals (object other) + { + return other is DataQueueItem && Equals ((DataQueueItem) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Object.GetHashCode () ^ Size.GetHashCode () ^ Duration.GetHashCode () ^ Visible.GetHashCode () ^ Destroy.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/DataQueueSize.cs b/sources/generated/Gst.Base/DataQueueSize.cs new file mode 100644 index 0000000000..d9740e3929 --- /dev/null +++ b/sources/generated/Gst.Base/DataQueueSize.cs @@ -0,0 +1,47 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct DataQueueSize : IEquatable { + + public uint Visible; + public uint Bytes; + public ulong Time; + + public static Gst.Base.DataQueueSize Zero = new Gst.Base.DataQueueSize (); + + public static Gst.Base.DataQueueSize New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.DataQueueSize.Zero; + return (Gst.Base.DataQueueSize) Marshal.PtrToStructure (raw, typeof (Gst.Base.DataQueueSize)); + } + + public bool Equals (DataQueueSize other) + { + return true && Visible.Equals (other.Visible) && Bytes.Equals (other.Bytes) && Time.Equals (other.Time); + } + + public override bool Equals (object other) + { + return other is DataQueueSize && Equals ((DataQueueSize) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Visible.GetHashCode () ^ Bytes.GetHashCode () ^ Time.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/FlowCombiner.cs b/sources/generated/Gst.Base/FlowCombiner.cs new file mode 100644 index 0000000000..effc0e8752 --- /dev/null +++ b/sources/generated/Gst.Base/FlowCombiner.cs @@ -0,0 +1,172 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FlowCombiner : IEquatable { + + + public static Gst.Base.FlowCombiner Zero = new Gst.Base.FlowCombiner (); + + public static Gst.Base.FlowCombiner New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Base.FlowCombiner.Zero; + return (Gst.Base.FlowCombiner) Marshal.PtrToStructure (raw, typeof (Gst.Base.FlowCombiner)); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flow_combiner_new(); + + public static FlowCombiner New() + { + FlowCombiner result = FlowCombiner.New (gst_flow_combiner_new()); + return result; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flow_combiner_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_flow_combiner_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_flow_combiner_add_pad(IntPtr raw, IntPtr pad); + + public void AddPad(Gst.Pad pad) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_flow_combiner_add_pad(this_as_native, pad == null ? IntPtr.Zero : pad.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_flow_combiner_clear(IntPtr raw); + + public void Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_flow_combiner_clear(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flow_combiner_ref(IntPtr raw); + + public Gst.Base.FlowCombiner Ref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_flow_combiner_ref(this_as_native); + Gst.Base.FlowCombiner ret = Gst.Base.FlowCombiner.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_flow_combiner_remove_pad(IntPtr raw, IntPtr pad); + + public void RemovePad(Gst.Pad pad) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_flow_combiner_remove_pad(this_as_native, pad == null ? IntPtr.Zero : pad.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_flow_combiner_reset(IntPtr raw); + + public void Reset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_flow_combiner_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_flow_combiner_unref(IntPtr raw); + + public void Unref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_flow_combiner_unref(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_flow_combiner_update_flow(IntPtr raw, int fret); + + public Gst.FlowReturn UpdateFlow(Gst.FlowReturn fret) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_flow_combiner_update_flow(this_as_native, (int) fret); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_flow_combiner_update_pad_flow(IntPtr raw, IntPtr pad, int fret); + + public Gst.FlowReturn UpdatePadFlow(Gst.Pad pad, Gst.FlowReturn fret) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_flow_combiner_update_pad_flow(this_as_native, pad == null ? IntPtr.Zero : pad.Handle, (int) fret); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Base.FlowCombiner target) + { + target = New (native); + } + + public bool Equals (FlowCombiner other) + { + return true; + } + + public override bool Equals (object other) + { + return other is FlowCombiner && Equals ((FlowCombiner) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Base.FlowCombiner boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Base.FlowCombiner.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Base.FlowCombiner (GLib.Value val) + { + return (Gst.Base.FlowCombiner) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Base/Global.cs b/sources/generated/Gst.Base/Global.cs new file mode 100644 index 0000000000..c3c94b8541 --- /dev/null +++ b/sources/generated/Gst.Base/Global.cs @@ -0,0 +1,142 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper(IntPtr src, ulong size); + + public static Gst.Caps TypeFindHelper(Gst.Pad src, ulong size) { + IntPtr raw_ret = gst_type_find_helper(src == null ? IntPtr.Zero : src.Handle, size); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_for_buffer(IntPtr obj, IntPtr buf, out int prob); + + public static Gst.Caps TypeFindHelperForBuffer(Gst.Object obj, Gst.Buffer buf, out Gst.TypeFindProbability prob) { + int native_prob; + IntPtr raw_ret = gst_type_find_helper_for_buffer(obj == null ? IntPtr.Zero : obj.Handle, buf == null ? IntPtr.Zero : buf.Handle, out native_prob); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.Caps TypeFindHelperForBuffer(Gst.Buffer buf, out Gst.TypeFindProbability prob) { + return TypeFindHelperForBuffer (null, buf, out prob); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_for_buffer_with_extension(IntPtr obj, IntPtr buf, IntPtr extension, out int prob); + + public static Gst.Caps TypeFindHelperForBufferWithExtension(Gst.Object obj, Gst.Buffer buf, string extension, out Gst.TypeFindProbability prob) { + IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension); + int native_prob; + IntPtr raw_ret = gst_type_find_helper_for_buffer_with_extension(obj == null ? IntPtr.Zero : obj.Handle, buf == null ? IntPtr.Zero : buf.Handle, native_extension, out native_prob); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_extension); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.Caps TypeFindHelperForBufferWithExtension(Gst.Buffer buf, out Gst.TypeFindProbability prob) { + return TypeFindHelperForBufferWithExtension (null, buf, null, out prob); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_for_data(IntPtr obj, byte[] data, UIntPtr size, out int prob); + + public static Gst.Caps TypeFindHelperForData(Gst.Object obj, byte[] data, ulong size, out Gst.TypeFindProbability prob) { + int native_prob; + IntPtr raw_ret = gst_type_find_helper_for_data(obj == null ? IntPtr.Zero : obj.Handle, data, new UIntPtr (size), out native_prob); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.Caps TypeFindHelperForData(byte[] data, ulong size, out Gst.TypeFindProbability prob) { + return TypeFindHelperForData (null, data, size, out prob); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_for_data_with_extension(IntPtr obj, byte[] data, UIntPtr size, IntPtr extension, out int prob); + + public static Gst.Caps TypeFindHelperForDataWithExtension(Gst.Object obj, byte[] data, ulong size, string extension, out Gst.TypeFindProbability prob) { + IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension); + int native_prob; + IntPtr raw_ret = gst_type_find_helper_for_data_with_extension(obj == null ? IntPtr.Zero : obj.Handle, data, new UIntPtr (size), native_extension, out native_prob); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_extension); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.Caps TypeFindHelperForDataWithExtension(byte[] data, ulong size, out Gst.TypeFindProbability prob) { + return TypeFindHelperForDataWithExtension (null, data, size, null, out prob); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_for_extension(IntPtr obj, IntPtr extension); + + public static Gst.Caps TypeFindHelperForExtension(Gst.Object obj, string extension) { + IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension); + IntPtr raw_ret = gst_type_find_helper_for_extension(obj == null ? IntPtr.Zero : obj.Handle, native_extension); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_extension); + return ret; + } + + public static Gst.Caps TypeFindHelperForExtension(string extension) { + return TypeFindHelperForExtension (null, extension); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_helper_get_range(IntPtr obj, IntPtr parent, Gst.BaseSharp.TypeFindHelperGetRangeFunctionNative func, ulong size, IntPtr extension, out int prob); + + public static Gst.Caps TypeFindHelperGetRange(Gst.Object obj, Gst.Object parent, Gst.Base.TypeFindHelperGetRangeFunction func, ulong size, string extension, out Gst.TypeFindProbability prob) { + Gst.BaseSharp.TypeFindHelperGetRangeFunctionWrapper func_wrapper = new Gst.BaseSharp.TypeFindHelperGetRangeFunctionWrapper (func); + IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension); + int native_prob; + IntPtr raw_ret = gst_type_find_helper_get_range(obj == null ? IntPtr.Zero : obj.Handle, parent == null ? IntPtr.Zero : parent.Handle, func_wrapper.NativeDelegate, size, native_extension, out native_prob); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_extension); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.Caps TypeFindHelperGetRange(Gst.Object obj, Gst.Base.TypeFindHelperGetRangeFunction func, ulong size, out Gst.TypeFindProbability prob) { + return TypeFindHelperGetRange (obj, null, func, size, null, out prob); + } + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_type_find_helper_get_range_full(IntPtr obj, IntPtr parent, Gst.BaseSharp.TypeFindHelperGetRangeFunctionNative func, ulong size, IntPtr extension, out IntPtr caps, out int prob); + + public static Gst.FlowReturn TypeFindHelperGetRangeFull(Gst.Object obj, Gst.Object parent, Gst.Base.TypeFindHelperGetRangeFunction func, ulong size, string extension, out Gst.Caps caps, out Gst.TypeFindProbability prob) { + Gst.BaseSharp.TypeFindHelperGetRangeFunctionWrapper func_wrapper = new Gst.BaseSharp.TypeFindHelperGetRangeFunctionWrapper (func); + IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension); + IntPtr native_caps; + int native_prob; + int raw_ret = gst_type_find_helper_get_range_full(obj == null ? IntPtr.Zero : obj.Handle, parent == null ? IntPtr.Zero : parent.Handle, func_wrapper.NativeDelegate, size, native_extension, out native_caps, out native_prob); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + GLib.Marshaller.Free (native_extension); + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), true); + prob = (Gst.TypeFindProbability) native_prob; + return ret; + } + + public static Gst.FlowReturn TypeFindHelperGetRangeFull(Gst.Object obj, Gst.Base.TypeFindHelperGetRangeFunction func, ulong size, out Gst.Caps caps, out Gst.TypeFindProbability prob) { + return TypeFindHelperGetRangeFull (obj, null, func, size, null, out caps, out prob); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectDataDestroyNotifyNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectDataDestroyNotifyNative.cs new file mode 100644 index 0000000000..fc0ceeb2d9 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectDataDestroyNotifyNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void CollectDataDestroyNotifyNative(IntPtr data); + + internal class CollectDataDestroyNotifyInvoker { + + CollectDataDestroyNotifyNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectDataDestroyNotifyInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectDataDestroyNotifyInvoker (CollectDataDestroyNotifyNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectDataDestroyNotifyInvoker (CollectDataDestroyNotifyNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectDataDestroyNotifyInvoker (CollectDataDestroyNotifyNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectDataDestroyNotify Handler { + get { + return new Gst.Base.CollectDataDestroyNotify(InvokeNative); + } + } + + void InvokeNative (Gst.Base.CollectData data) + { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + native_cb (native_data); + Marshal.FreeHGlobal (native_data); + } + } + + internal class CollectDataDestroyNotifyWrapper { + + public void NativeCallback (IntPtr data) + { + try { + managed (Gst.Base.CollectData.New (data)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectDataDestroyNotifyNative NativeDelegate; + Gst.Base.CollectDataDestroyNotify managed; + + public CollectDataDestroyNotifyWrapper (Gst.Base.CollectDataDestroyNotify managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectDataDestroyNotifyNative (NativeCallback); + } + + public static Gst.Base.CollectDataDestroyNotify GetManagedDelegate (CollectDataDestroyNotifyNative native) + { + if (native == null) + return null; + CollectDataDestroyNotifyWrapper wrapper = (CollectDataDestroyNotifyWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsBufferFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsBufferFunctionNative.cs new file mode 100644 index 0000000000..17868cfc15 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsBufferFunctionNative.cs @@ -0,0 +1,99 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int CollectPadsBufferFunctionNative(IntPtr pads, IntPtr data, IntPtr buffer, IntPtr user_data); + + internal class CollectPadsBufferFunctionInvoker { + + CollectPadsBufferFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsBufferFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsBufferFunctionInvoker (CollectPadsBufferFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsBufferFunctionInvoker (CollectPadsBufferFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsBufferFunctionInvoker (CollectPadsBufferFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsBufferFunction Handler { + get { + return new Gst.Base.CollectPadsBufferFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer buffer) + { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + buffer.Owned = false; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pads == null ? IntPtr.Zero : pads.Handle, native_data, buffer == null ? IntPtr.Zero : buffer.Handle, __data); + Marshal.FreeHGlobal (native_data); + return __result; + } + } + + internal class CollectPadsBufferFunctionWrapper { + + public int NativeCallback (IntPtr pads, IntPtr data, IntPtr buffer, IntPtr user_data) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads, Gst.Base.CollectData.New (data), buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), true)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsBufferFunctionNative NativeDelegate; + Gst.Base.CollectPadsBufferFunction managed; + + public CollectPadsBufferFunctionWrapper (Gst.Base.CollectPadsBufferFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsBufferFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsBufferFunction GetManagedDelegate (CollectPadsBufferFunctionNative native) + { + if (native == null) + return null; + CollectPadsBufferFunctionWrapper wrapper = (CollectPadsBufferFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsClipFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsClipFunctionNative.cs new file mode 100644 index 0000000000..ccd7295eb2 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsClipFunctionNative.cs @@ -0,0 +1,105 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int CollectPadsClipFunctionNative(IntPtr pads, IntPtr data, IntPtr inbuffer, out IntPtr outbuffer, IntPtr user_data); + + internal class CollectPadsClipFunctionInvoker { + + CollectPadsClipFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsClipFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsClipFunctionInvoker (CollectPadsClipFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsClipFunctionInvoker (CollectPadsClipFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsClipFunctionInvoker (CollectPadsClipFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsClipFunction Handler { + get { + return new Gst.Base.CollectPadsClipFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Base.CollectPads pads, Gst.Base.CollectData data, Gst.Buffer inbuffer, out Gst.Buffer outbuffer) + { + IntPtr native_data = GLib.Marshaller.StructureToPtrAlloc (data); + inbuffer.Owned = false; + IntPtr native_outbuffer; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pads == null ? IntPtr.Zero : pads.Handle, native_data, inbuffer == null ? IntPtr.Zero : inbuffer.Handle, out native_outbuffer, __data); + Marshal.FreeHGlobal (native_data); + outbuffer = native_outbuffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuffer, typeof (Gst.Buffer), true); + return __result; + } + } + + internal class CollectPadsClipFunctionWrapper { + + public int NativeCallback (IntPtr pads, IntPtr data, IntPtr inbuffer, out IntPtr outbuffer, IntPtr user_data) + { + try { + Gst.Buffer myoutbuffer; + + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads, Gst.Base.CollectData.New (data), inbuffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuffer, typeof (Gst.Buffer), true), out myoutbuffer); + outbuffer = myoutbuffer == null ? IntPtr.Zero : myoutbuffer.Handle; + + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsClipFunctionNative NativeDelegate; + Gst.Base.CollectPadsClipFunction managed; + + public CollectPadsClipFunctionWrapper (Gst.Base.CollectPadsClipFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsClipFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsClipFunction GetManagedDelegate (CollectPadsClipFunctionNative native) + { + if (native == null) + return null; + CollectPadsClipFunctionWrapper wrapper = (CollectPadsClipFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsCompareFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsCompareFunctionNative.cs new file mode 100644 index 0000000000..9fcffa2963 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsCompareFunctionNative.cs @@ -0,0 +1,100 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int CollectPadsCompareFunctionNative(IntPtr pads, IntPtr data1, ulong timestamp1, IntPtr data2, ulong timestamp2, IntPtr user_data); + + internal class CollectPadsCompareFunctionInvoker { + + CollectPadsCompareFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsCompareFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsCompareFunctionInvoker (CollectPadsCompareFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsCompareFunctionInvoker (CollectPadsCompareFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsCompareFunctionInvoker (CollectPadsCompareFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsCompareFunction Handler { + get { + return new Gst.Base.CollectPadsCompareFunction(InvokeNative); + } + } + + int InvokeNative (Gst.Base.CollectPads pads, Gst.Base.CollectData data1, ulong timestamp1, Gst.Base.CollectData data2, ulong timestamp2) + { + IntPtr native_data1 = GLib.Marshaller.StructureToPtrAlloc (data1); + IntPtr native_data2 = GLib.Marshaller.StructureToPtrAlloc (data2); + int __result = native_cb (pads == null ? IntPtr.Zero : pads.Handle, native_data1, timestamp1, native_data2, timestamp2, __data); + Marshal.FreeHGlobal (native_data1); + Marshal.FreeHGlobal (native_data2); + return __result; + } + } + + internal class CollectPadsCompareFunctionWrapper { + + public int NativeCallback (IntPtr pads, IntPtr data1, ulong timestamp1, IntPtr data2, ulong timestamp2, IntPtr user_data) + { + try { + int __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads, Gst.Base.CollectData.New (data1), timestamp1, Gst.Base.CollectData.New (data2), timestamp2); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsCompareFunctionNative NativeDelegate; + Gst.Base.CollectPadsCompareFunction managed; + + public CollectPadsCompareFunctionWrapper (Gst.Base.CollectPadsCompareFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsCompareFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsCompareFunction GetManagedDelegate (CollectPadsCompareFunctionNative native) + { + if (native == null) + return null; + CollectPadsCompareFunctionWrapper wrapper = (CollectPadsCompareFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsEventFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsEventFunctionNative.cs new file mode 100644 index 0000000000..dbdcd156fa --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsEventFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CollectPadsEventFunctionNative(IntPtr pads, IntPtr pad, IntPtr evnt, IntPtr user_data); + + internal class CollectPadsEventFunctionInvoker { + + CollectPadsEventFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsEventFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsEventFunctionInvoker (CollectPadsEventFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsEventFunctionInvoker (CollectPadsEventFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsEventFunctionInvoker (CollectPadsEventFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsEventFunction Handler { + get { + return new Gst.Base.CollectPadsEventFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Event evnt) + { + IntPtr native_pad = GLib.Marshaller.StructureToPtrAlloc (pad); + bool __result = native_cb (pads == null ? IntPtr.Zero : pads.Handle, native_pad, evnt == null ? IntPtr.Zero : evnt.Handle, __data); + Marshal.FreeHGlobal (native_pad); + return __result; + } + } + + internal class CollectPadsEventFunctionWrapper { + + public bool NativeCallback (IntPtr pads, IntPtr pad, IntPtr evnt, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads, Gst.Base.CollectData.New (pad), evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsEventFunctionNative NativeDelegate; + Gst.Base.CollectPadsEventFunction managed; + + public CollectPadsEventFunctionWrapper (Gst.Base.CollectPadsEventFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsEventFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsEventFunction GetManagedDelegate (CollectPadsEventFunctionNative native) + { + if (native == null) + return null; + CollectPadsEventFunctionWrapper wrapper = (CollectPadsEventFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFlushFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFlushFunctionNative.cs new file mode 100644 index 0000000000..6e22e584c7 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFlushFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void CollectPadsFlushFunctionNative(IntPtr pads, IntPtr user_data); + + internal class CollectPadsFlushFunctionInvoker { + + CollectPadsFlushFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsFlushFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsFlushFunctionInvoker (CollectPadsFlushFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsFlushFunctionInvoker (CollectPadsFlushFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsFlushFunctionInvoker (CollectPadsFlushFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsFlushFunction Handler { + get { + return new Gst.Base.CollectPadsFlushFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Base.CollectPads pads) + { + native_cb (pads == null ? IntPtr.Zero : pads.Handle, __data); + } + } + + internal class CollectPadsFlushFunctionWrapper { + + public void NativeCallback (IntPtr pads, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsFlushFunctionNative NativeDelegate; + Gst.Base.CollectPadsFlushFunction managed; + + public CollectPadsFlushFunctionWrapper (Gst.Base.CollectPadsFlushFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsFlushFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsFlushFunction GetManagedDelegate (CollectPadsFlushFunctionNative native) + { + if (native == null) + return null; + CollectPadsFlushFunctionWrapper wrapper = (CollectPadsFlushFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFunctionNative.cs new file mode 100644 index 0000000000..5678c7d367 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int CollectPadsFunctionNative(IntPtr pads, IntPtr user_data); + + internal class CollectPadsFunctionInvoker { + + CollectPadsFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsFunctionInvoker (CollectPadsFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsFunctionInvoker (CollectPadsFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsFunctionInvoker (CollectPadsFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsFunction Handler { + get { + return new Gst.Base.CollectPadsFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Base.CollectPads pads) + { + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pads == null ? IntPtr.Zero : pads.Handle, __data); + return __result; + } + } + + internal class CollectPadsFunctionWrapper { + + public int NativeCallback (IntPtr pads, IntPtr user_data) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsFunctionNative NativeDelegate; + Gst.Base.CollectPadsFunction managed; + + public CollectPadsFunctionWrapper (Gst.Base.CollectPadsFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsFunction GetManagedDelegate (CollectPadsFunctionNative native) + { + if (native == null) + return null; + CollectPadsFunctionWrapper wrapper = (CollectPadsFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsQueryFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsQueryFunctionNative.cs new file mode 100644 index 0000000000..c3fe1ee49e --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.CollectPadsQueryFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CollectPadsQueryFunctionNative(IntPtr pads, IntPtr pad, IntPtr query, IntPtr user_data); + + internal class CollectPadsQueryFunctionInvoker { + + CollectPadsQueryFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CollectPadsQueryFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CollectPadsQueryFunctionInvoker (CollectPadsQueryFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CollectPadsQueryFunctionInvoker (CollectPadsQueryFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CollectPadsQueryFunctionInvoker (CollectPadsQueryFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.CollectPadsQueryFunction Handler { + get { + return new Gst.Base.CollectPadsQueryFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Query query) + { + IntPtr native_pad = GLib.Marshaller.StructureToPtrAlloc (pad); + bool __result = native_cb (pads == null ? IntPtr.Zero : pads.Handle, native_pad, query == null ? IntPtr.Zero : query.Handle, __data); + Marshal.FreeHGlobal (native_pad); + return __result; + } + } + + internal class CollectPadsQueryFunctionWrapper { + + public bool NativeCallback (IntPtr pads, IntPtr pad, IntPtr query, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(pads) as Gst.Base.CollectPads, Gst.Base.CollectData.New (pad), query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CollectPadsQueryFunctionNative NativeDelegate; + Gst.Base.CollectPadsQueryFunction managed; + + public CollectPadsQueryFunctionWrapper (Gst.Base.CollectPadsQueryFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CollectPadsQueryFunctionNative (NativeCallback); + } + + public static Gst.Base.CollectPadsQueryFunction GetManagedDelegate (CollectPadsQueryFunctionNative native) + { + if (native == null) + return null; + CollectPadsQueryFunctionWrapper wrapper = (CollectPadsQueryFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueCheckFullFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueCheckFullFunctionNative.cs new file mode 100644 index 0000000000..d7e5d8f50f --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueCheckFullFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool DataQueueCheckFullFunctionNative(IntPtr queue, uint visible, uint bytes, ulong time, IntPtr checkdata); + + internal class DataQueueCheckFullFunctionInvoker { + + DataQueueCheckFullFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DataQueueCheckFullFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DataQueueCheckFullFunctionInvoker (DataQueueCheckFullFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DataQueueCheckFullFunctionInvoker (DataQueueCheckFullFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DataQueueCheckFullFunctionInvoker (DataQueueCheckFullFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.DataQueueCheckFullFunction Handler { + get { + return new Gst.Base.DataQueueCheckFullFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Base.DataQueue queue, uint visible, uint bytes, ulong time, IntPtr checkdata) + { + bool __result = native_cb (queue == null ? IntPtr.Zero : queue.Handle, visible, bytes, time, __data); + return __result; + } + } + + internal class DataQueueCheckFullFunctionWrapper { + + public bool NativeCallback (IntPtr queue, uint visible, uint bytes, ulong time, IntPtr checkdata) + { + try { + bool __ret = managed (GLib.Object.GetObject(queue) as Gst.Base.DataQueue, visible, bytes, time, checkdata); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DataQueueCheckFullFunctionNative NativeDelegate; + Gst.Base.DataQueueCheckFullFunction managed; + + public DataQueueCheckFullFunctionWrapper (Gst.Base.DataQueueCheckFullFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DataQueueCheckFullFunctionNative (NativeCallback); + } + + public static Gst.Base.DataQueueCheckFullFunction GetManagedDelegate (DataQueueCheckFullFunctionNative native) + { + if (native == null) + return null; + DataQueueCheckFullFunctionWrapper wrapper = (DataQueueCheckFullFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueEmptyCallbackNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueEmptyCallbackNative.cs new file mode 100644 index 0000000000..028cc1edb4 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueEmptyCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void DataQueueEmptyCallbackNative(IntPtr queue, IntPtr checkdata); + + internal class DataQueueEmptyCallbackInvoker { + + DataQueueEmptyCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DataQueueEmptyCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DataQueueEmptyCallbackInvoker (DataQueueEmptyCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DataQueueEmptyCallbackInvoker (DataQueueEmptyCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DataQueueEmptyCallbackInvoker (DataQueueEmptyCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.DataQueueEmptyCallback Handler { + get { + return new Gst.Base.DataQueueEmptyCallback(InvokeNative); + } + } + + void InvokeNative (Gst.Base.DataQueue queue, IntPtr checkdata) + { + native_cb (queue == null ? IntPtr.Zero : queue.Handle, __data); + } + } + + internal class DataQueueEmptyCallbackWrapper { + + public void NativeCallback (IntPtr queue, IntPtr checkdata) + { + try { + managed (GLib.Object.GetObject(queue) as Gst.Base.DataQueue, checkdata); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DataQueueEmptyCallbackNative NativeDelegate; + Gst.Base.DataQueueEmptyCallback managed; + + public DataQueueEmptyCallbackWrapper (Gst.Base.DataQueueEmptyCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DataQueueEmptyCallbackNative (NativeCallback); + } + + public static Gst.Base.DataQueueEmptyCallback GetManagedDelegate (DataQueueEmptyCallbackNative native) + { + if (native == null) + return null; + DataQueueEmptyCallbackWrapper wrapper = (DataQueueEmptyCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueFullCallbackNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueFullCallbackNative.cs new file mode 100644 index 0000000000..199d6c7d48 --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.DataQueueFullCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void DataQueueFullCallbackNative(IntPtr queue, IntPtr checkdata); + + internal class DataQueueFullCallbackInvoker { + + DataQueueFullCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DataQueueFullCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DataQueueFullCallbackInvoker (DataQueueFullCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DataQueueFullCallbackInvoker (DataQueueFullCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DataQueueFullCallbackInvoker (DataQueueFullCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.DataQueueFullCallback Handler { + get { + return new Gst.Base.DataQueueFullCallback(InvokeNative); + } + } + + void InvokeNative (Gst.Base.DataQueue queue, IntPtr checkdata) + { + native_cb (queue == null ? IntPtr.Zero : queue.Handle, __data); + } + } + + internal class DataQueueFullCallbackWrapper { + + public void NativeCallback (IntPtr queue, IntPtr checkdata) + { + try { + managed (GLib.Object.GetObject(queue) as Gst.Base.DataQueue, checkdata); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DataQueueFullCallbackNative NativeDelegate; + Gst.Base.DataQueueFullCallback managed; + + public DataQueueFullCallbackWrapper (Gst.Base.DataQueueFullCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DataQueueFullCallbackNative (NativeCallback); + } + + public static Gst.Base.DataQueueFullCallback GetManagedDelegate (DataQueueFullCallbackNative native) + { + if (native == null) + return null; + DataQueueFullCallbackWrapper wrapper = (DataQueueFullCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/Gst.BaseSharp.TypeFindHelperGetRangeFunctionNative.cs b/sources/generated/Gst.Base/Gst.BaseSharp.TypeFindHelperGetRangeFunctionNative.cs new file mode 100644 index 0000000000..50a0c3c3da --- /dev/null +++ b/sources/generated/Gst.Base/Gst.BaseSharp.TypeFindHelperGetRangeFunctionNative.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.BaseSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int TypeFindHelperGetRangeFunctionNative(IntPtr obj, IntPtr parent, ulong offset, uint length, out IntPtr buffer); + + internal class TypeFindHelperGetRangeFunctionInvoker { + + TypeFindHelperGetRangeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TypeFindHelperGetRangeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TypeFindHelperGetRangeFunctionInvoker (TypeFindHelperGetRangeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TypeFindHelperGetRangeFunctionInvoker (TypeFindHelperGetRangeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TypeFindHelperGetRangeFunctionInvoker (TypeFindHelperGetRangeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Base.TypeFindHelperGetRangeFunction Handler { + get { + return new Gst.Base.TypeFindHelperGetRangeFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Object obj, Gst.Object parent, ulong offset, uint length, out Gst.Buffer buffer) + { + IntPtr native_buffer; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (obj == null ? IntPtr.Zero : obj.Handle, parent == null ? IntPtr.Zero : parent.Handle, offset, length, out native_buffer); + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return __result; + } + } + + internal class TypeFindHelperGetRangeFunctionWrapper { + + public int NativeCallback (IntPtr obj, IntPtr parent, ulong offset, uint length, out IntPtr buffer) + { + try { + Gst.Buffer mybuffer; + + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(obj) as Gst.Object, GLib.Object.GetObject(parent) as Gst.Object, offset, length, out mybuffer); + buffer = mybuffer == null ? IntPtr.Zero : mybuffer.Handle; + + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TypeFindHelperGetRangeFunctionNative NativeDelegate; + Gst.Base.TypeFindHelperGetRangeFunction managed; + + public TypeFindHelperGetRangeFunctionWrapper (Gst.Base.TypeFindHelperGetRangeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TypeFindHelperGetRangeFunctionNative (NativeCallback); + } + + public static Gst.Base.TypeFindHelperGetRangeFunction GetManagedDelegate (TypeFindHelperGetRangeFunctionNative native) + { + if (native == null) + return null; + TypeFindHelperGetRangeFunctionWrapper wrapper = (TypeFindHelperGetRangeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Base/PushSrc.cs b/sources/generated/Gst.Base/PushSrc.cs new file mode 100644 index 0000000000..5c8f025dc4 --- /dev/null +++ b/sources/generated/Gst.Base/PushSrc.cs @@ -0,0 +1,285 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PushSrc : Gst.Base.BaseSrc { + + public PushSrc (IntPtr raw) : base(raw) {} + + protected PushSrc() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + static CreateNativeDelegate Create_cb_delegate; + static CreateNativeDelegate CreateVMCallback { + get { + if (Create_cb_delegate == null) + Create_cb_delegate = new CreateNativeDelegate (Create_cb); + return Create_cb_delegate; + } + } + + static void OverrideCreate (GLib.GType gtype) + { + OverrideCreate (gtype, CreateVMCallback); + } + + static void OverrideCreate (GLib.GType gtype, CreateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int CreateNativeDelegate (IntPtr inst, IntPtr buf); + + static int Create_cb (IntPtr inst, IntPtr buf) + { + try { + PushSrc __obj = GLib.Object.GetObject (inst, false) as PushSrc; + Gst.FlowReturn __result; + __result = __obj.OnCreate (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.PushSrc), ConnectionMethod="OverrideCreate")] + protected virtual Gst.FlowReturn OnCreate (Gst.Buffer buf) + { + return InternalCreate (buf); + } + + private Gst.FlowReturn InternalCreate (Gst.Buffer buf) + { + CreateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create")); + unmanaged = (CreateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + static AllocNativeDelegate Alloc_cb_delegate; + static AllocNativeDelegate AllocVMCallback { + get { + if (Alloc_cb_delegate == null) + Alloc_cb_delegate = new AllocNativeDelegate (Alloc_cb); + return Alloc_cb_delegate; + } + } + + static void OverrideAlloc (GLib.GType gtype) + { + OverrideAlloc (gtype, AllocVMCallback); + } + + static void OverrideAlloc (GLib.GType gtype, AllocNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AllocNativeDelegate (IntPtr inst, IntPtr buf); + + static int Alloc_cb (IntPtr inst, IntPtr buf) + { + try { + PushSrc __obj = GLib.Object.GetObject (inst, false) as PushSrc; + Gst.FlowReturn __result; + __result = __obj.OnAlloc (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.PushSrc), ConnectionMethod="OverrideAlloc")] + protected virtual Gst.FlowReturn OnAlloc (Gst.Buffer buf) + { + return InternalAlloc (buf); + } + + private Gst.FlowReturn InternalAlloc (Gst.Buffer buf) + { + AllocNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + unmanaged = (AllocNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AllocNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + static FillNativeDelegate Fill_cb_delegate; + static FillNativeDelegate FillVMCallback { + get { + if (Fill_cb_delegate == null) + Fill_cb_delegate = new FillNativeDelegate (Fill_cb); + return Fill_cb_delegate; + } + } + + static void OverrideFill (GLib.GType gtype) + { + OverrideFill (gtype, FillVMCallback); + } + + static void OverrideFill (GLib.GType gtype, FillNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fill")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FillNativeDelegate (IntPtr inst, IntPtr buf); + + static int Fill_cb (IntPtr inst, IntPtr buf) + { + try { + PushSrc __obj = GLib.Object.GetObject (inst, false) as PushSrc; + Gst.FlowReturn __result; + __result = __obj.OnFill (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.PushSrc), ConnectionMethod="OverrideFill")] + protected virtual Gst.FlowReturn OnFill (Gst.Buffer buf) + { + return InternalFill (buf); + } + + private Gst.FlowReturn InternalFill (Gst.Buffer buf) + { + FillNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fill")); + unmanaged = (FillNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FillNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create" + , Gst.Base.BaseSrc.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create + , null + , "alloc" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("alloc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // alloc + , "create" + , "fill" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("fill" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fill + , "alloc" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "fill" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_push_src_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_push_src_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static PushSrc () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Base.BaseSrc.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/QueueArray.cs b/sources/generated/Gst.Base/QueueArray.cs new file mode 100644 index 0000000000..28ae2c4010 --- /dev/null +++ b/sources/generated/Gst.Base/QueueArray.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class QueueArray : GLib.Opaque { + + [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_queue_array_push_tail_struct(IntPtr raw, IntPtr p_struct); + + public void PushTailStruct(IntPtr p_struct) { + gst_queue_array_push_tail_struct(Handle, p_struct); + } + + public void PushTailStruct() { + PushTailStruct (IntPtr.Zero); + } + + public QueueArray(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Base/SamplesSelectedHandler.cs b/sources/generated/Gst.Base/SamplesSelectedHandler.cs new file mode 100644 index 0000000000..9a2cac7c50 --- /dev/null +++ b/sources/generated/Gst.Base/SamplesSelectedHandler.cs @@ -0,0 +1,42 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate void SamplesSelectedHandler(object o, SamplesSelectedArgs args); + + public class SamplesSelectedArgs : GLib.SignalArgs { + public Gst.Segment Segment{ + get { + return (Gst.Segment) Args [0]; + } + } + + public ulong Pts{ + get { + return (ulong) Args [1]; + } + } + + public ulong Dts{ + get { + return (ulong) Args [2]; + } + } + + public ulong Duration{ + get { + return (ulong) Args [3]; + } + } + + public Gst.Structure Info{ + get { + return (Gst.Structure) Args [4]; + } + } + + } +} diff --git a/sources/generated/Gst.Base/TypeFindHelperGetRangeFunction.cs b/sources/generated/Gst.Base/TypeFindHelperGetRangeFunction.cs new file mode 100644 index 0000000000..9cf8263d87 --- /dev/null +++ b/sources/generated/Gst.Base/TypeFindHelperGetRangeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Base { + + using System; + + public delegate Gst.FlowReturn TypeFindHelperGetRangeFunction(Gst.Object obj, Gst.Object parent, ulong offset, uint length, out Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst.Controller/ARGBControlBinding.cs b/sources/generated/Gst.Controller/ARGBControlBinding.cs new file mode 100644 index 0000000000..1700e42a2c --- /dev/null +++ b/sources/generated/Gst.Controller/ARGBControlBinding.cs @@ -0,0 +1,224 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ARGBControlBinding : Gst.ControlBinding { + + public ARGBControlBinding (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_argb_control_binding_new(IntPtr _object, IntPtr property_name, IntPtr cs_a, IntPtr cs_r, IntPtr cs_g, IntPtr cs_b); + + public ARGBControlBinding (Gst.Object _object, string property_name, Gst.ControlSource cs_a, Gst.ControlSource cs_r, Gst.ControlSource cs_g, Gst.ControlSource cs_b) : base (IntPtr.Zero) + { + if (GetType () != typeof (ARGBControlBinding)) { + var vals = new List (); + var names = new List (); + if (_object != null) { + names.Add ("_object"); + vals.Add (new GLib.Value (_object)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + Raw = gst_argb_control_binding_new(_object == null ? IntPtr.Zero : _object.Handle, native_property_name, cs_a == null ? IntPtr.Zero : cs_a.Handle, cs_r == null ? IntPtr.Zero : cs_r.Handle, cs_g == null ? IntPtr.Zero : cs_g.Handle, cs_b == null ? IntPtr.Zero : cs_b.Handle); + GLib.Marshaller.Free (native_property_name); + } + + [GLib.Property ("control-source-a")] + public Gst.ControlSource ControlSourceA { + get { + GLib.Value val = GetProperty ("control-source-a"); + Gst.ControlSource ret = (Gst.ControlSource) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("control-source-a", val); + val.Dispose (); + } + } + + [GLib.Property ("control-source-b")] + public Gst.ControlSource ControlSourceB { + get { + GLib.Value val = GetProperty ("control-source-b"); + Gst.ControlSource ret = (Gst.ControlSource) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("control-source-b", val); + val.Dispose (); + } + } + + [GLib.Property ("control-source-g")] + public Gst.ControlSource ControlSourceG { + get { + GLib.Value val = GetProperty ("control-source-g"); + Gst.ControlSource ret = (Gst.ControlSource) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("control-source-g", val); + val.Dispose (); + } + } + + [GLib.Property ("control-source-r")] + public Gst.ControlSource ControlSourceR { + get { + GLib.Value val = GetProperty ("control-source-r"); + Gst.ControlSource ret = (Gst.ControlSource) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("control-source-r", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.ControlBinding.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_argb_control_binding_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_argb_control_binding_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static ARGBControlBinding () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("cs_a" + , Gst.ControlBinding.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cs_a + , null + , "cs_r" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cs_r" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cs_r + , "cs_a" + , "cs_g" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cs_g" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cs_g + , "cs_r" + , "cs_b" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cs_b" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cs_b + , "cs_g" + , "cur_value" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cur_value" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Value)) // cur_value + , "cs_b" + , "last_value" + , (long) Marshal.OffsetOf(typeof(GstARGBControlBinding_cur_valueAlign), "cur_value") + , 0 + ), + new GLib.AbiField("last_value" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // last_value + , "cur_value" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstARGBControlBinding_last_valueAlign), "last_value") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "last_value" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstARGBControlBinding_cur_valueAlign + { + sbyte f1; + private GLib.Value cur_value; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstARGBControlBinding_last_valueAlign + { + sbyte f1; + private uint last_value; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/Constants.cs b/sources/generated/Gst.Controller/Constants.cs new file mode 100644 index 0000000000..fe7af826bd --- /dev/null +++ b/sources/generated/Gst.Controller/Constants.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/ControlPoint.cs b/sources/generated/Gst.Controller/ControlPoint.cs new file mode 100644 index 0000000000..02fa445933 --- /dev/null +++ b/sources/generated/Gst.Controller/ControlPoint.cs @@ -0,0 +1,66 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ControlPoint : IEquatable { + + public ulong Timestamp; + public double Value; + + public static Gst.Controller.ControlPoint Zero = new Gst.Controller.ControlPoint (); + + public static Gst.Controller.ControlPoint New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Controller.ControlPoint.Zero; + return (Gst.Controller.ControlPoint) Marshal.PtrToStructure (raw, typeof (Gst.Controller.ControlPoint)); + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_control_point_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_control_point_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public bool Equals (ControlPoint other) + { + return true && Timestamp.Equals (other.Timestamp) && Value.Equals (other.Value); + } + + public override bool Equals (object other) + { + return other is ControlPoint && Equals ((ControlPoint) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Timestamp.GetHashCode () ^ Value.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Controller.ControlPoint boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Controller.ControlPoint.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Controller.ControlPoint (GLib.Value val) + { + return (Gst.Controller.ControlPoint) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Controller/DirectControlBinding.cs b/sources/generated/Gst.Controller/DirectControlBinding.cs new file mode 100644 index 0000000000..5b5e50a0d3 --- /dev/null +++ b/sources/generated/Gst.Controller/DirectControlBinding.cs @@ -0,0 +1,238 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DirectControlBinding : Gst.ControlBinding { + + public DirectControlBinding (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_direct_control_binding_new(IntPtr _object, IntPtr property_name, IntPtr cs); + + public DirectControlBinding (Gst.Object _object, string property_name, Gst.ControlSource cs) : base (IntPtr.Zero) + { + if (GetType () != typeof (DirectControlBinding)) { + var vals = new List (); + var names = new List (); + if (_object != null) { + names.Add ("_object"); + vals.Add (new GLib.Value (_object)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + Raw = gst_direct_control_binding_new(_object == null ? IntPtr.Zero : _object.Handle, native_property_name, cs == null ? IntPtr.Zero : cs.Handle); + GLib.Marshaller.Free (native_property_name); + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_direct_control_binding_new_absolute(IntPtr _object, IntPtr property_name, IntPtr cs); + + public static DirectControlBinding NewAbsolute(Gst.Object _object, string property_name, Gst.ControlSource cs) + { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + DirectControlBinding result = new DirectControlBinding (gst_direct_control_binding_new_absolute(_object == null ? IntPtr.Zero : _object.Handle, native_property_name, cs == null ? IntPtr.Zero : cs.Handle)); + GLib.Marshaller.Free (native_property_name); + return result; + } + + [GLib.Property ("absolute")] + public bool Absolute { + get { + GLib.Value val = GetProperty ("absolute"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("control-source")] + public Gst.ControlSource ControlSource { + get { + GLib.Value val = GetProperty ("control-source"); + Gst.ControlSource ret = (Gst.ControlSource) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("control-source", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.ControlBinding.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_direct_control_binding_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_direct_control_binding_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static DirectControlBinding () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("cs" + , Gst.ControlBinding.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cs + , null + , "cur_value" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cur_value" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Value)) // cur_value + , "cs" + , "last_value" + , (long) Marshal.OffsetOf(typeof(GstDirectControlBinding_cur_valueAlign), "cur_value") + , 0 + ), + new GLib.AbiField("last_value" + , -1 + , (uint) Marshal.SizeOf(typeof(double)) // last_value + , "cur_value" + , "byte_size" + , (long) Marshal.OffsetOf(typeof(GstDirectControlBinding_last_valueAlign), "last_value") + , 0 + ), + new GLib.AbiField("byte_size" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // byte_size + , "last_value" + , "convert_value" + , (long) Marshal.OffsetOf(typeof(GstDirectControlBinding_byte_sizeAlign), "byte_size") + , 0 + ), + new GLib.AbiField("convert_value" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // convert_value + , "byte_size" + , "convert_g_value" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("convert_g_value" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // convert_g_value + , "convert_value" + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "convert_g_value" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + // union struct ABI.abi + new GLib.AbiField("ABI.abi.want_absolute" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // ABI.abi.want_absolute + , "convert_g_value" + , null + , (long) Marshal.OffsetOf(typeof(GstDirectControlBinding_ABI_abi_want_absoluteAlign), "ABI_abi_want_absolute") + , 0 + ), + // End ABI.abi + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI._gst_reserved"}, + new List() {"ABI.abi.want_absolute"} + } + , "convert_g_value" + , null + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstDirectControlBinding_cur_valueAlign + { + sbyte f1; + private GLib.Value cur_value; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstDirectControlBinding_last_valueAlign + { + sbyte f1; + private double last_value; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstDirectControlBinding_byte_sizeAlign + { + sbyte f1; + private int byte_size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstDirectControlBinding_ABI_abi_want_absoluteAlign + { + sbyte f1; + private bool ABI_abi_want_absolute; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/DirectControlBindingConvertGValue.cs b/sources/generated/Gst.Controller/DirectControlBindingConvertGValue.cs new file mode 100644 index 0000000000..e759553b74 --- /dev/null +++ b/sources/generated/Gst.Controller/DirectControlBindingConvertGValue.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + + public delegate void DirectControlBindingConvertGValue(Gst.Controller.DirectControlBinding self, double src_value, GLib.Value dest_value); + +} diff --git a/sources/generated/Gst.Controller/DirectControlBindingConvertValue.cs b/sources/generated/Gst.Controller/DirectControlBindingConvertValue.cs new file mode 100644 index 0000000000..83d66804f1 --- /dev/null +++ b/sources/generated/Gst.Controller/DirectControlBindingConvertValue.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + + public delegate void DirectControlBindingConvertValue(Gst.Controller.DirectControlBinding self, double src_value, IntPtr dest_value); + +} diff --git a/sources/generated/Gst.Controller/Global.cs b/sources/generated/Gst.Controller/Global.cs new file mode 100644 index 0000000000..ff714625ab --- /dev/null +++ b/sources/generated/Gst.Controller/Global.cs @@ -0,0 +1,23 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_timed_value_control_invalidate_cache(IntPtr self); + + public static void TimedValueControlInvalidateCache(Gst.Controller.TimedValueControlSource self) { + gst_timed_value_control_invalidate_cache(self == null ? IntPtr.Zero : self.Handle); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertGValueNative.cs b/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertGValueNative.cs new file mode 100644 index 0000000000..7cdf441c4e --- /dev/null +++ b/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertGValueNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.ControllerSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void DirectControlBindingConvertGValueNative(IntPtr self, double src_value, IntPtr dest_value); + + internal class DirectControlBindingConvertGValueInvoker { + + DirectControlBindingConvertGValueNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DirectControlBindingConvertGValueInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DirectControlBindingConvertGValueInvoker (DirectControlBindingConvertGValueNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DirectControlBindingConvertGValueInvoker (DirectControlBindingConvertGValueNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DirectControlBindingConvertGValueInvoker (DirectControlBindingConvertGValueNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Controller.DirectControlBindingConvertGValue Handler { + get { + return new Gst.Controller.DirectControlBindingConvertGValue(InvokeNative); + } + } + + void InvokeNative (Gst.Controller.DirectControlBinding self, double src_value, GLib.Value dest_value) + { + IntPtr native_dest_value = GLib.Marshaller.StructureToPtrAlloc (dest_value); + native_cb (self == null ? IntPtr.Zero : self.Handle, src_value, native_dest_value); + Marshal.FreeHGlobal (native_dest_value); + } + } + + internal class DirectControlBindingConvertGValueWrapper { + + public void NativeCallback (IntPtr self, double src_value, IntPtr dest_value) + { + try { + managed (GLib.Object.GetObject(self) as Gst.Controller.DirectControlBinding, src_value, (GLib.Value) Marshal.PtrToStructure (dest_value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DirectControlBindingConvertGValueNative NativeDelegate; + Gst.Controller.DirectControlBindingConvertGValue managed; + + public DirectControlBindingConvertGValueWrapper (Gst.Controller.DirectControlBindingConvertGValue managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DirectControlBindingConvertGValueNative (NativeCallback); + } + + public static Gst.Controller.DirectControlBindingConvertGValue GetManagedDelegate (DirectControlBindingConvertGValueNative native) + { + if (native == null) + return null; + DirectControlBindingConvertGValueWrapper wrapper = (DirectControlBindingConvertGValueWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertValueNative.cs b/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertValueNative.cs new file mode 100644 index 0000000000..d1d8bf374d --- /dev/null +++ b/sources/generated/Gst.Controller/Gst.ControllerSharp.DirectControlBindingConvertValueNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.ControllerSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void DirectControlBindingConvertValueNative(IntPtr self, double src_value, IntPtr dest_value); + + internal class DirectControlBindingConvertValueInvoker { + + DirectControlBindingConvertValueNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DirectControlBindingConvertValueInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DirectControlBindingConvertValueInvoker (DirectControlBindingConvertValueNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DirectControlBindingConvertValueInvoker (DirectControlBindingConvertValueNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DirectControlBindingConvertValueInvoker (DirectControlBindingConvertValueNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Controller.DirectControlBindingConvertValue Handler { + get { + return new Gst.Controller.DirectControlBindingConvertValue(InvokeNative); + } + } + + void InvokeNative (Gst.Controller.DirectControlBinding self, double src_value, IntPtr dest_value) + { + native_cb (self == null ? IntPtr.Zero : self.Handle, src_value, dest_value); + } + } + + internal class DirectControlBindingConvertValueWrapper { + + public void NativeCallback (IntPtr self, double src_value, IntPtr dest_value) + { + try { + managed (GLib.Object.GetObject(self) as Gst.Controller.DirectControlBinding, src_value, dest_value); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DirectControlBindingConvertValueNative NativeDelegate; + Gst.Controller.DirectControlBindingConvertValue managed; + + public DirectControlBindingConvertValueWrapper (Gst.Controller.DirectControlBindingConvertValue managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DirectControlBindingConvertValueNative (NativeCallback); + } + + public static Gst.Controller.DirectControlBindingConvertValue GetManagedDelegate (DirectControlBindingConvertValueNative native) + { + if (native == null) + return null; + DirectControlBindingConvertValueWrapper wrapper = (DirectControlBindingConvertValueWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Controller/InterpolationControlSource.cs b/sources/generated/Gst.Controller/InterpolationControlSource.cs new file mode 100644 index 0000000000..38d2825d5b --- /dev/null +++ b/sources/generated/Gst.Controller/InterpolationControlSource.cs @@ -0,0 +1,117 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class InterpolationControlSource : Gst.Controller.TimedValueControlSource { + + public InterpolationControlSource (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_interpolation_control_source_new(); + + public InterpolationControlSource () : base (IntPtr.Zero) + { + if (GetType () != typeof (InterpolationControlSource)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_interpolation_control_source_new(); + } + + [GLib.Property ("mode")] + public Gst.Controller.InterpolationMode Mode { + get { + GLib.Value val = GetProperty ("mode"); + Gst.Controller.InterpolationMode ret = (Gst.Controller.InterpolationMode) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("mode", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Controller.TimedValueControlSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_interpolation_control_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_interpolation_control_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static InterpolationControlSource () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Controller.TimedValueControlSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/InterpolationMode.cs b/sources/generated/Gst.Controller/InterpolationMode.cs new file mode 100644 index 0000000000..a2b7ee4288 --- /dev/null +++ b/sources/generated/Gst.Controller/InterpolationMode.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Controller.InterpolationModeGType))] + public enum InterpolationMode { + + None = 0, + Linear = 1, + Cubic = 2, + CubicMonotonic = 3, + } + + internal class InterpolationModeGType { + [DllImport ("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_interpolation_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_interpolation_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Controller/LFOControlSource.cs b/sources/generated/Gst.Controller/LFOControlSource.cs new file mode 100644 index 0000000000..cf14c917e6 --- /dev/null +++ b/sources/generated/Gst.Controller/LFOControlSource.cs @@ -0,0 +1,185 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class LFOControlSource : Gst.ControlSource { + + public LFOControlSource (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_lfo_control_source_new(); + + public LFOControlSource () : base (IntPtr.Zero) + { + if (GetType () != typeof (LFOControlSource)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_lfo_control_source_new(); + } + + [GLib.Property ("amplitude")] + public double Amplitude { + get { + GLib.Value val = GetProperty ("amplitude"); + double ret = (double) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("amplitude", val); + val.Dispose (); + } + } + + [GLib.Property ("frequency")] + public double Frequency { + get { + GLib.Value val = GetProperty ("frequency"); + double ret = (double) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("frequency", val); + val.Dispose (); + } + } + + [GLib.Property ("offset")] + public double Offset { + get { + GLib.Value val = GetProperty ("offset"); + double ret = (double) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("offset", val); + val.Dispose (); + } + } + + [GLib.Property ("timeshift")] + public ulong Timeshift { + get { + GLib.Value val = GetProperty ("timeshift"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("timeshift", val); + val.Dispose (); + } + } + + [GLib.Property ("waveform")] + public Gst.Controller.LFOWaveform Waveform { + get { + GLib.Value val = GetProperty ("waveform"); + Gst.Controller.LFOWaveform ret = (Gst.Controller.LFOWaveform) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("waveform", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.ControlSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_lfo_control_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_lfo_control_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static LFOControlSource () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.ControlSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , "priv" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "lock" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/LFOWaveform.cs b/sources/generated/Gst.Controller/LFOWaveform.cs new file mode 100644 index 0000000000..c91816b63a --- /dev/null +++ b/sources/generated/Gst.Controller/LFOWaveform.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Controller.LFOWaveformGType))] + public enum LFOWaveform { + + Sine = 0, + Square = 1, + Saw = 2, + ReverseSaw = 3, + Triangle = 4, + } + + internal class LFOWaveformGType { + [DllImport ("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_lfo_waveform_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_lfo_waveform_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Controller/ProxyControlBinding.cs b/sources/generated/Gst.Controller/ProxyControlBinding.cs new file mode 100644 index 0000000000..07f110353a --- /dev/null +++ b/sources/generated/Gst.Controller/ProxyControlBinding.cs @@ -0,0 +1,120 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ProxyControlBinding : Gst.ControlBinding { + + public ProxyControlBinding (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_proxy_control_binding_new(IntPtr _object, IntPtr property_name, IntPtr ref_object, IntPtr ref_property_name); + + public ProxyControlBinding (Gst.Object _object, string property_name, Gst.Object ref_object, string ref_property_name) : base (IntPtr.Zero) + { + if (GetType () != typeof (ProxyControlBinding)) { + var vals = new List (); + var names = new List (); + if (_object != null) { + names.Add ("_object"); + vals.Add (new GLib.Value (_object)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_ref_property_name = GLib.Marshaller.StringToPtrGStrdup (ref_property_name); + Raw = gst_proxy_control_binding_new(_object == null ? IntPtr.Zero : _object.Handle, native_property_name, ref_object == null ? IntPtr.Zero : ref_object.Handle, native_ref_property_name); + GLib.Marshaller.Free (native_property_name); + GLib.Marshaller.Free (native_ref_property_name); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_padding" + , Gst.ControlBinding.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _padding + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_proxy_control_binding_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_proxy_control_binding_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static ProxyControlBinding () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("ref_object" + , Gst.ControlBinding.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ref_object + , null + , "property_name" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("property_name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // property_name + , "ref_object" + , "_padding" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_padding" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _padding + , "property_name" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/TimedValueControlSource.cs b/sources/generated/Gst.Controller/TimedValueControlSource.cs new file mode 100644 index 0000000000..af9558d83f --- /dev/null +++ b/sources/generated/Gst.Controller/TimedValueControlSource.cs @@ -0,0 +1,407 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TimedValueControlSource : Gst.ControlSource { + + protected TimedValueControlSource (IntPtr raw) : base(raw) {} + + protected TimedValueControlSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public GLib.Mutex Lock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock")); + return new GLib.Mutex((*raw_ptr)); + } + } + } + + public int Nvalues { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("nvalues")); + return (*raw_ptr); + } + } + } + + public bool ValidCache { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("valid_cache")); + return (*raw_ptr); + } + } + } + + [GLib.Signal("value-removed")] + public event Gst.Controller.ValueRemovedHandler ValueRemoved { + add { + this.AddSignalHandler ("value-removed", value, typeof (Gst.Controller.ValueRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("value-removed", value); + } + } + + [GLib.Signal("value-added")] + public event Gst.Controller.ValueAddedHandler ValueAdded { + add { + this.AddSignalHandler ("value-added", value, typeof (Gst.Controller.ValueAddedArgs)); + } + remove { + this.RemoveSignalHandler ("value-added", value); + } + } + + [GLib.Signal("value-changed")] + public event Gst.Controller.ValueChangedHandler ValueChanged { + add { + this.AddSignalHandler ("value-changed", value, typeof (Gst.Controller.ValueChangedArgs)); + } + remove { + this.RemoveSignalHandler ("value-changed", value); + } + } + + static ValueAddedNativeDelegate ValueAdded_cb_delegate; + static ValueAddedNativeDelegate ValueAddedVMCallback { + get { + if (ValueAdded_cb_delegate == null) + ValueAdded_cb_delegate = new ValueAddedNativeDelegate (ValueAdded_cb); + return ValueAdded_cb_delegate; + } + } + + static void OverrideValueAdded (GLib.GType gtype) + { + OverrideValueAdded (gtype, ValueAddedVMCallback); + } + + static void OverrideValueAdded (GLib.GType gtype, ValueAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "value-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ValueAddedNativeDelegate (IntPtr inst, IntPtr timed_value); + + static void ValueAdded_cb (IntPtr inst, IntPtr timed_value) + { + try { + TimedValueControlSource __obj = GLib.Object.GetObject (inst, false) as TimedValueControlSource; + __obj.OnValueAdded (Gst.Controller.ControlPoint.New (timed_value)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Controller.TimedValueControlSource), ConnectionMethod="OverrideValueAdded")] + protected virtual void OnValueAdded (Gst.Controller.ControlPoint timed_value) + { + InternalValueAdded (timed_value); + } + + private void InternalValueAdded (Gst.Controller.ControlPoint timed_value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (timed_value); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ValueChangedNativeDelegate ValueChanged_cb_delegate; + static ValueChangedNativeDelegate ValueChangedVMCallback { + get { + if (ValueChanged_cb_delegate == null) + ValueChanged_cb_delegate = new ValueChangedNativeDelegate (ValueChanged_cb); + return ValueChanged_cb_delegate; + } + } + + static void OverrideValueChanged (GLib.GType gtype) + { + OverrideValueChanged (gtype, ValueChangedVMCallback); + } + + static void OverrideValueChanged (GLib.GType gtype, ValueChangedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "value-changed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ValueChangedNativeDelegate (IntPtr inst, IntPtr timed_value); + + static void ValueChanged_cb (IntPtr inst, IntPtr timed_value) + { + try { + TimedValueControlSource __obj = GLib.Object.GetObject (inst, false) as TimedValueControlSource; + __obj.OnValueChanged (Gst.Controller.ControlPoint.New (timed_value)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Controller.TimedValueControlSource), ConnectionMethod="OverrideValueChanged")] + protected virtual void OnValueChanged (Gst.Controller.ControlPoint timed_value) + { + InternalValueChanged (timed_value); + } + + private void InternalValueChanged (Gst.Controller.ControlPoint timed_value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (timed_value); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ValueRemovedNativeDelegate ValueRemoved_cb_delegate; + static ValueRemovedNativeDelegate ValueRemovedVMCallback { + get { + if (ValueRemoved_cb_delegate == null) + ValueRemoved_cb_delegate = new ValueRemovedNativeDelegate (ValueRemoved_cb); + return ValueRemoved_cb_delegate; + } + } + + static void OverrideValueRemoved (GLib.GType gtype) + { + OverrideValueRemoved (gtype, ValueRemovedVMCallback); + } + + static void OverrideValueRemoved (GLib.GType gtype, ValueRemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "value-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ValueRemovedNativeDelegate (IntPtr inst, IntPtr timed_value); + + static void ValueRemoved_cb (IntPtr inst, IntPtr timed_value) + { + try { + TimedValueControlSource __obj = GLib.Object.GetObject (inst, false) as TimedValueControlSource; + __obj.OnValueRemoved (Gst.Controller.ControlPoint.New (timed_value)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Controller.TimedValueControlSource), ConnectionMethod="OverrideValueRemoved")] + protected virtual void OnValueRemoved (Gst.Controller.ControlPoint timed_value) + { + InternalValueRemoved (timed_value); + } + + private void InternalValueRemoved (Gst.Controller.ControlPoint timed_value) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (timed_value); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.ControlSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_timed_value_control_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_timed_value_control_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_timed_value_control_source_get_all(IntPtr raw); + + public GLib.List[] All { + get { + IntPtr raw_ret = gst_timed_value_control_source_get_all(Handle); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, true, typeof(GLib.List)); + return ret; + } + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_timed_value_control_source_get_count(IntPtr raw); + + public int Count { + get { + int raw_ret = gst_timed_value_control_source_get_count(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_timed_value_control_source_set(IntPtr raw, ulong timestamp, double value); + + public bool Set(ulong timestamp, double value) { + bool raw_ret = gst_timed_value_control_source_set(Handle, timestamp, value); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_timed_value_control_source_set_from_list(IntPtr raw, IntPtr timedvalues); + + public bool SetFromList(GLib.SList timedvalues) { + bool raw_ret = gst_timed_value_control_source_set_from_list(Handle, timedvalues == null ? IntPtr.Zero : timedvalues.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_timed_value_control_source_unset(IntPtr raw, ulong timestamp); + + public bool Unset(ulong timestamp) { + bool raw_ret = gst_timed_value_control_source_unset(Handle, timestamp); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_timed_value_control_source_unset_all(IntPtr raw); + + public void UnsetAll() { + gst_timed_value_control_source_unset_all(Handle); + } + + + static TimedValueControlSource () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("lock" + , Gst.ControlSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , null + , "values" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("values" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // values + , "lock" + , "nvalues" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("nvalues" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // nvalues + , "values" + , "valid_cache" + , (long) Marshal.OffsetOf(typeof(GstTimedValueControlSource_nvaluesAlign), "nvalues") + , 0 + ), + new GLib.AbiField("valid_cache" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // valid_cache + , "nvalues" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstTimedValueControlSource_valid_cacheAlign), "valid_cache") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "valid_cache" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTimedValueControlSource_nvaluesAlign + { + sbyte f1; + private int nvalues; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTimedValueControlSource_valid_cacheAlign + { + sbyte f1; + private bool valid_cache; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/TriggerControlSource.cs b/sources/generated/Gst.Controller/TriggerControlSource.cs new file mode 100644 index 0000000000..b2e47ca2e1 --- /dev/null +++ b/sources/generated/Gst.Controller/TriggerControlSource.cs @@ -0,0 +1,117 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TriggerControlSource : Gst.Controller.TimedValueControlSource { + + public TriggerControlSource (IntPtr raw) : base(raw) {} + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_trigger_control_source_new(); + + public TriggerControlSource () : base (IntPtr.Zero) + { + if (GetType () != typeof (TriggerControlSource)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_trigger_control_source_new(); + } + + [GLib.Property ("tolerance")] + public long Tolerance { + get { + GLib.Value val = GetProperty ("tolerance"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("tolerance", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Controller.TimedValueControlSource.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstcontroller-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_trigger_control_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_trigger_control_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static TriggerControlSource () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Controller.TimedValueControlSource.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Controller/ValueAddedHandler.cs b/sources/generated/Gst.Controller/ValueAddedHandler.cs new file mode 100644 index 0000000000..5c2db32c78 --- /dev/null +++ b/sources/generated/Gst.Controller/ValueAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + + public delegate void ValueAddedHandler(object o, ValueAddedArgs args); + + public class ValueAddedArgs : GLib.SignalArgs { + public Gst.Controller.ControlPoint TimedValue{ + get { + return (Gst.Controller.ControlPoint) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Controller/ValueChangedHandler.cs b/sources/generated/Gst.Controller/ValueChangedHandler.cs new file mode 100644 index 0000000000..3c1842b6d6 --- /dev/null +++ b/sources/generated/Gst.Controller/ValueChangedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + + public delegate void ValueChangedHandler(object o, ValueChangedArgs args); + + public class ValueChangedArgs : GLib.SignalArgs { + public Gst.Controller.ControlPoint TimedValue{ + get { + return (Gst.Controller.ControlPoint) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Controller/ValueRemovedHandler.cs b/sources/generated/Gst.Controller/ValueRemovedHandler.cs new file mode 100644 index 0000000000..01c667aaab --- /dev/null +++ b/sources/generated/Gst.Controller/ValueRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Controller { + + using System; + + public delegate void ValueRemovedHandler(object o, ValueRemovedArgs args); + + public class ValueRemovedArgs : GLib.SignalArgs { + public Gst.Controller.ControlPoint TimedValue{ + get { + return (Gst.Controller.ControlPoint) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.FFT/Constants.cs b/sources/generated/Gst.FFT/Constants.cs new file mode 100644 index 0000000000..998bb287bc --- /dev/null +++ b/sources/generated/Gst.FFT/Constants.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTF32.cs b/sources/generated/Gst.FFT/FFTF32.cs new file mode 100644 index 0000000000..86ad7552d7 --- /dev/null +++ b/sources/generated/Gst.FFT/FFTF32.cs @@ -0,0 +1,74 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class FFTF32 : GLib.Opaque { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f32_inverse_fft(IntPtr raw, IntPtr freqdata, float timedata); + + public void InverseFft(Gst.FFT.FFTF32Complex freqdata, float timedata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_f32_inverse_fft(Handle, native_freqdata, timedata); + Marshal.FreeHGlobal (native_freqdata); + } + + public FFTF32(IntPtr raw) : base(raw) {} + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f32_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_fft_f32_free (raw); + } + + class FinalizerInfo { + IntPtr handle; + + public FinalizerInfo (IntPtr handle) + { + this.handle = handle; + } + + public bool Handler () + { + gst_fft_f32_free (handle); + return false; + } + } + + ~FFTF32 () + { + if (!Owned) + return; + FinalizerInfo info = new FinalizerInfo (Handle); + GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTF32Complex.cs b/sources/generated/Gst.FFT/FFTF32Complex.cs new file mode 100644 index 0000000000..6db2d6a4fe --- /dev/null +++ b/sources/generated/Gst.FFT/FFTF32Complex.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FFTF32Complex : IEquatable { + + public float R; + public float I; + + public static Gst.FFT.FFTF32Complex Zero = new Gst.FFT.FFTF32Complex (); + + public static Gst.FFT.FFTF32Complex New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.FFT.FFTF32Complex.Zero; + return (Gst.FFT.FFTF32Complex) Marshal.PtrToStructure (raw, typeof (Gst.FFT.FFTF32Complex)); + } + + public bool Equals (FFTF32Complex other) + { + return true && R.Equals (other.R) && I.Equals (other.I); + } + + public override bool Equals (object other) + { + return other is FFTF32Complex && Equals ((FFTF32Complex) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ R.GetHashCode () ^ I.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTF64.cs b/sources/generated/Gst.FFT/FFTF64.cs new file mode 100644 index 0000000000..3c47e078cc --- /dev/null +++ b/sources/generated/Gst.FFT/FFTF64.cs @@ -0,0 +1,90 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class FFTF64 : GLib.Opaque { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f64_fft(IntPtr raw, double timedata, IntPtr freqdata); + + public void Fft(double timedata, Gst.FFT.FFTF64Complex freqdata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_f64_fft(Handle, timedata, native_freqdata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f64_inverse_fft(IntPtr raw, IntPtr freqdata, double timedata); + + public void InverseFft(Gst.FFT.FFTF64Complex freqdata, double timedata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_f64_inverse_fft(Handle, native_freqdata, timedata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f64_window(IntPtr raw, double timedata, int window); + + public void Window(double timedata, Gst.FFT.FFTWindow window) { + gst_fft_f64_window(Handle, timedata, (int) window); + } + + public FFTF64(IntPtr raw) : base(raw) {} + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_f64_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_fft_f64_free (raw); + } + + class FinalizerInfo { + IntPtr handle; + + public FinalizerInfo (IntPtr handle) + { + this.handle = handle; + } + + public bool Handler () + { + gst_fft_f64_free (handle); + return false; + } + } + + ~FFTF64 () + { + if (!Owned) + return; + FinalizerInfo info = new FinalizerInfo (Handle); + GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTF64Complex.cs b/sources/generated/Gst.FFT/FFTF64Complex.cs new file mode 100644 index 0000000000..978310188d --- /dev/null +++ b/sources/generated/Gst.FFT/FFTF64Complex.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FFTF64Complex : IEquatable { + + public double R; + public double I; + + public static Gst.FFT.FFTF64Complex Zero = new Gst.FFT.FFTF64Complex (); + + public static Gst.FFT.FFTF64Complex New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.FFT.FFTF64Complex.Zero; + return (Gst.FFT.FFTF64Complex) Marshal.PtrToStructure (raw, typeof (Gst.FFT.FFTF64Complex)); + } + + public bool Equals (FFTF64Complex other) + { + return true && R.Equals (other.R) && I.Equals (other.I); + } + + public override bool Equals (object other) + { + return other is FFTF64Complex && Equals ((FFTF64Complex) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ R.GetHashCode () ^ I.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTS16.cs b/sources/generated/Gst.FFT/FFTS16.cs new file mode 100644 index 0000000000..0d3b3af074 --- /dev/null +++ b/sources/generated/Gst.FFT/FFTS16.cs @@ -0,0 +1,90 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class FFTS16 : GLib.Opaque { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s16_fft(IntPtr raw, short timedata, IntPtr freqdata); + + public void Fft(short timedata, Gst.FFT.FFTS16Complex freqdata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_s16_fft(Handle, timedata, native_freqdata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s16_inverse_fft(IntPtr raw, IntPtr freqdata, short timedata); + + public void InverseFft(Gst.FFT.FFTS16Complex freqdata, short timedata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_s16_inverse_fft(Handle, native_freqdata, timedata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s16_window(IntPtr raw, short timedata, int window); + + public void Window(short timedata, Gst.FFT.FFTWindow window) { + gst_fft_s16_window(Handle, timedata, (int) window); + } + + public FFTS16(IntPtr raw) : base(raw) {} + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s16_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_fft_s16_free (raw); + } + + class FinalizerInfo { + IntPtr handle; + + public FinalizerInfo (IntPtr handle) + { + this.handle = handle; + } + + public bool Handler () + { + gst_fft_s16_free (handle); + return false; + } + } + + ~FFTS16 () + { + if (!Owned) + return; + FinalizerInfo info = new FinalizerInfo (Handle); + GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTS16Complex.cs b/sources/generated/Gst.FFT/FFTS16Complex.cs new file mode 100644 index 0000000000..bd8f4f4369 --- /dev/null +++ b/sources/generated/Gst.FFT/FFTS16Complex.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FFTS16Complex : IEquatable { + + public short R; + public short I; + + public static Gst.FFT.FFTS16Complex Zero = new Gst.FFT.FFTS16Complex (); + + public static Gst.FFT.FFTS16Complex New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.FFT.FFTS16Complex.Zero; + return (Gst.FFT.FFTS16Complex) Marshal.PtrToStructure (raw, typeof (Gst.FFT.FFTS16Complex)); + } + + public bool Equals (FFTS16Complex other) + { + return true && R.Equals (other.R) && I.Equals (other.I); + } + + public override bool Equals (object other) + { + return other is FFTS16Complex && Equals ((FFTS16Complex) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ R.GetHashCode () ^ I.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTS32.cs b/sources/generated/Gst.FFT/FFTS32.cs new file mode 100644 index 0000000000..28305d7053 --- /dev/null +++ b/sources/generated/Gst.FFT/FFTS32.cs @@ -0,0 +1,90 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class FFTS32 : GLib.Opaque { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s32_fft(IntPtr raw, int timedata, IntPtr freqdata); + + public void Fft(int timedata, Gst.FFT.FFTS32Complex freqdata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_s32_fft(Handle, timedata, native_freqdata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s32_inverse_fft(IntPtr raw, IntPtr freqdata, int timedata); + + public void InverseFft(Gst.FFT.FFTS32Complex freqdata, int timedata) { + IntPtr native_freqdata = GLib.Marshaller.StructureToPtrAlloc (freqdata); + gst_fft_s32_inverse_fft(Handle, native_freqdata, timedata); + Marshal.FreeHGlobal (native_freqdata); + } + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s32_window(IntPtr raw, int timedata, int window); + + public void Window(int timedata, Gst.FFT.FFTWindow window) { + gst_fft_s32_window(Handle, timedata, (int) window); + } + + public FFTS32(IntPtr raw) : base(raw) {} + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_fft_s32_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_fft_s32_free (raw); + } + + class FinalizerInfo { + IntPtr handle; + + public FinalizerInfo (IntPtr handle) + { + this.handle = handle; + } + + public bool Handler () + { + gst_fft_s32_free (handle); + return false; + } + } + + ~FFTS32 () + { + if (!Owned) + return; + FinalizerInfo info = new FinalizerInfo (Handle); + GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTS32Complex.cs b/sources/generated/Gst.FFT/FFTS32Complex.cs new file mode 100644 index 0000000000..6ae5251a4b --- /dev/null +++ b/sources/generated/Gst.FFT/FFTS32Complex.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FFTS32Complex : IEquatable { + + public int R; + public int I; + + public static Gst.FFT.FFTS32Complex Zero = new Gst.FFT.FFTS32Complex (); + + public static Gst.FFT.FFTS32Complex New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.FFT.FFTS32Complex.Zero; + return (Gst.FFT.FFTS32Complex) Marshal.PtrToStructure (raw, typeof (Gst.FFT.FFTS32Complex)); + } + + public bool Equals (FFTS32Complex other) + { + return true && R.Equals (other.R) && I.Equals (other.I); + } + + public override bool Equals (object other) + { + return other is FFTS32Complex && Equals ((FFTS32Complex) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ R.GetHashCode () ^ I.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.FFT/FFTWindow.cs b/sources/generated/Gst.FFT/FFTWindow.cs new file mode 100644 index 0000000000..370b3366e5 --- /dev/null +++ b/sources/generated/Gst.FFT/FFTWindow.cs @@ -0,0 +1,19 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum FFTWindow { + + Rectangular = 0, + Hamming = 1, + Hann = 2, + Bartlett = 3, + Blackman = 4, + } +#endregion +} diff --git a/sources/generated/Gst.FFT/Global.cs b/sources/generated/Gst.FFT/Global.cs new file mode 100644 index 0000000000..6dd8798495 --- /dev/null +++ b/sources/generated/Gst.FFT/Global.cs @@ -0,0 +1,25 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.FFT { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_fft_next_fast_length(int n); + + public static int FftNextFastLength(int n) { + int raw_ret = gst_fft_next_fast_length(n); + int ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Net/Constants.cs b/sources/generated/Gst.Net/Constants.cs new file mode 100644 index 0000000000..3f7584c2a0 --- /dev/null +++ b/sources/generated/Gst.Net/Constants.cs @@ -0,0 +1,22 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const int NET_TIME_PACKET_SIZE = 16; + public const ulong PTP_CLOCK_ID_NONE = 18446744073709551615; + public const string PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED = @"GstPtpStatisticsBestMasterClockSelected"; + public const string PTP_STATISTICS_NEW_DOMAIN_FOUND = @"GstPtpStatisticsNewDomainFound"; + public const string PTP_STATISTICS_PATH_DELAY_MEASURED = @"GstPtpStatisticsPathDelayMeasured"; + public const string PTP_STATISTICS_TIME_UPDATED = @"GstPtpStatisticsTimeUpdated"; +#endregion + } +} diff --git a/sources/generated/Gst.Net/Global.cs b/sources/generated/Gst.Net/Global.cs new file mode 100644 index 0000000000..3bfa56bf57 --- /dev/null +++ b/sources/generated/Gst.Net/Global.cs @@ -0,0 +1,174 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_net_address_meta(IntPtr buffer, IntPtr addr); + + public static Gst.Net.NetAddressMeta BufferAddNetAddressMeta(Gst.Buffer buffer, GLib.SocketAddress addr) { + IntPtr raw_ret = gst_buffer_add_net_address_meta(buffer == null ? IntPtr.Zero : buffer.Handle, addr == null ? IntPtr.Zero : addr.Handle); + Gst.Net.NetAddressMeta ret = Gst.Net.NetAddressMeta.New (raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_net_control_message_meta(IntPtr buffer, IntPtr message); + + public static Gst.Net.NetControlMessageMeta BufferAddNetControlMessageMeta(Gst.Buffer buffer, GLib.SocketControlMessage message) { + IntPtr raw_ret = gst_buffer_add_net_control_message_meta(buffer == null ? IntPtr.Zero : buffer.Handle, message == null ? IntPtr.Zero : message.Handle); + Gst.Net.NetControlMessageMeta ret = Gst.Net.NetControlMessageMeta.New (raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_net_address_meta(IntPtr buffer); + + public static Gst.Net.NetAddressMeta BufferGetNetAddressMeta(Gst.Buffer buffer) { + IntPtr raw_ret = gst_buffer_get_net_address_meta(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Net.NetAddressMeta ret = Gst.Net.NetAddressMeta.New (raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_address_meta_api_get_type(); + + public static GLib.GType NetAddressMetaApiGetType() { + IntPtr raw_ret = gst_net_address_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_address_meta_get_info(); + + public static Gst.MetaInfo NetAddressMetaGetInfo() { + IntPtr raw_ret = gst_net_address_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_control_message_meta_api_get_type(); + + public static GLib.GType NetControlMessageMetaApiGetType() { + IntPtr raw_ret = gst_net_control_message_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_control_message_meta_get_info(); + + public static Gst.MetaInfo NetControlMessageMetaGetInfo() { + IntPtr raw_ret = gst_net_control_message_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_net_time_packet_receive(IntPtr socket, out IntPtr src_address, out IntPtr error); + + public static unsafe Gst.Net.NetTimePacket NetTimePacketReceive(GLib.Socket socket, out GLib.SocketAddress src_address) { + IntPtr native_src_address; + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_net_time_packet_receive(socket == null ? IntPtr.Zero : socket.Handle, out native_src_address, out error); + Gst.Net.NetTimePacket ret = Gst.Net.NetTimePacket.New (raw_ret); + src_address = GLib.Object.GetObject(native_src_address, true) as GLib.SocketAddress; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_net_utils_set_socket_tos(IntPtr socket, int qos_dscp); + + public static bool NetUtilsSetSocketTos(GLib.Socket socket, int qos_dscp) { + bool raw_ret = gst_net_utils_set_socket_tos(socket == null ? IntPtr.Zero : socket.Handle, qos_dscp); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_ptp_deinit(); + + public static void PtpDeinit() { + gst_ptp_deinit(); + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ptp_init(ulong clock_id, IntPtr[] interfaces); + + public static bool PtpInit(ulong clock_id, string[] interfaces) { + int cnt_interfaces = interfaces == null ? 0 : interfaces.Length; + IntPtr[] native_interfaces = new IntPtr [cnt_interfaces + 1]; + for (int i = 0; i < cnt_interfaces; i++) + native_interfaces [i] = GLib.Marshaller.StringToPtrGStrdup (interfaces[i]); + native_interfaces [cnt_interfaces] = IntPtr.Zero; + bool raw_ret = gst_ptp_init(clock_id, native_interfaces); + bool ret = raw_ret; + for (int i = 0; i < native_interfaces.Length - 1; i++) { + interfaces [i] = GLib.Marshaller.Utf8PtrToString (native_interfaces[i]); + GLib.Marshaller.Free (native_interfaces[i]); + } + return ret; + } + + public static bool PtpInit(ulong clock_id) { + return PtpInit (clock_id, null); + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ptp_is_initialized(); + + public static bool PtpIsInitialized() { + bool raw_ret = gst_ptp_is_initialized(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ptp_is_supported(); + + public static bool PtpIsSupported() { + bool raw_ret = gst_ptp_is_supported(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_ptp_statistics_callback_add(Gst.NetSharp.PtpStatisticsCallbackNative cb, IntPtr user_data, GLib.DestroyNotify destroy_data); + + public static ulong PtpStatisticsCallbackAdd(Gst.Net.PtpStatisticsCallback cb) { + Gst.NetSharp.PtpStatisticsCallbackWrapper cb_wrapper = new Gst.NetSharp.PtpStatisticsCallbackWrapper (cb); + IntPtr user_data; + GLib.DestroyNotify destroy_data; + if (cb == null) { + user_data = IntPtr.Zero; + destroy_data = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (cb_wrapper); + destroy_data = GLib.DestroyHelper.NotifyHandler; + } + UIntPtr raw_ret = gst_ptp_statistics_callback_add(cb_wrapper.NativeDelegate, user_data, destroy_data); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_ptp_statistics_callback_remove(UIntPtr id); + + public static void PtpStatisticsCallbackRemove(ulong id) { + gst_ptp_statistics_callback_remove(new UIntPtr (id)); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Net/Gst.NetSharp.PtpStatisticsCallbackNative.cs b/sources/generated/Gst.Net/Gst.NetSharp.PtpStatisticsCallbackNative.cs new file mode 100644 index 0000000000..5b9147c5ea --- /dev/null +++ b/sources/generated/Gst.Net/Gst.NetSharp.PtpStatisticsCallbackNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.NetSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PtpStatisticsCallbackNative(byte domain, IntPtr stats, IntPtr user_data); + + internal class PtpStatisticsCallbackInvoker { + + PtpStatisticsCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PtpStatisticsCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PtpStatisticsCallbackInvoker (PtpStatisticsCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PtpStatisticsCallbackInvoker (PtpStatisticsCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PtpStatisticsCallbackInvoker (PtpStatisticsCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Net.PtpStatisticsCallback Handler { + get { + return new Gst.Net.PtpStatisticsCallback(InvokeNative); + } + } + + bool InvokeNative (byte domain, Gst.Structure stats) + { + bool __result = native_cb (domain, stats == null ? IntPtr.Zero : stats.Handle, __data); + return __result; + } + } + + internal class PtpStatisticsCallbackWrapper { + + public bool NativeCallback (byte domain, IntPtr stats, IntPtr user_data) + { + try { + bool __ret = managed (domain, stats == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (stats, typeof (Gst.Structure), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PtpStatisticsCallbackNative NativeDelegate; + Gst.Net.PtpStatisticsCallback managed; + + public PtpStatisticsCallbackWrapper (Gst.Net.PtpStatisticsCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PtpStatisticsCallbackNative (NativeCallback); + } + + public static Gst.Net.PtpStatisticsCallback GetManagedDelegate (PtpStatisticsCallbackNative native) + { + if (native == null) + return null; + PtpStatisticsCallbackWrapper wrapper = (PtpStatisticsCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Net/NetAddressMeta.cs b/sources/generated/Gst.Net/NetAddressMeta.cs new file mode 100644 index 0000000000..551f28ea0f --- /dev/null +++ b/sources/generated/Gst.Net/NetAddressMeta.cs @@ -0,0 +1,65 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct NetAddressMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _addr; + public GLib.SocketAddress Addr { + get { + return GLib.Object.GetObject(_addr) as GLib.SocketAddress; + } + set { + _addr = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.Net.NetAddressMeta Zero = new Gst.Net.NetAddressMeta (); + + public static Gst.Net.NetAddressMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Net.NetAddressMeta.Zero; + return (Gst.Net.NetAddressMeta) Marshal.PtrToStructure (raw, typeof (Gst.Net.NetAddressMeta)); + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_address_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_net_address_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (NetAddressMeta other) + { + return true && Meta.Equals (other.Meta) && Addr.Equals (other.Addr); + } + + public override bool Equals (object other) + { + return other is NetAddressMeta && Equals ((NetAddressMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Addr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Net/NetClientClock.cs b/sources/generated/Gst.Net/NetClientClock.cs new file mode 100644 index 0000000000..ee08f64be0 --- /dev/null +++ b/sources/generated/Gst.Net/NetClientClock.cs @@ -0,0 +1,222 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class NetClientClock : Gst.SystemClock { + + public NetClientClock (IntPtr raw) : base(raw) {} + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_client_clock_new(IntPtr name, IntPtr remote_address, int remote_port, ulong base_time); + + public NetClientClock (string name, string remote_address, int remote_port, ulong base_time) : base (IntPtr.Zero) + { + if (GetType () != typeof (NetClientClock)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + names.Add ("base_time"); + vals.Add (new GLib.Value (base_time)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_remote_address = GLib.Marshaller.StringToPtrGStrdup (remote_address); + Raw = gst_net_client_clock_new(native_name, native_remote_address, remote_port, base_time); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_remote_address); + } + + [GLib.Property ("address")] + public string Address { + get { + GLib.Value val = GetProperty ("address"); + string ret = (string) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("address", val); + val.Dispose (); + } + } + + [GLib.Property ("base-time")] + public ulong BaseTime { + get { + GLib.Value val = GetProperty ("base-time"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("bus")] + public Gst.Bus Bus { + get { + GLib.Value val = GetProperty ("bus"); + Gst.Bus ret = (Gst.Bus) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("bus", val); + val.Dispose (); + } + } + + [GLib.Property ("internal-clock")] + public Gst.Clock InternalClock { + get { + GLib.Value val = GetProperty ("internal-clock"); + Gst.Clock ret = (Gst.Clock) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("minimum-update-interval")] + public ulong MinimumUpdateInterval { + get { + GLib.Value val = GetProperty ("minimum-update-interval"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("minimum-update-interval", val); + val.Dispose (); + } + } + + [GLib.Property ("port")] + public int Port { + get { + GLib.Value val = GetProperty ("port"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("port", val); + val.Dispose (); + } + } + + [GLib.Property ("qos-dscp")] + public int QosDscp { + get { + GLib.Value val = GetProperty ("qos-dscp"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos-dscp", val); + val.Dispose (); + } + } + + [GLib.Property ("round-trip-limit")] + public ulong RoundTripLimit { + get { + GLib.Value val = GetProperty ("round-trip-limit"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("round-trip-limit", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.SystemClock.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_client_clock_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_net_client_clock_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static NetClientClock () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.SystemClock.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Net/NetControlMessageMeta.cs b/sources/generated/Gst.Net/NetControlMessageMeta.cs new file mode 100644 index 0000000000..fdf5234a57 --- /dev/null +++ b/sources/generated/Gst.Net/NetControlMessageMeta.cs @@ -0,0 +1,65 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct NetControlMessageMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _message; + public GLib.SocketControlMessage Message { + get { + return GLib.Object.GetObject(_message) as GLib.SocketControlMessage; + } + set { + _message = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.Net.NetControlMessageMeta Zero = new Gst.Net.NetControlMessageMeta (); + + public static Gst.Net.NetControlMessageMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Net.NetControlMessageMeta.Zero; + return (Gst.Net.NetControlMessageMeta) Marshal.PtrToStructure (raw, typeof (Gst.Net.NetControlMessageMeta)); + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_control_message_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_net_control_message_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (NetControlMessageMeta other) + { + return true && Meta.Equals (other.Meta) && Message.Equals (other.Message); + } + + public override bool Equals (object other) + { + return other is NetControlMessageMeta && Equals ((NetControlMessageMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Message.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Net/NetTimePacket.cs b/sources/generated/Gst.Net/NetTimePacket.cs new file mode 100644 index 0000000000..05b7270967 --- /dev/null +++ b/sources/generated/Gst.Net/NetTimePacket.cs @@ -0,0 +1,121 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct NetTimePacket : IEquatable { + + public ulong LocalTime; + public ulong RemoteTime; + + public static Gst.Net.NetTimePacket Zero = new Gst.Net.NetTimePacket (); + + public static Gst.Net.NetTimePacket New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Net.NetTimePacket.Zero; + return (Gst.Net.NetTimePacket) Marshal.PtrToStructure (raw, typeof (Gst.Net.NetTimePacket)); + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_time_packet_new(byte[] buffer); + + public static NetTimePacket New(byte[] buffer) + { + NetTimePacket result = NetTimePacket.New (gst_net_time_packet_new(buffer)); + return result; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_time_packet_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_net_time_packet_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool gst_net_time_packet_send(IntPtr raw, IntPtr socket, IntPtr dest_address, out IntPtr error); + + public unsafe bool Send(GLib.Socket socket, GLib.SocketAddress dest_address) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_net_time_packet_send(this_as_native, socket == null ? IntPtr.Zero : socket.Handle, dest_address == null ? IntPtr.Zero : dest_address.Handle, out error); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_net_time_packet_serialize(IntPtr raw); + + public byte Serialize() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_net_time_packet_serialize(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_net_time_packet_receive(IntPtr socket, out IntPtr src_address, out IntPtr error); + + public static unsafe Gst.Net.NetTimePacket Receive(GLib.Socket socket, out GLib.SocketAddress src_address) { + IntPtr native_src_address; + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_net_time_packet_receive(socket == null ? IntPtr.Zero : socket.Handle, out native_src_address, out error); + Gst.Net.NetTimePacket ret = Gst.Net.NetTimePacket.New (raw_ret); + src_address = GLib.Object.GetObject(native_src_address, true) as GLib.SocketAddress; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Net.NetTimePacket target) + { + target = New (native); + } + + public bool Equals (NetTimePacket other) + { + return true && LocalTime.Equals (other.LocalTime) && RemoteTime.Equals (other.RemoteTime); + } + + public override bool Equals (object other) + { + return other is NetTimePacket && Equals ((NetTimePacket) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ LocalTime.GetHashCode () ^ RemoteTime.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Net.NetTimePacket boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Net.NetTimePacket.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Net.NetTimePacket (GLib.Value val) + { + return (Gst.Net.NetTimePacket) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Net/NetTimeProvider.cs b/sources/generated/Gst.Net/NetTimeProvider.cs new file mode 100644 index 0000000000..cb6af8ab29 --- /dev/null +++ b/sources/generated/Gst.Net/NetTimeProvider.cs @@ -0,0 +1,185 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class NetTimeProvider : Gst.Object, GLib.IInitable { + + public NetTimeProvider (IntPtr raw) : base(raw) {} + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_time_provider_new(IntPtr clock, IntPtr address, int port); + + public NetTimeProvider (Gst.Clock clock, string address, int port) : base (IntPtr.Zero) + { + if (GetType () != typeof (NetTimeProvider)) { + var vals = new List (); + var names = new List (); + if (clock != null) { + names.Add ("clock"); + vals.Add (new GLib.Value (clock)); + } + names.Add ("address"); + vals.Add (new GLib.Value (address)); + names.Add ("port"); + vals.Add (new GLib.Value (port)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address); + Raw = gst_net_time_provider_new(clock == null ? IntPtr.Zero : clock.Handle, native_address, port); + GLib.Marshaller.Free (native_address); + } + + [GLib.Property ("active")] + public bool Active { + get { + GLib.Value val = GetProperty ("active"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("active", val); + val.Dispose (); + } + } + + [GLib.Property ("address")] + public string Address { + get { + GLib.Value val = GetProperty ("address"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("clock")] + public Gst.Clock Clock { + get { + GLib.Value val = GetProperty ("clock"); + Gst.Clock ret = (Gst.Clock) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("port")] + public int Port { + get { + GLib.Value val = GetProperty ("port"); + int ret = (int) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("qos-dscp")] + public int QosDscp { + get { + GLib.Value val = GetProperty ("qos-dscp"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos-dscp", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_net_time_provider_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_net_time_provider_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool g_initable_init(IntPtr raw, IntPtr cancellable, out IntPtr error); + + public bool Init(GLib.Cancellable cancellable) { + IntPtr error = IntPtr.Zero; + bool raw_ret = g_initable_init(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static NetTimeProvider () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Net/PtpClock.cs b/sources/generated/Gst.Net/PtpClock.cs new file mode 100644 index 0000000000..fbfe5ec17b --- /dev/null +++ b/sources/generated/Gst.Net/PtpClock.cs @@ -0,0 +1,150 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PtpClock : Gst.SystemClock { + + public PtpClock (IntPtr raw) : base(raw) {} + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ptp_clock_new(IntPtr name, uint domain); + + public PtpClock (string name, uint domain) : base (IntPtr.Zero) + { + if (GetType () != typeof (PtpClock)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + names.Add ("domain"); + vals.Add (new GLib.Value (domain)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_ptp_clock_new(native_name, domain); + GLib.Marshaller.Free (native_name); + } + + [GLib.Property ("domain")] + public uint Domain { + get { + GLib.Value val = GetProperty ("domain"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("grandmaster-clock-id")] + public ulong GrandmasterClockId { + get { + GLib.Value val = GetProperty ("grandmaster-clock-id"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("internal-clock")] + public Gst.Clock InternalClock { + get { + GLib.Value val = GetProperty ("internal-clock"); + Gst.Clock ret = (Gst.Clock) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("master-clock-id")] + public ulong MasterClockId { + get { + GLib.Value val = GetProperty ("master-clock-id"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.SystemClock.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ptp_clock_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_ptp_clock_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static PtpClock () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.SystemClock.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Net/PtpStatisticsCallback.cs b/sources/generated/Gst.Net/PtpStatisticsCallback.cs new file mode 100644 index 0000000000..23cb970af6 --- /dev/null +++ b/sources/generated/Gst.Net/PtpStatisticsCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Net { + + using System; + + public delegate bool PtpStatisticsCallback(byte domain, Gst.Structure stats); + +} diff --git a/sources/generated/Gst.PbUtils/AudioVisualizer.cs b/sources/generated/Gst.PbUtils/AudioVisualizer.cs new file mode 100644 index 0000000000..b8700bb2c2 --- /dev/null +++ b/sources/generated/Gst.PbUtils/AudioVisualizer.cs @@ -0,0 +1,367 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AudioVisualizer : Gst.Element { + + protected AudioVisualizer (IntPtr raw) : base(raw) {} + + protected AudioVisualizer() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("shade-amount")] + public uint ShadeAmount { + get { + GLib.Value val = GetProperty ("shade-amount"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("shade-amount", val); + val.Dispose (); + } + } + + [GLib.Property ("shader")] + public Gst.PbUtils.AudioVisualizerShader Shader { + get { + GLib.Value val = GetProperty ("shader"); + Gst.PbUtils.AudioVisualizerShader ret = (Gst.PbUtils.AudioVisualizerShader) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("shader", val); + val.Dispose (); + } + } + + public uint ReqSpf { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("req_spf")); + return (*raw_ptr); + } + } + } + + public Gst.Video.VideoInfo Vinfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("vinfo")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Video.VideoInfo), false); + } + } + } + + public Gst.Audio.AudioInfo Ainfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ainfo")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false); + } + } + } + + static SetupNativeDelegate Setup_cb_delegate; + static SetupNativeDelegate SetupVMCallback { + get { + if (Setup_cb_delegate == null) + Setup_cb_delegate = new SetupNativeDelegate (Setup_cb); + return Setup_cb_delegate; + } + } + + static void OverrideSetup (GLib.GType gtype) + { + OverrideSetup (gtype, SetupVMCallback); + } + + static void OverrideSetup (GLib.GType gtype, SetupNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("setup")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetupNativeDelegate (IntPtr inst); + + static bool Setup_cb (IntPtr inst) + { + try { + AudioVisualizer __obj = GLib.Object.GetObject (inst, false) as AudioVisualizer; + bool __result; + __result = __obj.OnSetup (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.AudioVisualizer), ConnectionMethod="OverrideSetup")] + protected virtual bool OnSetup () + { + return InternalSetup (); + } + + private bool InternalSetup () + { + SetupNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("setup")); + unmanaged = (SetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetupNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static RenderNativeDelegate Render_cb_delegate; + static RenderNativeDelegate RenderVMCallback { + get { + if (Render_cb_delegate == null) + Render_cb_delegate = new RenderNativeDelegate (Render_cb); + return Render_cb_delegate; + } + } + + static void OverrideRender (GLib.GType gtype) + { + OverrideRender (gtype, RenderVMCallback); + } + + static void OverrideRender (GLib.GType gtype, RenderNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("render")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RenderNativeDelegate (IntPtr inst, IntPtr audio, IntPtr video); + + static bool Render_cb (IntPtr inst, IntPtr audio, IntPtr video) + { + try { + AudioVisualizer __obj = GLib.Object.GetObject (inst, false) as AudioVisualizer; + bool __result; + __result = __obj.OnRender (audio == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (audio, typeof (Gst.Buffer), false), Gst.Video.VideoFrame.New (video)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.AudioVisualizer), ConnectionMethod="OverrideRender")] + protected virtual bool OnRender (Gst.Buffer audio, Gst.Video.VideoFrame video) + { + return InternalRender (audio, video); + } + + private bool InternalRender (Gst.Buffer audio, Gst.Video.VideoFrame video) + { + RenderNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("render")); + unmanaged = (RenderNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_video = GLib.Marshaller.StructureToPtrAlloc (video); + bool __result = unmanaged (this.Handle, audio == null ? IntPtr.Zero : audio.Handle, native_video); + Marshal.FreeHGlobal (native_video); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + AudioVisualizer __obj = GLib.Object.GetObject (inst, false) as AudioVisualizer; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.AudioVisualizer), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("setup" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // setup + , null + , "render" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("render" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // render + , "setup" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "render" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_visualizer_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_visualizer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static AudioVisualizer () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("req_spf" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(uint)) // req_spf + , null + , "vinfo" + , (long) Marshal.OffsetOf(typeof(GstAudioVisualizer_req_spfAlign), "req_spf") + , 0 + ), + new GLib.AbiField("vinfo" + , -1 + , Gst.Video.VideoInfo.abi_info.Size // vinfo + , "req_spf" + , "ainfo" + , Gst.Video.VideoInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("ainfo" + , -1 + , Gst.Audio.AudioInfo.abi_info.Size // ainfo + , "vinfo" + , "priv" + , Gst.Audio.AudioInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "ainfo" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstAudioVisualizer_req_spfAlign + { + sbyte f1; + private uint req_spf; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/AudioVisualizerShader.cs b/sources/generated/Gst.PbUtils/AudioVisualizerShader.cs new file mode 100644 index 0000000000..785b11f4e8 --- /dev/null +++ b/sources/generated/Gst.PbUtils/AudioVisualizerShader.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PbUtils.AudioVisualizerShaderGType))] + public enum AudioVisualizerShader { + + None = 0, + Fade = 1, + FadeAndMoveUp = 2, + FadeAndMoveDown = 3, + FadeAndMoveLeft = 4, + FadeAndMoveRight = 5, + FadeAndMoveHorizOut = 6, + FadeAndMoveHorizIn = 7, + FadeAndMoveVertOut = 8, + FadeAndMoveVertIn = 9, + } + + internal class AudioVisualizerShaderGType { + [DllImport ("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_visualizer_shader_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_audio_visualizer_shader_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/AudioVisualizerShaderFunc.cs b/sources/generated/Gst.PbUtils/AudioVisualizerShaderFunc.cs new file mode 100644 index 0000000000..c9ca7e1b09 --- /dev/null +++ b/sources/generated/Gst.PbUtils/AudioVisualizerShaderFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + + public delegate void AudioVisualizerShaderFunc(Gst.PbUtils.AudioVisualizer scope, Gst.Video.VideoFrame s, Gst.Video.VideoFrame d); + +} diff --git a/sources/generated/Gst.PbUtils/Constants.cs b/sources/generated/Gst.PbUtils/Constants.cs new file mode 100644 index 0000000000..e131084156 --- /dev/null +++ b/sources/generated/Gst.PbUtils/Constants.cs @@ -0,0 +1,25 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const string ENCODING_CATEGORY_CAPTURE = @"capture"; + public const string ENCODING_CATEGORY_DEVICE = @"device"; + public const string ENCODING_CATEGORY_FILE_EXTENSION = @"file-extension"; + public const string ENCODING_CATEGORY_ONLINE_SERVICE = @"online-service"; + public const string ENCODING_CATEGORY_STORAGE_EDITING = @"storage-editing"; + public const int PLUGINS_BASE_VERSION_MAJOR = 1; + public const int PLUGINS_BASE_VERSION_MICRO = 2; + public const int PLUGINS_BASE_VERSION_MINOR = 19; + public const int PLUGINS_BASE_VERSION_NANO = 0; +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscoveredHandler.cs b/sources/generated/Gst.PbUtils/DiscoveredHandler.cs new file mode 100644 index 0000000000..e6cc54c86f --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscoveredHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + + public delegate void DiscoveredHandler(object o, DiscoveredArgs args); + + public class DiscoveredArgs : GLib.SignalArgs { + public Gst.PbUtils.DiscovererInfo Info{ + get { + return (Gst.PbUtils.DiscovererInfo) Args [0]; + } + } + + public IntPtr Error{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst.PbUtils/Discoverer.cs b/sources/generated/Gst.PbUtils/Discoverer.cs new file mode 100644 index 0000000000..4bf3316d5b --- /dev/null +++ b/sources/generated/Gst.PbUtils/Discoverer.cs @@ -0,0 +1,458 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Discoverer : GLib.Object { + + public Discoverer (IntPtr raw) : base(raw) {} + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_new(ulong timeout); + + public Discoverer (ulong timeout) : base (IntPtr.Zero) + { + if (GetType () != typeof (Discoverer)) { + var vals = new List (); + var names = new List (); + names.Add ("timeout"); + vals.Add (new GLib.Value (timeout)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + Raw = gst_discoverer_new(timeout); + } + + [GLib.Property ("timeout")] + public ulong Timeout { + get { + GLib.Value val = GetProperty ("timeout"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("timeout", val); + val.Dispose (); + } + } + + [GLib.Property ("use-cache")] + public bool UseCache { + get { + GLib.Value val = GetProperty ("use-cache"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("use-cache", val); + val.Dispose (); + } + } + + [GLib.Signal("discovered")] + public event Gst.PbUtils.DiscoveredHandler Discovered { + add { + this.AddSignalHandler ("discovered", value, typeof (Gst.PbUtils.DiscoveredArgs)); + } + remove { + this.RemoveSignalHandler ("discovered", value); + } + } + + [GLib.Signal("starting")] + public event System.EventHandler Starting { + add { + this.AddSignalHandler ("starting", value); + } + remove { + this.RemoveSignalHandler ("starting", value); + } + } + + [GLib.Signal("finished")] + public event System.EventHandler Finished { + add { + this.AddSignalHandler ("finished", value); + } + remove { + this.RemoveSignalHandler ("finished", value); + } + } + + [GLib.Signal("source-setup")] + public event Gst.PbUtils.SourceSetupHandler SourceSetup { + add { + this.AddSignalHandler ("source-setup", value, typeof (Gst.PbUtils.SourceSetupArgs)); + } + remove { + this.RemoveSignalHandler ("source-setup", value); + } + } + + static FinishedNativeDelegate Finished_cb_delegate; + static FinishedNativeDelegate FinishedVMCallback { + get { + if (Finished_cb_delegate == null) + Finished_cb_delegate = new FinishedNativeDelegate (Finished_cb); + return Finished_cb_delegate; + } + } + + static void OverrideFinished (GLib.GType gtype) + { + OverrideFinished (gtype, FinishedVMCallback); + } + + static void OverrideFinished (GLib.GType gtype, FinishedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("finished")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FinishedNativeDelegate (IntPtr inst); + + static void Finished_cb (IntPtr inst) + { + try { + Discoverer __obj = GLib.Object.GetObject (inst, false) as Discoverer; + __obj.OnFinished (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.Discoverer), ConnectionMethod="OverrideFinished")] + protected virtual void OnFinished () + { + InternalFinished (); + } + + private void InternalFinished () + { + FinishedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("finished")); + unmanaged = (FinishedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FinishedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static StartingNativeDelegate Starting_cb_delegate; + static StartingNativeDelegate StartingVMCallback { + get { + if (Starting_cb_delegate == null) + Starting_cb_delegate = new StartingNativeDelegate (Starting_cb); + return Starting_cb_delegate; + } + } + + static void OverrideStarting (GLib.GType gtype) + { + OverrideStarting (gtype, StartingVMCallback); + } + + static void OverrideStarting (GLib.GType gtype, StartingNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("starting")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StartingNativeDelegate (IntPtr inst); + + static void Starting_cb (IntPtr inst) + { + try { + Discoverer __obj = GLib.Object.GetObject (inst, false) as Discoverer; + __obj.OnStarting (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.Discoverer), ConnectionMethod="OverrideStarting")] + protected virtual void OnStarting () + { + InternalStarting (); + } + + private void InternalStarting () + { + StartingNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("starting")); + unmanaged = (StartingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartingNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static DiscoveredNativeDelegate Discovered_cb_delegate; + static DiscoveredNativeDelegate DiscoveredVMCallback { + get { + if (Discovered_cb_delegate == null) + Discovered_cb_delegate = new DiscoveredNativeDelegate (Discovered_cb); + return Discovered_cb_delegate; + } + } + + static void OverrideDiscovered (GLib.GType gtype) + { + OverrideDiscovered (gtype, DiscoveredVMCallback); + } + + static void OverrideDiscovered (GLib.GType gtype, DiscoveredNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("discovered")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DiscoveredNativeDelegate (IntPtr inst, IntPtr info, IntPtr error); + + static void Discovered_cb (IntPtr inst, IntPtr info, IntPtr error) + { + try { + Discoverer __obj = GLib.Object.GetObject (inst, false) as Discoverer; + __obj.OnDiscovered (GLib.Object.GetObject(info) as Gst.PbUtils.DiscovererInfo, error); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.Discoverer), ConnectionMethod="OverrideDiscovered")] + protected virtual void OnDiscovered (Gst.PbUtils.DiscovererInfo info, IntPtr error) + { + InternalDiscovered (info, error); + } + + private void InternalDiscovered (Gst.PbUtils.DiscovererInfo info, IntPtr error) + { + DiscoveredNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("discovered")); + unmanaged = (DiscoveredNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DiscoveredNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle, error); + } + + static SourceSetupNativeDelegate SourceSetup_cb_delegate; + static SourceSetupNativeDelegate SourceSetupVMCallback { + get { + if (SourceSetup_cb_delegate == null) + SourceSetup_cb_delegate = new SourceSetupNativeDelegate (SourceSetup_cb); + return SourceSetup_cb_delegate; + } + } + + static void OverrideSourceSetup (GLib.GType gtype) + { + OverrideSourceSetup (gtype, SourceSetupVMCallback); + } + + static void OverrideSourceSetup (GLib.GType gtype, SourceSetupNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("source_setup")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SourceSetupNativeDelegate (IntPtr inst, IntPtr source); + + static void SourceSetup_cb (IntPtr inst, IntPtr source) + { + try { + Discoverer __obj = GLib.Object.GetObject (inst, false) as Discoverer; + __obj.OnSourceSetup (GLib.Object.GetObject(source) as Gst.Element); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PbUtils.Discoverer), ConnectionMethod="OverrideSourceSetup")] + protected virtual void OnSourceSetup (Gst.Element source) + { + InternalSourceSetup (source); + } + + private void InternalSourceSetup (Gst.Element source) + { + SourceSetupNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("source_setup")); + unmanaged = (SourceSetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SourceSetupNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, source == null ? IntPtr.Zero : source.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("finished" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finished + , null + , "starting" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("starting" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // starting + , "finished" + , "discovered" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("discovered" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // discovered + , "starting" + , "source_setup" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("source_setup" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // source_setup + , "discovered" + , "_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _reserved + , "source_setup" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_discoverer_discover_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public unsafe Gst.PbUtils.DiscovererInfo DiscoverUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_discoverer_discover_uri(Handle, native_uri, out error); + Gst.PbUtils.DiscovererInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererInfo; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_discoverer_discover_uri_async(IntPtr raw, IntPtr uri); + + public bool DiscoverUriAsync(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + bool raw_ret = gst_discoverer_discover_uri_async(Handle, native_uri); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_discoverer_start(IntPtr raw); + + public void Start() { + gst_discoverer_start(Handle); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_discoverer_stop(IntPtr raw); + + public void Stop() { + gst_discoverer_stop(Handle); + } + + + static Discoverer () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererAudioInfo.cs b/sources/generated/Gst.PbUtils/DiscovererAudioInfo.cs new file mode 100644 index 0000000000..311dc0a3dc --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererAudioInfo.cs @@ -0,0 +1,116 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererAudioInfo : Gst.PbUtils.DiscovererStreamInfo { + + public DiscovererAudioInfo (IntPtr raw) : base(raw) {} + + protected DiscovererAudioInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_audio_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_audio_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_audio_info_get_bitrate(IntPtr raw); + + public uint Bitrate { + get { + uint raw_ret = gst_discoverer_audio_info_get_bitrate(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_discoverer_audio_info_get_channel_mask(IntPtr raw); + + public ulong ChannelMask { + get { + ulong raw_ret = gst_discoverer_audio_info_get_channel_mask(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_audio_info_get_channels(IntPtr raw); + + public uint Channels { + get { + uint raw_ret = gst_discoverer_audio_info_get_channels(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_audio_info_get_depth(IntPtr raw); + + public uint Depth { + get { + uint raw_ret = gst_discoverer_audio_info_get_depth(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_audio_info_get_language(IntPtr raw); + + public string Language { + get { + IntPtr raw_ret = gst_discoverer_audio_info_get_language(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_audio_info_get_max_bitrate(IntPtr raw); + + public uint MaxBitrate { + get { + uint raw_ret = gst_discoverer_audio_info_get_max_bitrate(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_audio_info_get_sample_rate(IntPtr raw); + + public uint SampleRate { + get { + uint raw_ret = gst_discoverer_audio_info_get_sample_rate(Handle); + uint ret = raw_ret; + return ret; + } + } + + + static DiscovererAudioInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererContainerInfo.cs b/sources/generated/Gst.PbUtils/DiscovererContainerInfo.cs new file mode 100644 index 0000000000..6bb19470cd --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererContainerInfo.cs @@ -0,0 +1,50 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererContainerInfo : Gst.PbUtils.DiscovererStreamInfo { + + public DiscovererContainerInfo (IntPtr raw) : base(raw) {} + + protected DiscovererContainerInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_container_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_container_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_container_info_get_streams(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] Streams { + get { + IntPtr raw_ret = gst_discoverer_container_info_get_streams(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + + static DiscovererContainerInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererInfo.cs b/sources/generated/Gst.PbUtils/DiscovererInfo.cs new file mode 100644 index 0000000000..35e0af16b4 --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererInfo.cs @@ -0,0 +1,241 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererInfo : GLib.Object { + + public DiscovererInfo (IntPtr raw) : base(raw) {} + + protected DiscovererInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_from_variant(IntPtr variant); + + public static Gst.PbUtils.DiscovererInfo FromVariant(GLib.Variant variant) { + IntPtr raw_ret = gst_discoverer_info_from_variant(variant == null ? IntPtr.Zero : variant.Handle); + Gst.PbUtils.DiscovererInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererInfo; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_copy(IntPtr raw); + + public Gst.PbUtils.DiscovererInfo Copy() { + IntPtr raw_ret = gst_discoverer_info_copy(Handle); + Gst.PbUtils.DiscovererInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererInfo; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_audio_streams(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] AudioStreams { + get { + IntPtr raw_ret = gst_discoverer_info_get_audio_streams(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_container_streams(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] ContainerStreams { + get { + IntPtr raw_ret = gst_discoverer_info_get_container_streams(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_discoverer_info_get_duration(IntPtr raw); + + public ulong Duration { + get { + ulong raw_ret = gst_discoverer_info_get_duration(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_discoverer_info_get_live(IntPtr raw); + + public bool Live { + get { + bool raw_ret = gst_discoverer_info_get_live(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_misc(IntPtr raw); + + [Obsolete] + public Gst.Structure Misc { + get { + IntPtr raw_ret = gst_discoverer_info_get_misc(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_missing_elements_installer_details(IntPtr raw); + + public string[] MissingElementsInstallerDetails { + get { + IntPtr raw_ret = gst_discoverer_info_get_missing_elements_installer_details(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_discoverer_info_get_result(IntPtr raw); + + public Gst.PbUtils.DiscovererResult Result { + get { + int raw_ret = gst_discoverer_info_get_result(Handle); + Gst.PbUtils.DiscovererResult ret = (Gst.PbUtils.DiscovererResult) raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_discoverer_info_get_seekable(IntPtr raw); + + public bool Seekable { + get { + bool raw_ret = gst_discoverer_info_get_seekable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_stream_info(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo StreamInfo { + get { + IntPtr raw_ret = gst_discoverer_info_get_stream_info(Handle); + Gst.PbUtils.DiscovererStreamInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererStreamInfo; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_stream_list(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] StreamList { + get { + IntPtr raw_ret = gst_discoverer_info_get_stream_list(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_streams(IntPtr raw, IntPtr streamtype); + + public Gst.PbUtils.DiscovererStreamInfo[] GetStreams(GLib.GType streamtype) { + IntPtr raw_ret = gst_discoverer_info_get_streams(Handle, streamtype.Val); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_subtitle_streams(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] SubtitleStreams { + get { + IntPtr raw_ret = gst_discoverer_info_get_subtitle_streams(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_tags(IntPtr raw); + + public Gst.TagList Tags { + get { + IntPtr raw_ret = gst_discoverer_info_get_tags(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_toc(IntPtr raw); + + public Gst.Toc Toc { + get { + IntPtr raw_ret = gst_discoverer_info_get_toc(Handle); + Gst.Toc ret = Gst.Toc.New (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_discoverer_info_get_uri(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_get_video_streams(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo[] VideoStreams { + get { + IntPtr raw_ret = gst_discoverer_info_get_video_streams(Handle); + Gst.PbUtils.DiscovererStreamInfo[] ret = (Gst.PbUtils.DiscovererStreamInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.DiscovererStreamInfo)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_info_to_variant(IntPtr raw, int flags); + + public GLib.Variant ToVariant(Gst.PbUtils.DiscovererSerializeFlags flags) { + IntPtr raw_ret = gst_discoverer_info_to_variant(Handle, (int) flags); + GLib.Variant ret = new GLib.Variant(raw_ret); + return ret; + } + + + static DiscovererInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererResult.cs b/sources/generated/Gst.PbUtils/DiscovererResult.cs new file mode 100644 index 0000000000..a79a242db0 --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererResult.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PbUtils.DiscovererResultGType))] + public enum DiscovererResult { + + Ok = 0, + UriInvalid = 1, + Error = 2, + Timeout = 3, + Busy = 4, + MissingPlugins = 5, + } + + internal class DiscovererResultGType { + [DllImport ("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_discoverer_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/DiscovererSerializeFlags.cs b/sources/generated/Gst.PbUtils/DiscovererSerializeFlags.cs new file mode 100644 index 0000000000..2b603d6b5a --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererSerializeFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PbUtils.DiscovererSerializeFlagsGType))] + public enum DiscovererSerializeFlags : uint { + + Basic = 0, + Caps = 1, + Tags = 2, + Misc = 4, + All = 7, + } + + internal class DiscovererSerializeFlagsGType { + [DllImport ("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_serialize_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_discoverer_serialize_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/DiscovererStreamInfo.cs b/sources/generated/Gst.PbUtils/DiscovererStreamInfo.cs new file mode 100644 index 0000000000..332975e840 --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererStreamInfo.cs @@ -0,0 +1,135 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererStreamInfo : GLib.Object { + + public DiscovererStreamInfo (IntPtr raw) : base(raw) {} + + protected DiscovererStreamInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_discoverer_stream_info_list_free(IntPtr infos); + + public static void ListFree(GLib.List infos) { + gst_discoverer_stream_info_list_free(infos == null ? IntPtr.Zero : infos.Handle); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_caps(IntPtr raw); + + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_misc(IntPtr raw); + + [Obsolete] + public Gst.Structure Misc { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_misc(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_next(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo Next { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_next(Handle); + Gst.PbUtils.DiscovererStreamInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererStreamInfo; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_previous(IntPtr raw); + + public Gst.PbUtils.DiscovererStreamInfo Previous { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_previous(Handle); + Gst.PbUtils.DiscovererStreamInfo ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.DiscovererStreamInfo; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_stream_id(IntPtr raw); + + public string StreamId { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_stream_id(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_stream_type_nick(IntPtr raw); + + public string StreamTypeNick { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_stream_type_nick(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_tags(IntPtr raw); + + public Gst.TagList Tags { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_tags(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_stream_info_get_toc(IntPtr raw); + + public Gst.Toc Toc { + get { + IntPtr raw_ret = gst_discoverer_stream_info_get_toc(Handle); + Gst.Toc ret = Gst.Toc.New (raw_ret); + return ret; + } + } + + + static DiscovererStreamInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererSubtitleInfo.cs b/sources/generated/Gst.PbUtils/DiscovererSubtitleInfo.cs new file mode 100644 index 0000000000..88d105887b --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererSubtitleInfo.cs @@ -0,0 +1,50 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererSubtitleInfo : Gst.PbUtils.DiscovererStreamInfo { + + public DiscovererSubtitleInfo (IntPtr raw) : base(raw) {} + + protected DiscovererSubtitleInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_subtitle_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_subtitle_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_subtitle_info_get_language(IntPtr raw); + + public string Language { + get { + IntPtr raw_ret = gst_discoverer_subtitle_info_get_language(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + + static DiscovererSubtitleInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/DiscovererVideoInfo.cs b/sources/generated/Gst.PbUtils/DiscovererVideoInfo.cs new file mode 100644 index 0000000000..8abdaff180 --- /dev/null +++ b/sources/generated/Gst.PbUtils/DiscovererVideoInfo.cs @@ -0,0 +1,160 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DiscovererVideoInfo : Gst.PbUtils.DiscovererStreamInfo { + + public DiscovererVideoInfo (IntPtr raw) : base(raw) {} + + protected DiscovererVideoInfo() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_discoverer_video_info_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_discoverer_video_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_bitrate(IntPtr raw); + + public uint Bitrate { + get { + uint raw_ret = gst_discoverer_video_info_get_bitrate(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_depth(IntPtr raw); + + public uint Depth { + get { + uint raw_ret = gst_discoverer_video_info_get_depth(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_framerate_denom(IntPtr raw); + + public uint FramerateDenom { + get { + uint raw_ret = gst_discoverer_video_info_get_framerate_denom(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_framerate_num(IntPtr raw); + + public uint FramerateNum { + get { + uint raw_ret = gst_discoverer_video_info_get_framerate_num(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_height(IntPtr raw); + + public uint Height { + get { + uint raw_ret = gst_discoverer_video_info_get_height(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_max_bitrate(IntPtr raw); + + public uint MaxBitrate { + get { + uint raw_ret = gst_discoverer_video_info_get_max_bitrate(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_par_denom(IntPtr raw); + + public uint ParDenom { + get { + uint raw_ret = gst_discoverer_video_info_get_par_denom(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_par_num(IntPtr raw); + + public uint ParNum { + get { + uint raw_ret = gst_discoverer_video_info_get_par_num(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_discoverer_video_info_get_width(IntPtr raw); + + public uint Width { + get { + uint raw_ret = gst_discoverer_video_info_get_width(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_discoverer_video_info_is_image(IntPtr raw); + + public bool IsImage { + get { + bool raw_ret = gst_discoverer_video_info_is_image(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_discoverer_video_info_is_interlaced(IntPtr raw); + + public bool IsInterlaced { + get { + bool raw_ret = gst_discoverer_video_info_is_interlaced(Handle); + bool ret = raw_ret; + return ret; + } + } + + + static DiscovererVideoInfo () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/EncodingAudioProfile.cs b/sources/generated/Gst.PbUtils/EncodingAudioProfile.cs new file mode 100644 index 0000000000..f383ee7381 --- /dev/null +++ b/sources/generated/Gst.PbUtils/EncodingAudioProfile.cs @@ -0,0 +1,80 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EncodingAudioProfile : Gst.PbUtils.EncodingProfile { + + public EncodingAudioProfile (IntPtr raw) : base(raw) {} + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_audio_profile_new(IntPtr format, IntPtr preset, IntPtr restriction, uint presence); + + public EncodingAudioProfile (Gst.Caps format, string preset, Gst.Caps restriction, uint presence) : base (IntPtr.Zero) + { + if (GetType () != typeof (EncodingAudioProfile)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_preset = GLib.Marshaller.StringToPtrGStrdup (preset); + Raw = gst_encoding_audio_profile_new(format == null ? IntPtr.Zero : format.Handle, native_preset, restriction == null ? IntPtr.Zero : restriction.Handle, presence); + GLib.Marshaller.Free (native_preset); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_audio_profile_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_encoding_audio_profile_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static EncodingAudioProfile () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/EncodingContainerProfile.cs b/sources/generated/Gst.PbUtils/EncodingContainerProfile.cs new file mode 100644 index 0000000000..70f3ae478e --- /dev/null +++ b/sources/generated/Gst.PbUtils/EncodingContainerProfile.cs @@ -0,0 +1,113 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EncodingContainerProfile : Gst.PbUtils.EncodingProfile { + + public EncodingContainerProfile (IntPtr raw) : base(raw) {} + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_container_profile_new(IntPtr name, IntPtr description, IntPtr format, IntPtr preset); + + public EncodingContainerProfile (string name, string description, Gst.Caps format, string preset) : base (IntPtr.Zero) + { + if (GetType () != typeof (EncodingContainerProfile)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + IntPtr native_preset = GLib.Marshaller.StringToPtrGStrdup (preset); + Raw = gst_encoding_container_profile_new(native_name, native_description, format == null ? IntPtr.Zero : format.Handle, native_preset); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_preset); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_container_profile_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_encoding_container_profile_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_container_profile_add_profile(IntPtr raw, IntPtr profile); + + public bool AddProfile(Gst.PbUtils.EncodingProfile profile) { + bool raw_ret = gst_encoding_container_profile_add_profile(Handle, profile == null ? IntPtr.Zero : profile.OwnedHandle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_container_profile_contains_profile(IntPtr raw, IntPtr profile); + + public bool ContainsProfile(Gst.PbUtils.EncodingProfile profile) { + bool raw_ret = gst_encoding_container_profile_contains_profile(Handle, profile == null ? IntPtr.Zero : profile.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_container_profile_get_profiles(IntPtr raw); + + public Gst.PbUtils.EncodingProfile[] Profiles { + get { + IntPtr raw_ret = gst_encoding_container_profile_get_profiles(Handle); + Gst.PbUtils.EncodingProfile[] ret = (Gst.PbUtils.EncodingProfile[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PbUtils.EncodingProfile)); + return ret; + } + } + + + static EncodingContainerProfile () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/EncodingProfile.cs b/sources/generated/Gst.PbUtils/EncodingProfile.cs new file mode 100644 index 0000000000..f77ed36ec7 --- /dev/null +++ b/sources/generated/Gst.PbUtils/EncodingProfile.cs @@ -0,0 +1,345 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EncodingProfile : GLib.Object { + + public EncodingProfile (IntPtr raw) : base(raw) {} + + protected EncodingProfile() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("restriction-caps")] + public Gst.Caps RestrictionCaps { + get { + GLib.Value val = GetProperty ("restriction-caps"); + Gst.Caps ret = (Gst.Caps) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value, "GstCaps*"); + SetProperty("restriction-caps", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_encoding_profile_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_find(IntPtr targetname, IntPtr profilename, IntPtr category); + + public static Gst.PbUtils.EncodingProfile Find(string targetname, string profilename, string category) { + IntPtr native_targetname = GLib.Marshaller.StringToPtrGStrdup (targetname); + IntPtr native_profilename = GLib.Marshaller.StringToPtrGStrdup (profilename); + IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category); + IntPtr raw_ret = gst_encoding_profile_find(native_targetname, native_profilename, native_category); + Gst.PbUtils.EncodingProfile ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingProfile; + GLib.Marshaller.Free (native_targetname); + GLib.Marshaller.Free (native_profilename); + GLib.Marshaller.Free (native_category); + return ret; + } + + public static Gst.PbUtils.EncodingProfile Find(string targetname) { + return Find (targetname, null, null); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_from_discoverer(IntPtr info); + + public static Gst.PbUtils.EncodingProfile FromDiscoverer(Gst.PbUtils.DiscovererInfo info) { + IntPtr raw_ret = gst_encoding_profile_from_discoverer(info == null ? IntPtr.Zero : info.Handle); + Gst.PbUtils.EncodingProfile ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingProfile; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_copy(IntPtr raw); + + public Gst.PbUtils.EncodingProfile Copy() { + IntPtr raw_ret = gst_encoding_profile_copy(Handle); + Gst.PbUtils.EncodingProfile ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingProfile; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_profile_get_allow_dynamic_output(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_allow_dynamic_output(IntPtr raw, bool allow_dynamic_output); + + public bool AllowDynamicOutput { + get { + bool raw_ret = gst_encoding_profile_get_allow_dynamic_output(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_encoding_profile_set_allow_dynamic_output(Handle, value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_description(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_description(IntPtr raw, IntPtr description); + + public string Description { + get { + IntPtr raw_ret = gst_encoding_profile_get_description(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_encoding_profile_set_description(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_file_extension(IntPtr raw); + + public string FileExtension { + get { + IntPtr raw_ret = gst_encoding_profile_get_file_extension(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_format(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_format(IntPtr raw, IntPtr format); + + public Gst.Caps Format { + get { + IntPtr raw_ret = gst_encoding_profile_get_format(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + gst_encoding_profile_set_format(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_input_caps(IntPtr raw); + + public Gst.Caps InputCaps { + get { + IntPtr raw_ret = gst_encoding_profile_get_input_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_name(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_name(IntPtr raw, IntPtr name); + + public string Name { + get { + IntPtr raw_ret = gst_encoding_profile_get_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_encoding_profile_set_name(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_encoding_profile_get_presence(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_presence(IntPtr raw, uint presence); + + public uint Presence { + get { + uint raw_ret = gst_encoding_profile_get_presence(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_encoding_profile_set_presence(Handle, value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_preset(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_preset(IntPtr raw, IntPtr preset); + + public string Preset { + get { + IntPtr raw_ret = gst_encoding_profile_get_preset(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_encoding_profile_set_preset(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_preset_name(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_preset_name(IntPtr raw, IntPtr preset_name); + + public string PresetName { + get { + IntPtr raw_ret = gst_encoding_profile_get_preset_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_encoding_profile_set_preset_name(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_restriction(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_restriction(IntPtr raw, IntPtr restriction); + + public Gst.Caps Restriction { + get { + IntPtr raw_ret = gst_encoding_profile_get_restriction(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + value.Owned = false; + gst_encoding_profile_set_restriction(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_profile_get_single_segment(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_single_segment(IntPtr raw, bool single_segment); + + public bool SingleSegment { + get { + bool raw_ret = gst_encoding_profile_get_single_segment(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_encoding_profile_set_single_segment(Handle, value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_profile_get_type_nick(IntPtr raw); + + public string TypeNick { + get { + IntPtr raw_ret = gst_encoding_profile_get_type_nick(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_profile_is_enabled(IntPtr raw); + + public bool IsEnabled { + get { + bool raw_ret = gst_encoding_profile_is_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_profile_is_equal(IntPtr raw, IntPtr b); + + public bool IsEqual(Gst.PbUtils.EncodingProfile b) { + bool raw_ret = gst_encoding_profile_is_equal(Handle, b == null ? IntPtr.Zero : b.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_profile_set_enabled(IntPtr raw, bool enabled); + + public bool Enabled { + set { + gst_encoding_profile_set_enabled(Handle, value); + } + } + + + static EncodingProfile () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/EncodingTarget.cs b/sources/generated/Gst.PbUtils/EncodingTarget.cs new file mode 100644 index 0000000000..eee25a3d28 --- /dev/null +++ b/sources/generated/Gst.PbUtils/EncodingTarget.cs @@ -0,0 +1,185 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EncodingTarget : GLib.Object { + + public EncodingTarget (IntPtr raw) : base(raw) {} + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_new(IntPtr name, IntPtr category, IntPtr description, IntPtr profiles); + + public EncodingTarget (string name, string category, string description, GLib.List profiles) : base (IntPtr.Zero) + { + if (GetType () != typeof (EncodingTarget)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + Raw = gst_encoding_target_new(native_name, native_category, native_description, profiles == null ? IntPtr.Zero : profiles.Handle); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_category); + GLib.Marshaller.Free (native_description); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_encoding_target_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_encoding_target_load(IntPtr name, IntPtr category, out IntPtr error); + + public static unsafe Gst.PbUtils.EncodingTarget Load(string name, string category) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_encoding_target_load(native_name, native_category, out error); + Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_category); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static Gst.PbUtils.EncodingTarget Load(string name) { + return Load (name, null); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_encoding_target_load_from_file(IntPtr filepath, out IntPtr error); + + public static unsafe Gst.PbUtils.EncodingTarget LoadFromFile(string filepath) { + IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_encoding_target_load_from_file(native_filepath, out error); + Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget; + GLib.Marshaller.Free (native_filepath); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_target_add_profile(IntPtr raw, IntPtr profile); + + public bool AddProfile(Gst.PbUtils.EncodingProfile profile) { + bool raw_ret = gst_encoding_target_add_profile(Handle, profile == null ? IntPtr.Zero : profile.OwnedHandle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_category(IntPtr raw); + + public string Category { + get { + IntPtr raw_ret = gst_encoding_target_get_category(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_description(IntPtr raw); + + public string Description { + get { + IntPtr raw_ret = gst_encoding_target_get_description(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_name(IntPtr raw); + + public string Name { + get { + IntPtr raw_ret = gst_encoding_target_get_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_path(IntPtr raw); + + public string Path { + get { + IntPtr raw_ret = gst_encoding_target_get_path(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_profile(IntPtr raw, IntPtr name); + + public Gst.PbUtils.EncodingProfile GetProfile(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_encoding_target_get_profile(Handle, native_name); + Gst.PbUtils.EncodingProfile ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingProfile; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_target_get_profiles(IntPtr raw); + + public Gst.PbUtils.EncodingProfile[] Profiles { + get { + IntPtr raw_ret = gst_encoding_target_get_profiles(Handle); + Gst.PbUtils.EncodingProfile[] ret = (Gst.PbUtils.EncodingProfile[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PbUtils.EncodingProfile)); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool gst_encoding_target_save(IntPtr raw, out IntPtr error); + + public unsafe bool Save() { + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_encoding_target_save(Handle, out error); + bool ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe bool gst_encoding_target_save_to_file(IntPtr raw, IntPtr filepath, out IntPtr error); + + public unsafe bool SaveToFile(string filepath) { + IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_encoding_target_save_to_file(Handle, native_filepath, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_filepath); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + static EncodingTarget () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/EncodingVideoProfile.cs b/sources/generated/Gst.PbUtils/EncodingVideoProfile.cs new file mode 100644 index 0000000000..471b7b91de --- /dev/null +++ b/sources/generated/Gst.PbUtils/EncodingVideoProfile.cs @@ -0,0 +1,114 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class EncodingVideoProfile : Gst.PbUtils.EncodingProfile { + + public EncodingVideoProfile (IntPtr raw) : base(raw) {} + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_video_profile_new(IntPtr format, IntPtr preset, IntPtr restriction, uint presence); + + public EncodingVideoProfile (Gst.Caps format, string preset, Gst.Caps restriction, uint presence) : base (IntPtr.Zero) + { + if (GetType () != typeof (EncodingVideoProfile)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_preset = GLib.Marshaller.StringToPtrGStrdup (preset); + Raw = gst_encoding_video_profile_new(format == null ? IntPtr.Zero : format.Handle, native_preset, restriction == null ? IntPtr.Zero : restriction.Handle, presence); + GLib.Marshaller.Free (native_preset); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_video_profile_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_encoding_video_profile_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_encoding_video_profile_get_pass(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_video_profile_set_pass(IntPtr raw, uint pass); + + public uint Pass { + get { + uint raw_ret = gst_encoding_video_profile_get_pass(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_encoding_video_profile_set_pass(Handle, value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_encoding_video_profile_get_variableframerate(IntPtr raw); + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_encoding_video_profile_set_variableframerate(IntPtr raw, bool variableframerate); + + public bool Variableframerate { + get { + bool raw_ret = gst_encoding_video_profile_get_variableframerate(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_encoding_video_profile_set_variableframerate(Handle, value); + } + } + + + static EncodingVideoProfile () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PbUtils.EncodingProfile.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/Global.cs b/sources/generated/Gst.PbUtils/Global.cs new file mode 100644 index 0000000000..cd77b77e63 --- /dev/null +++ b/sources/generated/Gst.PbUtils/Global.cs @@ -0,0 +1,508 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_codec_utils_aac_caps_set_level_and_profile(IntPtr caps, byte[] audio_config, uint len); + + public static bool CodecUtilsAacCapsSetLevelAndProfile(Gst.Caps caps, byte[] audio_config, uint len) { + bool raw_ret = gst_codec_utils_aac_caps_set_level_and_profile(caps == null ? IntPtr.Zero : caps.Handle, audio_config, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_codec_utils_aac_get_channels(byte[] audio_config, uint len); + + public static uint CodecUtilsAacGetChannels(byte[] audio_config, uint len) { + uint raw_ret = gst_codec_utils_aac_get_channels(audio_config, len); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_codec_utils_aac_get_index_from_sample_rate(uint rate); + + public static int CodecUtilsAacGetIndexFromSampleRate(uint rate) { + int raw_ret = gst_codec_utils_aac_get_index_from_sample_rate(rate); + int ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_aac_get_level(byte[] audio_config, uint len); + + public static string CodecUtilsAacGetLevel(byte[] audio_config, uint len) { + IntPtr raw_ret = gst_codec_utils_aac_get_level(audio_config, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_aac_get_profile(byte[] audio_config, uint len); + + public static string CodecUtilsAacGetProfile(byte[] audio_config, uint len) { + IntPtr raw_ret = gst_codec_utils_aac_get_profile(audio_config, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_codec_utils_aac_get_sample_rate(byte[] audio_config, uint len); + + public static uint CodecUtilsAacGetSampleRate(byte[] audio_config, uint len) { + uint raw_ret = gst_codec_utils_aac_get_sample_rate(audio_config, len); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_codec_utils_aac_get_sample_rate_from_index(uint sr_idx); + + public static uint CodecUtilsAacGetSampleRateFromIndex(uint sr_idx) { + uint raw_ret = gst_codec_utils_aac_get_sample_rate_from_index(sr_idx); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_codec_utils_h264_caps_set_level_and_profile(IntPtr caps, byte[] sps, uint len); + + public static bool CodecUtilsH264CapsSetLevelAndProfile(Gst.Caps caps, byte[] sps, uint len) { + bool raw_ret = gst_codec_utils_h264_caps_set_level_and_profile(caps == null ? IntPtr.Zero : caps.Handle, sps, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_h264_get_level(byte[] sps, uint len); + + public static string CodecUtilsH264GetLevel(byte[] sps, uint len) { + IntPtr raw_ret = gst_codec_utils_h264_get_level(sps, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_codec_utils_h264_get_level_idc(IntPtr level); + + public static byte CodecUtilsH264GetLevelIdc(string level) { + IntPtr native_level = GLib.Marshaller.StringToPtrGStrdup (level); + byte raw_ret = gst_codec_utils_h264_get_level_idc(native_level); + byte ret = raw_ret; + GLib.Marshaller.Free (native_level); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_h264_get_profile(byte[] sps, uint len); + + public static string CodecUtilsH264GetProfile(byte[] sps, uint len) { + IntPtr raw_ret = gst_codec_utils_h264_get_profile(sps, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_codec_utils_h265_caps_set_level_tier_and_profile(IntPtr caps, byte[] profile_tier_level, uint len); + + public static bool CodecUtilsH265CapsSetLevelTierAndProfile(Gst.Caps caps, byte[] profile_tier_level, uint len) { + bool raw_ret = gst_codec_utils_h265_caps_set_level_tier_and_profile(caps == null ? IntPtr.Zero : caps.Handle, profile_tier_level, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_h265_get_level(byte[] profile_tier_level, uint len); + + public static string CodecUtilsH265GetLevel(byte[] profile_tier_level, uint len) { + IntPtr raw_ret = gst_codec_utils_h265_get_level(profile_tier_level, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_codec_utils_h265_get_level_idc(IntPtr level); + + public static byte CodecUtilsH265GetLevelIdc(string level) { + IntPtr native_level = GLib.Marshaller.StringToPtrGStrdup (level); + byte raw_ret = gst_codec_utils_h265_get_level_idc(native_level); + byte ret = raw_ret; + GLib.Marshaller.Free (native_level); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_h265_get_profile(byte[] profile_tier_level, uint len); + + public static string CodecUtilsH265GetProfile(byte[] profile_tier_level, uint len) { + IntPtr raw_ret = gst_codec_utils_h265_get_profile(profile_tier_level, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_h265_get_tier(byte[] profile_tier_level, uint len); + + public static string CodecUtilsH265GetTier(byte[] profile_tier_level, uint len) { + IntPtr raw_ret = gst_codec_utils_h265_get_tier(profile_tier_level, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_codec_utils_mpeg4video_caps_set_level_and_profile(IntPtr caps, byte[] vis_obj_seq, uint len); + + public static bool CodecUtilsMpeg4videoCapsSetLevelAndProfile(Gst.Caps caps, byte[] vis_obj_seq, uint len) { + bool raw_ret = gst_codec_utils_mpeg4video_caps_set_level_and_profile(caps == null ? IntPtr.Zero : caps.Handle, vis_obj_seq, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_mpeg4video_get_level(byte[] vis_obj_seq, uint len); + + public static string CodecUtilsMpeg4videoGetLevel(byte[] vis_obj_seq, uint len) { + IntPtr raw_ret = gst_codec_utils_mpeg4video_get_level(vis_obj_seq, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_mpeg4video_get_profile(byte[] vis_obj_seq, uint len); + + public static string CodecUtilsMpeg4videoGetProfile(byte[] vis_obj_seq, uint len) { + IntPtr raw_ret = gst_codec_utils_mpeg4video_get_profile(vis_obj_seq, len); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_opus_create_caps(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count, byte[] channel_mapping); + + public static Gst.Caps CodecUtilsOpusCreateCaps(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count, byte[] channel_mapping) { + IntPtr raw_ret = gst_codec_utils_opus_create_caps(rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public static Gst.Caps CodecUtilsOpusCreateCaps(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count) { + return CodecUtilsOpusCreateCaps (rate, channels, channel_mapping_family, stream_count, coupled_count, null); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_opus_create_caps_from_header(IntPtr header, IntPtr comments); + + public static Gst.Caps CodecUtilsOpusCreateCapsFromHeader(Gst.Buffer header, Gst.Buffer comments) { + IntPtr raw_ret = gst_codec_utils_opus_create_caps_from_header(header == null ? IntPtr.Zero : header.Handle, comments == null ? IntPtr.Zero : comments.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public static Gst.Caps CodecUtilsOpusCreateCapsFromHeader(Gst.Buffer header) { + return CodecUtilsOpusCreateCapsFromHeader (header, null); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_codec_utils_opus_create_header(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count, byte[] channel_mapping, ushort pre_skip, short output_gain); + + public static Gst.Buffer CodecUtilsOpusCreateHeader(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count, byte[] channel_mapping, ushort pre_skip, short output_gain) { + IntPtr raw_ret = gst_codec_utils_opus_create_header(rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping, pre_skip, output_gain); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + public static Gst.Buffer CodecUtilsOpusCreateHeader(uint rate, byte channels, byte channel_mapping_family, byte stream_count, byte coupled_count, ushort pre_skip, short output_gain) { + return CodecUtilsOpusCreateHeader (rate, channels, channel_mapping_family, stream_count, coupled_count, null, pre_skip, output_gain); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_list_all_targets(IntPtr categoryname); + + public static Gst.PbUtils.EncodingTarget[] EncodingListAllTargets(string categoryname) { + IntPtr native_categoryname = GLib.Marshaller.StringToPtrGStrdup (categoryname); + IntPtr raw_ret = gst_encoding_list_all_targets(native_categoryname); + Gst.PbUtils.EncodingTarget[] ret = (Gst.PbUtils.EncodingTarget[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PbUtils.EncodingTarget)); + GLib.Marshaller.Free (native_categoryname); + return ret; + } + + public static Gst.PbUtils.EncodingTarget[] EncodingListAllTargets() { + return EncodingListAllTargets (null); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_encoding_list_available_categories(); + + public static string[] EncodingListAvailableCategories() { + IntPtr raw_ret = gst_encoding_list_available_categories(); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(string)); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_install_plugins_installation_in_progress(); + + public static bool InstallPluginsInstallationInProgress() { + bool raw_ret = gst_install_plugins_installation_in_progress(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_install_plugins_return_get_name(int _ret); + + public static string InstallPluginsReturnGetName(Gst.PbUtils.InstallPluginsReturn _ret) { + IntPtr raw_ret = gst_install_plugins_return_get_name((int) _ret); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_install_plugins_supported(); + + public static bool InstallPluginsSupported() { + bool raw_ret = gst_install_plugins_supported(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_is_missing_plugin_message(IntPtr msg); + + public static bool IsMissingPluginMessage(Gst.Message msg) { + bool raw_ret = gst_is_missing_plugin_message(msg == null ? IntPtr.Zero : msg.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_decoder_installer_detail_new(IntPtr decode_caps); + + public static string MissingDecoderInstallerDetailNew(Gst.Caps decode_caps) { + IntPtr raw_ret = gst_missing_decoder_installer_detail_new(decode_caps == null ? IntPtr.Zero : decode_caps.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_decoder_message_new(IntPtr element, IntPtr decode_caps); + + public static Gst.Message MissingDecoderMessageNew(Gst.Element element, Gst.Caps decode_caps) { + IntPtr raw_ret = gst_missing_decoder_message_new(element == null ? IntPtr.Zero : element.Handle, decode_caps == null ? IntPtr.Zero : decode_caps.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_element_installer_detail_new(IntPtr factory_name); + + public static string MissingElementInstallerDetailNew(string factory_name) { + IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name); + IntPtr raw_ret = gst_missing_element_installer_detail_new(native_factory_name); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_factory_name); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_element_message_new(IntPtr element, IntPtr factory_name); + + public static Gst.Message MissingElementMessageNew(Gst.Element element, string factory_name) { + IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name); + IntPtr raw_ret = gst_missing_element_message_new(element == null ? IntPtr.Zero : element.Handle, native_factory_name); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + GLib.Marshaller.Free (native_factory_name); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_encoder_installer_detail_new(IntPtr encode_caps); + + public static string MissingEncoderInstallerDetailNew(Gst.Caps encode_caps) { + IntPtr raw_ret = gst_missing_encoder_installer_detail_new(encode_caps == null ? IntPtr.Zero : encode_caps.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_encoder_message_new(IntPtr element, IntPtr encode_caps); + + public static Gst.Message MissingEncoderMessageNew(Gst.Element element, Gst.Caps encode_caps) { + IntPtr raw_ret = gst_missing_encoder_message_new(element == null ? IntPtr.Zero : element.Handle, encode_caps == null ? IntPtr.Zero : encode_caps.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_plugin_message_get_description(IntPtr msg); + + public static string MissingPluginMessageGetDescription(Gst.Message msg) { + IntPtr raw_ret = gst_missing_plugin_message_get_description(msg == null ? IntPtr.Zero : msg.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_plugin_message_get_installer_detail(IntPtr msg); + + public static string MissingPluginMessageGetInstallerDetail(Gst.Message msg) { + IntPtr raw_ret = gst_missing_plugin_message_get_installer_detail(msg == null ? IntPtr.Zero : msg.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_uri_sink_installer_detail_new(IntPtr protocol); + + public static string MissingUriSinkInstallerDetailNew(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_missing_uri_sink_installer_detail_new(native_protocol); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_uri_sink_message_new(IntPtr element, IntPtr protocol); + + public static Gst.Message MissingUriSinkMessageNew(Gst.Element element, string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_missing_uri_sink_message_new(element == null ? IntPtr.Zero : element.Handle, native_protocol); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_uri_source_installer_detail_new(IntPtr protocol); + + public static string MissingUriSourceInstallerDetailNew(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_missing_uri_source_installer_detail_new(native_protocol); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_missing_uri_source_message_new(IntPtr element, IntPtr protocol); + + public static Gst.Message MissingUriSourceMessageNew(Gst.Element element, string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_missing_uri_source_message_new(element == null ? IntPtr.Zero : element.Handle, native_protocol); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pb_utils_add_codec_description_to_tag_list(IntPtr taglist, IntPtr codec_tag, IntPtr caps); + + public static bool PbUtilsAddCodecDescriptionToTagList(Gst.TagList taglist, string codec_tag, Gst.Caps caps) { + IntPtr native_codec_tag = GLib.Marshaller.StringToPtrGStrdup (codec_tag); + bool raw_ret = gst_pb_utils_add_codec_description_to_tag_list(taglist == null ? IntPtr.Zero : taglist.Handle, native_codec_tag, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_codec_tag); + return ret; + } + + public static bool PbUtilsAddCodecDescriptionToTagList(Gst.TagList taglist, Gst.Caps caps) { + return PbUtilsAddCodecDescriptionToTagList (taglist, null, caps); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_codec_description(IntPtr caps); + + public static string PbUtilsGetCodecDescription(Gst.Caps caps) { + IntPtr raw_ret = gst_pb_utils_get_codec_description(caps == null ? IntPtr.Zero : caps.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_decoder_description(IntPtr caps); + + public static string PbUtilsGetDecoderDescription(Gst.Caps caps) { + IntPtr raw_ret = gst_pb_utils_get_decoder_description(caps == null ? IntPtr.Zero : caps.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_element_description(IntPtr factory_name); + + public static string PbUtilsGetElementDescription(string factory_name) { + IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name); + IntPtr raw_ret = gst_pb_utils_get_element_description(native_factory_name); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_factory_name); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_encoder_description(IntPtr caps); + + public static string PbUtilsGetEncoderDescription(Gst.Caps caps) { + IntPtr raw_ret = gst_pb_utils_get_encoder_description(caps == null ? IntPtr.Zero : caps.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_sink_description(IntPtr protocol); + + public static string PbUtilsGetSinkDescription(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_pb_utils_get_sink_description(native_protocol); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pb_utils_get_source_description(IntPtr protocol); + + public static string PbUtilsGetSourceDescription(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr raw_ret = gst_pb_utils_get_source_description(native_protocol); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pb_utils_init(); + + public static void PbUtilsInit() { + gst_pb_utils_init(); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugins_base_version(out uint major, out uint minor, out uint micro, out uint nano); + + public static void PluginsBaseVersion(out uint major, out uint minor, out uint micro, out uint nano) { + gst_plugins_base_version(out major, out minor, out micro, out nano); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugins_base_version_string(); + + public static string PluginsBaseVersionString() { + IntPtr raw_ret = gst_plugins_base_version_string(); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.AudioVisualizerShaderFuncNative.cs b/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.AudioVisualizerShaderFuncNative.cs new file mode 100644 index 0000000000..64d319ebd6 --- /dev/null +++ b/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.AudioVisualizerShaderFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtilsSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void AudioVisualizerShaderFuncNative(IntPtr scope, IntPtr s, IntPtr d); + + internal class AudioVisualizerShaderFuncInvoker { + + AudioVisualizerShaderFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~AudioVisualizerShaderFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal AudioVisualizerShaderFuncInvoker (AudioVisualizerShaderFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal AudioVisualizerShaderFuncInvoker (AudioVisualizerShaderFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal AudioVisualizerShaderFuncInvoker (AudioVisualizerShaderFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PbUtils.AudioVisualizerShaderFunc Handler { + get { + return new Gst.PbUtils.AudioVisualizerShaderFunc(InvokeNative); + } + } + + void InvokeNative (Gst.PbUtils.AudioVisualizer scope, Gst.Video.VideoFrame s, Gst.Video.VideoFrame d) + { + IntPtr native_s = GLib.Marshaller.StructureToPtrAlloc (s); + IntPtr native_d = GLib.Marshaller.StructureToPtrAlloc (d); + native_cb (scope == null ? IntPtr.Zero : scope.Handle, native_s, native_d); + Marshal.FreeHGlobal (native_s); + Marshal.FreeHGlobal (native_d); + } + } + + internal class AudioVisualizerShaderFuncWrapper { + + public void NativeCallback (IntPtr scope, IntPtr s, IntPtr d) + { + try { + managed (GLib.Object.GetObject(scope) as Gst.PbUtils.AudioVisualizer, Gst.Video.VideoFrame.New (s), Gst.Video.VideoFrame.New (d)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal AudioVisualizerShaderFuncNative NativeDelegate; + Gst.PbUtils.AudioVisualizerShaderFunc managed; + + public AudioVisualizerShaderFuncWrapper (Gst.PbUtils.AudioVisualizerShaderFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new AudioVisualizerShaderFuncNative (NativeCallback); + } + + public static Gst.PbUtils.AudioVisualizerShaderFunc GetManagedDelegate (AudioVisualizerShaderFuncNative native) + { + if (native == null) + return null; + AudioVisualizerShaderFuncWrapper wrapper = (AudioVisualizerShaderFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.InstallPluginsResultFuncNative.cs b/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.InstallPluginsResultFuncNative.cs new file mode 100644 index 0000000000..f46eaebe38 --- /dev/null +++ b/sources/generated/Gst.PbUtils/Gst.PbUtilsSharp.InstallPluginsResultFuncNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtilsSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void InstallPluginsResultFuncNative(int _result, IntPtr user_data); + + internal class InstallPluginsResultFuncInvoker { + + InstallPluginsResultFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~InstallPluginsResultFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal InstallPluginsResultFuncInvoker (InstallPluginsResultFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal InstallPluginsResultFuncInvoker (InstallPluginsResultFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal InstallPluginsResultFuncInvoker (InstallPluginsResultFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PbUtils.InstallPluginsResultFunc Handler { + get { + return new Gst.PbUtils.InstallPluginsResultFunc(InvokeNative); + } + } + + void InvokeNative (Gst.PbUtils.InstallPluginsReturn _result) + { + native_cb ((int) _result, __data); + } + } + + internal class InstallPluginsResultFuncWrapper { + + public void NativeCallback (int _result, IntPtr user_data) + { + try { + managed ((Gst.PbUtils.InstallPluginsReturn) _result); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal InstallPluginsResultFuncNative NativeDelegate; + Gst.PbUtils.InstallPluginsResultFunc managed; + + public InstallPluginsResultFuncWrapper (Gst.PbUtils.InstallPluginsResultFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new InstallPluginsResultFuncNative (NativeCallback); + } + + public static Gst.PbUtils.InstallPluginsResultFunc GetManagedDelegate (InstallPluginsResultFuncNative native) + { + if (native == null) + return null; + InstallPluginsResultFuncWrapper wrapper = (InstallPluginsResultFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/InstallPluginsContext.cs b/sources/generated/Gst.PbUtils/InstallPluginsContext.cs new file mode 100644 index 0000000000..5e767b098d --- /dev/null +++ b/sources/generated/Gst.PbUtils/InstallPluginsContext.cs @@ -0,0 +1,134 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct InstallPluginsContext : IEquatable { + + + public static Gst.PbUtils.InstallPluginsContext Zero = new Gst.PbUtils.InstallPluginsContext (); + + public static Gst.PbUtils.InstallPluginsContext New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.PbUtils.InstallPluginsContext.Zero; + return (Gst.PbUtils.InstallPluginsContext) Marshal.PtrToStructure (raw, typeof (Gst.PbUtils.InstallPluginsContext)); + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_install_plugins_context_new(); + + public static InstallPluginsContext New() + { + InstallPluginsContext result = InstallPluginsContext.New (gst_install_plugins_context_new()); + return result; + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_install_plugins_context_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_install_plugins_context_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_install_plugins_context_set_confirm_search(IntPtr raw, bool confirm_search); + + public bool ConfirmSearch { + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_install_plugins_context_set_confirm_search(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_install_plugins_context_set_desktop_id(IntPtr raw, IntPtr desktop_id); + + public string DesktopId { + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_install_plugins_context_set_desktop_id(this_as_native, native_value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_install_plugins_context_set_startup_notification_id(IntPtr raw, IntPtr startup_id); + + public string StartupNotificationId { + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_install_plugins_context_set_startup_notification_id(this_as_native, native_value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_install_plugins_context_set_xid(IntPtr raw, uint xid); + + public uint Xid { + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_install_plugins_context_set_xid(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + static void ReadNative (IntPtr native, ref Gst.PbUtils.InstallPluginsContext target) + { + target = New (native); + } + + public bool Equals (InstallPluginsContext other) + { + return true; + } + + public override bool Equals (object other) + { + return other is InstallPluginsContext && Equals ((InstallPluginsContext) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.PbUtils.InstallPluginsContext boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.PbUtils.InstallPluginsContext.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.PbUtils.InstallPluginsContext (GLib.Value val) + { + return (Gst.PbUtils.InstallPluginsContext) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.PbUtils/InstallPluginsResultFunc.cs b/sources/generated/Gst.PbUtils/InstallPluginsResultFunc.cs new file mode 100644 index 0000000000..1a798b7b33 --- /dev/null +++ b/sources/generated/Gst.PbUtils/InstallPluginsResultFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + + public delegate void InstallPluginsResultFunc(Gst.PbUtils.InstallPluginsReturn _result); + +} diff --git a/sources/generated/Gst.PbUtils/InstallPluginsReturn.cs b/sources/generated/Gst.PbUtils/InstallPluginsReturn.cs new file mode 100644 index 0000000000..9f30c943ff --- /dev/null +++ b/sources/generated/Gst.PbUtils/InstallPluginsReturn.cs @@ -0,0 +1,37 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PbUtils.InstallPluginsReturnGType))] + public enum InstallPluginsReturn { + + Success = 0, + NotFound = 1, + Error = 2, + PartialSuccess = 3, + UserAbort = 4, + Crashed = 100, + Invalid = 101, + StartedOk = 200, + InternalFailure = 201, + HelperMissing = 202, + InstallInProgress = 203, + } + + internal class InstallPluginsReturnGType { + [DllImport ("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_install_plugins_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_install_plugins_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.PbUtils/SourceSetupHandler.cs b/sources/generated/Gst.PbUtils/SourceSetupHandler.cs new file mode 100644 index 0000000000..26f666ad89 --- /dev/null +++ b/sources/generated/Gst.PbUtils/SourceSetupHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.PbUtils { + + using System; + + public delegate void SourceSetupHandler(object o, SourceSetupArgs args); + + public class SourceSetupArgs : GLib.SignalArgs { + public Gst.Element Source{ + get { + return (Gst.Element) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Rtp/Constants.cs b/sources/generated/Gst.Rtp/Constants.cs new file mode 100644 index 0000000000..10786eb387 --- /dev/null +++ b/sources/generated/Gst.Rtp/Constants.cs @@ -0,0 +1,66 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const int RTCP_MAX_BYE_SSRC_COUNT = 31; + public const int RTCP_MAX_RB_COUNT = 31; + public const int RTCP_MAX_SDES = 255; + public const int RTCP_MAX_SDES_ITEM_COUNT = 31; + public const int RTCP_REDUCED_SIZE_VALID_MASK = 57592; + public const int RTCP_VALID_MASK = 57598; + public const int RTCP_VALID_VALUE = 200; + public const int RTCP_VERSION = 2; + public const string RTP_HDREXT_BASE = @"urn:ietf:params:rtp-hdrext:"; + public const string RTP_HDREXT_NTP_56 = @"ntp-56"; + public const int RTP_HDREXT_NTP_56_SIZE = 7; + public const string RTP_HDREXT_NTP_64 = @"ntp-64"; + public const int RTP_HDREXT_NTP_64_SIZE = 8; + public const string RTP_PAYLOAD_1016_STRING = @"1"; + public const string RTP_PAYLOAD_CELLB_STRING = @"25"; + public const string RTP_PAYLOAD_CN_STRING = @"13"; + public const string RTP_PAYLOAD_DVI4_11025_STRING = @"16"; + public const string RTP_PAYLOAD_DVI4_16000_STRING = @"6"; + public const string RTP_PAYLOAD_DVI4_22050_STRING = @"17"; + public const string RTP_PAYLOAD_DVI4_8000_STRING = @"5"; + public const string RTP_PAYLOAD_DYNAMIC_STRING = @"[96, 127]"; + public const string RTP_PAYLOAD_G721_STRING = @"2"; + public const string RTP_PAYLOAD_G722_STRING = @"9"; + public const int RTP_PAYLOAD_G723_53 = 17; + public const string RTP_PAYLOAD_G723_53_STRING = @"17"; + public const int RTP_PAYLOAD_G723_63 = 16; + public const string RTP_PAYLOAD_G723_63_STRING = @"16"; + public const string RTP_PAYLOAD_G723_STRING = @"4"; + public const string RTP_PAYLOAD_G728_STRING = @"15"; + public const string RTP_PAYLOAD_G729_STRING = @"18"; + public const string RTP_PAYLOAD_GSM_STRING = @"3"; + public const string RTP_PAYLOAD_H261_STRING = @"31"; + public const string RTP_PAYLOAD_H263_STRING = @"34"; + public const string RTP_PAYLOAD_JPEG_STRING = @"26"; + public const string RTP_PAYLOAD_L16_MONO_STRING = @"11"; + public const string RTP_PAYLOAD_L16_STEREO_STRING = @"10"; + public const string RTP_PAYLOAD_LPC_STRING = @"7"; + public const string RTP_PAYLOAD_MP2T_STRING = @"33"; + public const string RTP_PAYLOAD_MPA_STRING = @"14"; + public const string RTP_PAYLOAD_MPV_STRING = @"32"; + public const string RTP_PAYLOAD_NV_STRING = @"28"; + public const string RTP_PAYLOAD_PCMA_STRING = @"8"; + public const string RTP_PAYLOAD_PCMU_STRING = @"0"; + public const string RTP_PAYLOAD_QCELP_STRING = @"12"; + public const int RTP_PAYLOAD_TS41 = 19; + public const string RTP_PAYLOAD_TS41_STRING = @"19"; + public const int RTP_PAYLOAD_TS48 = 18; + public const string RTP_PAYLOAD_TS48_STRING = @"18"; + public const int RTP_SOURCE_META_MAX_CSRC_COUNT = 15; + public const int RTP_VERSION = 2; +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/Global.cs b/sources/generated/Gst.Rtp/Global.cs new file mode 100644 index 0000000000..f1f1903c77 --- /dev/null +++ b/sources/generated/Gst.Rtp/Global.cs @@ -0,0 +1,335 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_rtp_source_meta(IntPtr buffer, uint ssrc, uint csrc, uint csrc_count); + + public static Gst.Rtp.RTPSourceMeta BufferAddRtpSourceMeta(Gst.Buffer buffer, uint ssrc, uint csrc, uint csrc_count) { + IntPtr raw_ret = gst_buffer_add_rtp_source_meta(buffer == null ? IntPtr.Zero : buffer.Handle, ssrc, csrc, csrc_count); + Gst.Rtp.RTPSourceMeta ret = Gst.Rtp.RTPSourceMeta.New (raw_ret); + return ret; + } + + public static Gst.Rtp.RTPSourceMeta BufferAddRtpSourceMeta(Gst.Buffer buffer, uint csrc_count) { + return BufferAddRtpSourceMeta (buffer, 0, 0, csrc_count); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_rtp_source_meta(IntPtr buffer); + + public static Gst.Rtp.RTPSourceMeta BufferGetRtpSourceMeta(Gst.Buffer buffer) { + IntPtr raw_ret = gst_buffer_get_rtp_source_meta(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Rtp.RTPSourceMeta ret = Gst.Rtp.RTPSourceMeta.New (raw_ret); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_map(IntPtr buffer, int flags, IntPtr rtcp); + + public static bool RtcpBufferMap(Gst.Buffer buffer, Gst.MapFlags flags, Gst.Rtp.RTCPBuffer rtcp) { + IntPtr native_rtcp = GLib.Marshaller.StructureToPtrAlloc (rtcp); + bool raw_ret = gst_rtcp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, native_rtcp); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_rtcp); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new(uint mtu); + + public static Gst.Buffer RtcpBufferNew(uint mtu) { + IntPtr raw_ret = gst_rtcp_buffer_new(mtu); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new_copy_data(byte[] data, uint n_length); + + public static Gst.Buffer RtcpBufferNewCopyData(byte[] data) { + IntPtr raw_ret = gst_rtcp_buffer_new_copy_data(data, (uint) (data == null ? 0 : data.Length)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new_take_data(byte[] data, uint n_length); + + public static Gst.Buffer RtcpBufferNewTakeData(byte[] data) { + IntPtr raw_ret = gst_rtcp_buffer_new_take_data(data, (uint) (data == null ? 0 : data.Length)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate(IntPtr buffer); + + public static bool RtcpBufferValidate(Gst.Buffer buffer) { + bool raw_ret = gst_rtcp_buffer_validate(buffer == null ? IntPtr.Zero : buffer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_data(byte[] data, uint len); + + public static bool RtcpBufferValidateData(byte[] data, uint len) { + bool raw_ret = gst_rtcp_buffer_validate_data(data, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_data_reduced(byte[] data, uint len); + + public static bool RtcpBufferValidateDataReduced(byte[] data, uint len) { + bool raw_ret = gst_rtcp_buffer_validate_data_reduced(data, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_reduced(IntPtr buffer); + + public static bool RtcpBufferValidateReduced(Gst.Buffer buffer) { + bool raw_ret = gst_rtcp_buffer_validate_reduced(buffer == null ? IntPtr.Zero : buffer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_rtcp_ntp_to_unix(ulong ntptime); + + public static ulong RtcpNtpToUnix(ulong ntptime) { + ulong raw_ret = gst_rtcp_ntp_to_unix(ntptime); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtcp_sdes_name_to_type(IntPtr name); + + public static Gst.Rtp.RTCPSDESType RtcpSdesNameToType(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + int raw_ret = gst_rtcp_sdes_name_to_type(native_name); + Gst.Rtp.RTCPSDESType ret = (Gst.Rtp.RTCPSDESType) raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_sdes_type_to_name(int type); + + public static string RtcpSdesTypeToName(Gst.Rtp.RTCPSDESType type) { + IntPtr raw_ret = gst_rtcp_sdes_type_to_name((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_rtcp_unix_to_ntp(ulong unixtime); + + public static ulong RtcpUnixToNtp(ulong unixtime) { + ulong raw_ret = gst_rtcp_unix_to_ntp(unixtime); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_allocate_data(IntPtr buffer, uint payload_len, byte pad_len, byte csrc_count); + + public static void RtpBufferAllocateData(Gst.Buffer buffer, uint payload_len, byte pad_len, byte csrc_count) { + gst_rtp_buffer_allocate_data(buffer == null ? IntPtr.Zero : buffer.Handle, payload_len, pad_len, csrc_count); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_header_len(byte csrc_count); + + public static uint RtpBufferCalcHeaderLen(byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_header_len(csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_packet_len(uint payload_len, byte pad_len, byte csrc_count); + + public static uint RtpBufferCalcPacketLen(uint payload_len, byte pad_len, byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_packet_len(payload_len, pad_len, csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_payload_len(uint packet_len, byte pad_len, byte csrc_count); + + public static uint RtpBufferCalcPayloadLen(uint packet_len, byte pad_len, byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_payload_len(packet_len, pad_len, csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_buffer_compare_seqnum(ushort seqnum1, ushort seqnum2); + + public static int RtpBufferCompareSeqnum(ushort seqnum1, ushort seqnum2) { + int raw_ret = gst_rtp_buffer_compare_seqnum(seqnum1, seqnum2); + int ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_default_clock_rate(byte payload_type); + + public static uint RtpBufferDefaultClockRate(byte payload_type) { + uint raw_ret = gst_rtp_buffer_default_clock_rate(payload_type); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_rtp_buffer_ext_timestamp(ref ulong exttimestamp, uint timestamp); + + public static ulong RtpBufferExtTimestamp(ref ulong exttimestamp, uint timestamp) { + ulong raw_ret = gst_rtp_buffer_ext_timestamp(ref exttimestamp, timestamp); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_map(IntPtr buffer, int flags, IntPtr rtp); + + public static bool RtpBufferMap(Gst.Buffer buffer, Gst.MapFlags flags, out Gst.Rtp.RTPBuffer rtp) { + IntPtr native_rtp = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtp.RTPBuffer))); + bool raw_ret = gst_rtp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, native_rtp); + bool ret = raw_ret; + rtp = Gst.Rtp.RTPBuffer.New (native_rtp); + Marshal.FreeHGlobal (native_rtp); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_allocate(uint payload_len, byte pad_len, byte csrc_count); + + public static Gst.Buffer RtpBufferNewAllocate(uint payload_len, byte pad_len, byte csrc_count) { + IntPtr raw_ret = gst_rtp_buffer_new_allocate(payload_len, pad_len, csrc_count); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_allocate_len(uint packet_len, byte pad_len, byte csrc_count); + + public static Gst.Buffer RtpBufferNewAllocateLen(uint packet_len, byte pad_len, byte csrc_count) { + IntPtr raw_ret = gst_rtp_buffer_new_allocate_len(packet_len, pad_len, csrc_count); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_copy_data(byte[] data, UIntPtr n_length); + + public static Gst.Buffer RtpBufferNewCopyData(byte[] data) { + IntPtr raw_ret = gst_rtp_buffer_new_copy_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length))); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_take_data(byte[] data, UIntPtr n_length); + + public static Gst.Buffer RtpBufferNewTakeData(byte[] data) { + IntPtr raw_ret = gst_rtp_buffer_new_take_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length))); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_hdrext_get_ntp_56(IntPtr[] data, uint size, out ulong ntptime); + + public static bool RtpHdrextGetNtp56(IntPtr[] data, uint size, out ulong ntptime) { + bool raw_ret = gst_rtp_hdrext_get_ntp_56(data, size, out ntptime); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_hdrext_get_ntp_64(IntPtr[] data, uint size, out ulong ntptime); + + public static bool RtpHdrextGetNtp64(IntPtr[] data, uint size, out ulong ntptime) { + bool raw_ret = gst_rtp_hdrext_get_ntp_64(data, size, out ntptime); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_hdrext_set_ntp_56(IntPtr data, uint size, ulong ntptime); + + public static bool RtpHdrextSetNtp56(IntPtr data, uint size, ulong ntptime) { + bool raw_ret = gst_rtp_hdrext_set_ntp_56(data, size, ntptime); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_hdrext_set_ntp_64(IntPtr data, uint size, ulong ntptime); + + public static bool RtpHdrextSetNtp64(IntPtr data, uint size, ulong ntptime) { + bool raw_ret = gst_rtp_hdrext_set_ntp_64(data, size, ntptime); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_payload_info_for_name(IntPtr media, IntPtr encoding_name); + + public static Gst.Rtp.RTPPayloadInfo RtpPayloadInfoForName(string media, string encoding_name) { + IntPtr native_media = GLib.Marshaller.StringToPtrGStrdup (media); + IntPtr native_encoding_name = GLib.Marshaller.StringToPtrGStrdup (encoding_name); + IntPtr raw_ret = gst_rtp_payload_info_for_name(native_media, native_encoding_name); + Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret); + GLib.Marshaller.Free (native_media); + GLib.Marshaller.Free (native_encoding_name); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_payload_info_for_pt(byte payload_type); + + public static Gst.Rtp.RTPPayloadInfo RtpPayloadInfoForPt(byte payload_type) { + IntPtr raw_ret = gst_rtp_payload_info_for_pt(payload_type); + Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_source_meta_api_get_type(); + + public static GLib.GType RtpSourceMetaApiGetType() { + IntPtr raw_ret = gst_rtp_source_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_source_meta_get_info(); + + public static Gst.MetaInfo RtpSourceMetaGetInfo() { + IntPtr raw_ret = gst_rtp_source_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTCPBuffer.cs b/sources/generated/Gst.Rtp/RTCPBuffer.cs new file mode 100644 index 0000000000..1c7d95e2b5 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPBuffer.cs @@ -0,0 +1,191 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTCPBuffer : IEquatable { + + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.MapInfo MapInfo; + + public static Gst.Rtp.RTCPBuffer Zero = new Gst.Rtp.RTCPBuffer (); + + public static Gst.Rtp.RTCPBuffer New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtp.RTCPBuffer.Zero; + return (Gst.Rtp.RTCPBuffer) Marshal.PtrToStructure (raw, typeof (Gst.Rtp.RTCPBuffer)); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_add_packet(IntPtr raw, int type, IntPtr packet); + + public bool AddPacket(Gst.Rtp.RTCPType type, Gst.Rtp.RTCPPacket packet) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_packet = GLib.Marshaller.StructureToPtrAlloc (packet); + bool raw_ret = gst_rtcp_buffer_add_packet(this_as_native, (int) type, native_packet); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_packet); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_get_first_packet(IntPtr raw, IntPtr packet); + + public bool GetFirstPacket(Gst.Rtp.RTCPPacket packet) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_packet = GLib.Marshaller.StructureToPtrAlloc (packet); + bool raw_ret = gst_rtcp_buffer_get_first_packet(this_as_native, native_packet); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_packet); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_buffer_get_packet_count(IntPtr raw); + + public uint PacketCount { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_buffer_get_packet_count(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_unmap(IntPtr raw); + + public bool Unmap() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_buffer_unmap(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_map(IntPtr buffer, int flags, IntPtr rtcp); + + public static bool Map(Gst.Buffer buffer, Gst.MapFlags flags, Gst.Rtp.RTCPBuffer rtcp) { + IntPtr native_rtcp = GLib.Marshaller.StructureToPtrAlloc (rtcp); + bool raw_ret = gst_rtcp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, native_rtcp); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_rtcp); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new(uint mtu); + + public static Gst.Buffer New(uint mtu) { + IntPtr raw_ret = gst_rtcp_buffer_new(mtu); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new_copy_data(byte[] data, uint n_length); + + public static Gst.Buffer NewCopyData(byte[] data) { + IntPtr raw_ret = gst_rtcp_buffer_new_copy_data(data, (uint) (data == null ? 0 : data.Length)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_buffer_new_take_data(byte[] data, uint n_length); + + public static Gst.Buffer NewTakeData(byte[] data) { + IntPtr raw_ret = gst_rtcp_buffer_new_take_data(data, (uint) (data == null ? 0 : data.Length)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate(IntPtr buffer); + + public static bool Validate(Gst.Buffer buffer) { + bool raw_ret = gst_rtcp_buffer_validate(buffer == null ? IntPtr.Zero : buffer.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_data(byte[] data, uint len); + + public static bool ValidateData(byte[] data, uint len) { + bool raw_ret = gst_rtcp_buffer_validate_data(data, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_data_reduced(byte[] data, uint len); + + public static bool ValidateDataReduced(byte[] data, uint len) { + bool raw_ret = gst_rtcp_buffer_validate_data_reduced(data, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_buffer_validate_reduced(IntPtr buffer); + + public static bool ValidateReduced(Gst.Buffer buffer) { + bool raw_ret = gst_rtcp_buffer_validate_reduced(buffer == null ? IntPtr.Zero : buffer.Handle); + bool ret = raw_ret; + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtp.RTCPBuffer target) + { + target = New (native); + } + + public bool Equals (RTCPBuffer other) + { + return true && Buffer.Equals (other.Buffer) && MapInfo.Equals (other.MapInfo); + } + + public override bool Equals (object other) + { + return other is RTCPBuffer && Equals ((RTCPBuffer) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Buffer.GetHashCode () ^ MapInfo.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTCPFBType.cs b/sources/generated/Gst.Rtp/RTCPFBType.cs new file mode 100644 index 0000000000..0198459882 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPFBType.cs @@ -0,0 +1,40 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTCPFBTypeGType))] + public enum RTCPFBType { + + FbTypeInvalid = 0, + RtpfbTypeNack = 1, + PsfbTypePli = 1, + PsfbTypeSli = 2, + RtpfbTypeTmmbr = 3, + PsfbTypeRpsi = 3, + RtpfbTypeTmmbn = 4, + PsfbTypeFir = 4, + RtpfbTypeRtcpSrReq = 5, + PsfbTypeTstr = 5, + PsfbTypeTstn = 6, + PsfbTypeVbcn = 7, + RtpfbTypeTwcc = 15, + PsfbTypeAfb = 15, + } + + internal class RTCPFBTypeGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcpfb_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtcpfb_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTCPPacket.cs b/sources/generated/Gst.Rtp/RTCPPacket.cs new file mode 100644 index 0000000000..ea7a98e3f2 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPPacket.cs @@ -0,0 +1,970 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTCPPacket : IEquatable { + + private IntPtr _rtcp; + + public Gst.Rtp.RTCPBuffer rtcp { + get { return Gst.Rtp.RTCPBuffer.New (_rtcp); } + } + public uint Offset; + private bool padding; + private byte count; + private Gst.Rtp.RTCPType type; + private ushort length; + private uint item_offset; + private uint item_count; + private uint entry_offset; + + public static Gst.Rtp.RTCPPacket Zero = new Gst.Rtp.RTCPPacket (); + + public static Gst.Rtp.RTCPPacket New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtp.RTCPPacket.Zero; + return (Gst.Rtp.RTCPPacket) Marshal.PtrToStructure (raw, typeof (Gst.Rtp.RTCPPacket)); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_add_profile_specific_ext(IntPtr raw, byte[] data, uint len); + + public bool AddProfileSpecificExt(byte[] data, uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_add_profile_specific_ext(this_as_native, data, len); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_add_rb(IntPtr raw, uint ssrc, byte fractionlost, int packetslost, uint exthighestseq, uint jitter, uint lsr, uint dlsr); + + public bool AddRb(uint ssrc, byte fractionlost, int packetslost, uint exthighestseq, uint jitter, uint lsr, uint dlsr) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_add_rb(this_as_native, ssrc, fractionlost, packetslost, exthighestseq, jitter, lsr, dlsr); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtcp_packet_app_get_data(IntPtr raw); + + public byte AppGetData() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtcp_packet_app_get_data(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ushort gst_rtcp_packet_app_get_data_length(IntPtr raw); + + public ushort AppGetDataLength() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ushort raw_ret = gst_rtcp_packet_app_get_data_length(this_as_native); + ushort ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_packet_app_get_name(IntPtr raw); + + public string AppGetName() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtcp_packet_app_get_name(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_app_get_ssrc(IntPtr raw); + + public uint AppGetSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_app_get_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtcp_packet_app_get_subtype(IntPtr raw); + + public byte AppGetSubtype() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtcp_packet_app_get_subtype(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_app_set_data_length(IntPtr raw, ushort wordlen); + + public bool AppSetDataLength(ushort wordlen) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_app_set_data_length(this_as_native, wordlen); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_app_set_name(IntPtr raw, IntPtr name); + + public void AppSetName(string name) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_rtcp_packet_app_set_name(this_as_native, native_name); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_app_set_ssrc(IntPtr raw, uint ssrc); + + public void AppSetSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_app_set_ssrc(this_as_native, ssrc); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_app_set_subtype(IntPtr raw, byte subtype); + + public void AppSetSubtype(byte subtype) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_app_set_subtype(this_as_native, subtype); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_bye_add_ssrc(IntPtr raw, uint ssrc); + + public bool ByeAddSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_bye_add_ssrc(this_as_native, ssrc); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_bye_add_ssrcs(IntPtr raw, uint[] ssrc, uint len); + + public bool ByeAddSsrcs(uint[] ssrc, uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_bye_add_ssrcs(this_as_native, ssrc, len); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_bye_get_nth_ssrc(IntPtr raw, uint nth); + + public uint ByeGetNthSsrc(uint nth) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_bye_get_nth_ssrc(this_as_native, nth); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_packet_bye_get_reason(IntPtr raw); + + public string ByeGetReason() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtcp_packet_bye_get_reason(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtcp_packet_bye_get_reason_len(IntPtr raw); + + public byte ByeGetReasonLen() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtcp_packet_bye_get_reason_len(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_bye_get_ssrc_count(IntPtr raw); + + public uint ByeGetSsrcCount() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_bye_get_ssrc_count(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_bye_set_reason(IntPtr raw, IntPtr reason); + + public bool ByeSetReason(string reason) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_reason = GLib.Marshaller.StringToPtrGStrdup (reason); + bool raw_ret = gst_rtcp_packet_bye_set_reason(this_as_native, native_reason); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_reason); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_copy_profile_specific_ext(IntPtr raw, out byte data, out uint len); + + public bool CopyProfileSpecificExt(out byte data, out uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_copy_profile_specific_ext(this_as_native, out data, out len); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtcp_packet_fb_get_fci(IntPtr raw); + + public byte FbGetFci() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtcp_packet_fb_get_fci(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ushort gst_rtcp_packet_fb_get_fci_length(IntPtr raw); + + public ushort FbGetFciLength() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ushort raw_ret = gst_rtcp_packet_fb_get_fci_length(this_as_native); + ushort ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_fb_get_media_ssrc(IntPtr raw); + + public uint FbGetMediaSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_fb_get_media_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_fb_get_sender_ssrc(IntPtr raw); + + public uint FbGetSenderSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_fb_get_sender_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtcp_packet_fb_get_type(IntPtr raw); + + public Gst.Rtp.RTCPFBType FbGetType() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtcp_packet_fb_get_type(this_as_native); + Gst.Rtp.RTCPFBType ret = (Gst.Rtp.RTCPFBType) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_fb_set_fci_length(IntPtr raw, ushort wordlen); + + public bool FbSetFciLength(ushort wordlen) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_fb_set_fci_length(this_as_native, wordlen); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_fb_set_media_ssrc(IntPtr raw, uint ssrc); + + public void FbSetMediaSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_fb_set_media_ssrc(this_as_native, ssrc); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_fb_set_sender_ssrc(IntPtr raw, uint ssrc); + + public void FbSetSenderSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_fb_set_sender_ssrc(this_as_native, ssrc); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_fb_set_type(IntPtr raw, int type); + + public void FbSetType(Gst.Rtp.RTCPFBType type) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_fb_set_type(this_as_native, (int) type); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_get_profile_specific_ext(IntPtr raw, out byte data, out uint len); + + public bool GetProfileSpecificExt(out byte data, out uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_get_profile_specific_ext(this_as_native, out data, out len); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ushort gst_rtcp_packet_get_profile_specific_ext_length(IntPtr raw); + + public ushort ProfileSpecificExtLength { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ushort raw_ret = gst_rtcp_packet_get_profile_specific_ext_length(this_as_native); + ushort ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_get_rb(IntPtr raw, uint nth, out uint ssrc, out byte fractionlost, out int packetslost, out uint exthighestseq, out uint jitter, out uint lsr, out uint dlsr); + + public void GetRb(uint nth, out uint ssrc, out byte fractionlost, out int packetslost, out uint exthighestseq, out uint jitter, out uint lsr, out uint dlsr) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_get_rb(this_as_native, nth, out ssrc, out fractionlost, out packetslost, out exthighestseq, out jitter, out lsr, out dlsr); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_get_rb_count(IntPtr raw); + + public uint RbCount { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_get_rb_count(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtcp_packet_get_type(IntPtr raw); + + public Gst.Rtp.RTCPType GType { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtcp_packet_get_type(this_as_native); + Gst.Rtp.RTCPType ret = (Gst.Rtp.RTCPType) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_move_to_next(IntPtr raw); + + public bool MoveToNext() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_move_to_next(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_remove(IntPtr raw); + + public bool Remove() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_remove(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_rr_get_ssrc(IntPtr raw); + + public uint RrGetSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_rr_get_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_rr_set_ssrc(IntPtr raw, uint ssrc); + + public void RrSetSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_rr_set_ssrc(this_as_native, ssrc); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_add_entry(IntPtr raw, int type, byte len, byte[] data); + + public bool SdesAddEntry(Gst.Rtp.RTCPSDESType type, byte len, byte[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_add_entry(this_as_native, (int) type, len, data); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_add_item(IntPtr raw, uint ssrc); + + public bool SdesAddItem(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_add_item(this_as_native, ssrc); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_first_entry(IntPtr raw); + + public bool SdesFirstEntry() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_first_entry(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_first_item(IntPtr raw); + + public bool SdesFirstItem() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_first_item(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_sdes_get_item_count(IntPtr raw); + + public uint SdesGetItemCount() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_sdes_get_item_count(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_sdes_get_ssrc(IntPtr raw); + + public uint SdesGetSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_sdes_get_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_next_entry(IntPtr raw); + + public bool SdesNextEntry() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_next_entry(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_sdes_next_item(IntPtr raw); + + public bool SdesNextItem() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_sdes_next_item(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_set_rb(IntPtr raw, uint nth, uint ssrc, byte fractionlost, int packetslost, uint exthighestseq, uint jitter, uint lsr, uint dlsr); + + public void SetRb(uint nth, uint ssrc, byte fractionlost, int packetslost, uint exthighestseq, uint jitter, uint lsr, uint dlsr) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_set_rb(this_as_native, nth, ssrc, fractionlost, packetslost, exthighestseq, jitter, lsr, dlsr); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_sr_get_sender_info(IntPtr raw, out uint ssrc, out ulong ntptime, out uint rtptime, out uint packet_count, out uint octet_count); + + public void SrGetSenderInfo(out uint ssrc, out ulong ntptime, out uint rtptime, out uint packet_count, out uint octet_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_sr_get_sender_info(this_as_native, out ssrc, out ntptime, out rtptime, out packet_count, out octet_count); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtcp_packet_sr_set_sender_info(IntPtr raw, uint ssrc, ulong ntptime, uint rtptime, uint packet_count, uint octet_count); + + public void SrSetSenderInfo(uint ssrc, ulong ntptime, uint rtptime, uint packet_count, uint octet_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtcp_packet_sr_set_sender_info(this_as_native, ssrc, ntptime, rtptime, packet_count, octet_count); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_first_rb(IntPtr raw); + + public bool XrFirstRb() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_first_rb(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ushort gst_rtcp_packet_xr_get_block_length(IntPtr raw); + + public ushort XrGetBlockLength() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ushort raw_ret = gst_rtcp_packet_xr_get_block_length(this_as_native); + ushort ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtcp_packet_xr_get_block_type(IntPtr raw); + + public Gst.Rtp.RTCPXRType XrGetBlockType() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtcp_packet_xr_get_block_type(this_as_native); + Gst.Rtp.RTCPXRType ret = (Gst.Rtp.RTCPXRType) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_dlrr_block(IntPtr raw, uint nth, uint ssrc, uint last_rr, uint delay); + + public bool XrGetDlrrBlock(uint nth, uint ssrc, uint last_rr, uint delay) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_dlrr_block(this_as_native, nth, ssrc, last_rr, delay); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_prt_by_seq(IntPtr raw, ushort seq, uint receipt_time); + + public bool XrGetPrtBySeq(ushort seq, uint receipt_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_prt_by_seq(this_as_native, seq, receipt_time); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_prt_info(IntPtr raw, uint ssrc, byte thinning, ushort begin_seq, ushort end_seq); + + public bool XrGetPrtInfo(uint ssrc, byte thinning, ushort begin_seq, ushort end_seq) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_prt_info(this_as_native, ssrc, thinning, begin_seq, end_seq); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_rle_info(IntPtr raw, uint ssrc, byte thinning, ushort begin_seq, ushort end_seq, uint chunk_count); + + public bool XrGetRleInfo(uint ssrc, byte thinning, ushort begin_seq, ushort end_seq, uint chunk_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_rle_info(this_as_native, ssrc, thinning, begin_seq, end_seq, chunk_count); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_rle_nth_chunk(IntPtr raw, uint nth, ushort chunk); + + public bool XrGetRleNthChunk(uint nth, ushort chunk) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_rle_nth_chunk(this_as_native, nth, chunk); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_rrt(IntPtr raw, ulong timestamp); + + public bool XrGetRrt(ulong timestamp) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_rrt(this_as_native, timestamp); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtcp_packet_xr_get_ssrc(IntPtr raw); + + public uint XrGetSsrc() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtcp_packet_xr_get_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_summary_info(IntPtr raw, uint ssrc, ushort begin_seq, ushort end_seq); + + public bool XrGetSummaryInfo(uint ssrc, ushort begin_seq, ushort end_seq) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_summary_info(this_as_native, ssrc, begin_seq, end_seq); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_summary_jitter(IntPtr raw, uint min_jitter, uint max_jitter, uint mean_jitter, uint dev_jitter); + + public bool XrGetSummaryJitter(uint min_jitter, uint max_jitter, uint mean_jitter, uint dev_jitter) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_summary_jitter(this_as_native, min_jitter, max_jitter, mean_jitter, dev_jitter); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_summary_pkt(IntPtr raw, uint lost_packets, uint dup_packets); + + public bool XrGetSummaryPkt(uint lost_packets, uint dup_packets) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_summary_pkt(this_as_native, lost_packets, dup_packets); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_summary_ttl(IntPtr raw, bool is_ipv4, byte min_ttl, byte max_ttl, byte mean_ttl, byte dev_ttl); + + public bool XrGetSummaryTtl(bool is_ipv4, byte min_ttl, byte max_ttl, byte mean_ttl, byte dev_ttl) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_summary_ttl(this_as_native, is_ipv4, min_ttl, max_ttl, mean_ttl, dev_ttl); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_burst_metrics(IntPtr raw, byte burst_density, byte gap_density, ushort burst_duration, ushort gap_duration); + + public bool XrGetVoipBurstMetrics(byte burst_density, byte gap_density, ushort burst_duration, ushort gap_duration) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_burst_metrics(this_as_native, burst_density, gap_density, burst_duration, gap_duration); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_configuration_params(IntPtr raw, byte gmin, byte rx_config); + + public bool XrGetVoipConfigurationParams(byte gmin, byte rx_config) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_configuration_params(this_as_native, gmin, rx_config); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_delay_metrics(IntPtr raw, ushort roundtrip_delay, ushort end_system_delay); + + public bool XrGetVoipDelayMetrics(ushort roundtrip_delay, ushort end_system_delay) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_delay_metrics(this_as_native, roundtrip_delay, end_system_delay); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_jitter_buffer_params(IntPtr raw, ushort jb_nominal, ushort jb_maximum, ushort jb_abs_max); + + public bool XrGetVoipJitterBufferParams(ushort jb_nominal, ushort jb_maximum, ushort jb_abs_max) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_jitter_buffer_params(this_as_native, jb_nominal, jb_maximum, jb_abs_max); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_metrics_ssrc(IntPtr raw, uint ssrc); + + public bool XrGetVoipMetricsSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_metrics_ssrc(this_as_native, ssrc); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_packet_metrics(IntPtr raw, byte loss_rate, byte discard_rate); + + public bool XrGetVoipPacketMetrics(byte loss_rate, byte discard_rate) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_packet_metrics(this_as_native, loss_rate, discard_rate); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_quality_metrics(IntPtr raw, byte r_factor, byte ext_r_factor, byte mos_lq, byte mos_cq); + + public bool XrGetVoipQualityMetrics(byte r_factor, byte ext_r_factor, byte mos_lq, byte mos_cq) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_quality_metrics(this_as_native, r_factor, ext_r_factor, mos_lq, mos_cq); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_get_voip_signal_metrics(IntPtr raw, byte signal_level, byte noise_level, byte rerl, byte gmin); + + public bool XrGetVoipSignalMetrics(byte signal_level, byte noise_level, byte rerl, byte gmin) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_get_voip_signal_metrics(this_as_native, signal_level, noise_level, rerl, gmin); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtcp_packet_xr_next_rb(IntPtr raw); + + public bool XrNextRb() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtcp_packet_xr_next_rb(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtp.RTCPPacket target) + { + target = New (native); + } + + public bool Equals (RTCPPacket other) + { + return true && rtcp.Equals (other.rtcp) && Offset.Equals (other.Offset) && count.Equals (other.count) && type.Equals (other.type) && length.Equals (other.length) && item_offset.Equals (other.item_offset) && item_count.Equals (other.item_count) && entry_offset.Equals (other.entry_offset); + } + + public override bool Equals (object other) + { + return other is RTCPPacket && Equals ((RTCPPacket) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ rtcp.GetHashCode () ^ Offset.GetHashCode () ^ count.GetHashCode () ^ type.GetHashCode () ^ length.GetHashCode () ^ item_offset.GetHashCode () ^ item_count.GetHashCode () ^ entry_offset.GetHashCode (); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTCPSDESType.cs b/sources/generated/Gst.Rtp/RTCPSDESType.cs new file mode 100644 index 0000000000..66aa0a4221 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPSDESType.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTCPSDESTypeGType))] + public enum RTCPSDESType { + + Invalid = -1, + End = 0, + Cname = 1, + Name = 2, + Email = 3, + Phone = 4, + Loc = 5, + Tool = 6, + Note = 7, + Priv = 8, + } + + internal class RTCPSDESTypeGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcpsdes_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtcpsdes_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTCPType.cs b/sources/generated/Gst.Rtp/RTCPType.cs new file mode 100644 index 0000000000..fbf5b74549 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPType.cs @@ -0,0 +1,35 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTCPTypeGType))] + public enum RTCPType { + + Invalid = 0, + Sr = 200, + Rr = 201, + Sdes = 202, + Bye = 203, + App = 204, + Rtpfb = 205, + Psfb = 206, + Xr = 207, + } + + internal class RTCPTypeGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcp_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtcp_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTCPXRType.cs b/sources/generated/Gst.Rtp/RTCPXRType.cs new file mode 100644 index 0000000000..bdfed28a24 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTCPXRType.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTCPXRTypeGType))] + public enum RTCPXRType { + + Invalid = -1, + Lrle = 1, + Drle = 2, + Prt = 3, + Rrt = 4, + Dlrr = 5, + Ssumm = 6, + VoipMetrics = 7, + } + + internal class RTCPXRTypeGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtcpxr_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtcpxr_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTPBaseAudioPayload.cs b/sources/generated/Gst.Rtp/RTPBaseAudioPayload.cs new file mode 100644 index 0000000000..c2dc644301 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBaseAudioPayload.cs @@ -0,0 +1,274 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTPBaseAudioPayload : Gst.Rtp.RTPBasePayload { + + public RTPBaseAudioPayload (IntPtr raw) : base(raw) {} + + protected RTPBaseAudioPayload() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("buffer-list")] + public bool BufferList { + get { + GLib.Value val = GetProperty ("buffer-list"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("buffer-list", val); + val.Dispose (); + } + } + + public ulong BaseTs { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("base_ts")); + return (*raw_ptr); + } + } + } + + public int FrameSize { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("frame_size")); + return (*raw_ptr); + } + } + } + + public int FrameDuration { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("frame_duration")); + return (*raw_ptr); + } + } + } + + public int SampleSize { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("sample_size")); + return (*raw_ptr); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Rtp.RTPBasePayload.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_base_audio_payload_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_rtp_base_audio_payload_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_audio_payload_flush(IntPtr raw, uint payload_len, ulong timestamp); + + public Gst.FlowReturn Flush(uint payload_len, ulong timestamp) { + int raw_ret = gst_rtp_base_audio_payload_flush(Handle, payload_len, timestamp); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_base_audio_payload_get_adapter(IntPtr raw); + + public Gst.Base.Adapter Adapter { + get { + IntPtr raw_ret = gst_rtp_base_audio_payload_get_adapter(Handle); + Gst.Base.Adapter ret = GLib.Object.GetObject(raw_ret, true) as Gst.Base.Adapter; + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_audio_payload_push(IntPtr raw, byte[] data, uint payload_len, ulong timestamp); + + public Gst.FlowReturn Push(byte[] data, uint payload_len, ulong timestamp) { + int raw_ret = gst_rtp_base_audio_payload_push(Handle, data, payload_len, timestamp); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_audio_payload_set_frame_based(IntPtr raw); + + public void SetFrameBased() { + gst_rtp_base_audio_payload_set_frame_based(Handle); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_audio_payload_set_frame_options(IntPtr raw, int frame_duration, int frame_size); + + public void SetFrameOptions(int frame_duration, int frame_size) { + gst_rtp_base_audio_payload_set_frame_options(Handle, frame_duration, frame_size); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_audio_payload_set_sample_based(IntPtr raw); + + public void SetSampleBased() { + gst_rtp_base_audio_payload_set_sample_based(Handle); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_audio_payload_set_sample_options(IntPtr raw, int sample_size); + + public int SampleOptions { + set { + gst_rtp_base_audio_payload_set_sample_options(Handle, value); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_audio_payload_set_samplebits_options(IntPtr raw, int sample_size); + + public int SamplebitsOptions { + set { + gst_rtp_base_audio_payload_set_samplebits_options(Handle, value); + } + } + + + static RTPBaseAudioPayload () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Rtp.RTPBasePayload.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "base_ts" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("base_ts" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // base_ts + , "priv" + , "frame_size" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseAudioPayload_base_tsAlign), "base_ts") + , 0 + ), + new GLib.AbiField("frame_size" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // frame_size + , "base_ts" + , "frame_duration" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseAudioPayload_frame_sizeAlign), "frame_size") + , 0 + ), + new GLib.AbiField("frame_duration" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // frame_duration + , "frame_size" + , "sample_size" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseAudioPayload_frame_durationAlign), "frame_duration") + , 0 + ), + new GLib.AbiField("sample_size" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // sample_size + , "frame_duration" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseAudioPayload_sample_sizeAlign), "sample_size") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "sample_size" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseAudioPayload_base_tsAlign + { + sbyte f1; + private ulong base_ts; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseAudioPayload_frame_sizeAlign + { + sbyte f1; + private int frame_size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseAudioPayload_frame_durationAlign + { + sbyte f1; + private int frame_duration; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseAudioPayload_sample_sizeAlign + { + sbyte f1; + private int sample_size; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTPBaseDepayload.cs b/sources/generated/Gst.Rtp/RTPBaseDepayload.cs new file mode 100644 index 0000000000..c510fd29f1 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBaseDepayload.cs @@ -0,0 +1,611 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTPBaseDepayload : Gst.Element { + + protected RTPBaseDepayload (IntPtr raw) : base(raw) {} + + protected RTPBaseDepayload() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("max-reorder")] + public int MaxReorder { + get { + GLib.Value val = GetProperty ("max-reorder"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-reorder", val); + val.Dispose (); + } + } + + [GLib.Property ("source-info")] + public bool SourceInfo { + get { + GLib.Value val = GetProperty ("source-info"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("source-info", val); + val.Dispose (); + } + } + + [GLib.Property ("stats")] + public Gst.Structure Stats { + get { + GLib.Value val = GetProperty ("stats"); + Gst.Structure ret = (Gst.Structure) val; + val.Dispose (); + return ret; + } + } + + public Gst.Pad Sinkpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public Gst.Pad Srcpad { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; + } + } + } + + public uint ClockRate { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_rate")); + return (*raw_ptr); + } + } + } + + public Gst.Segment Segment { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); + return Gst.Segment.New ((*raw_ptr)); + } + } + } + + public bool NeedNewsegment { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("need_newsegment")); + return (*raw_ptr); + } + } + } + + static SetCapsNativeDelegate SetCaps_cb_delegate; + static SetCapsNativeDelegate SetCapsVMCallback { + get { + if (SetCaps_cb_delegate == null) + SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); + return SetCaps_cb_delegate; + } + } + + static void OverrideSetCaps (GLib.GType gtype) + { + OverrideSetCaps (gtype, SetCapsVMCallback); + } + + static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetCaps_cb (IntPtr inst, IntPtr caps) + { + try { + RTPBaseDepayload __obj = GLib.Object.GetObject (inst, false) as RTPBaseDepayload; + bool __result; + __result = __obj.OnSetCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBaseDepayload), ConnectionMethod="OverrideSetCaps")] + protected virtual bool OnSetCaps (Gst.Caps caps) + { + return InternalSetCaps (caps); + } + + private bool InternalSetCaps (Gst.Caps caps) + { + SetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static ProcessNativeDelegate Process_cb_delegate; + static ProcessNativeDelegate ProcessVMCallback { + get { + if (Process_cb_delegate == null) + Process_cb_delegate = new ProcessNativeDelegate (Process_cb); + return Process_cb_delegate; + } + } + + static void OverrideProcess (GLib.GType gtype) + { + OverrideProcess (gtype, ProcessVMCallback); + } + + static void OverrideProcess (GLib.GType gtype, ProcessNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("process")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ProcessNativeDelegate (IntPtr inst, IntPtr in_param); + + static IntPtr Process_cb (IntPtr inst, IntPtr in_param) + { + try { + RTPBaseDepayload __obj = GLib.Object.GetObject (inst, false) as RTPBaseDepayload; + Gst.Buffer __result; + __result = __obj.OnProcess (in_param == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (in_param, typeof (Gst.Buffer), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBaseDepayload), ConnectionMethod="OverrideProcess")] + protected virtual Gst.Buffer OnProcess (Gst.Buffer in_param) + { + return InternalProcess (in_param); + } + + private Gst.Buffer InternalProcess (Gst.Buffer in_param) + { + ProcessNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("process")); + unmanaged = (ProcessNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProcessNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, in_param == null ? IntPtr.Zero : in_param.Handle); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + static PacketLostNativeDelegate PacketLost_cb_delegate; + static PacketLostNativeDelegate PacketLostVMCallback { + get { + if (PacketLost_cb_delegate == null) + PacketLost_cb_delegate = new PacketLostNativeDelegate (PacketLost_cb); + return PacketLost_cb_delegate; + } + } + + static void OverridePacketLost (GLib.GType gtype) + { + OverridePacketLost (gtype, PacketLostVMCallback); + } + + static void OverridePacketLost (GLib.GType gtype, PacketLostNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("packet_lost")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PacketLostNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool PacketLost_cb (IntPtr inst, IntPtr evnt) + { + try { + RTPBaseDepayload __obj = GLib.Object.GetObject (inst, false) as RTPBaseDepayload; + bool __result; + __result = __obj.OnPacketLost (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBaseDepayload), ConnectionMethod="OverridePacketLost")] + protected virtual bool OnPacketLost (Gst.Event evnt) + { + return InternalPacketLost (evnt); + } + + private bool InternalPacketLost (Gst.Event evnt) + { + PacketLostNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("packet_lost")); + unmanaged = (PacketLostNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PacketLostNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static HandleEventNativeDelegate HandleEvent_cb_delegate; + static HandleEventNativeDelegate HandleEventVMCallback { + get { + if (HandleEvent_cb_delegate == null) + HandleEvent_cb_delegate = new HandleEventNativeDelegate (HandleEvent_cb); + return HandleEvent_cb_delegate; + } + } + + static void OverrideHandleEvent (GLib.GType gtype) + { + OverrideHandleEvent (gtype, HandleEventVMCallback); + } + + static void OverrideHandleEvent (GLib.GType gtype, HandleEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool HandleEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool HandleEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + RTPBaseDepayload __obj = GLib.Object.GetObject (inst, false) as RTPBaseDepayload; + bool __result; + __result = __obj.OnHandleEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBaseDepayload), ConnectionMethod="OverrideHandleEvent")] + protected virtual bool OnHandleEvent (Gst.Event evnt) + { + return InternalHandleEvent (evnt); + } + + private bool InternalHandleEvent (Gst.Event evnt) + { + HandleEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_event")); + unmanaged = (HandleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static ProcessRtpPacketNativeDelegate ProcessRtpPacket_cb_delegate; + static ProcessRtpPacketNativeDelegate ProcessRtpPacketVMCallback { + get { + if (ProcessRtpPacket_cb_delegate == null) + ProcessRtpPacket_cb_delegate = new ProcessRtpPacketNativeDelegate (ProcessRtpPacket_cb); + return ProcessRtpPacket_cb_delegate; + } + } + + static void OverrideProcessRtpPacket (GLib.GType gtype) + { + OverrideProcessRtpPacket (gtype, ProcessRtpPacketVMCallback); + } + + static void OverrideProcessRtpPacket (GLib.GType gtype, ProcessRtpPacketNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("process_rtp_packet")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ProcessRtpPacketNativeDelegate (IntPtr inst, IntPtr rtp_buffer); + + static IntPtr ProcessRtpPacket_cb (IntPtr inst, IntPtr rtp_buffer) + { + try { + RTPBaseDepayload __obj = GLib.Object.GetObject (inst, false) as RTPBaseDepayload; + Gst.Buffer __result; + __result = __obj.OnProcessRtpPacket (Gst.Rtp.RTPBuffer.New (rtp_buffer)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBaseDepayload), ConnectionMethod="OverrideProcessRtpPacket")] + protected virtual Gst.Buffer OnProcessRtpPacket (Gst.Rtp.RTPBuffer rtp_buffer) + { + return InternalProcessRtpPacket (rtp_buffer); + } + + private Gst.Buffer InternalProcessRtpPacket (Gst.Rtp.RTPBuffer rtp_buffer) + { + ProcessRtpPacketNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("process_rtp_packet")); + unmanaged = (ProcessRtpPacketNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProcessRtpPacketNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr native_rtp_buffer = GLib.Marshaller.StructureToPtrAlloc (rtp_buffer); + IntPtr __result = unmanaged (this.Handle, native_rtp_buffer); + Marshal.FreeHGlobal (native_rtp_buffer); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("set_caps" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps + , null + , "process" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("process" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // process + , "set_caps" + , "packet_lost" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("packet_lost" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // packet_lost + , "process" + , "handle_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_event + , "packet_lost" + , "process_rtp_packet" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("process_rtp_packet" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // process_rtp_packet + , "handle_event" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _gst_reserved + , "process_rtp_packet" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_base_depayload_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_rtp_base_depayload_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_base_depayload_is_source_info_enabled(IntPtr raw); + + public bool IsSourceInfoEnabled { + get { + bool raw_ret = gst_rtp_base_depayload_is_source_info_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_depayload_push(IntPtr raw, IntPtr out_buf); + + public Gst.FlowReturn Push(Gst.Buffer out_buf) { + int raw_ret = gst_rtp_base_depayload_push(Handle, out_buf == null ? IntPtr.Zero : out_buf.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_depayload_push_list(IntPtr raw, IntPtr out_list); + + public Gst.FlowReturn PushList(Gst.BufferList out_list) { + int raw_ret = gst_rtp_base_depayload_push_list(Handle, out_list == null ? IntPtr.Zero : out_list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_depayload_set_source_info_enabled(IntPtr raw, bool enable); + + public bool SourceInfoEnabled { + set { + gst_rtp_base_depayload_set_source_info_enabled(Handle, value); + } + } + + + static RTPBaseDepayload () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "clock_rate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clock_rate" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // clock_rate + , "srcpad" + , "segment" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseDepayload_clock_rateAlign), "clock_rate") + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "clock_rate" + , "need_newsegment" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseDepayload_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("need_newsegment" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // need_newsegment + , "segment" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstRTPBaseDepayload_need_newsegmentAlign), "need_newsegment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "need_newsegment" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseDepayload_clock_rateAlign + { + sbyte f1; + private uint clock_rate; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseDepayload_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBaseDepayload_need_newsegmentAlign + { + sbyte f1; + private bool need_newsegment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTPBasePayload.cs b/sources/generated/Gst.Rtp/RTPBasePayload.cs new file mode 100644 index 0000000000..1991901593 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBasePayload.cs @@ -0,0 +1,1064 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTPBasePayload : Gst.Element { + + protected RTPBasePayload (IntPtr raw) : base(raw) {} + + protected RTPBasePayload() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("max-ptime")] + public long MaxPtime { + get { + GLib.Value val = GetProperty ("max-ptime"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-ptime", val); + val.Dispose (); + } + } + + [GLib.Property ("min-ptime")] + public long MinPtime { + get { + GLib.Value val = GetProperty ("min-ptime"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("min-ptime", val); + val.Dispose (); + } + } + + [GLib.Property ("mtu")] + public uint Mtu { + get { + GLib.Value val = GetProperty ("mtu"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("mtu", val); + val.Dispose (); + } + } + + [GLib.Property ("onvif-no-rate-control")] + public bool OnvifNoRateControl { + get { + GLib.Value val = GetProperty ("onvif-no-rate-control"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("onvif-no-rate-control", val); + val.Dispose (); + } + } + + [GLib.Property ("perfect-rtptime")] + public bool PerfectRtptime { + get { + GLib.Value val = GetProperty ("perfect-rtptime"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("perfect-rtptime", val); + val.Dispose (); + } + } + + [GLib.Property ("pt")] + public uint Pt { + get { + GLib.Value val = GetProperty ("pt"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("pt", val); + val.Dispose (); + } + } + + [GLib.Property ("ptime-multiple")] + public long PtimeMultiple { + get { + GLib.Value val = GetProperty ("ptime-multiple"); + long ret = (long) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("ptime-multiple", val); + val.Dispose (); + } + } + + [GLib.Property ("scale-rtptime")] + public bool ScaleRtptime { + get { + GLib.Value val = GetProperty ("scale-rtptime"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("scale-rtptime", val); + val.Dispose (); + } + } + + [GLib.Property ("seqnum")] + public uint Seqnum { + get { + GLib.Value val = GetProperty ("seqnum"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("seqnum-offset")] + public int SeqnumOffset { + get { + GLib.Value val = GetProperty ("seqnum-offset"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("seqnum-offset", val); + val.Dispose (); + } + } + + [GLib.Property ("source-info")] + public bool SourceInfo { + get { + GLib.Value val = GetProperty ("source-info"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("source-info", val); + val.Dispose (); + } + } + + [GLib.Property ("ssrc")] + public uint Ssrc { + get { + GLib.Value val = GetProperty ("ssrc"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("ssrc", val); + val.Dispose (); + } + } + + [GLib.Property ("stats")] + public Gst.Structure Stats { + get { + GLib.Value val = GetProperty ("stats"); + Gst.Structure ret = (Gst.Structure) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("timestamp")] + public uint Timestamp { + get { + GLib.Value val = GetProperty ("timestamp"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("timestamp-offset")] + public uint TimestampOffset { + get { + GLib.Value val = GetProperty ("timestamp-offset"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("timestamp-offset", val); + val.Dispose (); + } + } + + static GetCapsNativeDelegate GetCaps_cb_delegate; + static GetCapsNativeDelegate GetCapsVMCallback { + get { + if (GetCaps_cb_delegate == null) + GetCaps_cb_delegate = new GetCapsNativeDelegate (GetCaps_cb); + return GetCaps_cb_delegate; + } + } + + static void OverrideGetCaps (GLib.GType gtype) + { + OverrideGetCaps (gtype, GetCapsVMCallback); + } + + static void OverrideGetCaps (GLib.GType gtype, GetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetCapsNativeDelegate (IntPtr inst, IntPtr pad, IntPtr filter); + + static IntPtr GetCaps_cb (IntPtr inst, IntPtr pad, IntPtr filter) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + Gst.Caps __result; + __result = __obj.OnGetCaps (GLib.Object.GetObject(pad) as Gst.Pad, filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideGetCaps")] + protected virtual Gst.Caps OnGetCaps (Gst.Pad pad, Gst.Caps filter) + { + return InternalGetCaps (pad, filter); + } + + private Gst.Caps InternalGetCaps (Gst.Pad pad, Gst.Caps filter) + { + GetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_caps")); + unmanaged = (GetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static SetCapsNativeDelegate SetCaps_cb_delegate; + static SetCapsNativeDelegate SetCapsVMCallback { + get { + if (SetCaps_cb_delegate == null) + SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); + return SetCaps_cb_delegate; + } + } + + static void OverrideSetCaps (GLib.GType gtype) + { + OverrideSetCaps (gtype, SetCapsVMCallback); + } + + static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static bool SetCaps_cb (IntPtr inst, IntPtr caps) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + bool __result; + __result = __obj.OnSetCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideSetCaps")] + protected virtual bool OnSetCaps (Gst.Caps caps) + { + return InternalSetCaps (caps); + } + + private bool InternalSetCaps (Gst.Caps caps) + { + SetCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); + unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result; + } + + static HandleBufferNativeDelegate HandleBuffer_cb_delegate; + static HandleBufferNativeDelegate HandleBufferVMCallback { + get { + if (HandleBuffer_cb_delegate == null) + HandleBuffer_cb_delegate = new HandleBufferNativeDelegate (HandleBuffer_cb); + return HandleBuffer_cb_delegate; + } + } + + static void OverrideHandleBuffer (GLib.GType gtype) + { + OverrideHandleBuffer (gtype, HandleBufferVMCallback); + } + + static void OverrideHandleBuffer (GLib.GType gtype, HandleBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleBufferNativeDelegate (IntPtr inst, IntPtr buffer); + + static int HandleBuffer_cb (IntPtr inst, IntPtr buffer) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + Gst.FlowReturn __result; + __result = __obj.OnHandleBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideHandleBuffer")] + protected virtual Gst.FlowReturn OnHandleBuffer (Gst.Buffer buffer) + { + return InternalHandleBuffer (buffer); + } + + private Gst.FlowReturn InternalHandleBuffer (Gst.Buffer buffer) + { + HandleBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_buffer")); + unmanaged = (HandleBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleBufferNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return (Gst.FlowReturn) __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static QueryNativeDelegate Query_cb_delegate; + static QueryNativeDelegate QueryVMCallback { + get { + if (Query_cb_delegate == null) + Query_cb_delegate = new QueryNativeDelegate (Query_cb); + return Query_cb_delegate; + } + } + + static void OverrideQuery (GLib.GType gtype) + { + OverrideQuery (gtype, QueryVMCallback); + } + + static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool QueryNativeDelegate (IntPtr inst, IntPtr pad, IntPtr query); + + static bool Query_cb (IntPtr inst, IntPtr pad, IntPtr query) + { + try { + RTPBasePayload __obj = GLib.Object.GetObject (inst, false) as RTPBasePayload; + bool __result; + __result = __obj.OnQuery (GLib.Object.GetObject(pad) as Gst.Pad, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Rtp.RTPBasePayload), ConnectionMethod="OverrideQuery")] + protected virtual bool OnQuery (Gst.Pad pad, Gst.Query query) + { + return InternalQuery (pad, query); + } + + private bool InternalQuery (Gst.Pad pad, Gst.Query query) + { + QueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_caps" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_caps + , null + , "set_caps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps + , "get_caps" + , "handle_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_buffer + , "set_caps" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "handle_buffer" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // query + , "src_event" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "query" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_base_payload_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_rtp_base_payload_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_base_payload_allocate_output_buffer(IntPtr raw, uint payload_len, byte pad_len, byte csrc_count); + + public Gst.Buffer AllocateOutputBuffer(uint payload_len, byte pad_len, byte csrc_count) { + IntPtr raw_ret = gst_rtp_base_payload_allocate_output_buffer(Handle, payload_len, pad_len, csrc_count); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_base_payload_get_source_count(IntPtr raw, IntPtr buffer); + + public uint GetSourceCount(Gst.Buffer buffer) { + uint raw_ret = gst_rtp_base_payload_get_source_count(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_base_payload_is_filled(IntPtr raw, uint size, ulong duration); + + public bool IsFilled(uint size, ulong duration) { + bool raw_ret = gst_rtp_base_payload_is_filled(Handle, size, duration); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_base_payload_is_source_info_enabled(IntPtr raw); + + public bool IsSourceInfoEnabled { + get { + bool raw_ret = gst_rtp_base_payload_is_source_info_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_payload_push(IntPtr raw, IntPtr buffer); + + public Gst.FlowReturn Push(Gst.Buffer buffer) { + int raw_ret = gst_rtp_base_payload_push(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_base_payload_push_list(IntPtr raw, IntPtr list); + + public Gst.FlowReturn PushList(Gst.BufferList list) { + int raw_ret = gst_rtp_base_payload_push_list(Handle, list == null ? IntPtr.Zero : list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_payload_set_options(IntPtr raw, IntPtr media, bool dynamic, IntPtr encoding_name, uint clock_rate); + + public void SetOptions(string media, bool dynamic, string encoding_name, uint clock_rate) { + IntPtr native_media = GLib.Marshaller.StringToPtrGStrdup (media); + IntPtr native_encoding_name = GLib.Marshaller.StringToPtrGStrdup (encoding_name); + gst_rtp_base_payload_set_options(Handle, native_media, dynamic, native_encoding_name, clock_rate); + GLib.Marshaller.Free (native_media); + GLib.Marshaller.Free (native_encoding_name); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_base_payload_set_source_info_enabled(IntPtr raw, bool enable); + + public bool SourceInfoEnabled { + set { + gst_rtp_base_payload_set_source_info_enabled(Handle, value); + } + } + + + static RTPBasePayload () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "ts_base" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("ts_base" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // ts_base + , "srcpad" + , "seqnum_base" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ts_baseAlign), "ts_base") + , 0 + ), + new GLib.AbiField("seqnum_base" + , -1 + , (uint) Marshal.SizeOf(typeof(ushort)) // seqnum_base + , "ts_base" + , "media" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_seqnum_baseAlign), "seqnum_base") + , 0 + ), + new GLib.AbiField("media" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // media + , "seqnum_base" + , "encoding_name" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("encoding_name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // encoding_name + , "media" + , "dynamic" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("dynamic" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // dynamic + , "encoding_name" + , "clock_rate" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_dynamicAlign), "dynamic") + , 0 + ), + new GLib.AbiField("clock_rate" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // clock_rate + , "dynamic" + , "ts_offset" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_clock_rateAlign), "clock_rate") + , 0 + ), + new GLib.AbiField("ts_offset" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // ts_offset + , "clock_rate" + , "timestamp" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ts_offsetAlign), "ts_offset") + , 0 + ), + new GLib.AbiField("timestamp" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // timestamp + , "ts_offset" + , "seqnum_offset" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_timestampAlign), "timestamp") + , 0 + ), + new GLib.AbiField("seqnum_offset" + , -1 + , (uint) Marshal.SizeOf(typeof(short)) // seqnum_offset + , "timestamp" + , "seqnum" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_seqnum_offsetAlign), "seqnum_offset") + , 0 + ), + new GLib.AbiField("seqnum" + , -1 + , (uint) Marshal.SizeOf(typeof(ushort)) // seqnum + , "seqnum_offset" + , "max_ptime" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_seqnumAlign), "seqnum") + , 0 + ), + new GLib.AbiField("max_ptime" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // max_ptime + , "seqnum" + , "pt" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_max_ptimeAlign), "max_ptime") + , 0 + ), + new GLib.AbiField("pt" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // pt + , "max_ptime" + , "ssrc" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ptAlign), "pt") + , 0 + ), + new GLib.AbiField("ssrc" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // ssrc + , "pt" + , "current_ssrc" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ssrcAlign), "ssrc") + , 0 + ), + new GLib.AbiField("current_ssrc" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // current_ssrc + , "ssrc" + , "mtu" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_current_ssrcAlign), "current_ssrc") + , 0 + ), + new GLib.AbiField("mtu" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // mtu + , "current_ssrc" + , "segment" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_mtuAlign), "mtu") + , 0 + ), + new GLib.AbiField("segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment + , "mtu" + , "min_ptime" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_segmentAlign), "segment") + , 0 + ), + new GLib.AbiField("min_ptime" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // min_ptime + , "segment" + , "ptime" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_min_ptimeAlign), "min_ptime") + , 0 + ), + new GLib.AbiField("ptime" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // ptime + , "min_ptime" + , "ptime_multiple" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ptimeAlign), "ptime") + , 0 + ), + new GLib.AbiField("ptime_multiple" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // ptime_multiple + , "ptime" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstRTPBasePayload_ptime_multipleAlign), "ptime_multiple") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "ptime_multiple" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ts_baseAlign + { + sbyte f1; + private uint ts_base; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_seqnum_baseAlign + { + sbyte f1; + private ushort seqnum_base; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_dynamicAlign + { + sbyte f1; + private bool dynamic; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_clock_rateAlign + { + sbyte f1; + private uint clock_rate; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ts_offsetAlign + { + sbyte f1; + private int ts_offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_timestampAlign + { + sbyte f1; + private uint timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_seqnum_offsetAlign + { + sbyte f1; + private short seqnum_offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_seqnumAlign + { + sbyte f1; + private ushort seqnum; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_max_ptimeAlign + { + sbyte f1; + private long max_ptime; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ptAlign + { + sbyte f1; + private uint pt; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ssrcAlign + { + sbyte f1; + private uint ssrc; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_current_ssrcAlign + { + sbyte f1; + private uint current_ssrc; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_mtuAlign + { + sbyte f1; + private uint mtu; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_segmentAlign + { + sbyte f1; + private Gst.Segment segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_min_ptimeAlign + { + sbyte f1; + private ulong min_ptime; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ptimeAlign + { + sbyte f1; + private ulong ptime; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstRTPBasePayload_ptime_multipleAlign + { + sbyte f1; + private ulong ptime_multiple; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTPBuffer.cs b/sources/generated/Gst.Rtp/RTPBuffer.cs new file mode 100644 index 0000000000..917ee965fa --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBuffer.cs @@ -0,0 +1,585 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTPBuffer : IEquatable { + + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint State; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public IntPtr[] Data; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public ulong[] Size; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public Gst.MapInfo[] MapInfo; + + public static Gst.Rtp.RTPBuffer Zero = new Gst.Rtp.RTPBuffer (); + + public static Gst.Rtp.RTPBuffer New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtp.RTPBuffer.Zero; + return (Gst.Rtp.RTPBuffer) Marshal.PtrToStructure (raw, typeof (Gst.Rtp.RTPBuffer)); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_add_extension_onebyte_header(IntPtr raw, byte id, byte[] data, uint n_length); + + public bool AddExtensionOnebyteHeader(byte id, byte[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_add_extension_onebyte_header(this_as_native, id, data, (uint) (data == null ? 0 : data.Length)); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_add_extension_twobytes_header(IntPtr raw, byte appbits, byte id, byte[] data, uint n_length); + + public bool AddExtensionTwobytesHeader(byte appbits, byte id, byte[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_add_extension_twobytes_header(this_as_native, appbits, id, data, (uint) (data == null ? 0 : data.Length)); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_csrc(IntPtr raw, byte idx); + + public uint GetCsrc(byte idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_csrc(this_as_native, idx); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtp_buffer_get_csrc_count(IntPtr raw); + + public byte CsrcCount { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtp_buffer_get_csrc_count(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_get_extension(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_extension(IntPtr raw, bool extension); + + public bool Extension { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_get_extension(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_extension(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_get_extension_bytes(IntPtr raw, out ushort bits); + + public GLib.Bytes GetExtensionBytes(out ushort bits) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtp_buffer_get_extension_bytes(this_as_native, out bits); + GLib.Bytes ret = new GLib.Bytes(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_header_len(IntPtr raw); + + public uint HeaderLen { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_header_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_get_marker(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_marker(IntPtr raw, bool marker); + + public bool Marker { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_get_marker(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_marker(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_packet_len(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_packet_len(IntPtr raw, uint len); + + public uint PacketLen { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_packet_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_packet_len(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_get_padding(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_padding(IntPtr raw, bool padding); + + public bool Padding { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_get_padding(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_padding(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_get_payload_buffer(IntPtr raw); + + public Gst.Buffer PayloadBuffer { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtp_buffer_get_payload_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_get_payload_bytes(IntPtr raw); + + public GLib.Bytes PayloadBytes { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtp_buffer_get_payload_bytes(this_as_native); + GLib.Bytes ret = new GLib.Bytes(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_payload_len(IntPtr raw); + + public uint PayloadLen { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_payload_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_get_payload_subbuffer(IntPtr raw, uint offset, uint len); + + public Gst.Buffer GetPayloadSubbuffer(uint offset, uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtp_buffer_get_payload_subbuffer(this_as_native, offset, len); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtp_buffer_get_payload_type(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_payload_type(IntPtr raw, byte payload_type); + + public byte PayloadType { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtp_buffer_get_payload_type(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_payload_type(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ushort gst_rtp_buffer_get_seq(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_seq(IntPtr raw, ushort seq); + + public ushort Seq { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ushort raw_ret = gst_rtp_buffer_get_seq(this_as_native); + ushort ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_seq(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_ssrc(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_ssrc(IntPtr raw, uint ssrc); + + public uint Ssrc { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_ssrc(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_ssrc(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_get_timestamp(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_timestamp(IntPtr raw, uint timestamp); + + public uint Timestamp { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_buffer_get_timestamp(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_timestamp(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern byte gst_rtp_buffer_get_version(IntPtr raw); + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_version(IntPtr raw, byte version); + + public byte Version { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + byte raw_ret = gst_rtp_buffer_get_version(this_as_native); + byte ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_version(this_as_native, value); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_pad_to(IntPtr raw, uint len); + + public void PadTo(uint len) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_pad_to(this_as_native, len); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_set_csrc(IntPtr raw, byte idx, uint csrc); + + public void SetCsrc(byte idx, uint csrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_set_csrc(this_as_native, idx, csrc); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_set_extension_data(IntPtr raw, ushort bits, ushort length); + + public bool SetExtensionData(ushort bits, ushort length) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_buffer_set_extension_data(this_as_native, bits, length); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_unmap(IntPtr raw); + + public void Unmap() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_rtp_buffer_unmap(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtp_buffer_allocate_data(IntPtr buffer, uint payload_len, byte pad_len, byte csrc_count); + + public static void AllocateData(Gst.Buffer buffer, uint payload_len, byte pad_len, byte csrc_count) { + gst_rtp_buffer_allocate_data(buffer == null ? IntPtr.Zero : buffer.Handle, payload_len, pad_len, csrc_count); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_header_len(byte csrc_count); + + public static uint CalcHeaderLen(byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_header_len(csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_packet_len(uint payload_len, byte pad_len, byte csrc_count); + + public static uint CalcPacketLen(uint payload_len, byte pad_len, byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_packet_len(payload_len, pad_len, csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_calc_payload_len(uint packet_len, byte pad_len, byte csrc_count); + + public static uint CalcPayloadLen(uint packet_len, byte pad_len, byte csrc_count) { + uint raw_ret = gst_rtp_buffer_calc_payload_len(packet_len, pad_len, csrc_count); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtp_buffer_compare_seqnum(ushort seqnum1, ushort seqnum2); + + public static int CompareSeqnum(ushort seqnum1, ushort seqnum2) { + int raw_ret = gst_rtp_buffer_compare_seqnum(seqnum1, seqnum2); + int ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_buffer_default_clock_rate(byte payload_type); + + public static uint DefaultClockRate(byte payload_type) { + uint raw_ret = gst_rtp_buffer_default_clock_rate(payload_type); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_rtp_buffer_ext_timestamp(ref ulong exttimestamp, uint timestamp); + + public static ulong ExtTimestamp(ref ulong exttimestamp, uint timestamp) { + ulong raw_ret = gst_rtp_buffer_ext_timestamp(ref exttimestamp, timestamp); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_buffer_map(IntPtr buffer, int flags, IntPtr rtp); + + public static bool Map(Gst.Buffer buffer, Gst.MapFlags flags, out Gst.Rtp.RTPBuffer rtp) { + IntPtr native_rtp = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtp.RTPBuffer))); + bool raw_ret = gst_rtp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, native_rtp); + bool ret = raw_ret; + rtp = Gst.Rtp.RTPBuffer.New (native_rtp); + Marshal.FreeHGlobal (native_rtp); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_allocate(uint payload_len, byte pad_len, byte csrc_count); + + public static Gst.Buffer NewAllocate(uint payload_len, byte pad_len, byte csrc_count) { + IntPtr raw_ret = gst_rtp_buffer_new_allocate(payload_len, pad_len, csrc_count); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_allocate_len(uint packet_len, byte pad_len, byte csrc_count); + + public static Gst.Buffer NewAllocateLen(uint packet_len, byte pad_len, byte csrc_count) { + IntPtr raw_ret = gst_rtp_buffer_new_allocate_len(packet_len, pad_len, csrc_count); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_copy_data(byte[] data, UIntPtr n_length); + + public static Gst.Buffer NewCopyData(byte[] data) { + IntPtr raw_ret = gst_rtp_buffer_new_copy_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length))); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_new_take_data(byte[] data, UIntPtr n_length); + + public static Gst.Buffer NewTakeData(byte[] data) { + IntPtr raw_ret = gst_rtp_buffer_new_take_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length))); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtp.RTPBuffer target) + { + target = New (native); + } + + public bool Equals (RTPBuffer other) + { + return true && Buffer.Equals (other.Buffer) && State.Equals (other.State) && Data.Equals (other.Data) && Size.Equals (other.Size) && MapInfo.Equals (other.MapInfo); + } + + public override bool Equals (object other) + { + return other is RTPBuffer && Equals ((RTPBuffer) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Buffer.GetHashCode () ^ State.GetHashCode () ^ Data.GetHashCode () ^ Size.GetHashCode () ^ MapInfo.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTPBufferFlags.cs b/sources/generated/Gst.Rtp/RTPBufferFlags.cs new file mode 100644 index 0000000000..27171b2c8d --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBufferFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtp.RTPBufferFlagsGType))] + public enum RTPBufferFlags : uint { + + Retransmission = 1048576, + Redundant = 2097152, + Last = 268435456, + } + + internal class RTPBufferFlagsGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtp_buffer_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTPBufferMapFlags.cs b/sources/generated/Gst.Rtp/RTPBufferMapFlags.cs new file mode 100644 index 0000000000..b85575c1a9 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPBufferMapFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtp.RTPBufferMapFlagsGType))] + public enum RTPBufferMapFlags : uint { + + SkipPadding = 65536, + Last = 16777216, + } + + internal class RTPBufferMapFlagsGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_buffer_map_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtp_buffer_map_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTPPayload.cs b/sources/generated/Gst.Rtp/RTPPayload.cs new file mode 100644 index 0000000000..65ce187f13 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPPayload.cs @@ -0,0 +1,52 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTPPayloadGType))] + public enum RTPPayload { + + Pcmu = 0, + _1016 = 1, + G721 = 2, + Gsm = 3, + G723 = 4, + Dvi48000 = 5, + Dvi416000 = 6, + Lpc = 7, + Pcma = 8, + G722 = 9, + L16Stereo = 10, + L16Mono = 11, + Qcelp = 12, + Cn = 13, + Mpa = 14, + G728 = 15, + Dvi411025 = 16, + Dvi422050 = 17, + G729 = 18, + Cellb = 25, + Jpeg = 26, + Nv = 28, + H261 = 31, + Mpv = 32, + Mp2t = 33, + H263 = 34, + } + + internal class RTPPayloadGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_payload_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtp_payload_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTPPayloadInfo.cs b/sources/generated/Gst.Rtp/RTPPayloadInfo.cs new file mode 100644 index 0000000000..6a805f7d77 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPPayloadInfo.cs @@ -0,0 +1,74 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTPPayloadInfo : IEquatable { + + public byte PayloadType; + public string Media; + public string EncodingName; + public uint ClockRate; + public string EncodingParameters; + public uint Bitrate; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Rtp.RTPPayloadInfo Zero = new Gst.Rtp.RTPPayloadInfo (); + + public static Gst.Rtp.RTPPayloadInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtp.RTPPayloadInfo.Zero; + return (Gst.Rtp.RTPPayloadInfo) Marshal.PtrToStructure (raw, typeof (Gst.Rtp.RTPPayloadInfo)); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_payload_info_for_name(IntPtr media, IntPtr encoding_name); + + public static Gst.Rtp.RTPPayloadInfo ForName(string media, string encoding_name) { + IntPtr native_media = GLib.Marshaller.StringToPtrGStrdup (media); + IntPtr native_encoding_name = GLib.Marshaller.StringToPtrGStrdup (encoding_name); + IntPtr raw_ret = gst_rtp_payload_info_for_name(native_media, native_encoding_name); + Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret); + GLib.Marshaller.Free (native_media); + GLib.Marshaller.Free (native_encoding_name); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_payload_info_for_pt(byte payload_type); + + public static Gst.Rtp.RTPPayloadInfo ForPt(byte payload_type) { + IntPtr raw_ret = gst_rtp_payload_info_for_pt(payload_type); + Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret); + return ret; + } + + public bool Equals (RTPPayloadInfo other) + { + return true && PayloadType.Equals (other.PayloadType) && Media.Equals (other.Media) && EncodingName.Equals (other.EncodingName) && ClockRate.Equals (other.ClockRate) && EncodingParameters.Equals (other.EncodingParameters) && Bitrate.Equals (other.Bitrate); + } + + public override bool Equals (object other) + { + return other is RTPPayloadInfo && Equals ((RTPPayloadInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ PayloadType.GetHashCode () ^ Media.GetHashCode () ^ EncodingName.GetHashCode () ^ ClockRate.GetHashCode () ^ EncodingParameters.GetHashCode () ^ Bitrate.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtp/RTPProfile.cs b/sources/generated/Gst.Rtp/RTPProfile.cs new file mode 100644 index 0000000000..cb456bd563 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPProfile.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtp.RTPProfileGType))] + public enum RTPProfile { + + Unknown = 0, + Avp = 1, + Savp = 2, + Avpf = 3, + Savpf = 4, + } + + internal class RTPProfileGType { + [DllImport ("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_profile_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtp_profile_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtp/RTPSourceMeta.cs b/sources/generated/Gst.Rtp/RTPSourceMeta.cs new file mode 100644 index 0000000000..5bfe7ab113 --- /dev/null +++ b/sources/generated/Gst.Rtp/RTPSourceMeta.cs @@ -0,0 +1,111 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTPSourceMeta : IEquatable { + + public Gst.Meta Meta; + public uint Ssrc; + public bool SsrcValid; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=15)] + public uint[] Csrc; + public uint CsrcCount; + + public static Gst.Rtp.RTPSourceMeta Zero = new Gst.Rtp.RTPSourceMeta (); + + public static Gst.Rtp.RTPSourceMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtp.RTPSourceMeta.Zero; + return (Gst.Rtp.RTPSourceMeta) Marshal.PtrToStructure (raw, typeof (Gst.Rtp.RTPSourceMeta)); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_source_meta_append_csrc(IntPtr raw, uint csrc, uint csrc_count); + + public bool AppendCsrc(uint csrc, uint csrc_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_source_meta_append_csrc(this_as_native, csrc, csrc_count); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtp_source_meta_get_source_count(IntPtr raw); + + public uint SourceCount { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_rtp_source_meta_get_source_count(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtp_source_meta_set_ssrc(IntPtr raw, uint ssrc); + + public bool SetSsrc(uint ssrc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtp_source_meta_set_ssrc(this_as_native, ssrc); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + public bool SetSsrc() { + return SetSsrc (0); + } + + [DllImport("gstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtp_source_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_rtp_source_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.Rtp.RTPSourceMeta target) + { + target = New (native); + } + + public bool Equals (RTPSourceMeta other) + { + return true && Meta.Equals (other.Meta) && Ssrc.Equals (other.Ssrc) && SsrcValid.Equals (other.SsrcValid) && Csrc.Equals (other.Csrc) && CsrcCount.Equals (other.CsrcCount); + } + + public override bool Equals (object other) + { + return other is RTPSourceMeta && Equals ((RTPSourceMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Ssrc.GetHashCode () ^ SsrcValid.GetHashCode () ^ Csrc.GetHashCode () ^ CsrcCount.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/Constants.cs b/sources/generated/Gst.Rtsp/Constants.cs new file mode 100644 index 0000000000..48083a643d --- /dev/null +++ b/sources/generated/Gst.Rtsp/Constants.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const int RTSP_DEFAULT_PORT = 554; +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/Global.cs b/sources/generated/Gst.Rtsp/Global.cs new file mode 100644 index 0000000000..8f32d7590f --- /dev/null +++ b/sources/generated/Gst.Rtsp/Global.cs @@ -0,0 +1,389 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_auth_credentials_free(IntPtr credentials); + + public static void RtspAuthCredentialsFree(Gst.Rtsp.RTSPAuthCredential credentials) { + IntPtr native_credentials = GLib.Marshaller.StructureToPtrAlloc (credentials); + gst_rtsp_auth_credentials_free(native_credentials); + Marshal.FreeHGlobal (native_credentials); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_accept(IntPtr socket, out IntPtr conn, IntPtr cancellable); + + public static Gst.Rtsp.RTSPResult RtspConnectionAccept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn, GLib.Cancellable cancellable) { + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_accept(socket == null ? IntPtr.Zero : socket.Handle, out native_conn, cancellable == null ? IntPtr.Zero : cancellable.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + public static Gst.Rtsp.RTSPResult RtspConnectionAccept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn) { + return RtspConnectionAccept (socket, out conn, null); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_create(IntPtr url, out IntPtr conn); + + public static Gst.Rtsp.RTSPResult RtspConnectionCreate(Gst.Rtsp.RTSPUrl url, out Gst.Rtsp.RTSPConnection conn) { + IntPtr native_url = GLib.Marshaller.StructureToPtrAlloc (url); + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_create(native_url, out native_conn); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_url); + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_create_from_socket(IntPtr socket, IntPtr ip, ushort port, IntPtr initial_buffer, out IntPtr conn); + + public static Gst.Rtsp.RTSPResult RtspConnectionCreateFromSocket(GLib.Socket socket, string ip, ushort port, string initial_buffer, out Gst.Rtsp.RTSPConnection conn) { + IntPtr native_ip = GLib.Marshaller.StringToPtrGStrdup (ip); + IntPtr native_initial_buffer = GLib.Marshaller.StringToPtrGStrdup (initial_buffer); + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_create_from_socket(socket == null ? IntPtr.Zero : socket.Handle, native_ip, port, native_initial_buffer, out native_conn); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_ip); + GLib.Marshaller.Free (native_initial_buffer); + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_find_header_field(IntPtr header); + + public static Gst.Rtsp.RTSPHeaderField RtspFindHeaderField(string header) { + IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header); + int raw_ret = gst_rtsp_find_header_field(native_header); + Gst.Rtsp.RTSPHeaderField ret = (Gst.Rtsp.RTSPHeaderField) raw_ret; + GLib.Marshaller.Free (native_header); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_find_method(IntPtr method); + + public static Gst.Rtsp.RTSPMethod RtspFindMethod(string method) { + IntPtr native_method = GLib.Marshaller.StringToPtrGStrdup (method); + int raw_ret = gst_rtsp_find_method(native_method); + Gst.Rtsp.RTSPMethod ret = (Gst.Rtsp.RTSPMethod) raw_ret; + GLib.Marshaller.Free (native_method); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_generate_digest_auth_response(IntPtr algorithm, IntPtr method, IntPtr realm, IntPtr username, IntPtr password, IntPtr uri, IntPtr nonce); + + public static string RtspGenerateDigestAuthResponse(string algorithm, string method, string realm, string username, string password, string uri, string nonce) { + IntPtr native_algorithm = GLib.Marshaller.StringToPtrGStrdup (algorithm); + IntPtr native_method = GLib.Marshaller.StringToPtrGStrdup (method); + IntPtr native_realm = GLib.Marshaller.StringToPtrGStrdup (realm); + IntPtr native_username = GLib.Marshaller.StringToPtrGStrdup (username); + IntPtr native_password = GLib.Marshaller.StringToPtrGStrdup (password); + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_nonce = GLib.Marshaller.StringToPtrGStrdup (nonce); + IntPtr raw_ret = gst_rtsp_generate_digest_auth_response(native_algorithm, native_method, native_realm, native_username, native_password, native_uri, native_nonce); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_algorithm); + GLib.Marshaller.Free (native_method); + GLib.Marshaller.Free (native_realm); + GLib.Marshaller.Free (native_username); + GLib.Marshaller.Free (native_password); + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_nonce); + return ret; + } + + public static string RtspGenerateDigestAuthResponse(string method, string realm, string username, string password, string uri, string nonce) { + return RtspGenerateDigestAuthResponse (null, method, realm, username, password, uri, nonce); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_generate_digest_auth_response_from_md5(IntPtr algorithm, IntPtr method, IntPtr md5, IntPtr uri, IntPtr nonce); + + public static string RtspGenerateDigestAuthResponseFromMd5(string algorithm, string method, string md5, string uri, string nonce) { + IntPtr native_algorithm = GLib.Marshaller.StringToPtrGStrdup (algorithm); + IntPtr native_method = GLib.Marshaller.StringToPtrGStrdup (method); + IntPtr native_md5 = GLib.Marshaller.StringToPtrGStrdup (md5); + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_nonce = GLib.Marshaller.StringToPtrGStrdup (nonce); + IntPtr raw_ret = gst_rtsp_generate_digest_auth_response_from_md5(native_algorithm, native_method, native_md5, native_uri, native_nonce); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_algorithm); + GLib.Marshaller.Free (native_method); + GLib.Marshaller.Free (native_md5); + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_nonce); + return ret; + } + + public static string RtspGenerateDigestAuthResponseFromMd5(string method, string md5, string uri, string nonce) { + return RtspGenerateDigestAuthResponseFromMd5 (null, method, md5, uri, nonce); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_header_allow_multiple(int field); + + public static bool RtspHeaderAllowMultiple(Gst.Rtsp.RTSPHeaderField field) { + bool raw_ret = gst_rtsp_header_allow_multiple((int) field); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_header_as_text(int field); + + public static string RtspHeaderAsText(Gst.Rtsp.RTSPHeaderField field) { + IntPtr raw_ret = gst_rtsp_header_as_text((int) field); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_new(IntPtr msg); + + public static Gst.Rtsp.RTSPResult RtspMessageNew(out Gst.Rtsp.RTSPMessage msg) { + IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage))); + int raw_ret = gst_rtsp_message_new(native_msg); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + msg = Gst.Rtsp.RTSPMessage.New (native_msg); + Marshal.FreeHGlobal (native_msg); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_new_data(IntPtr msg, byte channel); + + public static Gst.Rtsp.RTSPResult RtspMessageNewData(out Gst.Rtsp.RTSPMessage msg, byte channel) { + IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage))); + int raw_ret = gst_rtsp_message_new_data(native_msg, channel); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + msg = Gst.Rtsp.RTSPMessage.New (native_msg); + Marshal.FreeHGlobal (native_msg); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_new_request(IntPtr msg, int method, IntPtr uri); + + public static Gst.Rtsp.RTSPResult RtspMessageNewRequest(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPMethod method, string uri) { + IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage))); + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + int raw_ret = gst_rtsp_message_new_request(native_msg, (int) method, native_uri); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + msg = Gst.Rtsp.RTSPMessage.New (native_msg); + Marshal.FreeHGlobal (native_msg); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_new_response(IntPtr msg, int code, IntPtr reason, IntPtr request); + + public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request) { + IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage))); + IntPtr native_reason = GLib.Marshaller.StringToPtrGStrdup (reason); + IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc (request); + int raw_ret = gst_rtsp_message_new_response(native_msg, (int) code, native_reason, native_request); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + msg = Gst.Rtsp.RTSPMessage.New (native_msg); + Marshal.FreeHGlobal (native_msg); + GLib.Marshaller.Free (native_reason); + Marshal.FreeHGlobal (native_request); + return ret; + } + + public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code) { + return RtspMessageNewResponse (out msg, code, null, Gst.Rtsp.RTSPMessage.Zero); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_method_as_text(int method); + + public static string RtspMethodAsText(Gst.Rtsp.RTSPMethod method) { + IntPtr raw_ret = gst_rtsp_method_as_text((int) method); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_options_as_text(int options); + + public static string RtspOptionsAsText(Gst.Rtsp.RTSPMethod options) { + IntPtr raw_ret = gst_rtsp_options_as_text((int) options); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_options_from_text(IntPtr options); + + public static Gst.Rtsp.RTSPMethod RtspOptionsFromText(string options) { + IntPtr native_options = GLib.Marshaller.StringToPtrGStrdup (options); + int raw_ret = gst_rtsp_options_from_text(native_options); + Gst.Rtsp.RTSPMethod ret = (Gst.Rtsp.RTSPMethod) raw_ret; + GLib.Marshaller.Free (native_options); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_range_convert_units(IntPtr range, int unit); + + public static bool RtspRangeConvertUnits(Gst.Rtsp.RTSPTimeRange range, Gst.Rtsp.RTSPRangeUnit unit) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + bool raw_ret = gst_rtsp_range_convert_units(native_range, (int) unit); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_range_free(IntPtr range); + + public static void RtspRangeFree(Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + gst_rtsp_range_free(native_range); + Marshal.FreeHGlobal (native_range); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_range_get_times(IntPtr range, out ulong min, out ulong max); + + public static bool RtspRangeGetTimes(Gst.Rtsp.RTSPTimeRange range, out ulong min, out ulong max) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + bool raw_ret = gst_rtsp_range_get_times(native_range, out min, out max); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_range_parse(IntPtr rangestr, IntPtr range); + + public static Gst.Rtsp.RTSPResult RtspRangeParse(string rangestr, out Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup (rangestr); + IntPtr native_range = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPTimeRange))); + int raw_ret = gst_rtsp_range_parse(native_rangestr, native_range); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_rangestr); + range = Gst.Rtsp.RTSPTimeRange.New (native_range); + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_range_to_string(IntPtr range); + + public static string RtspRangeToString(Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + IntPtr raw_ret = gst_rtsp_range_to_string(native_range); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_status_as_text(int code); + + public static string RtspStatusAsText(Gst.Rtsp.RTSPStatusCode code) { + IntPtr raw_ret = gst_rtsp_status_as_text((int) code); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_strresult(int _result); + + public static string RtspStrresult(Gst.Rtsp.RTSPResult _result) { + IntPtr raw_ret = gst_rtsp_strresult((int) _result); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_get_manager(int trans, out IntPtr manager, uint option); + + public static Gst.Rtsp.RTSPResult RtspTransportGetManager(Gst.Rtsp.RTSPTransMode trans, out string manager, uint option) { + IntPtr native_manager; + int raw_ret = gst_rtsp_transport_get_manager((int) trans, out native_manager, option); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + manager = GLib.Marshaller.Utf8PtrToString (native_manager); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_get_mime(int trans, IntPtr mime); + + [Obsolete] + public static Gst.Rtsp.RTSPResult RtspTransportGetMime(Gst.Rtsp.RTSPTransMode trans, string mime) { + IntPtr native_mime = GLib.Marshaller.StringToPtrGStrdup (mime); + int raw_ret = gst_rtsp_transport_get_mime((int) trans, native_mime); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_mime); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_new(IntPtr transport); + + public static Gst.Rtsp.RTSPResult RtspTransportNew(Gst.Rtsp.RTSPTransport transport) { + IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport); + int raw_ret = gst_rtsp_transport_new(native_transport); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_transport); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_parse(IntPtr str, IntPtr transport); + + public static Gst.Rtsp.RTSPResult RtspTransportParse(string str, Gst.Rtsp.RTSPTransport transport) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport); + int raw_ret = gst_rtsp_transport_parse(native_str, native_transport); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_str); + Marshal.FreeHGlobal (native_transport); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_url_parse(IntPtr urlstr, IntPtr url); + + public static Gst.Rtsp.RTSPResult RtspUrlParse(string urlstr, out Gst.Rtsp.RTSPUrl url) { + IntPtr native_urlstr = GLib.Marshaller.StringToPtrGStrdup (urlstr); + IntPtr native_url = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPUrl))); + int raw_ret = gst_rtsp_url_parse(native_urlstr, native_url); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_urlstr); + url = Gst.Rtsp.RTSPUrl.New (native_url); + Marshal.FreeHGlobal (native_url); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_version_as_text(int version); + + public static string RtspVersionAsText(Gst.Rtsp.RTSPVersion version) { + IntPtr raw_ret = gst_rtsp_version_as_text((int) version); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncNative.cs b/sources/generated/Gst.Rtsp/Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncNative.cs new file mode 100644 index 0000000000..68b590f75a --- /dev/null +++ b/sources/generated/Gst.Rtsp/Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.RtspSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool RTSPConnectionAcceptCertificateFuncNative(IntPtr conn, IntPtr peer_cert, int errors, IntPtr user_data); + + internal class RTSPConnectionAcceptCertificateFuncInvoker { + + RTSPConnectionAcceptCertificateFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~RTSPConnectionAcceptCertificateFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal RTSPConnectionAcceptCertificateFuncInvoker (RTSPConnectionAcceptCertificateFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal RTSPConnectionAcceptCertificateFuncInvoker (RTSPConnectionAcceptCertificateFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal RTSPConnectionAcceptCertificateFuncInvoker (RTSPConnectionAcceptCertificateFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Rtsp.RTSPConnectionAcceptCertificateFunc Handler { + get { + return new Gst.Rtsp.RTSPConnectionAcceptCertificateFunc(InvokeNative); + } + } + + bool InvokeNative (GLib.TlsConnection conn, GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors) + { + bool __result = native_cb (conn == null ? IntPtr.Zero : conn.Handle, peer_cert == null ? IntPtr.Zero : peer_cert.Handle, (int) errors, __data); + return __result; + } + } + + internal class RTSPConnectionAcceptCertificateFuncWrapper { + + public bool NativeCallback (IntPtr conn, IntPtr peer_cert, int errors, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(conn) as GLib.TlsConnection, GLib.Object.GetObject(peer_cert) as GLib.TlsCertificate, (GLib.TlsCertificateFlags) errors); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal RTSPConnectionAcceptCertificateFuncNative NativeDelegate; + Gst.Rtsp.RTSPConnectionAcceptCertificateFunc managed; + + public RTSPConnectionAcceptCertificateFuncWrapper (Gst.Rtsp.RTSPConnectionAcceptCertificateFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new RTSPConnectionAcceptCertificateFuncNative (NativeCallback); + } + + public static Gst.Rtsp.RTSPConnectionAcceptCertificateFunc GetManagedDelegate (RTSPConnectionAcceptCertificateFuncNative native) + { + if (native == null) + return null; + RTSPConnectionAcceptCertificateFuncWrapper wrapper = (RTSPConnectionAcceptCertificateFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/IRTSPExtension.cs b/sources/generated/Gst.Rtsp/IRTSPExtension.cs new file mode 100644 index 0000000000..e8f78154d3 --- /dev/null +++ b/sources/generated/Gst.Rtsp/IRTSPExtension.cs @@ -0,0 +1,38 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + +#region Autogenerated code + public partial interface IRTSPExtension : GLib.IWrapper { + + event Gst.Rtsp.SendEventHandler SendEvent; + Gst.Rtsp.RTSPResult AfterSend(Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp); + Gst.Rtsp.RTSPResult BeforeSend(Gst.Rtsp.RTSPMessage req); + bool ConfigureStream(Gst.Caps caps); + bool DetectServer(Gst.Rtsp.RTSPMessage resp); + Gst.Rtsp.RTSPResult GetTransports(Gst.Rtsp.RTSPLowerTrans protocols, string transport); + Gst.Rtsp.RTSPResult ParseSdp(Gst.Sdp.SDPMessage sdp, Gst.Structure s); + Gst.Rtsp.RTSPResult ReceiveRequest(Gst.Rtsp.RTSPMessage req); + Gst.Rtsp.RTSPResult Send(Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp); + Gst.Rtsp.RTSPResult SetupMedia(Gst.Sdp.SDPMedia media); + Gst.Rtsp.RTSPResult StreamSelect(Gst.Rtsp.RTSPUrl url); + } + + [GLib.GInterface (typeof (RTSPExtensionAdapter))] + public partial interface IRTSPExtensionImplementor : GLib.IWrapper { + + bool DetectServer (Gst.Rtsp.RTSPMessage resp); + Gst.Rtsp.RTSPResult BeforeSend (Gst.Rtsp.RTSPMessage req); + Gst.Rtsp.RTSPResult AfterSend (Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp); + Gst.Rtsp.RTSPResult ParseSdp (Gst.Sdp.SDPMessage sdp, Gst.Structure s); + Gst.Rtsp.RTSPResult SetupMedia (Gst.Sdp.SDPMedia media); + bool ConfigureStream (Gst.Caps caps); + Gst.Rtsp.RTSPResult GetTransports (Gst.Rtsp.RTSPLowerTrans protocols, string transport); + Gst.Rtsp.RTSPResult StreamSelect (Gst.Rtsp.RTSPUrl url); + Gst.Rtsp.RTSPResult ReceiveRequest (Gst.Rtsp.RTSPMessage req); + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPAuthCredential.cs b/sources/generated/Gst.Rtsp/RTSPAuthCredential.cs new file mode 100644 index 0000000000..30aeb9db88 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPAuthCredential.cs @@ -0,0 +1,71 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPAuthCredential : IEquatable { + + public Gst.Rtsp.RTSPAuthMethod Scheme; + private IntPtr _parms; + + public Gst.Rtsp.RTSPAuthParam parms { + get { return Gst.Rtsp.RTSPAuthParam.New (_parms); } + } + public string Authorization; + + public static Gst.Rtsp.RTSPAuthCredential Zero = new Gst.Rtsp.RTSPAuthCredential (); + + public static Gst.Rtsp.RTSPAuthCredential New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPAuthCredential.Zero; + return (Gst.Rtsp.RTSPAuthCredential) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPAuthCredential)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_auth_credential_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_rtsp_auth_credential_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public bool Equals (RTSPAuthCredential other) + { + return true && Scheme.Equals (other.Scheme) && parms.Equals (other.parms) && Authorization.Equals (other.Authorization); + } + + public override bool Equals (object other) + { + return other is RTSPAuthCredential && Equals ((RTSPAuthCredential) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Scheme.GetHashCode () ^ parms.GetHashCode () ^ Authorization.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Rtsp.RTSPAuthCredential boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Rtsp.RTSPAuthCredential.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Rtsp.RTSPAuthCredential (GLib.Value val) + { + return (Gst.Rtsp.RTSPAuthCredential) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPAuthMethod.cs b/sources/generated/Gst.Rtsp/RTSPAuthMethod.cs new file mode 100644 index 0000000000..e48dc95c01 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPAuthMethod.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPAuthMethodGType))] + public enum RTSPAuthMethod { + + None = 0, + Basic = 1, + Digest = 2, + } + + internal class RTSPAuthMethodGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_auth_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_auth_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPAuthParam.cs b/sources/generated/Gst.Rtsp/RTSPAuthParam.cs new file mode 100644 index 0000000000..b64f9f86c1 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPAuthParam.cs @@ -0,0 +1,66 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPAuthParam : IEquatable { + + public string Name; + public string Value; + + public static Gst.Rtsp.RTSPAuthParam Zero = new Gst.Rtsp.RTSPAuthParam (); + + public static Gst.Rtsp.RTSPAuthParam New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPAuthParam.Zero; + return (Gst.Rtsp.RTSPAuthParam) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPAuthParam)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_auth_param_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_rtsp_auth_param_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public bool Equals (RTSPAuthParam other) + { + return true && Name.Equals (other.Name) && Value.Equals (other.Value); + } + + public override bool Equals (object other) + { + return other is RTSPAuthParam && Equals ((RTSPAuthParam) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Name.GetHashCode () ^ Value.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Rtsp.RTSPAuthParam boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Rtsp.RTSPAuthParam.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Rtsp.RTSPAuthParam (GLib.Value val) + { + return (Gst.Rtsp.RTSPAuthParam) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPConnection.cs b/sources/generated/Gst.Rtsp/RTSPConnection.cs new file mode 100644 index 0000000000..b043dc5587 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPConnection.cs @@ -0,0 +1,558 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTSPConnection : GLib.Opaque { + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_clear_auth_params(IntPtr raw); + + public void ClearAuthParams() { + gst_rtsp_connection_clear_auth_params(Handle); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_close(IntPtr raw); + + public Gst.Rtsp.RTSPResult Close() { + int raw_ret = gst_rtsp_connection_close(Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_connect(IntPtr raw, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Connect(IntPtr timeout) { + int raw_ret = gst_rtsp_connection_connect(Handle, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_connect_usec(IntPtr raw, long timeout); + + public Gst.Rtsp.RTSPResult ConnectUsec(long timeout) { + int raw_ret = gst_rtsp_connection_connect_usec(Handle, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_connect_with_response(IntPtr raw, IntPtr timeout, IntPtr response); + + [Obsolete] + public Gst.Rtsp.RTSPResult ConnectWithResponse(IntPtr timeout, Gst.Rtsp.RTSPMessage response) { + IntPtr native_response = GLib.Marshaller.StructureToPtrAlloc (response); + int raw_ret = gst_rtsp_connection_connect_with_response(Handle, timeout, native_response); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_response); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_connect_with_response_usec(IntPtr raw, long timeout, IntPtr response); + + public Gst.Rtsp.RTSPResult ConnectWithResponseUsec(long timeout, Gst.Rtsp.RTSPMessage response) { + IntPtr native_response = GLib.Marshaller.StructureToPtrAlloc (response); + int raw_ret = gst_rtsp_connection_connect_with_response_usec(Handle, timeout, native_response); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_response); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_do_tunnel(IntPtr raw, IntPtr conn2); + + public Gst.Rtsp.RTSPResult DoTunnel(Gst.Rtsp.RTSPConnection conn2) { + int raw_ret = gst_rtsp_connection_do_tunnel(Handle, conn2 == null ? IntPtr.Zero : conn2.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_flush(IntPtr raw, bool flush); + + public Gst.Rtsp.RTSPResult Flush(bool flush) { + int raw_ret = gst_rtsp_connection_flush(Handle, flush); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_free(IntPtr raw); + + public Gst.Rtsp.RTSPResult Free() { + int raw_ret = gst_rtsp_connection_free(Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_ip(IntPtr raw); + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_ip(IntPtr raw, IntPtr ip); + + public string Ip { + get { + IntPtr raw_ret = gst_rtsp_connection_get_ip(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_rtsp_connection_set_ip(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_read_socket(IntPtr raw); + + public GLib.Socket ReadSocket { + get { + IntPtr raw_ret = gst_rtsp_connection_get_read_socket(Handle); + GLib.Socket ret = raw_ret == IntPtr.Zero ? null : (GLib.Socket) GLib.Opaque.GetOpaque (raw_ret, typeof (GLib.Socket), false); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_connection_get_remember_session_id(IntPtr raw); + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_remember_session_id(IntPtr raw, bool remember); + + public bool RememberSessionId { + get { + bool raw_ret = gst_rtsp_connection_get_remember_session_id(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_rtsp_connection_set_remember_session_id(Handle, value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_rtsp_connection_get_tls(IntPtr raw, out IntPtr error); + + public unsafe GLib.TlsConnection GetTls() { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_rtsp_connection_get_tls(Handle, out error); + GLib.TlsConnection ret = GLib.Object.GetObject(raw_ret) as GLib.TlsConnection; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_tls_database(IntPtr raw); + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_tls_database(IntPtr raw, IntPtr database); + + public GLib.TlsDatabase TlsDatabase { + get { + IntPtr raw_ret = gst_rtsp_connection_get_tls_database(Handle); + GLib.TlsDatabase ret = GLib.Object.GetObject(raw_ret, true) as GLib.TlsDatabase; + return ret; + } + set { + gst_rtsp_connection_set_tls_database(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_tls_interaction(IntPtr raw); + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_tls_interaction(IntPtr raw, IntPtr interaction); + + public GLib.TlsInteraction TlsInteraction { + get { + IntPtr raw_ret = gst_rtsp_connection_get_tls_interaction(Handle); + GLib.TlsInteraction ret = GLib.Object.GetObject(raw_ret, true) as GLib.TlsInteraction; + return ret; + } + set { + gst_rtsp_connection_set_tls_interaction(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_get_tls_validation_flags(IntPtr raw); + + public GLib.TlsCertificateFlags TlsValidationFlags { + get { + int raw_ret = gst_rtsp_connection_get_tls_validation_flags(Handle); + GLib.TlsCertificateFlags ret = (GLib.TlsCertificateFlags) raw_ret; + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_tunnelid(IntPtr raw); + + public string Tunnelid { + get { + IntPtr raw_ret = gst_rtsp_connection_get_tunnelid(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_url(IntPtr raw); + + public Gst.Rtsp.RTSPUrl Url { + get { + IntPtr raw_ret = gst_rtsp_connection_get_url(Handle); + Gst.Rtsp.RTSPUrl ret = Gst.Rtsp.RTSPUrl.New (raw_ret); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_connection_get_write_socket(IntPtr raw); + + public GLib.Socket WriteSocket { + get { + IntPtr raw_ret = gst_rtsp_connection_get_write_socket(Handle); + GLib.Socket ret = raw_ret == IntPtr.Zero ? null : (GLib.Socket) GLib.Opaque.GetOpaque (raw_ret, typeof (GLib.Socket), false); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_connection_is_tunneled(IntPtr raw); + + public bool IsTunneled { + get { + bool raw_ret = gst_rtsp_connection_is_tunneled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_next_timeout(IntPtr raw, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult NextTimeout(IntPtr timeout) { + int raw_ret = gst_rtsp_connection_next_timeout(Handle, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_rtsp_connection_next_timeout_usec(IntPtr raw); + + public long NextTimeoutUsec() { + long raw_ret = gst_rtsp_connection_next_timeout_usec(Handle); + long ret = raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_poll(IntPtr raw, int events, int revents, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Poll(Gst.Rtsp.RTSPEvent events, Gst.Rtsp.RTSPEvent revents, IntPtr timeout) { + int raw_ret = gst_rtsp_connection_poll(Handle, (int) events, (int) revents, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_poll_usec(IntPtr raw, int events, int revents, long timeout); + + public Gst.Rtsp.RTSPResult PollUsec(Gst.Rtsp.RTSPEvent events, Gst.Rtsp.RTSPEvent revents, long timeout) { + int raw_ret = gst_rtsp_connection_poll_usec(Handle, (int) events, (int) revents, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_read(IntPtr raw, byte data, uint size, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Read(byte data, uint size, IntPtr timeout) { + int raw_ret = gst_rtsp_connection_read(Handle, data, size, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_read_usec(IntPtr raw, byte data, uint size, long timeout); + + public Gst.Rtsp.RTSPResult ReadUsec(byte data, uint size, long timeout) { + int raw_ret = gst_rtsp_connection_read_usec(Handle, data, size, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_receive(IntPtr raw, IntPtr message, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Receive(Gst.Rtsp.RTSPMessage message, IntPtr timeout) { + IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc (message); + int raw_ret = gst_rtsp_connection_receive(Handle, native_message, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_message); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_receive_usec(IntPtr raw, IntPtr message, long timeout); + + public Gst.Rtsp.RTSPResult ReceiveUsec(Gst.Rtsp.RTSPMessage message, long timeout) { + IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc (message); + int raw_ret = gst_rtsp_connection_receive_usec(Handle, native_message, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_message); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_reset_timeout(IntPtr raw); + + public Gst.Rtsp.RTSPResult ResetTimeout() { + int raw_ret = gst_rtsp_connection_reset_timeout(Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_send(IntPtr raw, IntPtr message, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Send(Gst.Rtsp.RTSPMessage message, IntPtr timeout) { + IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc (message); + int raw_ret = gst_rtsp_connection_send(Handle, native_message, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_message); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_send_messages(IntPtr raw, Gst.Rtsp.RTSPMessage[] messages, uint n_messages, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult SendMessages(Gst.Rtsp.RTSPMessage[] messages, IntPtr timeout) { + int raw_ret = gst_rtsp_connection_send_messages(Handle, messages, (uint) (messages == null ? 0 : messages.Length), timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_send_messages_usec(IntPtr raw, Gst.Rtsp.RTSPMessage[] messages, uint n_messages, long timeout); + + public Gst.Rtsp.RTSPResult SendMessagesUsec(Gst.Rtsp.RTSPMessage[] messages, long timeout) { + int raw_ret = gst_rtsp_connection_send_messages_usec(Handle, messages, (uint) (messages == null ? 0 : messages.Length), timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_send_usec(IntPtr raw, IntPtr message, long timeout); + + public Gst.Rtsp.RTSPResult SendUsec(Gst.Rtsp.RTSPMessage message, long timeout) { + IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc (message); + int raw_ret = gst_rtsp_connection_send_usec(Handle, native_message, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_message); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_accept_certificate_func(IntPtr raw, Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify); + + public Gst.Rtsp.RTSPConnectionAcceptCertificateFunc AcceptCertificateFunc { + set { + Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncWrapper value_wrapper = new Gst.RtspSharp.RTSPConnectionAcceptCertificateFuncWrapper (value); + IntPtr user_data; + GLib.DestroyNotify destroy_notify; + if (value == null) { + user_data = IntPtr.Zero; + destroy_notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + destroy_notify = GLib.DestroyHelper.NotifyHandler; + } + gst_rtsp_connection_set_accept_certificate_func(Handle, value_wrapper.NativeDelegate, user_data, destroy_notify); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_set_auth(IntPtr raw, int method, IntPtr user, IntPtr pass); + + public Gst.Rtsp.RTSPResult SetAuth(Gst.Rtsp.RTSPAuthMethod method, string user, string pass) { + IntPtr native_user = GLib.Marshaller.StringToPtrGStrdup (user); + IntPtr native_pass = GLib.Marshaller.StringToPtrGStrdup (pass); + int raw_ret = gst_rtsp_connection_set_auth(Handle, (int) method, native_user, native_pass); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_user); + GLib.Marshaller.Free (native_pass); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_auth_param(IntPtr raw, IntPtr param, IntPtr value); + + public void SetAuthParam(string param, string value) { + IntPtr native_param = GLib.Marshaller.StringToPtrGStrdup (param); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_rtsp_connection_set_auth_param(Handle, native_param, native_value); + GLib.Marshaller.Free (native_param); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_content_length_limit(IntPtr raw, uint limit); + + public uint ContentLengthLimit { + set { + gst_rtsp_connection_set_content_length_limit(Handle, value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_http_mode(IntPtr raw, bool enable); + + public bool HttpMode { + set { + gst_rtsp_connection_set_http_mode(Handle, value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_set_proxy(IntPtr raw, IntPtr host, uint port); + + public Gst.Rtsp.RTSPResult SetProxy(string host, uint port) { + IntPtr native_host = GLib.Marshaller.StringToPtrGStrdup (host); + int raw_ret = gst_rtsp_connection_set_proxy(Handle, native_host, port); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_host); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_set_qos_dscp(IntPtr raw, uint qos_dscp); + + public Gst.Rtsp.RTSPResult SetQosDscp(uint qos_dscp) { + int raw_ret = gst_rtsp_connection_set_qos_dscp(Handle, qos_dscp); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_connection_set_tls_validation_flags(IntPtr raw, int flags); + + public bool SetTlsValidationFlags(GLib.TlsCertificateFlags flags) { + bool raw_ret = gst_rtsp_connection_set_tls_validation_flags(Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_connection_set_tunneled(IntPtr raw, bool tunneled); + + public bool Tunneled { + set { + gst_rtsp_connection_set_tunneled(Handle, value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_write(IntPtr raw, byte data, uint size, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult Write(byte data, uint size, IntPtr timeout) { + int raw_ret = gst_rtsp_connection_write(Handle, data, size, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_write_usec(IntPtr raw, byte data, uint size, long timeout); + + public Gst.Rtsp.RTSPResult WriteUsec(byte data, uint size, long timeout) { + int raw_ret = gst_rtsp_connection_write_usec(Handle, data, size, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_accept(IntPtr socket, out IntPtr conn, IntPtr cancellable); + + public static Gst.Rtsp.RTSPResult Accept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn, GLib.Cancellable cancellable) { + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_accept(socket == null ? IntPtr.Zero : socket.Handle, out native_conn, cancellable == null ? IntPtr.Zero : cancellable.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + public static Gst.Rtsp.RTSPResult Accept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn) { + return Accept (socket, out conn, null); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_create(IntPtr url, out IntPtr conn); + + public static Gst.Rtsp.RTSPResult Create(Gst.Rtsp.RTSPUrl url, out Gst.Rtsp.RTSPConnection conn) { + IntPtr native_url = GLib.Marshaller.StructureToPtrAlloc (url); + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_create(native_url, out native_conn); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_url); + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_connection_create_from_socket(IntPtr socket, IntPtr ip, ushort port, IntPtr initial_buffer, out IntPtr conn); + + public static Gst.Rtsp.RTSPResult CreateFromSocket(GLib.Socket socket, string ip, ushort port, string initial_buffer, out Gst.Rtsp.RTSPConnection conn) { + IntPtr native_ip = GLib.Marshaller.StringToPtrGStrdup (ip); + IntPtr native_initial_buffer = GLib.Marshaller.StringToPtrGStrdup (initial_buffer); + IntPtr native_conn; + int raw_ret = gst_rtsp_connection_create_from_socket(socket == null ? IntPtr.Zero : socket.Handle, native_ip, port, native_initial_buffer, out native_conn); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_ip); + GLib.Marshaller.Free (native_initial_buffer); + conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true); + return ret; + } + + public RTSPConnection(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPConnectionAcceptCertificateFunc.cs b/sources/generated/Gst.Rtsp/RTSPConnectionAcceptCertificateFunc.cs new file mode 100644 index 0000000000..226f21f201 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPConnectionAcceptCertificateFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + + public delegate bool RTSPConnectionAcceptCertificateFunc(GLib.TlsConnection conn, GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors); + +} diff --git a/sources/generated/Gst.Rtsp/RTSPEvent.cs b/sources/generated/Gst.Rtsp/RTSPEvent.cs new file mode 100644 index 0000000000..889ab56911 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPEvent.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtsp.RTSPEventGType))] + public enum RTSPEvent : uint { + + Read = 1, + Write = 2, + } + + internal class RTSPEventGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_event_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_event_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPExtensionAdapter.cs b/sources/generated/Gst.Rtsp/RTSPExtensionAdapter.cs new file mode 100644 index 0000000000..dcb9cbc602 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPExtensionAdapter.cs @@ -0,0 +1,413 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTSPExtensionAdapter : GLib.GInterfaceAdapter, Gst.Rtsp.IRTSPExtension { + + [StructLayout (LayoutKind.Sequential)] + struct GstRTSPExtensionInterface { + public DetectServerNativeDelegate DetectServer; + public BeforeSendNativeDelegate BeforeSend; + public AfterSendNativeDelegate AfterSend; + public ParseSdpNativeDelegate ParseSdp; + public SetupMediaNativeDelegate SetupMedia; + public ConfigureStreamNativeDelegate ConfigureStream; + public GetTransportsNativeDelegate GetTransports; + public StreamSelectNativeDelegate StreamSelect; + IntPtr SendEvent; + public ReceiveRequestNativeDelegate ReceiveRequest; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + } + + static GstRTSPExtensionInterface iface; + + static RTSPExtensionAdapter () + { + GLib.GType.Register (_gtype, typeof (RTSPExtensionAdapter)); + iface.DetectServer = new DetectServerNativeDelegate (DetectServer_cb); + iface.BeforeSend = new BeforeSendNativeDelegate (BeforeSend_cb); + iface.AfterSend = new AfterSendNativeDelegate (AfterSend_cb); + iface.ParseSdp = new ParseSdpNativeDelegate (ParseSdp_cb); + iface.SetupMedia = new SetupMediaNativeDelegate (SetupMedia_cb); + iface.ConfigureStream = new ConfigureStreamNativeDelegate (ConfigureStream_cb); + iface.GetTransports = new GetTransportsNativeDelegate (GetTransports_cb); + iface.StreamSelect = new StreamSelectNativeDelegate (StreamSelect_cb); + iface.ReceiveRequest = new ReceiveRequestNativeDelegate (ReceiveRequest_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DetectServerNativeDelegate (IntPtr inst, IntPtr resp); + + static bool DetectServer_cb (IntPtr inst, IntPtr resp) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + bool __result; + __result = __obj.DetectServer (Gst.Rtsp.RTSPMessage.New (resp)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int BeforeSendNativeDelegate (IntPtr inst, IntPtr req); + + static int BeforeSend_cb (IntPtr inst, IntPtr req) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.BeforeSend (Gst.Rtsp.RTSPMessage.New (req)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AfterSendNativeDelegate (IntPtr inst, IntPtr req, IntPtr resp); + + static int AfterSend_cb (IntPtr inst, IntPtr req, IntPtr resp) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.AfterSend (Gst.Rtsp.RTSPMessage.New (req), Gst.Rtsp.RTSPMessage.New (resp)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ParseSdpNativeDelegate (IntPtr inst, IntPtr sdp, IntPtr s); + + static int ParseSdp_cb (IntPtr inst, IntPtr sdp, IntPtr s) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.ParseSdp (sdp == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (sdp, typeof (Gst.Sdp.SDPMessage), false), s == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (s, typeof (Gst.Structure), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int SetupMediaNativeDelegate (IntPtr inst, IntPtr media); + + static int SetupMedia_cb (IntPtr inst, IntPtr media) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.SetupMedia (Gst.Sdp.SDPMedia.New (media)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ConfigureStreamNativeDelegate (IntPtr inst, IntPtr caps); + + static bool ConfigureStream_cb (IntPtr inst, IntPtr caps) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + bool __result; + __result = __obj.ConfigureStream (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GetTransportsNativeDelegate (IntPtr inst, int protocols, IntPtr transport); + + static int GetTransports_cb (IntPtr inst, int protocols, IntPtr transport) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.GetTransports ((Gst.Rtsp.RTSPLowerTrans) protocols, GLib.Marshaller.Utf8PtrToString (transport)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int StreamSelectNativeDelegate (IntPtr inst, IntPtr url); + + static int StreamSelect_cb (IntPtr inst, IntPtr url) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.StreamSelect (Gst.Rtsp.RTSPUrl.New (url)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ReceiveRequestNativeDelegate (IntPtr inst, IntPtr req); + + static int ReceiveRequest_cb (IntPtr inst, IntPtr req) + { + try { + IRTSPExtensionImplementor __obj = GLib.Object.GetObject (inst, false) as IRTSPExtensionImplementor; + Gst.Rtsp.RTSPResult __result; + __result = __obj.ReceiveRequest (Gst.Rtsp.RTSPMessage.New (req)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstRTSPExtensionInterface native_iface = (GstRTSPExtensionInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstRTSPExtensionInterface)); + native_iface.DetectServer = iface.DetectServer; + native_iface.BeforeSend = iface.BeforeSend; + native_iface.AfterSend = iface.AfterSend; + native_iface.ParseSdp = iface.ParseSdp; + native_iface.SetupMedia = iface.SetupMedia; + native_iface.ConfigureStream = iface.ConfigureStream; + native_iface.GetTransports = iface.GetTransports; + native_iface.StreamSelect = iface.StreamSelect; + native_iface.ReceiveRequest = iface.ReceiveRequest; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public RTSPExtensionAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public RTSPExtensionAdapter (IRTSPExtensionImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public RTSPExtensionAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_extension_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_rtsp_extension_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IRTSPExtension GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IRTSPExtension GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IRTSPExtensionImplementor) + return new RTSPExtensionAdapter (obj as IRTSPExtensionImplementor); + else if (obj as IRTSPExtension == null) + return new RTSPExtensionAdapter (obj.Handle); + else + return obj as IRTSPExtension; + } + + public IRTSPExtensionImplementor Implementor { + get { + return implementor as IRTSPExtensionImplementor; + } + } + + [GLib.Signal("send")] + public event Gst.Rtsp.SendEventHandler SendEvent { + add { + GLib.Object.GetObject (Handle).AddSignalHandler ("send", value, typeof (Gst.Rtsp.SendEventArgs)); + } + remove { + GLib.Object.GetObject (Handle).RemoveSignalHandler ("send", value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_after_send(IntPtr raw, IntPtr req, IntPtr resp); + + public Gst.Rtsp.RTSPResult AfterSend(Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp) { + IntPtr native_req = GLib.Marshaller.StructureToPtrAlloc (req); + IntPtr native_resp = GLib.Marshaller.StructureToPtrAlloc (resp); + int raw_ret = gst_rtsp_extension_after_send(Handle, native_req, native_resp); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_req); + Marshal.FreeHGlobal (native_resp); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_before_send(IntPtr raw, IntPtr req); + + public Gst.Rtsp.RTSPResult BeforeSend(Gst.Rtsp.RTSPMessage req) { + IntPtr native_req = GLib.Marshaller.StructureToPtrAlloc (req); + int raw_ret = gst_rtsp_extension_before_send(Handle, native_req); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_req); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_extension_configure_stream(IntPtr raw, IntPtr caps); + + public bool ConfigureStream(Gst.Caps caps) { + bool raw_ret = gst_rtsp_extension_configure_stream(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_extension_detect_server(IntPtr raw, IntPtr resp); + + public bool DetectServer(Gst.Rtsp.RTSPMessage resp) { + IntPtr native_resp = GLib.Marshaller.StructureToPtrAlloc (resp); + bool raw_ret = gst_rtsp_extension_detect_server(Handle, native_resp); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_resp); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_get_transports(IntPtr raw, int protocols, IntPtr transport); + + public Gst.Rtsp.RTSPResult GetTransports(Gst.Rtsp.RTSPLowerTrans protocols, string transport) { + IntPtr native_transport = GLib.Marshaller.StringToPtrGStrdup (transport); + int raw_ret = gst_rtsp_extension_get_transports(Handle, (int) protocols, native_transport); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_transport); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_parse_sdp(IntPtr raw, IntPtr sdp, IntPtr s); + + public Gst.Rtsp.RTSPResult ParseSdp(Gst.Sdp.SDPMessage sdp, Gst.Structure s) { + int raw_ret = gst_rtsp_extension_parse_sdp(Handle, sdp == null ? IntPtr.Zero : sdp.Handle, s == null ? IntPtr.Zero : s.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_receive_request(IntPtr raw, IntPtr req); + + public Gst.Rtsp.RTSPResult ReceiveRequest(Gst.Rtsp.RTSPMessage req) { + IntPtr native_req = GLib.Marshaller.StructureToPtrAlloc (req); + int raw_ret = gst_rtsp_extension_receive_request(Handle, native_req); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_req); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_send(IntPtr raw, IntPtr req, IntPtr resp); + + public Gst.Rtsp.RTSPResult Send(Gst.Rtsp.RTSPMessage req, Gst.Rtsp.RTSPMessage resp) { + IntPtr native_req = GLib.Marshaller.StructureToPtrAlloc (req); + IntPtr native_resp = GLib.Marshaller.StructureToPtrAlloc (resp); + int raw_ret = gst_rtsp_extension_send(Handle, native_req, native_resp); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_req); + Marshal.FreeHGlobal (native_resp); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_setup_media(IntPtr raw, IntPtr media); + + public Gst.Rtsp.RTSPResult SetupMedia(Gst.Sdp.SDPMedia media) { + IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); + int raw_ret = gst_rtsp_extension_setup_media(Handle, native_media); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_media); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_extension_stream_select(IntPtr raw, IntPtr url); + + public Gst.Rtsp.RTSPResult StreamSelect(Gst.Rtsp.RTSPUrl url) { + IntPtr native_url = GLib.Marshaller.StructureToPtrAlloc (url); + int raw_ret = gst_rtsp_extension_stream_select(Handle, native_url); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_url); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPFamily.cs b/sources/generated/Gst.Rtsp/RTSPFamily.cs new file mode 100644 index 0000000000..0dd2f17550 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPFamily.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPFamilyGType))] + public enum RTSPFamily { + + None = 0, + Inet = 1, + Inet6 = 2, + } + + internal class RTSPFamilyGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_family_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_family_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPHeaderField.cs b/sources/generated/Gst.Rtsp/RTSPHeaderField.cs new file mode 100644 index 0000000000..e274eb194c --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPHeaderField.cs @@ -0,0 +1,116 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPHeaderFieldGType))] + public enum RTSPHeaderField { + + Invalid = 0, + Accept = 1, + AcceptEncoding = 2, + AcceptLanguage = 3, + Allow = 4, + Authorization = 5, + Bandwidth = 6, + Blocksize = 7, + CacheControl = 8, + Conference = 9, + Connection = 10, + ContentBase = 11, + ContentEncoding = 12, + ContentLanguage = 13, + ContentLength = 14, + ContentLocation = 15, + ContentType = 16, + Cseq = 17, + Date = 18, + Expires = 19, + From = 20, + IfModifiedSince = 21, + LastModified = 22, + ProxyAuthenticate = 23, + ProxyRequire = 24, + Public = 25, + Range = 26, + Referer = 27, + Require = 28, + RetryAfter = 29, + RtpInfo = 30, + Scale = 31, + Session = 32, + Server = 33, + Speed = 34, + Transport = 35, + Unsupported = 36, + UserAgent = 37, + Via = 38, + WwwAuthenticate = 39, + ClientChallenge = 40, + RealChallenge1 = 41, + RealChallenge2 = 42, + RealChallenge3 = 43, + Subscribe = 44, + Alert = 45, + ClientId = 46, + CompanyId = 47, + Guid = 48, + RegionData = 49, + MaxAsmWidth = 50, + Language = 51, + PlayerStartTime = 52, + Location = 53, + Etag = 54, + IfMatch = 55, + AcceptCharset = 56, + Supported = 57, + Vary = 58, + XAccelerateStreaming = 59, + XAcceptAuthent = 60, + XAcceptProxyAuthent = 61, + XBroadcastId = 62, + XBurstStreaming = 63, + XNotice = 64, + XPlayerLagTime = 65, + XPlaylist = 66, + XPlaylistChangeNotice = 67, + XPlaylistGenId = 68, + XPlaylistSeekId = 69, + XProxyClientAgent = 70, + XProxyClientVerb = 71, + XRecedingPlaylistchange = 72, + XRtpInfo = 73, + XStartupprofile = 74, + Timestamp = 75, + AuthenticationInfo = 76, + Host = 77, + Pragma = 78, + XServerIpAddress = 79, + XSessioncookie = 80, + RtcpInterval = 81, + Keymgmt = 82, + PipelinedRequests = 83, + MediaProperties = 84, + SeekStyle = 85, + AcceptRanges = 86, + Frames = 87, + RateControl = 88, + Last = 89, + } + + internal class RTSPHeaderFieldGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_header_field_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_header_field_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPLowerTrans.cs b/sources/generated/Gst.Rtsp/RTSPLowerTrans.cs new file mode 100644 index 0000000000..52d930eb12 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPLowerTrans.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtsp.RTSPLowerTransGType))] + public enum RTSPLowerTrans : uint { + + Unknown = 0, + Udp = 1, + UdpMcast = 2, + Tcp = 4, + Http = 16, + Tls = 32, + } + + internal class RTSPLowerTransGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_lower_trans_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_lower_trans_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPMessage.cs b/sources/generated/Gst.Rtsp/RTSPMessage.cs new file mode 100644 index 0000000000..43784139f0 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPMessage.cs @@ -0,0 +1,461 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPMessage : IEquatable { + + public Gst.Rtsp.RTSPMsgType Type; + private IntPtr HdrFieldsPtr; + private IntPtr _body; + private uint body_size; + private IntPtr _body_buffer; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=3)] + private IntPtr[] _gstGstReserved; + + public static Gst.Rtsp.RTSPMessage Zero = new Gst.Rtsp.RTSPMessage (); + + public static Gst.Rtsp.RTSPMessage New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPMessage.Zero; + return (Gst.Rtsp.RTSPMessage) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPMessage)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_msg_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_rtsp_msg_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_add_header(IntPtr raw, int field, IntPtr value); + + public Gst.Rtsp.RTSPResult AddHeader(Gst.Rtsp.RTSPHeaderField field, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + int raw_ret = gst_rtsp_message_add_header(this_as_native, (int) field, native_value); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_add_header_by_name(IntPtr raw, IntPtr header, IntPtr value); + + public Gst.Rtsp.RTSPResult AddHeaderByName(string header, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + int raw_ret = gst_rtsp_message_add_header_by_name(this_as_native, native_header, native_value); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_header); + GLib.Marshaller.Free (native_value); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_append_headers(IntPtr raw, IntPtr str); + + public Gst.Rtsp.RTSPResult AppendHeaders(string str) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_append_headers(this_as_native, new GLib.GString (str).Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_dump(IntPtr raw); + + public Gst.Rtsp.RTSPResult Dump() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_dump(this_as_native); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_get_body_buffer(IntPtr raw, out IntPtr buffer); + + public Gst.Rtsp.RTSPResult GetBodyBuffer(out Gst.Buffer buffer) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_buffer; + int raw_ret = gst_rtsp_message_get_body_buffer(this_as_native, out native_buffer); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_get_header(IntPtr raw, int field, out IntPtr value, int indx); + + public Gst.Rtsp.RTSPResult GetHeader(Gst.Rtsp.RTSPHeaderField field, out string value, int indx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_value; + int raw_ret = gst_rtsp_message_get_header(this_as_native, (int) field, out native_value, indx); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + value = GLib.Marshaller.Utf8PtrToString (native_value); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_get_header_by_name(IntPtr raw, IntPtr header, out IntPtr value, int index); + + public Gst.Rtsp.RTSPResult GetHeaderByName(string header, out string value, int index) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header); + IntPtr native_value; + int raw_ret = gst_rtsp_message_get_header_by_name(this_as_native, native_header, out native_value, index); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_header); + value = GLib.Marshaller.Utf8PtrToString (native_value); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_get_type(IntPtr raw); + + public Gst.Rtsp.RTSPMsgType MessageType { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_get_type(this_as_native); + Gst.Rtsp.RTSPMsgType ret = (Gst.Rtsp.RTSPMsgType) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_message_has_body_buffer(IntPtr raw); + + public bool HasBodyBuffer { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_rtsp_message_has_body_buffer(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_init(IntPtr raw); + + public Gst.Rtsp.RTSPResult Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_init(this_as_native); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_init_data(IntPtr raw, byte channel); + + public Gst.Rtsp.RTSPResult InitData(byte channel) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_init_data(this_as_native, channel); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_init_request(IntPtr raw, int method, IntPtr uri); + + public Gst.Rtsp.RTSPResult InitRequest(Gst.Rtsp.RTSPMethod method, string uri) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + int raw_ret = gst_rtsp_message_init_request(this_as_native, (int) method, native_uri); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_init_response(IntPtr raw, int code, IntPtr reason, IntPtr request); + + public Gst.Rtsp.RTSPResult InitResponse(Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_reason = GLib.Marshaller.StringToPtrGStrdup (reason); + IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc (request); + int raw_ret = gst_rtsp_message_init_response(this_as_native, (int) code, native_reason, native_request); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_reason); + Marshal.FreeHGlobal (native_request); + return ret; + } + + public Gst.Rtsp.RTSPResult InitResponse(Gst.Rtsp.RTSPStatusCode code) { + return InitResponse (code, null, Gst.Rtsp.RTSPMessage.Zero); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_parse_data(IntPtr raw, out byte channel); + + public Gst.Rtsp.RTSPResult ParseData(out byte channel) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_parse_data(this_as_native, out channel); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_parse_request(IntPtr raw, out int method, out IntPtr uri, out int version); + + public Gst.Rtsp.RTSPResult ParseRequest(out Gst.Rtsp.RTSPMethod method, out string uri, out Gst.Rtsp.RTSPVersion version) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int native_method; + IntPtr native_uri; + int native_version; + int raw_ret = gst_rtsp_message_parse_request(this_as_native, out native_method, out native_uri, out native_version); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + method = (Gst.Rtsp.RTSPMethod) native_method; + uri = GLib.Marshaller.Utf8PtrToString (native_uri); + version = (Gst.Rtsp.RTSPVersion) native_version; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_parse_response(IntPtr raw, out int code, out IntPtr reason, out int version); + + public Gst.Rtsp.RTSPResult ParseResponse(out Gst.Rtsp.RTSPStatusCode code, out string reason, out Gst.Rtsp.RTSPVersion version) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int native_code; + IntPtr native_reason; + int native_version; + int raw_ret = gst_rtsp_message_parse_response(this_as_native, out native_code, out native_reason, out native_version); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + code = (Gst.Rtsp.RTSPStatusCode) native_code; + reason = GLib.Marshaller.Utf8PtrToString (native_reason); + version = (Gst.Rtsp.RTSPVersion) native_version; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_remove_header(IntPtr raw, int field, int indx); + + public Gst.Rtsp.RTSPResult RemoveHeader(Gst.Rtsp.RTSPHeaderField field, int indx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_remove_header(this_as_native, (int) field, indx); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_remove_header_by_name(IntPtr raw, IntPtr header, int index); + + public Gst.Rtsp.RTSPResult RemoveHeaderByName(string header, int index) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header); + int raw_ret = gst_rtsp_message_remove_header_by_name(this_as_native, native_header, index); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_header); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_set_body(IntPtr raw, byte[] data, uint size); + + public Gst.Rtsp.RTSPResult SetBody(byte[] data, uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_set_body(this_as_native, data, size); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_set_body_buffer(IntPtr raw, IntPtr buffer); + + public Gst.Rtsp.RTSPResult SetBodyBuffer(Gst.Buffer buffer) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_set_body_buffer(this_as_native, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_steal_body_buffer(IntPtr raw, out IntPtr buffer); + + public Gst.Rtsp.RTSPResult StealBodyBuffer(out Gst.Buffer buffer) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_buffer; + int raw_ret = gst_rtsp_message_steal_body_buffer(this_as_native, out native_buffer); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_take_body(IntPtr raw, byte[] data, uint size); + + public Gst.Rtsp.RTSPResult TakeBody(byte[] data, uint size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_take_body(this_as_native, data, size); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_take_body_buffer(IntPtr raw, IntPtr buffer); + + public Gst.Rtsp.RTSPResult TakeBodyBuffer(Gst.Buffer buffer) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + buffer.Owned = false; + int raw_ret = gst_rtsp_message_take_body_buffer(this_as_native, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_take_header(IntPtr raw, int field, IntPtr value); + + public Gst.Rtsp.RTSPResult TakeHeader(Gst.Rtsp.RTSPHeaderField field, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_take_header(this_as_native, (int) field, GLib.Marshaller.StringToPtrGStrdup(value)); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_take_header_by_name(IntPtr raw, IntPtr header, IntPtr value); + + public Gst.Rtsp.RTSPResult TakeHeaderByName(string header, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header); + int raw_ret = gst_rtsp_message_take_header_by_name(this_as_native, native_header, GLib.Marshaller.StringToPtrGStrdup(value)); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_header); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_message_unset(IntPtr raw); + + public Gst.Rtsp.RTSPResult Unset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_message_unset(this_as_native); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtsp.RTSPMessage target) + { + target = New (native); + } + + public bool Equals (RTSPMessage other) + { + return true && Type.Equals (other.Type) && HdrFieldsPtr.Equals (other.HdrFieldsPtr) && _body.Equals (other._body) && body_size.Equals (other.body_size) && _body_buffer.Equals (other._body_buffer); + } + + public override bool Equals (object other) + { + return other is RTSPMessage && Equals ((RTSPMessage) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ HdrFieldsPtr.GetHashCode () ^ _body.GetHashCode () ^ body_size.GetHashCode () ^ _body_buffer.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Rtsp.RTSPMessage boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Rtsp.RTSPMessage.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Rtsp.RTSPMessage (GLib.Value val) + { + return (Gst.Rtsp.RTSPMessage) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPMethod.cs b/sources/generated/Gst.Rtsp/RTSPMethod.cs new file mode 100644 index 0000000000..b5cf1ab873 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPMethod.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtsp.RTSPMethodGType))] + public enum RTSPMethod : uint { + + Invalid = 0, + Describe = 1, + Announce = 2, + GetParameter = 4, + Options = 8, + Pause = 16, + Play = 32, + Record = 64, + Redirect = 128, + Setup = 256, + SetParameter = 512, + Teardown = 1024, + Get = 2048, + Post = 4096, + } + + internal class RTSPMethodGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPMsgType.cs b/sources/generated/Gst.Rtsp/RTSPMsgType.cs new file mode 100644 index 0000000000..b993de76ef --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPMsgType.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPMsgTypeGType))] + public enum RTSPMsgType { + + Invalid = 0, + Request = 1, + Response = 2, + HttpRequest = 3, + HttpResponse = 4, + Data = 5, + } + + internal class RTSPMsgTypeGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_msg_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_msg_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPProfile.cs b/sources/generated/Gst.Rtsp/RTSPProfile.cs new file mode 100644 index 0000000000..ab7c96b137 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPProfile.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtsp.RTSPProfileGType))] + public enum RTSPProfile : uint { + + Unknown = 0, + Avp = 1, + Savp = 2, + Avpf = 4, + Savpf = 8, + } + + internal class RTSPProfileGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_profile_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_profile_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPRange.cs b/sources/generated/Gst.Rtsp/RTSPRange.cs new file mode 100644 index 0000000000..69bf988d3a --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPRange.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPRange : IEquatable { + + public int Min; + public int Max; + + public static Gst.Rtsp.RTSPRange Zero = new Gst.Rtsp.RTSPRange (); + + public static Gst.Rtsp.RTSPRange New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPRange.Zero; + return (Gst.Rtsp.RTSPRange) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPRange)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_range_convert_units(IntPtr range, int unit); + + public static bool ConvertUnits(Gst.Rtsp.RTSPTimeRange range, Gst.Rtsp.RTSPRangeUnit unit) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + bool raw_ret = gst_rtsp_range_convert_units(native_range, (int) unit); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_range_free(IntPtr range); + + public static void Free(Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + gst_rtsp_range_free(native_range); + Marshal.FreeHGlobal (native_range); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_rtsp_range_get_times(IntPtr range, out ulong min, out ulong max); + + public static bool GetTimes(Gst.Rtsp.RTSPTimeRange range, out ulong min, out ulong max) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + bool raw_ret = gst_rtsp_range_get_times(native_range, out min, out max); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_range_parse(IntPtr rangestr, IntPtr range); + + public static Gst.Rtsp.RTSPResult Parse(string rangestr, out Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup (rangestr); + IntPtr native_range = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPTimeRange))); + int raw_ret = gst_rtsp_range_parse(native_rangestr, native_range); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_rangestr); + range = Gst.Rtsp.RTSPTimeRange.New (native_range); + Marshal.FreeHGlobal (native_range); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_range_to_string(IntPtr range); + + public static string ToString(Gst.Rtsp.RTSPTimeRange range) { + IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range); + IntPtr raw_ret = gst_rtsp_range_to_string(native_range); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + Marshal.FreeHGlobal (native_range); + return ret; + } + + public bool Equals (RTSPRange other) + { + return true && Min.Equals (other.Min) && Max.Equals (other.Max); + } + + public override bool Equals (object other) + { + return other is RTSPRange && Equals ((RTSPRange) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Min.GetHashCode () ^ Max.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPRangeUnit.cs b/sources/generated/Gst.Rtsp/RTSPRangeUnit.cs new file mode 100644 index 0000000000..1f4959071f --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPRangeUnit.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPRangeUnitGType))] + public enum RTSPRangeUnit { + + Smpte = 0, + Smpte30Drop = 1, + Smpte25 = 2, + Npt = 3, + Clock = 4, + } + + internal class RTSPRangeUnitGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_range_unit_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_range_unit_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPResult.cs b/sources/generated/Gst.Rtsp/RTSPResult.cs new file mode 100644 index 0000000000..495de43f62 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPResult.cs @@ -0,0 +1,44 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPResultGType))] + public enum RTSPResult { + + Elast = -17, + Etpost = -16, + Etget = -15, + Etimeout = -14, + Enotip = -13, + Enet = -12, + Eeof = -11, + Ewsaversion = -10, + Ewsastart = -9, + Eparse = -8, + Esys = -7, + Enotimpl = -6, + Eresolv = -5, + Enomem = -4, + Eintr = -3, + Einval = -2, + Error = -1, + Ok = 0, + } + + internal class RTSPResultGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPState.cs b/sources/generated/Gst.Rtsp/RTSPState.cs new file mode 100644 index 0000000000..aaf204e169 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPState.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPStateGType))] + public enum RTSPState { + + Invalid = 0, + Init = 1, + Ready = 2, + Seeking = 3, + Playing = 4, + Recording = 5, + } + + internal class RTSPStateGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPStatusCode.cs b/sources/generated/Gst.Rtsp/RTSPStatusCode.cs new file mode 100644 index 0000000000..51fa41af83 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPStatusCode.cs @@ -0,0 +1,72 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPStatusCodeGType))] + public enum RTSPStatusCode { + + Invalid = 0, + Continue = 100, + Ok = 200, + Created = 201, + LowOnStorage = 250, + MultipleChoices = 300, + MovedPermanently = 301, + MoveTemporarily = 302, + SeeOther = 303, + NotModified = 304, + UseProxy = 305, + BadRequest = 400, + Unauthorized = 401, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthRequired = 407, + RequestTimeout = 408, + Gone = 410, + LengthRequired = 411, + PreconditionFailed = 412, + RequestEntityTooLarge = 413, + RequestUriTooLarge = 414, + UnsupportedMediaType = 415, + ParameterNotUnderstood = 451, + ConferenceNotFound = 452, + NotEnoughBandwidth = 453, + SessionNotFound = 454, + MethodNotValidInThisState = 455, + HeaderFieldNotValidForResource = 456, + InvalidRange = 457, + ParameterIsReadonly = 458, + AggregateOperationNotAllowed = 459, + OnlyAggregateOperationAllowed = 460, + UnsupportedTransport = 461, + DestinationUnreachable = 462, + KeyManagementFailure = 463, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504, + RtspVersionNotSupported = 505, + OptionNotSupported = 551, + } + + internal class RTSPStatusCodeGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_status_code_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_status_code_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPTime.cs b/sources/generated/Gst.Rtsp/RTSPTime.cs new file mode 100644 index 0000000000..73c4e94c74 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTime.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPTime : IEquatable { + + public Gst.Rtsp.RTSPTimeType Type; + public double Seconds; + + public static Gst.Rtsp.RTSPTime Zero = new Gst.Rtsp.RTSPTime (); + + public static Gst.Rtsp.RTSPTime New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPTime.Zero; + return (Gst.Rtsp.RTSPTime) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPTime)); + } + + public bool Equals (RTSPTime other) + { + return true && Type.Equals (other.Type) && Seconds.Equals (other.Seconds); + } + + public override bool Equals (object other) + { + return other is RTSPTime && Equals ((RTSPTime) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Seconds.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPTime2.cs b/sources/generated/Gst.Rtsp/RTSPTime2.cs new file mode 100644 index 0000000000..0845c48627 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTime2.cs @@ -0,0 +1,48 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPTime2 : IEquatable { + + public double Frames; + public uint Year; + public uint Month; + public uint Day; + + public static Gst.Rtsp.RTSPTime2 Zero = new Gst.Rtsp.RTSPTime2 (); + + public static Gst.Rtsp.RTSPTime2 New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPTime2.Zero; + return (Gst.Rtsp.RTSPTime2) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPTime2)); + } + + public bool Equals (RTSPTime2 other) + { + return true && Frames.Equals (other.Frames) && Year.Equals (other.Year) && Month.Equals (other.Month) && Day.Equals (other.Day); + } + + public override bool Equals (object other) + { + return other is RTSPTime2 && Equals ((RTSPTime2) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Frames.GetHashCode () ^ Year.GetHashCode () ^ Month.GetHashCode () ^ Day.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPTimeRange.cs b/sources/generated/Gst.Rtsp/RTSPTimeRange.cs new file mode 100644 index 0000000000..71896a6fa4 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTimeRange.cs @@ -0,0 +1,49 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPTimeRange : IEquatable { + + public Gst.Rtsp.RTSPRangeUnit Unit; + public Gst.Rtsp.RTSPTime Min; + public Gst.Rtsp.RTSPTime Max; + public Gst.Rtsp.RTSPTime2 Min2; + public Gst.Rtsp.RTSPTime2 Max2; + + public static Gst.Rtsp.RTSPTimeRange Zero = new Gst.Rtsp.RTSPTimeRange (); + + public static Gst.Rtsp.RTSPTimeRange New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPTimeRange.Zero; + return (Gst.Rtsp.RTSPTimeRange) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPTimeRange)); + } + + public bool Equals (RTSPTimeRange other) + { + return true && Unit.Equals (other.Unit) && Min.Equals (other.Min) && Max.Equals (other.Max) && Min2.Equals (other.Min2) && Max2.Equals (other.Max2); + } + + public override bool Equals (object other) + { + return other is RTSPTimeRange && Equals ((RTSPTimeRange) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Unit.GetHashCode () ^ Min.GetHashCode () ^ Max.GetHashCode () ^ Min2.GetHashCode () ^ Max2.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPTimeType.cs b/sources/generated/Gst.Rtsp/RTSPTimeType.cs new file mode 100644 index 0000000000..76d551cbee --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTimeType.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPTimeTypeGType))] + public enum RTSPTimeType { + + Seconds = 0, + Now = 1, + End = 2, + Frames = 3, + Utc = 4, + } + + internal class RTSPTimeTypeGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_time_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_time_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPTransMode.cs b/sources/generated/Gst.Rtsp/RTSPTransMode.cs new file mode 100644 index 0000000000..6236d1dd5f --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTransMode.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Rtsp.RTSPTransModeGType))] + public enum RTSPTransMode : uint { + + Unknown = 0, + Rtp = 1, + Rdt = 2, + } + + internal class RTSPTransModeGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_trans_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_trans_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPTransport.cs b/sources/generated/Gst.Rtsp/RTSPTransport.cs new file mode 100644 index 0000000000..9435a1f57b --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPTransport.cs @@ -0,0 +1,167 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPTransport : IEquatable { + + public Gst.Rtsp.RTSPTransMode Trans; + public Gst.Rtsp.RTSPProfile Profile; + public Gst.Rtsp.RTSPLowerTrans LowerTransport; + public string Destination; + public string Source; + public uint Layers; + public bool ModePlay; + public bool ModeRecord; + public bool Append; + public Gst.Rtsp.RTSPRange Interleaved; + public uint Ttl; + public Gst.Rtsp.RTSPRange Port; + public Gst.Rtsp.RTSPRange ClientPort; + public Gst.Rtsp.RTSPRange ServerPort; + public uint Ssrc; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Rtsp.RTSPTransport Zero = new Gst.Rtsp.RTSPTransport (); + + public static Gst.Rtsp.RTSPTransport New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPTransport.Zero; + return (Gst.Rtsp.RTSPTransport) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPTransport)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_transport_as_text(IntPtr raw); + + public string AsText() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtsp_transport_as_text(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_free(IntPtr raw); + + public Gst.Rtsp.RTSPResult Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_transport_free(this_as_native); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_get_media_type(IntPtr raw, out IntPtr media_type); + + public Gst.Rtsp.RTSPResult GetMediaType(out string media_type) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_media_type; + int raw_ret = gst_rtsp_transport_get_media_type(this_as_native, out native_media_type); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + media_type = GLib.Marshaller.Utf8PtrToString (native_media_type); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_init(IntPtr raw); + + public Gst.Rtsp.RTSPResult Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_transport_init(this_as_native); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_get_manager(int trans, out IntPtr manager, uint option); + + public static Gst.Rtsp.RTSPResult GetManager(Gst.Rtsp.RTSPTransMode trans, out string manager, uint option) { + IntPtr native_manager; + int raw_ret = gst_rtsp_transport_get_manager((int) trans, out native_manager, option); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + manager = GLib.Marshaller.Utf8PtrToString (native_manager); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_get_mime(int trans, IntPtr mime); + + [Obsolete] + public static Gst.Rtsp.RTSPResult GetMime(Gst.Rtsp.RTSPTransMode trans, string mime) { + IntPtr native_mime = GLib.Marshaller.StringToPtrGStrdup (mime); + int raw_ret = gst_rtsp_transport_get_mime((int) trans, native_mime); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_mime); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_new(IntPtr transport); + + public static Gst.Rtsp.RTSPResult New(Gst.Rtsp.RTSPTransport transport) { + IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport); + int raw_ret = gst_rtsp_transport_new(native_transport); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_transport); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_transport_parse(IntPtr str, IntPtr transport); + + public static Gst.Rtsp.RTSPResult Parse(string str, Gst.Rtsp.RTSPTransport transport) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport); + int raw_ret = gst_rtsp_transport_parse(native_str, native_transport); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_str); + Marshal.FreeHGlobal (native_transport); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtsp.RTSPTransport target) + { + target = New (native); + } + + public bool Equals (RTSPTransport other) + { + return true && Trans.Equals (other.Trans) && Profile.Equals (other.Profile) && LowerTransport.Equals (other.LowerTransport) && Destination.Equals (other.Destination) && Source.Equals (other.Source) && Layers.Equals (other.Layers) && ModePlay.Equals (other.ModePlay) && ModeRecord.Equals (other.ModeRecord) && Append.Equals (other.Append) && Interleaved.Equals (other.Interleaved) && Ttl.Equals (other.Ttl) && Port.Equals (other.Port) && ClientPort.Equals (other.ClientPort) && ServerPort.Equals (other.ServerPort) && Ssrc.Equals (other.Ssrc); + } + + public override bool Equals (object other) + { + return other is RTSPTransport && Equals ((RTSPTransport) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Trans.GetHashCode () ^ Profile.GetHashCode () ^ LowerTransport.GetHashCode () ^ Destination.GetHashCode () ^ Source.GetHashCode () ^ Layers.GetHashCode () ^ ModePlay.GetHashCode () ^ ModeRecord.GetHashCode () ^ Append.GetHashCode () ^ Interleaved.GetHashCode () ^ Ttl.GetHashCode () ^ Port.GetHashCode () ^ ClientPort.GetHashCode () ^ ServerPort.GetHashCode () ^ Ssrc.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPUrl.cs b/sources/generated/Gst.Rtsp/RTSPUrl.cs new file mode 100644 index 0000000000..67519d0f8e --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPUrl.cs @@ -0,0 +1,160 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPUrl : IEquatable { + + public Gst.Rtsp.RTSPLowerTrans Transports; + public Gst.Rtsp.RTSPFamily Family; + public string User; + public string Passwd; + public string Host; + public ushort Port; + public string Abspath; + public string Query; + + public static Gst.Rtsp.RTSPUrl Zero = new Gst.Rtsp.RTSPUrl (); + + public static Gst.Rtsp.RTSPUrl New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPUrl.Zero; + return (Gst.Rtsp.RTSPUrl) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPUrl)); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_url_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_rtsp_url_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_url_decode_path_components(IntPtr raw); + + public string[] DecodePathComponents() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtsp_url_decode_path_components(this_as_native); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_url_get_port(IntPtr raw, out ushort port); + + public Gst.Rtsp.RTSPResult GetPort(out ushort port) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_url_get_port(this_as_native, out port); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_url_get_request_uri(IntPtr raw); + + public string RequestUri { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_rtsp_url_get_request_uri(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_url_get_request_uri_with_control(IntPtr raw, IntPtr control_path); + + public string GetRequestUriWithControl(string control_path) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_control_path = GLib.Marshaller.StringToPtrGStrdup (control_path); + IntPtr raw_ret = gst_rtsp_url_get_request_uri_with_control(this_as_native, native_control_path); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_control_path); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_url_set_port(IntPtr raw, ushort port); + + public Gst.Rtsp.RTSPResult SetPort(ushort port) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_rtsp_url_set_port(this_as_native, port); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_url_parse(IntPtr urlstr, IntPtr url); + + public static Gst.Rtsp.RTSPResult Parse(string urlstr, out Gst.Rtsp.RTSPUrl url) { + IntPtr native_urlstr = GLib.Marshaller.StringToPtrGStrdup (urlstr); + IntPtr native_url = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPUrl))); + int raw_ret = gst_rtsp_url_parse(native_urlstr, native_url); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + GLib.Marshaller.Free (native_urlstr); + url = Gst.Rtsp.RTSPUrl.New (native_url); + Marshal.FreeHGlobal (native_url); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Rtsp.RTSPUrl target) + { + target = New (native); + } + + public bool Equals (RTSPUrl other) + { + return true && Transports.Equals (other.Transports) && Family.Equals (other.Family) && User.Equals (other.User) && Passwd.Equals (other.Passwd) && Host.Equals (other.Host) && Port.Equals (other.Port) && Abspath.Equals (other.Abspath) && Query.Equals (other.Query); + } + + public override bool Equals (object other) + { + return other is RTSPUrl && Equals ((RTSPUrl) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Transports.GetHashCode () ^ Family.GetHashCode () ^ User.GetHashCode () ^ Passwd.GetHashCode () ^ Host.GetHashCode () ^ Port.GetHashCode () ^ Abspath.GetHashCode () ^ Query.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Rtsp.RTSPUrl boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Rtsp.RTSPUrl.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Rtsp.RTSPUrl (GLib.Value val) + { + return (Gst.Rtsp.RTSPUrl) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPVersion.cs b/sources/generated/Gst.Rtsp/RTSPVersion.cs new file mode 100644 index 0000000000..20fda326e7 --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPVersion.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Rtsp.RTSPVersionGType))] + public enum RTSPVersion { + + Invalid = 0, + _110 = 16, + _111 = 17, + _220 = 32, + } + + internal class RTSPVersionGType { + [DllImport ("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rtsp_version_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rtsp_version_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Rtsp/RTSPWatch.cs b/sources/generated/Gst.Rtsp/RTSPWatch.cs new file mode 100644 index 0000000000..2df7e36caa --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPWatch.cs @@ -0,0 +1,140 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class RTSPWatch : GLib.Opaque { + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_rtsp_watch_attach(IntPtr raw, IntPtr context); + + public uint Attach(GLib.MainContext context) { + uint raw_ret = gst_rtsp_watch_attach(Handle, context == null ? IntPtr.Zero : context.Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_watch_get_send_backlog(IntPtr raw, out UIntPtr bytes, out uint messages); + + public void GetSendBacklog(out ulong bytes, out uint messages) { + UIntPtr native_bytes; + gst_rtsp_watch_get_send_backlog(Handle, out native_bytes, out messages); + bytes = (ulong) native_bytes; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_watch_reset(IntPtr raw); + + public void Reset() { + gst_rtsp_watch_reset(Handle); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_watch_send_message(IntPtr raw, IntPtr message, out uint id); + + public Gst.Rtsp.RTSPResult SendMessage(Gst.Rtsp.RTSPMessage message, out uint id) { + IntPtr native_message = GLib.Marshaller.StructureToPtrAlloc (message); + int raw_ret = gst_rtsp_watch_send_message(Handle, native_message, out id); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + Marshal.FreeHGlobal (native_message); + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_watch_send_messages(IntPtr raw, Gst.Rtsp.RTSPMessage[] messages, uint n_messages, out uint id); + + public Gst.Rtsp.RTSPResult SendMessages(Gst.Rtsp.RTSPMessage[] messages, out uint id) { + int raw_ret = gst_rtsp_watch_send_messages(Handle, messages, (uint) (messages == null ? 0 : messages.Length), out id); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_watch_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + set { + gst_rtsp_watch_set_flushing(Handle, value); + } + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_watch_set_send_backlog(IntPtr raw, UIntPtr bytes, uint messages); + + public void SetSendBacklog(ulong bytes, uint messages) { + gst_rtsp_watch_set_send_backlog(Handle, new UIntPtr (bytes), messages); + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_watch_wait_backlog(IntPtr raw, IntPtr timeout); + + [Obsolete] + public Gst.Rtsp.RTSPResult WaitBacklog(IntPtr timeout) { + int raw_ret = gst_rtsp_watch_wait_backlog(Handle, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_watch_wait_backlog_usec(IntPtr raw, long timeout); + + public Gst.Rtsp.RTSPResult WaitBacklogUsec(long timeout) { + int raw_ret = gst_rtsp_watch_wait_backlog_usec(Handle, timeout); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_rtsp_watch_write_data(IntPtr raw, byte[] data, uint size, out uint id); + + public Gst.Rtsp.RTSPResult WriteData(byte[] data, uint size, out uint id) { + int raw_ret = gst_rtsp_watch_write_data(Handle, data, size, out id); + Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret; + return ret; + } + + public RTSPWatch(IntPtr raw) : base(raw) {} + + [DllImport("gstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_rtsp_watch_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_rtsp_watch_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_rtsp_watch_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/RTSPWatchFuncs.cs b/sources/generated/Gst.Rtsp/RTSPWatchFuncs.cs new file mode 100644 index 0000000000..4fa204d53e --- /dev/null +++ b/sources/generated/Gst.Rtsp/RTSPWatchFuncs.cs @@ -0,0 +1,55 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct RTSPWatchFuncs : IEquatable { + + private IntPtr _message_received; + private IntPtr _message_sent; + private IntPtr _closed; + private IntPtr _error; + private IntPtr _tunnel_start; + private IntPtr _tunnel_complete; + private IntPtr _error_full; + private IntPtr _tunnel_lost; + private IntPtr _tunnel_http_response; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=3)] + private IntPtr[] _gstGstReserved; + + public static Gst.Rtsp.RTSPWatchFuncs Zero = new Gst.Rtsp.RTSPWatchFuncs (); + + public static Gst.Rtsp.RTSPWatchFuncs New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Rtsp.RTSPWatchFuncs.Zero; + return (Gst.Rtsp.RTSPWatchFuncs) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPWatchFuncs)); + } + + public bool Equals (RTSPWatchFuncs other) + { + return true && _message_received.Equals (other._message_received) && _message_sent.Equals (other._message_sent) && _closed.Equals (other._closed) && _error.Equals (other._error) && _tunnel_start.Equals (other._tunnel_start) && _tunnel_complete.Equals (other._tunnel_complete) && _error_full.Equals (other._error_full) && _tunnel_lost.Equals (other._tunnel_lost) && _tunnel_http_response.Equals (other._tunnel_http_response); + } + + public override bool Equals (object other) + { + return other is RTSPWatchFuncs && Equals ((RTSPWatchFuncs) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ _message_received.GetHashCode () ^ _message_sent.GetHashCode () ^ _closed.GetHashCode () ^ _error.GetHashCode () ^ _tunnel_start.GetHashCode () ^ _tunnel_complete.GetHashCode () ^ _error_full.GetHashCode () ^ _tunnel_lost.GetHashCode () ^ _tunnel_http_response.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Rtsp/SendEventHandler.cs b/sources/generated/Gst.Rtsp/SendEventHandler.cs new file mode 100644 index 0000000000..1124a8dec8 --- /dev/null +++ b/sources/generated/Gst.Rtsp/SendEventHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Rtsp { + + using System; + + public delegate void SendEventHandler(object o, SendEventArgs args); + + public class SendEventArgs : GLib.SignalArgs { + public IntPtr Object{ + get { + return (IntPtr) Args [0]; + } + } + + public IntPtr P0{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst.Sdp/Constants.cs b/sources/generated/Gst.Sdp/Constants.cs new file mode 100644 index 0000000000..a305c06a6a --- /dev/null +++ b/sources/generated/Gst.Sdp/Constants.cs @@ -0,0 +1,23 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const int MIKEY_VERSION = 1; + public const string SDP_BWTYPE_AS = @"AS"; + public const string SDP_BWTYPE_CT = @"CT"; + public const string SDP_BWTYPE_EXT_PREFIX = @"X-"; + public const string SDP_BWTYPE_RR = @"RR"; + public const string SDP_BWTYPE_RS = @"RS"; + public const string SDP_BWTYPE_TIAS = @"TIAS"; +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/Global.cs b/sources/generated/Gst.Sdp/Global.cs new file mode 100644 index 0000000000..28a9c916b7 --- /dev/null +++ b/sources/generated/Gst.Sdp/Global.cs @@ -0,0 +1,122 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_sdp_address_is_multicast(IntPtr nettype, IntPtr addrtype, IntPtr addr); + + public static bool SdpAddressIsMulticast(string nettype, string addrtype, string addr) { + IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); + IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); + IntPtr native_addr = GLib.Marshaller.StringToPtrGStrdup (addr); + bool raw_ret = gst_sdp_address_is_multicast(native_nettype, native_addrtype, native_addr); + bool ret = raw_ret; + GLib.Marshaller.Free (native_nettype); + GLib.Marshaller.Free (native_addrtype); + GLib.Marshaller.Free (native_addr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_make_keymgmt(IntPtr uri, IntPtr base64); + + public static string SdpMakeKeymgmt(string uri, string base64) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_base64 = GLib.Marshaller.StringToPtrGStrdup (base64); + IntPtr raw_ret = gst_sdp_make_keymgmt(native_uri, native_base64); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_base64); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_new(IntPtr media); + + public static Gst.Sdp.SDPResult SdpMediaNew(out Gst.Sdp.SDPMedia media) { + IntPtr native_media = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Sdp.SDPMedia))); + int raw_ret = gst_sdp_media_new(native_media); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + media = Gst.Sdp.SDPMedia.New (native_media); + Marshal.FreeHGlobal (native_media); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_media_from_caps(IntPtr caps, IntPtr media); + + public static Gst.Sdp.SDPResult SdpMediaSetMediaFromCaps(Gst.Caps caps, Gst.Sdp.SDPMedia media) { + IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); + int raw_ret = gst_sdp_media_set_media_from_caps(caps == null ? IntPtr.Zero : caps.Handle, native_media); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_media); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_as_uri(IntPtr scheme, IntPtr msg); + + public static string SdpMessageAsUri(string scheme, Gst.Sdp.SDPMessage msg) { + IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); + IntPtr raw_ret = gst_sdp_message_as_uri(native_scheme, msg == null ? IntPtr.Zero : msg.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_scheme); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_new(out IntPtr msg); + + public static Gst.Sdp.SDPResult SdpMessageNew(out Gst.Sdp.SDPMessage msg) { + IntPtr native_msg; + int raw_ret = gst_sdp_message_new(out native_msg); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_new_from_text(IntPtr text, out IntPtr msg); + + public static Gst.Sdp.SDPResult SdpMessageNewFromText(string text, out Gst.Sdp.SDPMessage msg) { + IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); + IntPtr native_msg; + int raw_ret = gst_sdp_message_new_from_text(native_text, out native_msg); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_text); + msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_parse_buffer(byte[] data, uint size, IntPtr msg); + + public static Gst.Sdp.SDPResult SdpMessageParseBuffer(byte[] data, uint size, Gst.Sdp.SDPMessage msg) { + int raw_ret = gst_sdp_message_parse_buffer(data, size, msg == null ? IntPtr.Zero : msg.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_parse_uri(IntPtr uri, IntPtr msg); + + public static Gst.Sdp.SDPResult SdpMessageParseUri(string uri, Gst.Sdp.SDPMessage msg) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + int raw_ret = gst_sdp_message_parse_uri(native_uri, msg == null ? IntPtr.Zero : msg.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYCacheType.cs b/sources/generated/Gst.Sdp/MIKEYCacheType.cs new file mode 100644 index 0000000000..a536ab3eec --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYCacheType.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYCacheType { + + None = 0, + Always = 1, + ForCsb = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYDecryptInfo.cs b/sources/generated/Gst.Sdp/MIKEYDecryptInfo.cs new file mode 100644 index 0000000000..8fd29fcf3f --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYDecryptInfo.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MIKEYDecryptInfo : GLib.Opaque { + + public MIKEYDecryptInfo(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYEncAlg.cs b/sources/generated/Gst.Sdp/MIKEYEncAlg.cs new file mode 100644 index 0000000000..b8b7709087 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYEncAlg.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYEncAlg { + + Null = 0, + AesCm128 = 1, + AesKw128 = 2, + AesGcm128 = 6, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYEncryptInfo.cs b/sources/generated/Gst.Sdp/MIKEYEncryptInfo.cs new file mode 100644 index 0000000000..5c1013a35a --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYEncryptInfo.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MIKEYEncryptInfo : GLib.Opaque { + + public MIKEYEncryptInfo(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYKVType.cs b/sources/generated/Gst.Sdp/MIKEYKVType.cs new file mode 100644 index 0000000000..bd4c295337 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYKVType.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYKVType { + + Null = 0, + Spi = 1, + Interval = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYKeyDataType.cs b/sources/generated/Gst.Sdp/MIKEYKeyDataType.cs new file mode 100644 index 0000000000..b7c7b848c8 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYKeyDataType.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYKeyDataType { + + Tgk = 0, + Tek = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYMacAlg.cs b/sources/generated/Gst.Sdp/MIKEYMacAlg.cs new file mode 100644 index 0000000000..02bdc87185 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYMacAlg.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYMacAlg { + + Null = 0, + HmacSha1160 = 1, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYMapSRTP.cs b/sources/generated/Gst.Sdp/MIKEYMapSRTP.cs new file mode 100644 index 0000000000..e1f938ff5a --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYMapSRTP.cs @@ -0,0 +1,47 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYMapSRTP : IEquatable { + + public byte Policy; + public uint Ssrc; + public uint Roc; + + public static Gst.Sdp.MIKEYMapSRTP Zero = new Gst.Sdp.MIKEYMapSRTP (); + + public static Gst.Sdp.MIKEYMapSRTP New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYMapSRTP.Zero; + return (Gst.Sdp.MIKEYMapSRTP) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYMapSRTP)); + } + + public bool Equals (MIKEYMapSRTP other) + { + return true && Policy.Equals (other.Policy) && Ssrc.Equals (other.Ssrc) && Roc.Equals (other.Roc); + } + + public override bool Equals (object other) + { + return other is MIKEYMapSRTP && Equals ((MIKEYMapSRTP) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Policy.GetHashCode () ^ Ssrc.GetHashCode () ^ Roc.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYMapType.cs b/sources/generated/Gst.Sdp/MIKEYMapType.cs new file mode 100644 index 0000000000..9f30c4c52f --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYMapType.cs @@ -0,0 +1,15 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYMapType { + + MikeyMapTypeSrtp = 0, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYMessage.cs b/sources/generated/Gst.Sdp/MIKEYMessage.cs new file mode 100644 index 0000000000..27d7711888 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYMessage.cs @@ -0,0 +1,484 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MIKEYMessage : Gst.MiniObject { + + public byte Version { + get { + unsafe { + byte* raw_ptr = (byte*)(((byte*)Handle) + abi_info.GetFieldOffset("version")); + return (*raw_ptr); + } + } + set { + unsafe { + byte* raw_ptr = (byte*)(((byte*)Handle) + abi_info.GetFieldOffset("version")); + *raw_ptr = value; + } + } + } + + public Gst.Sdp.MIKEYType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.Sdp.MIKEYType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public bool V { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("V")); + return (*raw_ptr); + } + } + set { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("V")); + *raw_ptr = value; + } + } + } + + public Gst.Sdp.MIKEYPRFFunc PrfFunc { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("prf_func")); + return (Gst.Sdp.MIKEYPRFFunc) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("prf_func")); + *raw_ptr = (int) value; + } + } + } + + public uint CSBId { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("CSB_id")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("CSB_id")); + *raw_ptr = value; + } + } + } + + public Gst.Sdp.MIKEYMapType MapType { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("map_type")); + return (Gst.Sdp.MIKEYMapType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("map_type")); + *raw_ptr = (int) value; + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_mikey_message_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_cs_srtp(IntPtr raw, byte policy, uint ssrc, uint roc); + + public bool AddCsSrtp(byte policy, uint ssrc, uint roc) { + bool raw_ret = gst_mikey_message_add_cs_srtp(Handle, policy, ssrc, roc); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_payload(IntPtr raw, IntPtr payload); + + public bool AddPayload(Gst.Sdp.MIKEYPayload payload) { + payload.Owned = false; + bool raw_ret = gst_mikey_message_add_payload(Handle, payload == null ? IntPtr.Zero : payload.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_pke(IntPtr raw, int C, ushort data_len, byte[] data); + + public bool AddPke(Gst.Sdp.MIKEYCacheType C, ushort data_len, byte[] data) { + bool raw_ret = gst_mikey_message_add_pke(Handle, (int) C, data_len, data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_rand(IntPtr raw, byte len, byte[] rand); + + public bool AddRand(byte len, byte[] rand) { + bool raw_ret = gst_mikey_message_add_rand(Handle, len, rand); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_rand_len(IntPtr raw, byte len); + + public bool AddRandLen(byte len) { + bool raw_ret = gst_mikey_message_add_rand_len(Handle, len); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_t(IntPtr raw, int type, byte[] ts_value); + + public bool AddT(Gst.Sdp.MIKEYTSType type, byte[] ts_value) { + bool raw_ret = gst_mikey_message_add_t(Handle, (int) type, ts_value); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_add_t_now_ntp_utc(IntPtr raw); + + public bool AddTNowNtpUtc() { + bool raw_ret = gst_mikey_message_add_t_now_ntp_utc(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_base64_encode(IntPtr raw); + + public string Base64Encode() { + IntPtr raw_ret = gst_mikey_message_base64_encode(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_find_payload(IntPtr raw, int type, uint nth); + + public Gst.Sdp.MIKEYPayload FindPayload(Gst.Sdp.MIKEYPayloadType type, uint nth) { + IntPtr raw_ret = gst_mikey_message_find_payload(Handle, (int) type, nth); + Gst.Sdp.MIKEYPayload ret = raw_ret == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sdp.MIKEYPayload), false); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_get_cs_srtp(IntPtr raw, uint idx); + + public Gst.Sdp.MIKEYMapSRTP GetCsSrtp(uint idx) { + IntPtr raw_ret = gst_mikey_message_get_cs_srtp(Handle, idx); + Gst.Sdp.MIKEYMapSRTP ret = Gst.Sdp.MIKEYMapSRTP.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_mikey_message_get_n_cs(IntPtr raw); + + public uint NCs { + get { + uint raw_ret = gst_mikey_message_get_n_cs(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_mikey_message_get_n_payloads(IntPtr raw); + + public uint NPayloads { + get { + uint raw_ret = gst_mikey_message_get_n_payloads(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_get_payload(IntPtr raw, uint idx); + + public Gst.Sdp.MIKEYPayload GetPayload(uint idx) { + IntPtr raw_ret = gst_mikey_message_get_payload(Handle, idx); + Gst.Sdp.MIKEYPayload ret = raw_ret == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sdp.MIKEYPayload), false); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_insert_cs_srtp(IntPtr raw, int idx, IntPtr map); + + public bool InsertCsSrtp(int idx, Gst.Sdp.MIKEYMapSRTP map) { + IntPtr native_map = GLib.Marshaller.StructureToPtrAlloc (map); + bool raw_ret = gst_mikey_message_insert_cs_srtp(Handle, idx, native_map); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_map); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_insert_payload(IntPtr raw, uint idx, IntPtr payload); + + public bool InsertPayload(uint idx, Gst.Sdp.MIKEYPayload payload) { + payload.Owned = false; + bool raw_ret = gst_mikey_message_insert_payload(Handle, idx, payload == null ? IntPtr.Zero : payload.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_remove_cs_srtp(IntPtr raw, int idx); + + public bool RemoveCsSrtp(int idx) { + bool raw_ret = gst_mikey_message_remove_cs_srtp(Handle, idx); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_remove_payload(IntPtr raw, uint idx); + + public bool RemovePayload(uint idx) { + bool raw_ret = gst_mikey_message_remove_payload(Handle, idx); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_replace_cs_srtp(IntPtr raw, int idx, IntPtr map); + + public bool ReplaceCsSrtp(int idx, Gst.Sdp.MIKEYMapSRTP map) { + IntPtr native_map = GLib.Marshaller.StructureToPtrAlloc (map); + bool raw_ret = gst_mikey_message_replace_cs_srtp(Handle, idx, native_map); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_map); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_replace_payload(IntPtr raw, uint idx, IntPtr payload); + + public bool ReplacePayload(uint idx, Gst.Sdp.MIKEYPayload payload) { + payload.Owned = false; + bool raw_ret = gst_mikey_message_replace_payload(Handle, idx, payload == null ? IntPtr.Zero : payload.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_set_info(IntPtr raw, byte version, int type, bool V, int prf_func, uint CSB_id, int map_type); + + public bool SetInfo(byte version, Gst.Sdp.MIKEYType type, bool V, Gst.Sdp.MIKEYPRFFunc prf_func, uint CSB_id, Gst.Sdp.MIKEYMapType map_type) { + bool raw_ret = gst_mikey_message_set_info(Handle, version, (int) type, V, (int) prf_func, CSB_id, (int) map_type); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_mikey_message_to_bytes(IntPtr raw, IntPtr info, out IntPtr error); + + public unsafe GLib.Bytes ToBytes(Gst.Sdp.MIKEYEncryptInfo info) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_mikey_message_to_bytes(Handle, info == null ? IntPtr.Zero : info.Handle, out error); + GLib.Bytes ret = new GLib.Bytes(raw_ret); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_message_to_caps(IntPtr raw, IntPtr caps); + + public bool ToCaps(Gst.Caps caps) { + bool raw_ret = gst_mikey_message_to_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + public MIKEYMessage(IntPtr raw) : base(raw) {} + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_new(); + + public MIKEYMessage () + { + Raw = gst_mikey_message_new(); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_new_from_bytes(IntPtr bytes, IntPtr info); + + public MIKEYMessage (GLib.Bytes bytes, Gst.Sdp.MIKEYDecryptInfo info) + { + Raw = gst_mikey_message_new_from_bytes(bytes == null ? IntPtr.Zero : bytes.Handle, info == null ? IntPtr.Zero : info.Handle); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_new_from_caps(IntPtr caps); + + public MIKEYMessage (Gst.Caps caps) + { + Raw = gst_mikey_message_new_from_caps(caps == null ? IntPtr.Zero : caps.Handle); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_message_new_from_data(byte[] data, UIntPtr n_length, IntPtr info); + + public MIKEYMessage (byte[] data, Gst.Sdp.MIKEYDecryptInfo info) + { + Raw = gst_mikey_message_new_from_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)), info == null ? IntPtr.Zero : info.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("version" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(byte)) // version + , null + , "type" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_versionAlign), "version") + , 0 + ), + new GLib.AbiField("type" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Sdp.MIKEYType))) // type + , "version" + , "V" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_typeAlign), "type") + , 0 + ), + new GLib.AbiField("V" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // V + , "type" + , "prf_func" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_VAlign), "V") + , 0 + ), + new GLib.AbiField("prf_func" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Sdp.MIKEYPRFFunc))) // prf_func + , "V" + , "CSB_id" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_prf_funcAlign), "prf_func") + , 0 + ), + new GLib.AbiField("CSB_id" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // CSB_id + , "prf_func" + , "map_type" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_CSB_idAlign), "CSB_id") + , 0 + ), + new GLib.AbiField("map_type" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Sdp.MIKEYMapType))) // map_type + , "CSB_id" + , "map_info" + , (long) Marshal.OffsetOf(typeof(GstMIKEYMessage_map_typeAlign), "map_type") + , 0 + ), + new GLib.AbiField("map_info" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // map_info + , "map_type" + , "payloads" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("payloads" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // payloads + , "map_info" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_versionAlign + { + sbyte f1; + private byte version; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_typeAlign + { + sbyte f1; + private Gst.Sdp.MIKEYType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_VAlign + { + sbyte f1; + private bool V; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_prf_funcAlign + { + sbyte f1; + private Gst.Sdp.MIKEYPRFFunc prf_func; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_CSB_idAlign + { + sbyte f1; + private uint CSB_id; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYMessage_map_typeAlign + { + sbyte f1; + private Gst.Sdp.MIKEYMapType map_type; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPRFFunc.cs b/sources/generated/Gst.Sdp/MIKEYPRFFunc.cs new file mode 100644 index 0000000000..7d2563ebe4 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPRFFunc.cs @@ -0,0 +1,15 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYPRFFunc { + + MikeyPrfMikey1 = 0, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayload.cs b/sources/generated/Gst.Sdp/MIKEYPayload.cs new file mode 100644 index 0000000000..e8f9b2f9f9 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayload.cs @@ -0,0 +1,271 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MIKEYPayload : Gst.MiniObject { + + public Gst.Sdp.MIKEYPayloadType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.Sdp.MIKEYPayloadType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public uint Len { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("len")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("len")); + *raw_ptr = value; + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_payload_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_mikey_payload_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_kemac_add_sub(IntPtr raw, IntPtr newpay); + + public bool KemacAddSub(Gst.Sdp.MIKEYPayload newpay) { + newpay.Owned = false; + bool raw_ret = gst_mikey_payload_kemac_add_sub(Handle, newpay == null ? IntPtr.Zero : newpay.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_mikey_payload_kemac_get_n_sub(IntPtr raw); + + public uint KemacGetNSub() { + uint raw_ret = gst_mikey_payload_kemac_get_n_sub(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_payload_kemac_get_sub(IntPtr raw, uint idx); + + public Gst.Sdp.MIKEYPayload KemacGetSub(uint idx) { + IntPtr raw_ret = gst_mikey_payload_kemac_get_sub(Handle, idx); + Gst.Sdp.MIKEYPayload ret = raw_ret == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sdp.MIKEYPayload), false); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_kemac_remove_sub(IntPtr raw, uint idx); + + public bool KemacRemoveSub(uint idx) { + bool raw_ret = gst_mikey_payload_kemac_remove_sub(Handle, idx); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_kemac_set(IntPtr raw, int enc_alg, int mac_alg); + + public bool KemacSet(Gst.Sdp.MIKEYEncAlg enc_alg, Gst.Sdp.MIKEYMacAlg mac_alg) { + bool raw_ret = gst_mikey_payload_kemac_set(Handle, (int) enc_alg, (int) mac_alg); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_key_data_set_interval(IntPtr raw, byte vf_len, byte[] vf_data, byte vt_len, byte[] vt_data); + + public bool KeyDataSetInterval(byte vf_len, byte[] vf_data, byte vt_len, byte[] vt_data) { + bool raw_ret = gst_mikey_payload_key_data_set_interval(Handle, vf_len, vf_data, vt_len, vt_data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_key_data_set_key(IntPtr raw, int key_type, ushort key_len, byte[] key_data); + + public bool KeyDataSetKey(Gst.Sdp.MIKEYKeyDataType key_type, ushort key_len, byte[] key_data) { + bool raw_ret = gst_mikey_payload_key_data_set_key(Handle, (int) key_type, key_len, key_data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_key_data_set_salt(IntPtr raw, ushort salt_len, byte[] salt_data); + + public bool KeyDataSetSalt(ushort salt_len, byte[] salt_data) { + bool raw_ret = gst_mikey_payload_key_data_set_salt(Handle, salt_len, salt_data); + bool ret = raw_ret; + return ret; + } + + public bool KeyDataSetSalt(ushort salt_len) { + return KeyDataSetSalt (salt_len, null); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_key_data_set_spi(IntPtr raw, byte spi_len, byte[] spi_data); + + public bool KeyDataSetSpi(byte spi_len, byte[] spi_data) { + bool raw_ret = gst_mikey_payload_key_data_set_spi(Handle, spi_len, spi_data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_pke_set(IntPtr raw, int C, ushort data_len, byte[] data); + + public bool PkeSet(Gst.Sdp.MIKEYCacheType C, ushort data_len, byte[] data) { + bool raw_ret = gst_mikey_payload_pke_set(Handle, (int) C, data_len, data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_rand_set(IntPtr raw, byte len, byte[] rand); + + public bool RandSet(byte len, byte[] rand) { + bool raw_ret = gst_mikey_payload_rand_set(Handle, len, rand); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_sp_add_param(IntPtr raw, byte type, byte len, byte[] val); + + public bool SpAddParam(byte type, byte len, byte[] val) { + bool raw_ret = gst_mikey_payload_sp_add_param(Handle, type, len, val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_mikey_payload_sp_get_n_params(IntPtr raw); + + public uint SpGetNParams() { + uint raw_ret = gst_mikey_payload_sp_get_n_params(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_payload_sp_get_param(IntPtr raw, uint idx); + + public Gst.Sdp.MIKEYPayloadSPParam SpGetParam(uint idx) { + IntPtr raw_ret = gst_mikey_payload_sp_get_param(Handle, idx); + Gst.Sdp.MIKEYPayloadSPParam ret = Gst.Sdp.MIKEYPayloadSPParam.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_sp_remove_param(IntPtr raw, uint idx); + + public bool SpRemoveParam(uint idx) { + bool raw_ret = gst_mikey_payload_sp_remove_param(Handle, idx); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_sp_set(IntPtr raw, uint policy, int proto); + + public bool SpSet(uint policy, Gst.Sdp.MIKEYSecProto proto) { + bool raw_ret = gst_mikey_payload_sp_set(Handle, policy, (int) proto); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mikey_payload_t_set(IntPtr raw, int type, byte[] ts_value); + + public bool TSet(Gst.Sdp.MIKEYTSType type, byte[] ts_value) { + bool raw_ret = gst_mikey_payload_t_set(Handle, (int) type, ts_value); + bool ret = raw_ret; + return ret; + } + + public MIKEYPayload(IntPtr raw) : base(raw) {} + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mikey_payload_new(int type); + + public MIKEYPayload (Gst.Sdp.MIKEYPayloadType type) + { + Raw = gst_mikey_payload_new((int) type); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Sdp.MIKEYPayloadType))) // type + , null + , "len" + , (long) Marshal.OffsetOf(typeof(GstMIKEYPayload_typeAlign), "type") + , 0 + ), + new GLib.AbiField("len" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // len + , "type" + , null + , (long) Marshal.OffsetOf(typeof(GstMIKEYPayload_lenAlign), "len") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYPayload_typeAlign + { + sbyte f1; + private Gst.Sdp.MIKEYPayloadType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMIKEYPayload_lenAlign + { + sbyte f1; + private uint len; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadKEMAC.cs b/sources/generated/Gst.Sdp/MIKEYPayloadKEMAC.cs new file mode 100644 index 0000000000..851bba96b0 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadKEMAC.cs @@ -0,0 +1,60 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadKEMAC : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Sdp.MIKEYEncAlg EncAlg; + public Gst.Sdp.MIKEYMacAlg MacAlg; + private IntPtr SubpayloadsPtr; + public IntPtr[] Subpayloads { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (SubpayloadsPtr); } + set { SubpayloadsPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + + public static Gst.Sdp.MIKEYPayloadKEMAC Zero = new Gst.Sdp.MIKEYPayloadKEMAC (); + + public static Gst.Sdp.MIKEYPayloadKEMAC New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadKEMAC.Zero; + return (Gst.Sdp.MIKEYPayloadKEMAC) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadKEMAC)); + } + + public bool Equals (MIKEYPayloadKEMAC other) + { + return true && Pt.Equals (other.Pt) && EncAlg.Equals (other.EncAlg) && MacAlg.Equals (other.MacAlg) && SubpayloadsPtr.Equals (other.SubpayloadsPtr); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadKEMAC && Equals ((MIKEYPayloadKEMAC) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ EncAlg.GetHashCode () ^ MacAlg.GetHashCode () ^ SubpayloadsPtr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadKeyData.cs b/sources/generated/Gst.Sdp/MIKEYPayloadKeyData.cs new file mode 100644 index 0000000000..bcd2bbcbb1 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadKeyData.cs @@ -0,0 +1,63 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadKeyData : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Sdp.MIKEYKeyDataType KeyType; + public ushort KeyLen; + private IntPtr _key_data; + public ushort SaltLen; + private IntPtr _salt_data; + public Gst.Sdp.MIKEYKVType KvType; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + public byte[] KvLen; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] + public byte[] KvData; + + public static Gst.Sdp.MIKEYPayloadKeyData Zero = new Gst.Sdp.MIKEYPayloadKeyData (); + + public static Gst.Sdp.MIKEYPayloadKeyData New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadKeyData.Zero; + return (Gst.Sdp.MIKEYPayloadKeyData) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadKeyData)); + } + + public bool Equals (MIKEYPayloadKeyData other) + { + return true && Pt.Equals (other.Pt) && KeyType.Equals (other.KeyType) && KeyLen.Equals (other.KeyLen) && _key_data.Equals (other._key_data) && SaltLen.Equals (other.SaltLen) && _salt_data.Equals (other._salt_data) && KvType.Equals (other.KvType) && KvLen.Equals (other.KvLen) && KvData.Equals (other.KvData); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadKeyData && Equals ((MIKEYPayloadKeyData) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ KeyType.GetHashCode () ^ KeyLen.GetHashCode () ^ _key_data.GetHashCode () ^ SaltLen.GetHashCode () ^ _salt_data.GetHashCode () ^ KvType.GetHashCode () ^ KvLen.GetHashCode () ^ KvData.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadPKE.cs b/sources/generated/Gst.Sdp/MIKEYPayloadPKE.cs new file mode 100644 index 0000000000..7bfb3da34d --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadPKE.cs @@ -0,0 +1,56 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadPKE : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Sdp.MIKEYCacheType C; + public ushort DataLen; + private IntPtr _data; + + public static Gst.Sdp.MIKEYPayloadPKE Zero = new Gst.Sdp.MIKEYPayloadPKE (); + + public static Gst.Sdp.MIKEYPayloadPKE New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadPKE.Zero; + return (Gst.Sdp.MIKEYPayloadPKE) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadPKE)); + } + + public bool Equals (MIKEYPayloadPKE other) + { + return true && Pt.Equals (other.Pt) && C.Equals (other.C) && DataLen.Equals (other.DataLen) && _data.Equals (other._data); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadPKE && Equals ((MIKEYPayloadPKE) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ C.GetHashCode () ^ DataLen.GetHashCode () ^ _data.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadRAND.cs b/sources/generated/Gst.Sdp/MIKEYPayloadRAND.cs new file mode 100644 index 0000000000..05b907c8a4 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadRAND.cs @@ -0,0 +1,55 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadRAND : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public byte Len; + public byte Rand; + + public static Gst.Sdp.MIKEYPayloadRAND Zero = new Gst.Sdp.MIKEYPayloadRAND (); + + public static Gst.Sdp.MIKEYPayloadRAND New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadRAND.Zero; + return (Gst.Sdp.MIKEYPayloadRAND) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadRAND)); + } + + public bool Equals (MIKEYPayloadRAND other) + { + return true && Pt.Equals (other.Pt) && Len.Equals (other.Len) && Rand.Equals (other.Rand); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadRAND && Equals ((MIKEYPayloadRAND) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ Len.GetHashCode () ^ Rand.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadSP.cs b/sources/generated/Gst.Sdp/MIKEYPayloadSP.cs new file mode 100644 index 0000000000..a0073c7cf7 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadSP.cs @@ -0,0 +1,60 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadSP : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public uint Policy; + public Gst.Sdp.MIKEYSecProto Proto; + private IntPtr ParamsPtr; + public IntPtr[] Params { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (ParamsPtr); } + set { ParamsPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + + public static Gst.Sdp.MIKEYPayloadSP Zero = new Gst.Sdp.MIKEYPayloadSP (); + + public static Gst.Sdp.MIKEYPayloadSP New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadSP.Zero; + return (Gst.Sdp.MIKEYPayloadSP) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadSP)); + } + + public bool Equals (MIKEYPayloadSP other) + { + return true && Pt.Equals (other.Pt) && Policy.Equals (other.Policy) && Proto.Equals (other.Proto) && ParamsPtr.Equals (other.ParamsPtr); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadSP && Equals ((MIKEYPayloadSP) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ Policy.GetHashCode () ^ Proto.GetHashCode () ^ ParamsPtr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadSPParam.cs b/sources/generated/Gst.Sdp/MIKEYPayloadSPParam.cs new file mode 100644 index 0000000000..c509ec7503 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadSPParam.cs @@ -0,0 +1,47 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadSPParam : IEquatable { + + public byte Type; + public byte Len; + private IntPtr _val; + + public static Gst.Sdp.MIKEYPayloadSPParam Zero = new Gst.Sdp.MIKEYPayloadSPParam (); + + public static Gst.Sdp.MIKEYPayloadSPParam New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadSPParam.Zero; + return (Gst.Sdp.MIKEYPayloadSPParam) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadSPParam)); + } + + public bool Equals (MIKEYPayloadSPParam other) + { + return true && Type.Equals (other.Type) && Len.Equals (other.Len) && _val.Equals (other._val); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadSPParam && Equals ((MIKEYPayloadSPParam) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Len.GetHashCode () ^ _val.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadT.cs b/sources/generated/Gst.Sdp/MIKEYPayloadT.cs new file mode 100644 index 0000000000..7ed00855e2 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadT.cs @@ -0,0 +1,55 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MIKEYPayloadT : IEquatable { + + private IntPtr _pt; + public Gst.Sdp.MIKEYPayload Pt { + get { + return _pt == IntPtr.Zero ? null : (Gst.Sdp.MIKEYPayload) GLib.Opaque.GetOpaque (_pt, typeof (Gst.Sdp.MIKEYPayload), false); + } + set { + _pt = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Sdp.MIKEYTSType Type; + public byte TsValue; + + public static Gst.Sdp.MIKEYPayloadT Zero = new Gst.Sdp.MIKEYPayloadT (); + + public static Gst.Sdp.MIKEYPayloadT New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.MIKEYPayloadT.Zero; + return (Gst.Sdp.MIKEYPayloadT) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.MIKEYPayloadT)); + } + + public bool Equals (MIKEYPayloadT other) + { + return true && Pt.Equals (other.Pt) && Type.Equals (other.Type) && TsValue.Equals (other.TsValue); + } + + public override bool Equals (object other) + { + return other is MIKEYPayloadT && Equals ((MIKEYPayloadT) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Pt.GetHashCode () ^ Type.GetHashCode () ^ TsValue.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/MIKEYPayloadType.cs b/sources/generated/Gst.Sdp/MIKEYPayloadType.cs new file mode 100644 index 0000000000..104b2407e2 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYPayloadType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYPayloadType { + + Last = 0, + Kemac = 1, + Pke = 2, + Dh = 3, + Sign = 4, + T = 5, + Id = 6, + Cert = 7, + Chash = 8, + V = 9, + Sp = 10, + Rand = 11, + Err = 12, + KeyData = 20, + GenExt = 21, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYSecProto.cs b/sources/generated/Gst.Sdp/MIKEYSecProto.cs new file mode 100644 index 0000000000..4c7721f6b5 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYSecProto.cs @@ -0,0 +1,15 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYSecProto { + + MikeySecProtoSrtp = 0, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYSecSRTP.cs b/sources/generated/Gst.Sdp/MIKEYSecSRTP.cs new file mode 100644 index 0000000000..26d1545aa5 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYSecSRTP.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYSecSRTP { + + EncAlg = 0, + EncKeyLen = 1, + AuthAlg = 2, + AuthKeyLen = 3, + SaltKeyLen = 4, + Prf = 5, + KeyDerivRate = 6, + SrtpEnc = 7, + SrtcpEnc = 8, + FecOrder = 9, + SrtpAuth = 10, + AuthTagLen = 11, + SrtpPrefixLen = 12, + AeadAuthTagLen = 20, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYTSType.cs b/sources/generated/Gst.Sdp/MIKEYTSType.cs new file mode 100644 index 0000000000..42984d0586 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYTSType.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYTSType { + + NtpUtc = 0, + Ntp = 1, + Counter = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/MIKEYType.cs b/sources/generated/Gst.Sdp/MIKEYType.cs new file mode 100644 index 0000000000..937b0cc7c3 --- /dev/null +++ b/sources/generated/Gst.Sdp/MIKEYType.cs @@ -0,0 +1,22 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum MIKEYType { + + Invalid = -1, + PskInit = 0, + PskVerify = 1, + PkInit = 2, + PkVerify = 3, + DhInit = 4, + DhResp = 5, + Error = 6, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/SDPAttribute.cs b/sources/generated/Gst.Sdp/SDPAttribute.cs new file mode 100644 index 0000000000..3402854d2d --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPAttribute.cs @@ -0,0 +1,85 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPAttribute : IEquatable { + + public string Key; + public string Value; + + public static Gst.Sdp.SDPAttribute Zero = new Gst.Sdp.SDPAttribute (); + + public static Gst.Sdp.SDPAttribute New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPAttribute.Zero; + return (Gst.Sdp.SDPAttribute) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPAttribute)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_attribute_clear(IntPtr raw); + + public Gst.Sdp.SDPResult Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_attribute_clear(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_attribute_set(IntPtr raw, IntPtr key, IntPtr value); + + public Gst.Sdp.SDPResult Set(string key, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + int raw_ret = gst_sdp_attribute_set(this_as_native, native_key, native_value); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + return ret; + } + + public Gst.Sdp.SDPResult Set(string key) { + return Set (key, null); + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPAttribute target) + { + target = New (native); + } + + public bool Equals (SDPAttribute other) + { + return true && Key.Equals (other.Key) && Value.Equals (other.Value); + } + + public override bool Equals (object other) + { + return other is SDPAttribute && Equals ((SDPAttribute) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Key.GetHashCode () ^ Value.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPBandwidth.cs b/sources/generated/Gst.Sdp/SDPBandwidth.cs new file mode 100644 index 0000000000..ca30997aba --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPBandwidth.cs @@ -0,0 +1,79 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPBandwidth : IEquatable { + + public string Bwtype; + public uint Bandwidth; + + public static Gst.Sdp.SDPBandwidth Zero = new Gst.Sdp.SDPBandwidth (); + + public static Gst.Sdp.SDPBandwidth New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPBandwidth.Zero; + return (Gst.Sdp.SDPBandwidth) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPBandwidth)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_bandwidth_clear(IntPtr raw); + + public Gst.Sdp.SDPResult Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_bandwidth_clear(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_bandwidth_set(IntPtr raw, IntPtr bwtype, uint bandwidth); + + public Gst.Sdp.SDPResult Set(string bwtype, uint bandwidth) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_bwtype = GLib.Marshaller.StringToPtrGStrdup (bwtype); + int raw_ret = gst_sdp_bandwidth_set(this_as_native, native_bwtype, bandwidth); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_bwtype); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPBandwidth target) + { + target = New (native); + } + + public bool Equals (SDPBandwidth other) + { + return true && Bwtype.Equals (other.Bwtype) && Bandwidth.Equals (other.Bandwidth); + } + + public override bool Equals (object other) + { + return other is SDPBandwidth && Equals ((SDPBandwidth) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Bwtype.GetHashCode () ^ Bandwidth.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPConnection.cs b/sources/generated/Gst.Sdp/SDPConnection.cs new file mode 100644 index 0000000000..a5c7ce6216 --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPConnection.cs @@ -0,0 +1,86 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPConnection : IEquatable { + + public string Nettype; + public string Addrtype; + public string Address; + public uint Ttl; + public uint AddrNumber; + + public static Gst.Sdp.SDPConnection Zero = new Gst.Sdp.SDPConnection (); + + public static Gst.Sdp.SDPConnection New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPConnection.Zero; + return (Gst.Sdp.SDPConnection) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPConnection)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_connection_clear(IntPtr raw); + + public Gst.Sdp.SDPResult Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_connection_clear(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_connection_set(IntPtr raw, IntPtr nettype, IntPtr addrtype, IntPtr address, uint ttl, uint addr_number); + + public Gst.Sdp.SDPResult Set(string nettype, string addrtype, string address, uint ttl, uint addr_number) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); + IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); + IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address); + int raw_ret = gst_sdp_connection_set(this_as_native, native_nettype, native_addrtype, native_address, ttl, addr_number); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_nettype); + GLib.Marshaller.Free (native_addrtype); + GLib.Marshaller.Free (native_address); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPConnection target) + { + target = New (native); + } + + public bool Equals (SDPConnection other) + { + return true && Nettype.Equals (other.Nettype) && Addrtype.Equals (other.Addrtype) && Address.Equals (other.Address) && Ttl.Equals (other.Ttl) && AddrNumber.Equals (other.AddrNumber); + } + + public override bool Equals (object other) + { + return other is SDPConnection && Equals ((SDPConnection) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Nettype.GetHashCode () ^ Addrtype.GetHashCode () ^ Address.GetHashCode () ^ Ttl.GetHashCode () ^ AddrNumber.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPKey.cs b/sources/generated/Gst.Sdp/SDPKey.cs new file mode 100644 index 0000000000..5edd049bdd --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPKey.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPKey : IEquatable { + + public string Type; + public string Data; + + public static Gst.Sdp.SDPKey Zero = new Gst.Sdp.SDPKey (); + + public static Gst.Sdp.SDPKey New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPKey.Zero; + return (Gst.Sdp.SDPKey) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPKey)); + } + + public bool Equals (SDPKey other) + { + return true && Type.Equals (other.Type) && Data.Equals (other.Data); + } + + public override bool Equals (object other) + { + return other is SDPKey && Equals ((SDPKey) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Data.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPMedia.cs b/sources/generated/Gst.Sdp/SDPMedia.cs new file mode 100644 index 0000000000..437d341506 --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPMedia.cs @@ -0,0 +1,658 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPMedia : IEquatable { + + public string Media; + public uint Port; + public uint NumPorts; + public string Proto; + private IntPtr FmtsPtr; + public IntPtr[] Fmts { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (FmtsPtr); } + set { FmtsPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + public string Information; + private IntPtr ConnectionsPtr; + public IntPtr[] Connections { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (ConnectionsPtr); } + set { ConnectionsPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + private IntPtr BandwidthsPtr; + public IntPtr[] Bandwidths { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (BandwidthsPtr); } + set { BandwidthsPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + public Gst.Sdp.SDPKey Key; + private IntPtr AttributesPtr; + public IntPtr[] Attributes { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (AttributesPtr); } + set { AttributesPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + + public static Gst.Sdp.SDPMedia Zero = new Gst.Sdp.SDPMedia (); + + public static Gst.Sdp.SDPMedia New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPMedia.Zero; + return (Gst.Sdp.SDPMedia) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPMedia)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_add_attribute(IntPtr raw, IntPtr key, IntPtr value); + + public Gst.Sdp.SDPResult AddAttribute(string key, string value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + int raw_ret = gst_sdp_media_add_attribute(this_as_native, native_key, native_value); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + return ret; + } + + public Gst.Sdp.SDPResult AddAttribute(string key) { + return AddAttribute (key, null); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_add_bandwidth(IntPtr raw, IntPtr bwtype, uint bandwidth); + + public Gst.Sdp.SDPResult AddBandwidth(string bwtype, uint bandwidth) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_bwtype = GLib.Marshaller.StringToPtrGStrdup (bwtype); + int raw_ret = gst_sdp_media_add_bandwidth(this_as_native, native_bwtype, bandwidth); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_bwtype); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_add_connection(IntPtr raw, IntPtr nettype, IntPtr addrtype, IntPtr address, uint ttl, uint addr_number); + + public Gst.Sdp.SDPResult AddConnection(string nettype, string addrtype, string address, uint ttl, uint addr_number) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); + IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); + IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address); + int raw_ret = gst_sdp_media_add_connection(this_as_native, native_nettype, native_addrtype, native_address, ttl, addr_number); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_nettype); + GLib.Marshaller.Free (native_addrtype); + GLib.Marshaller.Free (native_address); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_add_format(IntPtr raw, IntPtr format); + + public Gst.Sdp.SDPResult AddFormat(string format) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + int raw_ret = gst_sdp_media_add_format(this_as_native, native_format); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_format); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_as_text(IntPtr raw); + + public string AsText() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_as_text(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_media_attributes_len(IntPtr raw); + + public uint AttributesLen() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_sdp_media_attributes_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_attributes_to_caps(IntPtr raw, IntPtr caps); + + public Gst.Sdp.SDPResult AttributesToCaps(Gst.Caps caps) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_attributes_to_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_media_bandwidths_len(IntPtr raw); + + public uint BandwidthsLen() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_sdp_media_bandwidths_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_media_connections_len(IntPtr raw); + + public uint ConnectionsLen() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_sdp_media_connections_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_copy(IntPtr raw, IntPtr copy); + + public Gst.Sdp.SDPResult Copy(out Gst.Sdp.SDPMedia copy) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_copy = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Sdp.SDPMedia))); + int raw_ret = gst_sdp_media_copy(this_as_native, native_copy); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + copy = Gst.Sdp.SDPMedia.New (native_copy); + Marshal.FreeHGlobal (native_copy); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_media_formats_len(IntPtr raw); + + public uint FormatsLen() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_sdp_media_formats_len(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_free(IntPtr raw); + + public Gst.Sdp.SDPResult Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_free(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_attribute(IntPtr raw, uint idx); + + public Gst.Sdp.SDPAttribute GetAttribute(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_get_attribute(this_as_native, idx); + Gst.Sdp.SDPAttribute ret = Gst.Sdp.SDPAttribute.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_attribute_val(IntPtr raw, IntPtr key); + + public string GetAttributeVal(string key) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_sdp_media_get_attribute_val(this_as_native, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_attribute_val_n(IntPtr raw, IntPtr key, uint nth); + + public string GetAttributeValN(string key, uint nth) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_sdp_media_get_attribute_val_n(this_as_native, native_key, nth); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_bandwidth(IntPtr raw, uint idx); + + public Gst.Sdp.SDPBandwidth GetBandwidth(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_get_bandwidth(this_as_native, idx); + Gst.Sdp.SDPBandwidth ret = Gst.Sdp.SDPBandwidth.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_caps_from_media(IntPtr raw, int pt); + + public Gst.Caps GetCapsFromMedia(int pt) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_get_caps_from_media(this_as_native, pt); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_connection(IntPtr raw, uint idx); + + public Gst.Sdp.SDPConnection GetConnection(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_get_connection(this_as_native, idx); + Gst.Sdp.SDPConnection ret = Gst.Sdp.SDPConnection.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_media_get_format(IntPtr raw, uint idx); + + public string GetFormat(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_sdp_media_get_format(this_as_native, idx); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_init(IntPtr raw); + + public Gst.Sdp.SDPResult Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_init(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_insert_attribute(IntPtr raw, int idx, IntPtr attr); + + public Gst.Sdp.SDPResult InsertAttribute(int idx, Gst.Sdp.SDPAttribute attr) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); + int raw_ret = gst_sdp_media_insert_attribute(this_as_native, idx, native_attr); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_attr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_insert_bandwidth(IntPtr raw, int idx, IntPtr bw); + + public Gst.Sdp.SDPResult InsertBandwidth(int idx, Gst.Sdp.SDPBandwidth bw) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); + int raw_ret = gst_sdp_media_insert_bandwidth(this_as_native, idx, native_bw); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_bw); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_insert_connection(IntPtr raw, int idx, IntPtr conn); + + public Gst.Sdp.SDPResult InsertConnection(int idx, Gst.Sdp.SDPConnection conn) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_conn = GLib.Marshaller.StructureToPtrAlloc (conn); + int raw_ret = gst_sdp_media_insert_connection(this_as_native, idx, native_conn); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_conn); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_insert_format(IntPtr raw, int idx, IntPtr format); + + public Gst.Sdp.SDPResult InsertFormat(int idx, string format) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + int raw_ret = gst_sdp_media_insert_format(this_as_native, idx, native_format); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_format); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_parse_keymgmt(IntPtr raw, out IntPtr mikey); + + public Gst.Sdp.SDPResult ParseKeymgmt(out Gst.Sdp.MIKEYMessage mikey) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_mikey; + int raw_ret = gst_sdp_media_parse_keymgmt(this_as_native, out native_mikey); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + mikey = native_mikey == IntPtr.Zero ? null : (Gst.Sdp.MIKEYMessage) GLib.Opaque.GetOpaque (native_mikey, typeof (Gst.Sdp.MIKEYMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_remove_attribute(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveAttribute(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_remove_attribute(this_as_native, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_remove_bandwidth(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveBandwidth(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_remove_bandwidth(this_as_native, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_remove_connection(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveConnection(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_remove_connection(this_as_native, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_remove_format(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveFormat(uint idx) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_remove_format(this_as_native, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_replace_attribute(IntPtr raw, uint idx, IntPtr attr); + + public Gst.Sdp.SDPResult ReplaceAttribute(uint idx, Gst.Sdp.SDPAttribute attr) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); + int raw_ret = gst_sdp_media_replace_attribute(this_as_native, idx, native_attr); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_attr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_replace_bandwidth(IntPtr raw, uint idx, IntPtr bw); + + public Gst.Sdp.SDPResult ReplaceBandwidth(uint idx, Gst.Sdp.SDPBandwidth bw) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); + int raw_ret = gst_sdp_media_replace_bandwidth(this_as_native, idx, native_bw); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_bw); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_replace_connection(IntPtr raw, uint idx, IntPtr conn); + + public Gst.Sdp.SDPResult ReplaceConnection(uint idx, Gst.Sdp.SDPConnection conn) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_conn = GLib.Marshaller.StructureToPtrAlloc (conn); + int raw_ret = gst_sdp_media_replace_connection(this_as_native, idx, native_conn); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_conn); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_replace_format(IntPtr raw, uint idx, IntPtr format); + + public Gst.Sdp.SDPResult ReplaceFormat(uint idx, string format) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + int raw_ret = gst_sdp_media_replace_format(this_as_native, idx, native_format); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_format); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_information(IntPtr raw, IntPtr information); + + public Gst.Sdp.SDPResult SetInformation(string information) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_information = GLib.Marshaller.StringToPtrGStrdup (information); + int raw_ret = gst_sdp_media_set_information(this_as_native, native_information); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_information); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_key(IntPtr raw, IntPtr type, IntPtr data); + + public Gst.Sdp.SDPResult SetKey(string type, string data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type); + IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data); + int raw_ret = gst_sdp_media_set_key(this_as_native, native_type, native_data); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_type); + GLib.Marshaller.Free (native_data); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_media(IntPtr raw, IntPtr med); + + public Gst.Sdp.SDPResult SetMedia(string med) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_med = GLib.Marshaller.StringToPtrGStrdup (med); + int raw_ret = gst_sdp_media_set_media(this_as_native, native_med); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_med); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_port_info(IntPtr raw, uint port, uint num_ports); + + public Gst.Sdp.SDPResult SetPortInfo(uint port, uint num_ports) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_set_port_info(this_as_native, port, num_ports); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_proto(IntPtr raw, IntPtr proto); + + public Gst.Sdp.SDPResult SetProto(string proto) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_proto = GLib.Marshaller.StringToPtrGStrdup (proto); + int raw_ret = gst_sdp_media_set_proto(this_as_native, native_proto); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_proto); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_uninit(IntPtr raw); + + public Gst.Sdp.SDPResult Uninit() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_media_uninit(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_new(IntPtr media); + + public static Gst.Sdp.SDPResult New(out Gst.Sdp.SDPMedia media) { + IntPtr native_media = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Sdp.SDPMedia))); + int raw_ret = gst_sdp_media_new(native_media); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + media = Gst.Sdp.SDPMedia.New (native_media); + Marshal.FreeHGlobal (native_media); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_media_set_media_from_caps(IntPtr caps, IntPtr media); + + public static Gst.Sdp.SDPResult SetMediaFromCaps(Gst.Caps caps, Gst.Sdp.SDPMedia media) { + IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); + int raw_ret = gst_sdp_media_set_media_from_caps(caps == null ? IntPtr.Zero : caps.Handle, native_media); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_media); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPMedia target) + { + target = New (native); + } + + public bool Equals (SDPMedia other) + { + return true && Media.Equals (other.Media) && Port.Equals (other.Port) && NumPorts.Equals (other.NumPorts) && Proto.Equals (other.Proto) && FmtsPtr.Equals (other.FmtsPtr) && Information.Equals (other.Information) && ConnectionsPtr.Equals (other.ConnectionsPtr) && BandwidthsPtr.Equals (other.BandwidthsPtr) && Key.Equals (other.Key) && AttributesPtr.Equals (other.AttributesPtr); + } + + public override bool Equals (object other) + { + return other is SDPMedia && Equals ((SDPMedia) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Media.GetHashCode () ^ Port.GetHashCode () ^ NumPorts.GetHashCode () ^ Proto.GetHashCode () ^ FmtsPtr.GetHashCode () ^ Information.GetHashCode () ^ ConnectionsPtr.GetHashCode () ^ BandwidthsPtr.GetHashCode () ^ Key.GetHashCode () ^ AttributesPtr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPMessage.cs b/sources/generated/Gst.Sdp/SDPMessage.cs new file mode 100644 index 0000000000..6183313771 --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPMessage.cs @@ -0,0 +1,947 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class SDPMessage : GLib.Opaque { + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_version(IntPtr raw); + + public string Version { + get { + IntPtr raw_ret = gst_sdp_message_get_version(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("version")); + *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_origin(IntPtr raw); + + public Gst.Sdp.SDPOrigin Origin { + get { + IntPtr raw_ret = gst_sdp_message_get_origin(Handle); + Gst.Sdp.SDPOrigin ret = Gst.Sdp.SDPOrigin.New (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("origin")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_session_name(IntPtr raw); + + public string SessionName { + get { + IntPtr raw_ret = gst_sdp_message_get_session_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("session_name")); + *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_information(IntPtr raw); + + public string Information { + get { + IntPtr raw_ret = gst_sdp_message_get_information(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("information")); + *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_sdp_message_get_uri(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("uri")); + *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_connection(IntPtr raw); + + public Gst.Sdp.SDPConnection Connection { + get { + IntPtr raw_ret = gst_sdp_message_get_connection(Handle); + Gst.Sdp.SDPConnection ret = Gst.Sdp.SDPConnection.New (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("connection")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_key(IntPtr raw); + + public Gst.Sdp.SDPKey Key { + get { + IntPtr raw_ret = gst_sdp_message_get_key(Handle); + Gst.Sdp.SDPKey ret = Gst.Sdp.SDPKey.New (raw_ret); + return ret; + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("key")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_sdp_message_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_attribute(IntPtr raw, IntPtr key, IntPtr value); + + public Gst.Sdp.SDPResult AddAttribute(string key, string value) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + int raw_ret = gst_sdp_message_add_attribute(Handle, native_key, native_value); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_key); + GLib.Marshaller.Free (native_value); + return ret; + } + + public Gst.Sdp.SDPResult AddAttribute(string key) { + return AddAttribute (key, null); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_bandwidth(IntPtr raw, IntPtr bwtype, uint bandwidth); + + public Gst.Sdp.SDPResult AddBandwidth(string bwtype, uint bandwidth) { + IntPtr native_bwtype = GLib.Marshaller.StringToPtrGStrdup (bwtype); + int raw_ret = gst_sdp_message_add_bandwidth(Handle, native_bwtype, bandwidth); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_bwtype); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_email(IntPtr raw, IntPtr email); + + public Gst.Sdp.SDPResult AddEmail(string email) { + IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); + int raw_ret = gst_sdp_message_add_email(Handle, native_email); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_email); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_media(IntPtr raw, IntPtr media); + + public Gst.Sdp.SDPResult AddMedia(Gst.Sdp.SDPMedia media) { + IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); + int raw_ret = gst_sdp_message_add_media(Handle, native_media); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_media); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_phone(IntPtr raw, IntPtr phone); + + public Gst.Sdp.SDPResult AddPhone(string phone) { + IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); + int raw_ret = gst_sdp_message_add_phone(Handle, native_phone); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_phone); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_time(IntPtr raw, IntPtr start, IntPtr stop, IntPtr[] repeat); + + public Gst.Sdp.SDPResult AddTime(string start, string stop, string[] repeat) { + IntPtr native_start = GLib.Marshaller.StringToPtrGStrdup (start); + IntPtr native_stop = GLib.Marshaller.StringToPtrGStrdup (stop); + int cnt_repeat = repeat == null ? 0 : repeat.Length; + IntPtr[] native_repeat = new IntPtr [cnt_repeat + 1]; + for (int i = 0; i < cnt_repeat; i++) + native_repeat [i] = GLib.Marshaller.StringToPtrGStrdup(repeat[i]); + native_repeat [cnt_repeat] = IntPtr.Zero; + int raw_ret = gst_sdp_message_add_time(Handle, native_start, native_stop, native_repeat); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_start); + GLib.Marshaller.Free (native_stop); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_add_zone(IntPtr raw, IntPtr adj_time, IntPtr typed_time); + + public Gst.Sdp.SDPResult AddZone(string adj_time, string typed_time) { + IntPtr native_adj_time = GLib.Marshaller.StringToPtrGStrdup (adj_time); + IntPtr native_typed_time = GLib.Marshaller.StringToPtrGStrdup (typed_time); + int raw_ret = gst_sdp_message_add_zone(Handle, native_adj_time, native_typed_time); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_adj_time); + GLib.Marshaller.Free (native_typed_time); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_as_text(IntPtr raw); + + public string AsText() { + IntPtr raw_ret = gst_sdp_message_as_text(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_attributes_len(IntPtr raw); + + public uint AttributesLen() { + uint raw_ret = gst_sdp_message_attributes_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_attributes_to_caps(IntPtr raw, IntPtr caps); + + public Gst.Sdp.SDPResult AttributesToCaps(Gst.Caps caps) { + int raw_ret = gst_sdp_message_attributes_to_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_bandwidths_len(IntPtr raw); + + public uint BandwidthsLen() { + uint raw_ret = gst_sdp_message_bandwidths_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_copy(IntPtr raw, out IntPtr copy); + + public Gst.Sdp.SDPResult Copy(out Gst.Sdp.SDPMessage copy) { + IntPtr native_copy; + int raw_ret = gst_sdp_message_copy(Handle, out native_copy); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + copy = native_copy == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_copy, typeof (Gst.Sdp.SDPMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_dump(IntPtr raw); + + public Gst.Sdp.SDPResult Dump() { + int raw_ret = gst_sdp_message_dump(Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_emails_len(IntPtr raw); + + public uint EmailsLen() { + uint raw_ret = gst_sdp_message_emails_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_free(IntPtr raw); + + public Gst.Sdp.SDPResult Free() { + int raw_ret = gst_sdp_message_free(Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_attribute(IntPtr raw, uint idx); + + public Gst.Sdp.SDPAttribute GetAttribute(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_attribute(Handle, idx); + Gst.Sdp.SDPAttribute ret = Gst.Sdp.SDPAttribute.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_attribute_val(IntPtr raw, IntPtr key); + + public string GetAttributeVal(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_sdp_message_get_attribute_val(Handle, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_attribute_val_n(IntPtr raw, IntPtr key, uint nth); + + public string GetAttributeValN(string key, uint nth) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_sdp_message_get_attribute_val_n(Handle, native_key, nth); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_bandwidth(IntPtr raw, uint idx); + + public Gst.Sdp.SDPBandwidth GetBandwidth(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_bandwidth(Handle, idx); + Gst.Sdp.SDPBandwidth ret = Gst.Sdp.SDPBandwidth.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_email(IntPtr raw, uint idx); + + public string GetEmail(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_email(Handle, idx); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_media(IntPtr raw, uint idx); + + public Gst.Sdp.SDPMedia GetMedia(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_media(Handle, idx); + Gst.Sdp.SDPMedia ret = Gst.Sdp.SDPMedia.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_phone(IntPtr raw, uint idx); + + public string GetPhone(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_phone(Handle, idx); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_time(IntPtr raw, uint idx); + + public Gst.Sdp.SDPTime GetTime(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_time(Handle, idx); + Gst.Sdp.SDPTime ret = Gst.Sdp.SDPTime.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_get_zone(IntPtr raw, uint idx); + + public Gst.Sdp.SDPZone GetZone(uint idx) { + IntPtr raw_ret = gst_sdp_message_get_zone(Handle, idx); + Gst.Sdp.SDPZone ret = Gst.Sdp.SDPZone.New (raw_ret); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_init(IntPtr raw); + + public Gst.Sdp.SDPResult Init() { + int raw_ret = gst_sdp_message_init(Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_attribute(IntPtr raw, int idx, IntPtr attr); + + public Gst.Sdp.SDPResult InsertAttribute(int idx, Gst.Sdp.SDPAttribute attr) { + IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); + int raw_ret = gst_sdp_message_insert_attribute(Handle, idx, native_attr); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_attr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_bandwidth(IntPtr raw, int idx, IntPtr bw); + + public Gst.Sdp.SDPResult InsertBandwidth(int idx, Gst.Sdp.SDPBandwidth bw) { + IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); + int raw_ret = gst_sdp_message_insert_bandwidth(Handle, idx, native_bw); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_bw); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_email(IntPtr raw, int idx, IntPtr email); + + public Gst.Sdp.SDPResult InsertEmail(int idx, string email) { + IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); + int raw_ret = gst_sdp_message_insert_email(Handle, idx, native_email); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_email); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_phone(IntPtr raw, int idx, IntPtr phone); + + public Gst.Sdp.SDPResult InsertPhone(int idx, string phone) { + IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); + int raw_ret = gst_sdp_message_insert_phone(Handle, idx, native_phone); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_phone); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_time(IntPtr raw, int idx, IntPtr t); + + public Gst.Sdp.SDPResult InsertTime(int idx, Gst.Sdp.SDPTime t) { + IntPtr native_t = GLib.Marshaller.StructureToPtrAlloc (t); + int raw_ret = gst_sdp_message_insert_time(Handle, idx, native_t); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_t); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_insert_zone(IntPtr raw, int idx, IntPtr zone); + + public Gst.Sdp.SDPResult InsertZone(int idx, Gst.Sdp.SDPZone zone) { + IntPtr native_zone = GLib.Marshaller.StructureToPtrAlloc (zone); + int raw_ret = gst_sdp_message_insert_zone(Handle, idx, native_zone); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_zone); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_medias_len(IntPtr raw); + + public uint MediasLen() { + uint raw_ret = gst_sdp_message_medias_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_parse_keymgmt(IntPtr raw, out IntPtr mikey); + + public Gst.Sdp.SDPResult ParseKeymgmt(out Gst.Sdp.MIKEYMessage mikey) { + IntPtr native_mikey; + int raw_ret = gst_sdp_message_parse_keymgmt(Handle, out native_mikey); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + mikey = native_mikey == IntPtr.Zero ? null : (Gst.Sdp.MIKEYMessage) GLib.Opaque.GetOpaque (native_mikey, typeof (Gst.Sdp.MIKEYMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_phones_len(IntPtr raw); + + public uint PhonesLen() { + uint raw_ret = gst_sdp_message_phones_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_attribute(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveAttribute(uint idx) { + int raw_ret = gst_sdp_message_remove_attribute(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_bandwidth(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveBandwidth(uint idx) { + int raw_ret = gst_sdp_message_remove_bandwidth(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_email(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveEmail(uint idx) { + int raw_ret = gst_sdp_message_remove_email(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_phone(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemovePhone(uint idx) { + int raw_ret = gst_sdp_message_remove_phone(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_time(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveTime(uint idx) { + int raw_ret = gst_sdp_message_remove_time(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_remove_zone(IntPtr raw, uint idx); + + public Gst.Sdp.SDPResult RemoveZone(uint idx) { + int raw_ret = gst_sdp_message_remove_zone(Handle, idx); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_attribute(IntPtr raw, uint idx, IntPtr attr); + + public Gst.Sdp.SDPResult ReplaceAttribute(uint idx, Gst.Sdp.SDPAttribute attr) { + IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); + int raw_ret = gst_sdp_message_replace_attribute(Handle, idx, native_attr); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_attr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_bandwidth(IntPtr raw, uint idx, IntPtr bw); + + public Gst.Sdp.SDPResult ReplaceBandwidth(uint idx, Gst.Sdp.SDPBandwidth bw) { + IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); + int raw_ret = gst_sdp_message_replace_bandwidth(Handle, idx, native_bw); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_bw); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_email(IntPtr raw, uint idx, IntPtr email); + + public Gst.Sdp.SDPResult ReplaceEmail(uint idx, string email) { + IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); + int raw_ret = gst_sdp_message_replace_email(Handle, idx, native_email); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_email); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_phone(IntPtr raw, uint idx, IntPtr phone); + + public Gst.Sdp.SDPResult ReplacePhone(uint idx, string phone) { + IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); + int raw_ret = gst_sdp_message_replace_phone(Handle, idx, native_phone); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_phone); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_time(IntPtr raw, uint idx, IntPtr t); + + public Gst.Sdp.SDPResult ReplaceTime(uint idx, Gst.Sdp.SDPTime t) { + IntPtr native_t = GLib.Marshaller.StructureToPtrAlloc (t); + int raw_ret = gst_sdp_message_replace_time(Handle, idx, native_t); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_t); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_replace_zone(IntPtr raw, uint idx, IntPtr zone); + + public Gst.Sdp.SDPResult ReplaceZone(uint idx, Gst.Sdp.SDPZone zone) { + IntPtr native_zone = GLib.Marshaller.StructureToPtrAlloc (zone); + int raw_ret = gst_sdp_message_replace_zone(Handle, idx, native_zone); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + Marshal.FreeHGlobal (native_zone); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_connection(IntPtr raw, IntPtr nettype, IntPtr addrtype, IntPtr address, uint ttl, uint addr_number); + + public Gst.Sdp.SDPResult SetConnection(string nettype, string addrtype, string address, uint ttl, uint addr_number) { + IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); + IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); + IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address); + int raw_ret = gst_sdp_message_set_connection(Handle, native_nettype, native_addrtype, native_address, ttl, addr_number); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_nettype); + GLib.Marshaller.Free (native_addrtype); + GLib.Marshaller.Free (native_address); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_information(IntPtr raw, IntPtr information); + + public Gst.Sdp.SDPResult SetInformation(string information) { + IntPtr native_information = GLib.Marshaller.StringToPtrGStrdup (information); + int raw_ret = gst_sdp_message_set_information(Handle, native_information); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_information); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_key(IntPtr raw, IntPtr type, IntPtr data); + + public Gst.Sdp.SDPResult SetKey(string type, string data) { + IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type); + IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data); + int raw_ret = gst_sdp_message_set_key(Handle, native_type, native_data); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_type); + GLib.Marshaller.Free (native_data); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_origin(IntPtr raw, IntPtr username, IntPtr sess_id, IntPtr sess_version, IntPtr nettype, IntPtr addrtype, IntPtr addr); + + public Gst.Sdp.SDPResult SetOrigin(string username, string sess_id, string sess_version, string nettype, string addrtype, string addr) { + IntPtr native_username = GLib.Marshaller.StringToPtrGStrdup (username); + IntPtr native_sess_id = GLib.Marshaller.StringToPtrGStrdup (sess_id); + IntPtr native_sess_version = GLib.Marshaller.StringToPtrGStrdup (sess_version); + IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); + IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); + IntPtr native_addr = GLib.Marshaller.StringToPtrGStrdup (addr); + int raw_ret = gst_sdp_message_set_origin(Handle, native_username, native_sess_id, native_sess_version, native_nettype, native_addrtype, native_addr); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_username); + GLib.Marshaller.Free (native_sess_id); + GLib.Marshaller.Free (native_sess_version); + GLib.Marshaller.Free (native_nettype); + GLib.Marshaller.Free (native_addrtype); + GLib.Marshaller.Free (native_addr); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_session_name(IntPtr raw, IntPtr session_name); + + public Gst.Sdp.SDPResult SetSessionName(string session_name) { + IntPtr native_session_name = GLib.Marshaller.StringToPtrGStrdup (session_name); + int raw_ret = gst_sdp_message_set_session_name(Handle, native_session_name); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_session_name); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_uri(IntPtr raw, IntPtr uri); + + public Gst.Sdp.SDPResult SetUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + int raw_ret = gst_sdp_message_set_uri(Handle, native_uri); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_set_version(IntPtr raw, IntPtr version); + + public Gst.Sdp.SDPResult SetVersion(string version) { + IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version); + int raw_ret = gst_sdp_message_set_version(Handle, native_version); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_version); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_times_len(IntPtr raw); + + public uint TimesLen() { + uint raw_ret = gst_sdp_message_times_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_uninit(IntPtr raw); + + public Gst.Sdp.SDPResult Uninit() { + int raw_ret = gst_sdp_message_uninit(Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_sdp_message_zones_len(IntPtr raw); + + public uint ZonesLen() { + uint raw_ret = gst_sdp_message_zones_len(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sdp_message_as_uri(IntPtr scheme, IntPtr msg); + + public static string AsUri(string scheme, Gst.Sdp.SDPMessage msg) { + IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); + IntPtr raw_ret = gst_sdp_message_as_uri(native_scheme, msg == null ? IntPtr.Zero : msg.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_scheme); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_new(out IntPtr msg); + + public static Gst.Sdp.SDPResult New(out Gst.Sdp.SDPMessage msg) { + IntPtr native_msg; + int raw_ret = gst_sdp_message_new(out native_msg); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_new_from_text(IntPtr text, out IntPtr msg); + + public static Gst.Sdp.SDPResult NewFromText(string text, out Gst.Sdp.SDPMessage msg) { + IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); + IntPtr native_msg; + int raw_ret = gst_sdp_message_new_from_text(native_text, out native_msg); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_text); + msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_parse_buffer(byte[] data, uint size, IntPtr msg); + + public static Gst.Sdp.SDPResult ParseBuffer(byte[] data, uint size, Gst.Sdp.SDPMessage msg) { + int raw_ret = gst_sdp_message_parse_buffer(data, size, msg == null ? IntPtr.Zero : msg.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_message_parse_uri(IntPtr uri, IntPtr msg); + + public static Gst.Sdp.SDPResult ParseUri(string uri, Gst.Sdp.SDPMessage msg) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + int raw_ret = gst_sdp_message_parse_uri(native_uri, msg == null ? IntPtr.Zero : msg.Handle); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + public SDPMessage(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("version" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // version + , null + , "origin" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("origin" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPOrigin)) // origin + , "version" + , "session_name" + , (long) Marshal.OffsetOf(typeof(GstSDPMessage_originAlign), "origin") + , 0 + ), + new GLib.AbiField("session_name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // session_name + , "origin" + , "information" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("information" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // information + , "session_name" + , "uri" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("uri" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri + , "information" + , "emails" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("emails" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // emails + , "uri" + , "phones" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("phones" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // phones + , "emails" + , "connection" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("connection" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPConnection)) // connection + , "phones" + , "bandwidths" + , (long) Marshal.OffsetOf(typeof(GstSDPMessage_connectionAlign), "connection") + , 0 + ), + new GLib.AbiField("bandwidths" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // bandwidths + , "connection" + , "times" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("times" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // times + , "bandwidths" + , "zones" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("zones" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // zones + , "times" + , "key" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("key" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPKey)) // key + , "zones" + , "attributes" + , (long) Marshal.OffsetOf(typeof(GstSDPMessage_keyAlign), "key") + , 0 + ), + new GLib.AbiField("attributes" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // attributes + , "key" + , "medias" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("medias" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // medias + , "attributes" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstSDPMessage_originAlign + { + sbyte f1; + private Gst.Sdp.SDPOrigin origin; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstSDPMessage_connectionAlign + { + sbyte f1; + private Gst.Sdp.SDPConnection connection; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstSDPMessage_keyAlign + { + sbyte f1; + private Gst.Sdp.SDPKey key; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPOrigin.cs b/sources/generated/Gst.Sdp/SDPOrigin.cs new file mode 100644 index 0000000000..eaaeb68cff --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPOrigin.cs @@ -0,0 +1,50 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPOrigin : IEquatable { + + public string Username; + public string SessId; + public string SessVersion; + public string Nettype; + public string Addrtype; + public string Addr; + + public static Gst.Sdp.SDPOrigin Zero = new Gst.Sdp.SDPOrigin (); + + public static Gst.Sdp.SDPOrigin New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPOrigin.Zero; + return (Gst.Sdp.SDPOrigin) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPOrigin)); + } + + public bool Equals (SDPOrigin other) + { + return true && Username.Equals (other.Username) && SessId.Equals (other.SessId) && SessVersion.Equals (other.SessVersion) && Nettype.Equals (other.Nettype) && Addrtype.Equals (other.Addrtype) && Addr.Equals (other.Addr); + } + + public override bool Equals (object other) + { + return other is SDPOrigin && Equals ((SDPOrigin) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Username.GetHashCode () ^ SessId.GetHashCode () ^ SessVersion.GetHashCode () ^ Nettype.GetHashCode () ^ Addrtype.GetHashCode () ^ Addr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPResult.cs b/sources/generated/Gst.Sdp/SDPResult.cs new file mode 100644 index 0000000000..f86c702ea5 --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPResult.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum SDPResult { + + Einval = -1, + Ok = 0, + } +#endregion +} diff --git a/sources/generated/Gst.Sdp/SDPTime.cs b/sources/generated/Gst.Sdp/SDPTime.cs new file mode 100644 index 0000000000..c6836787b9 --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPTime.cs @@ -0,0 +1,91 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPTime : IEquatable { + + public string Start; + public string Stop; + private IntPtr RepeatPtr; + public IntPtr[] Repeat { + get { return GLib.Marshaller.StructArrayFromNullTerminatedIntPtr (RepeatPtr); } + set { RepeatPtr = GLib.Marshaller.StructArrayToNullTerminatedStructArrayIntPtr (value); } + } + + public static Gst.Sdp.SDPTime Zero = new Gst.Sdp.SDPTime (); + + public static Gst.Sdp.SDPTime New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPTime.Zero; + return (Gst.Sdp.SDPTime) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPTime)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_time_clear(IntPtr raw); + + public Gst.Sdp.SDPResult Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_time_clear(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_time_set(IntPtr raw, IntPtr start, IntPtr stop, IntPtr[] repeat); + + public Gst.Sdp.SDPResult Set(string start, string stop, string[] repeat) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_start = GLib.Marshaller.StringToPtrGStrdup (start); + IntPtr native_stop = GLib.Marshaller.StringToPtrGStrdup (stop); + int cnt_repeat = repeat == null ? 0 : repeat.Length; + IntPtr[] native_repeat = new IntPtr [cnt_repeat + 1]; + for (int i = 0; i < cnt_repeat; i++) + native_repeat [i] = GLib.Marshaller.StringToPtrGStrdup(repeat[i]); + native_repeat [cnt_repeat] = IntPtr.Zero; + int raw_ret = gst_sdp_time_set(this_as_native, native_start, native_stop, native_repeat); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_start); + GLib.Marshaller.Free (native_stop); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPTime target) + { + target = New (native); + } + + public bool Equals (SDPTime other) + { + return true && Start.Equals (other.Start) && Stop.Equals (other.Stop) && RepeatPtr.Equals (other.RepeatPtr); + } + + public override bool Equals (object other) + { + return other is SDPTime && Equals ((SDPTime) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Start.GetHashCode () ^ Stop.GetHashCode () ^ RepeatPtr.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Sdp/SDPZone.cs b/sources/generated/Gst.Sdp/SDPZone.cs new file mode 100644 index 0000000000..d67a615f7a --- /dev/null +++ b/sources/generated/Gst.Sdp/SDPZone.cs @@ -0,0 +1,81 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Sdp { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct SDPZone : IEquatable { + + public string Time; + public string TypedTime; + + public static Gst.Sdp.SDPZone Zero = new Gst.Sdp.SDPZone (); + + public static Gst.Sdp.SDPZone New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Sdp.SDPZone.Zero; + return (Gst.Sdp.SDPZone) Marshal.PtrToStructure (raw, typeof (Gst.Sdp.SDPZone)); + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_zone_clear(IntPtr raw); + + public Gst.Sdp.SDPResult Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_sdp_zone_clear(this_as_native); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_sdp_zone_set(IntPtr raw, IntPtr adj_time, IntPtr typed_time); + + public Gst.Sdp.SDPResult Set(string adj_time, string typed_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_adj_time = GLib.Marshaller.StringToPtrGStrdup (adj_time); + IntPtr native_typed_time = GLib.Marshaller.StringToPtrGStrdup (typed_time); + int raw_ret = gst_sdp_zone_set(this_as_native, native_adj_time, native_typed_time); + Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_adj_time); + GLib.Marshaller.Free (native_typed_time); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Sdp.SDPZone target) + { + target = New (native); + } + + public bool Equals (SDPZone other) + { + return true && Time.Equals (other.Time) && TypedTime.Equals (other.TypedTime); + } + + public override bool Equals (object other) + { + return other is SDPZone && Equals ((SDPZone) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Time.GetHashCode () ^ TypedTime.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Tags/Constants.cs b/sources/generated/Gst.Tags/Constants.cs new file mode 100644 index 0000000000..c57955ea5c --- /dev/null +++ b/sources/generated/Gst.Tags/Constants.cs @@ -0,0 +1,55 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const string TAG_ACOUSTID_FINGERPRINT = @"chromaprint-fingerprint"; + public const string TAG_ACOUSTID_ID = @"acoustid-id"; + public const string TAG_CAPTURING_CONTRAST = @"capturing-contrast"; + public const string TAG_CAPTURING_DIGITAL_ZOOM_RATIO = @"capturing-digital-zoom-ratio"; + public const string TAG_CAPTURING_EXPOSURE_COMPENSATION = @"capturing-exposure-compensation"; + public const string TAG_CAPTURING_EXPOSURE_MODE = @"capturing-exposure-mode"; + public const string TAG_CAPTURING_EXPOSURE_PROGRAM = @"capturing-exposure-program"; + public const string TAG_CAPTURING_FLASH_FIRED = @"capturing-flash-fired"; + public const string TAG_CAPTURING_FLASH_MODE = @"capturing-flash-mode"; + public const string TAG_CAPTURING_FOCAL_LENGTH = @"capturing-focal-length"; + public const string TAG_CAPTURING_FOCAL_LENGTH_35_MM = @"capturing-focal-length-35mm"; + public const string TAG_CAPTURING_FOCAL_RATIO = @"capturing-focal-ratio"; + public const string TAG_CAPTURING_GAIN_ADJUSTMENT = @"capturing-gain-adjustment"; + public const string TAG_CAPTURING_ISO_SPEED = @"capturing-iso-speed"; + public const string TAG_CAPTURING_METERING_MODE = @"capturing-metering-mode"; + public const string TAG_CAPTURING_SATURATION = @"capturing-saturation"; + public const string TAG_CAPTURING_SCENE_CAPTURE_TYPE = @"capturing-scene-capture-type"; + public const string TAG_CAPTURING_SHARPNESS = @"capturing-sharpness"; + public const string TAG_CAPTURING_SHUTTER_SPEED = @"capturing-shutter-speed"; + public const string TAG_CAPTURING_SOURCE = @"capturing-source"; + public const string TAG_CAPTURING_WHITE_BALANCE = @"capturing-white-balance"; + public const string TAG_CDDA_CDDB_DISCID = @"discid"; + public const string TAG_CDDA_CDDB_DISCID_FULL = @"discid-full"; + public const string TAG_CDDA_MUSICBRAINZ_DISCID = @"musicbrainz-discid"; + public const string TAG_CDDA_MUSICBRAINZ_DISCID_FULL = @"musicbrainz-discid-full"; + public const string TAG_CMML_CLIP = @"cmml-clip"; + public const string TAG_CMML_HEAD = @"cmml-head"; + public const string TAG_CMML_STREAM = @"cmml-stream"; + public const int TAG_ID3V2_HEADER_SIZE = 10; + public const string TAG_IMAGE_HORIZONTAL_PPI = @"image-horizontal-ppi"; + public const string TAG_IMAGE_VERTICAL_PPI = @"image-vertical-ppi"; + public const string TAG_MUSICAL_KEY = @"musical-key"; + public const string TAG_MUSICBRAINZ_ALBUMARTISTID = @"musicbrainz-albumartistid"; + public const string TAG_MUSICBRAINZ_ALBUMID = @"musicbrainz-albumid"; + public const string TAG_MUSICBRAINZ_ARTISTID = @"musicbrainz-artistid"; + public const string TAG_MUSICBRAINZ_RELEASEGROUPID = @"musicbrainz-releasegroupid"; + public const string TAG_MUSICBRAINZ_RELEASETRACKID = @"musicbrainz-releasetrackid"; + public const string TAG_MUSICBRAINZ_TRACKID = @"musicbrainz-trackid"; + public const string TAG_MUSICBRAINZ_TRMID = @"musicbrainz-trmid"; +#endregion + } +} diff --git a/sources/generated/Gst.Tags/Global.cs b/sources/generated/Gst.Tags/Global.cs new file mode 100644 index 0000000000..a831edf863 --- /dev/null +++ b/sources/generated/Gst.Tags/Global.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_vorbis_tag_add(IntPtr list, IntPtr tag, IntPtr value); + + public static void VorbisTagAdd(Gst.TagList list, string tag, string value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_vorbis_tag_add(list == null ? IntPtr.Zero : list.Handle, native_tag, native_value); + GLib.Marshaller.Free (native_tag); + GLib.Marshaller.Free (native_value); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Tags/ITagXmpWriter.cs b/sources/generated/Gst.Tags/ITagXmpWriter.cs new file mode 100644 index 0000000000..3a2ae168ac --- /dev/null +++ b/sources/generated/Gst.Tags/ITagXmpWriter.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + +#region Autogenerated code + public partial interface ITagXmpWriter : GLib.IWrapper { + + void AddAllSchemas(); + void AddSchema(string schema); + bool HasSchema(string schema); + void RemoveAllSchemas(); + void RemoveSchema(string schema); + Gst.Buffer TagListToXmpBuffer(Gst.TagList taglist, bool read_only); + } + + [GLib.GInterface (typeof (TagXmpWriterAdapter))] + public partial interface ITagXmpWriterImplementor : GLib.IWrapper { + + } +#endregion +} diff --git a/sources/generated/Gst.Tags/TagDemux.cs b/sources/generated/Gst.Tags/TagDemux.cs new file mode 100644 index 0000000000..f89315d1a0 --- /dev/null +++ b/sources/generated/Gst.Tags/TagDemux.cs @@ -0,0 +1,323 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TagDemux : Gst.Element { + + protected TagDemux (IntPtr raw) : base(raw) {} + + protected TagDemux() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + static IdentifyTagNativeDelegate IdentifyTag_cb_delegate; + static IdentifyTagNativeDelegate IdentifyTagVMCallback { + get { + if (IdentifyTag_cb_delegate == null) + IdentifyTag_cb_delegate = new IdentifyTagNativeDelegate (IdentifyTag_cb); + return IdentifyTag_cb_delegate; + } + } + + static void OverrideIdentifyTag (GLib.GType gtype) + { + OverrideIdentifyTag (gtype, IdentifyTagVMCallback); + } + + static void OverrideIdentifyTag (GLib.GType gtype, IdentifyTagNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("identify_tag")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool IdentifyTagNativeDelegate (IntPtr inst, IntPtr buffer, bool start_tag, uint tag_size); + + static bool IdentifyTag_cb (IntPtr inst, IntPtr buffer, bool start_tag, uint tag_size) + { + try { + TagDemux __obj = GLib.Object.GetObject (inst, false) as TagDemux; + bool __result; + __result = __obj.OnIdentifyTag (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), start_tag, tag_size); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Tags.TagDemux), ConnectionMethod="OverrideIdentifyTag")] + protected virtual bool OnIdentifyTag (Gst.Buffer buffer, bool start_tag, uint tag_size) + { + return InternalIdentifyTag (buffer, start_tag, tag_size); + } + + private bool InternalIdentifyTag (Gst.Buffer buffer, bool start_tag, uint tag_size) + { + IdentifyTagNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("identify_tag")); + unmanaged = (IdentifyTagNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(IdentifyTagNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, start_tag, tag_size); + return __result; + } + + static ParseTagNativeDelegate ParseTag_cb_delegate; + static ParseTagNativeDelegate ParseTagVMCallback { + get { + if (ParseTag_cb_delegate == null) + ParseTag_cb_delegate = new ParseTagNativeDelegate (ParseTag_cb); + return ParseTag_cb_delegate; + } + } + + static void OverrideParseTag (GLib.GType gtype) + { + OverrideParseTag (gtype, ParseTagVMCallback); + } + + static void OverrideParseTag (GLib.GType gtype, ParseTagNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse_tag")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ParseTagNativeDelegate (IntPtr inst, IntPtr buffer, bool start_tag, uint tag_size, IntPtr tags); + + static int ParseTag_cb (IntPtr inst, IntPtr buffer, bool start_tag, uint tag_size, IntPtr tags) + { + try { + TagDemux __obj = GLib.Object.GetObject (inst, false) as TagDemux; + Gst.Tags.TagDemuxResult __result; + __result = __obj.OnParseTag (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), start_tag, tag_size, tags == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (tags, typeof (Gst.TagList), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Tags.TagDemux), ConnectionMethod="OverrideParseTag")] + protected virtual Gst.Tags.TagDemuxResult OnParseTag (Gst.Buffer buffer, bool start_tag, uint tag_size, Gst.TagList tags) + { + return InternalParseTag (buffer, start_tag, tag_size, tags); + } + + private Gst.Tags.TagDemuxResult InternalParseTag (Gst.Buffer buffer, bool start_tag, uint tag_size, Gst.TagList tags) + { + ParseTagNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("parse_tag")); + unmanaged = (ParseTagNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ParseTagNativeDelegate)); + } + if (unmanaged == null) return (Gst.Tags.TagDemuxResult) 0; + + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, start_tag, tag_size, tags == null ? IntPtr.Zero : tags.Handle); + return (Gst.Tags.TagDemuxResult) __result; + } + + static MergeTagsNativeDelegate MergeTags_cb_delegate; + static MergeTagsNativeDelegate MergeTagsVMCallback { + get { + if (MergeTags_cb_delegate == null) + MergeTags_cb_delegate = new MergeTagsNativeDelegate (MergeTags_cb); + return MergeTags_cb_delegate; + } + } + + static void OverrideMergeTags (GLib.GType gtype) + { + OverrideMergeTags (gtype, MergeTagsVMCallback); + } + + static void OverrideMergeTags (GLib.GType gtype, MergeTagsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("merge_tags")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr MergeTagsNativeDelegate (IntPtr inst, IntPtr start_tags, IntPtr end_tags); + + static IntPtr MergeTags_cb (IntPtr inst, IntPtr start_tags, IntPtr end_tags) + { + try { + TagDemux __obj = GLib.Object.GetObject (inst, false) as TagDemux; + Gst.TagList __result; + __result = __obj.OnMergeTags (start_tags == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (start_tags, typeof (Gst.TagList), false), end_tags == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (end_tags, typeof (Gst.TagList), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Tags.TagDemux), ConnectionMethod="OverrideMergeTags")] + protected virtual Gst.TagList OnMergeTags (Gst.TagList start_tags, Gst.TagList end_tags) + { + return InternalMergeTags (start_tags, end_tags); + } + + private Gst.TagList InternalMergeTags (Gst.TagList start_tags, Gst.TagList end_tags) + { + MergeTagsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("merge_tags")); + unmanaged = (MergeTagsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MergeTagsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, start_tags == null ? IntPtr.Zero : start_tags.Handle, end_tags == null ? IntPtr.Zero : end_tags.Handle); + return __result == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (__result, typeof (Gst.TagList), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("min_start_size" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(uint)) // min_start_size + , null + , "min_end_size" + , (long) Marshal.OffsetOf(typeof(GstTagDemux_min_start_sizeAlign), "min_start_size") + , 0 + ), + new GLib.AbiField("min_end_size" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // min_end_size + , "min_start_size" + , "identify_tag" + , (long) Marshal.OffsetOf(typeof(GstTagDemux_min_end_sizeAlign), "min_end_size") + , 0 + ), + new GLib.AbiField("identify_tag" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // identify_tag + , "min_end_size" + , "parse_tag" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("parse_tag" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parse_tag + , "identify_tag" + , "merge_tags" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("merge_tags" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // merge_tags + , "parse_tag" + , "reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // reserved + , "merge_tags" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTagDemux_min_start_sizeAlign + { + sbyte f1; + private uint min_start_size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTagDemux_min_end_sizeAlign + { + sbyte f1; + private uint min_end_size; + } + + + // End of the ABI representation. + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_demux_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_tag_demux_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static TagDemux () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Tags/TagDemuxResult.cs b/sources/generated/Gst.Tags/TagDemuxResult.cs new file mode 100644 index 0000000000..deef090bc3 --- /dev/null +++ b/sources/generated/Gst.Tags/TagDemuxResult.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Tags.TagDemuxResultGType))] + public enum TagDemuxResult { + + BrokenTag = 0, + Again = 1, + Ok = 2, + } + + internal class TagDemuxResultGType { + [DllImport ("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_demux_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_demux_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Tags/TagImageType.cs b/sources/generated/Gst.Tags/TagImageType.cs new file mode 100644 index 0000000000..e095fd3ce0 --- /dev/null +++ b/sources/generated/Gst.Tags/TagImageType.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Tags.TagImageTypeGType))] + public enum TagImageType { + + None = -1, + Undefined = 0, + FrontCover = 1, + BackCover = 2, + LeafletPage = 3, + Medium = 4, + LeadArtist = 5, + Artist = 6, + Conductor = 7, + BandOrchestra = 8, + Composer = 9, + Lyricist = 10, + RecordingLocation = 11, + DuringRecording = 12, + DuringPerformance = 13, + VideoCapture = 14, + Fish = 15, + Illustration = 16, + BandArtistLogo = 17, + PublisherStudioLogo = 18, + } + + internal class TagImageTypeGType { + [DllImport ("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_image_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_image_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Tags/TagLicenseFlags.cs b/sources/generated/Gst.Tags/TagLicenseFlags.cs new file mode 100644 index 0000000000..726350c073 --- /dev/null +++ b/sources/generated/Gst.Tags/TagLicenseFlags.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Tags.TagLicenseFlagsGType))] + public enum TagLicenseFlags : uint { + + PermitsReproduction = 1, + PermitsDistribution = 2, + PermitsDerivativeWorks = 4, + PermitsSharing = 8, + RequiresNotice = 256, + RequiresAttribution = 512, + RequiresShareAlike = 1024, + RequiresSourceCode = 2048, + RequiresCopyleft = 4096, + RequiresLesserCopyleft = 8192, + ProhibitsCommercialUse = 65536, + ProhibitsHighIncomeNationUse = 131072, + CreativeCommonsLicense = 16777216, + FreeSoftwareFoundationLicense = 33554432, + } + + internal class TagLicenseFlagsGType { + [DllImport ("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_license_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_license_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Tags/TagMux.cs b/sources/generated/Gst.Tags/TagMux.cs new file mode 100644 index 0000000000..4c0c694f3a --- /dev/null +++ b/sources/generated/Gst.Tags/TagMux.cs @@ -0,0 +1,280 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TagMux : Gst.Element, Gst.ITagSetter { + + protected TagMux (IntPtr raw) : base(raw) {} + + protected TagMux() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + static RenderStartTagNativeDelegate RenderStartTag_cb_delegate; + static RenderStartTagNativeDelegate RenderStartTagVMCallback { + get { + if (RenderStartTag_cb_delegate == null) + RenderStartTag_cb_delegate = new RenderStartTagNativeDelegate (RenderStartTag_cb); + return RenderStartTag_cb_delegate; + } + } + + static void OverrideRenderStartTag (GLib.GType gtype) + { + OverrideRenderStartTag (gtype, RenderStartTagVMCallback); + } + + static void OverrideRenderStartTag (GLib.GType gtype, RenderStartTagNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("render_start_tag")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr RenderStartTagNativeDelegate (IntPtr inst, IntPtr tag_list); + + static IntPtr RenderStartTag_cb (IntPtr inst, IntPtr tag_list) + { + try { + TagMux __obj = GLib.Object.GetObject (inst, false) as TagMux; + Gst.Buffer __result; + __result = __obj.OnRenderStartTag (tag_list == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (tag_list, typeof (Gst.TagList), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Tags.TagMux), ConnectionMethod="OverrideRenderStartTag")] + protected virtual Gst.Buffer OnRenderStartTag (Gst.TagList tag_list) + { + return InternalRenderStartTag (tag_list); + } + + private Gst.Buffer InternalRenderStartTag (Gst.TagList tag_list) + { + RenderStartTagNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("render_start_tag")); + unmanaged = (RenderStartTagNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderStartTagNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, tag_list == null ? IntPtr.Zero : tag_list.Handle); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + static RenderEndTagNativeDelegate RenderEndTag_cb_delegate; + static RenderEndTagNativeDelegate RenderEndTagVMCallback { + get { + if (RenderEndTag_cb_delegate == null) + RenderEndTag_cb_delegate = new RenderEndTagNativeDelegate (RenderEndTag_cb); + return RenderEndTag_cb_delegate; + } + } + + static void OverrideRenderEndTag (GLib.GType gtype) + { + OverrideRenderEndTag (gtype, RenderEndTagVMCallback); + } + + static void OverrideRenderEndTag (GLib.GType gtype, RenderEndTagNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("render_end_tag")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr RenderEndTagNativeDelegate (IntPtr inst, IntPtr tag_list); + + static IntPtr RenderEndTag_cb (IntPtr inst, IntPtr tag_list) + { + try { + TagMux __obj = GLib.Object.GetObject (inst, false) as TagMux; + Gst.Buffer __result; + __result = __obj.OnRenderEndTag (tag_list == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (tag_list, typeof (Gst.TagList), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Tags.TagMux), ConnectionMethod="OverrideRenderEndTag")] + protected virtual Gst.Buffer OnRenderEndTag (Gst.TagList tag_list) + { + return InternalRenderEndTag (tag_list); + } + + private Gst.Buffer InternalRenderEndTag (Gst.TagList tag_list) + { + RenderEndTagNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("render_end_tag")); + unmanaged = (RenderEndTagNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderEndTagNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, tag_list == null ? IntPtr.Zero : tag_list.Handle); + return __result == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (__result, typeof (Gst.Buffer), true); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("render_start_tag" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // render_start_tag + , null + , "render_end_tag" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("render_end_tag" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // render_end_tag + , "render_start_tag" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "render_end_tag" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_mux_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_tag_mux_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_add_tag_value(IntPtr raw, int mode, IntPtr tag, IntPtr value); + + public void AddTagValue(Gst.TagMergeMode mode, string tag, GLib.Value value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_tag_setter_add_tag_value(Handle, (int) mode, native_tag, native_value); + GLib.Marshaller.Free (native_tag); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_setter_get_tag_list(IntPtr raw); + + public Gst.TagList TagList { + get { + IntPtr raw_ret = gst_tag_setter_get_tag_list(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_setter_get_tag_merge_mode(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_set_tag_merge_mode(IntPtr raw, int mode); + + public Gst.TagMergeMode TagMergeMode { + get { + int raw_ret = gst_tag_setter_get_tag_merge_mode(Handle); + Gst.TagMergeMode ret = (Gst.TagMergeMode) raw_ret; + return ret; + } + set { + gst_tag_setter_set_tag_merge_mode(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_merge_tags(IntPtr raw, IntPtr list, int mode); + + public void MergeTags(Gst.TagList list, Gst.TagMergeMode mode) { + gst_tag_setter_merge_tags(Handle, list == null ? IntPtr.Zero : list.Handle, (int) mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_reset_tags(IntPtr raw); + + public void ResetTags() { + gst_tag_setter_reset_tags(Handle); + } + + + static TagMux () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Tags/TagXmpWriterAdapter.cs b/sources/generated/Gst.Tags/TagXmpWriterAdapter.cs new file mode 100644 index 0000000000..e2f4ce5c8e --- /dev/null +++ b/sources/generated/Gst.Tags/TagXmpWriterAdapter.cs @@ -0,0 +1,157 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Tags { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TagXmpWriterAdapter : GLib.GInterfaceAdapter, Gst.Tags.ITagXmpWriter { + + [StructLayout (LayoutKind.Sequential)] + struct GstTagXmpWriterInterface { + } + + static GstTagXmpWriterInterface iface; + + static TagXmpWriterAdapter () + { + GLib.GType.Register (_gtype, typeof (TagXmpWriterAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public TagXmpWriterAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public TagXmpWriterAdapter (ITagXmpWriterImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public TagXmpWriterAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_xmp_writer_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_tag_xmp_writer_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static ITagXmpWriter GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static ITagXmpWriter GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is ITagXmpWriterImplementor) + return new TagXmpWriterAdapter (obj as ITagXmpWriterImplementor); + else if (obj as ITagXmpWriter == null) + return new TagXmpWriterAdapter (obj.Handle); + else + return obj as ITagXmpWriter; + } + + public ITagXmpWriterImplementor Implementor { + get { + return implementor as ITagXmpWriterImplementor; + } + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_xmp_writer_add_all_schemas(IntPtr raw); + + public void AddAllSchemas() { + gst_tag_xmp_writer_add_all_schemas(Handle); + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_xmp_writer_add_schema(IntPtr raw, IntPtr schema); + + public void AddSchema(string schema) { + IntPtr native_schema = GLib.Marshaller.StringToPtrGStrdup (schema); + gst_tag_xmp_writer_add_schema(Handle, native_schema); + GLib.Marshaller.Free (native_schema); + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_xmp_writer_has_schema(IntPtr raw, IntPtr schema); + + public bool HasSchema(string schema) { + IntPtr native_schema = GLib.Marshaller.StringToPtrGStrdup (schema); + bool raw_ret = gst_tag_xmp_writer_has_schema(Handle, native_schema); + bool ret = raw_ret; + GLib.Marshaller.Free (native_schema); + return ret; + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_xmp_writer_remove_all_schemas(IntPtr raw); + + public void RemoveAllSchemas() { + gst_tag_xmp_writer_remove_all_schemas(Handle); + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_xmp_writer_remove_schema(IntPtr raw, IntPtr schema); + + public void RemoveSchema(string schema) { + IntPtr native_schema = GLib.Marshaller.StringToPtrGStrdup (schema); + gst_tag_xmp_writer_remove_schema(Handle, native_schema); + GLib.Marshaller.Free (native_schema); + } + + [DllImport("gsttag-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_xmp_writer_tag_list_to_xmp_buffer(IntPtr raw, IntPtr taglist, bool read_only); + + public Gst.Buffer TagListToXmpBuffer(Gst.TagList taglist, bool read_only) { + IntPtr raw_ret = gst_tag_xmp_writer_tag_list_to_xmp_buffer(Handle, taglist == null ? IntPtr.Zero : taglist.Handle, read_only); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/ColorBalanceAdapter.cs b/sources/generated/Gst.Video/ColorBalanceAdapter.cs new file mode 100644 index 0000000000..eee53b38b6 --- /dev/null +++ b/sources/generated/Gst.Video/ColorBalanceAdapter.cs @@ -0,0 +1,242 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ColorBalanceAdapter : GLib.GInterfaceAdapter, Gst.Video.IColorBalance { + + [StructLayout (LayoutKind.Sequential)] + struct GstColorBalanceInterface { + public ListChannelsNativeDelegate ListChannels; + public SetValueNativeDelegate SetValue; + public GetValueNativeDelegate GetValue; + public GetBalanceTypeNativeDelegate GetBalanceType; + IntPtr ValueChangedEvent; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + } + + static GstColorBalanceInterface iface; + + static ColorBalanceAdapter () + { + GLib.GType.Register (_gtype, typeof (ColorBalanceAdapter)); + iface.ListChannels = new ListChannelsNativeDelegate (ListChannels_cb); + iface.SetValue = new SetValueNativeDelegate (SetValue_cb); + iface.GetValue = new GetValueNativeDelegate (GetValue_cb); + iface.GetBalanceType = new GetBalanceTypeNativeDelegate (GetBalanceType_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ListChannelsNativeDelegate (IntPtr inst); + + static IntPtr ListChannels_cb (IntPtr inst) + { + try { + IColorBalanceImplementor __obj = GLib.Object.GetObject (inst, false) as IColorBalanceImplementor; + Gst.Video.ColorBalanceChannel[] __result; + __result = __obj.ListChannels (); + return new GLib.List(__result, typeof (Gst.Video.ColorBalanceChannel), false, false) == null ? IntPtr.Zero : new GLib.List(__result, typeof (Gst.Video.ColorBalanceChannel), false, false).Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetValueNativeDelegate (IntPtr inst, IntPtr channel, int value); + + static void SetValue_cb (IntPtr inst, IntPtr channel, int value) + { + try { + IColorBalanceImplementor __obj = GLib.Object.GetObject (inst, false) as IColorBalanceImplementor; + __obj.SetValue (GLib.Object.GetObject(channel) as Gst.Video.ColorBalanceChannel, value); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GetValueNativeDelegate (IntPtr inst, IntPtr channel); + + static int GetValue_cb (IntPtr inst, IntPtr channel) + { + try { + IColorBalanceImplementor __obj = GLib.Object.GetObject (inst, false) as IColorBalanceImplementor; + int __result; + __result = __obj.GetValue (GLib.Object.GetObject(channel) as Gst.Video.ColorBalanceChannel); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GetBalanceTypeNativeDelegate (IntPtr inst); + + static int GetBalanceType_cb (IntPtr inst) + { + try { + IColorBalanceImplementor __obj = GLib.Object.GetObject (inst, false) as IColorBalanceImplementor; + Gst.Video.ColorBalanceType __result; + __result = __obj.BalanceType; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstColorBalanceInterface native_iface = (GstColorBalanceInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstColorBalanceInterface)); + native_iface.ListChannels = iface.ListChannels; + native_iface.SetValue = iface.SetValue; + native_iface.GetValue = iface.GetValue; + native_iface.GetBalanceType = iface.GetBalanceType; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public ColorBalanceAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public ColorBalanceAdapter (IColorBalanceImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public ColorBalanceAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_color_balance_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_color_balance_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IColorBalance GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IColorBalance GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IColorBalanceImplementor) + return new ColorBalanceAdapter (obj as IColorBalanceImplementor); + else if (obj as IColorBalance == null) + return new ColorBalanceAdapter (obj.Handle); + else + return obj as IColorBalance; + } + + public IColorBalanceImplementor Implementor { + get { + return implementor as IColorBalanceImplementor; + } + } + + [GLib.Signal("value-changed")] + public event Gst.Video.ValueChangedEventHandler ValueChangedEvent { + add { + GLib.Object.GetObject (Handle).AddSignalHandler ("value-changed", value, typeof (Gst.Video.ValueChangedEventArgs)); + } + remove { + GLib.Object.GetObject (Handle).RemoveSignalHandler ("value-changed", value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_color_balance_get_balance_type(IntPtr raw); + + public Gst.Video.ColorBalanceType BalanceType { + get { + int raw_ret = gst_color_balance_get_balance_type(Handle); + Gst.Video.ColorBalanceType ret = (Gst.Video.ColorBalanceType) raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_color_balance_get_value(IntPtr raw, IntPtr channel); + + public int GetValue(Gst.Video.ColorBalanceChannel channel) { + int raw_ret = gst_color_balance_get_value(Handle, channel == null ? IntPtr.Zero : channel.Handle); + int ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_color_balance_list_channels(IntPtr raw); + + public Gst.Video.ColorBalanceChannel[] ListChannels() { + IntPtr raw_ret = gst_color_balance_list_channels(Handle); + Gst.Video.ColorBalanceChannel[] ret = (Gst.Video.ColorBalanceChannel[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.Video.ColorBalanceChannel)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_color_balance_set_value(IntPtr raw, IntPtr channel, int value); + + public void SetValue(Gst.Video.ColorBalanceChannel channel, int value) { + gst_color_balance_set_value(Handle, channel == null ? IntPtr.Zero : channel.Handle, value); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_color_balance_value_changed(IntPtr raw, IntPtr channel, int value); + + public void ValueChanged(Gst.Video.ColorBalanceChannel channel, int value) { + gst_color_balance_value_changed(Handle, channel == null ? IntPtr.Zero : channel.Handle, value); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/ColorBalanceChannel.cs b/sources/generated/Gst.Video/ColorBalanceChannel.cs new file mode 100644 index 0000000000..f3c6626f19 --- /dev/null +++ b/sources/generated/Gst.Video/ColorBalanceChannel.cs @@ -0,0 +1,223 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ColorBalanceChannel : GLib.Object { + + public ColorBalanceChannel (IntPtr raw) : base(raw) {} + + protected ColorBalanceChannel() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public string Label { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("label")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + public int MinValue { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("min_value")); + return (*raw_ptr); + } + } + } + + public int MaxValue { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("max_value")); + return (*raw_ptr); + } + } + } + + [GLib.Signal("value-changed")] + public event Gst.Video.ValueChangedHandler ValueChanged { + add { + this.AddSignalHandler ("value-changed", value, typeof (Gst.Video.ValueChangedArgs)); + } + remove { + this.RemoveSignalHandler ("value-changed", value); + } + } + + static ValueChangedNativeDelegate ValueChanged_cb_delegate; + static ValueChangedNativeDelegate ValueChangedVMCallback { + get { + if (ValueChanged_cb_delegate == null) + ValueChanged_cb_delegate = new ValueChangedNativeDelegate (ValueChanged_cb); + return ValueChanged_cb_delegate; + } + } + + static void OverrideValueChanged (GLib.GType gtype) + { + OverrideValueChanged (gtype, ValueChangedVMCallback); + } + + static void OverrideValueChanged (GLib.GType gtype, ValueChangedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("value_changed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ValueChangedNativeDelegate (IntPtr inst, int value); + + static void ValueChanged_cb (IntPtr inst, int value) + { + try { + ColorBalanceChannel __obj = GLib.Object.GetObject (inst, false) as ColorBalanceChannel; + __obj.OnValueChanged (value); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.ColorBalanceChannel), ConnectionMethod="OverrideValueChanged")] + protected virtual void OnValueChanged (int value) + { + InternalValueChanged (value); + } + + private void InternalValueChanged (int value) + { + ValueChangedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("value_changed")); + unmanaged = (ValueChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ValueChangedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, value); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("value_changed" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // value_changed + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "value_changed" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_color_balance_channel_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_color_balance_channel_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static ColorBalanceChannel () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("label" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // label + , null + , "min_value" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("min_value" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // min_value + , "label" + , "max_value" + , (long) Marshal.OffsetOf(typeof(GstColorBalanceChannel_min_valueAlign), "min_value") + , 0 + ), + new GLib.AbiField("max_value" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // max_value + , "min_value" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstColorBalanceChannel_max_valueAlign), "max_value") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "max_value" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstColorBalanceChannel_min_valueAlign + { + sbyte f1; + private int min_value; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstColorBalanceChannel_max_valueAlign + { + sbyte f1; + private int max_value; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/ColorBalanceType.cs b/sources/generated/Gst.Video/ColorBalanceType.cs new file mode 100644 index 0000000000..b9a97d7ed2 --- /dev/null +++ b/sources/generated/Gst.Video/ColorBalanceType.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.ColorBalanceTypeGType))] + public enum ColorBalanceType { + + Hardware = 0, + Software = 1, + } + + internal class ColorBalanceTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_color_balance_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_color_balance_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/Constants.cs b/sources/generated/Gst.Video/Constants.cs new file mode 100644 index 0000000000..34b4befba8 --- /dev/null +++ b/sources/generated/Gst.Video/Constants.cs @@ -0,0 +1,89 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const string BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META = @"GstBufferPoolOptionVideoAffineTransformation"; + public const string BUFFER_POOL_OPTION_VIDEO_ALIGNMENT = @"GstBufferPoolOptionVideoAlignment"; + public const string BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META = @"GstBufferPoolOptionVideoGLTextureUploadMeta"; + public const string BUFFER_POOL_OPTION_VIDEO_META = @"GstBufferPoolOptionVideoMeta"; + public const string CAPS_FEATURE_FORMAT_INTERLACED = @"format:Interlaced"; + public const string CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META = @"meta:GstVideoAffineTransformation"; + public const string CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META = @"meta:GstVideoGLTextureUploadMeta"; + public const string CAPS_FEATURE_META_GST_VIDEO_META = @"meta:GstVideoMeta"; + public const string CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION = @"meta:GstVideoOverlayComposition"; + public const string META_TAG_VIDEO_COLORSPACE_STR = @"colorspace"; + public const string META_TAG_VIDEO_ORIENTATION_STR = @"orientation"; + public const string META_TAG_VIDEO_SIZE_STR = @"size"; + public const string META_TAG_VIDEO_STR = @"video"; + public const string VIDEO_COLORIMETRY_BT2020 = @"bt2020"; + public const string VIDEO_COLORIMETRY_BT2020_10 = @"bt2020-10"; + public const string VIDEO_COLORIMETRY_BT2100_HLG = @"bt2100-hlg"; + public const string VIDEO_COLORIMETRY_BT2100_PQ = @"bt2100-pq"; + public const string VIDEO_COLORIMETRY_BT601 = @"bt601"; + public const string VIDEO_COLORIMETRY_BT709 = @"bt709"; + public const string VIDEO_COLORIMETRY_SMPTE240M = @"smpte240m"; + public const string VIDEO_COLORIMETRY_SRGB = @"sRGB"; + public const int VIDEO_COMP_A = 3; + public const int VIDEO_COMP_B = 2; + public const int VIDEO_COMP_G = 1; + public const int VIDEO_COMP_INDEX = 0; + public const int VIDEO_COMP_PALETTE = 1; + public const int VIDEO_COMP_R = 0; + public const int VIDEO_COMP_U = 1; + public const int VIDEO_COMP_V = 2; + public const int VIDEO_COMP_Y = 0; + public const string VIDEO_CONVERTER_OPT_ALPHA_MODE = @"GstVideoConverter.alpha-mode"; + public const string VIDEO_CONVERTER_OPT_ALPHA_VALUE = @"GstVideoConverter.alpha-value"; + public const string VIDEO_CONVERTER_OPT_BORDER_ARGB = @"GstVideoConverter.border-argb"; + public const string VIDEO_CONVERTER_OPT_CHROMA_MODE = @"GstVideoConverter.chroma-mode"; + public const string VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD = @"GstVideoConverter.chroma-resampler-method"; + public const string VIDEO_CONVERTER_OPT_DEST_HEIGHT = @"GstVideoConverter.dest-height"; + public const string VIDEO_CONVERTER_OPT_DEST_WIDTH = @"GstVideoConverter.dest-width"; + public const string VIDEO_CONVERTER_OPT_DEST_X = @"GstVideoConverter.dest-x"; + public const string VIDEO_CONVERTER_OPT_DEST_Y = @"GstVideoConverter.dest-y"; + public const string VIDEO_CONVERTER_OPT_DITHER_METHOD = @"GstVideoConverter.dither-method"; + public const string VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION = @"GstVideoConverter.dither-quantization"; + public const string VIDEO_CONVERTER_OPT_FILL_BORDER = @"GstVideoConverter.fill-border"; + public const string VIDEO_CONVERTER_OPT_GAMMA_MODE = @"GstVideoConverter.gamma-mode"; + public const string VIDEO_CONVERTER_OPT_MATRIX_MODE = @"GstVideoConverter.matrix-mode"; + public const string VIDEO_CONVERTER_OPT_PRIMARIES_MODE = @"GstVideoConverter.primaries-mode"; + public const string VIDEO_CONVERTER_OPT_RESAMPLER_METHOD = @"GstVideoConverter.resampler-method"; + public const string VIDEO_CONVERTER_OPT_RESAMPLER_TAPS = @"GstVideoConverter.resampler-taps"; + public const string VIDEO_CONVERTER_OPT_SRC_HEIGHT = @"GstVideoConverter.src-height"; + public const string VIDEO_CONVERTER_OPT_SRC_WIDTH = @"GstVideoConverter.src-width"; + public const string VIDEO_CONVERTER_OPT_SRC_X = @"GstVideoConverter.src-x"; + public const string VIDEO_CONVERTER_OPT_SRC_Y = @"GstVideoConverter.src-y"; + public const string VIDEO_CONVERTER_OPT_THREADS = @"GstVideoConverter.threads"; + public const int VIDEO_DECODER_MAX_ERRORS = 10; + public const string VIDEO_DECODER_SINK_NAME = @"sink"; + public const string VIDEO_DECODER_SRC_NAME = @"src"; + public const string VIDEO_ENCODER_SINK_NAME = @"sink"; + public const string VIDEO_ENCODER_SRC_NAME = @"src"; + public const string VIDEO_FORMATS_ALL = @"{ AYUV64, ARGB64, GBRA_12BE, GBRA_12LE, Y412_BE, Y412_LE, A444_10BE, GBRA_10BE, A444_10LE, GBRA_10LE, A422_10BE, A422_10LE, A420_10BE, A420_10LE, Y410, RGB10A2_LE, BGR10A2_LE, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16BE, Y444_16LE, v216, P016_BE, P016_LE, Y444_12BE, GBR_12BE, Y444_12LE, GBR_12LE, I422_12BE, I422_12LE, Y212_BE, Y212_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, Y444_10BE, GBR_10BE, Y444_10LE, GBR_10LE, r210, I422_10BE, I422_10LE, NV16_10LE32, Y210, v210, UYVP, I420_10BE, I420_10LE, P010_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, Y444, GBR, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_BE, GRAY16_LE, GRAY10_LE32, GRAY8 }"; + public const string VIDEO_FPS_RANGE = @"(fraction) [ 0, max ]"; + public const int VIDEO_MAX_COMPONENTS = 4; + public const int VIDEO_MAX_PLANES = 4; + public const string VIDEO_RESAMPLER_OPT_CUBIC_B = @"GstVideoResampler.cubic-b"; + public const string VIDEO_RESAMPLER_OPT_CUBIC_C = @"GstVideoResampler.cubic-c"; + public const string VIDEO_RESAMPLER_OPT_ENVELOPE = @"GstVideoResampler.envelope"; + public const string VIDEO_RESAMPLER_OPT_MAX_TAPS = @"GstVideoResampler.max-taps"; + public const string VIDEO_RESAMPLER_OPT_SHARPEN = @"GstVideoResampler.sharpen"; + public const string VIDEO_RESAMPLER_OPT_SHARPNESS = @"GstVideoResampler.sharpness"; + public const string VIDEO_SCALER_OPT_DITHER_METHOD = @"GstVideoScaler.dither-method"; + public const string VIDEO_SIZE_RANGE = @"(int) [ 1, max ]"; + public const int VIDEO_TILE_TYPE_MASK = 65535; + public const int VIDEO_TILE_TYPE_SHIFT = 16; + public const int VIDEO_TILE_X_TILES_MASK = 65535; + public const int VIDEO_TILE_Y_TILES_SHIFT = 16; +#endregion + } +} diff --git a/sources/generated/Gst.Video/Global.cs b/sources/generated/Gst.Video/Global.cs new file mode 100644 index 0000000000..454f84edf9 --- /dev/null +++ b/sources/generated/Gst.Video/Global.cs @@ -0,0 +1,1145 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_afd_meta(IntPtr buffer, byte field, int spec, int afd); + + public static Gst.Video.VideoAFDMeta BufferAddVideoAfdMeta(Gst.Buffer buffer, byte field, Gst.Video.VideoAFDSpec spec, Gst.Video.VideoAFDValue afd) { + IntPtr raw_ret = gst_buffer_add_video_afd_meta(buffer == null ? IntPtr.Zero : buffer.Handle, field, (int) spec, (int) afd); + Gst.Video.VideoAFDMeta ret = Gst.Video.VideoAFDMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_affine_transformation_meta(IntPtr buffer); + + public static Gst.Video.VideoAffineTransformationMeta BufferAddVideoAffineTransformationMeta(Gst.Buffer buffer) { + IntPtr raw_ret = gst_buffer_add_video_affine_transformation_meta(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Video.VideoAffineTransformationMeta ret = Gst.Video.VideoAffineTransformationMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_bar_meta(IntPtr buffer, byte field, bool is_letterbox, uint bar_data1, uint bar_data2); + + public static Gst.Video.VideoBarMeta BufferAddVideoBarMeta(Gst.Buffer buffer, byte field, bool is_letterbox, uint bar_data1, uint bar_data2) { + IntPtr raw_ret = gst_buffer_add_video_bar_meta(buffer == null ? IntPtr.Zero : buffer.Handle, field, is_letterbox, bar_data1, bar_data2); + Gst.Video.VideoBarMeta ret = Gst.Video.VideoBarMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_caption_meta(IntPtr buffer, int caption_type, byte[] data, UIntPtr size); + + public static Gst.Video.VideoCaptionMeta BufferAddVideoCaptionMeta(Gst.Buffer buffer, Gst.Video.VideoCaptionType caption_type, byte[] data, ulong size) { + IntPtr raw_ret = gst_buffer_add_video_caption_meta(buffer == null ? IntPtr.Zero : buffer.Handle, (int) caption_type, data, new UIntPtr (size)); + Gst.Video.VideoCaptionMeta ret = Gst.Video.VideoCaptionMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_gl_texture_upload_meta(IntPtr buffer, int texture_orientation, uint n_textures, int texture_type, Gst.VideoSharp.VideoGLTextureUploadNative upload, IntPtr user_data, IntPtr user_data_copy, IntPtr user_data_free); + + public static Gst.Video.VideoGLTextureUploadMeta BufferAddVideoGlTextureUploadMeta(Gst.Buffer buffer, Gst.Video.VideoGLTextureOrientation texture_orientation, uint n_textures, Gst.Video.VideoGLTextureType texture_type, Gst.Video.VideoGLTextureUpload upload, IntPtr user_data_copy, IntPtr user_data_free) { + Gst.VideoSharp.VideoGLTextureUploadWrapper upload_wrapper = new Gst.VideoSharp.VideoGLTextureUploadWrapper (upload); + IntPtr raw_ret = gst_buffer_add_video_gl_texture_upload_meta(buffer == null ? IntPtr.Zero : buffer.Handle, (int) texture_orientation, n_textures, (int) texture_type, upload_wrapper.NativeDelegate, IntPtr.Zero, user_data_copy, user_data_free); + Gst.Video.VideoGLTextureUploadMeta ret = Gst.Video.VideoGLTextureUploadMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_meta(IntPtr buffer, int flags, int format, uint width, uint height); + + public static Gst.Video.VideoMeta BufferAddVideoMeta(Gst.Buffer buffer, Gst.Video.VideoFrameFlags flags, Gst.Video.VideoFormat format, uint width, uint height) { + IntPtr raw_ret = gst_buffer_add_video_meta(buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags, (int) format, width, height); + Gst.Video.VideoMeta ret = Gst.Video.VideoMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_overlay_composition_meta(IntPtr buf, IntPtr comp); + + public static Gst.Video.VideoOverlayCompositionMeta BufferAddVideoOverlayCompositionMeta(Gst.Buffer buf, Gst.Video.VideoOverlayComposition comp) { + IntPtr raw_ret = gst_buffer_add_video_overlay_composition_meta(buf == null ? IntPtr.Zero : buf.Handle, comp == null ? IntPtr.Zero : comp.Handle); + Gst.Video.VideoOverlayCompositionMeta ret = Gst.Video.VideoOverlayCompositionMeta.New (raw_ret); + return ret; + } + + public static Gst.Video.VideoOverlayCompositionMeta BufferAddVideoOverlayCompositionMeta(Gst.Buffer buf) { + return BufferAddVideoOverlayCompositionMeta (buf, null); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_region_of_interest_meta(IntPtr buffer, IntPtr roi_type, uint x, uint y, uint w, uint h); + + public static Gst.Video.VideoRegionOfInterestMeta BufferAddVideoRegionOfInterestMeta(Gst.Buffer buffer, string roi_type, uint x, uint y, uint w, uint h) { + IntPtr native_roi_type = GLib.Marshaller.StringToPtrGStrdup (roi_type); + IntPtr raw_ret = gst_buffer_add_video_region_of_interest_meta(buffer == null ? IntPtr.Zero : buffer.Handle, native_roi_type, x, y, w, h); + Gst.Video.VideoRegionOfInterestMeta ret = Gst.Video.VideoRegionOfInterestMeta.New (raw_ret); + GLib.Marshaller.Free (native_roi_type); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_region_of_interest_meta_id(IntPtr buffer, uint roi_type, uint x, uint y, uint w, uint h); + + public static Gst.Video.VideoRegionOfInterestMeta BufferAddVideoRegionOfInterestMetaId(Gst.Buffer buffer, uint roi_type, uint x, uint y, uint w, uint h) { + IntPtr raw_ret = gst_buffer_add_video_region_of_interest_meta_id(buffer == null ? IntPtr.Zero : buffer.Handle, roi_type, x, y, w, h); + Gst.Video.VideoRegionOfInterestMeta ret = Gst.Video.VideoRegionOfInterestMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_time_code_meta(IntPtr buffer, IntPtr tc); + + public static Gst.Video.VideoTimeCodeMeta BufferAddVideoTimeCodeMeta(Gst.Buffer buffer, Gst.Video.VideoTimeCode tc) { + IntPtr native_tc = GLib.Marshaller.StructureToPtrAlloc (tc); + IntPtr raw_ret = gst_buffer_add_video_time_code_meta(buffer == null ? IntPtr.Zero : buffer.Handle, native_tc); + Gst.Video.VideoTimeCodeMeta ret = Gst.Video.VideoTimeCodeMeta.New (raw_ret); + Marshal.FreeHGlobal (native_tc); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_video_time_code_meta_full(IntPtr buffer, uint fps_n, uint fps_d, IntPtr latest_daily_jam, int flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + + public static Gst.Video.VideoTimeCodeMeta BufferAddVideoTimeCodeMetaFull(Gst.Buffer buffer, uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) { + IntPtr raw_ret = gst_buffer_add_video_time_code_meta_full(buffer == null ? IntPtr.Zero : buffer.Handle, fps_n, fps_d, latest_daily_jam == null ? IntPtr.Zero : latest_daily_jam.Handle, (int) flags, hours, minutes, seconds, frames, field_count); + Gst.Video.VideoTimeCodeMeta ret = Gst.Video.VideoTimeCodeMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_video_meta(IntPtr buffer); + + public static Gst.Video.VideoMeta BufferGetVideoMeta(Gst.Buffer buffer) { + IntPtr raw_ret = gst_buffer_get_video_meta(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.Video.VideoMeta ret = Gst.Video.VideoMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_video_meta_id(IntPtr buffer, int id); + + public static Gst.Video.VideoMeta BufferGetVideoMetaId(Gst.Buffer buffer, int id) { + IntPtr raw_ret = gst_buffer_get_video_meta_id(buffer == null ? IntPtr.Zero : buffer.Handle, id); + Gst.Video.VideoMeta ret = Gst.Video.VideoMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_video_region_of_interest_meta_id(IntPtr buffer, int id); + + public static Gst.Video.VideoRegionOfInterestMeta BufferGetVideoRegionOfInterestMetaId(Gst.Buffer buffer, int id) { + IntPtr raw_ret = gst_buffer_get_video_region_of_interest_meta_id(buffer == null ? IntPtr.Zero : buffer.Handle, id); + Gst.Video.VideoRegionOfInterestMeta ret = Gst.Video.VideoRegionOfInterestMeta.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_config_get_video_alignment(IntPtr config, IntPtr align); + + public static bool BufferPoolConfigGetVideoAlignment(Gst.Structure config, Gst.Video.VideoAlignment align) { + IntPtr native_align = GLib.Marshaller.StructureToPtrAlloc (align); + bool raw_ret = gst_buffer_pool_config_get_video_alignment(config == null ? IntPtr.Zero : config.Handle, native_align); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_align); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_config_set_video_alignment(IntPtr config, IntPtr align); + + public static void BufferPoolConfigSetVideoAlignment(Gst.Structure config, Gst.Video.VideoAlignment align) { + IntPtr native_align = GLib.Marshaller.StructureToPtrAlloc (align); + gst_buffer_pool_config_set_video_alignment(config == null ? IntPtr.Zero : config.Handle, native_align); + Marshal.FreeHGlobal (native_align); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_is_video_overlay_prepare_window_handle_message(IntPtr msg); + + public static bool IsVideoOverlayPrepareWindowHandleMessage(Gst.Message msg) { + bool raw_ret = gst_is_video_overlay_prepare_window_handle_message(msg == null ? IntPtr.Zero : msg.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_event_get_type(IntPtr evnt); + + public static Gst.Video.NavigationEventType NavigationEventGetType(Gst.Event evnt) { + int raw_ret = gst_navigation_event_get_type(evnt == null ? IntPtr.Zero : evnt.Handle); + Gst.Video.NavigationEventType ret = (Gst.Video.NavigationEventType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_command(IntPtr evnt, out int command); + + public static bool NavigationEventParseCommand(Gst.Event evnt, out Gst.Video.NavigationCommand command) { + int native_command; + bool raw_ret = gst_navigation_event_parse_command(evnt == null ? IntPtr.Zero : evnt.Handle, out native_command); + bool ret = raw_ret; + command = (Gst.Video.NavigationCommand) native_command; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_key_event(IntPtr evnt, out IntPtr key); + + public static bool NavigationEventParseKeyEvent(Gst.Event evnt, out string key) { + IntPtr native_key; + bool raw_ret = gst_navigation_event_parse_key_event(evnt == null ? IntPtr.Zero : evnt.Handle, out native_key); + bool ret = raw_ret; + key = GLib.Marshaller.Utf8PtrToString (native_key); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_button_event(IntPtr evnt, out int button, out double x, out double y); + + public static bool NavigationEventParseMouseButtonEvent(Gst.Event evnt, out int button, out double x, out double y) { + bool raw_ret = gst_navigation_event_parse_mouse_button_event(evnt == null ? IntPtr.Zero : evnt.Handle, out button, out x, out y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_move_event(IntPtr evnt, out double x, out double y); + + public static bool NavigationEventParseMouseMoveEvent(Gst.Event evnt, out double x, out double y) { + bool raw_ret = gst_navigation_event_parse_mouse_move_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_scroll_event(IntPtr evnt, out double x, out double y, out double delta_x, out double delta_y); + + public static bool NavigationEventParseMouseScrollEvent(Gst.Event evnt, out double x, out double y, out double delta_x, out double delta_y) { + bool raw_ret = gst_navigation_event_parse_mouse_scroll_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y, out delta_x, out delta_y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_message_get_type(IntPtr message); + + public static Gst.Video.NavigationMessageType NavigationMessageGetType(Gst.Message message) { + int raw_ret = gst_navigation_message_get_type(message == null ? IntPtr.Zero : message.Handle); + Gst.Video.NavigationMessageType ret = (Gst.Video.NavigationMessageType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_angles_changed(IntPtr src, uint cur_angle, uint n_angles); + + public static Gst.Message NavigationMessageNewAnglesChanged(Gst.Object src, uint cur_angle, uint n_angles) { + IntPtr raw_ret = gst_navigation_message_new_angles_changed(src == null ? IntPtr.Zero : src.Handle, cur_angle, n_angles); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_commands_changed(IntPtr src); + + public static Gst.Message NavigationMessageNewCommandsChanged(Gst.Object src) { + IntPtr raw_ret = gst_navigation_message_new_commands_changed(src == null ? IntPtr.Zero : src.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_event(IntPtr src, IntPtr evnt); + + public static Gst.Message NavigationMessageNewEvent(Gst.Object src, Gst.Event evnt) { + IntPtr raw_ret = gst_navigation_message_new_event(src == null ? IntPtr.Zero : src.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_mouse_over(IntPtr src, bool active); + + public static Gst.Message NavigationMessageNewMouseOver(Gst.Object src, bool active) { + IntPtr raw_ret = gst_navigation_message_new_mouse_over(src == null ? IntPtr.Zero : src.Handle, active); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_angles_changed(IntPtr message, out uint cur_angle, out uint n_angles); + + public static bool NavigationMessageParseAnglesChanged(Gst.Message message, out uint cur_angle, out uint n_angles) { + bool raw_ret = gst_navigation_message_parse_angles_changed(message == null ? IntPtr.Zero : message.Handle, out cur_angle, out n_angles); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_event(IntPtr message, out IntPtr evnt); + + public static bool NavigationMessageParseEvent(Gst.Message message, out Gst.Event evnt) { + IntPtr native_evnt; + bool raw_ret = gst_navigation_message_parse_event(message == null ? IntPtr.Zero : message.Handle, out native_evnt); + bool ret = raw_ret; + evnt = native_evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (native_evnt, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_mouse_over(IntPtr message, out bool active); + + public static bool NavigationMessageParseMouseOver(Gst.Message message, out bool active) { + bool raw_ret = gst_navigation_message_parse_mouse_over(message == null ? IntPtr.Zero : message.Handle, out active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_query_get_type(IntPtr query); + + public static Gst.Video.NavigationQueryType NavigationQueryGetType(Gst.Query query) { + int raw_ret = gst_navigation_query_get_type(query == null ? IntPtr.Zero : query.Handle); + Gst.Video.NavigationQueryType ret = (Gst.Video.NavigationQueryType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_query_new_angles(); + + public static Gst.Query NavigationQueryNewAngles() { + IntPtr raw_ret = gst_navigation_query_new_angles(); + Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_query_new_commands(); + + public static Gst.Query NavigationQueryNewCommands() { + IntPtr raw_ret = gst_navigation_query_new_commands(); + Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_angles(IntPtr query, out uint cur_angle, out uint n_angles); + + public static bool NavigationQueryParseAngles(Gst.Query query, out uint cur_angle, out uint n_angles) { + bool raw_ret = gst_navigation_query_parse_angles(query == null ? IntPtr.Zero : query.Handle, out cur_angle, out n_angles); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_commands_length(IntPtr query, out uint n_cmds); + + public static bool NavigationQueryParseCommandsLength(Gst.Query query, out uint n_cmds) { + bool raw_ret = gst_navigation_query_parse_commands_length(query == null ? IntPtr.Zero : query.Handle, out n_cmds); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_commands_nth(IntPtr query, uint nth, out int cmd); + + public static bool NavigationQueryParseCommandsNth(Gst.Query query, uint nth, out Gst.Video.NavigationCommand cmd) { + int native_cmd; + bool raw_ret = gst_navigation_query_parse_commands_nth(query == null ? IntPtr.Zero : query.Handle, nth, out native_cmd); + bool ret = raw_ret; + cmd = (Gst.Video.NavigationCommand) native_cmd; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_query_set_angles(IntPtr query, uint cur_angle, uint n_angles); + + public static void NavigationQuerySetAngles(Gst.Query query, uint cur_angle, uint n_angles) { + gst_navigation_query_set_angles(query == null ? IntPtr.Zero : query.Handle, cur_angle, n_angles); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_query_set_commandsv(IntPtr query, int n_cmds, int[] cmds); + + public static void NavigationQuerySetCommandsv(Gst.Query query, Gst.Video.NavigationCommand[] cmds) { + int cnt_cmds = cmds == null ? 0 : cmds.Length; + int[] native_cmds = new int [cnt_cmds]; + for (int i = 0; i < cnt_cmds; i++) + native_cmds [i] = (int) cmds[i]; + gst_navigation_query_set_commandsv(query == null ? IntPtr.Zero : query.Handle, (cmds == null ? 0 : cmds.Length), native_cmds); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_afd_meta_api_get_type(); + + public static GLib.GType VideoAfdMetaApiGetType() { + IntPtr raw_ret = gst_video_afd_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_afd_meta_get_info(); + + public static Gst.MetaInfo VideoAfdMetaGetInfo() { + IntPtr raw_ret = gst_video_afd_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_affine_transformation_meta_api_get_type(); + + public static GLib.GType VideoAffineTransformationMetaApiGetType() { + IntPtr raw_ret = gst_video_affine_transformation_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_affine_transformation_meta_get_info(); + + public static Gst.MetaInfo VideoAffineTransformationMetaGetInfo() { + IntPtr raw_ret = gst_video_affine_transformation_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_bar_meta_api_get_type(); + + public static GLib.GType VideoBarMetaApiGetType() { + IntPtr raw_ret = gst_video_bar_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_bar_meta_get_info(); + + public static Gst.MetaInfo VideoBarMetaGetInfo() { + IntPtr raw_ret = gst_video_bar_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_blend(IntPtr dest, IntPtr src, int x, int y, float global_alpha); + + public static bool VideoBlend(Gst.Video.VideoFrame dest, Gst.Video.VideoFrame src, int x, int y, float global_alpha) { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + bool raw_ret = gst_video_blend(native_dest, native_src, x, y, global_alpha); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_blend_scale_linear_RGBA(IntPtr src, IntPtr src_buffer, int dest_height, int dest_width, out IntPtr dest, out IntPtr dest_buffer); + + public static void VideoBlendScaleLinearRGBA(Gst.Video.VideoInfo src, Gst.Buffer src_buffer, int dest_height, int dest_width, out Gst.Video.VideoInfo dest, out Gst.Buffer dest_buffer) { + IntPtr native_dest; + IntPtr native_dest_buffer; + gst_video_blend_scale_linear_RGBA(src == null ? IntPtr.Zero : src.Handle, src_buffer == null ? IntPtr.Zero : src_buffer.Handle, dest_height, dest_width, out native_dest, out native_dest_buffer); + dest = native_dest == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (native_dest, typeof (Gst.Video.VideoInfo), false); + dest_buffer = native_dest_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_dest_buffer, typeof (Gst.Buffer), true); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_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); + + public static bool VideoCalculateDisplayRatio(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) { + bool raw_ret = gst_video_calculate_display_ratio(out dar_n, out dar_d, video_width, video_height, video_par_n, video_par_d, display_par_n, display_par_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_caption_meta_api_get_type(); + + public static GLib.GType VideoCaptionMetaApiGetType() { + IntPtr raw_ret = gst_video_caption_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_caption_meta_get_info(); + + public static Gst.MetaInfo VideoCaptionMetaGetInfo() { + IntPtr raw_ret = gst_video_caption_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_caption_type_from_caps(IntPtr caps); + + public static Gst.Video.VideoCaptionType VideoCaptionTypeFromCaps(Gst.Caps caps) { + int raw_ret = gst_video_caption_type_from_caps(caps == null ? IntPtr.Zero : caps.Handle); + Gst.Video.VideoCaptionType ret = (Gst.Video.VideoCaptionType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_caption_type_to_caps(int type); + + public static Gst.Caps VideoCaptionTypeToCaps(Gst.Video.VideoCaptionType type) { + IntPtr raw_ret = gst_video_caption_type_to_caps((int) type); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_chroma_from_string(IntPtr s); + + public static Gst.Video.VideoChromaSite VideoChromaFromString(string s) { + IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); + int raw_ret = gst_video_chroma_from_string(native_s); + Gst.Video.VideoChromaSite ret = (Gst.Video.VideoChromaSite) raw_ret; + GLib.Marshaller.Free (native_s); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_chroma_resample(IntPtr resample, IntPtr lines, int width); + + public static void VideoChromaResample(Gst.Video.VideoChromaResample resample, IntPtr lines, int width) { + gst_video_chroma_resample(resample == null ? IntPtr.Zero : resample.Handle, lines, width); + } + + public static void VideoChromaResample(Gst.Video.VideoChromaResample resample, int width) { + VideoChromaResample (resample, IntPtr.Zero, width); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_chroma_to_string(int site); + + public static string VideoChromaToString(Gst.Video.VideoChromaSite site) { + IntPtr raw_ret = gst_video_chroma_to_string((int) site); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_color_matrix_from_iso(uint value); + + public static Gst.Video.VideoColorMatrix VideoColorMatrixFromIso(uint value) { + int raw_ret = gst_video_color_matrix_from_iso(value); + Gst.Video.VideoColorMatrix ret = (Gst.Video.VideoColorMatrix) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_color_matrix_get_Kr_Kb(int matrix, out double Kr, out double Kb); + + public static bool VideoColorMatrixGetKrKb(Gst.Video.VideoColorMatrix matrix, out double Kr, out double Kb) { + bool raw_ret = gst_video_color_matrix_get_Kr_Kb((int) matrix, out Kr, out Kb); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_color_matrix_to_iso(int matrix); + + public static uint VideoColorMatrixToIso(Gst.Video.VideoColorMatrix matrix) { + uint raw_ret = gst_video_color_matrix_to_iso((int) matrix); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_color_primaries_from_iso(uint value); + + public static Gst.Video.VideoColorPrimaries VideoColorPrimariesFromIso(uint value) { + int raw_ret = gst_video_color_primaries_from_iso(value); + Gst.Video.VideoColorPrimaries ret = (Gst.Video.VideoColorPrimaries) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_color_primaries_get_info(int primaries); + + public static Gst.Video.VideoColorPrimariesInfo VideoColorPrimariesGetInfo(Gst.Video.VideoColorPrimaries primaries) { + IntPtr raw_ret = gst_video_color_primaries_get_info((int) primaries); + Gst.Video.VideoColorPrimariesInfo ret = Gst.Video.VideoColorPrimariesInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_color_primaries_to_iso(int primaries); + + public static uint VideoColorPrimariesToIso(Gst.Video.VideoColorPrimaries primaries) { + uint raw_ret = gst_video_color_primaries_to_iso((int) primaries); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_color_range_offsets(int range, IntPtr info, out int[] offset, out int[] scale); + + public static void VideoColorRangeOffsets(Gst.Video.VideoColorRange range, Gst.Video.VideoFormatInfo info, out int[] offset, out int[] scale) { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + offset = new int[4]; + scale = new int[4]; + gst_video_color_range_offsets((int) range, native_info, out offset, out scale); + Marshal.FreeHGlobal (native_info); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_color_transfer_decode(int func, double val); + + [Obsolete] + public static double VideoColorTransferDecode(Gst.Video.VideoTransferFunction func, double val) { + double raw_ret = gst_video_color_transfer_decode((int) func, val); + double ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_color_transfer_encode(int func, double val); + + [Obsolete] + public static double VideoColorTransferEncode(Gst.Video.VideoTransferFunction func, double val) { + double raw_ret = gst_video_color_transfer_encode((int) func, val); + double ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_video_convert_sample(IntPtr sample, IntPtr to_caps, ulong timeout, out IntPtr error); + + public static unsafe Gst.Sample VideoConvertSample(Gst.Sample sample, Gst.Caps to_caps, ulong timeout) { + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_video_convert_sample(sample == null ? IntPtr.Zero : sample.Handle, to_caps == null ? IntPtr.Zero : to_caps.Handle, timeout, out error); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_convert_sample_async(IntPtr sample, IntPtr to_caps, ulong timeout, Gst.VideoSharp.VideoConvertSampleCallbackNative cb, IntPtr user_data, GLib.DestroyNotify destroy_notify); + + public static void VideoConvertSampleAsync(Gst.Sample sample, Gst.Caps to_caps, ulong timeout, Gst.Video.VideoConvertSampleCallback cb) { + Gst.VideoSharp.VideoConvertSampleCallbackWrapper cb_wrapper = new Gst.VideoSharp.VideoConvertSampleCallbackWrapper (cb); + IntPtr user_data; + GLib.DestroyNotify destroy_notify; + if (cb == null) { + user_data = IntPtr.Zero; + destroy_notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (cb_wrapper); + destroy_notify = GLib.DestroyHelper.NotifyHandler; + } + gst_video_convert_sample_async(sample == null ? IntPtr.Zero : sample.Handle, to_caps == null ? IntPtr.Zero : to_caps.Handle, timeout, cb_wrapper.NativeDelegate, user_data, destroy_notify); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_crop_meta_api_get_type(); + + public static GLib.GType VideoCropMetaApiGetType() { + IntPtr raw_ret = gst_video_crop_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_crop_meta_get_info(); + + public static Gst.MetaInfo VideoCropMetaGetInfo() { + IntPtr raw_ret = gst_video_crop_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_event_is_force_key_unit(IntPtr evnt); + + public static bool VideoEventIsForceKeyUnit(Gst.Event evnt) { + bool raw_ret = gst_video_event_is_force_key_unit(evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_event_new_downstream_force_key_unit(ulong timestamp, ulong stream_time, ulong running_time, bool all_headers, uint count); + + public static Gst.Event VideoEventNewDownstreamForceKeyUnit(ulong timestamp, ulong stream_time, ulong running_time, bool all_headers, uint count) { + IntPtr raw_ret = gst_video_event_new_downstream_force_key_unit(timestamp, stream_time, running_time, all_headers, count); + Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_event_new_still_frame(bool in_still); + + public static Gst.Event VideoEventNewStillFrame(bool in_still) { + IntPtr raw_ret = gst_video_event_new_still_frame(in_still); + Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_event_new_upstream_force_key_unit(ulong running_time, bool all_headers, uint count); + + public static Gst.Event VideoEventNewUpstreamForceKeyUnit(ulong running_time, bool all_headers, uint count) { + IntPtr raw_ret = gst_video_event_new_upstream_force_key_unit(running_time, all_headers, count); + Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_event_parse_downstream_force_key_unit(IntPtr evnt, out ulong timestamp, out ulong stream_time, out ulong running_time, out bool all_headers, out uint count); + + public static bool VideoEventParseDownstreamForceKeyUnit(Gst.Event evnt, out ulong timestamp, out ulong stream_time, out ulong running_time, out bool all_headers, out uint count) { + bool raw_ret = gst_video_event_parse_downstream_force_key_unit(evnt == null ? IntPtr.Zero : evnt.Handle, out timestamp, out stream_time, out running_time, out all_headers, out count); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_event_parse_still_frame(IntPtr evnt, out bool in_still); + + public static bool VideoEventParseStillFrame(Gst.Event evnt, out bool in_still) { + bool raw_ret = gst_video_event_parse_still_frame(evnt == null ? IntPtr.Zero : evnt.Handle, out in_still); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_event_parse_upstream_force_key_unit(IntPtr evnt, out ulong running_time, out bool all_headers, out uint count); + + public static bool VideoEventParseUpstreamForceKeyUnit(Gst.Event evnt, out ulong running_time, out bool all_headers, out uint count) { + bool raw_ret = gst_video_event_parse_upstream_force_key_unit(evnt == null ? IntPtr.Zero : evnt.Handle, out running_time, out all_headers, out count); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_field_order_from_string(IntPtr order); + + public static Gst.Video.VideoFieldOrder VideoFieldOrderFromString(string order) { + IntPtr native_order = GLib.Marshaller.StringToPtrGStrdup (order); + int raw_ret = gst_video_field_order_from_string(native_order); + Gst.Video.VideoFieldOrder ret = (Gst.Video.VideoFieldOrder) raw_ret; + GLib.Marshaller.Free (native_order); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_field_order_to_string(int order); + + public static string VideoFieldOrderToString(Gst.Video.VideoFieldOrder order) { + IntPtr raw_ret = gst_video_field_order_to_string((int) order); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_format_from_fourcc(uint fourcc); + + public static Gst.Video.VideoFormat VideoFormatFromFourcc(uint fourcc) { + int raw_ret = gst_video_format_from_fourcc(fourcc); + Gst.Video.VideoFormat ret = (Gst.Video.VideoFormat) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int 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.VideoFormat VideoFormatFromMasks(int depth, int bpp, int endianness, uint red_mask, uint green_mask, uint blue_mask, uint alpha_mask) { + int raw_ret = gst_video_format_from_masks(depth, bpp, endianness, red_mask, green_mask, blue_mask, alpha_mask); + Gst.Video.VideoFormat ret = (Gst.Video.VideoFormat) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_format_from_string(IntPtr format); + + public static Gst.Video.VideoFormat VideoFormatFromString(string format) { + IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); + int raw_ret = gst_video_format_from_string(native_format); + Gst.Video.VideoFormat ret = (Gst.Video.VideoFormat) raw_ret; + GLib.Marshaller.Free (native_format); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_format_get_info(int format); + + public static Gst.Video.VideoFormatInfo VideoFormatGetInfo(Gst.Video.VideoFormat format) { + IntPtr raw_ret = gst_video_format_get_info((int) format); + Gst.Video.VideoFormatInfo ret = Gst.Video.VideoFormatInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_format_get_palette(int format, out UIntPtr size); + + public static IntPtr VideoFormatGetPalette(Gst.Video.VideoFormat format, out ulong size) { + UIntPtr native_size; + IntPtr raw_ret = gst_video_format_get_palette((int) format, out native_size); + IntPtr ret = raw_ret; + size = (ulong) native_size; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_format_to_fourcc(int format); + + public static uint VideoFormatToFourcc(Gst.Video.VideoFormat format) { + uint raw_ret = gst_video_format_to_fourcc((int) format); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_format_to_string(int format); + + public static string VideoFormatToString(Gst.Video.VideoFormat format) { + IntPtr raw_ret = gst_video_format_to_string((int) format); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_gl_texture_upload_meta_api_get_type(); + + public static GLib.GType VideoGlTextureUploadMetaApiGetType() { + IntPtr raw_ret = gst_video_gl_texture_upload_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_gl_texture_upload_meta_get_info(); + + public static Gst.MetaInfo VideoGlTextureUploadMetaGetInfo() { + IntPtr raw_ret = gst_video_gl_texture_upload_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_guess_framerate(ulong duration, out int dest_n, out int dest_d); + + public static bool VideoGuessFramerate(ulong duration, out int dest_n, out int dest_d) { + bool raw_ret = gst_video_guess_framerate(duration, out dest_n, out dest_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_interlace_mode_from_string(IntPtr mode); + + public static Gst.Video.VideoInterlaceMode VideoInterlaceModeFromString(string mode) { + IntPtr native_mode = GLib.Marshaller.StringToPtrGStrdup (mode); + int raw_ret = gst_video_interlace_mode_from_string(native_mode); + Gst.Video.VideoInterlaceMode ret = (Gst.Video.VideoInterlaceMode) raw_ret; + GLib.Marshaller.Free (native_mode); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_interlace_mode_to_string(int mode); + + public static string VideoInterlaceModeToString(Gst.Video.VideoInterlaceMode mode) { + IntPtr raw_ret = gst_video_interlace_mode_to_string((int) mode); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_make_raw_caps(int[] formats, uint len); + + public static Gst.Caps VideoMakeRawCaps(Gst.Video.VideoFormat[] formats, uint len) { + int cnt_formats = formats == null ? 0 : formats.Length; + int[] native_formats = new int [cnt_formats]; + for (int i = 0; i < cnt_formats; i++) + native_formats [i] = (int) formats[i]; + IntPtr raw_ret = gst_video_make_raw_caps(native_formats, len); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public static Gst.Caps VideoMakeRawCaps(uint len) { + return VideoMakeRawCaps (null, len); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_make_raw_caps_with_features(int[] formats, uint len, IntPtr features); + + public static Gst.Caps VideoMakeRawCapsWithFeatures(Gst.Video.VideoFormat[] formats, uint len, Gst.CapsFeatures features) { + int cnt_formats = formats == null ? 0 : formats.Length; + int[] native_formats = new int [cnt_formats]; + for (int i = 0; i < cnt_formats; i++) + native_formats [i] = (int) formats[i]; + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + IntPtr raw_ret = gst_video_make_raw_caps_with_features(native_formats, len, native_features); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + Marshal.FreeHGlobal (native_features); + return ret; + } + + public static Gst.Caps VideoMakeRawCapsWithFeatures(uint len) { + return VideoMakeRawCapsWithFeatures (null, len, Gst.CapsFeatures.Zero); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_mastering_display_info_from_string(IntPtr minfo, IntPtr mastering); + + public static bool VideoMasteringDisplayInfoFromString(out Gst.Video.VideoMasteringDisplayInfo minfo, string mastering) { + IntPtr native_minfo = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Video.VideoMasteringDisplayInfo))); + IntPtr native_mastering = GLib.Marshaller.StringToPtrGStrdup (mastering); + bool raw_ret = gst_video_mastering_display_info_from_string(native_minfo, native_mastering); + bool ret = raw_ret; + minfo = Gst.Video.VideoMasteringDisplayInfo.New (native_minfo); + Marshal.FreeHGlobal (native_minfo); + GLib.Marshaller.Free (native_mastering); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_meta_api_get_type(); + + public static GLib.GType VideoMetaApiGetType() { + IntPtr raw_ret = gst_video_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_meta_get_info(); + + public static Gst.MetaInfo VideoMetaGetInfo() { + IntPtr raw_ret = gst_video_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_meta_transform_scale_get_quark(); + + public static uint VideoMetaTransformScaleGetQuark() { + uint raw_ret = gst_video_meta_transform_scale_get_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_get_doubled_height_modes(); + + public static GLib.Value VideoMultiviewGetDoubledHeightModes() { + IntPtr raw_ret = gst_video_multiview_get_doubled_height_modes(); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_get_doubled_size_modes(); + + public static GLib.Value VideoMultiviewGetDoubledSizeModes() { + IntPtr raw_ret = gst_video_multiview_get_doubled_size_modes(); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_get_doubled_width_modes(); + + public static GLib.Value VideoMultiviewGetDoubledWidthModes() { + IntPtr raw_ret = gst_video_multiview_get_doubled_width_modes(); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_get_mono_modes(); + + public static GLib.Value VideoMultiviewGetMonoModes() { + IntPtr raw_ret = gst_video_multiview_get_mono_modes(); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_get_unpacked_modes(); + + public static GLib.Value VideoMultiviewGetUnpackedModes() { + IntPtr raw_ret = gst_video_multiview_get_unpacked_modes(); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_multiview_guess_half_aspect(int mv_mode, uint width, uint height, uint par_n, uint par_d); + + public static bool VideoMultiviewGuessHalfAspect(Gst.Video.VideoMultiviewMode mv_mode, uint width, uint height, uint par_n, uint par_d) { + bool raw_ret = gst_video_multiview_guess_half_aspect((int) mv_mode, width, height, par_n, par_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_multiview_mode_from_caps_string(IntPtr caps_mview_mode); + + public static Gst.Video.VideoMultiviewMode VideoMultiviewModeFromCapsString(string caps_mview_mode) { + IntPtr native_caps_mview_mode = GLib.Marshaller.StringToPtrGStrdup (caps_mview_mode); + int raw_ret = gst_video_multiview_mode_from_caps_string(native_caps_mview_mode); + Gst.Video.VideoMultiviewMode ret = (Gst.Video.VideoMultiviewMode) raw_ret; + GLib.Marshaller.Free (native_caps_mview_mode); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_mode_to_caps_string(int mview_mode); + + public static string VideoMultiviewModeToCapsString(Gst.Video.VideoMultiviewMode mview_mode) { + IntPtr raw_ret = gst_video_multiview_mode_to_caps_string((int) mview_mode); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_multiview_video_info_change_mode(IntPtr info, int out_mview_mode, int out_mview_flags); + + public static void VideoMultiviewVideoInfoChangeMode(Gst.Video.VideoInfo info, Gst.Video.VideoMultiviewMode out_mview_mode, Gst.Video.VideoMultiviewFlags out_mview_flags) { + gst_video_multiview_video_info_change_mode(info == null ? IntPtr.Zero : info.Handle, (int) out_mview_mode, (int) out_mview_flags); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_meta_api_get_type(); + + public static GLib.GType VideoOverlayCompositionMetaApiGetType() { + IntPtr raw_ret = gst_video_overlay_composition_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_meta_get_info(); + + public static Gst.MetaInfo VideoOverlayCompositionMetaGetInfo() { + IntPtr raw_ret = gst_video_overlay_composition_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_property(IntPtr _object, int last_prop_id, uint property_id, IntPtr value); + + public static bool VideoOverlaySetProperty(GLib.Object _object, int last_prop_id, uint property_id, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = gst_video_overlay_set_property(_object == null ? IntPtr.Zero : _object.Handle, last_prop_id, property_id, native_value); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_region_of_interest_meta_api_get_type(); + + public static GLib.GType VideoRegionOfInterestMetaApiGetType() { + IntPtr raw_ret = gst_video_region_of_interest_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_region_of_interest_meta_get_info(); + + public static Gst.MetaInfo VideoRegionOfInterestMetaGetInfo() { + IntPtr raw_ret = gst_video_region_of_interest_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_tile_get_index(int mode, int x, int y, int x_tiles, int y_tiles); + + public static uint VideoTileGetIndex(Gst.Video.VideoTileMode mode, int x, int y, int x_tiles, int y_tiles) { + uint raw_ret = gst_video_tile_get_index((int) mode, x, y, x_tiles, y_tiles); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_meta_api_get_type(); + + public static GLib.GType VideoTimeCodeMetaApiGetType() { + IntPtr raw_ret = gst_video_time_code_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_meta_get_info(); + + public static Gst.MetaInfo VideoTimeCodeMetaGetInfo() { + IntPtr raw_ret = gst_video_time_code_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_transfer_function_decode(int func, double val); + + public static double VideoTransferFunctionDecode(Gst.Video.VideoTransferFunction func, double val) { + double raw_ret = gst_video_transfer_function_decode((int) func, val); + double ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_transfer_function_encode(int func, double val); + + public static double VideoTransferFunctionEncode(Gst.Video.VideoTransferFunction func, double val) { + double raw_ret = gst_video_transfer_function_encode((int) func, val); + double ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_transfer_function_from_iso(uint value); + + public static Gst.Video.VideoTransferFunction VideoTransferFunctionFromIso(uint value) { + int raw_ret = gst_video_transfer_function_from_iso(value); + Gst.Video.VideoTransferFunction ret = (Gst.Video.VideoTransferFunction) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_transfer_function_is_equivalent(int from_func, uint from_bpp, int to_func, uint to_bpp); + + public static bool VideoTransferFunctionIsEquivalent(Gst.Video.VideoTransferFunction from_func, uint from_bpp, Gst.Video.VideoTransferFunction to_func, uint to_bpp) { + bool raw_ret = gst_video_transfer_function_is_equivalent((int) from_func, from_bpp, (int) to_func, to_bpp); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_transfer_function_to_iso(int func); + + public static uint VideoTransferFunctionToIso(Gst.Video.VideoTransferFunction func) { + uint raw_ret = gst_video_transfer_function_to_iso((int) func); + uint ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/Gst.VideoSharp.VideoAffineTransformationGetMatrixNative.cs b/sources/generated/Gst.Video/Gst.VideoSharp.VideoAffineTransformationGetMatrixNative.cs new file mode 100644 index 0000000000..ab2e7eaa4a --- /dev/null +++ b/sources/generated/Gst.Video/Gst.VideoSharp.VideoAffineTransformationGetMatrixNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.VideoSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool VideoAffineTransformationGetMatrixNative(IntPtr meta, float matrix); + + internal class VideoAffineTransformationGetMatrixInvoker { + + VideoAffineTransformationGetMatrixNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~VideoAffineTransformationGetMatrixInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal VideoAffineTransformationGetMatrixInvoker (VideoAffineTransformationGetMatrixNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal VideoAffineTransformationGetMatrixInvoker (VideoAffineTransformationGetMatrixNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal VideoAffineTransformationGetMatrixInvoker (VideoAffineTransformationGetMatrixNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Video.VideoAffineTransformationGetMatrix Handler { + get { + return new Gst.Video.VideoAffineTransformationGetMatrix(InvokeNative); + } + } + + bool InvokeNative (Gst.Video.VideoAffineTransformationMeta meta, float matrix) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = native_cb (native_meta, matrix); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class VideoAffineTransformationGetMatrixWrapper { + + public bool NativeCallback (IntPtr meta, float matrix) + { + try { + bool __ret = managed (Gst.Video.VideoAffineTransformationMeta.New (meta), matrix); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal VideoAffineTransformationGetMatrixNative NativeDelegate; + Gst.Video.VideoAffineTransformationGetMatrix managed; + + public VideoAffineTransformationGetMatrixWrapper (Gst.Video.VideoAffineTransformationGetMatrix managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new VideoAffineTransformationGetMatrixNative (NativeCallback); + } + + public static Gst.Video.VideoAffineTransformationGetMatrix GetManagedDelegate (VideoAffineTransformationGetMatrixNative native) + { + if (native == null) + return null; + VideoAffineTransformationGetMatrixWrapper wrapper = (VideoAffineTransformationGetMatrixWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/Gst.VideoSharp.VideoConvertSampleCallbackNative.cs b/sources/generated/Gst.Video/Gst.VideoSharp.VideoConvertSampleCallbackNative.cs new file mode 100644 index 0000000000..7373845b93 --- /dev/null +++ b/sources/generated/Gst.Video/Gst.VideoSharp.VideoConvertSampleCallbackNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.VideoSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void VideoConvertSampleCallbackNative(IntPtr sample, IntPtr error, IntPtr user_data); + + internal class VideoConvertSampleCallbackInvoker { + + VideoConvertSampleCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~VideoConvertSampleCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal VideoConvertSampleCallbackInvoker (VideoConvertSampleCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal VideoConvertSampleCallbackInvoker (VideoConvertSampleCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal VideoConvertSampleCallbackInvoker (VideoConvertSampleCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Video.VideoConvertSampleCallback Handler { + get { + return new Gst.Video.VideoConvertSampleCallback(InvokeNative); + } + } + + void InvokeNative (Gst.Sample sample, IntPtr error) + { + native_cb (sample == null ? IntPtr.Zero : sample.Handle, error, __data); + } + } + + internal class VideoConvertSampleCallbackWrapper { + + public void NativeCallback (IntPtr sample, IntPtr error, IntPtr user_data) + { + try { + managed (sample == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (sample, typeof (Gst.Sample), false), error); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal VideoConvertSampleCallbackNative NativeDelegate; + Gst.Video.VideoConvertSampleCallback managed; + + public VideoConvertSampleCallbackWrapper (Gst.Video.VideoConvertSampleCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new VideoConvertSampleCallbackNative (NativeCallback); + } + + public static Gst.Video.VideoConvertSampleCallback GetManagedDelegate (VideoConvertSampleCallbackNative native) + { + if (native == null) + return null; + VideoConvertSampleCallbackWrapper wrapper = (VideoConvertSampleCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatPackNative.cs b/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatPackNative.cs new file mode 100644 index 0000000000..78c39078c5 --- /dev/null +++ b/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatPackNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.VideoSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void VideoFormatPackNative(IntPtr info, int flags, IntPtr src, int sstride, IntPtr data, int stride, int chroma_site, int y, int width); + + internal class VideoFormatPackInvoker { + + VideoFormatPackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~VideoFormatPackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal VideoFormatPackInvoker (VideoFormatPackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal VideoFormatPackInvoker (VideoFormatPackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal VideoFormatPackInvoker (VideoFormatPackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Video.VideoFormatPack Handler { + get { + return new Gst.Video.VideoFormatPack(InvokeNative); + } + } + + void InvokeNative (Gst.Video.VideoFormatInfo info, Gst.Video.VideoPackFlags flags, IntPtr src, int sstride, IntPtr data, int stride, Gst.Video.VideoChromaSite chroma_site, int y, int width) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + native_cb (native_info, (int) flags, src, sstride, __data, stride, (int) chroma_site, y, width); + Marshal.FreeHGlobal (native_info); + } + } + + internal class VideoFormatPackWrapper { + + public void NativeCallback (IntPtr info, int flags, IntPtr src, int sstride, IntPtr data, int stride, int chroma_site, int y, int width) + { + try { + managed (Gst.Video.VideoFormatInfo.New (info), (Gst.Video.VideoPackFlags) flags, src, sstride, data, stride, (Gst.Video.VideoChromaSite) chroma_site, y, width); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal VideoFormatPackNative NativeDelegate; + Gst.Video.VideoFormatPack managed; + + public VideoFormatPackWrapper (Gst.Video.VideoFormatPack managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new VideoFormatPackNative (NativeCallback); + } + + public static Gst.Video.VideoFormatPack GetManagedDelegate (VideoFormatPackNative native) + { + if (native == null) + return null; + VideoFormatPackWrapper wrapper = (VideoFormatPackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatUnpackNative.cs b/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatUnpackNative.cs new file mode 100644 index 0000000000..8122bb26d1 --- /dev/null +++ b/sources/generated/Gst.Video/Gst.VideoSharp.VideoFormatUnpackNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.VideoSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void VideoFormatUnpackNative(IntPtr info, int flags, IntPtr dest, IntPtr data, int stride, int x, int y, int width); + + internal class VideoFormatUnpackInvoker { + + VideoFormatUnpackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~VideoFormatUnpackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal VideoFormatUnpackInvoker (VideoFormatUnpackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal VideoFormatUnpackInvoker (VideoFormatUnpackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal VideoFormatUnpackInvoker (VideoFormatUnpackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Video.VideoFormatUnpack Handler { + get { + return new Gst.Video.VideoFormatUnpack(InvokeNative); + } + } + + void InvokeNative (Gst.Video.VideoFormatInfo info, Gst.Video.VideoPackFlags flags, IntPtr dest, IntPtr data, int stride, int x, int y, int width) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + native_cb (native_info, (int) flags, dest, __data, stride, x, y, width); + Marshal.FreeHGlobal (native_info); + } + } + + internal class VideoFormatUnpackWrapper { + + public void NativeCallback (IntPtr info, int flags, IntPtr dest, IntPtr data, int stride, int x, int y, int width) + { + try { + managed (Gst.Video.VideoFormatInfo.New (info), (Gst.Video.VideoPackFlags) flags, dest, data, stride, x, y, width); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal VideoFormatUnpackNative NativeDelegate; + Gst.Video.VideoFormatUnpack managed; + + public VideoFormatUnpackWrapper (Gst.Video.VideoFormatUnpack managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new VideoFormatUnpackNative (NativeCallback); + } + + public static Gst.Video.VideoFormatUnpack GetManagedDelegate (VideoFormatUnpackNative native) + { + if (native == null) + return null; + VideoFormatUnpackWrapper wrapper = (VideoFormatUnpackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/Gst.VideoSharp.VideoGLTextureUploadNative.cs b/sources/generated/Gst.Video/Gst.VideoSharp.VideoGLTextureUploadNative.cs new file mode 100644 index 0000000000..7dec19460e --- /dev/null +++ b/sources/generated/Gst.Video/Gst.VideoSharp.VideoGLTextureUploadNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.VideoSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool VideoGLTextureUploadNative(IntPtr meta, uint texture_id); + + internal class VideoGLTextureUploadInvoker { + + VideoGLTextureUploadNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~VideoGLTextureUploadInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal VideoGLTextureUploadInvoker (VideoGLTextureUploadNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal VideoGLTextureUploadInvoker (VideoGLTextureUploadNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal VideoGLTextureUploadInvoker (VideoGLTextureUploadNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.Video.VideoGLTextureUpload Handler { + get { + return new Gst.Video.VideoGLTextureUpload(InvokeNative); + } + } + + bool InvokeNative (Gst.Video.VideoGLTextureUploadMeta meta, uint texture_id) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = native_cb (native_meta, texture_id); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class VideoGLTextureUploadWrapper { + + public bool NativeCallback (IntPtr meta, uint texture_id) + { + try { + bool __ret = managed (Gst.Video.VideoGLTextureUploadMeta.New (meta), texture_id); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal VideoGLTextureUploadNative NativeDelegate; + Gst.Video.VideoGLTextureUpload managed; + + public VideoGLTextureUploadWrapper (Gst.Video.VideoGLTextureUpload managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new VideoGLTextureUploadNative (NativeCallback); + } + + public static Gst.Video.VideoGLTextureUpload GetManagedDelegate (VideoGLTextureUploadNative native) + { + if (native == null) + return null; + VideoGLTextureUploadWrapper wrapper = (VideoGLTextureUploadWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/IColorBalance.cs b/sources/generated/Gst.Video/IColorBalance.cs new file mode 100644 index 0000000000..15fa9b9062 --- /dev/null +++ b/sources/generated/Gst.Video/IColorBalance.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + +#region Autogenerated code + public partial interface IColorBalance : GLib.IWrapper { + + event Gst.Video.ValueChangedEventHandler ValueChangedEvent; + Gst.Video.ColorBalanceType BalanceType { + get; + } + int GetValue(Gst.Video.ColorBalanceChannel channel); + Gst.Video.ColorBalanceChannel[] ListChannels(); + void SetValue(Gst.Video.ColorBalanceChannel channel, int value); + void ValueChanged(Gst.Video.ColorBalanceChannel channel, int value); + } + + [GLib.GInterface (typeof (ColorBalanceAdapter))] + public partial interface IColorBalanceImplementor : GLib.IWrapper { + + Gst.Video.ColorBalanceChannel[] ListChannels (); + void SetValue (Gst.Video.ColorBalanceChannel channel, int value); + int GetValue (Gst.Video.ColorBalanceChannel channel); + Gst.Video.ColorBalanceType BalanceType { get; } + } +#endregion +} diff --git a/sources/generated/Gst.Video/INavigation.cs b/sources/generated/Gst.Video/INavigation.cs new file mode 100644 index 0000000000..8616d47b60 --- /dev/null +++ b/sources/generated/Gst.Video/INavigation.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + +#region Autogenerated code + public partial interface INavigation : GLib.IWrapper { + + void SendCommand(Gst.Video.NavigationCommand command); + void SendEvent(Gst.Structure structure); + void SendKeyEvent(string evnt, string key); + void SendMouseEvent(string evnt, int button, double x, double y); + void SendMouseScrollEvent(double x, double y, double delta_x, double delta_y); + } + + [GLib.GInterface (typeof (NavigationAdapter))] + public partial interface INavigationImplementor : GLib.IWrapper { + + void SendEvent (Gst.Structure structure); + } +#endregion +} diff --git a/sources/generated/Gst.Video/IVideoDirection.cs b/sources/generated/Gst.Video/IVideoDirection.cs new file mode 100644 index 0000000000..273b6ded23 --- /dev/null +++ b/sources/generated/Gst.Video/IVideoDirection.cs @@ -0,0 +1,25 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + +#region Autogenerated code + public partial interface IVideoDirection : GLib.IWrapper { + + Gst.Video.VideoOrientationMethod VideoDirection { + get; set; + } + } + + [GLib.GInterface (typeof (VideoDirectionAdapter))] + public partial interface IVideoDirectionImplementor : GLib.IWrapper { + + [GLib.Property ("video-direction")] + Gst.Video.VideoOrientationMethod VideoDirection { + get; set; + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/IVideoOrientation.cs b/sources/generated/Gst.Video/IVideoOrientation.cs new file mode 100644 index 0000000000..5b5cd1ec44 --- /dev/null +++ b/sources/generated/Gst.Video/IVideoOrientation.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + +#region Autogenerated code + public partial interface IVideoOrientation : GLib.IWrapper { + + bool GetHcenter(out int center); + bool GetHflip(out bool flip); + bool GetVcenter(out int center); + bool GetVflip(out bool flip); + bool SetHcenter(int center); + bool SetHflip(bool flip); + bool SetVcenter(int center); + bool SetVflip(bool flip); + } + + [GLib.GInterface (typeof (VideoOrientationAdapter))] + public partial interface IVideoOrientationImplementor : GLib.IWrapper { + + bool GetHflip (out bool flip); + bool GetVflip (out bool flip); + bool GetHcenter (out int center); + bool GetVcenter (out int center); + bool SetHflip (bool flip); + bool SetVflip (bool flip); + bool SetHcenter (int center); + bool SetVcenter (int center); + } +#endregion +} diff --git a/sources/generated/Gst.Video/IVideoOverlay.cs b/sources/generated/Gst.Video/IVideoOverlay.cs new file mode 100644 index 0000000000..3347cb8957 --- /dev/null +++ b/sources/generated/Gst.Video/IVideoOverlay.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + +#region Autogenerated code + public partial interface IVideoOverlay : GLib.IWrapper { + + void Expose(); + void GotWindowHandle(IntPtr handle); + void HandleEvents(bool handle_events); + void PrepareWindowHandle(); + bool SetRenderRectangle(int x, int y, int width, int height); + IntPtr WindowHandle { + set; + } + } + + [GLib.GInterface (typeof (VideoOverlayAdapter))] + public partial interface IVideoOverlayImplementor : GLib.IWrapper { + + void Expose (); + void HandleEvents (bool handle_events); + void SetRenderRectangle (int x, int y, int width, int height); + IntPtr WindowHandle { set; } + } +#endregion +} diff --git a/sources/generated/Gst.Video/NavigationAdapter.cs b/sources/generated/Gst.Video/NavigationAdapter.cs new file mode 100644 index 0000000000..5dee4be959 --- /dev/null +++ b/sources/generated/Gst.Video/NavigationAdapter.cs @@ -0,0 +1,373 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class NavigationAdapter : GLib.GInterfaceAdapter, Gst.Video.INavigation { + + [StructLayout (LayoutKind.Sequential)] + struct GstNavigationInterface { + public SendEventNativeDelegate SendEvent; + } + + static GstNavigationInterface iface; + + static NavigationAdapter () + { + GLib.GType.Register (_gtype, typeof (NavigationAdapter)); + iface.SendEvent = new SendEventNativeDelegate (SendEvent_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SendEventNativeDelegate (IntPtr inst, IntPtr structure); + + static void SendEvent_cb (IntPtr inst, IntPtr structure) + { + try { + INavigationImplementor __obj = GLib.Object.GetObject (inst, false) as INavigationImplementor; + __obj.SendEvent (structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstNavigationInterface native_iface = (GstNavigationInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstNavigationInterface)); + native_iface.SendEvent = iface.SendEvent; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public NavigationAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public NavigationAdapter (INavigationImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public NavigationAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_navigation_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static INavigation GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static INavigation GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is INavigationImplementor) + return new NavigationAdapter (obj as INavigationImplementor); + else if (obj as INavigation == null) + return new NavigationAdapter (obj.Handle); + else + return obj as INavigation; + } + + public INavigationImplementor Implementor { + get { + return implementor as INavigationImplementor; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_event_get_type(IntPtr evnt); + + public static Gst.Video.NavigationEventType EventGetType(Gst.Event evnt) { + int raw_ret = gst_navigation_event_get_type(evnt == null ? IntPtr.Zero : evnt.Handle); + Gst.Video.NavigationEventType ret = (Gst.Video.NavigationEventType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_command(IntPtr evnt, out int command); + + public static bool EventParseCommand(Gst.Event evnt, out Gst.Video.NavigationCommand command) { + int native_command; + bool raw_ret = gst_navigation_event_parse_command(evnt == null ? IntPtr.Zero : evnt.Handle, out native_command); + bool ret = raw_ret; + command = (Gst.Video.NavigationCommand) native_command; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_key_event(IntPtr evnt, out IntPtr key); + + public static bool EventParseKeyEvent(Gst.Event evnt, out string key) { + IntPtr native_key; + bool raw_ret = gst_navigation_event_parse_key_event(evnt == null ? IntPtr.Zero : evnt.Handle, out native_key); + bool ret = raw_ret; + key = GLib.Marshaller.Utf8PtrToString (native_key); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_button_event(IntPtr evnt, out int button, out double x, out double y); + + public static bool EventParseMouseButtonEvent(Gst.Event evnt, out int button, out double x, out double y) { + bool raw_ret = gst_navigation_event_parse_mouse_button_event(evnt == null ? IntPtr.Zero : evnt.Handle, out button, out x, out y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_move_event(IntPtr evnt, out double x, out double y); + + public static bool EventParseMouseMoveEvent(Gst.Event evnt, out double x, out double y) { + bool raw_ret = gst_navigation_event_parse_mouse_move_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_event_parse_mouse_scroll_event(IntPtr evnt, out double x, out double y, out double delta_x, out double delta_y); + + public static bool EventParseMouseScrollEvent(Gst.Event evnt, out double x, out double y, out double delta_x, out double delta_y) { + bool raw_ret = gst_navigation_event_parse_mouse_scroll_event(evnt == null ? IntPtr.Zero : evnt.Handle, out x, out y, out delta_x, out delta_y); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_message_get_type(IntPtr message); + + public static Gst.Video.NavigationMessageType MessageGetType(Gst.Message message) { + int raw_ret = gst_navigation_message_get_type(message == null ? IntPtr.Zero : message.Handle); + Gst.Video.NavigationMessageType ret = (Gst.Video.NavigationMessageType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_angles_changed(IntPtr src, uint cur_angle, uint n_angles); + + public static Gst.Message MessageNewAnglesChanged(Gst.Object src, uint cur_angle, uint n_angles) { + IntPtr raw_ret = gst_navigation_message_new_angles_changed(src == null ? IntPtr.Zero : src.Handle, cur_angle, n_angles); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_commands_changed(IntPtr src); + + public static Gst.Message MessageNewCommandsChanged(Gst.Object src) { + IntPtr raw_ret = gst_navigation_message_new_commands_changed(src == null ? IntPtr.Zero : src.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_event(IntPtr src, IntPtr evnt); + + public static Gst.Message MessageNewEvent(Gst.Object src, Gst.Event evnt) { + IntPtr raw_ret = gst_navigation_message_new_event(src == null ? IntPtr.Zero : src.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_new_mouse_over(IntPtr src, bool active); + + public static Gst.Message MessageNewMouseOver(Gst.Object src, bool active) { + IntPtr raw_ret = gst_navigation_message_new_mouse_over(src == null ? IntPtr.Zero : src.Handle, active); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_angles_changed(IntPtr message, out uint cur_angle, out uint n_angles); + + public static bool MessageParseAnglesChanged(Gst.Message message, out uint cur_angle, out uint n_angles) { + bool raw_ret = gst_navigation_message_parse_angles_changed(message == null ? IntPtr.Zero : message.Handle, out cur_angle, out n_angles); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_event(IntPtr message, out IntPtr evnt); + + public static bool MessageParseEvent(Gst.Message message, out Gst.Event evnt) { + IntPtr native_evnt; + bool raw_ret = gst_navigation_message_parse_event(message == null ? IntPtr.Zero : message.Handle, out native_evnt); + bool ret = raw_ret; + evnt = native_evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (native_evnt, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_message_parse_mouse_over(IntPtr message, out bool active); + + public static bool MessageParseMouseOver(Gst.Message message, out bool active) { + bool raw_ret = gst_navigation_message_parse_mouse_over(message == null ? IntPtr.Zero : message.Handle, out active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_navigation_query_get_type(IntPtr query); + + public static Gst.Video.NavigationQueryType QueryGetType(Gst.Query query) { + int raw_ret = gst_navigation_query_get_type(query == null ? IntPtr.Zero : query.Handle); + Gst.Video.NavigationQueryType ret = (Gst.Video.NavigationQueryType) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_query_new_angles(); + + public static Gst.Query QueryNewAngles() { + IntPtr raw_ret = gst_navigation_query_new_angles(); + Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_query_new_commands(); + + public static Gst.Query QueryNewCommands() { + IntPtr raw_ret = gst_navigation_query_new_commands(); + Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_angles(IntPtr query, out uint cur_angle, out uint n_angles); + + public static bool QueryParseAngles(Gst.Query query, out uint cur_angle, out uint n_angles) { + bool raw_ret = gst_navigation_query_parse_angles(query == null ? IntPtr.Zero : query.Handle, out cur_angle, out n_angles); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_commands_length(IntPtr query, out uint n_cmds); + + public static bool QueryParseCommandsLength(Gst.Query query, out uint n_cmds) { + bool raw_ret = gst_navigation_query_parse_commands_length(query == null ? IntPtr.Zero : query.Handle, out n_cmds); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_navigation_query_parse_commands_nth(IntPtr query, uint nth, out int cmd); + + public static bool QueryParseCommandsNth(Gst.Query query, uint nth, out Gst.Video.NavigationCommand cmd) { + int native_cmd; + bool raw_ret = gst_navigation_query_parse_commands_nth(query == null ? IntPtr.Zero : query.Handle, nth, out native_cmd); + bool ret = raw_ret; + cmd = (Gst.Video.NavigationCommand) native_cmd; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_query_set_angles(IntPtr query, uint cur_angle, uint n_angles); + + public static void QuerySetAngles(Gst.Query query, uint cur_angle, uint n_angles) { + gst_navigation_query_set_angles(query == null ? IntPtr.Zero : query.Handle, cur_angle, n_angles); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_query_set_commandsv(IntPtr query, int n_cmds, int[] cmds); + + public static void QuerySetCommandsv(Gst.Query query, Gst.Video.NavigationCommand[] cmds) { + int cnt_cmds = cmds == null ? 0 : cmds.Length; + int[] native_cmds = new int [cnt_cmds]; + for (int i = 0; i < cnt_cmds; i++) + native_cmds [i] = (int) cmds[i]; + gst_navigation_query_set_commandsv(query == null ? IntPtr.Zero : query.Handle, (cmds == null ? 0 : cmds.Length), native_cmds); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_send_command(IntPtr raw, int command); + + public void SendCommand(Gst.Video.NavigationCommand command) { + gst_navigation_send_command(Handle, (int) command); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_send_event(IntPtr raw, IntPtr structure); + + public void SendEvent(Gst.Structure structure) { + gst_navigation_send_event(Handle, structure == null ? IntPtr.Zero : structure.Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_send_key_event(IntPtr raw, IntPtr evnt, IntPtr key); + + public void SendKeyEvent(string evnt, string key) { + IntPtr native_evnt = GLib.Marshaller.StringToPtrGStrdup (evnt); + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + gst_navigation_send_key_event(Handle, native_evnt, native_key); + GLib.Marshaller.Free (native_evnt); + GLib.Marshaller.Free (native_key); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_send_mouse_event(IntPtr raw, IntPtr evnt, int button, double x, double y); + + public void SendMouseEvent(string evnt, int button, double x, double y) { + IntPtr native_evnt = GLib.Marshaller.StringToPtrGStrdup (evnt); + gst_navigation_send_mouse_event(Handle, native_evnt, button, x, y); + GLib.Marshaller.Free (native_evnt); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_navigation_send_mouse_scroll_event(IntPtr raw, double x, double y, double delta_x, double delta_y); + + public void SendMouseScrollEvent(double x, double y, double delta_x, double delta_y) { + gst_navigation_send_mouse_scroll_event(Handle, x, y, delta_x, delta_y); + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/NavigationCommand.cs b/sources/generated/Gst.Video/NavigationCommand.cs new file mode 100644 index 0000000000..ff329f95df --- /dev/null +++ b/sources/generated/Gst.Video/NavigationCommand.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.NavigationCommandGType))] + public enum NavigationCommand { + + Invalid = 0, + Menu1 = 1, + Menu2 = 2, + Menu3 = 3, + Menu4 = 4, + Menu5 = 5, + Menu6 = 6, + Menu7 = 7, + Left = 20, + Right = 21, + Up = 22, + Down = 23, + Activate = 24, + PrevAngle = 30, + NextAngle = 31, + } + + internal class NavigationCommandGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_command_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_navigation_command_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/NavigationEventType.cs b/sources/generated/Gst.Video/NavigationEventType.cs new file mode 100644 index 0000000000..2047aaa4b6 --- /dev/null +++ b/sources/generated/Gst.Video/NavigationEventType.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.NavigationEventTypeGType))] + public enum NavigationEventType { + + Invalid = 0, + KeyPress = 1, + KeyRelease = 2, + MouseButtonPress = 3, + MouseButtonRelease = 4, + MouseMove = 5, + Command = 6, + MouseScroll = 7, + } + + internal class NavigationEventTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_event_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_navigation_event_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/NavigationMessageType.cs b/sources/generated/Gst.Video/NavigationMessageType.cs new file mode 100644 index 0000000000..22b7884aea --- /dev/null +++ b/sources/generated/Gst.Video/NavigationMessageType.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.NavigationMessageTypeGType))] + public enum NavigationMessageType { + + Invalid = 0, + MouseOver = 1, + CommandsChanged = 2, + AnglesChanged = 3, + Event = 4, + } + + internal class NavigationMessageTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_message_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_navigation_message_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/NavigationQueryType.cs b/sources/generated/Gst.Video/NavigationQueryType.cs new file mode 100644 index 0000000000..a8854f5439 --- /dev/null +++ b/sources/generated/Gst.Video/NavigationQueryType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.NavigationQueryTypeGType))] + public enum NavigationQueryType { + + Invalid = 0, + Commands = 1, + Angles = 2, + } + + internal class NavigationQueryTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_navigation_query_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_navigation_query_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/ValueChangedEventHandler.cs b/sources/generated/Gst.Video/ValueChangedEventHandler.cs new file mode 100644 index 0000000000..1570062082 --- /dev/null +++ b/sources/generated/Gst.Video/ValueChangedEventHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate void ValueChangedEventHandler(object o, ValueChangedEventArgs args); + + public class ValueChangedEventArgs : GLib.SignalArgs { + public Gst.Video.ColorBalanceChannel Channel{ + get { + return (Gst.Video.ColorBalanceChannel) Args [0]; + } + } + + public int Value{ + get { + return (int) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst.Video/ValueChangedHandler.cs b/sources/generated/Gst.Video/ValueChangedHandler.cs new file mode 100644 index 0000000000..6f0fbcfd90 --- /dev/null +++ b/sources/generated/Gst.Video/ValueChangedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate void ValueChangedHandler(object o, ValueChangedArgs args); + + public class ValueChangedArgs : GLib.SignalArgs { + public int Value{ + get { + return (int) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.Video/VideoAFDMeta.cs b/sources/generated/Gst.Video/VideoAFDMeta.cs new file mode 100644 index 0000000000..3f6eeeac29 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAFDMeta.cs @@ -0,0 +1,59 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoAFDMeta : IEquatable { + + public Gst.Meta Meta; + public byte Field; + public Gst.Video.VideoAFDSpec Spec; + public Gst.Video.VideoAFDValue Afd; + + public static Gst.Video.VideoAFDMeta Zero = new Gst.Video.VideoAFDMeta (); + + public static Gst.Video.VideoAFDMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoAFDMeta.Zero; + return (Gst.Video.VideoAFDMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoAFDMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_afd_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_afd_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoAFDMeta other) + { + return true && Meta.Equals (other.Meta) && Field.Equals (other.Field) && Spec.Equals (other.Spec) && Afd.Equals (other.Afd); + } + + public override bool Equals (object other) + { + return other is VideoAFDMeta && Equals ((VideoAFDMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Field.GetHashCode () ^ Spec.GetHashCode () ^ Afd.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAFDSpec.cs b/sources/generated/Gst.Video/VideoAFDSpec.cs new file mode 100644 index 0000000000..7815162970 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAFDSpec.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoAFDSpecGType))] + public enum VideoAFDSpec { + + DvbEtsi = 0, + AtscA53 = 1, + SmpteSt20161 = 2, + } + + internal class VideoAFDSpecGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_afd_spec_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_afd_spec_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoAFDValue.cs b/sources/generated/Gst.Video/VideoAFDValue.cs new file mode 100644 index 0000000000..6a1a388616 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAFDValue.cs @@ -0,0 +1,37 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoAFDValueGType))] + public enum VideoAFDValue { + + Unavailable = 0, + _16169TopAligned = 2, + _14149TopAligned = 3, + GreaterThan169 = 4, + _443Full169Full = 8, + _443Full43Pillar = 9, + _16169Letter169Full = 10, + _14149Letter149Pillar = 11, + _443Full149Center = 13, + _16169Letter149Center = 14, + _16169Letter43Center = 15, + } + + internal class VideoAFDValueGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_afd_value_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_afd_value_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoAffineTransformationGetMatrix.cs b/sources/generated/Gst.Video/VideoAffineTransformationGetMatrix.cs new file mode 100644 index 0000000000..449dcf9ee0 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAffineTransformationGetMatrix.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate bool VideoAffineTransformationGetMatrix(Gst.Video.VideoAffineTransformationMeta meta, float matrix); + +} diff --git a/sources/generated/Gst.Video/VideoAffineTransformationMeta.cs b/sources/generated/Gst.Video/VideoAffineTransformationMeta.cs new file mode 100644 index 0000000000..001fd0fe4d --- /dev/null +++ b/sources/generated/Gst.Video/VideoAffineTransformationMeta.cs @@ -0,0 +1,75 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoAffineTransformationMeta : IEquatable { + + public Gst.Meta Meta; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=16)] + public float[] Matrix; + + public static Gst.Video.VideoAffineTransformationMeta Zero = new Gst.Video.VideoAffineTransformationMeta (); + + public static Gst.Video.VideoAffineTransformationMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoAffineTransformationMeta.Zero; + return (Gst.Video.VideoAffineTransformationMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoAffineTransformationMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_affine_transformation_meta_apply_matrix(IntPtr raw, float[] matrix); + + public void ApplyMatrix(float[] matrix) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + matrix = new float[16]; + gst_video_affine_transformation_meta_apply_matrix(this_as_native, matrix); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_affine_transformation_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_affine_transformation_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoAffineTransformationMeta target) + { + target = New (native); + } + + public bool Equals (VideoAffineTransformationMeta other) + { + return true && Meta.Equals (other.Meta) && Matrix.Equals (other.Matrix); + } + + public override bool Equals (object other) + { + return other is VideoAffineTransformationMeta && Equals ((VideoAffineTransformationMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Matrix.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAggregator.cs b/sources/generated/Gst.Video/VideoAggregator.cs new file mode 100644 index 0000000000..d2bea063e2 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAggregator.cs @@ -0,0 +1,371 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoAggregator : Gst.Base.Aggregator { + + protected VideoAggregator (IntPtr raw) : base(raw) {} + + protected VideoAggregator() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public Gst.Video.VideoInfo Info { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Video.VideoInfo), false); + } + } + } + + static UpdateCapsNativeDelegate UpdateCaps_cb_delegate; + static UpdateCapsNativeDelegate UpdateCapsVMCallback { + get { + if (UpdateCaps_cb_delegate == null) + UpdateCaps_cb_delegate = new UpdateCapsNativeDelegate (UpdateCaps_cb); + return UpdateCaps_cb_delegate; + } + } + + static void OverrideUpdateCaps (GLib.GType gtype) + { + OverrideUpdateCaps (gtype, UpdateCapsVMCallback); + } + + static void OverrideUpdateCaps (GLib.GType gtype, UpdateCapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("update_caps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr UpdateCapsNativeDelegate (IntPtr inst, IntPtr caps); + + static IntPtr UpdateCaps_cb (IntPtr inst, IntPtr caps) + { + try { + VideoAggregator __obj = GLib.Object.GetObject (inst, false) as VideoAggregator; + Gst.Caps __result; + __result = __obj.OnUpdateCaps (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregator), ConnectionMethod="OverrideUpdateCaps")] + protected virtual Gst.Caps OnUpdateCaps (Gst.Caps caps) + { + return InternalUpdateCaps (caps); + } + + private Gst.Caps InternalUpdateCaps (Gst.Caps caps) + { + UpdateCapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("update_caps")); + unmanaged = (UpdateCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UpdateCapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static AggregateFramesNativeDelegate AggregateFrames_cb_delegate; + static AggregateFramesNativeDelegate AggregateFramesVMCallback { + get { + if (AggregateFrames_cb_delegate == null) + AggregateFrames_cb_delegate = new AggregateFramesNativeDelegate (AggregateFrames_cb); + return AggregateFrames_cb_delegate; + } + } + + static void OverrideAggregateFrames (GLib.GType gtype) + { + OverrideAggregateFrames (gtype, AggregateFramesVMCallback); + } + + static void OverrideAggregateFrames (GLib.GType gtype, AggregateFramesNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("aggregate_frames")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AggregateFramesNativeDelegate (IntPtr inst, IntPtr outbuffer); + + static int AggregateFrames_cb (IntPtr inst, IntPtr outbuffer) + { + try { + VideoAggregator __obj = GLib.Object.GetObject (inst, false) as VideoAggregator; + Gst.FlowReturn __result; + __result = __obj.OnAggregateFrames (outbuffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregator), ConnectionMethod="OverrideAggregateFrames")] + protected virtual Gst.FlowReturn OnAggregateFrames (Gst.Buffer outbuffer) + { + return InternalAggregateFrames (outbuffer); + } + + private Gst.FlowReturn InternalAggregateFrames (Gst.Buffer outbuffer) + { + AggregateFramesNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("aggregate_frames")); + unmanaged = (AggregateFramesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AggregateFramesNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, outbuffer == null ? IntPtr.Zero : outbuffer.Handle); + return (Gst.FlowReturn) __result; + } + + static CreateOutputBufferNativeDelegate CreateOutputBuffer_cb_delegate; + static CreateOutputBufferNativeDelegate CreateOutputBufferVMCallback { + get { + if (CreateOutputBuffer_cb_delegate == null) + CreateOutputBuffer_cb_delegate = new CreateOutputBufferNativeDelegate (CreateOutputBuffer_cb); + return CreateOutputBuffer_cb_delegate; + } + } + + static void OverrideCreateOutputBuffer (GLib.GType gtype) + { + OverrideCreateOutputBuffer (gtype, CreateOutputBufferVMCallback); + } + + static void OverrideCreateOutputBuffer (GLib.GType gtype, CreateOutputBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_output_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int CreateOutputBufferNativeDelegate (IntPtr inst, IntPtr outbuffer); + + static int CreateOutputBuffer_cb (IntPtr inst, IntPtr outbuffer) + { + try { + VideoAggregator __obj = GLib.Object.GetObject (inst, false) as VideoAggregator; + Gst.FlowReturn __result; + __result = __obj.OnCreateOutputBuffer (outbuffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuffer, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregator), ConnectionMethod="OverrideCreateOutputBuffer")] + protected virtual Gst.FlowReturn OnCreateOutputBuffer (Gst.Buffer outbuffer) + { + return InternalCreateOutputBuffer (outbuffer); + } + + private Gst.FlowReturn InternalCreateOutputBuffer (Gst.Buffer outbuffer) + { + CreateOutputBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_output_buffer")); + unmanaged = (CreateOutputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateOutputBufferNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, outbuffer == null ? IntPtr.Zero : outbuffer.Handle); + return (Gst.FlowReturn) __result; + } + + static FindBestFormatNativeDelegate FindBestFormat_cb_delegate; + static FindBestFormatNativeDelegate FindBestFormatVMCallback { + get { + if (FindBestFormat_cb_delegate == null) + FindBestFormat_cb_delegate = new FindBestFormatNativeDelegate (FindBestFormat_cb); + return FindBestFormat_cb_delegate; + } + } + + static void OverrideFindBestFormat (GLib.GType gtype) + { + OverrideFindBestFormat (gtype, FindBestFormatVMCallback); + } + + static void OverrideFindBestFormat (GLib.GType gtype, FindBestFormatNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("find_best_format")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FindBestFormatNativeDelegate (IntPtr inst, IntPtr downstream_caps, IntPtr best_info, bool at_least_one_alpha); + + static void FindBestFormat_cb (IntPtr inst, IntPtr downstream_caps, IntPtr best_info, bool at_least_one_alpha) + { + try { + VideoAggregator __obj = GLib.Object.GetObject (inst, false) as VideoAggregator; + __obj.OnFindBestFormat (downstream_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (downstream_caps, typeof (Gst.Caps), false), best_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (best_info, typeof (Gst.Video.VideoInfo), false), at_least_one_alpha); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregator), ConnectionMethod="OverrideFindBestFormat")] + protected virtual void OnFindBestFormat (Gst.Caps downstream_caps, Gst.Video.VideoInfo best_info, bool at_least_one_alpha) + { + InternalFindBestFormat (downstream_caps, best_info, at_least_one_alpha); + } + + private void InternalFindBestFormat (Gst.Caps downstream_caps, Gst.Video.VideoInfo best_info, bool at_least_one_alpha) + { + FindBestFormatNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("find_best_format")); + unmanaged = (FindBestFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FindBestFormatNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, downstream_caps == null ? IntPtr.Zero : downstream_caps.Handle, best_info == null ? IntPtr.Zero : best_info.Handle, at_least_one_alpha); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("update_caps" + , Gst.Base.Aggregator.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // update_caps + , null + , "aggregate_frames" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("aggregate_frames" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // aggregate_frames + , "update_caps" + , "create_output_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("create_output_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_output_buffer + , "aggregate_frames" + , "find_best_format" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("find_best_format" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // find_best_format + , "create_output_buffer" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "find_best_format" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_aggregator_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_aggregator_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static VideoAggregator () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("info" + , Gst.Base.Aggregator.abi_info.Fields + , Gst.Video.VideoInfo.abi_info.Size // info + , null + , "priv" + , Gst.Video.VideoInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "info" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAggregatorConvertPad.cs b/sources/generated/Gst.Video/VideoAggregatorConvertPad.cs new file mode 100644 index 0000000000..2da5636e0c --- /dev/null +++ b/sources/generated/Gst.Video/VideoAggregatorConvertPad.cs @@ -0,0 +1,178 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoAggregatorConvertPad : Gst.Video.VideoAggregatorPad { + + public VideoAggregatorConvertPad (IntPtr raw) : base(raw) {} + + protected VideoAggregatorConvertPad() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("converter-config")] + public Gst.Structure ConverterConfig { + get { + GLib.Value val = GetProperty ("converter-config"); + Gst.Structure ret = (Gst.Structure) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value, "GstStructure*"); + SetProperty("converter-config", val); + val.Dispose (); + } + } + + static CreateConversionInfoNativeDelegate CreateConversionInfo_cb_delegate; + static CreateConversionInfoNativeDelegate CreateConversionInfoVMCallback { + get { + if (CreateConversionInfo_cb_delegate == null) + CreateConversionInfo_cb_delegate = new CreateConversionInfoNativeDelegate (CreateConversionInfo_cb); + return CreateConversionInfo_cb_delegate; + } + } + + static void OverrideCreateConversionInfo (GLib.GType gtype) + { + OverrideCreateConversionInfo (gtype, CreateConversionInfoVMCallback); + } + + static void OverrideCreateConversionInfo (GLib.GType gtype, CreateConversionInfoNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_conversion_info")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CreateConversionInfoNativeDelegate (IntPtr inst, IntPtr agg, IntPtr conversion_info); + + static void CreateConversionInfo_cb (IntPtr inst, IntPtr agg, IntPtr conversion_info) + { + try { + VideoAggregatorConvertPad __obj = GLib.Object.GetObject (inst, false) as VideoAggregatorConvertPad; + __obj.OnCreateConversionInfo (GLib.Object.GetObject(agg) as Gst.Video.VideoAggregator, conversion_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (conversion_info, typeof (Gst.Video.VideoInfo), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregatorConvertPad), ConnectionMethod="OverrideCreateConversionInfo")] + protected virtual void OnCreateConversionInfo (Gst.Video.VideoAggregator agg, Gst.Video.VideoInfo conversion_info) + { + InternalCreateConversionInfo (agg, conversion_info); + } + + private void InternalCreateConversionInfo (Gst.Video.VideoAggregator agg, Gst.Video.VideoInfo conversion_info) + { + CreateConversionInfoNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_conversion_info")); + unmanaged = (CreateConversionInfoNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateConversionInfoNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, agg == null ? IntPtr.Zero : agg.Handle, conversion_info == null ? IntPtr.Zero : conversion_info.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_conversion_info" + , Gst.Video.VideoAggregatorPad.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_conversion_info + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "create_conversion_info" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_aggregator_convert_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_aggregator_convert_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_aggregator_convert_pad_update_conversion_info(IntPtr raw); + + public void UpdateConversionInfo() { + gst_video_aggregator_convert_pad_update_conversion_info(Handle); + } + + + static VideoAggregatorConvertPad () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Video.VideoAggregatorPad.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAggregatorPad.cs b/sources/generated/Gst.Video/VideoAggregatorPad.cs new file mode 100644 index 0000000000..10e9ed2607 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAggregatorPad.cs @@ -0,0 +1,391 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoAggregatorPad : Gst.Base.AggregatorPad { + + public VideoAggregatorPad (IntPtr raw) : base(raw) {} + + protected VideoAggregatorPad() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("max-last-buffer-repeat")] + public ulong MaxLastBufferRepeat { + get { + GLib.Value val = GetProperty ("max-last-buffer-repeat"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("max-last-buffer-repeat", val); + val.Dispose (); + } + } + + [GLib.Property ("repeat-after-eos")] + public bool RepeatAfterEos { + get { + GLib.Value val = GetProperty ("repeat-after-eos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("repeat-after-eos", val); + val.Dispose (); + } + } + + [GLib.Property ("zorder")] + public uint Zorder { + get { + GLib.Value val = GetProperty ("zorder"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("zorder", val); + val.Dispose (); + } + } + + public Gst.Video.VideoInfo Info { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Video.VideoInfo), false); + } + } + } + + static UpdateConversionInfoNativeDelegate UpdateConversionInfo_cb_delegate; + static UpdateConversionInfoNativeDelegate UpdateConversionInfoVMCallback { + get { + if (UpdateConversionInfo_cb_delegate == null) + UpdateConversionInfo_cb_delegate = new UpdateConversionInfoNativeDelegate (UpdateConversionInfo_cb); + return UpdateConversionInfo_cb_delegate; + } + } + + static void OverrideUpdateConversionInfo (GLib.GType gtype) + { + OverrideUpdateConversionInfo (gtype, UpdateConversionInfoVMCallback); + } + + static void OverrideUpdateConversionInfo (GLib.GType gtype, UpdateConversionInfoNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("update_conversion_info")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void UpdateConversionInfoNativeDelegate (IntPtr inst); + + static void UpdateConversionInfo_cb (IntPtr inst) + { + try { + VideoAggregatorPad __obj = GLib.Object.GetObject (inst, false) as VideoAggregatorPad; + __obj.OnUpdateConversionInfo (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregatorPad), ConnectionMethod="OverrideUpdateConversionInfo")] + protected virtual void OnUpdateConversionInfo () + { + InternalUpdateConversionInfo (); + } + + private void InternalUpdateConversionInfo () + { + UpdateConversionInfoNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("update_conversion_info")); + unmanaged = (UpdateConversionInfoNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UpdateConversionInfoNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static PrepareFrameNativeDelegate PrepareFrame_cb_delegate; + static PrepareFrameNativeDelegate PrepareFrameVMCallback { + get { + if (PrepareFrame_cb_delegate == null) + PrepareFrame_cb_delegate = new PrepareFrameNativeDelegate (PrepareFrame_cb); + return PrepareFrame_cb_delegate; + } + } + + static void OverridePrepareFrame (GLib.GType gtype) + { + OverridePrepareFrame (gtype, PrepareFrameVMCallback); + } + + static void OverridePrepareFrame (GLib.GType gtype, PrepareFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PrepareFrameNativeDelegate (IntPtr inst, IntPtr videoaggregator, IntPtr buffer, IntPtr prepared_frame); + + static bool PrepareFrame_cb (IntPtr inst, IntPtr videoaggregator, IntPtr buffer, IntPtr prepared_frame) + { + try { + VideoAggregatorPad __obj = GLib.Object.GetObject (inst, false) as VideoAggregatorPad; + bool __result; + __result = __obj.OnPrepareFrame (GLib.Object.GetObject(videoaggregator) as Gst.Video.VideoAggregator, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), Gst.Video.VideoFrame.New (prepared_frame)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregatorPad), ConnectionMethod="OverridePrepareFrame")] + protected virtual bool OnPrepareFrame (Gst.Video.VideoAggregator videoaggregator, Gst.Buffer buffer, Gst.Video.VideoFrame prepared_frame) + { + return InternalPrepareFrame (videoaggregator, buffer, prepared_frame); + } + + private bool InternalPrepareFrame (Gst.Video.VideoAggregator videoaggregator, Gst.Buffer buffer, Gst.Video.VideoFrame prepared_frame) + { + PrepareFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_frame")); + unmanaged = (PrepareFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareFrameNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_prepared_frame = GLib.Marshaller.StructureToPtrAlloc (prepared_frame); + bool __result = unmanaged (this.Handle, videoaggregator == null ? IntPtr.Zero : videoaggregator.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, native_prepared_frame); + Marshal.FreeHGlobal (native_prepared_frame); + return __result; + } + + static CleanFrameNativeDelegate CleanFrame_cb_delegate; + static CleanFrameNativeDelegate CleanFrameVMCallback { + get { + if (CleanFrame_cb_delegate == null) + CleanFrame_cb_delegate = new CleanFrameNativeDelegate (CleanFrame_cb); + return CleanFrame_cb_delegate; + } + } + + static void OverrideCleanFrame (GLib.GType gtype) + { + OverrideCleanFrame (gtype, CleanFrameVMCallback); + } + + static void OverrideCleanFrame (GLib.GType gtype, CleanFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("clean_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CleanFrameNativeDelegate (IntPtr inst, IntPtr videoaggregator, IntPtr prepared_frame); + + static void CleanFrame_cb (IntPtr inst, IntPtr videoaggregator, IntPtr prepared_frame) + { + try { + VideoAggregatorPad __obj = GLib.Object.GetObject (inst, false) as VideoAggregatorPad; + __obj.OnCleanFrame (GLib.Object.GetObject(videoaggregator) as Gst.Video.VideoAggregator, Gst.Video.VideoFrame.New (prepared_frame)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoAggregatorPad), ConnectionMethod="OverrideCleanFrame")] + protected virtual void OnCleanFrame (Gst.Video.VideoAggregator videoaggregator, Gst.Video.VideoFrame prepared_frame) + { + InternalCleanFrame (videoaggregator, prepared_frame); + } + + private void InternalCleanFrame (Gst.Video.VideoAggregator videoaggregator, Gst.Video.VideoFrame prepared_frame) + { + CleanFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("clean_frame")); + unmanaged = (CleanFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CleanFrameNativeDelegate)); + } + if (unmanaged == null) return; + + IntPtr native_prepared_frame = GLib.Marshaller.StructureToPtrAlloc (prepared_frame); + unmanaged (this.Handle, videoaggregator == null ? IntPtr.Zero : videoaggregator.Handle, native_prepared_frame); + Marshal.FreeHGlobal (native_prepared_frame); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("update_conversion_info" + , Gst.Base.AggregatorPad.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // update_conversion_info + , null + , "prepare_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("prepare_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare_frame + , "update_conversion_info" + , "clean_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clean_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clean_frame + , "prepare_frame" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved + , "clean_frame" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_aggregator_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_aggregator_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_aggregator_pad_get_current_buffer(IntPtr raw); + + public Gst.Buffer CurrentBuffer { + get { + IntPtr raw_ret = gst_video_aggregator_pad_get_current_buffer(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_aggregator_pad_get_prepared_frame(IntPtr raw); + + public Gst.Video.VideoFrame PreparedFrame { + get { + IntPtr raw_ret = gst_video_aggregator_pad_get_prepared_frame(Handle); + Gst.Video.VideoFrame ret = Gst.Video.VideoFrame.New (raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_aggregator_pad_has_current_buffer(IntPtr raw); + + public bool HasCurrentBuffer { + get { + bool raw_ret = gst_video_aggregator_pad_has_current_buffer(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_aggregator_pad_set_needs_alpha(IntPtr raw, bool needs_alpha); + + public bool NeedsAlpha { + set { + gst_video_aggregator_pad_set_needs_alpha(Handle, value); + } + } + + + static VideoAggregatorPad () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("info" + , Gst.Base.AggregatorPad.abi_info.Fields + , Gst.Video.VideoInfo.abi_info.Size // info + , null + , "priv" + , Gst.Video.VideoInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "info" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAlignment.cs b/sources/generated/Gst.Video/VideoAlignment.cs new file mode 100644 index 0000000000..14413f60a4 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAlignment.cs @@ -0,0 +1,66 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoAlignment : IEquatable { + + public uint PaddingTop; + public uint PaddingBottom; + public uint PaddingLeft; + public uint PaddingRight; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] StrideAlign; + + public static Gst.Video.VideoAlignment Zero = new Gst.Video.VideoAlignment (); + + public static Gst.Video.VideoAlignment New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoAlignment.Zero; + return (Gst.Video.VideoAlignment) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoAlignment)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_alignment_reset(IntPtr raw); + + public void Reset() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_alignment_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoAlignment target) + { + target = New (native); + } + + public bool Equals (VideoAlignment other) + { + return true && PaddingTop.Equals (other.PaddingTop) && PaddingBottom.Equals (other.PaddingBottom) && PaddingLeft.Equals (other.PaddingLeft) && PaddingRight.Equals (other.PaddingRight) && StrideAlign.Equals (other.StrideAlign); + } + + public override bool Equals (object other) + { + return other is VideoAlignment && Equals ((VideoAlignment) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ PaddingTop.GetHashCode () ^ PaddingBottom.GetHashCode () ^ PaddingLeft.GetHashCode () ^ PaddingRight.GetHashCode () ^ StrideAlign.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAlphaMode.cs b/sources/generated/Gst.Video/VideoAlphaMode.cs new file mode 100644 index 0000000000..84b5e3b0f7 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAlphaMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoAlphaModeGType))] + public enum VideoAlphaMode { + + Copy = 0, + Set = 1, + Mult = 2, + } + + internal class VideoAlphaModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_alpha_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_alpha_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoAncillary.cs b/sources/generated/Gst.Video/VideoAncillary.cs new file mode 100644 index 0000000000..7801833c53 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAncillary.cs @@ -0,0 +1,51 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoAncillary : IEquatable { + + public byte DID; + public byte SDIDBlockNumber; + public byte DataCount; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=0)] + public byte[] Data; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoAncillary Zero = new Gst.Video.VideoAncillary (); + + public static Gst.Video.VideoAncillary New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoAncillary.Zero; + return (Gst.Video.VideoAncillary) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoAncillary)); + } + + public bool Equals (VideoAncillary other) + { + return true && DID.Equals (other.DID) && SDIDBlockNumber.Equals (other.SDIDBlockNumber) && DataCount.Equals (other.DataCount) && Data.Equals (other.Data); + } + + public override bool Equals (object other) + { + return other is VideoAncillary && Equals ((VideoAncillary) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ DID.GetHashCode () ^ SDIDBlockNumber.GetHashCode () ^ DataCount.GetHashCode () ^ Data.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoAncillaryDID.cs b/sources/generated/Gst.Video/VideoAncillaryDID.cs new file mode 100644 index 0000000000..5fa4661432 --- /dev/null +++ b/sources/generated/Gst.Video/VideoAncillaryDID.cs @@ -0,0 +1,38 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoAncillaryDIDGType))] + public enum VideoAncillaryDID { + + Undefined = 0, + Deletion = 128, + Hanc3gAudioDataFirst = 160, + Hanc3gAudioDataLast = 167, + HancHdtvAudioDataFirst = 224, + HancHdtvAudioDataLast = 231, + HancSdtvAudioData1First = 236, + HancSdtvAudioData1Last = 239, + CameraPosition = 240, + HancErrorDetection = 244, + HancSdtvAudioData2First = 248, + HancSdtvAudioData2Last = 255, + } + + internal class VideoAncillaryDIDGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_ancillary_did_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_ancillary_did_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoAncillaryDID16.cs b/sources/generated/Gst.Video/VideoAncillaryDID16.cs new file mode 100644 index 0000000000..7dcecec22d --- /dev/null +++ b/sources/generated/Gst.Video/VideoAncillaryDID16.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoAncillaryDID16GType))] + public enum VideoAncillaryDID16 { + + S20163AfdBar = 16645, + S334Eia708 = 24833, + S334Eia608 = 24834, + } + + internal class VideoAncillaryDID16GType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_ancillary_di_d16_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_ancillary_di_d16_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoBarMeta.cs b/sources/generated/Gst.Video/VideoBarMeta.cs new file mode 100644 index 0000000000..dee24ffbe1 --- /dev/null +++ b/sources/generated/Gst.Video/VideoBarMeta.cs @@ -0,0 +1,60 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoBarMeta : IEquatable { + + public Gst.Meta Meta; + public byte Field; + public bool IsLetterbox; + public uint BarData1; + public uint BarData2; + + public static Gst.Video.VideoBarMeta Zero = new Gst.Video.VideoBarMeta (); + + public static Gst.Video.VideoBarMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoBarMeta.Zero; + return (Gst.Video.VideoBarMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoBarMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_bar_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_bar_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoBarMeta other) + { + return true && Meta.Equals (other.Meta) && Field.Equals (other.Field) && IsLetterbox.Equals (other.IsLetterbox) && BarData1.Equals (other.BarData1) && BarData2.Equals (other.BarData2); + } + + public override bool Equals (object other) + { + return other is VideoBarMeta && Equals ((VideoBarMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Field.GetHashCode () ^ IsLetterbox.GetHashCode () ^ BarData1.GetHashCode () ^ BarData2.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoBufferFlags.cs b/sources/generated/Gst.Video/VideoBufferFlags.cs new file mode 100644 index 0000000000..0430cdd0dd --- /dev/null +++ b/sources/generated/Gst.Video/VideoBufferFlags.cs @@ -0,0 +1,37 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoBufferFlagsGType))] + public enum VideoBufferFlags : uint { + + Marker = 512, + Interlaced = 1048576, + Tff = 2097152, + Rff = 4194304, + Onefield = 8388608, + BottomField = 8388608, + TopField = 10485760, + MultipleView = 16777216, + FirstInBundle = 33554432, + Last = 268435456, + } + + internal class VideoBufferFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_buffer_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_buffer_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoBufferPool.cs b/sources/generated/Gst.Video/VideoBufferPool.cs new file mode 100644 index 0000000000..fc55c91bda --- /dev/null +++ b/sources/generated/Gst.Video/VideoBufferPool.cs @@ -0,0 +1,85 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoBufferPool : Gst.BufferPool { + + public VideoBufferPool (IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_buffer_pool_new(); + + public VideoBufferPool () : base (IntPtr.Zero) + { + if (GetType () != typeof (VideoBufferPool)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_video_buffer_pool_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.BufferPool.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_buffer_pool_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_buffer_pool_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static VideoBufferPool () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.BufferPool.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoCaptionMeta.cs b/sources/generated/Gst.Video/VideoCaptionMeta.cs new file mode 100644 index 0000000000..5aeea9f5ea --- /dev/null +++ b/sources/generated/Gst.Video/VideoCaptionMeta.cs @@ -0,0 +1,68 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoCaptionMeta : IEquatable { + + public Gst.Meta Meta; + public Gst.Video.VideoCaptionType CaptionType; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=0)] + public byte[] Data; + private UIntPtr size; + public ulong Size { + get { + return (ulong) size; + } + set { + size = new UIntPtr (value); + } + } + + public static Gst.Video.VideoCaptionMeta Zero = new Gst.Video.VideoCaptionMeta (); + + public static Gst.Video.VideoCaptionMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoCaptionMeta.Zero; + return (Gst.Video.VideoCaptionMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoCaptionMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_caption_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_caption_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoCaptionMeta other) + { + return true && Meta.Equals (other.Meta) && CaptionType.Equals (other.CaptionType) && Data.Equals (other.Data) && Size.Equals (other.Size); + } + + public override bool Equals (object other) + { + return other is VideoCaptionMeta && Equals ((VideoCaptionMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ CaptionType.GetHashCode () ^ Data.GetHashCode () ^ Size.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoCaptionType.cs b/sources/generated/Gst.Video/VideoCaptionType.cs new file mode 100644 index 0000000000..d6f045d77e --- /dev/null +++ b/sources/generated/Gst.Video/VideoCaptionType.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoCaptionTypeGType))] + public enum VideoCaptionType { + + Unknown = 0, + Cea608Raw = 1, + Cea608S3341a = 2, + Cea708Raw = 3, + Cea708Cdp = 4, + } + + internal class VideoCaptionTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_caption_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_caption_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoChromaFlags.cs b/sources/generated/Gst.Video/VideoChromaFlags.cs new file mode 100644 index 0000000000..816a743780 --- /dev/null +++ b/sources/generated/Gst.Video/VideoChromaFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoChromaFlagsGType))] + public enum VideoChromaFlags : uint { + + None = 0, + Interlaced = 1, + } + + internal class VideoChromaFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_chroma_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_chroma_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoChromaMethod.cs b/sources/generated/Gst.Video/VideoChromaMethod.cs new file mode 100644 index 0000000000..3a4c00f35b --- /dev/null +++ b/sources/generated/Gst.Video/VideoChromaMethod.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoChromaMethodGType))] + public enum VideoChromaMethod { + + Nearest = 0, + Linear = 1, + } + + internal class VideoChromaMethodGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_chroma_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_chroma_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoChromaMode.cs b/sources/generated/Gst.Video/VideoChromaMode.cs new file mode 100644 index 0000000000..b5ff455776 --- /dev/null +++ b/sources/generated/Gst.Video/VideoChromaMode.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoChromaModeGType))] + public enum VideoChromaMode { + + Full = 0, + UpsampleOnly = 1, + DownsampleOnly = 2, + None = 3, + } + + internal class VideoChromaModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_chroma_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_chroma_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoChromaResample.cs b/sources/generated/Gst.Video/VideoChromaResample.cs new file mode 100644 index 0000000000..531225820a --- /dev/null +++ b/sources/generated/Gst.Video/VideoChromaResample.cs @@ -0,0 +1,55 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoChromaResample : GLib.Opaque { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_chroma_resample_get_info(IntPtr raw, uint n_lines, int offset); + + public void GetInfo(uint n_lines, int offset) { + gst_video_chroma_resample_get_info(Handle, n_lines, offset); + } + + public VideoChromaResample(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_chroma_resample_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_video_chroma_resample_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_video_chroma_resample_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoChromaSite.cs b/sources/generated/Gst.Video/VideoChromaSite.cs new file mode 100644 index 0000000000..968fd75bc0 --- /dev/null +++ b/sources/generated/Gst.Video/VideoChromaSite.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoChromaSiteGType))] + public enum VideoChromaSite : uint { + + Unknown = 0, + None = 1, + Jpeg = 1, + HCosited = 2, + Mpeg2 = 2, + VCosited = 4, + Cosited = 6, + AltLine = 8, + Dv = 14, + } + + internal class VideoChromaSiteGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_chroma_site_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_chroma_site_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoCodecFrame.cs b/sources/generated/Gst.Video/VideoCodecFrame.cs new file mode 100644 index 0000000000..e4c7c9118d --- /dev/null +++ b/sources/generated/Gst.Video/VideoCodecFrame.cs @@ -0,0 +1,135 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoCodecFrame : IEquatable { + + private int ref_count; + private uint flags; + public uint SystemFrameNumber; + private uint decode_frame_number; + private uint presentation_frame_number; + public ulong Dts; + public ulong Pts; + public ulong Duration; + public int DistanceFromSync; + private IntPtr _input_buffer; + public Gst.Buffer InputBuffer { + get { + return _input_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_input_buffer, typeof (Gst.Buffer), false); + } + set { + _input_buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _output_buffer; + public Gst.Buffer OutputBuffer { + get { + return _output_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_output_buffer, typeof (Gst.Buffer), false); + } + set { + _output_buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public ulong Deadline; + private IntPtr _events; + private IntPtr _user_data; + private GLib.DestroyNotify user_data_destroy_notify; + + public static Gst.Video.VideoCodecFrame Zero = new Gst.Video.VideoCodecFrame (); + + public static Gst.Video.VideoCodecFrame New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoCodecFrame.Zero; + return (Gst.Video.VideoCodecFrame) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoCodecFrame)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_codec_frame_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_codec_frame_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_codec_frame_ref(IntPtr raw); + + public Gst.Video.VideoCodecFrame Ref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_codec_frame_ref(this_as_native); + Gst.Video.VideoCodecFrame ret = Gst.Video.VideoCodecFrame.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_codec_frame_set_user_data(IntPtr raw, IntPtr user_data, GLib.DestroyNotify notify); + + public void SetUserData(IntPtr user_data, GLib.DestroyNotify notify) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_codec_frame_set_user_data(this_as_native, user_data, notify); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_codec_frame_unref(IntPtr raw); + + public void Unref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_codec_frame_unref(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoCodecFrame target) + { + target = New (native); + } + + public bool Equals (VideoCodecFrame other) + { + return true && ref_count.Equals (other.ref_count) && flags.Equals (other.flags) && SystemFrameNumber.Equals (other.SystemFrameNumber) && decode_frame_number.Equals (other.decode_frame_number) && presentation_frame_number.Equals (other.presentation_frame_number) && Dts.Equals (other.Dts) && Pts.Equals (other.Pts) && Duration.Equals (other.Duration) && DistanceFromSync.Equals (other.DistanceFromSync) && InputBuffer.Equals (other.InputBuffer) && OutputBuffer.Equals (other.OutputBuffer) && Deadline.Equals (other.Deadline) && _events.Equals (other._events) && _user_data.Equals (other._user_data) && user_data_destroy_notify.Equals (other.user_data_destroy_notify); + } + + public override bool Equals (object other) + { + return other is VideoCodecFrame && Equals ((VideoCodecFrame) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ ref_count.GetHashCode () ^ flags.GetHashCode () ^ SystemFrameNumber.GetHashCode () ^ decode_frame_number.GetHashCode () ^ presentation_frame_number.GetHashCode () ^ Dts.GetHashCode () ^ Pts.GetHashCode () ^ Duration.GetHashCode () ^ DistanceFromSync.GetHashCode () ^ InputBuffer.GetHashCode () ^ OutputBuffer.GetHashCode () ^ Deadline.GetHashCode () ^ _events.GetHashCode () ^ _user_data.GetHashCode () ^ user_data_destroy_notify.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoCodecFrame boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoCodecFrame.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoCodecFrame (GLib.Value val) + { + return (Gst.Video.VideoCodecFrame) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoCodecFrameFlags.cs b/sources/generated/Gst.Video/VideoCodecFrameFlags.cs new file mode 100644 index 0000000000..bf010088ca --- /dev/null +++ b/sources/generated/Gst.Video/VideoCodecFrameFlags.cs @@ -0,0 +1,20 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + public enum VideoCodecFrameFlags : uint { + + DecodeOnly = 1, + SyncPoint = 2, + ForceKeyframe = 4, + ForceKeyframeHeaders = 8, + Corrupted = 16, + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoCodecState.cs b/sources/generated/Gst.Video/VideoCodecState.cs new file mode 100644 index 0000000000..f444b46c1d --- /dev/null +++ b/sources/generated/Gst.Video/VideoCodecState.cs @@ -0,0 +1,132 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoCodecState : IEquatable { + + private int ref_count; + private IntPtr _info; + public Gst.Video.VideoInfo Info { + get { + return _info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Video.VideoInfo), false); + } + set { + _info = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _caps; + public Gst.Caps Caps { + get { + return _caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_caps, typeof (Gst.Caps), false); + } + set { + _caps = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _codec_data; + public Gst.Buffer CodecData { + get { + return _codec_data == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_codec_data, typeof (Gst.Buffer), false); + } + set { + _codec_data = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _allocation_caps; + public Gst.Caps AllocationCaps { + get { + return _allocation_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_allocation_caps, typeof (Gst.Caps), false); + } + set { + _allocation_caps = value == null ? IntPtr.Zero : value.Handle; + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=19)] + private IntPtr[] Padding; + + public static Gst.Video.VideoCodecState Zero = new Gst.Video.VideoCodecState (); + + public static Gst.Video.VideoCodecState New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoCodecState.Zero; + return (Gst.Video.VideoCodecState) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoCodecState)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_codec_state_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_codec_state_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_codec_state_ref(IntPtr raw); + + public Gst.Video.VideoCodecState Ref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_codec_state_ref(this_as_native); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_codec_state_unref(IntPtr raw); + + public void Unref() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_codec_state_unref(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoCodecState target) + { + target = New (native); + } + + public bool Equals (VideoCodecState other) + { + return true && ref_count.Equals (other.ref_count) && Info.Equals (other.Info) && Caps.Equals (other.Caps) && CodecData.Equals (other.CodecData) && AllocationCaps.Equals (other.AllocationCaps); + } + + public override bool Equals (object other) + { + return other is VideoCodecState && Equals ((VideoCodecState) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ ref_count.GetHashCode () ^ Info.GetHashCode () ^ Caps.GetHashCode () ^ CodecData.GetHashCode () ^ AllocationCaps.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoCodecState boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoCodecState.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoCodecState (GLib.Value val) + { + return (Gst.Video.VideoCodecState) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoColorMatrix.cs b/sources/generated/Gst.Video/VideoColorMatrix.cs new file mode 100644 index 0000000000..997f8bc401 --- /dev/null +++ b/sources/generated/Gst.Video/VideoColorMatrix.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoColorMatrixGType))] + public enum VideoColorMatrix { + + Unknown = 0, + Rgb = 1, + Fcc = 2, + Bt709 = 3, + Bt601 = 4, + Smpte240m = 5, + Bt2020 = 6, + } + + internal class VideoColorMatrixGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_color_matrix_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_color_matrix_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoColorPrimaries.cs b/sources/generated/Gst.Video/VideoColorPrimaries.cs new file mode 100644 index 0000000000..91ebc7c665 --- /dev/null +++ b/sources/generated/Gst.Video/VideoColorPrimaries.cs @@ -0,0 +1,39 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoColorPrimariesGType))] + public enum VideoColorPrimaries { + + Unknown = 0, + Bt709 = 1, + Bt470m = 2, + Bt470bg = 3, + Smpte170m = 4, + Smpte240m = 5, + Film = 6, + Bt2020 = 7, + Adobergb = 8, + Smptest428 = 9, + Smpterp431 = 10, + Smpteeg432 = 11, + Ebu3213 = 12, + } + + internal class VideoColorPrimariesGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_color_primaries_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_color_primaries_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoColorPrimariesInfo.cs b/sources/generated/Gst.Video/VideoColorPrimariesInfo.cs new file mode 100644 index 0000000000..c3622d0f3e --- /dev/null +++ b/sources/generated/Gst.Video/VideoColorPrimariesInfo.cs @@ -0,0 +1,53 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoColorPrimariesInfo : IEquatable { + + public Gst.Video.VideoColorPrimaries 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; + + public static Gst.Video.VideoColorPrimariesInfo Zero = new Gst.Video.VideoColorPrimariesInfo (); + + public static Gst.Video.VideoColorPrimariesInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoColorPrimariesInfo.Zero; + return (Gst.Video.VideoColorPrimariesInfo) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoColorPrimariesInfo)); + } + + public bool Equals (VideoColorPrimariesInfo other) + { + return true && Primaries.Equals (other.Primaries) && Wx.Equals (other.Wx) && Wy.Equals (other.Wy) && Rx.Equals (other.Rx) && Ry.Equals (other.Ry) && Gx.Equals (other.Gx) && Gy.Equals (other.Gy) && Bx.Equals (other.Bx) && By.Equals (other.By); + } + + public override bool Equals (object other) + { + return other is VideoColorPrimariesInfo && Equals ((VideoColorPrimariesInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Primaries.GetHashCode () ^ Wx.GetHashCode () ^ Wy.GetHashCode () ^ Rx.GetHashCode () ^ Ry.GetHashCode () ^ Gx.GetHashCode () ^ Gy.GetHashCode () ^ Bx.GetHashCode () ^ By.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoColorRange.cs b/sources/generated/Gst.Video/VideoColorRange.cs new file mode 100644 index 0000000000..e9ce5dc616 --- /dev/null +++ b/sources/generated/Gst.Video/VideoColorRange.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoColorRangeGType))] + public enum VideoColorRange { + + Unknown = 0, + _00255 = 1, + _1616235 = 2, + } + + internal class VideoColorRangeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_color_range_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_color_range_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoColorimetry.cs b/sources/generated/Gst.Video/VideoColorimetry.cs new file mode 100644 index 0000000000..3698ef4478 --- /dev/null +++ b/sources/generated/Gst.Video/VideoColorimetry.cs @@ -0,0 +1,111 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoColorimetry : IEquatable { + + public Gst.Video.VideoColorRange Range; + public Gst.Video.VideoColorMatrix Matrix; + public Gst.Video.VideoTransferFunction Transfer; + public Gst.Video.VideoColorPrimaries Primaries; + + public static Gst.Video.VideoColorimetry Zero = new Gst.Video.VideoColorimetry (); + + public static Gst.Video.VideoColorimetry New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoColorimetry.Zero; + return (Gst.Video.VideoColorimetry) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoColorimetry)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_colorimetry_from_string(IntPtr raw, IntPtr color); + + public bool FromString(string color) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_color = GLib.Marshaller.StringToPtrGStrdup (color); + bool raw_ret = gst_video_colorimetry_from_string(this_as_native, native_color); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_color); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_colorimetry_is_equal(IntPtr raw, IntPtr other); + + public bool IsEqual(Gst.Video.VideoColorimetry other) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_other = GLib.Marshaller.StructureToPtrAlloc (other); + bool raw_ret = gst_video_colorimetry_is_equal(this_as_native, native_other); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_other); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_colorimetry_matches(IntPtr raw, IntPtr color); + + public bool Matches(string color) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_color = GLib.Marshaller.StringToPtrGStrdup (color); + bool raw_ret = gst_video_colorimetry_matches(this_as_native, native_color); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_color); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_colorimetry_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_colorimetry_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoColorimetry target) + { + target = New (native); + } + + public bool Equals (VideoColorimetry other) + { + return true && Range.Equals (other.Range) && Matrix.Equals (other.Matrix) && Transfer.Equals (other.Transfer) && Primaries.Equals (other.Primaries); + } + + public override bool Equals (object other) + { + return other is VideoColorimetry && Equals ((VideoColorimetry) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Range.GetHashCode () ^ Matrix.GetHashCode () ^ Transfer.GetHashCode () ^ Primaries.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoContentLightLevel.cs b/sources/generated/Gst.Video/VideoContentLightLevel.cs new file mode 100644 index 0000000000..4ddaf1f20a --- /dev/null +++ b/sources/generated/Gst.Video/VideoContentLightLevel.cs @@ -0,0 +1,118 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoContentLightLevel : IEquatable { + + public ushort MaxContentLightLevel; + public ushort MaxFrameAverageLightLevel; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoContentLightLevel Zero = new Gst.Video.VideoContentLightLevel (); + + public static Gst.Video.VideoContentLightLevel New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoContentLightLevel.Zero; + return (Gst.Video.VideoContentLightLevel) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoContentLightLevel)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_content_light_level_add_to_caps(IntPtr raw, IntPtr caps); + + public bool AddToCaps(Gst.Caps caps) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_content_light_level_add_to_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_content_light_level_from_caps(IntPtr raw, IntPtr caps); + + public bool FromCaps(Gst.Caps caps) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_content_light_level_from_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_content_light_level_from_string(IntPtr raw, IntPtr level); + + public bool FromString(string level) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_level = GLib.Marshaller.StringToPtrGStrdup (level); + bool raw_ret = gst_video_content_light_level_from_string(this_as_native, native_level); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_level); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_content_light_level_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_content_light_level_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_content_light_level_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_content_light_level_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoContentLightLevel target) + { + target = New (native); + } + + public bool Equals (VideoContentLightLevel other) + { + return true && MaxContentLightLevel.Equals (other.MaxContentLightLevel) && MaxFrameAverageLightLevel.Equals (other.MaxFrameAverageLightLevel); + } + + public override bool Equals (object other) + { + return other is VideoContentLightLevel && Equals ((VideoContentLightLevel) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ MaxContentLightLevel.GetHashCode () ^ MaxFrameAverageLightLevel.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoConvertSampleCallback.cs b/sources/generated/Gst.Video/VideoConvertSampleCallback.cs new file mode 100644 index 0000000000..deb78cdfde --- /dev/null +++ b/sources/generated/Gst.Video/VideoConvertSampleCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate void VideoConvertSampleCallback(Gst.Sample sample, IntPtr error); + +} diff --git a/sources/generated/Gst.Video/VideoConverter.cs b/sources/generated/Gst.Video/VideoConverter.cs new file mode 100644 index 0000000000..57278a42d9 --- /dev/null +++ b/sources/generated/Gst.Video/VideoConverter.cs @@ -0,0 +1,80 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoConverter : GLib.Opaque { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_converter_frame(IntPtr raw, IntPtr src, IntPtr dest); + + public void Frame(Gst.Video.VideoFrame src, Gst.Video.VideoFrame dest) { + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + gst_video_converter_frame(Handle, native_src, native_dest); + Marshal.FreeHGlobal (native_src); + Marshal.FreeHGlobal (native_dest); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_converter_get_config(IntPtr raw); + + public Gst.Structure Config { + get { + IntPtr raw_ret = gst_video_converter_get_config(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_converter_set_config(IntPtr raw, IntPtr config); + + public bool SetConfig(Gst.Structure config) { + config.Owned = false; + bool raw_ret = gst_video_converter_set_config(Handle, config == null ? IntPtr.Zero : config.Handle); + bool ret = raw_ret; + return ret; + } + + public VideoConverter(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_converter_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_video_converter_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_video_converter_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoCropMeta.cs b/sources/generated/Gst.Video/VideoCropMeta.cs new file mode 100644 index 0000000000..ae409aea8a --- /dev/null +++ b/sources/generated/Gst.Video/VideoCropMeta.cs @@ -0,0 +1,60 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoCropMeta : IEquatable { + + public Gst.Meta Meta; + public uint X; + public uint Y; + public uint Width; + public uint Height; + + public static Gst.Video.VideoCropMeta Zero = new Gst.Video.VideoCropMeta (); + + public static Gst.Video.VideoCropMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoCropMeta.Zero; + return (Gst.Video.VideoCropMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoCropMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_crop_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_crop_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoCropMeta other) + { + return true && Meta.Equals (other.Meta) && X.Equals (other.X) && Y.Equals (other.Y) && Width.Equals (other.Width) && Height.Equals (other.Height); + } + + public override bool Equals (object other) + { + return other is VideoCropMeta && Equals ((VideoCropMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode () ^ Width.GetHashCode () ^ Height.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoDecoder.cs b/sources/generated/Gst.Video/VideoDecoder.cs new file mode 100644 index 0000000000..53a703ad06 --- /dev/null +++ b/sources/generated/Gst.Video/VideoDecoder.cs @@ -0,0 +1,1891 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoDecoder : Gst.Element { + + protected VideoDecoder (IntPtr raw) : base(raw) {} + + protected VideoDecoder() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("discard-corrupted-frames")] + public bool DiscardCorruptedFrames { + get { + GLib.Value val = GetProperty ("discard-corrupted-frames"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("discard-corrupted-frames", val); + val.Dispose (); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_get_max_errors(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_max_errors(IntPtr raw, int num); + + [GLib.Property ("max-errors")] + public int MaxErrors { + get { + int raw_ret = gst_video_decoder_get_max_errors(Handle); + int ret = raw_ret; + return ret; + } + set { + gst_video_decoder_set_max_errors(Handle, value); + } + } + + [GLib.Property ("min-force-key-unit-interval")] + public ulong MinForceKeyUnitInterval { + get { + GLib.Value val = GetProperty ("min-force-key-unit-interval"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("min-force-key-unit-interval", val); + val.Dispose (); + } + } + + [GLib.Property ("qos")] + public bool Qos { + get { + GLib.Value val = GetProperty ("qos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos", val); + val.Dispose (); + } + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static ParseNativeDelegate Parse_cb_delegate; + static ParseNativeDelegate ParseVMCallback { + get { + if (Parse_cb_delegate == null) + Parse_cb_delegate = new ParseNativeDelegate (Parse_cb); + return Parse_cb_delegate; + } + } + + static void OverrideParse (GLib.GType gtype) + { + OverrideParse (gtype, ParseVMCallback); + } + + static void OverrideParse (GLib.GType gtype, ParseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ParseNativeDelegate (IntPtr inst, IntPtr frame, IntPtr adapter, bool at_eos); + + static int Parse_cb (IntPtr inst, IntPtr frame, IntPtr adapter, bool at_eos) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + Gst.FlowReturn __result; + __result = __obj.OnParse (Gst.Video.VideoCodecFrame.New (frame), GLib.Object.GetObject(adapter) as Gst.Base.Adapter, at_eos); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideParse")] + protected virtual Gst.FlowReturn OnParse (Gst.Video.VideoCodecFrame frame, Gst.Base.Adapter adapter, bool at_eos) + { + return InternalParse (frame, adapter, at_eos); + } + + private Gst.FlowReturn InternalParse (Gst.Video.VideoCodecFrame frame, Gst.Base.Adapter adapter, bool at_eos) + { + ParseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("parse")); + unmanaged = (ParseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ParseNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame, adapter == null ? IntPtr.Zero : adapter.Handle, at_eos); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static SetFormatNativeDelegate SetFormat_cb_delegate; + static SetFormatNativeDelegate SetFormatVMCallback { + get { + if (SetFormat_cb_delegate == null) + SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb); + return SetFormat_cb_delegate; + } + } + + static void OverrideSetFormat (GLib.GType gtype) + { + OverrideSetFormat (gtype, SetFormatVMCallback); + } + + static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr state); + + static bool SetFormat_cb (IntPtr inst, IntPtr state) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnSetFormat (Gst.Video.VideoCodecState.New (state)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideSetFormat")] + protected virtual bool OnSetFormat (Gst.Video.VideoCodecState state) + { + return InternalSetFormat (state); + } + + private bool InternalSetFormat (Gst.Video.VideoCodecState state) + { + SetFormatNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + unmanaged = (SetFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetFormatNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_state = GLib.Marshaller.StructureToPtrAlloc (state); + bool __result = unmanaged (this.Handle, native_state); + Marshal.FreeHGlobal (native_state); + return __result; + } + + static ResetNativeDelegate Reset_cb_delegate; + static ResetNativeDelegate ResetVMCallback { + get { + if (Reset_cb_delegate == null) + Reset_cb_delegate = new ResetNativeDelegate (Reset_cb); + return Reset_cb_delegate; + } + } + + static void OverrideReset (GLib.GType gtype) + { + OverrideReset (gtype, ResetVMCallback); + } + + static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ResetNativeDelegate (IntPtr inst, bool hard); + + static bool Reset_cb (IntPtr inst, bool hard) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnReset (hard); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideReset")] + protected virtual bool OnReset (bool hard) + { + return InternalReset (hard); + } + + private bool InternalReset (bool hard) + { + ResetNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, hard); + return __result; + } + + static FinishNativeDelegate Finish_cb_delegate; + static FinishNativeDelegate FinishVMCallback { + get { + if (Finish_cb_delegate == null) + Finish_cb_delegate = new FinishNativeDelegate (Finish_cb); + return Finish_cb_delegate; + } + } + + static void OverrideFinish (GLib.GType gtype) + { + OverrideFinish (gtype, FinishVMCallback); + } + + static void OverrideFinish (GLib.GType gtype, FinishNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("finish")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FinishNativeDelegate (IntPtr inst); + + static int Finish_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + Gst.FlowReturn __result; + __result = __obj.OnFinish (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideFinish")] + protected virtual Gst.FlowReturn OnFinish () + { + return InternalFinish (); + } + + private Gst.FlowReturn InternalFinish () + { + FinishNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("finish")); + unmanaged = (FinishNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FinishNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static HandleFrameNativeDelegate HandleFrame_cb_delegate; + static HandleFrameNativeDelegate HandleFrameVMCallback { + get { + if (HandleFrame_cb_delegate == null) + HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb); + return HandleFrame_cb_delegate; + } + } + + static void OverrideHandleFrame (GLib.GType gtype) + { + OverrideHandleFrame (gtype, HandleFrameVMCallback); + } + + static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr frame); + + static int HandleFrame_cb (IntPtr inst, IntPtr frame) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + Gst.FlowReturn __result; + __result = __obj.OnHandleFrame (Gst.Video.VideoCodecFrame.New (frame)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideHandleFrame")] + protected virtual Gst.FlowReturn OnHandleFrame (Gst.Video.VideoCodecFrame frame) + { + return InternalHandleFrame (frame); + } + + private Gst.FlowReturn InternalHandleFrame (Gst.Video.VideoCodecFrame frame) + { + HandleFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr query) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query query) + { + return InternalProposeAllocation (query); + } + + private bool InternalProposeAllocation (Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool FlushNativeDelegate (IntPtr inst); + + static bool Flush_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnFlush (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideFlush")] + protected virtual bool OnFlush () + { + return InternalFlush (); + } + + private bool InternalFlush () + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr query) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Query query) + { + return InternalSinkQuery (query); + } + + private bool InternalSinkQuery (Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static GetcapsNativeDelegate Getcaps_cb_delegate; + static GetcapsNativeDelegate GetcapsVMCallback { + get { + if (Getcaps_cb_delegate == null) + Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb); + return Getcaps_cb_delegate; + } + } + + static void OverrideGetcaps (GLib.GType gtype) + { + OverrideGetcaps (gtype, GetcapsVMCallback); + } + + static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + Gst.Caps __result; + __result = __obj.OnGetcaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideGetcaps")] + protected virtual Gst.Caps OnGetcaps (Gst.Caps filter) + { + return InternalGetcaps (filter); + } + + private Gst.Caps InternalGetcaps (Gst.Caps filter) + { + GetcapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static DrainNativeDelegate Drain_cb_delegate; + static DrainNativeDelegate DrainVMCallback { + get { + if (Drain_cb_delegate == null) + Drain_cb_delegate = new DrainNativeDelegate (Drain_cb); + return Drain_cb_delegate; + } + } + + static void OverrideDrain (GLib.GType gtype) + { + OverrideDrain (gtype, DrainVMCallback); + } + + static void OverrideDrain (GLib.GType gtype, DrainNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drain")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int DrainNativeDelegate (IntPtr inst); + + static int Drain_cb (IntPtr inst) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + Gst.FlowReturn __result; + __result = __obj.OnDrain (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideDrain")] + protected virtual Gst.FlowReturn OnDrain () + { + return InternalDrain (); + } + + private Gst.FlowReturn InternalDrain () + { + DrainNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drain")); + unmanaged = (DrainNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DrainNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static TransformMetaNativeDelegate TransformMeta_cb_delegate; + static TransformMetaNativeDelegate TransformMetaVMCallback { + get { + if (TransformMeta_cb_delegate == null) + TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); + return TransformMeta_cb_delegate; + } + } + + static void OverrideTransformMeta (GLib.GType gtype) + { + OverrideTransformMeta (gtype, TransformMetaVMCallback); + } + + static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr frame, IntPtr meta); + + static bool TransformMeta_cb (IntPtr inst, IntPtr frame, IntPtr meta) + { + try { + VideoDecoder __obj = GLib.Object.GetObject (inst, false) as VideoDecoder; + bool __result; + __result = __obj.OnTransformMeta (Gst.Video.VideoCodecFrame.New (frame), Gst.Meta.New (meta)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoDecoder), ConnectionMethod="OverrideTransformMeta")] + protected virtual bool OnTransformMeta (Gst.Video.VideoCodecFrame frame, Gst.Meta meta) + { + return InternalTransformMeta (frame, meta); + } + + private bool InternalTransformMeta (Gst.Video.VideoCodecFrame frame, Gst.Meta meta) + { + TransformMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = unmanaged (this.Handle, native_frame, native_meta); + Marshal.FreeHGlobal (native_frame); + Marshal.FreeHGlobal (native_meta); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , null + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "open" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "close" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "parse" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("parse" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parse + , "stop" + , "set_format" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_format" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format + , "parse" + , "reset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset + , "set_format" + , "finish" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("finish" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finish + , "reset" + , "handle_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame + , "finish" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "handle_frame" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "src_event" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "negotiate" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "decide_allocation" + , "flush" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , "propose_allocation" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "flush" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "sink_query" + , "getcaps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getcaps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps + , "src_query" + , "drain" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("drain" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // drain + , "getcaps" + , "transform_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta + , "drain" + , "padding" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("padding" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 14 // padding + , "transform_meta" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_decoder_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_add_to_frame(IntPtr raw, int n_bytes); + + public void AddToFrame(int n_bytes) { + gst_video_decoder_add_to_frame(Handle, n_bytes); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_allocate_output_buffer(IntPtr raw); + + public Gst.Buffer AllocateOutputBuffer() { + IntPtr raw_ret = gst_video_decoder_allocate_output_buffer(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_allocate_output_frame(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn AllocateOutputFrame(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_decoder_allocate_output_frame(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_allocate_output_frame_with_params(IntPtr raw, IntPtr frame, IntPtr parms); + + public Gst.FlowReturn AllocateOutputFrameWithParams(Gst.Video.VideoCodecFrame frame, Gst.BufferPoolAcquireParams parms) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + int raw_ret = gst_video_decoder_allocate_output_frame_with_params(Handle, native_frame, native_parms); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + Marshal.FreeHGlobal (native_parms); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_drop_frame(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn DropFrame(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_decoder_drop_frame(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_finish_frame(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn FinishFrame(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_decoder_finish_frame(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_video_decoder_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_buffer_pool(IntPtr raw); + + public Gst.BufferPool BufferPool { + get { + IntPtr raw_ret = gst_video_decoder_get_buffer_pool(Handle); + Gst.BufferPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.BufferPool; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_get_estimate_rate(IntPtr raw); + + public int EstimateRate { + get { + int raw_ret = gst_video_decoder_get_estimate_rate(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_frame(IntPtr raw, int frame_number); + + public Gst.Video.VideoCodecFrame GetFrame(int frame_number) { + IntPtr raw_ret = gst_video_decoder_get_frame(Handle, frame_number); + Gst.Video.VideoCodecFrame ret = Gst.Video.VideoCodecFrame.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_frames(IntPtr raw); + + public GLib.List[] Frames { + get { + IntPtr raw_ret = gst_video_decoder_get_frames(Handle); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List)); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_get_latency(IntPtr raw, out ulong min_latency, out ulong max_latency); + + public void GetLatency(out ulong min_latency, out ulong max_latency) { + gst_video_decoder_get_latency(Handle, out min_latency, out max_latency); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_video_decoder_get_max_decode_time(IntPtr raw, IntPtr frame); + + public long GetMaxDecodeTime(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + long raw_ret = gst_video_decoder_get_max_decode_time(Handle, native_frame); + long ret = raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_decoder_get_needs_format(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_needs_format(IntPtr raw, bool enabled); + + public bool NeedsFormat { + get { + bool raw_ret = gst_video_decoder_get_needs_format(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_video_decoder_set_needs_format(Handle, value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_decoder_get_needs_sync_point(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_needs_sync_point(IntPtr raw, bool enabled); + + public bool NeedsSyncPoint { + get { + bool raw_ret = gst_video_decoder_get_needs_sync_point(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_video_decoder_set_needs_sync_point(Handle, value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_oldest_frame(IntPtr raw); + + public Gst.Video.VideoCodecFrame OldestFrame { + get { + IntPtr raw_ret = gst_video_decoder_get_oldest_frame(Handle); + Gst.Video.VideoCodecFrame ret = Gst.Video.VideoCodecFrame.New (raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_get_output_state(IntPtr raw); + + public Gst.Video.VideoCodecState OutputState { + get { + IntPtr raw_ret = gst_video_decoder_get_output_state(Handle); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_decoder_get_packetized(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_packetized(IntPtr raw, bool packetized); + + public bool Packetized { + get { + bool raw_ret = gst_video_decoder_get_packetized(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_video_decoder_set_packetized(Handle, value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_video_decoder_get_pending_frame_size(IntPtr raw); + + public ulong PendingFrameSize { + get { + UIntPtr raw_ret = gst_video_decoder_get_pending_frame_size(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_decoder_get_qos_proportion(IntPtr raw); + + public double QosProportion { + get { + double raw_ret = gst_video_decoder_get_qos_proportion(Handle); + double ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_decoder_have_frame(IntPtr raw); + + public Gst.FlowReturn HaveFrame() { + int raw_ret = gst_video_decoder_have_frame(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + gst_video_decoder_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_decoder_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_video_decoder_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_proxy_getcaps(IntPtr raw, IntPtr caps, IntPtr filter); + + public Gst.Caps ProxyGetcaps(Gst.Caps caps, Gst.Caps filter) { + IntPtr raw_ret = gst_video_decoder_proxy_getcaps(Handle, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps ProxyGetcaps() { + return ProxyGetcaps (null, null); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_release_frame(IntPtr raw, IntPtr frame); + + public void ReleaseFrame(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + gst_video_decoder_release_frame(Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_request_sync_point(IntPtr raw, IntPtr frame, int flags); + + public void RequestSyncPoint(Gst.Video.VideoCodecFrame frame, Gst.Video.VideoDecoderRequestSyncPointFlags flags) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + gst_video_decoder_request_sync_point(Handle, native_frame, (int) flags); + Marshal.FreeHGlobal (native_frame); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_estimate_rate(IntPtr raw, bool enabled); + + public void SetEstimateRate(bool enabled) { + gst_video_decoder_set_estimate_rate(Handle, enabled); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_set_interlaced_output_state(IntPtr raw, int fmt, int interlace_mode, uint width, uint height, IntPtr reference); + + public Gst.Video.VideoCodecState SetInterlacedOutputState(Gst.Video.VideoFormat fmt, Gst.Video.VideoInterlaceMode interlace_mode, uint width, uint height, Gst.Video.VideoCodecState reference) { + IntPtr native_reference = GLib.Marshaller.StructureToPtrAlloc (reference); + IntPtr raw_ret = gst_video_decoder_set_interlaced_output_state(Handle, (int) fmt, (int) interlace_mode, width, height, native_reference); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + Marshal.FreeHGlobal (native_reference); + return ret; + } + + public Gst.Video.VideoCodecState SetInterlacedOutputState(Gst.Video.VideoFormat fmt, Gst.Video.VideoInterlaceMode interlace_mode, uint width, uint height) { + return SetInterlacedOutputState (fmt, interlace_mode, width, height, Gst.Video.VideoCodecState.Zero); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_latency(IntPtr raw, ulong min_latency, ulong max_latency); + + public void SetLatency(ulong min_latency, ulong max_latency) { + gst_video_decoder_set_latency(Handle, min_latency, max_latency); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_decoder_set_output_state(IntPtr raw, int fmt, uint width, uint height, IntPtr reference); + + public Gst.Video.VideoCodecState SetOutputState(Gst.Video.VideoFormat fmt, uint width, uint height, Gst.Video.VideoCodecState reference) { + IntPtr native_reference = GLib.Marshaller.StructureToPtrAlloc (reference); + IntPtr raw_ret = gst_video_decoder_set_output_state(Handle, (int) fmt, width, height, native_reference); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + Marshal.FreeHGlobal (native_reference); + return ret; + } + + public Gst.Video.VideoCodecState SetOutputState(Gst.Video.VideoFormat fmt, uint width, uint height) { + return SetOutputState (fmt, width, height, Gst.Video.VideoCodecState.Zero); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_decoder_set_use_default_pad_acceptcaps(IntPtr raw, bool use); + + public bool UseDefaultPadAcceptcaps { + set { + gst_video_decoder_set_use_default_pad_acceptcaps(Handle, value); + } + } + + + static VideoDecoder () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "stream_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock + , "srcpad" + , "input_segment" + , (long) Marshal.OffsetOf(typeof(GstVideoDecoder_stream_lockAlign), "stream_lock") + , 0 + ), + new GLib.AbiField("input_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment + , "stream_lock" + , "output_segment" + , (long) Marshal.OffsetOf(typeof(GstVideoDecoder_input_segmentAlign), "input_segment") + , 0 + ), + new GLib.AbiField("output_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment + , "input_segment" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstVideoDecoder_output_segmentAlign), "output_segment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "output_segment" + , "padding" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("padding" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // padding + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoDecoder_stream_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoDecoder_input_segmentAlign + { + sbyte f1; + private Gst.Segment input_segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoDecoder_output_segmentAlign + { + sbyte f1; + private Gst.Segment output_segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoDecoderRequestSyncPointFlags.cs b/sources/generated/Gst.Video/VideoDecoderRequestSyncPointFlags.cs new file mode 100644 index 0000000000..4547976bbf --- /dev/null +++ b/sources/generated/Gst.Video/VideoDecoderRequestSyncPointFlags.cs @@ -0,0 +1,17 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + public enum VideoDecoderRequestSyncPointFlags : uint { + + DiscardInput = 1, + CorruptOutput = 2, + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoDirectionAdapter.cs b/sources/generated/Gst.Video/VideoDirectionAdapter.cs new file mode 100644 index 0000000000..fa6a2262a9 --- /dev/null +++ b/sources/generated/Gst.Video/VideoDirectionAdapter.cs @@ -0,0 +1,120 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoDirectionAdapter : GLib.GInterfaceAdapter, Gst.Video.IVideoDirection { + + [StructLayout (LayoutKind.Sequential)] + struct GstVideoDirectionInterface { + } + + static GstVideoDirectionInterface iface; + + static VideoDirectionAdapter () + { + GLib.GType.Register (_gtype, typeof (VideoDirectionAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public VideoDirectionAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public VideoDirectionAdapter (IVideoDirectionImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public VideoDirectionAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_direction_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_video_direction_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IVideoDirection GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IVideoDirection GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IVideoDirectionImplementor) + return new VideoDirectionAdapter (obj as IVideoDirectionImplementor); + else if (obj as IVideoDirection == null) + return new VideoDirectionAdapter (obj.Handle); + else + return obj as IVideoDirection; + } + + public IVideoDirectionImplementor Implementor { + get { + return implementor as IVideoDirectionImplementor; + } + } + + [GLib.Property ("video-direction")] + public Gst.Video.VideoOrientationMethod VideoDirection { + get { + GLib.Value val = implementor.GetProperty ("video-direction"); + Gst.Video.VideoOrientationMethod ret = (Gst.Video.VideoOrientationMethod) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + implementor.SetProperty("video-direction", val); + val.Dispose (); + } + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoDither.cs b/sources/generated/Gst.Video/VideoDither.cs new file mode 100644 index 0000000000..2720f941e3 --- /dev/null +++ b/sources/generated/Gst.Video/VideoDither.cs @@ -0,0 +1,59 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoDither : GLib.Opaque { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_dither_line(IntPtr raw, IntPtr line, uint x, uint y, uint width); + + public void Line(IntPtr line, uint x, uint y, uint width) { + gst_video_dither_line(Handle, line, x, y, width); + } + + public void Line(uint x, uint y, uint width) { + Line (IntPtr.Zero, x, y, width); + } + + public VideoDither(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_dither_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_video_dither_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_video_dither_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoDitherFlags.cs b/sources/generated/Gst.Video/VideoDitherFlags.cs new file mode 100644 index 0000000000..8ed9651b43 --- /dev/null +++ b/sources/generated/Gst.Video/VideoDitherFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoDitherFlagsGType))] + public enum VideoDitherFlags : uint { + + None = 0, + Interlaced = 1, + Quantize = 2, + } + + internal class VideoDitherFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_dither_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_dither_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoDitherMethod.cs b/sources/generated/Gst.Video/VideoDitherMethod.cs new file mode 100644 index 0000000000..eb727899a2 --- /dev/null +++ b/sources/generated/Gst.Video/VideoDitherMethod.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoDitherMethodGType))] + public enum VideoDitherMethod { + + None = 0, + Verterr = 1, + FloydSteinberg = 2, + SierraLite = 3, + Bayer = 4, + } + + internal class VideoDitherMethodGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_dither_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_dither_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoEncoder.cs b/sources/generated/Gst.Video/VideoEncoder.cs new file mode 100644 index 0000000000..72f8991f7f --- /dev/null +++ b/sources/generated/Gst.Video/VideoEncoder.cs @@ -0,0 +1,1774 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoEncoder : Gst.Element, Gst.IPreset { + + protected VideoEncoder (IntPtr raw) : base(raw) {} + + protected VideoEncoder() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_video_encoder_get_min_force_key_unit_interval(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_set_min_force_key_unit_interval(IntPtr raw, ulong interval); + + [GLib.Property ("min-force-key-unit-interval")] + public ulong MinForceKeyUnitInterval { + get { + ulong raw_ret = gst_video_encoder_get_min_force_key_unit_interval(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_video_encoder_set_min_force_key_unit_interval(Handle, value); + } + } + + [GLib.Property ("qos")] + public bool Qos { + get { + GLib.Value val = GetProperty ("qos"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("qos", val); + val.Dispose (); + } + } + + static OpenNativeDelegate Open_cb_delegate; + static OpenNativeDelegate OpenVMCallback { + get { + if (Open_cb_delegate == null) + Open_cb_delegate = new OpenNativeDelegate (Open_cb); + return Open_cb_delegate; + } + } + + static void OverrideOpen (GLib.GType gtype) + { + OverrideOpen (gtype, OpenVMCallback); + } + + static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool OpenNativeDelegate (IntPtr inst); + + static bool Open_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnOpen (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideOpen")] + protected virtual bool OnOpen () + { + return InternalOpen (); + } + + private bool InternalOpen () + { + OpenNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open")); + unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static CloseNativeDelegate Close_cb_delegate; + static CloseNativeDelegate CloseVMCallback { + get { + if (Close_cb_delegate == null) + Close_cb_delegate = new CloseNativeDelegate (Close_cb); + return Close_cb_delegate; + } + } + + static void OverrideClose (GLib.GType gtype) + { + OverrideClose (gtype, CloseVMCallback); + } + + static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool CloseNativeDelegate (IntPtr inst); + + static bool Close_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnClose (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideClose")] + protected virtual bool OnClose () + { + return InternalClose (); + } + + private bool InternalClose () + { + CloseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close")); + unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SetFormatNativeDelegate SetFormat_cb_delegate; + static SetFormatNativeDelegate SetFormatVMCallback { + get { + if (SetFormat_cb_delegate == null) + SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb); + return SetFormat_cb_delegate; + } + } + + static void OverrideSetFormat (GLib.GType gtype) + { + OverrideSetFormat (gtype, SetFormatVMCallback); + } + + static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr state); + + static bool SetFormat_cb (IntPtr inst, IntPtr state) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnSetFormat (Gst.Video.VideoCodecState.New (state)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideSetFormat")] + protected virtual bool OnSetFormat (Gst.Video.VideoCodecState state) + { + return InternalSetFormat (state); + } + + private bool InternalSetFormat (Gst.Video.VideoCodecState state) + { + SetFormatNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format")); + unmanaged = (SetFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetFormatNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_state = GLib.Marshaller.StructureToPtrAlloc (state); + bool __result = unmanaged (this.Handle, native_state); + Marshal.FreeHGlobal (native_state); + return __result; + } + + static HandleFrameNativeDelegate HandleFrame_cb_delegate; + static HandleFrameNativeDelegate HandleFrameVMCallback { + get { + if (HandleFrame_cb_delegate == null) + HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb); + return HandleFrame_cb_delegate; + } + } + + static void OverrideHandleFrame (GLib.GType gtype) + { + OverrideHandleFrame (gtype, HandleFrameVMCallback); + } + + static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr frame); + + static int HandleFrame_cb (IntPtr inst, IntPtr frame) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + Gst.FlowReturn __result; + __result = __obj.OnHandleFrame (Gst.Video.VideoCodecFrame.New (frame)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideHandleFrame")] + protected virtual Gst.FlowReturn OnHandleFrame (Gst.Video.VideoCodecFrame frame) + { + return InternalHandleFrame (frame); + } + + private Gst.FlowReturn InternalHandleFrame (Gst.Video.VideoCodecFrame frame) + { + HandleFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame")); + unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static ResetNativeDelegate Reset_cb_delegate; + static ResetNativeDelegate ResetVMCallback { + get { + if (Reset_cb_delegate == null) + Reset_cb_delegate = new ResetNativeDelegate (Reset_cb); + return Reset_cb_delegate; + } + } + + static void OverrideReset (GLib.GType gtype) + { + OverrideReset (gtype, ResetVMCallback); + } + + static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ResetNativeDelegate (IntPtr inst, bool hard); + + static bool Reset_cb (IntPtr inst, bool hard) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnReset (hard); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideReset")] + protected virtual bool OnReset (bool hard) + { + return InternalReset (hard); + } + + private bool InternalReset (bool hard) + { + ResetNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset")); + unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, hard); + return __result; + } + + static FinishNativeDelegate Finish_cb_delegate; + static FinishNativeDelegate FinishVMCallback { + get { + if (Finish_cb_delegate == null) + Finish_cb_delegate = new FinishNativeDelegate (Finish_cb); + return Finish_cb_delegate; + } + } + + static void OverrideFinish (GLib.GType gtype) + { + OverrideFinish (gtype, FinishVMCallback); + } + + static void OverrideFinish (GLib.GType gtype, FinishNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("finish")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int FinishNativeDelegate (IntPtr inst); + + static int Finish_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + Gst.FlowReturn __result; + __result = __obj.OnFinish (); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideFinish")] + protected virtual Gst.FlowReturn OnFinish () + { + return InternalFinish (); + } + + private Gst.FlowReturn InternalFinish () + { + FinishNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("finish")); + unmanaged = (FinishNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FinishNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle); + return (Gst.FlowReturn) __result; + } + + static PrePushNativeDelegate PrePush_cb_delegate; + static PrePushNativeDelegate PrePushVMCallback { + get { + if (PrePush_cb_delegate == null) + PrePush_cb_delegate = new PrePushNativeDelegate (PrePush_cb); + return PrePush_cb_delegate; + } + } + + static void OverridePrePush (GLib.GType gtype) + { + OverridePrePush (gtype, PrePushVMCallback); + } + + static void OverridePrePush (GLib.GType gtype, PrePushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int PrePushNativeDelegate (IntPtr inst, IntPtr frame); + + static int PrePush_cb (IntPtr inst, IntPtr frame) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + Gst.FlowReturn __result; + __result = __obj.OnPrePush (Gst.Video.VideoCodecFrame.New (frame)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverridePrePush")] + protected virtual Gst.FlowReturn OnPrePush (Gst.Video.VideoCodecFrame frame) + { + return InternalPrePush (frame); + } + + private Gst.FlowReturn InternalPrePush (Gst.Video.VideoCodecFrame frame) + { + PrePushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push")); + unmanaged = (PrePushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrePushNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + static GetcapsNativeDelegate Getcaps_cb_delegate; + static GetcapsNativeDelegate GetcapsVMCallback { + get { + if (Getcaps_cb_delegate == null) + Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb); + return Getcaps_cb_delegate; + } + } + + static void OverrideGetcaps (GLib.GType gtype) + { + OverrideGetcaps (gtype, GetcapsVMCallback); + } + + static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter); + + static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + Gst.Caps __result; + __result = __obj.OnGetcaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideGetcaps")] + protected virtual Gst.Caps OnGetcaps (Gst.Caps filter) + { + return InternalGetcaps (filter); + } + + private Gst.Caps InternalGetcaps (Gst.Caps filter) + { + GetcapsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps")); + unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle); + return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); + } + + static SinkEventNativeDelegate SinkEvent_cb_delegate; + static SinkEventNativeDelegate SinkEventVMCallback { + get { + if (SinkEvent_cb_delegate == null) + SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); + return SinkEvent_cb_delegate; + } + } + + static void OverrideSinkEvent (GLib.GType gtype) + { + OverrideSinkEvent (gtype, SinkEventVMCallback); + } + + static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideSinkEvent")] + protected virtual bool OnSinkEvent (Gst.Event evnt) + { + return InternalSinkEvent (evnt); + } + + private bool InternalSinkEvent (Gst.Event evnt) + { + SinkEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); + unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static SrcEventNativeDelegate SrcEvent_cb_delegate; + static SrcEventNativeDelegate SrcEventVMCallback { + get { + if (SrcEvent_cb_delegate == null) + SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); + return SrcEvent_cb_delegate; + } + } + + static void OverrideSrcEvent (GLib.GType gtype) + { + OverrideSrcEvent (gtype, SrcEventVMCallback); + } + + static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideSrcEvent")] + protected virtual bool OnSrcEvent (Gst.Event evnt) + { + return InternalSrcEvent (evnt); + } + + private bool InternalSrcEvent (Gst.Event evnt) + { + SrcEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); + unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static NegotiateNativeDelegate Negotiate_cb_delegate; + static NegotiateNativeDelegate NegotiateVMCallback { + get { + if (Negotiate_cb_delegate == null) + Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb); + return Negotiate_cb_delegate; + } + } + + static void OverrideNegotiate (GLib.GType gtype) + { + OverrideNegotiate (gtype, NegotiateVMCallback); + } + + static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool NegotiateNativeDelegate (IntPtr inst); + + static bool Negotiate_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnNegotiate (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideNegotiate")] + protected virtual bool OnNegotiate () + { + return InternalNegotiate (); + } + + private bool InternalNegotiate () + { + NegotiateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate")); + unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; + static DecideAllocationNativeDelegate DecideAllocationVMCallback { + get { + if (DecideAllocation_cb_delegate == null) + DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); + return DecideAllocation_cb_delegate; + } + } + + static void OverrideDecideAllocation (GLib.GType gtype) + { + OverrideDecideAllocation (gtype, DecideAllocationVMCallback); + } + + static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool DecideAllocation_cb (IntPtr inst, IntPtr query) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideDecideAllocation")] + protected virtual bool OnDecideAllocation (Gst.Query query) + { + return InternalDecideAllocation (query); + } + + private bool InternalDecideAllocation (Gst.Query query) + { + DecideAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); + unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; + static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { + get { + if (ProposeAllocation_cb_delegate == null) + ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); + return ProposeAllocation_cb_delegate; + } + } + + static void OverrideProposeAllocation (GLib.GType gtype) + { + OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); + } + + static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query); + + static bool ProposeAllocation_cb (IntPtr inst, IntPtr query) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideProposeAllocation")] + protected virtual bool OnProposeAllocation (Gst.Query query) + { + return InternalProposeAllocation (query); + } + + private bool InternalProposeAllocation (Gst.Query query) + { + ProposeAllocationNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); + unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static FlushNativeDelegate Flush_cb_delegate; + static FlushNativeDelegate FlushVMCallback { + get { + if (Flush_cb_delegate == null) + Flush_cb_delegate = new FlushNativeDelegate (Flush_cb); + return Flush_cb_delegate; + } + } + + static void OverrideFlush (GLib.GType gtype) + { + OverrideFlush (gtype, FlushVMCallback); + } + + static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool FlushNativeDelegate (IntPtr inst); + + static bool Flush_cb (IntPtr inst) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnFlush (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideFlush")] + protected virtual bool OnFlush () + { + return InternalFlush (); + } + + private bool InternalFlush () + { + FlushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush")); + unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static SinkQueryNativeDelegate SinkQuery_cb_delegate; + static SinkQueryNativeDelegate SinkQueryVMCallback { + get { + if (SinkQuery_cb_delegate == null) + SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb); + return SinkQuery_cb_delegate; + } + } + + static void OverrideSinkQuery (GLib.GType gtype) + { + OverrideSinkQuery (gtype, SinkQueryVMCallback); + } + + static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SinkQuery_cb (IntPtr inst, IntPtr query) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideSinkQuery")] + protected virtual bool OnSinkQuery (Gst.Query query) + { + return InternalSinkQuery (query); + } + + private bool InternalSinkQuery (Gst.Query query) + { + SinkQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query")); + unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static SrcQueryNativeDelegate SrcQuery_cb_delegate; + static SrcQueryNativeDelegate SrcQueryVMCallback { + get { + if (SrcQuery_cb_delegate == null) + SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb); + return SrcQuery_cb_delegate; + } + } + + static void OverrideSrcQuery (GLib.GType gtype) + { + OverrideSrcQuery (gtype, SrcQueryVMCallback); + } + + static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool SrcQuery_cb (IntPtr inst, IntPtr query) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideSrcQuery")] + protected virtual bool OnSrcQuery (Gst.Query query) + { + return InternalSrcQuery (query); + } + + private bool InternalSrcQuery (Gst.Query query) + { + SrcQueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query")); + unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static TransformMetaNativeDelegate TransformMeta_cb_delegate; + static TransformMetaNativeDelegate TransformMetaVMCallback { + get { + if (TransformMeta_cb_delegate == null) + TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); + return TransformMeta_cb_delegate; + } + } + + static void OverrideTransformMeta (GLib.GType gtype) + { + OverrideTransformMeta (gtype, TransformMetaVMCallback); + } + + static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr frame, IntPtr meta); + + static bool TransformMeta_cb (IntPtr inst, IntPtr frame, IntPtr meta) + { + try { + VideoEncoder __obj = GLib.Object.GetObject (inst, false) as VideoEncoder; + bool __result; + __result = __obj.OnTransformMeta (Gst.Video.VideoCodecFrame.New (frame), Gst.Meta.New (meta)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoEncoder), ConnectionMethod="OverrideTransformMeta")] + protected virtual bool OnTransformMeta (Gst.Video.VideoCodecFrame frame, Gst.Meta meta) + { + return InternalTransformMeta (frame, meta); + } + + private bool InternalTransformMeta (Gst.Video.VideoCodecFrame frame, Gst.Meta meta) + { + TransformMetaNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); + unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); + } + if (unmanaged == null) return false; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = unmanaged (this.Handle, native_frame, native_meta); + Marshal.FreeHGlobal (native_frame); + Marshal.FreeHGlobal (native_meta); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("open" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // open + , null + , "close" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("close" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // close + , "open" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "close" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "set_format" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_format" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format + , "stop" + , "handle_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame + , "set_format" + , "reset" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reset" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset + , "handle_frame" + , "finish" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("finish" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finish + , "reset" + , "pre_push" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pre_push" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push + , "finish" + , "getcaps" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getcaps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps + , "pre_push" + , "sink_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event + , "getcaps" + , "src_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event + , "sink_event" + , "negotiate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("negotiate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate + , "src_event" + , "decide_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("decide_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation + , "negotiate" + , "propose_allocation" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("propose_allocation" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation + , "decide_allocation" + , "flush" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush + , "propose_allocation" + , "sink_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sink_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query + , "flush" + , "src_query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("src_query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query + , "sink_query" + , "transform_meta" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_meta" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta + , "src_query" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 16 // _gst_reserved + , "transform_meta" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_encoder_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_allocate_output_buffer(IntPtr raw, UIntPtr size); + + public Gst.Buffer AllocateOutputBuffer(ulong size) { + IntPtr raw_ret = gst_video_encoder_allocate_output_buffer(Handle, new UIntPtr (size)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_encoder_allocate_output_frame(IntPtr raw, IntPtr frame, UIntPtr size); + + public Gst.FlowReturn AllocateOutputFrame(Gst.Video.VideoCodecFrame frame, ulong size) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_encoder_allocate_output_frame(Handle, native_frame, new UIntPtr (size)); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_encoder_finish_frame(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn FinishFrame(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_encoder_finish_frame(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_encoder_finish_subframe(IntPtr raw, IntPtr frame); + + public Gst.FlowReturn FinishSubframe(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int raw_ret = gst_video_encoder_finish_subframe(Handle, native_frame); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); + + public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_video_encoder_get_allocator(Handle, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_get_frame(IntPtr raw, int frame_number); + + public Gst.Video.VideoCodecFrame GetFrame(int frame_number) { + IntPtr raw_ret = gst_video_encoder_get_frame(Handle, frame_number); + Gst.Video.VideoCodecFrame ret = Gst.Video.VideoCodecFrame.New (raw_ret); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_get_frames(IntPtr raw); + + public GLib.List[] Frames { + get { + IntPtr raw_ret = gst_video_encoder_get_frames(Handle); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List)); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_get_latency(IntPtr raw, out ulong min_latency, out ulong max_latency); + + public void GetLatency(out ulong min_latency, out ulong max_latency) { + gst_video_encoder_get_latency(Handle, out min_latency, out max_latency); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_video_encoder_get_max_encode_time(IntPtr raw, IntPtr frame); + + public long GetMaxEncodeTime(Gst.Video.VideoCodecFrame frame) { + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + long raw_ret = gst_video_encoder_get_max_encode_time(Handle, native_frame); + long ret = raw_ret; + Marshal.FreeHGlobal (native_frame); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_get_oldest_frame(IntPtr raw); + + public Gst.Video.VideoCodecFrame OldestFrame { + get { + IntPtr raw_ret = gst_video_encoder_get_oldest_frame(Handle); + Gst.Video.VideoCodecFrame ret = Gst.Video.VideoCodecFrame.New (raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_get_output_state(IntPtr raw); + + public Gst.Video.VideoCodecState OutputState { + get { + IntPtr raw_ret = gst_video_encoder_get_output_state(Handle); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_encoder_is_qos_enabled(IntPtr raw); + + public bool IsQosEnabled { + get { + bool raw_ret = gst_video_encoder_is_qos_enabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + gst_video_encoder_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_encoder_negotiate(IntPtr raw); + + public bool Negotiate() { + bool raw_ret = gst_video_encoder_negotiate(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_proxy_getcaps(IntPtr raw, IntPtr caps, IntPtr filter); + + public Gst.Caps ProxyGetcaps(Gst.Caps caps, Gst.Caps filter) { + IntPtr raw_ret = gst_video_encoder_proxy_getcaps(Handle, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps ProxyGetcaps() { + return ProxyGetcaps (null, null); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_set_headers(IntPtr raw, IntPtr headers); + + public GLib.List Headers { + set { + gst_video_encoder_set_headers(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_set_latency(IntPtr raw, ulong min_latency, ulong max_latency); + + public void SetLatency(ulong min_latency, ulong max_latency) { + gst_video_encoder_set_latency(Handle, min_latency, max_latency); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_set_min_pts(IntPtr raw, ulong min_pts); + + public ulong MinPts { + set { + gst_video_encoder_set_min_pts(Handle, value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_encoder_set_output_state(IntPtr raw, IntPtr caps, IntPtr reference); + + public Gst.Video.VideoCodecState SetOutputState(Gst.Caps caps, Gst.Video.VideoCodecState reference) { + caps.Owned = false; + IntPtr native_reference = GLib.Marshaller.StructureToPtrAlloc (reference); + IntPtr raw_ret = gst_video_encoder_set_output_state(Handle, caps == null ? IntPtr.Zero : caps.Handle, native_reference); + Gst.Video.VideoCodecState ret = Gst.Video.VideoCodecState.New (raw_ret); + Marshal.FreeHGlobal (native_reference); + return ret; + } + + public Gst.Video.VideoCodecState SetOutputState(Gst.Caps caps) { + return SetOutputState (caps, Gst.Video.VideoCodecState.Zero); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_encoder_set_qos_enabled(IntPtr raw, bool enabled); + + public bool QosEnabled { + set { + gst_video_encoder_set_qos_enabled(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_delete_preset(IntPtr raw, IntPtr name); + + public bool DeletePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_delete_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_get_meta(IntPtr raw, IntPtr name, IntPtr tag, out IntPtr value); + + public bool GetMeta(string name, string tag, out string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_preset_get_meta(Handle, native_name, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_preset_names(IntPtr raw); + + public string[] PresetNames { + get { + IntPtr raw_ret = gst_preset_get_preset_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_property_names(IntPtr raw); + + public string[] PropertyNames { + get { + IntPtr raw_ret = gst_preset_get_property_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_is_editable(IntPtr raw); + + public bool IsEditable { + get { + bool raw_ret = gst_preset_is_editable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_load_preset(IntPtr raw, IntPtr name); + + public bool LoadPreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_load_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_rename_preset(IntPtr raw, IntPtr old_name, IntPtr new_name); + + public bool RenamePreset(string old_name, string new_name) { + IntPtr native_old_name = GLib.Marshaller.StringToPtrGStrdup (old_name); + IntPtr native_new_name = GLib.Marshaller.StringToPtrGStrdup (new_name); + bool raw_ret = gst_preset_rename_preset(Handle, native_old_name, native_new_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_old_name); + GLib.Marshaller.Free (native_new_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_save_preset(IntPtr raw, IntPtr name); + + public bool SavePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_save_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_set_meta(IntPtr raw, IntPtr name, IntPtr tag, IntPtr value); + + public bool SetMeta(string name, string tag, string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = gst_preset_set_meta(Handle, native_name, native_tag, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + GLib.Marshaller.Free (native_value); + return ret; + } + + public bool SetMeta(string name, string tag) { + return SetMeta (name, tag, null); + } + + + static VideoEncoder () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("sinkpad" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad + , null + , "srcpad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("srcpad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad + , "sinkpad" + , "stream_lock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock + , "srcpad" + , "input_segment" + , (long) Marshal.OffsetOf(typeof(GstVideoEncoder_stream_lockAlign), "stream_lock") + , 0 + ), + new GLib.AbiField("input_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment + , "stream_lock" + , "output_segment" + , (long) Marshal.OffsetOf(typeof(GstVideoEncoder_input_segmentAlign), "input_segment") + , 0 + ), + new GLib.AbiField("output_segment" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment + , "input_segment" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstVideoEncoder_output_segmentAlign), "output_segment") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "output_segment" + , "padding" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("padding" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // padding + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoEncoder_stream_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoEncoder_input_segmentAlign + { + sbyte f1; + private Gst.Segment input_segment; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoEncoder_output_segmentAlign + { + sbyte f1; + private Gst.Segment output_segment; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoFieldOrder.cs b/sources/generated/Gst.Video/VideoFieldOrder.cs new file mode 100644 index 0000000000..7749ca0201 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFieldOrder.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoFieldOrderGType))] + public enum VideoFieldOrder { + + Unknown = 0, + TopFieldFirst = 1, + BottomFieldFirst = 2, + } + + internal class VideoFieldOrderGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_field_order_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_field_order_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoFilter.cs b/sources/generated/Gst.Video/VideoFilter.cs new file mode 100644 index 0000000000..cce5582f89 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFilter.cs @@ -0,0 +1,349 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoFilter : Gst.Base.BaseTransform { + + protected VideoFilter (IntPtr raw) : base(raw) {} + + protected VideoFilter() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public bool Negotiated { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("negotiated")); + return (*raw_ptr); + } + } + } + + public Gst.Video.VideoInfo InInfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("in_info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Video.VideoInfo), false); + } + } + } + + public Gst.Video.VideoInfo OutInfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("out_info")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Video.VideoInfo), false); + } + } + } + + static SetInfoNativeDelegate SetInfo_cb_delegate; + static SetInfoNativeDelegate SetInfoVMCallback { + get { + if (SetInfo_cb_delegate == null) + SetInfo_cb_delegate = new SetInfoNativeDelegate (SetInfo_cb); + return SetInfo_cb_delegate; + } + } + + static void OverrideSetInfo (GLib.GType gtype) + { + OverrideSetInfo (gtype, SetInfoVMCallback); + } + + static void OverrideSetInfo (GLib.GType gtype, SetInfoNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_info")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetInfoNativeDelegate (IntPtr inst, IntPtr incaps, IntPtr in_info, IntPtr outcaps, IntPtr out_info); + + static bool SetInfo_cb (IntPtr inst, IntPtr incaps, IntPtr in_info, IntPtr outcaps, IntPtr out_info) + { + try { + VideoFilter __obj = GLib.Object.GetObject (inst, false) as VideoFilter; + bool __result; + __result = __obj.OnSetInfo (incaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (incaps, typeof (Gst.Caps), false), in_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (in_info, typeof (Gst.Video.VideoInfo), false), outcaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (outcaps, typeof (Gst.Caps), false), out_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (out_info, typeof (Gst.Video.VideoInfo), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoFilter), ConnectionMethod="OverrideSetInfo")] + protected virtual bool OnSetInfo (Gst.Caps incaps, Gst.Video.VideoInfo in_info, Gst.Caps outcaps, Gst.Video.VideoInfo out_info) + { + return InternalSetInfo (incaps, in_info, outcaps, out_info); + } + + private bool InternalSetInfo (Gst.Caps incaps, Gst.Video.VideoInfo in_info, Gst.Caps outcaps, Gst.Video.VideoInfo out_info) + { + SetInfoNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_info")); + unmanaged = (SetInfoNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetInfoNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, incaps == null ? IntPtr.Zero : incaps.Handle, in_info == null ? IntPtr.Zero : in_info.Handle, outcaps == null ? IntPtr.Zero : outcaps.Handle, out_info == null ? IntPtr.Zero : out_info.Handle); + return __result; + } + + static TransformFrameNativeDelegate TransformFrame_cb_delegate; + static TransformFrameNativeDelegate TransformFrameVMCallback { + get { + if (TransformFrame_cb_delegate == null) + TransformFrame_cb_delegate = new TransformFrameNativeDelegate (TransformFrame_cb); + return TransformFrame_cb_delegate; + } + } + + static void OverrideTransformFrame (GLib.GType gtype) + { + OverrideTransformFrame (gtype, TransformFrameVMCallback); + } + + static void OverrideTransformFrame (GLib.GType gtype, TransformFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int TransformFrameNativeDelegate (IntPtr inst, IntPtr inframe, IntPtr outframe); + + static int TransformFrame_cb (IntPtr inst, IntPtr inframe, IntPtr outframe) + { + try { + VideoFilter __obj = GLib.Object.GetObject (inst, false) as VideoFilter; + Gst.FlowReturn __result; + __result = __obj.OnTransformFrame (Gst.Video.VideoFrame.New (inframe), Gst.Video.VideoFrame.New (outframe)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoFilter), ConnectionMethod="OverrideTransformFrame")] + protected virtual Gst.FlowReturn OnTransformFrame (Gst.Video.VideoFrame inframe, Gst.Video.VideoFrame outframe) + { + return InternalTransformFrame (inframe, outframe); + } + + private Gst.FlowReturn InternalTransformFrame (Gst.Video.VideoFrame inframe, Gst.Video.VideoFrame outframe) + { + TransformFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_frame")); + unmanaged = (TransformFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_inframe = GLib.Marshaller.StructureToPtrAlloc (inframe); + IntPtr native_outframe = GLib.Marshaller.StructureToPtrAlloc (outframe); + int __result = unmanaged (this.Handle, native_inframe, native_outframe); + Marshal.FreeHGlobal (native_inframe); + Marshal.FreeHGlobal (native_outframe); + return (Gst.FlowReturn) __result; + } + + static TransformFrameIpNativeDelegate TransformFrameIp_cb_delegate; + static TransformFrameIpNativeDelegate TransformFrameIpVMCallback { + get { + if (TransformFrameIp_cb_delegate == null) + TransformFrameIp_cb_delegate = new TransformFrameIpNativeDelegate (TransformFrameIp_cb); + return TransformFrameIp_cb_delegate; + } + } + + static void OverrideTransformFrameIp (GLib.GType gtype) + { + OverrideTransformFrameIp (gtype, TransformFrameIpVMCallback); + } + + static void OverrideTransformFrameIp (GLib.GType gtype, TransformFrameIpNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_frame_ip")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int TransformFrameIpNativeDelegate (IntPtr inst, IntPtr frame); + + static int TransformFrameIp_cb (IntPtr inst, IntPtr frame) + { + try { + VideoFilter __obj = GLib.Object.GetObject (inst, false) as VideoFilter; + Gst.FlowReturn __result; + __result = __obj.OnTransformFrameIp (Gst.Video.VideoFrame.New (frame)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoFilter), ConnectionMethod="OverrideTransformFrameIp")] + protected virtual Gst.FlowReturn OnTransformFrameIp (Gst.Video.VideoFrame frame) + { + return InternalTransformFrameIp (frame); + } + + private Gst.FlowReturn InternalTransformFrameIp (Gst.Video.VideoFrame frame) + { + TransformFrameIpNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_frame_ip")); + unmanaged = (TransformFrameIpNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformFrameIpNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); + int __result = unmanaged (this.Handle, native_frame); + Marshal.FreeHGlobal (native_frame); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("set_info" + , Gst.Base.BaseTransform.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_info + , null + , "transform_frame" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_frame" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_frame + , "set_info" + , "transform_frame_ip" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("transform_frame_ip" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_frame_ip + , "transform_frame" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "transform_frame_ip" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_filter_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_filter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static VideoFilter () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("negotiated" + , Gst.Base.BaseTransform.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(bool)) // negotiated + , null + , "in_info" + , (long) Marshal.OffsetOf(typeof(GstVideoFilter_negotiatedAlign), "negotiated") + , 0 + ), + new GLib.AbiField("in_info" + , -1 + , Gst.Video.VideoInfo.abi_info.Size // in_info + , "negotiated" + , "out_info" + , Gst.Video.VideoInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("out_info" + , -1 + , Gst.Video.VideoInfo.abi_info.Size // out_info + , "in_info" + , "_gst_reserved" + , Gst.Video.VideoInfo.abi_info.Align + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "out_info" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoFilter_negotiatedAlign + { + sbyte f1; + private bool negotiated; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoFlags.cs b/sources/generated/Gst.Video/VideoFlags.cs new file mode 100644 index 0000000000..fa05babc7b --- /dev/null +++ b/sources/generated/Gst.Video/VideoFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoFlagsGType))] + public enum VideoFlags : uint { + + None = 0, + VariableFps = 1, + PremultipliedAlpha = 2, + } + + internal class VideoFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoFormat.cs b/sources/generated/Gst.Video/VideoFormat.cs new file mode 100644 index 0000000000..f44ab525c9 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFormat.cs @@ -0,0 +1,125 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoFormatGType))] + public enum VideoFormat { + + Unknown = 0, + Encoded = 1, + I420 = 2, + Yv12 = 3, + Yuy2 = 4, + Uyvy = 5, + Ayuv = 6, + Rgbx = 7, + Bgrx = 8, + Xrgb = 9, + Xbgr = 10, + Rgba = 11, + Bgra = 12, + Argb = 13, + Abgr = 14, + Rgb = 15, + Bgr = 16, + Y41b = 17, + Y42b = 18, + Yvyu = 19, + Y444 = 20, + V210 = 21, + V216 = 22, + Nv12 = 23, + Nv21 = 24, + Gray8 = 25, + Gray16Be = 26, + Gray16Le = 27, + V308 = 28, + Rgb16 = 29, + Bgr16 = 30, + Rgb15 = 31, + Bgr15 = 32, + Uyvp = 33, + A420 = 34, + Rgb8p = 35, + Yuv9 = 36, + Yvu9 = 37, + Iyu1 = 38, + Argb64 = 39, + Ayuv64 = 40, + R210 = 41, + I42010be = 42, + I42010le = 43, + I42210be = 44, + I42210le = 45, + Y44410be = 46, + Y44410le = 47, + Gbr = 48, + Gbr10be = 49, + Gbr10le = 50, + Nv16 = 51, + Nv24 = 52, + Nv1264z32 = 53, + A42010be = 54, + A42010le = 55, + A42210be = 56, + A42210le = 57, + A44410be = 58, + A44410le = 59, + Nv61 = 60, + P01010be = 61, + P01010le = 62, + Iyu2 = 63, + Vyuy = 64, + Gbra = 65, + Gbra10be = 66, + Gbra10le = 67, + Gbr12be = 68, + Gbr12le = 69, + Gbra12be = 70, + Gbra12le = 71, + I42012be = 72, + I42012le = 73, + I42212be = 74, + I42212le = 75, + Y44412be = 76, + Y44412le = 77, + Gray10Le32 = 78, + Nv1210le32 = 79, + Nv1610le32 = 80, + Nv1210le40 = 81, + Y210 = 82, + Y410 = 83, + Vuya = 84, + Bgr10a2Le = 85, + Rgb10a2Le = 86, + Y44416be = 87, + Y44416le = 88, + P016Be = 89, + P016Le = 90, + P012Be = 91, + P012Le = 92, + Y212Be = 93, + Y212Le = 94, + Y412Be = 95, + Y412Le = 96, + Nv124l4 = 97, + Nv1232l32 = 98, + } + + internal class VideoFormatGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_format_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_format_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoFormatFlags.cs b/sources/generated/Gst.Video/VideoFormatFlags.cs new file mode 100644 index 0000000000..f5dd2cea8b --- /dev/null +++ b/sources/generated/Gst.Video/VideoFormatFlags.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoFormatFlagsGType))] + public enum VideoFormatFlags : uint { + + Yuv = 1, + Rgb = 2, + Gray = 4, + Alpha = 8, + Le = 16, + Palette = 32, + Complex = 64, + Unpack = 128, + Tiled = 256, + } + + internal class VideoFormatFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_format_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_format_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoFormatInfo.cs b/sources/generated/Gst.Video/VideoFormatInfo.cs new file mode 100644 index 0000000000..dccdedc164 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFormatInfo.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoFormatInfo : IEquatable { + + public Gst.Video.VideoFormat Format; + public string Name; + public string Description; + public Gst.Video.VideoFormatFlags Flags; + public uint Bits; + public uint NComponents; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] Shift; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] Depth; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public int[] PixelStride; + public uint NPlanes; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] Plane; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] Poffset; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] WSub; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public uint[] HSub; + public Gst.Video.VideoFormat UnpackFormat; + private Gst.VideoSharp.VideoFormatUnpackNative _unpack_func; + public Gst.Video.VideoFormatUnpack UnpackFunc { + get { + return Gst.VideoSharp.VideoFormatUnpackWrapper.GetManagedDelegate (_unpack_func); + } + } + public int PackLines; + private Gst.VideoSharp.VideoFormatPackNative _pack_func; + public Gst.Video.VideoFormatPack PackFunc { + get { + return Gst.VideoSharp.VideoFormatPackWrapper.GetManagedDelegate (_pack_func); + } + } + public Gst.Video.VideoTileMode TileMode; + public uint TileWs; + public uint TileHs; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoFormatInfo Zero = new Gst.Video.VideoFormatInfo (); + + public static Gst.Video.VideoFormatInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoFormatInfo.Zero; + return (Gst.Video.VideoFormatInfo) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoFormatInfo)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_format_info_component(IntPtr raw, uint plane, out int components); + + public int Component(uint plane) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int components; + gst_video_format_info_component(this_as_native, plane, out components); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return components; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoFormatInfo target) + { + target = New (native); + } + + public bool Equals (VideoFormatInfo other) + { + return true && Format.Equals (other.Format) && Name.Equals (other.Name) && Description.Equals (other.Description) && Flags.Equals (other.Flags) && Bits.Equals (other.Bits) && NComponents.Equals (other.NComponents) && Shift.Equals (other.Shift) && Depth.Equals (other.Depth) && PixelStride.Equals (other.PixelStride) && NPlanes.Equals (other.NPlanes) && Plane.Equals (other.Plane) && Poffset.Equals (other.Poffset) && WSub.Equals (other.WSub) && HSub.Equals (other.HSub) && UnpackFormat.Equals (other.UnpackFormat) && UnpackFunc.Equals (other.UnpackFunc) && PackLines.Equals (other.PackLines) && PackFunc.Equals (other.PackFunc) && TileMode.Equals (other.TileMode) && TileWs.Equals (other.TileWs) && TileHs.Equals (other.TileHs); + } + + public override bool Equals (object other) + { + return other is VideoFormatInfo && Equals ((VideoFormatInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Format.GetHashCode () ^ Name.GetHashCode () ^ Description.GetHashCode () ^ Flags.GetHashCode () ^ Bits.GetHashCode () ^ NComponents.GetHashCode () ^ Shift.GetHashCode () ^ Depth.GetHashCode () ^ PixelStride.GetHashCode () ^ NPlanes.GetHashCode () ^ Plane.GetHashCode () ^ Poffset.GetHashCode () ^ WSub.GetHashCode () ^ HSub.GetHashCode () ^ UnpackFormat.GetHashCode () ^ UnpackFunc.GetHashCode () ^ PackLines.GetHashCode () ^ PackFunc.GetHashCode () ^ TileMode.GetHashCode () ^ TileWs.GetHashCode () ^ TileHs.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoFormatPack.cs b/sources/generated/Gst.Video/VideoFormatPack.cs new file mode 100644 index 0000000000..6ed900d4ba --- /dev/null +++ b/sources/generated/Gst.Video/VideoFormatPack.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate void VideoFormatPack(Gst.Video.VideoFormatInfo info, Gst.Video.VideoPackFlags flags, IntPtr src, int sstride, IntPtr data, int stride, Gst.Video.VideoChromaSite chroma_site, int y, int width); + +} diff --git a/sources/generated/Gst.Video/VideoFormatUnpack.cs b/sources/generated/Gst.Video/VideoFormatUnpack.cs new file mode 100644 index 0000000000..8236ff3241 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFormatUnpack.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate void VideoFormatUnpack(Gst.Video.VideoFormatInfo info, Gst.Video.VideoPackFlags flags, IntPtr dest, IntPtr data, int stride, int x, int y, int width); + +} diff --git a/sources/generated/Gst.Video/VideoFrame.cs b/sources/generated/Gst.Video/VideoFrame.cs new file mode 100644 index 0000000000..9e2fdd65a0 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFrame.cs @@ -0,0 +1,143 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoFrame : IEquatable { + + private IntPtr _info; + public Gst.Video.VideoInfo Info { + get { + return _info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Video.VideoInfo), false); + } + set { + _info = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Video.VideoFrameFlags Flags; + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _meta; + public int Id; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public IntPtr[] Data; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public Gst.MapInfo[] MapField; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoFrame Zero = new Gst.Video.VideoFrame (); + + public static Gst.Video.VideoFrame New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoFrame.Zero; + return (Gst.Video.VideoFrame) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoFrame)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_frame_copy(IntPtr raw, IntPtr src); + + public bool Copy(Gst.Video.VideoFrame src) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + bool raw_ret = gst_video_frame_copy(this_as_native, native_src); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_src); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_frame_copy_plane(IntPtr raw, IntPtr src, uint plane); + + public bool CopyPlane(Gst.Video.VideoFrame src, uint plane) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + bool raw_ret = gst_video_frame_copy_plane(this_as_native, native_src, plane); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_src); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_frame_map(IntPtr raw, IntPtr info, IntPtr buffer, int flags); + + public bool Map(Gst.Video.VideoInfo info, Gst.Buffer buffer, Gst.MapFlags flags) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_frame_map(this_as_native, info == null ? IntPtr.Zero : info.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, (int) flags); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_frame_map_id(IntPtr raw, IntPtr info, IntPtr buffer, int id, int flags); + + public bool MapId(Gst.Video.VideoInfo info, Gst.Buffer buffer, int id, Gst.MapFlags flags) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_frame_map_id(this_as_native, info == null ? IntPtr.Zero : info.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, id, (int) flags); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_frame_unmap(IntPtr raw); + + public void Unmap() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_frame_unmap(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoFrame target) + { + target = New (native); + } + + public bool Equals (VideoFrame other) + { + return true && Info.Equals (other.Info) && Flags.Equals (other.Flags) && Buffer.Equals (other.Buffer) && _meta.Equals (other._meta) && Id.Equals (other.Id) && Data.Equals (other.Data) && MapField.Equals (other.MapField); + } + + public override bool Equals (object other) + { + return other is VideoFrame && Equals ((VideoFrame) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Info.GetHashCode () ^ Flags.GetHashCode () ^ Buffer.GetHashCode () ^ _meta.GetHashCode () ^ Id.GetHashCode () ^ Data.GetHashCode () ^ MapField.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoFrameFlags.cs b/sources/generated/Gst.Video/VideoFrameFlags.cs new file mode 100644 index 0000000000..56b1a012fd --- /dev/null +++ b/sources/generated/Gst.Video/VideoFrameFlags.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoFrameFlagsGType))] + public enum VideoFrameFlags : uint { + + None = 0, + Interlaced = 1, + Tff = 2, + Rff = 4, + Onefield = 8, + BottomField = 8, + TopField = 10, + MultipleView = 16, + FirstInBundle = 32, + } + + internal class VideoFrameFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_frame_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_frame_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoFrameMapFlags.cs b/sources/generated/Gst.Video/VideoFrameMapFlags.cs new file mode 100644 index 0000000000..ab6b1a9c79 --- /dev/null +++ b/sources/generated/Gst.Video/VideoFrameMapFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoFrameMapFlagsGType))] + public enum VideoFrameMapFlags : uint { + + NoRef = 65536, + Last = 16777216, + } + + internal class VideoFrameMapFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_frame_map_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_frame_map_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoGLTextureOrientation.cs b/sources/generated/Gst.Video/VideoGLTextureOrientation.cs new file mode 100644 index 0000000000..14b91a9c2a --- /dev/null +++ b/sources/generated/Gst.Video/VideoGLTextureOrientation.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum VideoGLTextureOrientation { + + NormalYNormal = 0, + NormalYFlip = 1, + FlipYNormal = 2, + FlipYFlip = 3, + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoGLTextureType.cs b/sources/generated/Gst.Video/VideoGLTextureType.cs new file mode 100644 index 0000000000..43c5e6f030 --- /dev/null +++ b/sources/generated/Gst.Video/VideoGLTextureType.cs @@ -0,0 +1,21 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public enum VideoGLTextureType { + + Luminance = 0, + LuminanceAlpha = 1, + Rgb16 = 2, + Rgb = 3, + Rgba = 4, + R = 5, + Rg = 6, + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoGLTextureUpload.cs b/sources/generated/Gst.Video/VideoGLTextureUpload.cs new file mode 100644 index 0000000000..4b31ed6f74 --- /dev/null +++ b/sources/generated/Gst.Video/VideoGLTextureUpload.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + + public delegate bool VideoGLTextureUpload(Gst.Video.VideoGLTextureUploadMeta meta, uint texture_id); + +} diff --git a/sources/generated/Gst.Video/VideoGLTextureUploadMeta.cs b/sources/generated/Gst.Video/VideoGLTextureUploadMeta.cs new file mode 100644 index 0000000000..528825f706 --- /dev/null +++ b/sources/generated/Gst.Video/VideoGLTextureUploadMeta.cs @@ -0,0 +1,76 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoGLTextureUploadMeta : IEquatable { + + public Gst.Meta Meta; + public Gst.Video.VideoGLTextureOrientation TextureOrientation; + public uint NTextures; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public Gst.Video.VideoGLTextureType[] TextureType; + private IntPtr _buffer; + private Gst.VideoSharp.VideoGLTextureUploadNative _upload; + private IntPtr _user_data; + + public static Gst.Video.VideoGLTextureUploadMeta Zero = new Gst.Video.VideoGLTextureUploadMeta (); + + public static Gst.Video.VideoGLTextureUploadMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoGLTextureUploadMeta.Zero; + return (Gst.Video.VideoGLTextureUploadMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoGLTextureUploadMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_gl_texture_upload_meta_upload(IntPtr raw, uint texture_id); + + public bool Upload(uint texture_id) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_gl_texture_upload_meta_upload(this_as_native, texture_id); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_gl_texture_upload_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_gl_texture_upload_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoGLTextureUploadMeta target) + { + target = New (native); + } + + public override bool Equals (object other) + { + return other is VideoGLTextureUploadMeta && Equals ((VideoGLTextureUploadMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ TextureOrientation.GetHashCode () ^ NTextures.GetHashCode () ^ TextureType.GetHashCode () ^ _buffer.GetHashCode () ^ _upload.GetHashCode () ^ _user_data.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoGammaMode.cs b/sources/generated/Gst.Video/VideoGammaMode.cs new file mode 100644 index 0000000000..9ac42ec087 --- /dev/null +++ b/sources/generated/Gst.Video/VideoGammaMode.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoGammaModeGType))] + public enum VideoGammaMode { + + None = 0, + Remap = 1, + } + + internal class VideoGammaModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_gamma_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_gamma_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoInfo.cs b/sources/generated/Gst.Video/VideoInfo.cs new file mode 100644 index 0000000000..b963455208 --- /dev/null +++ b/sources/generated/Gst.Video/VideoInfo.cs @@ -0,0 +1,645 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoInfo : GLib.Opaque { + + public Gst.Video.VideoFormatInfo Finfo { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo")); + return Gst.Video.VideoFormatInfo.New ((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + public Gst.Video.VideoInterlaceMode InterlaceMode { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("interlace_mode")); + return (Gst.Video.VideoInterlaceMode) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("interlace_mode")); + *raw_ptr = (int) value; + } + } + } + + public Gst.Video.VideoFlags Flags { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + return (Gst.Video.VideoFlags) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + *raw_ptr = (int) value; + } + } + } + + public int Width { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("width")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("width")); + *raw_ptr = value; + } + } + } + + public int Height { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("height")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("height")); + *raw_ptr = value; + } + } + } + + public ulong Size { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + return (ulong) (*raw_ptr); + } + } + set { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + *raw_ptr = new UIntPtr (value); + } + } + } + + public int Views { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("views")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("views")); + *raw_ptr = value; + } + } + } + + public Gst.Video.VideoChromaSite ChromaSite { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("chroma_site")); + return (Gst.Video.VideoChromaSite) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("chroma_site")); + *raw_ptr = (int) value; + } + } + } + + public Gst.Video.VideoColorimetry Colorimetry { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("colorimetry")); + return Gst.Video.VideoColorimetry.New ((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("colorimetry")); + *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); + } + } + } + + public int ParN { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("par_n")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("par_n")); + *raw_ptr = value; + } + } + } + + public int ParD { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("par_d")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("par_d")); + *raw_ptr = value; + } + } + } + + public int FpsN { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("fps_n")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("fps_n")); + *raw_ptr = value; + } + } + } + + public int FpsD { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("fps_d")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("fps_d")); + *raw_ptr = value; + } + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_info_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_info_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_align(IntPtr raw, IntPtr align); + + public bool Align(Gst.Video.VideoAlignment align) { + IntPtr native_align = GLib.Marshaller.StructureToPtrAlloc (align); + bool raw_ret = gst_video_info_align(Handle, native_align); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_align); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_align_full(IntPtr raw, IntPtr align, out UIntPtr plane_size); + + public bool AlignFull(Gst.Video.VideoAlignment align, out ulong plane_size) { + IntPtr native_align = GLib.Marshaller.StructureToPtrAlloc (align); + UIntPtr native_plane_size; + bool raw_ret = gst_video_info_align_full(Handle, native_align, out native_plane_size); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_align); + plane_size = (ulong) native_plane_size; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_convert(IntPtr raw, int src_format, long src_value, int dest_format, out long dest_value); + + public bool Convert(Gst.Format src_format, long src_value, Gst.Format dest_format, out long dest_value) { + bool raw_ret = gst_video_info_convert(Handle, (int) src_format, src_value, (int) dest_format, out dest_value); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_info_copy(IntPtr raw); + + public Gst.Video.VideoInfo Copy() { + IntPtr raw_ret = gst_video_info_copy(Handle); + Gst.Video.VideoInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoInfo), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_from_caps(IntPtr raw, IntPtr caps); + + public bool FromCaps(Gst.Caps caps) { + bool raw_ret = gst_video_info_from_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_info_init(IntPtr raw); + + public void Init() { + gst_video_info_init(Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_is_equal(IntPtr raw, IntPtr other); + + public bool IsEqual(Gst.Video.VideoInfo other) { + bool raw_ret = gst_video_info_is_equal(Handle, other == null ? IntPtr.Zero : other.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_set_format(IntPtr raw, int format, uint width, uint height); + + public bool SetFormat(Gst.Video.VideoFormat format, uint width, uint height) { + bool raw_ret = gst_video_info_set_format(Handle, (int) format, width, height); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_info_set_interlaced_format(IntPtr raw, int format, int mode, uint width, uint height); + + public bool SetInterlacedFormat(Gst.Video.VideoFormat format, Gst.Video.VideoInterlaceMode mode, uint width, uint height) { + bool raw_ret = gst_video_info_set_interlaced_format(Handle, (int) format, (int) mode, width, height); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_info_to_caps(IntPtr raw); + + public Gst.Caps ToCaps() { + IntPtr raw_ret = gst_video_info_to_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public VideoInfo(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_info_new(); + + public VideoInfo () + { + Raw = gst_video_info_new(); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_info_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_video_info_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_video_info_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("finfo" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // finfo + , null + , "interlace_mode" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("interlace_mode" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoInterlaceMode))) // interlace_mode + , "finfo" + , "flags" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_interlace_modeAlign), "interlace_mode") + , 0 + ), + new GLib.AbiField("flags" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoFlags))) // flags + , "interlace_mode" + , "width" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_flagsAlign), "flags") + , 0 + ), + new GLib.AbiField("width" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // width + , "flags" + , "height" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_widthAlign), "width") + , 0 + ), + new GLib.AbiField("height" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // height + , "width" + , "size" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_heightAlign), "height") + , 0 + ), + new GLib.AbiField("size" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // size + , "height" + , "views" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_sizeAlign), "size") + , 0 + ), + new GLib.AbiField("views" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // views + , "size" + , "chroma_site" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_viewsAlign), "views") + , 0 + ), + new GLib.AbiField("chroma_site" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoChromaSite))) // chroma_site + , "views" + , "colorimetry" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_chroma_siteAlign), "chroma_site") + , 0 + ), + new GLib.AbiField("colorimetry" + , -1 + , (uint) Marshal.SizeOf(typeof(Gst.Video.VideoColorimetry)) // colorimetry + , "chroma_site" + , "par_n" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_colorimetryAlign), "colorimetry") + , 0 + ), + new GLib.AbiField("par_n" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // par_n + , "colorimetry" + , "par_d" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_par_nAlign), "par_n") + , 0 + ), + new GLib.AbiField("par_d" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // par_d + , "par_n" + , "fps_n" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_par_dAlign), "par_d") + , 0 + ), + new GLib.AbiField("fps_n" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // fps_n + , "par_d" + , "fps_d" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_fps_nAlign), "fps_n") + , 0 + ), + new GLib.AbiField("fps_d" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // fps_d + , "fps_n" + , "offset" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_fps_dAlign), "fps_d") + , 0 + ), + new GLib.AbiField("offset" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) * 4 // offset + , "fps_d" + , "stride" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_offsetAlign), "offset") + , 0 + ), + new GLib.AbiField("stride" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) * 4 // stride + , "offset" + , "ABI" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_strideAlign), "stride") + , 0 + ), + // union struct ABI.abi + new GLib.AbiField("ABI.abi.multiview_mode" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoMultiviewMode))) // ABI.abi.multiview_mode + , "stride" + , "ABI.abi.multiview_flags" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_ABI_abi_multiview_modeAlign), "ABI_abi_multiview_mode") + , 0 + ), + new GLib.AbiField("ABI.abi.multiview_flags" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoMultiviewFlags))) // ABI.abi.multiview_flags + , "ABI.abi.multiview_mode" + , "ABI.abi.field_order" + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_ABI_abi_multiview_flagsAlign), "ABI_abi_multiview_flags") + , 0 + ), + new GLib.AbiField("ABI.abi.field_order" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Video.VideoFieldOrder))) // ABI.abi.field_order + , "ABI.abi.multiview_flags" + , null + , (long) Marshal.OffsetOf(typeof(GstVideoInfo_ABI_abi_field_orderAlign), "ABI_abi_field_order") + , 0 + ), + // End ABI.abi + + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "stride" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI.abi.multiview_mode","ABI.abi.multiview_flags","ABI.abi.field_order"}, + new List() {"ABI._gst_reserved"} + } + , "stride" + , null + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_interlace_modeAlign + { + sbyte f1; + private Gst.Video.VideoInterlaceMode interlace_mode; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_flagsAlign + { + sbyte f1; + private Gst.Video.VideoFlags flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_widthAlign + { + sbyte f1; + private int width; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_heightAlign + { + sbyte f1; + private int height; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_sizeAlign + { + sbyte f1; + private UIntPtr size; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_viewsAlign + { + sbyte f1; + private int views; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_chroma_siteAlign + { + sbyte f1; + private Gst.Video.VideoChromaSite chroma_site; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_colorimetryAlign + { + sbyte f1; + private Gst.Video.VideoColorimetry colorimetry; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_par_nAlign + { + sbyte f1; + private int par_n; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_par_dAlign + { + sbyte f1; + private int par_d; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_fps_nAlign + { + sbyte f1; + private int fps_n; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_fps_dAlign + { + sbyte f1; + private int fps_d; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_offsetAlign + { + sbyte f1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private ulong[] offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_strideAlign + { + sbyte f1; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private int[] stride; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_ABI_abi_multiview_modeAlign + { + sbyte f1; + private Gst.Video.VideoMultiviewMode ABI_abi_multiview_mode; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_ABI_abi_multiview_flagsAlign + { + sbyte f1; + private Gst.Video.VideoMultiviewFlags ABI_abi_multiview_flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoInfo_ABI_abi_field_orderAlign + { + sbyte f1; + private Gst.Video.VideoFieldOrder ABI_abi_field_order; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoInterlaceMode.cs b/sources/generated/Gst.Video/VideoInterlaceMode.cs new file mode 100644 index 0000000000..264ccf802d --- /dev/null +++ b/sources/generated/Gst.Video/VideoInterlaceMode.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoInterlaceModeGType))] + public enum VideoInterlaceMode { + + Progressive = 0, + Interleaved = 1, + Mixed = 2, + Fields = 3, + Alternate = 4, + } + + internal class VideoInterlaceModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_interlace_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_interlace_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoMasteringDisplayInfo.cs b/sources/generated/Gst.Video/VideoMasteringDisplayInfo.cs new file mode 100644 index 0000000000..3349fe873c --- /dev/null +++ b/sources/generated/Gst.Video/VideoMasteringDisplayInfo.cs @@ -0,0 +1,135 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoMasteringDisplayInfo : IEquatable { + + [MarshalAs (UnmanagedType.ByValArray, SizeConst=3)] + public Gst.Video.VideoMasteringDisplayInfoCoordinates[] DisplayPrimaries; + public Gst.Video.VideoMasteringDisplayInfoCoordinates WhitePoint; + public uint MaxDisplayMasteringLuminance; + public uint MinDisplayMasteringLuminance; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoMasteringDisplayInfo Zero = new Gst.Video.VideoMasteringDisplayInfo (); + + public static Gst.Video.VideoMasteringDisplayInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoMasteringDisplayInfo.Zero; + return (Gst.Video.VideoMasteringDisplayInfo) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoMasteringDisplayInfo)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_mastering_display_info_add_to_caps(IntPtr raw, IntPtr caps); + + public bool AddToCaps(Gst.Caps caps) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_mastering_display_info_add_to_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_mastering_display_info_from_caps(IntPtr raw, IntPtr caps); + + public bool FromCaps(Gst.Caps caps) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_mastering_display_info_from_caps(this_as_native, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_mastering_display_info_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_mastering_display_info_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_mastering_display_info_is_equal(IntPtr raw, IntPtr other); + + public bool IsEqual(Gst.Video.VideoMasteringDisplayInfo other) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_other = GLib.Marshaller.StructureToPtrAlloc (other); + bool raw_ret = gst_video_mastering_display_info_is_equal(this_as_native, native_other); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_other); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_mastering_display_info_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_mastering_display_info_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_mastering_display_info_from_string(IntPtr minfo, IntPtr mastering); + + public static bool FromString(out Gst.Video.VideoMasteringDisplayInfo minfo, string mastering) { + IntPtr native_minfo = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Video.VideoMasteringDisplayInfo))); + IntPtr native_mastering = GLib.Marshaller.StringToPtrGStrdup (mastering); + bool raw_ret = gst_video_mastering_display_info_from_string(native_minfo, native_mastering); + bool ret = raw_ret; + minfo = Gst.Video.VideoMasteringDisplayInfo.New (native_minfo); + Marshal.FreeHGlobal (native_minfo); + GLib.Marshaller.Free (native_mastering); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoMasteringDisplayInfo target) + { + target = New (native); + } + + public bool Equals (VideoMasteringDisplayInfo other) + { + return true && DisplayPrimaries.Equals (other.DisplayPrimaries) && WhitePoint.Equals (other.WhitePoint) && MaxDisplayMasteringLuminance.Equals (other.MaxDisplayMasteringLuminance) && MinDisplayMasteringLuminance.Equals (other.MinDisplayMasteringLuminance); + } + + public override bool Equals (object other) + { + return other is VideoMasteringDisplayInfo && Equals ((VideoMasteringDisplayInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ DisplayPrimaries.GetHashCode () ^ WhitePoint.GetHashCode () ^ MaxDisplayMasteringLuminance.GetHashCode () ^ MinDisplayMasteringLuminance.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoMasteringDisplayInfoCoordinates.cs b/sources/generated/Gst.Video/VideoMasteringDisplayInfoCoordinates.cs new file mode 100644 index 0000000000..8df0c8fa0b --- /dev/null +++ b/sources/generated/Gst.Video/VideoMasteringDisplayInfoCoordinates.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoMasteringDisplayInfoCoordinates : IEquatable { + + public ushort X; + public ushort Y; + + public static Gst.Video.VideoMasteringDisplayInfoCoordinates Zero = new Gst.Video.VideoMasteringDisplayInfoCoordinates (); + + public static Gst.Video.VideoMasteringDisplayInfoCoordinates New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoMasteringDisplayInfoCoordinates.Zero; + return (Gst.Video.VideoMasteringDisplayInfoCoordinates) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoMasteringDisplayInfoCoordinates)); + } + + public bool Equals (VideoMasteringDisplayInfoCoordinates other) + { + return true && X.Equals (other.X) && Y.Equals (other.Y); + } + + public override bool Equals (object other) + { + return other is VideoMasteringDisplayInfoCoordinates && Equals ((VideoMasteringDisplayInfoCoordinates) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoMatrixMode.cs b/sources/generated/Gst.Video/VideoMatrixMode.cs new file mode 100644 index 0000000000..daa3ad7c1f --- /dev/null +++ b/sources/generated/Gst.Video/VideoMatrixMode.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoMatrixModeGType))] + public enum VideoMatrixMode { + + Full = 0, + InputOnly = 1, + OutputOnly = 2, + None = 3, + } + + internal class VideoMatrixModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_matrix_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_matrix_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoMeta.cs b/sources/generated/Gst.Video/VideoMeta.cs new file mode 100644 index 0000000000..5c058e72e6 --- /dev/null +++ b/sources/generated/Gst.Video/VideoMeta.cs @@ -0,0 +1,156 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.Video.VideoFrameFlags Flags; + public Gst.Video.VideoFormat Format; + public int Id; + public uint Width; + public uint Height; + public uint NPlanes; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public ulong[] Offset; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public int[] Stride; + private IntPtr _map; + private IntPtr _unmap; + public Gst.Video.VideoAlignment Alignment; + + public static Gst.Video.VideoMeta Zero = new Gst.Video.VideoMeta (); + + public static Gst.Video.VideoMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoMeta.Zero; + return (Gst.Video.VideoMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_meta_get_plane_height(IntPtr raw, out uint plane_height); + + public bool GetPlaneHeight(out uint plane_height) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_meta_get_plane_height(this_as_native, out plane_height); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_meta_get_plane_size(IntPtr raw, out UIntPtr plane_size); + + public bool GetPlaneSize(out ulong plane_size) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr native_plane_size; + bool raw_ret = gst_video_meta_get_plane_size(this_as_native, out native_plane_size); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + plane_size = (ulong) native_plane_size; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_meta_map(IntPtr raw, uint plane, IntPtr info, out IntPtr data, out int stride, int flags); + + public bool Map(uint plane, Gst.MapInfo info, out IntPtr data, out int stride, Gst.MapFlags flags) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + bool raw_ret = gst_video_meta_map(this_as_native, plane, native_info, out data, out stride, (int) flags); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_meta_set_alignment(IntPtr raw, IntPtr alignment); + + public bool SetAlignment(Gst.Video.VideoAlignment alignment) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_alignment = GLib.Marshaller.StructureToPtrAlloc (alignment); + bool raw_ret = gst_video_meta_set_alignment(this_as_native, native_alignment); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_alignment); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_meta_unmap(IntPtr raw, uint plane, IntPtr info); + + public bool Unmap(uint plane, Gst.MapInfo info) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + bool raw_ret = gst_video_meta_unmap(this_as_native, plane, native_info); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoMeta target) + { + target = New (native); + } + + public bool Equals (VideoMeta other) + { + return true && Meta.Equals (other.Meta) && Buffer.Equals (other.Buffer) && Flags.Equals (other.Flags) && Format.Equals (other.Format) && Id.Equals (other.Id) && Width.Equals (other.Width) && Height.Equals (other.Height) && NPlanes.Equals (other.NPlanes) && Offset.Equals (other.Offset) && Stride.Equals (other.Stride) && _map.Equals (other._map) && _unmap.Equals (other._unmap) && Alignment.Equals (other.Alignment); + } + + public override bool Equals (object other) + { + return other is VideoMeta && Equals ((VideoMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Buffer.GetHashCode () ^ Flags.GetHashCode () ^ Format.GetHashCode () ^ Id.GetHashCode () ^ Width.GetHashCode () ^ Height.GetHashCode () ^ NPlanes.GetHashCode () ^ Offset.GetHashCode () ^ Stride.GetHashCode () ^ _map.GetHashCode () ^ _unmap.GetHashCode () ^ Alignment.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoMetaTransform.cs b/sources/generated/Gst.Video/VideoMetaTransform.cs new file mode 100644 index 0000000000..2f13a2d932 --- /dev/null +++ b/sources/generated/Gst.Video/VideoMetaTransform.cs @@ -0,0 +1,71 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoMetaTransform : IEquatable { + + private IntPtr _in_info; + public Gst.Video.VideoInfo InInfo { + get { + return _in_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_in_info, typeof (Gst.Video.VideoInfo), false); + } + set { + _in_info = value == null ? IntPtr.Zero : value.Handle; + } + } + private IntPtr _out_info; + public Gst.Video.VideoInfo OutInfo { + get { + return _out_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_out_info, typeof (Gst.Video.VideoInfo), false); + } + set { + _out_info = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.Video.VideoMetaTransform Zero = new Gst.Video.VideoMetaTransform (); + + public static Gst.Video.VideoMetaTransform New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoMetaTransform.Zero; + return (Gst.Video.VideoMetaTransform) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoMetaTransform)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_meta_transform_scale_get_quark(); + + public static uint ScaleGetQuark() { + uint raw_ret = gst_video_meta_transform_scale_get_quark(); + uint ret = raw_ret; + return ret; + } + + public bool Equals (VideoMetaTransform other) + { + return true && InInfo.Equals (other.InInfo) && OutInfo.Equals (other.OutInfo); + } + + public override bool Equals (object other) + { + return other is VideoMetaTransform && Equals ((VideoMetaTransform) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ InInfo.GetHashCode () ^ OutInfo.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoMultiviewFlags.cs b/sources/generated/Gst.Video/VideoMultiviewFlags.cs new file mode 100644 index 0000000000..e78a5ea133 --- /dev/null +++ b/sources/generated/Gst.Video/VideoMultiviewFlags.cs @@ -0,0 +1,35 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoMultiviewFlagsGType))] + public enum VideoMultiviewFlags : uint { + + None = 0, + RightViewFirst = 1, + LeftFlipped = 2, + LeftFlopped = 4, + RightFlipped = 8, + RightFlopped = 16, + HalfAspect = 16384, + MixedMono = 32768, + } + + internal class VideoMultiviewFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_multiview_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoMultiviewFlagsSet.cs b/sources/generated/Gst.Video/VideoMultiviewFlagsSet.cs new file mode 100644 index 0000000000..a247797640 --- /dev/null +++ b/sources/generated/Gst.Video/VideoMultiviewFlagsSet.cs @@ -0,0 +1,44 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoMultiviewFlagsSet : Gst.FlagSet { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_flagset_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_multiview_flagset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public VideoMultiviewFlagsSet(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.FlagSet.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoMultiviewFramePacking.cs b/sources/generated/Gst.Video/VideoMultiviewFramePacking.cs new file mode 100644 index 0000000000..311db0dbaa --- /dev/null +++ b/sources/generated/Gst.Video/VideoMultiviewFramePacking.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoMultiviewFramePackingGType))] + public enum VideoMultiviewFramePacking { + + None = -1, + Mono = 0, + Left = 1, + Right = 2, + SideBySide = 3, + SideBySideQuincunx = 4, + ColumnInterleaved = 5, + RowInterleaved = 6, + TopBottom = 7, + Checkerboard = 8, + } + + internal class VideoMultiviewFramePackingGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_frame_packing_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_multiview_frame_packing_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoMultiviewMode.cs b/sources/generated/Gst.Video/VideoMultiviewMode.cs new file mode 100644 index 0000000000..2bd10f81b0 --- /dev/null +++ b/sources/generated/Gst.Video/VideoMultiviewMode.cs @@ -0,0 +1,39 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoMultiviewModeGType))] + public enum VideoMultiviewMode { + + None = -1, + Mono = 0, + Left = 1, + Right = 2, + SideBySide = 3, + SideBySideQuincunx = 4, + ColumnInterleaved = 5, + RowInterleaved = 6, + TopBottom = 7, + Checkerboard = 8, + FrameByFrame = 32, + MultiviewFrameByFrame = 33, + Separated = 34, + } + + internal class VideoMultiviewModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_multiview_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_multiview_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoOrientationAdapter.cs b/sources/generated/Gst.Video/VideoOrientationAdapter.cs new file mode 100644 index 0000000000..bb91e7b1a3 --- /dev/null +++ b/sources/generated/Gst.Video/VideoOrientationAdapter.cs @@ -0,0 +1,342 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoOrientationAdapter : GLib.GInterfaceAdapter, Gst.Video.IVideoOrientation { + + [StructLayout (LayoutKind.Sequential)] + struct GstVideoOrientationInterface { + public GetHflipNativeDelegate GetHflip; + public GetVflipNativeDelegate GetVflip; + public GetHcenterNativeDelegate GetHcenter; + public GetVcenterNativeDelegate GetVcenter; + public SetHflipNativeDelegate SetHflip; + public SetVflipNativeDelegate SetVflip; + public SetHcenterNativeDelegate SetHcenter; + public SetVcenterNativeDelegate SetVcenter; + } + + static GstVideoOrientationInterface iface; + + static VideoOrientationAdapter () + { + GLib.GType.Register (_gtype, typeof (VideoOrientationAdapter)); + iface.GetHflip = new GetHflipNativeDelegate (GetHflip_cb); + iface.GetVflip = new GetVflipNativeDelegate (GetVflip_cb); + iface.GetHcenter = new GetHcenterNativeDelegate (GetHcenter_cb); + iface.GetVcenter = new GetVcenterNativeDelegate (GetVcenter_cb); + iface.SetHflip = new SetHflipNativeDelegate (SetHflip_cb); + iface.SetVflip = new SetVflipNativeDelegate (SetVflip_cb); + iface.SetHcenter = new SetHcenterNativeDelegate (SetHcenter_cb); + iface.SetVcenter = new SetVcenterNativeDelegate (SetVcenter_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetHflipNativeDelegate (IntPtr inst, out bool flip); + + static bool GetHflip_cb (IntPtr inst, out bool flip) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.GetHflip (out flip); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetVflipNativeDelegate (IntPtr inst, out bool flip); + + static bool GetVflip_cb (IntPtr inst, out bool flip) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.GetVflip (out flip); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetHcenterNativeDelegate (IntPtr inst, out int center); + + static bool GetHcenter_cb (IntPtr inst, out int center) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.GetHcenter (out center); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetVcenterNativeDelegate (IntPtr inst, out int center); + + static bool GetVcenter_cb (IntPtr inst, out int center) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.GetVcenter (out center); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetHflipNativeDelegate (IntPtr inst, bool flip); + + static bool SetHflip_cb (IntPtr inst, bool flip) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.SetHflip (flip); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetVflipNativeDelegate (IntPtr inst, bool flip); + + static bool SetVflip_cb (IntPtr inst, bool flip) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.SetVflip (flip); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetHcenterNativeDelegate (IntPtr inst, int center); + + static bool SetHcenter_cb (IntPtr inst, int center) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.SetHcenter (center); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetVcenterNativeDelegate (IntPtr inst, int center); + + static bool SetVcenter_cb (IntPtr inst, int center) + { + try { + IVideoOrientationImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOrientationImplementor; + bool __result; + __result = __obj.SetVcenter (center); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstVideoOrientationInterface native_iface = (GstVideoOrientationInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstVideoOrientationInterface)); + native_iface.GetHflip = iface.GetHflip; + native_iface.GetVflip = iface.GetVflip; + native_iface.GetHcenter = iface.GetHcenter; + native_iface.GetVcenter = iface.GetVcenter; + native_iface.SetHflip = iface.SetHflip; + native_iface.SetVflip = iface.SetVflip; + native_iface.SetHcenter = iface.SetHcenter; + native_iface.SetVcenter = iface.SetVcenter; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public VideoOrientationAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public VideoOrientationAdapter (IVideoOrientationImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public VideoOrientationAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_orientation_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_video_orientation_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IVideoOrientation GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IVideoOrientation GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IVideoOrientationImplementor) + return new VideoOrientationAdapter (obj as IVideoOrientationImplementor); + else if (obj as IVideoOrientation == null) + return new VideoOrientationAdapter (obj.Handle); + else + return obj as IVideoOrientation; + } + + public IVideoOrientationImplementor Implementor { + get { + return implementor as IVideoOrientationImplementor; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_get_hcenter(IntPtr raw, out int center); + + public bool GetHcenter(out int center) { + bool raw_ret = gst_video_orientation_get_hcenter(Handle, out center); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_get_hflip(IntPtr raw, out bool flip); + + public bool GetHflip(out bool flip) { + bool raw_ret = gst_video_orientation_get_hflip(Handle, out flip); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_get_vcenter(IntPtr raw, out int center); + + public bool GetVcenter(out int center) { + bool raw_ret = gst_video_orientation_get_vcenter(Handle, out center); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_get_vflip(IntPtr raw, out bool flip); + + public bool GetVflip(out bool flip) { + bool raw_ret = gst_video_orientation_get_vflip(Handle, out flip); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_set_hcenter(IntPtr raw, int center); + + public bool SetHcenter(int center) { + bool raw_ret = gst_video_orientation_set_hcenter(Handle, center); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_set_hflip(IntPtr raw, bool flip); + + public bool SetHflip(bool flip) { + bool raw_ret = gst_video_orientation_set_hflip(Handle, flip); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_set_vcenter(IntPtr raw, int center); + + public bool SetVcenter(int center) { + bool raw_ret = gst_video_orientation_set_vcenter(Handle, center); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_orientation_set_vflip(IntPtr raw, bool flip); + + public bool SetVflip(bool flip) { + bool raw_ret = gst_video_orientation_set_vflip(Handle, flip); + bool ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoOrientationMethod.cs b/sources/generated/Gst.Video/VideoOrientationMethod.cs new file mode 100644 index 0000000000..c1ab6d5374 --- /dev/null +++ b/sources/generated/Gst.Video/VideoOrientationMethod.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoOrientationMethodGType))] + public enum VideoOrientationMethod { + + Identity = 0, + _90r = 1, + _180 = 2, + _90l = 3, + Horiz = 4, + Vert = 5, + UlLr = 6, + UrLl = 7, + Auto = 8, + Custom = 9, + } + + internal class VideoOrientationMethodGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_orientation_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_orientation_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoOverlayAdapter.cs b/sources/generated/Gst.Video/VideoOverlayAdapter.cs new file mode 100644 index 0000000000..b1d3a8264a --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayAdapter.cs @@ -0,0 +1,231 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoOverlayAdapter : GLib.GInterfaceAdapter, Gst.Video.IVideoOverlay { + + [StructLayout (LayoutKind.Sequential)] + struct GstVideoOverlayInterface { + public ExposeNativeDelegate Expose; + public HandleEventsNativeDelegate HandleEvents; + public SetRenderRectangleNativeDelegate SetRenderRectangle; + public SetWindowHandleNativeDelegate SetWindowHandle; + } + + static GstVideoOverlayInterface iface; + + static VideoOverlayAdapter () + { + GLib.GType.Register (_gtype, typeof (VideoOverlayAdapter)); + iface.Expose = new ExposeNativeDelegate (Expose_cb); + iface.HandleEvents = new HandleEventsNativeDelegate (HandleEvents_cb); + iface.SetRenderRectangle = new SetRenderRectangleNativeDelegate (SetRenderRectangle_cb); + iface.SetWindowHandle = new SetWindowHandleNativeDelegate (SetWindowHandle_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ExposeNativeDelegate (IntPtr inst); + + static void Expose_cb (IntPtr inst) + { + try { + IVideoOverlayImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOverlayImplementor; + __obj.Expose (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void HandleEventsNativeDelegate (IntPtr inst, bool handle_events); + + static void HandleEvents_cb (IntPtr inst, bool handle_events) + { + try { + IVideoOverlayImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOverlayImplementor; + __obj.HandleEvents (handle_events); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetRenderRectangleNativeDelegate (IntPtr inst, int x, int y, int width, int height); + + static void SetRenderRectangle_cb (IntPtr inst, int x, int y, int width, int height) + { + try { + IVideoOverlayImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOverlayImplementor; + __obj.SetRenderRectangle (x, y, width, height); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetWindowHandleNativeDelegate (IntPtr inst, IntPtr handle); + + static void SetWindowHandle_cb (IntPtr inst, IntPtr handle) + { + try { + IVideoOverlayImplementor __obj = GLib.Object.GetObject (inst, false) as IVideoOverlayImplementor; + __obj.WindowHandle = handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstVideoOverlayInterface native_iface = (GstVideoOverlayInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstVideoOverlayInterface)); + native_iface.Expose = iface.Expose; + native_iface.HandleEvents = iface.HandleEvents; + native_iface.SetRenderRectangle = iface.SetRenderRectangle; + native_iface.SetWindowHandle = iface.SetWindowHandle; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public VideoOverlayAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public VideoOverlayAdapter (IVideoOverlayImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public VideoOverlayAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_video_overlay_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IVideoOverlay GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IVideoOverlay GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IVideoOverlayImplementor) + return new VideoOverlayAdapter (obj as IVideoOverlayImplementor); + else if (obj as IVideoOverlay == null) + return new VideoOverlayAdapter (obj.Handle); + else + return obj as IVideoOverlay; + } + + public IVideoOverlayImplementor Implementor { + get { + return implementor as IVideoOverlayImplementor; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_property(IntPtr _object, int last_prop_id, uint property_id, IntPtr value); + + public static bool SetProperty(GLib.Object _object, int last_prop_id, uint property_id, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = gst_video_overlay_set_property(_object == null ? IntPtr.Zero : _object.Handle, last_prop_id, property_id, native_value); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_expose(IntPtr raw); + + public void Expose() { + gst_video_overlay_expose(Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_got_window_handle(IntPtr raw, IntPtr handle); + + public void GotWindowHandle(IntPtr handle) { + gst_video_overlay_got_window_handle(Handle, handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_handle_events(IntPtr raw, bool handle_events); + + public void HandleEvents(bool handle_events) { + gst_video_overlay_handle_events(Handle, handle_events); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_prepare_window_handle(IntPtr raw); + + public void PrepareWindowHandle() { + gst_video_overlay_prepare_window_handle(Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_render_rectangle(IntPtr raw, int x, int y, int width, int height); + + public bool SetRenderRectangle(int x, int y, int width, int height) { + bool raw_ret = gst_video_overlay_set_render_rectangle(Handle, x, y, width, height); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_set_window_handle(IntPtr raw, IntPtr handle); + + public IntPtr WindowHandle { + set { + gst_video_overlay_set_window_handle(Handle, value); + } + } + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoOverlayComposition.cs b/sources/generated/Gst.Video/VideoOverlayComposition.cs new file mode 100644 index 0000000000..d6f6b9dfae --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayComposition.cs @@ -0,0 +1,117 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoOverlayComposition : Gst.MiniObject { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_overlay_composition_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_composition_add_rectangle(IntPtr raw, IntPtr rectangle); + + public void AddRectangle(Gst.Video.VideoOverlayRectangle rectangle) { + gst_video_overlay_composition_add_rectangle(Handle, rectangle == null ? IntPtr.Zero : rectangle.Handle); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_composition_blend(IntPtr raw, IntPtr video_buf); + + public bool Blend(Gst.Video.VideoFrame video_buf) { + IntPtr native_video_buf = GLib.Marshaller.StructureToPtrAlloc (video_buf); + bool raw_ret = gst_video_overlay_composition_blend(Handle, native_video_buf); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_video_buf); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_copy(IntPtr raw); + + public Gst.Video.VideoOverlayComposition Copy() { + IntPtr raw_ret = gst_video_overlay_composition_copy(Handle); + Gst.Video.VideoOverlayComposition ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayComposition) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayComposition), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_get_rectangle(IntPtr raw, uint n); + + public Gst.Video.VideoOverlayRectangle GetRectangle(uint n) { + IntPtr raw_ret = gst_video_overlay_composition_get_rectangle(Handle, n); + Gst.Video.VideoOverlayRectangle ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayRectangle) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayRectangle), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_overlay_composition_get_seqnum(IntPtr raw); + + public uint Seqnum { + get { + uint raw_ret = gst_video_overlay_composition_get_seqnum(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_make_writable(IntPtr raw); + + public Gst.Video.VideoOverlayComposition MakeWritable() { + IntPtr raw_ret = gst_video_overlay_composition_make_writable(Handle); + Gst.Video.VideoOverlayComposition ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayComposition) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayComposition), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_overlay_composition_n_rectangles(IntPtr raw); + + public uint NRectangles() { + uint raw_ret = gst_video_overlay_composition_n_rectangles(Handle); + uint ret = raw_ret; + return ret; + } + + public VideoOverlayComposition(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_new(IntPtr rectangle); + + public VideoOverlayComposition (Gst.Video.VideoOverlayRectangle rectangle) + { + Raw = gst_video_overlay_composition_new(rectangle == null ? IntPtr.Zero : rectangle.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoOverlayCompositionMeta.cs b/sources/generated/Gst.Video/VideoOverlayCompositionMeta.cs new file mode 100644 index 0000000000..87af214cb4 --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayCompositionMeta.cs @@ -0,0 +1,65 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoOverlayCompositionMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _overlay; + public Gst.Video.VideoOverlayComposition Overlay { + get { + return _overlay == IntPtr.Zero ? null : (Gst.Video.VideoOverlayComposition) GLib.Opaque.GetOpaque (_overlay, typeof (Gst.Video.VideoOverlayComposition), false); + } + set { + _overlay = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.Video.VideoOverlayCompositionMeta Zero = new Gst.Video.VideoOverlayCompositionMeta (); + + public static Gst.Video.VideoOverlayCompositionMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoOverlayCompositionMeta.Zero; + return (Gst.Video.VideoOverlayCompositionMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoOverlayCompositionMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_overlay_composition_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoOverlayCompositionMeta other) + { + return true && Meta.Equals (other.Meta) && Overlay.Equals (other.Overlay); + } + + public override bool Equals (object other) + { + return other is VideoOverlayCompositionMeta && Equals ((VideoOverlayCompositionMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Overlay.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoOverlayFormatFlags.cs b/sources/generated/Gst.Video/VideoOverlayFormatFlags.cs new file mode 100644 index 0000000000..740397fdb2 --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayFormatFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoOverlayFormatFlagsGType))] + public enum VideoOverlayFormatFlags : uint { + + None = 0, + PremultipliedAlpha = 1, + GlobalAlpha = 2, + } + + internal class VideoOverlayFormatFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_format_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_overlay_format_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoOverlayProperties.cs b/sources/generated/Gst.Video/VideoOverlayProperties.cs new file mode 100644 index 0000000000..ac2a0d8845 --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayProperties.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoOverlayProperties : GLib.Opaque { + + public VideoOverlayProperties(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoOverlayRectangle.cs b/sources/generated/Gst.Video/VideoOverlayRectangle.cs new file mode 100644 index 0000000000..9adefb733f --- /dev/null +++ b/sources/generated/Gst.Video/VideoOverlayRectangle.cs @@ -0,0 +1,170 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoOverlayRectangle : Gst.MiniObject { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_overlay_rectangle_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_copy(IntPtr raw); + + public Gst.Video.VideoOverlayRectangle Copy() { + IntPtr raw_ret = gst_video_overlay_rectangle_copy(Handle); + Gst.Video.VideoOverlayRectangle ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayRectangle) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayRectangle), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_overlay_rectangle_get_flags(IntPtr raw); + + public Gst.Video.VideoOverlayFormatFlags Flags { + get { + int raw_ret = gst_video_overlay_rectangle_get_flags(Handle); + Gst.Video.VideoOverlayFormatFlags ret = (Gst.Video.VideoOverlayFormatFlags) raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern float gst_video_overlay_rectangle_get_global_alpha(IntPtr raw); + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_rectangle_set_global_alpha(IntPtr raw, float global_alpha); + + public float GlobalAlpha { + get { + float raw_ret = gst_video_overlay_rectangle_get_global_alpha(Handle); + float ret = raw_ret; + return ret; + } + set { + gst_video_overlay_rectangle_set_global_alpha(Handle, value); + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_argb(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsArgb(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_argb(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_ayuv(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsAyuv(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_ayuv(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_raw(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsRaw(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_raw(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_unscaled_argb(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsUnscaledArgb(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_unscaled_argb(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_unscaled_ayuv(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsUnscaledAyuv(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_unscaled_ayuv(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_get_pixels_unscaled_raw(IntPtr raw, int flags); + + public Gst.Buffer GetPixelsUnscaledRaw(Gst.Video.VideoOverlayFormatFlags flags) { + IntPtr raw_ret = gst_video_overlay_rectangle_get_pixels_unscaled_raw(Handle, (int) flags); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_rectangle_get_render_rectangle(IntPtr raw, out int render_x, out int render_y, out uint render_width, out uint render_height); + + public bool GetRenderRectangle(out int render_x, out int render_y, out uint render_width, out uint render_height) { + bool raw_ret = gst_video_overlay_rectangle_get_render_rectangle(Handle, out render_x, out render_y, out render_width, out render_height); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_overlay_rectangle_get_seqnum(IntPtr raw); + + public uint Seqnum { + get { + uint raw_ret = gst_video_overlay_rectangle_get_seqnum(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_overlay_rectangle_set_render_rectangle(IntPtr raw, int render_x, int render_y, uint render_width, uint render_height); + + public void SetRenderRectangle(int render_x, int render_y, uint render_width, uint render_height) { + gst_video_overlay_rectangle_set_render_rectangle(Handle, render_x, render_y, render_width, render_height); + } + + public VideoOverlayRectangle(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_rectangle_new_raw(IntPtr pixels, int render_x, int render_y, uint render_width, uint render_height, int flags); + + public VideoOverlayRectangle (Gst.Buffer pixels, int render_x, int render_y, uint render_width, uint render_height, Gst.Video.VideoOverlayFormatFlags flags) + { + Raw = gst_video_overlay_rectangle_new_raw(pixels == null ? IntPtr.Zero : pixels.Handle, render_x, render_y, render_width, render_height, (int) flags); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoPackFlags.cs b/sources/generated/Gst.Video/VideoPackFlags.cs new file mode 100644 index 0000000000..aa38e582a4 --- /dev/null +++ b/sources/generated/Gst.Video/VideoPackFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoPackFlagsGType))] + public enum VideoPackFlags : uint { + + None = 0, + TruncateRange = 1, + Interlaced = 2, + } + + internal class VideoPackFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_pack_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_pack_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoPrimariesMode.cs b/sources/generated/Gst.Video/VideoPrimariesMode.cs new file mode 100644 index 0000000000..03d0ccd81b --- /dev/null +++ b/sources/generated/Gst.Video/VideoPrimariesMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoPrimariesModeGType))] + public enum VideoPrimariesMode { + + None = 0, + MergeOnly = 1, + Fast = 2, + } + + internal class VideoPrimariesModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_primaries_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_primaries_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoRectangle.cs b/sources/generated/Gst.Video/VideoRectangle.cs new file mode 100644 index 0000000000..4fcdcc5e1e --- /dev/null +++ b/sources/generated/Gst.Video/VideoRectangle.cs @@ -0,0 +1,48 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoRectangle : IEquatable { + + public int X; + public int Y; + public int W; + public int H; + + public static Gst.Video.VideoRectangle Zero = new Gst.Video.VideoRectangle (); + + public static Gst.Video.VideoRectangle New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoRectangle.Zero; + return (Gst.Video.VideoRectangle) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoRectangle)); + } + + public bool Equals (VideoRectangle other) + { + return true && X.Equals (other.X) && Y.Equals (other.Y) && W.Equals (other.W) && H.Equals (other.H); + } + + public override bool Equals (object other) + { + return other is VideoRectangle && Equals ((VideoRectangle) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode () ^ W.GetHashCode () ^ H.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoRegionOfInterestMeta.cs b/sources/generated/Gst.Video/VideoRegionOfInterestMeta.cs new file mode 100644 index 0000000000..f9fad12afd --- /dev/null +++ b/sources/generated/Gst.Video/VideoRegionOfInterestMeta.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoRegionOfInterestMeta : IEquatable { + + public Gst.Meta Meta; + public uint RoiType; + public int Id; + public int ParentId; + public uint X; + public uint Y; + public uint W; + public uint H; + private IntPtr _parms; + + public static Gst.Video.VideoRegionOfInterestMeta Zero = new Gst.Video.VideoRegionOfInterestMeta (); + + public static Gst.Video.VideoRegionOfInterestMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoRegionOfInterestMeta.Zero; + return (Gst.Video.VideoRegionOfInterestMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoRegionOfInterestMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_region_of_interest_meta_add_param(IntPtr raw, IntPtr s); + + public void AddParam(Gst.Structure s) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + s.Owned = false; + gst_video_region_of_interest_meta_add_param(this_as_native, s == null ? IntPtr.Zero : s.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_region_of_interest_meta_get_param(IntPtr raw, IntPtr name); + + public Gst.Structure GetParam(string name) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_video_region_of_interest_meta_get_param(this_as_native, native_name); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_region_of_interest_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_region_of_interest_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoRegionOfInterestMeta target) + { + target = New (native); + } + + public bool Equals (VideoRegionOfInterestMeta other) + { + return true && Meta.Equals (other.Meta) && RoiType.Equals (other.RoiType) && Id.Equals (other.Id) && ParentId.Equals (other.ParentId) && X.Equals (other.X) && Y.Equals (other.Y) && W.Equals (other.W) && H.Equals (other.H) && _parms.Equals (other._parms); + } + + public override bool Equals (object other) + { + return other is VideoRegionOfInterestMeta && Equals ((VideoRegionOfInterestMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ RoiType.GetHashCode () ^ Id.GetHashCode () ^ ParentId.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode () ^ W.GetHashCode () ^ H.GetHashCode () ^ _parms.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoResampler.cs b/sources/generated/Gst.Video/VideoResampler.cs new file mode 100644 index 0000000000..980dacafd0 --- /dev/null +++ b/sources/generated/Gst.Video/VideoResampler.cs @@ -0,0 +1,83 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoResampler : IEquatable { + + public int InSize; + public int OutSize; + public uint MaxTaps; + public uint NPhases; + public uint Offset; + private IntPtr _phase; + private IntPtr _n_taps; + private IntPtr _taps; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Video.VideoResampler Zero = new Gst.Video.VideoResampler (); + + public static Gst.Video.VideoResampler New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoResampler.Zero; + return (Gst.Video.VideoResampler) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoResampler)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_resampler_clear(IntPtr raw); + + public void Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_resampler_clear(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_resampler_init(IntPtr raw, int method, int flags, uint n_phases, uint n_taps, double shift, uint in_size, uint out_size, IntPtr options); + + public bool Init(Gst.Video.VideoResamplerMethod method, Gst.Video.VideoResamplerFlags flags, uint n_phases, uint n_taps, double shift, uint in_size, uint out_size, Gst.Structure options) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_resampler_init(this_as_native, (int) method, (int) flags, n_phases, n_taps, shift, in_size, out_size, options == null ? IntPtr.Zero : options.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoResampler target) + { + target = New (native); + } + + public bool Equals (VideoResampler other) + { + return true && InSize.Equals (other.InSize) && OutSize.Equals (other.OutSize) && MaxTaps.Equals (other.MaxTaps) && NPhases.Equals (other.NPhases) && Offset.Equals (other.Offset) && _phase.Equals (other._phase) && _n_taps.Equals (other._n_taps) && _taps.Equals (other._taps); + } + + public override bool Equals (object other) + { + return other is VideoResampler && Equals ((VideoResampler) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ InSize.GetHashCode () ^ OutSize.GetHashCode () ^ MaxTaps.GetHashCode () ^ NPhases.GetHashCode () ^ Offset.GetHashCode () ^ _phase.GetHashCode () ^ _n_taps.GetHashCode () ^ _taps.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoResamplerFlags.cs b/sources/generated/Gst.Video/VideoResamplerFlags.cs new file mode 100644 index 0000000000..47db45ed8b --- /dev/null +++ b/sources/generated/Gst.Video/VideoResamplerFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoResamplerFlagsGType))] + public enum VideoResamplerFlags : uint { + + None = 0, + HalfTaps = 1, + } + + internal class VideoResamplerFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_resampler_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_resampler_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoResamplerMethod.cs b/sources/generated/Gst.Video/VideoResamplerMethod.cs new file mode 100644 index 0000000000..c66f876e8c --- /dev/null +++ b/sources/generated/Gst.Video/VideoResamplerMethod.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoResamplerMethodGType))] + public enum VideoResamplerMethod { + + Nearest = 0, + Linear = 1, + Cubic = 2, + Sinc = 3, + Lanczos = 4, + } + + internal class VideoResamplerMethodGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_resampler_method_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_resampler_method_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoScaler.cs b/sources/generated/Gst.Video/VideoScaler.cs new file mode 100644 index 0000000000..16f6b24a9d --- /dev/null +++ b/sources/generated/Gst.Video/VideoScaler.cs @@ -0,0 +1,101 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoScaler : GLib.Opaque { + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_scaler_2d(IntPtr raw, IntPtr vscale, int format, IntPtr src, int src_stride, IntPtr dest, int dest_stride, uint x, uint y, uint width, uint height); + + public void TwoD(Gst.Video.VideoScaler vscale, Gst.Video.VideoFormat format, IntPtr src, int src_stride, IntPtr dest, int dest_stride, uint x, uint y, uint width, uint height) { + gst_video_scaler_2d(Handle, vscale == null ? IntPtr.Zero : vscale.Handle, (int) format, src, src_stride, dest, dest_stride, x, y, width, height); + } + + public void TwoD(Gst.Video.VideoScaler vscale, Gst.Video.VideoFormat format, int src_stride, int dest_stride, uint x, uint y, uint width, uint height) { + TwoD (vscale, format, IntPtr.Zero, src_stride, IntPtr.Zero, dest_stride, x, y, width, height); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_video_scaler_get_coeff(IntPtr raw, uint out_offset, uint in_offset, uint n_taps); + + public double GetCoeff(uint out_offset, uint in_offset, uint n_taps) { + double raw_ret = gst_video_scaler_get_coeff(Handle, out_offset, in_offset, n_taps); + double ret = raw_ret; + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_video_scaler_get_max_taps(IntPtr raw); + + public uint MaxTaps { + get { + uint raw_ret = gst_video_scaler_get_max_taps(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_scaler_horizontal(IntPtr raw, int format, IntPtr src, IntPtr dest, uint dest_offset, uint width); + + public void Horizontal(Gst.Video.VideoFormat format, IntPtr src, IntPtr dest, uint dest_offset, uint width) { + gst_video_scaler_horizontal(Handle, (int) format, src, dest, dest_offset, width); + } + + public void Horizontal(Gst.Video.VideoFormat format, uint dest_offset, uint width) { + Horizontal (format, IntPtr.Zero, IntPtr.Zero, dest_offset, width); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_scaler_vertical(IntPtr raw, int format, IntPtr src_lines, IntPtr dest, uint dest_offset, uint width); + + public void Vertical(Gst.Video.VideoFormat format, IntPtr src_lines, IntPtr dest, uint dest_offset, uint width) { + gst_video_scaler_vertical(Handle, (int) format, src_lines, dest, dest_offset, width); + } + + public void Vertical(Gst.Video.VideoFormat format, uint dest_offset, uint width) { + Vertical (format, IntPtr.Zero, IntPtr.Zero, dest_offset, width); + } + + public VideoScaler(IntPtr raw) : base(raw) {} + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_scaler_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_video_scaler_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_video_scaler_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoScalerFlags.cs b/sources/generated/Gst.Video/VideoScalerFlags.cs new file mode 100644 index 0000000000..4855181bc6 --- /dev/null +++ b/sources/generated/Gst.Video/VideoScalerFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoScalerFlagsGType))] + public enum VideoScalerFlags : uint { + + None = 0, + Interlaced = 1, + } + + internal class VideoScalerFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_scaler_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_scaler_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoSink.cs b/sources/generated/Gst.Video/VideoSink.cs new file mode 100644 index 0000000000..c09a5ee8ce --- /dev/null +++ b/sources/generated/Gst.Video/VideoSink.cs @@ -0,0 +1,237 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class VideoSink : Gst.Base.BaseSink { + + public VideoSink (IntPtr raw) : base(raw) {} + + protected VideoSink() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("show-preroll-frame")] + public bool ShowPrerollFrame { + get { + GLib.Value val = GetProperty ("show-preroll-frame"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("show-preroll-frame", val); + val.Dispose (); + } + } + + public int Width { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("width")); + return (*raw_ptr); + } + } + } + + public int Height { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("height")); + return (*raw_ptr); + } + } + } + + static ShowFrameNativeDelegate ShowFrame_cb_delegate; + static ShowFrameNativeDelegate ShowFrameVMCallback { + get { + if (ShowFrame_cb_delegate == null) + ShowFrame_cb_delegate = new ShowFrameNativeDelegate (ShowFrame_cb); + return ShowFrame_cb_delegate; + } + } + + static void OverrideShowFrame (GLib.GType gtype) + { + OverrideShowFrame (gtype, ShowFrameVMCallback); + } + + static void OverrideShowFrame (GLib.GType gtype, ShowFrameNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("show_frame")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ShowFrameNativeDelegate (IntPtr inst, IntPtr buf); + + static int ShowFrame_cb (IntPtr inst, IntPtr buf) + { + try { + VideoSink __obj = GLib.Object.GetObject (inst, false) as VideoSink; + Gst.FlowReturn __result; + __result = __obj.OnShowFrame (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Video.VideoSink), ConnectionMethod="OverrideShowFrame")] + protected virtual Gst.FlowReturn OnShowFrame (Gst.Buffer buf) + { + return InternalShowFrame (buf); + } + + private Gst.FlowReturn InternalShowFrame (Gst.Buffer buf) + { + ShowFrameNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("show_frame")); + unmanaged = (ShowFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ShowFrameNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); + return (Gst.FlowReturn) __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("show_frame" + , Gst.Base.BaseSink.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // show_frame + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "show_frame" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_sink_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_video_sink_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_sink_center_rect(IntPtr src, IntPtr dst, IntPtr _result, bool scaling); + + public static void CenterRect(Gst.Video.VideoRectangle src, Gst.Video.VideoRectangle dst, Gst.Video.VideoRectangle _result, bool scaling) { + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + IntPtr native_dst = GLib.Marshaller.StructureToPtrAlloc (dst); + IntPtr native__result = GLib.Marshaller.StructureToPtrAlloc (_result); + gst_video_sink_center_rect(native_src, native_dst, native__result, scaling); + Marshal.FreeHGlobal (native_src); + Marshal.FreeHGlobal (native_dst); + Marshal.FreeHGlobal (native__result); + } + + + static VideoSink () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("width" + , Gst.Base.BaseSink.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(int)) // width + , null + , "height" + , (long) Marshal.OffsetOf(typeof(GstVideoSink_widthAlign), "width") + , 0 + ), + new GLib.AbiField("height" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // height + , "width" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstVideoSink_heightAlign), "height") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "height" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoSink_widthAlign + { + sbyte f1; + private int width; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstVideoSink_heightAlign + { + sbyte f1; + private int height; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoTileMode.cs b/sources/generated/Gst.Video/VideoTileMode.cs new file mode 100644 index 0000000000..ffaa249e91 --- /dev/null +++ b/sources/generated/Gst.Video/VideoTileMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoTileModeGType))] + public enum VideoTileMode { + + Unknown = 0, + Zflipz2x2 = 65536, + Linear = 131072, + } + + internal class VideoTileModeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_tile_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_tile_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoTileType.cs b/sources/generated/Gst.Video/VideoTileType.cs new file mode 100644 index 0000000000..36db76b7f5 --- /dev/null +++ b/sources/generated/Gst.Video/VideoTileType.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoTileTypeGType))] + public enum VideoTileType { + + Indexed = 0, + } + + internal class VideoTileTypeGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_tile_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_tile_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoTimeCode.cs b/sources/generated/Gst.Video/VideoTimeCode.cs new file mode 100644 index 0000000000..6751bb08ae --- /dev/null +++ b/sources/generated/Gst.Video/VideoTimeCode.cs @@ -0,0 +1,291 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoTimeCode : IEquatable { + + public Gst.Video.VideoTimeCodeConfig Config; + public uint Hours; + public uint Minutes; + public uint Seconds; + public uint Frames; + public uint FieldCount; + + public static Gst.Video.VideoTimeCode Zero = new Gst.Video.VideoTimeCode (); + + public static Gst.Video.VideoTimeCode New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoTimeCode.Zero; + return (Gst.Video.VideoTimeCode) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoTimeCode)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_new(uint fps_n, uint fps_d, IntPtr latest_daily_jam, int flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + + public static VideoTimeCode New(uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) + { + VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new(fps_n, fps_d, latest_daily_jam == null ? IntPtr.Zero : latest_daily_jam.Handle, (int) flags, hours, minutes, seconds, frames, field_count)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_new_empty(); + + public static VideoTimeCode NewEmpty() + { + VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_empty()); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_new_from_date_time(uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count); + + public static VideoTimeCode NewFromDateTime(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) + { + VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_date_time(fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_new_from_date_time_full(uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count); + + public static VideoTimeCode NewFromDateTimeFull(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) + { + VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_date_time_full(fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_new_from_string(IntPtr tc_str); + + public static VideoTimeCode NewFromString(string tc_str) + { + IntPtr native_tc_str = GLib.Marshaller.StringToPtrGStrdup (tc_str); + VideoTimeCode result = VideoTimeCode.New (gst_video_time_code_new_from_string(native_tc_str)); + GLib.Marshaller.Free (native_tc_str); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_time_code_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_add_frames(IntPtr raw, long frames); + + public void AddFrames(long frames) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_add_frames(this_as_native, frames); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_add_interval(IntPtr raw, IntPtr tc_inter); + + public Gst.Video.VideoTimeCode AddInterval(Gst.Video.VideoTimeCodeInterval tc_inter) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_tc_inter = GLib.Marshaller.StructureToPtrAlloc (tc_inter); + IntPtr raw_ret = gst_video_time_code_add_interval(this_as_native, native_tc_inter); + Gst.Video.VideoTimeCode ret = Gst.Video.VideoTimeCode.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_tc_inter); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_clear(IntPtr raw); + + public void Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_clear(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_time_code_compare(IntPtr raw, IntPtr tc2); + + public int Compare(Gst.Video.VideoTimeCode tc2) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_tc2 = GLib.Marshaller.StructureToPtrAlloc (tc2); + int raw_ret = gst_video_time_code_compare(this_as_native, native_tc2); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_tc2); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_video_time_code_frames_since_daily_jam(IntPtr raw); + + public ulong FramesSinceDailyJam() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_video_time_code_frames_since_daily_jam(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_increment_frame(IntPtr raw); + + public void IncrementFrame() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_increment_frame(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_init(IntPtr raw, uint fps_n, uint fps_d, IntPtr latest_daily_jam, int flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + + public void Init(uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_init(this_as_native, fps_n, fps_d, latest_daily_jam == null ? IntPtr.Zero : latest_daily_jam.Handle, (int) flags, hours, minutes, seconds, frames, field_count); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + public void Init(uint fps_n, uint fps_d, Gst.Video.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count) { + Init (fps_n, fps_d, null, flags, hours, minutes, seconds, frames, field_count); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_init_from_date_time(IntPtr raw, uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count); + + public void InitFromDateTime(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_init_from_date_time(this_as_native, fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_time_code_init_from_date_time_full(IntPtr raw, uint fps_n, uint fps_d, IntPtr dt, int flags, uint field_count); + + public bool InitFromDateTimeFull(uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.VideoTimeCodeFlags flags, uint field_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_time_code_init_from_date_time_full(this_as_native, fps_n, fps_d, dt == null ? IntPtr.Zero : dt.Handle, (int) flags, field_count); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_time_code_is_valid(IntPtr raw); + + public bool IsValid { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_time_code_is_valid(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_video_time_code_nsec_since_daily_jam(IntPtr raw); + + public ulong NsecSinceDailyJam() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_video_time_code_nsec_since_daily_jam(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_to_date_time(IntPtr raw); + + public GLib.DateTime ToDateTime() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_time_code_to_date_time(this_as_native); + GLib.DateTime ret = new GLib.DateTime(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_video_time_code_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoTimeCode target) + { + target = New (native); + } + + public bool Equals (VideoTimeCode other) + { + return true && Config.Equals (other.Config) && Hours.Equals (other.Hours) && Minutes.Equals (other.Minutes) && Seconds.Equals (other.Seconds) && Frames.Equals (other.Frames) && FieldCount.Equals (other.FieldCount); + } + + public override bool Equals (object other) + { + return other is VideoTimeCode && Equals ((VideoTimeCode) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Config.GetHashCode () ^ Hours.GetHashCode () ^ Minutes.GetHashCode () ^ Seconds.GetHashCode () ^ Frames.GetHashCode () ^ FieldCount.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoTimeCode boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoTimeCode.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoTimeCode (GLib.Value val) + { + return (Gst.Video.VideoTimeCode) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoTimeCodeConfig.cs b/sources/generated/Gst.Video/VideoTimeCodeConfig.cs new file mode 100644 index 0000000000..8380df4b6a --- /dev/null +++ b/sources/generated/Gst.Video/VideoTimeCodeConfig.cs @@ -0,0 +1,48 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoTimeCodeConfig : IEquatable { + + public uint FpsN; + public uint FpsD; + public Gst.Video.VideoTimeCodeFlags Flags; + private IntPtr _latest_daily_jam; + + public static Gst.Video.VideoTimeCodeConfig Zero = new Gst.Video.VideoTimeCodeConfig (); + + public static Gst.Video.VideoTimeCodeConfig New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoTimeCodeConfig.Zero; + return (Gst.Video.VideoTimeCodeConfig) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoTimeCodeConfig)); + } + + public bool Equals (VideoTimeCodeConfig other) + { + return true && FpsN.Equals (other.FpsN) && FpsD.Equals (other.FpsD) && Flags.Equals (other.Flags) && _latest_daily_jam.Equals (other._latest_daily_jam); + } + + public override bool Equals (object other) + { + return other is VideoTimeCodeConfig && Equals ((VideoTimeCodeConfig) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ FpsN.GetHashCode () ^ FpsD.GetHashCode () ^ Flags.GetHashCode () ^ _latest_daily_jam.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoTimeCodeFlags.cs b/sources/generated/Gst.Video/VideoTimeCodeFlags.cs new file mode 100644 index 0000000000..7409b6a036 --- /dev/null +++ b/sources/generated/Gst.Video/VideoTimeCodeFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.Video.VideoTimeCodeFlagsGType))] + public enum VideoTimeCodeFlags : uint { + + None = 0, + DropFrame = 1, + Interlaced = 2, + } + + internal class VideoTimeCodeFlagsGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_time_code_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoTimeCodeInterval.cs b/sources/generated/Gst.Video/VideoTimeCodeInterval.cs new file mode 100644 index 0000000000..8a4d9b0f07 --- /dev/null +++ b/sources/generated/Gst.Video/VideoTimeCodeInterval.cs @@ -0,0 +1,115 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoTimeCodeInterval : IEquatable { + + public uint Hours; + public uint Minutes; + public uint Seconds; + public uint Frames; + + public static Gst.Video.VideoTimeCodeInterval Zero = new Gst.Video.VideoTimeCodeInterval (); + + public static Gst.Video.VideoTimeCodeInterval New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoTimeCodeInterval.Zero; + return (Gst.Video.VideoTimeCodeInterval) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoTimeCodeInterval)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_interval_new(uint hours, uint minutes, uint seconds, uint frames); + + public static VideoTimeCodeInterval New(uint hours, uint minutes, uint seconds, uint frames) + { + VideoTimeCodeInterval result = VideoTimeCodeInterval.New (gst_video_time_code_interval_new(hours, minutes, seconds, frames)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_interval_new_from_string(IntPtr tc_inter_str); + + public static VideoTimeCodeInterval NewFromString(string tc_inter_str) + { + IntPtr native_tc_inter_str = GLib.Marshaller.StringToPtrGStrdup (tc_inter_str); + VideoTimeCodeInterval result = VideoTimeCodeInterval.New (gst_video_time_code_interval_new_from_string(native_tc_inter_str)); + GLib.Marshaller.Free (native_tc_inter_str); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_interval_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_time_code_interval_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_interval_clear(IntPtr raw); + + public void Clear() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_interval_clear(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_time_code_interval_init(IntPtr raw, uint hours, uint minutes, uint seconds, uint frames); + + public void Init(uint hours, uint minutes, uint seconds, uint frames) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_time_code_interval_init(this_as_native, hours, minutes, seconds, frames); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoTimeCodeInterval target) + { + target = New (native); + } + + public bool Equals (VideoTimeCodeInterval other) + { + return true && Hours.Equals (other.Hours) && Minutes.Equals (other.Minutes) && Seconds.Equals (other.Seconds) && Frames.Equals (other.Frames); + } + + public override bool Equals (object other) + { + return other is VideoTimeCodeInterval && Equals ((VideoTimeCodeInterval) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Hours.GetHashCode () ^ Minutes.GetHashCode () ^ Seconds.GetHashCode () ^ Frames.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoTimeCodeInterval boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoTimeCodeInterval.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoTimeCodeInterval (GLib.Value val) + { + return (Gst.Video.VideoTimeCodeInterval) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoTimeCodeMeta.cs b/sources/generated/Gst.Video/VideoTimeCodeMeta.cs new file mode 100644 index 0000000000..298046e4ac --- /dev/null +++ b/sources/generated/Gst.Video/VideoTimeCodeMeta.cs @@ -0,0 +1,57 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoTimeCodeMeta : IEquatable { + + public Gst.Meta Meta; + public Gst.Video.VideoTimeCode Tc; + + public static Gst.Video.VideoTimeCodeMeta Zero = new Gst.Video.VideoTimeCodeMeta (); + + public static Gst.Video.VideoTimeCodeMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoTimeCodeMeta.Zero; + return (Gst.Video.VideoTimeCodeMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoTimeCodeMeta)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_time_code_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_video_time_code_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (VideoTimeCodeMeta other) + { + return true && Meta.Equals (other.Meta) && Tc.Equals (other.Tc); + } + + public override bool Equals (object other) + { + return other is VideoTimeCodeMeta && Equals ((VideoTimeCodeMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Tc.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoTransferFunction.cs b/sources/generated/Gst.Video/VideoTransferFunction.cs new file mode 100644 index 0000000000..9666327ad5 --- /dev/null +++ b/sources/generated/Gst.Video/VideoTransferFunction.cs @@ -0,0 +1,43 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoTransferFunctionGType))] + public enum VideoTransferFunction { + + Unknown = 0, + Gamma10 = 1, + Gamma18 = 2, + Gamma20 = 3, + Gamma22 = 4, + Bt709 = 5, + Smpte240m = 6, + Srgb = 7, + Gamma28 = 8, + Log100 = 9, + Log316 = 10, + Bt202012 = 11, + Adobergb = 12, + Bt202010 = 13, + Smpte2084 = 14, + AribStdB67 = 15, + Bt601 = 16, + } + + internal class VideoTransferFunctionGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_transfer_function_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_transfer_function_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.Video/VideoVBIEncoder.cs b/sources/generated/Gst.Video/VideoVBIEncoder.cs new file mode 100644 index 0000000000..8387f6cf9f --- /dev/null +++ b/sources/generated/Gst.Video/VideoVBIEncoder.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoVBIEncoder : IEquatable { + + + public static Gst.Video.VideoVBIEncoder Zero = new Gst.Video.VideoVBIEncoder (); + + public static Gst.Video.VideoVBIEncoder New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoVBIEncoder.Zero; + return (Gst.Video.VideoVBIEncoder) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoVBIEncoder)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_vbi_encoder_new(int format, uint pixel_width); + + public static VideoVBIEncoder New(Gst.Video.VideoFormat format, uint pixel_width) + { + VideoVBIEncoder result = VideoVBIEncoder.New (gst_video_vbi_encoder_new((int) format, pixel_width)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_vbi_encoder_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_vbi_encoder_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_vbi_encoder_add_ancillary(IntPtr raw, bool composite, byte DID, byte SDID_block_number, byte[] data, uint data_count); + + public bool AddAncillary(bool composite, byte DID, byte SDID_block_number, byte[] data, uint data_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_video_vbi_encoder_add_ancillary(this_as_native, composite, DID, SDID_block_number, data, data_count); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_vbi_encoder_write_line(IntPtr raw, byte data); + + public void WriteLine(byte data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_vbi_encoder_write_line(this_as_native, data); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoVBIEncoder target) + { + target = New (native); + } + + public bool Equals (VideoVBIEncoder other) + { + return true; + } + + public override bool Equals (object other) + { + return other is VideoVBIEncoder && Equals ((VideoVBIEncoder) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoVBIEncoder boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoVBIEncoder.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoVBIEncoder (GLib.Value val) + { + return (Gst.Video.VideoVBIEncoder) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoVBIParser.cs b/sources/generated/Gst.Video/VideoVBIParser.cs new file mode 100644 index 0000000000..da94d7776b --- /dev/null +++ b/sources/generated/Gst.Video/VideoVBIParser.cs @@ -0,0 +1,105 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct VideoVBIParser : IEquatable { + + + public static Gst.Video.VideoVBIParser Zero = new Gst.Video.VideoVBIParser (); + + public static Gst.Video.VideoVBIParser New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Video.VideoVBIParser.Zero; + return (Gst.Video.VideoVBIParser) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoVBIParser)); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_vbi_parser_new(int format, uint pixel_width); + + public static VideoVBIParser New(Gst.Video.VideoFormat format, uint pixel_width) + { + VideoVBIParser result = VideoVBIParser.New (gst_video_vbi_parser_new((int) format, pixel_width)); + return result; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_vbi_parser_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_video_vbi_parser_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_vbi_parser_add_line(IntPtr raw, byte[] data); + + public void AddLine(byte[] data) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_video_vbi_parser_add_line(this_as_native, data); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_video_vbi_parser_get_ancillary(IntPtr raw, IntPtr anc); + + public Gst.Video.VideoVBIParserResult GetAncillary(out Gst.Video.VideoAncillary anc) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_anc = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Video.VideoAncillary))); + int raw_ret = gst_video_vbi_parser_get_ancillary(this_as_native, native_anc); + Gst.Video.VideoVBIParserResult ret = (Gst.Video.VideoVBIParserResult) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + anc = Gst.Video.VideoAncillary.New (native_anc); + Marshal.FreeHGlobal (native_anc); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Video.VideoVBIParser target) + { + target = New (native); + } + + public bool Equals (VideoVBIParser other) + { + return true; + } + + public override bool Equals (object other) + { + return other is VideoVBIParser && Equals ((VideoVBIParser) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Video.VideoVBIParser boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Video.VideoVBIParser.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Video.VideoVBIParser (GLib.Value val) + { + return (Gst.Video.VideoVBIParser) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.Video/VideoVBIParserResult.cs b/sources/generated/Gst.Video/VideoVBIParserResult.cs new file mode 100644 index 0000000000..51ab28ef90 --- /dev/null +++ b/sources/generated/Gst.Video/VideoVBIParserResult.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Video { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.Video.VideoVBIParserResultGType))] + public enum VideoVBIParserResult { + + Done = 0, + Ok = 1, + Error = 2, + } + + internal class VideoVBIParserResultGType { + [DllImport ("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_vbi_parser_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_video_vbi_parser_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/Constants.cs b/sources/generated/Gst.WebRTC/Constants.cs new file mode 100644 index 0000000000..640f6820c2 --- /dev/null +++ b/sources/generated/Gst.WebRTC/Constants.cs @@ -0,0 +1,16 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/Global.cs b/sources/generated/Gst.WebRTC/Global.cs new file mode 100644 index 0000000000..4a5e2a9d99 --- /dev/null +++ b/sources/generated/Gst.WebRTC/Global.cs @@ -0,0 +1,25 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_sdp_type_to_string(int type); + + public static string WebrtcSdpTypeToString(Gst.WebRTC.WebRTCSDPType type) { + IntPtr raw_ret = gst_webrtc_sdp_type_to_string((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/OnErrorEventHandler.cs b/sources/generated/Gst.WebRTC/OnErrorEventHandler.cs new file mode 100644 index 0000000000..908402d18d --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnErrorEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnErrorEventHandler(object o, OnErrorEventArgs args); + + public class OnErrorEventArgs : GLib.SignalArgs { + public IntPtr Error{ + get { + return (IntPtr) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnErrorHandler.cs b/sources/generated/Gst.WebRTC/OnErrorHandler.cs new file mode 100644 index 0000000000..fc4ff87c08 --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnErrorHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnErrorHandler(object o, OnErrorArgs args); + + public class OnErrorArgs : GLib.SignalArgs { + public IntPtr Error{ + get { + return (IntPtr) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnMessageDataEventHandler.cs b/sources/generated/Gst.WebRTC/OnMessageDataEventHandler.cs new file mode 100644 index 0000000000..9a76d7dde8 --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnMessageDataEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnMessageDataEventHandler(object o, OnMessageDataEventArgs args); + + public class OnMessageDataEventArgs : GLib.SignalArgs { + public GLib.Bytes Data{ + get { + return (GLib.Bytes) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnMessageDataHandler.cs b/sources/generated/Gst.WebRTC/OnMessageDataHandler.cs new file mode 100644 index 0000000000..2ff360ae64 --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnMessageDataHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnMessageDataHandler(object o, OnMessageDataArgs args); + + public class OnMessageDataArgs : GLib.SignalArgs { + public GLib.Bytes Data{ + get { + return (GLib.Bytes) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnMessageStringEventHandler.cs b/sources/generated/Gst.WebRTC/OnMessageStringEventHandler.cs new file mode 100644 index 0000000000..6f950c1dec --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnMessageStringEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnMessageStringEventHandler(object o, OnMessageStringEventArgs args); + + public class OnMessageStringEventArgs : GLib.SignalArgs { + public string Data{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnMessageStringHandler.cs b/sources/generated/Gst.WebRTC/OnMessageStringHandler.cs new file mode 100644 index 0000000000..64273e48dc --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnMessageStringHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnMessageStringHandler(object o, OnMessageStringArgs args); + + public class OnMessageStringArgs : GLib.SignalArgs { + public string Data{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/OnNewCandidateHandler.cs b/sources/generated/Gst.WebRTC/OnNewCandidateHandler.cs new file mode 100644 index 0000000000..42d9524004 --- /dev/null +++ b/sources/generated/Gst.WebRTC/OnNewCandidateHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void OnNewCandidateHandler(object o, OnNewCandidateArgs args); + + public class OnNewCandidateArgs : GLib.SignalArgs { + public string Object{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/SendDataEventHandler.cs b/sources/generated/Gst.WebRTC/SendDataEventHandler.cs new file mode 100644 index 0000000000..ee4af2b104 --- /dev/null +++ b/sources/generated/Gst.WebRTC/SendDataEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void SendDataEventHandler(object o, SendDataEventArgs args); + + public class SendDataEventArgs : GLib.SignalArgs { + public GLib.Bytes Data{ + get { + return (GLib.Bytes) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/SendStringEventHandler.cs b/sources/generated/Gst.WebRTC/SendStringEventHandler.cs new file mode 100644 index 0000000000..0513169775 --- /dev/null +++ b/sources/generated/Gst.WebRTC/SendStringEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + + public delegate void SendStringEventHandler(object o, SendStringEventArgs args); + + public class SendStringEventArgs : GLib.SignalArgs { + public string Data{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCBundlePolicy.cs b/sources/generated/Gst.WebRTC/WebRTCBundlePolicy.cs new file mode 100644 index 0000000000..66338d4915 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCBundlePolicy.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCBundlePolicyGType))] + public enum WebRTCBundlePolicy { + + None = 0, + Balanced = 1, + MaxCompat = 2, + MaxBundle = 3, + } + + internal class WebRTCBundlePolicyGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_bundle_policy_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_bundle_policy_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCDTLSSetup.cs b/sources/generated/Gst.WebRTC/WebRTCDTLSSetup.cs new file mode 100644 index 0000000000..27f264f644 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCDTLSSetup.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCDTLSSetupGType))] + public enum WebRTCDTLSSetup { + + None = 0, + Actpass = 1, + Active = 2, + Passive = 3, + } + + internal class WebRTCDTLSSetupGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_dtls_setup_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_dtls_setup_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCDTLSTransport.cs b/sources/generated/Gst.WebRTC/WebRTCDTLSTransport.cs new file mode 100644 index 0000000000..011be3ea85 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCDTLSTransport.cs @@ -0,0 +1,139 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCDTLSTransport : Gst.Object { + + public WebRTCDTLSTransport (IntPtr raw) : base(raw) {} + + protected WebRTCDTLSTransport() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("certificate")] + public string Certificate { + get { + GLib.Value val = GetProperty ("certificate"); + string ret = (string) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("certificate", val); + val.Dispose (); + } + } + + [GLib.Property ("client")] + public bool Client { + get { + GLib.Value val = GetProperty ("client"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("client", val); + val.Dispose (); + } + } + + [GLib.Property ("remote-certificate")] + public string RemoteCertificate { + get { + GLib.Value val = GetProperty ("remote-certificate"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("session-id")] + public uint SessionId { + get { + GLib.Value val = GetProperty ("session-id"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("state")] + public Gst.WebRTC.WebRTCDTLSTransportState State { + get { + GLib.Value val = GetProperty ("state"); + Gst.WebRTC.WebRTCDTLSTransportState ret = (Gst.WebRTC.WebRTCDTLSTransportState) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("transport")] + public Gst.WebRTC.WebRTCICETransport Transport { + get { + GLib.Value val = GetProperty ("transport"); + Gst.WebRTC.WebRTCICETransport ret = (Gst.WebRTC.WebRTCICETransport) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_dtls_transport_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_dtls_transport_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static WebRTCDTLSTransport () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCDTLSTransportState.cs b/sources/generated/Gst.WebRTC/WebRTCDTLSTransportState.cs new file mode 100644 index 0000000000..580b5c70bb --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCDTLSTransportState.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCDTLSTransportStateGType))] + public enum WebRTCDTLSTransportState { + + New = 0, + Closed = 1, + Failed = 2, + Connecting = 3, + Connected = 4, + } + + internal class WebRTCDTLSTransportStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_dtls_transport_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_dtls_transport_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCDataChannel.cs b/sources/generated/Gst.WebRTC/WebRTCDataChannel.cs new file mode 100644 index 0000000000..d225ae743c --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCDataChannel.cs @@ -0,0 +1,697 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCDataChannel : GLib.Object { + + protected WebRTCDataChannel (IntPtr raw) : base(raw) {} + + protected WebRTCDataChannel() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("buffered-amount")] + public ulong BufferedAmount { + get { + GLib.Value val = GetProperty ("buffered-amount"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("buffered-amount-low-threshold")] + public ulong BufferedAmountLowThreshold { + get { + GLib.Value val = GetProperty ("buffered-amount-low-threshold"); + ulong ret = (ulong) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("buffered-amount-low-threshold", val); + val.Dispose (); + } + } + + [GLib.Property ("id")] + public int Id { + get { + GLib.Value val = GetProperty ("id"); + int ret = (int) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("label")] + public string Label { + get { + GLib.Value val = GetProperty ("label"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("max-packet-lifetime")] + public int MaxPacketLifetime { + get { + GLib.Value val = GetProperty ("max-packet-lifetime"); + int ret = (int) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("max-retransmits")] + public int MaxRetransmits { + get { + GLib.Value val = GetProperty ("max-retransmits"); + int ret = (int) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("negotiated")] + public bool Negotiated { + get { + GLib.Value val = GetProperty ("negotiated"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("ordered")] + public bool Ordered { + get { + GLib.Value val = GetProperty ("ordered"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("priority")] + public Gst.WebRTC.WebRTCPriorityType Priority { + get { + GLib.Value val = GetProperty ("priority"); + Gst.WebRTC.WebRTCPriorityType ret = (Gst.WebRTC.WebRTCPriorityType) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("protocol")] + public string Protocol { + get { + GLib.Value val = GetProperty ("protocol"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("ready-state")] + public Gst.WebRTC.WebRTCDataChannelState ReadyState { + get { + GLib.Value val = GetProperty ("ready-state"); + Gst.WebRTC.WebRTCDataChannelState ret = (Gst.WebRTC.WebRTCDataChannelState) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Signal("on-error")] + public event Gst.WebRTC.OnErrorHandler OnError { + add { + this.AddSignalHandler ("on-error", value, typeof (Gst.WebRTC.OnErrorArgs)); + } + remove { + this.RemoveSignalHandler ("on-error", value); + } + } + + [GLib.Signal("send-string")] + public event Gst.WebRTC.SendStringEventHandler SendStringEvent { + add { + this.AddSignalHandler ("send-string", value, typeof (Gst.WebRTC.SendStringEventArgs)); + } + remove { + this.RemoveSignalHandler ("send-string", value); + } + } + + [GLib.Signal("send-data")] + public event Gst.WebRTC.SendDataEventHandler SendDataEvent { + add { + this.AddSignalHandler ("send-data", value, typeof (Gst.WebRTC.SendDataEventArgs)); + } + remove { + this.RemoveSignalHandler ("send-data", value); + } + } + + [GLib.Signal("close")] + public event System.EventHandler CloseEvent { + add { + this.AddSignalHandler ("close", value); + } + remove { + this.RemoveSignalHandler ("close", value); + } + } + + [GLib.Signal("on-message-data")] + public event Gst.WebRTC.OnMessageDataHandler OnMessageData { + add { + this.AddSignalHandler ("on-message-data", value, typeof (Gst.WebRTC.OnMessageDataArgs)); + } + remove { + this.RemoveSignalHandler ("on-message-data", value); + } + } + + [GLib.Signal("on-buffered-amount-low")] + public event System.EventHandler OnBufferedAmountLow { + add { + this.AddSignalHandler ("on-buffered-amount-low", value); + } + remove { + this.RemoveSignalHandler ("on-buffered-amount-low", value); + } + } + + [GLib.Signal("on-open")] + public event System.EventHandler OnOpen { + add { + this.AddSignalHandler ("on-open", value); + } + remove { + this.RemoveSignalHandler ("on-open", value); + } + } + + [GLib.Signal("on-message-string")] + public event Gst.WebRTC.OnMessageStringHandler OnMessageString { + add { + this.AddSignalHandler ("on-message-string", value, typeof (Gst.WebRTC.OnMessageStringArgs)); + } + remove { + this.RemoveSignalHandler ("on-message-string", value); + } + } + + static CloseEventNativeDelegate CloseEvent_cb_delegate; + static CloseEventNativeDelegate CloseEventVMCallback { + get { + if (CloseEvent_cb_delegate == null) + CloseEvent_cb_delegate = new CloseEventNativeDelegate (CloseEvent_cb); + return CloseEvent_cb_delegate; + } + } + + static void OverrideCloseEvent (GLib.GType gtype) + { + OverrideCloseEvent (gtype, CloseEventVMCallback); + } + + static void OverrideCloseEvent (GLib.GType gtype, CloseEventNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "close", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CloseEventNativeDelegate (IntPtr inst); + + static void CloseEvent_cb (IntPtr inst) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnCloseEvent (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideCloseEvent")] + protected virtual void OnCloseEvent () + { + InternalCloseEvent (); + } + + private void InternalCloseEvent () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnBufferedAmountLowNativeDelegate OnBufferedAmountLow_cb_delegate; + static OnBufferedAmountLowNativeDelegate OnBufferedAmountLowVMCallback { + get { + if (OnBufferedAmountLow_cb_delegate == null) + OnBufferedAmountLow_cb_delegate = new OnBufferedAmountLowNativeDelegate (OnBufferedAmountLow_cb); + return OnBufferedAmountLow_cb_delegate; + } + } + + static void OverrideOnBufferedAmountLow (GLib.GType gtype) + { + OverrideOnBufferedAmountLow (gtype, OnBufferedAmountLowVMCallback); + } + + static void OverrideOnBufferedAmountLow (GLib.GType gtype, OnBufferedAmountLowNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-buffered-amount-low", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnBufferedAmountLowNativeDelegate (IntPtr inst); + + static void OnBufferedAmountLow_cb (IntPtr inst) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnOnBufferedAmountLow (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideOnBufferedAmountLow")] + protected virtual void OnOnBufferedAmountLow () + { + InternalOnBufferedAmountLow (); + } + + private void InternalOnBufferedAmountLow () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnErrorNativeDelegate OnError_cb_delegate; + static OnErrorNativeDelegate OnErrorVMCallback { + get { + if (OnError_cb_delegate == null) + OnError_cb_delegate = new OnErrorNativeDelegate (OnError_cb); + return OnError_cb_delegate; + } + } + + static void OverrideOnError (GLib.GType gtype) + { + OverrideOnError (gtype, OnErrorVMCallback); + } + + static void OverrideOnError (GLib.GType gtype, OnErrorNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-error", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnErrorNativeDelegate (IntPtr inst, IntPtr error); + + static void OnError_cb (IntPtr inst, IntPtr error) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnOnError (error); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideOnError")] + protected virtual void OnOnError (IntPtr error) + { + InternalOnError (error); + } + + private void InternalOnError (IntPtr error) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (error); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnMessageDataNativeDelegate OnMessageData_cb_delegate; + static OnMessageDataNativeDelegate OnMessageDataVMCallback { + get { + if (OnMessageData_cb_delegate == null) + OnMessageData_cb_delegate = new OnMessageDataNativeDelegate (OnMessageData_cb); + return OnMessageData_cb_delegate; + } + } + + static void OverrideOnMessageData (GLib.GType gtype) + { + OverrideOnMessageData (gtype, OnMessageDataVMCallback); + } + + static void OverrideOnMessageData (GLib.GType gtype, OnMessageDataNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-message-data", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnMessageDataNativeDelegate (IntPtr inst, IntPtr data); + + static void OnMessageData_cb (IntPtr inst, IntPtr data) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnOnMessageData (new GLib.Bytes(data)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideOnMessageData")] + protected virtual void OnOnMessageData (GLib.Bytes data) + { + InternalOnMessageData (data); + } + + private void InternalOnMessageData (GLib.Bytes data) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (data); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnMessageStringNativeDelegate OnMessageString_cb_delegate; + static OnMessageStringNativeDelegate OnMessageStringVMCallback { + get { + if (OnMessageString_cb_delegate == null) + OnMessageString_cb_delegate = new OnMessageStringNativeDelegate (OnMessageString_cb); + return OnMessageString_cb_delegate; + } + } + + static void OverrideOnMessageString (GLib.GType gtype) + { + OverrideOnMessageString (gtype, OnMessageStringVMCallback); + } + + static void OverrideOnMessageString (GLib.GType gtype, OnMessageStringNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-message-string", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnMessageStringNativeDelegate (IntPtr inst, IntPtr data); + + static void OnMessageString_cb (IntPtr inst, IntPtr data) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnOnMessageString (GLib.Marshaller.Utf8PtrToString (data)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideOnMessageString")] + protected virtual void OnOnMessageString (string data) + { + InternalOnMessageString (data); + } + + private void InternalOnMessageString (string data) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (data); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnOpenNativeDelegate OnOpen_cb_delegate; + static OnOpenNativeDelegate OnOpenVMCallback { + get { + if (OnOpen_cb_delegate == null) + OnOpen_cb_delegate = new OnOpenNativeDelegate (OnOpen_cb); + return OnOpen_cb_delegate; + } + } + + static void OverrideOnOpen (GLib.GType gtype) + { + OverrideOnOpen (gtype, OnOpenVMCallback); + } + + static void OverrideOnOpen (GLib.GType gtype, OnOpenNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-open", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnOpenNativeDelegate (IntPtr inst); + + static void OnOpen_cb (IntPtr inst) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnOnOpen (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideOnOpen")] + protected virtual void OnOnOpen () + { + InternalOnOpen (); + } + + private void InternalOnOpen () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static SendDataEventNativeDelegate SendDataEvent_cb_delegate; + static SendDataEventNativeDelegate SendDataEventVMCallback { + get { + if (SendDataEvent_cb_delegate == null) + SendDataEvent_cb_delegate = new SendDataEventNativeDelegate (SendDataEvent_cb); + return SendDataEvent_cb_delegate; + } + } + + static void OverrideSendDataEvent (GLib.GType gtype) + { + OverrideSendDataEvent (gtype, SendDataEventVMCallback); + } + + static void OverrideSendDataEvent (GLib.GType gtype, SendDataEventNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "send-data", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SendDataEventNativeDelegate (IntPtr inst, IntPtr data); + + static void SendDataEvent_cb (IntPtr inst, IntPtr data) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnSendDataEvent (new GLib.Bytes(data)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideSendDataEvent")] + protected virtual void OnSendDataEvent (GLib.Bytes data) + { + InternalSendDataEvent (data); + } + + private void InternalSendDataEvent (GLib.Bytes data) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (data); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static SendStringEventNativeDelegate SendStringEvent_cb_delegate; + static SendStringEventNativeDelegate SendStringEventVMCallback { + get { + if (SendStringEvent_cb_delegate == null) + SendStringEvent_cb_delegate = new SendStringEventNativeDelegate (SendStringEvent_cb); + return SendStringEvent_cb_delegate; + } + } + + static void OverrideSendStringEvent (GLib.GType gtype) + { + OverrideSendStringEvent (gtype, SendStringEventVMCallback); + } + + static void OverrideSendStringEvent (GLib.GType gtype, SendStringEventNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "send-string", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SendStringEventNativeDelegate (IntPtr inst, IntPtr data); + + static void SendStringEvent_cb (IntPtr inst, IntPtr data) + { + try { + WebRTCDataChannel __obj = GLib.Object.GetObject (inst, false) as WebRTCDataChannel; + __obj.OnSendStringEvent (GLib.Marshaller.Utf8PtrToString (data)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCDataChannel), ConnectionMethod="OverrideSendStringEvent")] + protected virtual void OnSendStringEvent (string data) + { + InternalSendStringEvent (data); + } + + private void InternalSendStringEvent (string data) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (data); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_data_channel_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_data_channel_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_webrtc_data_channel_close(IntPtr raw); + + public void Close() { + gst_webrtc_data_channel_close(Handle); + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_webrtc_data_channel_send_data(IntPtr raw, IntPtr data); + + public void SendData(GLib.Bytes data) { + gst_webrtc_data_channel_send_data(Handle, data == null ? IntPtr.Zero : data.Handle); + } + + public void SendData() { + SendData (null); + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_webrtc_data_channel_send_string(IntPtr raw, IntPtr str); + + public void SendString(string str) { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + gst_webrtc_data_channel_send_string(Handle, native_str); + GLib.Marshaller.Free (native_str); + } + + public void SendString() { + SendString (null); + } + + + static WebRTCDataChannel () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCDataChannelState.cs b/sources/generated/Gst.WebRTC/WebRTCDataChannelState.cs new file mode 100644 index 0000000000..43b9aa6c57 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCDataChannelState.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCDataChannelStateGType))] + public enum WebRTCDataChannelState { + + New = 0, + Connecting = 1, + Open = 2, + Closing = 3, + Closed = 4, + } + + internal class WebRTCDataChannelStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_data_channel_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_data_channel_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCFECType.cs b/sources/generated/Gst.WebRTC/WebRTCFECType.cs new file mode 100644 index 0000000000..507cf7d2c9 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCFECType.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCFECTypeGType))] + public enum WebRTCFECType { + + None = 0, + UlpRed = 1, + } + + internal class WebRTCFECTypeGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_fec_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_fec_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICEComponent.cs b/sources/generated/Gst.WebRTC/WebRTCICEComponent.cs new file mode 100644 index 0000000000..9c07bd02d0 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICEComponent.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCICEComponentGType))] + public enum WebRTCICEComponent { + + Rtp = 0, + Rtcp = 1, + } + + internal class WebRTCICEComponentGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_component_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_ice_component_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICEConnectionState.cs b/sources/generated/Gst.WebRTC/WebRTCICEConnectionState.cs new file mode 100644 index 0000000000..71545bc044 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICEConnectionState.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCICEConnectionStateGType))] + public enum WebRTCICEConnectionState { + + New = 0, + Checking = 1, + Connected = 2, + Completed = 3, + Failed = 4, + Disconnected = 5, + Closed = 6, + } + + internal class WebRTCICEConnectionStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_connection_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_ice_connection_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICEGatheringState.cs b/sources/generated/Gst.WebRTC/WebRTCICEGatheringState.cs new file mode 100644 index 0000000000..6c737695d8 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICEGatheringState.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCICEGatheringStateGType))] + public enum WebRTCICEGatheringState { + + New = 0, + Gathering = 1, + Complete = 2, + } + + internal class WebRTCICEGatheringStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_gathering_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_ice_gathering_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICERole.cs b/sources/generated/Gst.WebRTC/WebRTCICERole.cs new file mode 100644 index 0000000000..b39682cf94 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICERole.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCICERoleGType))] + public enum WebRTCICERole { + + Controlled = 0, + Controlling = 1, + } + + internal class WebRTCICERoleGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_role_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_ice_role_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICETransport.cs b/sources/generated/Gst.WebRTC/WebRTCICETransport.cs new file mode 100644 index 0000000000..92ce681b2c --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICETransport.cs @@ -0,0 +1,219 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCICETransport : Gst.Object { + + protected WebRTCICETransport (IntPtr raw) : base(raw) {} + + protected WebRTCICETransport() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("component")] + public Gst.WebRTC.WebRTCICEComponent Component { + get { + GLib.Value val = GetProperty ("component"); + Gst.WebRTC.WebRTCICEComponent ret = (Gst.WebRTC.WebRTCICEComponent) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("gathering-state")] + public Gst.WebRTC.WebRTCICEGatheringState GatheringState { + get { + GLib.Value val = GetProperty ("gathering-state"); + Gst.WebRTC.WebRTCICEGatheringState ret = (Gst.WebRTC.WebRTCICEGatheringState) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("state")] + public Gst.WebRTC.WebRTCICEConnectionState State { + get { + GLib.Value val = GetProperty ("state"); + Gst.WebRTC.WebRTCICEConnectionState ret = (Gst.WebRTC.WebRTCICEConnectionState) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Signal("on-selected-candidate-pair-change")] + public event System.EventHandler OnSelectedCandidatePairChange { + add { + this.AddSignalHandler ("on-selected-candidate-pair-change", value); + } + remove { + this.RemoveSignalHandler ("on-selected-candidate-pair-change", value); + } + } + + [GLib.Signal("on-new-candidate")] + public event Gst.WebRTC.OnNewCandidateHandler OnNewCandidate { + add { + this.AddSignalHandler ("on-new-candidate", value, typeof (Gst.WebRTC.OnNewCandidateArgs)); + } + remove { + this.RemoveSignalHandler ("on-new-candidate", value); + } + } + + static OnNewCandidateNativeDelegate OnNewCandidate_cb_delegate; + static OnNewCandidateNativeDelegate OnNewCandidateVMCallback { + get { + if (OnNewCandidate_cb_delegate == null) + OnNewCandidate_cb_delegate = new OnNewCandidateNativeDelegate (OnNewCandidate_cb); + return OnNewCandidate_cb_delegate; + } + } + + static void OverrideOnNewCandidate (GLib.GType gtype) + { + OverrideOnNewCandidate (gtype, OnNewCandidateVMCallback); + } + + static void OverrideOnNewCandidate (GLib.GType gtype, OnNewCandidateNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-new-candidate", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnNewCandidateNativeDelegate (IntPtr inst, IntPtr _object); + + static void OnNewCandidate_cb (IntPtr inst, IntPtr _object) + { + try { + WebRTCICETransport __obj = GLib.Object.GetObject (inst, false) as WebRTCICETransport; + __obj.OnOnNewCandidate (GLib.Marshaller.Utf8PtrToString (_object)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCICETransport), ConnectionMethod="OverrideOnNewCandidate")] + protected virtual void OnOnNewCandidate (string _object) + { + InternalOnNewCandidate (_object); + } + + private void InternalOnNewCandidate (string _object) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static OnSelectedCandidatePairChangeNativeDelegate OnSelectedCandidatePairChange_cb_delegate; + static OnSelectedCandidatePairChangeNativeDelegate OnSelectedCandidatePairChangeVMCallback { + get { + if (OnSelectedCandidatePairChange_cb_delegate == null) + OnSelectedCandidatePairChange_cb_delegate = new OnSelectedCandidatePairChangeNativeDelegate (OnSelectedCandidatePairChange_cb); + return OnSelectedCandidatePairChange_cb_delegate; + } + } + + static void OverrideOnSelectedCandidatePairChange (GLib.GType gtype) + { + OverrideOnSelectedCandidatePairChange (gtype, OnSelectedCandidatePairChangeVMCallback); + } + + static void OverrideOnSelectedCandidatePairChange (GLib.GType gtype, OnSelectedCandidatePairChangeNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "on-selected-candidate-pair-change", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void OnSelectedCandidatePairChangeNativeDelegate (IntPtr inst); + + static void OnSelectedCandidatePairChange_cb (IntPtr inst) + { + try { + WebRTCICETransport __obj = GLib.Object.GetObject (inst, false) as WebRTCICETransport; + __obj.OnOnSelectedCandidatePairChange (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.WebRTC.WebRTCICETransport), ConnectionMethod="OverrideOnSelectedCandidatePairChange")] + protected virtual void OnOnSelectedCandidatePairChange () + { + InternalOnSelectedCandidatePairChange (); + } + + private void InternalOnSelectedCandidatePairChange () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_transport_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_ice_transport_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static WebRTCICETransport () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCICETransportPolicy.cs b/sources/generated/Gst.WebRTC/WebRTCICETransportPolicy.cs new file mode 100644 index 0000000000..4d526b1329 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCICETransportPolicy.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCICETransportPolicyGType))] + public enum WebRTCICETransportPolicy { + + All = 0, + Relay = 1, + } + + internal class WebRTCICETransportPolicyGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_ice_transport_policy_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_ice_transport_policy_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCKind.cs b/sources/generated/Gst.WebRTC/WebRTCKind.cs new file mode 100644 index 0000000000..e5041a932f --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCKind.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCKindGType))] + public enum WebRTCKind { + + Unknown = 0, + Audio = 1, + Video = 2, + } + + internal class WebRTCKindGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_kind_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_kind_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCPeerConnectionState.cs b/sources/generated/Gst.WebRTC/WebRTCPeerConnectionState.cs new file mode 100644 index 0000000000..f3711aad01 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCPeerConnectionState.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCPeerConnectionStateGType))] + public enum WebRTCPeerConnectionState { + + New = 0, + Connecting = 1, + Connected = 2, + Disconnected = 3, + Failed = 4, + Closed = 5, + } + + internal class WebRTCPeerConnectionStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_peer_connection_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_peer_connection_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCPriorityType.cs b/sources/generated/Gst.WebRTC/WebRTCPriorityType.cs new file mode 100644 index 0000000000..2e5c07f7d2 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCPriorityType.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCPriorityTypeGType))] + public enum WebRTCPriorityType { + + VeryLow = 1, + Low = 2, + Medium = 3, + High = 4, + } + + internal class WebRTCPriorityTypeGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_priority_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_priority_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPReceiver.cs b/sources/generated/Gst.WebRTC/WebRTCRTPReceiver.cs new file mode 100644 index 0000000000..f3c63f6d5b --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCRTPReceiver.cs @@ -0,0 +1,79 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCRTPReceiver : Gst.Object { + + public WebRTCRTPReceiver (IntPtr raw) : base(raw) {} + + protected WebRTCRTPReceiver() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("transport")] + public Gst.WebRTC.WebRTCDTLSTransport Transport { + get { + GLib.Value val = GetProperty ("transport"); + Gst.WebRTC.WebRTCDTLSTransport ret = (Gst.WebRTC.WebRTCDTLSTransport) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_rtp_receiver_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_rtp_receiver_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static WebRTCRTPReceiver () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs b/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs new file mode 100644 index 0000000000..db360c60d6 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCRTPSender : Gst.Object { + + public WebRTCRTPSender (IntPtr raw) : base(raw) {} + + protected WebRTCRTPSender() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_webrtc_rtp_sender_set_priority(IntPtr raw, int priority); + + [GLib.Property ("priority")] + public Gst.WebRTC.WebRTCPriorityType Priority { + get { + GLib.Value val = GetProperty ("priority"); + Gst.WebRTC.WebRTCPriorityType ret = (Gst.WebRTC.WebRTCPriorityType) (Enum) val; + val.Dispose (); + return ret; + } + set { + gst_webrtc_rtp_sender_set_priority(Handle, (int) value); + } + } + + [GLib.Property ("transport")] + public Gst.WebRTC.WebRTCDTLSTransport Transport { + get { + GLib.Value val = GetProperty ("transport"); + Gst.WebRTC.WebRTCDTLSTransport ret = (Gst.WebRTC.WebRTCDTLSTransport) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_rtp_sender_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_rtp_sender_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static WebRTCRTPSender () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs new file mode 100644 index 0000000000..118dd508a2 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs @@ -0,0 +1,159 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class WebRTCRTPTransceiver : Gst.Object { + + protected WebRTCRTPTransceiver (IntPtr raw) : base(raw) {} + + protected WebRTCRTPTransceiver() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("codec-preferences")] + public Gst.Caps CodecPreferences { + get { + GLib.Value val = GetProperty ("codec-preferences"); + Gst.Caps ret = (Gst.Caps) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value, "GstCaps*"); + SetProperty("codec-preferences", val); + val.Dispose (); + } + } + + [GLib.Property ("current-direction")] + public Gst.WebRTC.WebRTCRTPTransceiverDirection CurrentDirection { + get { + GLib.Value val = GetProperty ("current-direction"); + Gst.WebRTC.WebRTCRTPTransceiverDirection ret = (Gst.WebRTC.WebRTCRTPTransceiverDirection) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("direction")] + public Gst.WebRTC.WebRTCRTPTransceiverDirection Direction { + get { + GLib.Value val = GetProperty ("direction"); + Gst.WebRTC.WebRTCRTPTransceiverDirection ret = (Gst.WebRTC.WebRTCRTPTransceiverDirection) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("direction", val); + val.Dispose (); + } + } + + [GLib.Property ("kind")] + public Gst.WebRTC.WebRTCKind Kind { + get { + GLib.Value val = GetProperty ("kind"); + Gst.WebRTC.WebRTCKind ret = (Gst.WebRTC.WebRTCKind) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("mid")] + public string Mid { + get { + GLib.Value val = GetProperty ("mid"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("mlineindex")] + public uint Mlineindex { + get { + GLib.Value val = GetProperty ("mlineindex"); + uint ret = (uint) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("receiver")] + public Gst.WebRTC.WebRTCRTPReceiver Receiver { + get { + GLib.Value val = GetProperty ("receiver"); + Gst.WebRTC.WebRTCRTPReceiver ret = (Gst.WebRTC.WebRTCRTPReceiver) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("sender")] + public Gst.WebRTC.WebRTCRTPSender Sender { + get { + GLib.Value val = GetProperty ("sender"); + Gst.WebRTC.WebRTCRTPSender ret = (Gst.WebRTC.WebRTCRTPSender) val; + val.Dispose (); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_rtp_transceiver_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_rtp_transceiver_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + static WebRTCRTPTransceiver () + { + GtkSharp.GstreamerSharp.ObjectManager.Initialize (); + } + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPTransceiverDirection.cs b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiverDirection.cs new file mode 100644 index 0000000000..316e36c17f --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiverDirection.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCRTPTransceiverDirectionGType))] + public enum WebRTCRTPTransceiverDirection { + + None = 0, + Inactive = 1, + Sendonly = 2, + Recvonly = 3, + Sendrecv = 4, + } + + internal class WebRTCRTPTransceiverDirectionGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_rtp_transceiver_direction_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_rtp_transceiver_direction_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCSCTPTransportState.cs b/sources/generated/Gst.WebRTC/WebRTCSCTPTransportState.cs new file mode 100644 index 0000000000..8cb36fb58e --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCSCTPTransportState.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCSCTPTransportStateGType))] + public enum WebRTCSCTPTransportState { + + New = 0, + Connecting = 1, + Connected = 2, + Closed = 3, + } + + internal class WebRTCSCTPTransportStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_sctp_transport_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_sctp_transport_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCSDPType.cs b/sources/generated/Gst.WebRTC/WebRTCSDPType.cs new file mode 100644 index 0000000000..72e9e5ba6e --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCSDPType.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCSDPTypeGType))] + public enum WebRTCSDPType { + + Offer = 1, + Pranswer = 2, + Answer = 3, + Rollback = 4, + } + + internal class WebRTCSDPTypeGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_sdp_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_sdp_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCSessionDescription.cs b/sources/generated/Gst.WebRTC/WebRTCSessionDescription.cs new file mode 100644 index 0000000000..fcf0078f90 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCSessionDescription.cs @@ -0,0 +1,84 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct WebRTCSessionDescription : IEquatable { + + public Gst.WebRTC.WebRTCSDPType Type; + private IntPtr _sdp; + public Gst.Sdp.SDPMessage Sdp { + get { + return _sdp == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (_sdp, typeof (Gst.Sdp.SDPMessage), false); + } + set { + _sdp = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.WebRTC.WebRTCSessionDescription Zero = new Gst.WebRTC.WebRTCSessionDescription (); + + public static Gst.WebRTC.WebRTCSessionDescription New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.WebRTC.WebRTCSessionDescription.Zero; + return (Gst.WebRTC.WebRTCSessionDescription) Marshal.PtrToStructure (raw, typeof (Gst.WebRTC.WebRTCSessionDescription)); + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_session_description_new(int type, IntPtr sdp); + + public static WebRTCSessionDescription New(Gst.WebRTC.WebRTCSDPType type, Gst.Sdp.SDPMessage sdp) + { + sdp.Owned = false; + WebRTCSessionDescription result = WebRTCSessionDescription.New (gst_webrtc_session_description_new((int) type, sdp == null ? IntPtr.Zero : sdp.Handle)); + return result; + } + + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_session_description_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_webrtc_session_description_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public bool Equals (WebRTCSessionDescription other) + { + return true && Type.Equals (other.Type) && Sdp.Equals (other.Sdp); + } + + public override bool Equals (object other) + { + return other is WebRTCSessionDescription && Equals ((WebRTCSessionDescription) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Sdp.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.WebRTC.WebRTCSessionDescription boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.WebRTC.WebRTCSessionDescription.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.WebRTC.WebRTCSessionDescription (GLib.Value val) + { + return (Gst.WebRTC.WebRTCSessionDescription) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst.WebRTC/WebRTCSignalingState.cs b/sources/generated/Gst.WebRTC/WebRTCSignalingState.cs new file mode 100644 index 0000000000..26ac5364e7 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCSignalingState.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCSignalingStateGType))] + public enum WebRTCSignalingState { + + Stable = 0, + Closed = 1, + HaveLocalOffer = 2, + HaveRemoteOffer = 3, + HaveLocalPranswer = 4, + HaveRemotePranswer = 5, + } + + internal class WebRTCSignalingStateGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_signaling_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_signaling_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCStatsType.cs b/sources/generated/Gst.WebRTC/WebRTCStatsType.cs new file mode 100644 index 0000000000..2f233c443e --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCStatsType.cs @@ -0,0 +1,40 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCStatsTypeGType))] + public enum WebRTCStatsType { + + Codec = 1, + InboundRtp = 2, + OutboundRtp = 3, + RemoteInboundRtp = 4, + RemoteOutboundRtp = 5, + Csrc = 6, + PeerConnection = 7, + DataChannel = 8, + Stream = 9, + Transport = 10, + CandidatePair = 11, + LocalCandidate = 12, + RemoteCandidate = 13, + Certificate = 14, + } + + internal class WebRTCStatsTypeGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_stats_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_stats_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/AllocationParams.cs b/sources/generated/Gst/AllocationParams.cs new file mode 100644 index 0000000000..4aa639aace --- /dev/null +++ b/sources/generated/Gst/AllocationParams.cs @@ -0,0 +1,110 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AllocationParams : IEquatable { + + public Gst.MemoryFlags Flags; + private UIntPtr align; + public ulong Align { + get { + return (ulong) align; + } + set { + align = new UIntPtr (value); + } + } + private UIntPtr prefix; + public ulong Prefix { + get { + return (ulong) prefix; + } + set { + prefix = new UIntPtr (value); + } + } + private UIntPtr padding; + public ulong Padding { + get { + return (ulong) padding; + } + set { + padding = new UIntPtr (value); + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.AllocationParams Zero = new Gst.AllocationParams (); + + public static Gst.AllocationParams New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.AllocationParams.Zero; + return (Gst.AllocationParams) Marshal.PtrToStructure (raw, typeof (Gst.AllocationParams)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_allocation_params_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_allocation_params_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_allocation_params_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_allocation_params_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.AllocationParams target) + { + target = New (native); + } + + public bool Equals (AllocationParams other) + { + return true && Flags.Equals (other.Flags) && Align.Equals (other.Align) && Prefix.Equals (other.Prefix) && Padding.Equals (other.Padding); + } + + public override bool Equals (object other) + { + return other is AllocationParams && Equals ((AllocationParams) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Flags.GetHashCode () ^ Align.GetHashCode () ^ Prefix.GetHashCode () ^ Padding.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.AllocationParams boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.AllocationParams.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.AllocationParams (GLib.Value val) + { + return (Gst.AllocationParams) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/Allocator.cs b/sources/generated/Gst/Allocator.cs new file mode 100644 index 0000000000..1fe5dc0997 --- /dev/null +++ b/sources/generated/Gst/Allocator.cs @@ -0,0 +1,417 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Allocator : Gst.Object { + + protected Allocator (IntPtr raw) : base(raw) {} + + protected Allocator() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public string MemType { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_type")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + public Gst.MemoryMapFunction MemMap { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_map")); + GstSharp.MemoryMapFunctionNative del = (GstSharp.MemoryMapFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryMapFunctionNative)); + return GstSharp.MemoryMapFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryUnmapFunction MemUnmap { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_unmap")); + GstSharp.MemoryUnmapFunctionNative del = (GstSharp.MemoryUnmapFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryUnmapFunctionNative)); + return GstSharp.MemoryUnmapFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryCopyFunction MemCopy { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_copy")); + GstSharp.MemoryCopyFunctionNative del = (GstSharp.MemoryCopyFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryCopyFunctionNative)); + return GstSharp.MemoryCopyFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryShareFunction MemShare { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_share")); + GstSharp.MemoryShareFunctionNative del = (GstSharp.MemoryShareFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryShareFunctionNative)); + return GstSharp.MemoryShareFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryIsSpanFunction MemIsSpan { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_is_span")); + GstSharp.MemoryIsSpanFunctionNative del = (GstSharp.MemoryIsSpanFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryIsSpanFunctionNative)); + return GstSharp.MemoryIsSpanFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryMapFullFunction MemMapFull { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_map_full")); + GstSharp.MemoryMapFullFunctionNative del = (GstSharp.MemoryMapFullFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryMapFullFunctionNative)); + return GstSharp.MemoryMapFullFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.MemoryUnmapFullFunction MemUnmapFull { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("mem_unmap_full")); + GstSharp.MemoryUnmapFullFunctionNative del = (GstSharp.MemoryUnmapFullFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.MemoryUnmapFullFunctionNative)); + return GstSharp.MemoryUnmapFullFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + static AllocNativeDelegate Alloc_cb_delegate; + static AllocNativeDelegate AllocVMCallback { + get { + if (Alloc_cb_delegate == null) + Alloc_cb_delegate = new AllocNativeDelegate (Alloc_cb); + return Alloc_cb_delegate; + } + } + + static void OverrideAlloc (GLib.GType gtype) + { + OverrideAlloc (gtype, AllocVMCallback); + } + + static void OverrideAlloc (GLib.GType gtype, AllocNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr AllocNativeDelegate (IntPtr inst, UIntPtr size, IntPtr parms); + + static IntPtr Alloc_cb (IntPtr inst, UIntPtr size, IntPtr parms) + { + try { + Allocator __obj = GLib.Object.GetObject (inst, false) as Allocator; + Gst.Memory __result; + __result = __obj.OnAlloc ((ulong) size, Gst.AllocationParams.New (parms)); + return __result == null ? IntPtr.Zero : __result.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Allocator), ConnectionMethod="OverrideAlloc")] + protected virtual Gst.Memory OnAlloc (ulong size, Gst.AllocationParams parms) + { + return InternalAlloc (size, parms); + } + + private Gst.Memory InternalAlloc (ulong size, Gst.AllocationParams parms) + { + AllocNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc")); + unmanaged = (AllocNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AllocNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + IntPtr __result = unmanaged (this.Handle, new UIntPtr (size), native_parms); + Marshal.FreeHGlobal (native_parms); + return __result == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (__result, typeof (Gst.Memory), true); + } + + static FreeNativeDelegate Free_cb_delegate; + static FreeNativeDelegate FreeVMCallback { + get { + if (Free_cb_delegate == null) + Free_cb_delegate = new FreeNativeDelegate (Free_cb); + return Free_cb_delegate; + } + } + + static void OverrideFree (GLib.GType gtype) + { + OverrideFree (gtype, FreeVMCallback); + } + + static void OverrideFree (GLib.GType gtype, FreeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("free")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FreeNativeDelegate (IntPtr inst, IntPtr memory); + + static void Free_cb (IntPtr inst, IntPtr memory) + { + try { + Allocator __obj = GLib.Object.GetObject (inst, false) as Allocator; + __obj.OnFree (memory == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (memory, typeof (Gst.Memory), true)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Allocator), ConnectionMethod="OverrideFree")] + protected virtual void OnFree (Gst.Memory memory) + { + InternalFree (memory); + } + + private void InternalFree (Gst.Memory memory) + { + FreeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("free")); + unmanaged = (FreeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FreeNativeDelegate)); + } + if (unmanaged == null) return; + + memory.Owned = false; + unmanaged (this.Handle, memory == null ? IntPtr.Zero : memory.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("alloc" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // alloc + , null + , "free" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("free" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // free + , "alloc" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "free" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_allocator_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_allocator_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_allocator_find(IntPtr name); + + public static Gst.Allocator Find(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_allocator_find(native_name); + Gst.Allocator ret = GLib.Object.GetObject(raw_ret, true) as Gst.Allocator; + GLib.Marshaller.Free (native_name); + return ret; + } + + public static Gst.Allocator Find() { + return Find (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_allocator_register(IntPtr name, IntPtr allocator); + + public static void Register(string name, Gst.Allocator allocator) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_allocator_register(native_name, allocator == null ? IntPtr.Zero : allocator.OwnedHandle); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_allocator_alloc(IntPtr raw, UIntPtr size, IntPtr parms); + + public Gst.Memory Alloc(ulong size, Gst.AllocationParams parms) { + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + IntPtr raw_ret = gst_allocator_alloc(Handle, new UIntPtr (size), native_parms); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + Marshal.FreeHGlobal (native_parms); + return ret; + } + + public Gst.Memory Alloc(ulong size) { + return Alloc (size, Gst.AllocationParams.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_allocator_free(IntPtr raw, IntPtr memory); + + public void Free(Gst.Memory memory) { + memory.Owned = false; + gst_allocator_free(Handle, memory == null ? IntPtr.Zero : memory.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_allocator_set_default(IntPtr raw); + + public void SetDefault() { + gst_allocator_set_default(Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("mem_type" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_type + , null + , "mem_map" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_map" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_map + , "mem_type" + , "mem_unmap" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_unmap" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_unmap + , "mem_map" + , "mem_copy" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_copy" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_copy + , "mem_unmap" + , "mem_share" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_share" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_share + , "mem_copy" + , "mem_is_span" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_is_span" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_is_span + , "mem_share" + , "mem_map_full" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_map_full" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_map_full + , "mem_is_span" + , "mem_unmap_full" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("mem_unmap_full" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // mem_unmap_full + , "mem_map_full" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved + , "mem_unmap_full" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "_gst_reserved" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/AllocatorFlags.cs b/sources/generated/Gst/AllocatorFlags.cs new file mode 100644 index 0000000000..88b80c6db2 --- /dev/null +++ b/sources/generated/Gst/AllocatorFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.AllocatorFlagsGType))] + public enum AllocatorFlags : uint { + + CustomAlloc = 16, + Last = 1048576, + } + + internal class AllocatorFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_allocator_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_allocator_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Application.cs b/sources/generated/Gst/Application.cs new file mode 100644 index 0000000000..8e2e4b5601 --- /dev/null +++ b/sources/generated/Gst/Application.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Application { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_version(out uint major, out uint minor, out uint micro, out uint nano); + + public static void Version(out uint major, out uint minor, out uint micro, out uint nano) { + gst_version(out major, out minor, out micro, out nano); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_version_string(); + + public static string VersionString() { + IntPtr raw_ret = gst_version_string(); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/AtomicQueue.cs b/sources/generated/Gst/AtomicQueue.cs new file mode 100644 index 0000000000..67c8fec87c --- /dev/null +++ b/sources/generated/Gst/AtomicQueue.cs @@ -0,0 +1,115 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class AtomicQueue : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_atomic_queue_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_atomic_queue_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_atomic_queue_length(IntPtr raw); + + public uint Length() { + uint raw_ret = gst_atomic_queue_length(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_atomic_queue_peek(IntPtr raw); + + public IntPtr Peek() { + IntPtr raw_ret = gst_atomic_queue_peek(Handle); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_atomic_queue_pop(IntPtr raw); + + public IntPtr Pop() { + IntPtr raw_ret = gst_atomic_queue_pop(Handle); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_atomic_queue_push(IntPtr raw, IntPtr data); + + public void Push(IntPtr data) { + gst_atomic_queue_push(Handle, data); + } + + public AtomicQueue(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_atomic_queue_new(uint initial_size); + + public AtomicQueue (uint initial_size) + { + Raw = gst_atomic_queue_new(initial_size); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_atomic_queue_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_atomic_queue_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_atomic_queue_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_atomic_queue_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_atomic_queue_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Bin.cs b/sources/generated/Gst/Bin.cs new file mode 100644 index 0000000000..e320cd2489 --- /dev/null +++ b/sources/generated/Gst/Bin.cs @@ -0,0 +1,1245 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Bin : Gst.Element, Gst.IChildProxy { + + public Bin (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_new(IntPtr name); + + public Bin (string name) : base (IntPtr.Zero) + { + if (GetType () != typeof (Bin)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_bin_new(native_name); + GLib.Marshaller.Free (native_name); + } + + [GLib.Property ("async-handling")] + public bool AsyncHandling { + get { + GLib.Value val = GetProperty ("async-handling"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("async-handling", val); + val.Dispose (); + } + } + + [GLib.Property ("message-forward")] + public bool MessageForward { + get { + GLib.Value val = GetProperty ("message-forward"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("message-forward", val); + val.Dispose (); + } + } + + public int Numchildren { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("numchildren")); + return (*raw_ptr); + } + } + } + + public GLib.List Children { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("children")); + return new GLib.List((*raw_ptr)); + } + } + } + + public uint ChildrenCookie { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("children_cookie")); + return (*raw_ptr); + } + } + } + + public Gst.Bus ChildBus { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("child_bus")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Bus; + } + } + } + + public GLib.List Messages { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("messages")); + return new GLib.List((*raw_ptr)); + } + } + } + + public bool Polling { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("polling")); + return (*raw_ptr); + } + } + } + + public bool StateDirty { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("state_dirty")); + return (*raw_ptr); + } + } + } + + public bool ClockDirty { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_dirty")); + return (*raw_ptr); + } + } + } + + public Gst.Clock ProvidedClock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock; + } + } + } + + public Gst.Element ClockProvider { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_provider")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Element; + } + } + } + + [GLib.Signal("deep-element-added")] + public event Gst.DeepElementAddedHandler DeepElementAdded { + add { + this.AddSignalHandler ("deep-element-added", value, typeof (Gst.DeepElementAddedArgs)); + } + remove { + this.RemoveSignalHandler ("deep-element-added", value); + } + } + + [GLib.Signal("deep-element-removed")] + public event Gst.DeepElementRemovedHandler DeepElementRemoved { + add { + this.AddSignalHandler ("deep-element-removed", value, typeof (Gst.DeepElementRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("deep-element-removed", value); + } + } + + [GLib.Signal("do-latency")] + public event Gst.DoLatencyHandler DoLatency { + add { + this.AddSignalHandler ("do-latency", value, typeof (Gst.DoLatencyArgs)); + } + remove { + this.RemoveSignalHandler ("do-latency", value); + } + } + + [GLib.Signal("element-added")] + public event Gst.ElementAddedHandler ElementAdded { + add { + this.AddSignalHandler ("element-added", value, typeof (Gst.ElementAddedArgs)); + } + remove { + this.RemoveSignalHandler ("element-added", value); + } + } + + [GLib.Signal("element-removed")] + public event Gst.ElementRemovedHandler ElementRemoved { + add { + this.AddSignalHandler ("element-removed", value, typeof (Gst.ElementRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("element-removed", value); + } + } + + static ElementAddedNativeDelegate ElementAdded_cb_delegate; + static ElementAddedNativeDelegate ElementAddedVMCallback { + get { + if (ElementAdded_cb_delegate == null) + ElementAdded_cb_delegate = new ElementAddedNativeDelegate (ElementAdded_cb); + return ElementAdded_cb_delegate; + } + } + + static void OverrideElementAdded (GLib.GType gtype) + { + OverrideElementAdded (gtype, ElementAddedVMCallback); + } + + static void OverrideElementAdded (GLib.GType gtype, ElementAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ElementAddedNativeDelegate (IntPtr inst, IntPtr element); + + static void ElementAdded_cb (IntPtr inst, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + __obj.OnElementAdded (GLib.Object.GetObject(element) as Gst.Element); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementAdded")] + protected virtual void OnElementAdded (Gst.Element element) + { + InternalElementAdded (element); + } + + private void InternalElementAdded (Gst.Element element) + { + ElementAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added")); + unmanaged = (ElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + static ElementRemovedNativeDelegate ElementRemoved_cb_delegate; + static ElementRemovedNativeDelegate ElementRemovedVMCallback { + get { + if (ElementRemoved_cb_delegate == null) + ElementRemoved_cb_delegate = new ElementRemovedNativeDelegate (ElementRemoved_cb); + return ElementRemoved_cb_delegate; + } + } + + static void OverrideElementRemoved (GLib.GType gtype) + { + OverrideElementRemoved (gtype, ElementRemovedVMCallback); + } + + static void OverrideElementRemoved (GLib.GType gtype, ElementRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ElementRemovedNativeDelegate (IntPtr inst, IntPtr element); + + static void ElementRemoved_cb (IntPtr inst, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + __obj.OnElementRemoved (GLib.Object.GetObject(element) as Gst.Element); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementRemoved")] + protected virtual void OnElementRemoved (Gst.Element element) + { + InternalElementRemoved (element); + } + + private void InternalElementRemoved (Gst.Element element) + { + ElementRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed")); + unmanaged = (ElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + static AddElementNativeDelegate AddElement_cb_delegate; + static AddElementNativeDelegate AddElementVMCallback { + get { + if (AddElement_cb_delegate == null) + AddElement_cb_delegate = new AddElementNativeDelegate (AddElement_cb); + return AddElement_cb_delegate; + } + } + + static void OverrideAddElement (GLib.GType gtype) + { + OverrideAddElement (gtype, AddElementVMCallback); + } + + static void OverrideAddElement (GLib.GType gtype, AddElementNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool AddElementNativeDelegate (IntPtr inst, IntPtr element); + + static bool AddElement_cb (IntPtr inst, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + bool __result; + __result = __obj.OnAddElement (GLib.Object.GetObject(element) as Gst.Element); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideAddElement")] + protected virtual bool OnAddElement (Gst.Element element) + { + return InternalAddElement (element); + } + + private bool InternalAddElement (Gst.Element element) + { + AddElementNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element")); + unmanaged = (AddElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AddElementNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + return __result; + } + + static RemoveElementNativeDelegate RemoveElement_cb_delegate; + static RemoveElementNativeDelegate RemoveElementVMCallback { + get { + if (RemoveElement_cb_delegate == null) + RemoveElement_cb_delegate = new RemoveElementNativeDelegate (RemoveElement_cb); + return RemoveElement_cb_delegate; + } + } + + static void OverrideRemoveElement (GLib.GType gtype) + { + OverrideRemoveElement (gtype, RemoveElementVMCallback); + } + + static void OverrideRemoveElement (GLib.GType gtype, RemoveElementNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RemoveElementNativeDelegate (IntPtr inst, IntPtr element); + + static bool RemoveElement_cb (IntPtr inst, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + bool __result; + __result = __obj.OnRemoveElement (GLib.Object.GetObject(element) as Gst.Element); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideRemoveElement")] + protected virtual bool OnRemoveElement (Gst.Element element) + { + return InternalRemoveElement (element); + } + + private bool InternalRemoveElement (Gst.Element element) + { + RemoveElementNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element")); + unmanaged = (RemoveElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RemoveElementNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + return __result; + } + + static HandleMessageNativeDelegate HandleMessage_cb_delegate; + static HandleMessageNativeDelegate HandleMessageVMCallback { + get { + if (HandleMessage_cb_delegate == null) + HandleMessage_cb_delegate = new HandleMessageNativeDelegate (HandleMessage_cb); + return HandleMessage_cb_delegate; + } + } + + static void OverrideHandleMessage (GLib.GType gtype) + { + OverrideHandleMessage (gtype, HandleMessageVMCallback); + } + + static void OverrideHandleMessage (GLib.GType gtype, HandleMessageNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void HandleMessageNativeDelegate (IntPtr inst, IntPtr message); + + static void HandleMessage_cb (IntPtr inst, IntPtr message) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + __obj.OnHandleMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideHandleMessage")] + protected virtual void OnHandleMessage (Gst.Message message) + { + InternalHandleMessage (message); + } + + private void InternalHandleMessage (Gst.Message message) + { + HandleMessageNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message")); + unmanaged = (HandleMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleMessageNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle); + } + + static DoLatencyNativeDelegate DoLatency_cb_delegate; + static DoLatencyNativeDelegate DoLatencyVMCallback { + get { + if (DoLatency_cb_delegate == null) + DoLatency_cb_delegate = new DoLatencyNativeDelegate (DoLatency_cb); + return DoLatency_cb_delegate; + } + } + + static void OverrideDoLatency (GLib.GType gtype) + { + OverrideDoLatency (gtype, DoLatencyVMCallback); + } + + static void OverrideDoLatency (GLib.GType gtype, DoLatencyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DoLatencyNativeDelegate (IntPtr inst); + + static bool DoLatency_cb (IntPtr inst) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + bool __result; + __result = __obj.OnDoLatency (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDoLatency")] + protected virtual bool OnDoLatency () + { + return InternalDoLatency (); + } + + private bool InternalDoLatency () + { + DoLatencyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency")); + unmanaged = (DoLatencyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DoLatencyNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static DeepElementAddedNativeDelegate DeepElementAdded_cb_delegate; + static DeepElementAddedNativeDelegate DeepElementAddedVMCallback { + get { + if (DeepElementAdded_cb_delegate == null) + DeepElementAdded_cb_delegate = new DeepElementAddedNativeDelegate (DeepElementAdded_cb); + return DeepElementAdded_cb_delegate; + } + } + + static void OverrideDeepElementAdded (GLib.GType gtype) + { + OverrideDeepElementAdded (gtype, DeepElementAddedVMCallback); + } + + static void OverrideDeepElementAdded (GLib.GType gtype, DeepElementAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DeepElementAddedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element); + + static void DeepElementAdded_cb (IntPtr inst, IntPtr sub_bin, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + __obj.OnDeepElementAdded (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementAdded")] + protected virtual void OnDeepElementAdded (Gst.Bin sub_bin, Gst.Element element) + { + InternalDeepElementAdded (sub_bin, element); + } + + private void InternalDeepElementAdded (Gst.Bin sub_bin, Gst.Element element) + { + DeepElementAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added")); + unmanaged = (DeepElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + static DeepElementRemovedNativeDelegate DeepElementRemoved_cb_delegate; + static DeepElementRemovedNativeDelegate DeepElementRemovedVMCallback { + get { + if (DeepElementRemoved_cb_delegate == null) + DeepElementRemoved_cb_delegate = new DeepElementRemovedNativeDelegate (DeepElementRemoved_cb); + return DeepElementRemoved_cb_delegate; + } + } + + static void OverrideDeepElementRemoved (GLib.GType gtype) + { + OverrideDeepElementRemoved (gtype, DeepElementRemovedVMCallback); + } + + static void OverrideDeepElementRemoved (GLib.GType gtype, DeepElementRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DeepElementRemovedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element); + + static void DeepElementRemoved_cb (IntPtr inst, IntPtr sub_bin, IntPtr element) + { + try { + Bin __obj = GLib.Object.GetObject (inst, false) as Bin; + __obj.OnDeepElementRemoved (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementRemoved")] + protected virtual void OnDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element) + { + InternalDeepElementRemoved (sub_bin, element); + } + + private void InternalDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element) + { + DeepElementRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed")); + unmanaged = (DeepElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("pool" + , Gst.Element.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool + , null + , "element_added" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("element_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // element_added + , "pool" + , "element_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("element_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // element_removed + , "element_added" + , "add_element" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("add_element" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // add_element + , "element_removed" + , "remove_element" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("remove_element" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // remove_element + , "add_element" + , "handle_message" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("handle_message" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_message + , "remove_element" + , "do_latency" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("do_latency" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // do_latency + , "handle_message" + , "deep_element_added" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("deep_element_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_added + , "do_latency" + , "deep_element_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("deep_element_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_removed + , "deep_element_added" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved + , "deep_element_removed" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_bin_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bin_add(IntPtr raw, IntPtr element); + + public bool Add(Gst.Element element) { + bool raw_ret = gst_bin_add(Handle, element == null ? IntPtr.Zero : element.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_find_unlinked_pad(IntPtr raw, int direction); + + public Gst.Pad FindUnlinkedPad(Gst.PadDirection direction) { + IntPtr raw_ret = gst_bin_find_unlinked_pad(Handle, (int) direction); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_get_by_interface(IntPtr raw, IntPtr iface); + + public Gst.Element GetByInterface(GLib.GType iface) { + IntPtr raw_ret = gst_bin_get_by_interface(Handle, iface.Val); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_get_by_name(IntPtr raw, IntPtr name); + + public Gst.Element GetByName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_bin_get_by_name(Handle, native_name); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_get_by_name_recurse_up(IntPtr raw, IntPtr name); + + public Gst.Element GetByNameRecurseUp(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_bin_get_by_name_recurse_up(Handle, native_name); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_bin_get_suppressed_flags(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bin_set_suppressed_flags(IntPtr raw, int flags); + + public Gst.ElementFlags SuppressedFlags { + get { + int raw_ret = gst_bin_get_suppressed_flags(Handle); + Gst.ElementFlags ret = (Gst.ElementFlags) raw_ret; + return ret; + } + set { + gst_bin_set_suppressed_flags(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_all_by_element_factory_name(IntPtr raw, IntPtr factory_name); + + public Gst.Iterator IterateAllByElementFactoryName(string factory_name) { + IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name); + IntPtr raw_ret = gst_bin_iterate_all_by_element_factory_name(Handle, native_factory_name); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + GLib.Marshaller.Free (native_factory_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_all_by_interface(IntPtr raw, IntPtr iface); + + public Gst.Iterator IterateAllByInterface(GLib.GType iface) { + IntPtr raw_ret = gst_bin_iterate_all_by_interface(Handle, iface.Val); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_elements(IntPtr raw); + + public Gst.Iterator IterateElements() { + IntPtr raw_ret = gst_bin_iterate_elements(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_recurse(IntPtr raw); + + public Gst.Iterator IterateRecurse() { + IntPtr raw_ret = gst_bin_iterate_recurse(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_sinks(IntPtr raw); + + public Gst.Iterator IterateSinks() { + IntPtr raw_ret = gst_bin_iterate_sinks(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_sorted(IntPtr raw); + + public Gst.Iterator IterateSorted() { + IntPtr raw_ret = gst_bin_iterate_sorted(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_iterate_sources(IntPtr raw); + + public Gst.Iterator IterateSources() { + IntPtr raw_ret = gst_bin_iterate_sources(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bin_recalculate_latency(IntPtr raw); + + public bool RecalculateLatency() { + bool raw_ret = gst_bin_recalculate_latency(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bin_remove(IntPtr raw, IntPtr element); + + public bool Remove(Gst.Element element) { + bool raw_ret = gst_bin_remove(Handle, element == null ? IntPtr.Zero : element.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bin_sync_children_states(IntPtr raw); + + public bool SyncChildrenStates() { + bool raw_ret = gst_bin_sync_children_states(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_child_proxy_child_added(IntPtr raw, IntPtr child, IntPtr name); + + public void ChildAdded(GLib.Object child, string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_child_proxy_child_added(Handle, child == null ? IntPtr.Zero : child.Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_child_proxy_child_removed(IntPtr raw, IntPtr child, IntPtr name); + + public void ChildRemoved(GLib.Object child, string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_child_proxy_child_removed(Handle, child == null ? IntPtr.Zero : child.Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_child_proxy_get_child_by_index(IntPtr raw, uint index); + + public GLib.Object GetChildByIndex(uint index) { + IntPtr raw_ret = gst_child_proxy_get_child_by_index(Handle, index); + GLib.Object ret = GLib.Object.GetObject (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_child_proxy_get_child_by_name(IntPtr raw, IntPtr name); + + public GLib.Object GetChildByName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_child_proxy_get_child_by_name(Handle, native_name); + GLib.Object ret = GLib.Object.GetObject (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_child_proxy_get_children_count(IntPtr raw); + + public uint ChildrenCount { + get { + uint raw_ret = gst_child_proxy_get_children_count(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_child_proxy_lookup(IntPtr raw, IntPtr name, out IntPtr target, out IntPtr pspec); + + public bool Lookup(string name, out GLib.Object target, out IntPtr pspec) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_target; + bool raw_ret = gst_child_proxy_lookup(Handle, native_name, out native_target, out pspec); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + target = GLib.Object.GetObject (native_target); + return ret; + } + + [GLib.Signal("child-removed")] + public event Gst.ChildRemovedEventHandler ChildRemovedEvent { + add { + this.AddSignalHandler ("child-removed", value, typeof (Gst.ChildRemovedEventArgs)); + } + remove { + this.RemoveSignalHandler ("child-removed", value); + } + } + + [GLib.Signal("child-added")] + public event Gst.ChildAddedEventHandler ChildAddedEvent { + add { + this.AddSignalHandler ("child-added", value, typeof (Gst.ChildAddedEventArgs)); + } + remove { + this.RemoveSignalHandler ("child-added", value); + } + } + + static ChildAddedEventNativeDelegate ChildAddedEvent_cb_delegate; + static ChildAddedEventNativeDelegate ChildAddedEventVMCallback { + get { + if (ChildAddedEvent_cb_delegate == null) + ChildAddedEvent_cb_delegate = new ChildAddedEventNativeDelegate (ChildAddedEvent_cb); + return ChildAddedEvent_cb_delegate; + } + } + + static void OverrideChildAddedEvent (GLib.GType gtype) + { + OverrideChildAddedEvent (gtype, ChildAddedEventVMCallback); + } + + static void OverrideChildAddedEvent (GLib.GType gtype, ChildAddedEventNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "child-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildAddedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name); + + static void ChildAddedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name) + { + try { + Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin; + __obj.OnChildAddedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildAddedEvent")] + protected virtual void OnChildAddedEvent (GLib.Object _object, string name) + { + InternalChildAddedEvent (_object, name); + } + + private void InternalChildAddedEvent (GLib.Object _object, string name) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (name); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ChildRemovedEventNativeDelegate ChildRemovedEvent_cb_delegate; + static ChildRemovedEventNativeDelegate ChildRemovedEventVMCallback { + get { + if (ChildRemovedEvent_cb_delegate == null) + ChildRemovedEvent_cb_delegate = new ChildRemovedEventNativeDelegate (ChildRemovedEvent_cb); + return ChildRemovedEvent_cb_delegate; + } + } + + static void OverrideChildRemovedEvent (GLib.GType gtype) + { + OverrideChildRemovedEvent (gtype, ChildRemovedEventVMCallback); + } + + static void OverrideChildRemovedEvent (GLib.GType gtype, ChildRemovedEventNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "child-removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ChildRemovedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name); + + static void ChildRemovedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name) + { + try { + Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin; + __obj.OnChildRemovedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildRemovedEvent")] + protected virtual void OnChildRemovedEvent (GLib.Object _object, string name) + { + InternalChildRemovedEvent (_object, name); + } + + private void InternalChildRemovedEvent (GLib.Object _object, string name) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (3); + GLib.Value[] vals = new GLib.Value [3]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + vals [2] = new GLib.Value (name); + inst_and_params.Append (vals [2]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("numchildren" + , Gst.Element.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(int)) // numchildren + , null + , "children" + , (long) Marshal.OffsetOf(typeof(GstBin_numchildrenAlign), "numchildren") + , 0 + ), + new GLib.AbiField("children" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // children + , "numchildren" + , "children_cookie" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("children_cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // children_cookie + , "children" + , "child_bus" + , (long) Marshal.OffsetOf(typeof(GstBin_children_cookieAlign), "children_cookie") + , 0 + ), + new GLib.AbiField("child_bus" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // child_bus + , "children_cookie" + , "messages" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("messages" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // messages + , "child_bus" + , "polling" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("polling" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // polling + , "messages" + , "state_dirty" + , (long) Marshal.OffsetOf(typeof(GstBin_pollingAlign), "polling") + , 0 + ), + new GLib.AbiField("state_dirty" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // state_dirty + , "polling" + , "clock_dirty" + , (long) Marshal.OffsetOf(typeof(GstBin_state_dirtyAlign), "state_dirty") + , 0 + ), + new GLib.AbiField("clock_dirty" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // clock_dirty + , "state_dirty" + , "provided_clock" + , (long) Marshal.OffsetOf(typeof(GstBin_clock_dirtyAlign), "clock_dirty") + , 0 + ), + new GLib.AbiField("provided_clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock + , "clock_dirty" + , "clock_provider" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clock_provider" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock_provider + , "provided_clock" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "clock_provider" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBin_numchildrenAlign + { + sbyte f1; + private int numchildren; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBin_children_cookieAlign + { + sbyte f1; + private uint children_cookie; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBin_pollingAlign + { + sbyte f1; + private bool polling; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBin_state_dirtyAlign + { + sbyte f1; + private bool state_dirty; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBin_clock_dirtyAlign + { + sbyte f1; + private bool clock_dirty; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/BinFlags.cs b/sources/generated/Gst/BinFlags.cs new file mode 100644 index 0000000000..f4994387ed --- /dev/null +++ b/sources/generated/Gst/BinFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.BinFlagsGType))] + public enum BinFlags : uint { + + NoResync = 16384, + StreamsAware = 32768, + Last = 524288, + } + + internal class BinFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bin_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_bin_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Bitmask.cs b/sources/generated/Gst/Bitmask.cs new file mode 100644 index 0000000000..fdb8ceeb9d --- /dev/null +++ b/sources/generated/Gst/Bitmask.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Bitmask : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bitmask_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_bitmask_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public Bitmask(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Buffer.cs b/sources/generated/Gst/Buffer.cs new file mode 100644 index 0000000000..bb7144a829 --- /dev/null +++ b/sources/generated/Gst/Buffer.cs @@ -0,0 +1,750 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Buffer : Gst.MiniObject { + + public Gst.BufferPool Pool { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.BufferPool; + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public ulong Pts { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("pts")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("pts")); + *raw_ptr = value; + } + } + } + + public ulong Dts { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("dts")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("dts")); + *raw_ptr = value; + } + } + } + + public ulong Duration { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("duration")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("duration")); + *raw_ptr = value; + } + } + } + + public ulong Offset { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset")); + *raw_ptr = value; + } + } + } + + public ulong OffsetEnd { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset_end")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset_end")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_buffer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_custom_meta(IntPtr raw, IntPtr name); + + public Gst.CustomMeta AddCustomMeta(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_buffer_add_custom_meta(Handle, native_name); + Gst.CustomMeta ret = Gst.CustomMeta.New (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_meta(IntPtr raw, IntPtr info, IntPtr parms); + + public Gst.Meta AddMeta(Gst.MetaInfo info, IntPtr parms) { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + IntPtr raw_ret = gst_buffer_add_meta(Handle, native_info, parms); + Gst.Meta ret = Gst.Meta.New (raw_ret); + Marshal.FreeHGlobal (native_info); + return ret; + } + + public Gst.Meta AddMeta(Gst.MetaInfo info) { + return AddMeta (info, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_parent_buffer_meta(IntPtr raw, IntPtr reference); + + public Gst.ParentBufferMeta AddParentBufferMeta(Gst.Buffer reference) { + IntPtr raw_ret = gst_buffer_add_parent_buffer_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle); + Gst.ParentBufferMeta ret = Gst.ParentBufferMeta.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_protection_meta(IntPtr raw, IntPtr info); + + public Gst.ProtectionMeta AddProtectionMeta(Gst.Structure info) { + info.Owned = false; + IntPtr raw_ret = gst_buffer_add_protection_meta(Handle, info == null ? IntPtr.Zero : info.Handle); + Gst.ProtectionMeta ret = Gst.ProtectionMeta.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_add_reference_timestamp_meta(IntPtr raw, IntPtr reference, ulong timestamp, ulong duration); + + public Gst.ReferenceTimestampMeta AddReferenceTimestampMeta(Gst.Caps reference, ulong timestamp, ulong duration) { + IntPtr raw_ret = gst_buffer_add_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle, timestamp, duration); + Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_append(IntPtr raw, IntPtr buf2); + + public Gst.Buffer Append(Gst.Buffer buf2) { + buf2.Owned = false; + IntPtr raw_ret = gst_buffer_append(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_append_memory(IntPtr raw, IntPtr mem); + + public void AppendMemory(Gst.Memory mem) { + mem.Owned = false; + gst_buffer_append_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_append_region(IntPtr raw, IntPtr buf2, IntPtr offset, IntPtr size); + + public Gst.Buffer AppendRegion(Gst.Buffer buf2, long offset, long size) { + buf2.Owned = false; + IntPtr raw_ret = gst_buffer_append_region(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle, new IntPtr (offset), new IntPtr (size)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_copy_deep(IntPtr raw); + + public Gst.Buffer CopyDeep() { + IntPtr raw_ret = gst_buffer_copy_deep(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_copy_into(IntPtr raw, IntPtr src, int flags, UIntPtr offset, UIntPtr size); + + public bool CopyInto(Gst.Buffer src, Gst.BufferCopyFlags flags, ulong offset, ulong size) { + bool raw_ret = gst_buffer_copy_into(Handle, src == null ? IntPtr.Zero : src.Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size)); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_copy_region(IntPtr raw, int flags, UIntPtr offset, UIntPtr size); + + public Gst.Buffer CopyRegion(Gst.BufferCopyFlags flags, ulong offset, ulong size) { + IntPtr raw_ret = gst_buffer_copy_region(Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size)); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_fill(IntPtr raw, UIntPtr offset, byte[] src, UIntPtr n_length); + + public ulong Fill(ulong offset, byte[] src) { + UIntPtr raw_ret = gst_buffer_fill(Handle, new UIntPtr (offset), src, new UIntPtr ((ulong) (src == null ? 0 : src.Length))); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_find_memory(IntPtr raw, UIntPtr offset, UIntPtr size, out uint idx, out uint length, out UIntPtr skip); + + public bool FindMemory(ulong offset, ulong size, out uint idx, out uint length, out ulong skip) { + UIntPtr native_skip; + bool raw_ret = gst_buffer_find_memory(Handle, new UIntPtr (offset), new UIntPtr (size), out idx, out length, out native_skip); + bool ret = raw_ret; + skip = (ulong) native_skip; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_all_memory(IntPtr raw); + + public Gst.Memory AllMemory { + get { + IntPtr raw_ret = gst_buffer_get_all_memory(Handle); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_custom_meta(IntPtr raw, IntPtr name); + + public Gst.CustomMeta GetCustomMeta(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_buffer_get_custom_meta(Handle, native_name); + Gst.CustomMeta ret = Gst.CustomMeta.New (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_buffer_get_flags(IntPtr raw); + + public Gst.BufferFlags Flags { + get { + int raw_ret = gst_buffer_get_flags(Handle); + Gst.BufferFlags ret = (Gst.BufferFlags) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_memory(IntPtr raw, uint idx); + + public Gst.Memory GetMemory(uint idx) { + IntPtr raw_ret = gst_buffer_get_memory(Handle, idx); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_memory_range(IntPtr raw, uint idx, int length); + + public Gst.Memory GetMemoryRange(uint idx, int length) { + IntPtr raw_ret = gst_buffer_get_memory_range(Handle, idx, length); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_meta(IntPtr raw, IntPtr api); + + public Gst.Meta GetMeta(GLib.GType api) { + IntPtr raw_ret = gst_buffer_get_meta(Handle, api.Val); + Gst.Meta ret = Gst.Meta.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_get_n_meta(IntPtr raw, IntPtr api_type); + + public uint GetNMeta(GLib.GType api_type) { + uint raw_ret = gst_buffer_get_n_meta(Handle, api_type.Val); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_get_reference_timestamp_meta(IntPtr raw, IntPtr reference); + + public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta(Gst.Caps reference) { + IntPtr raw_ret = gst_buffer_get_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle); + Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret); + return ret; + } + + public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta() { + return GetReferenceTimestampMeta (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_get_size(IntPtr raw); + + public ulong Size { + get { + UIntPtr raw_ret = gst_buffer_get_size(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_get_sizes(IntPtr raw, out UIntPtr offset, out UIntPtr maxsize); + + public ulong GetSizes(out ulong offset, out ulong maxsize) { + UIntPtr native_offset; + UIntPtr native_maxsize; + UIntPtr raw_ret = gst_buffer_get_sizes(Handle, out native_offset, out native_maxsize); + ulong ret = (ulong) raw_ret; + offset = (ulong) native_offset; + maxsize = (ulong) native_maxsize; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_get_sizes_range(IntPtr raw, uint idx, int length, out UIntPtr offset, out UIntPtr maxsize); + + public ulong GetSizesRange(uint idx, int length, out ulong offset, out ulong maxsize) { + UIntPtr native_offset; + UIntPtr native_maxsize; + UIntPtr raw_ret = gst_buffer_get_sizes_range(Handle, idx, length, out native_offset, out native_maxsize); + ulong ret = (ulong) raw_ret; + offset = (ulong) native_offset; + maxsize = (ulong) native_maxsize; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_has_flags(IntPtr raw, int flags); + + public bool HasFlags(Gst.BufferFlags flags) { + bool raw_ret = gst_buffer_has_flags(Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_insert_memory(IntPtr raw, int idx, IntPtr mem); + + public void InsertMemory(int idx, Gst.Memory mem) { + mem.Owned = false; + gst_buffer_insert_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_is_all_memory_writable(IntPtr raw); + + public bool IsAllMemoryWritable { + get { + bool raw_ret = gst_buffer_is_all_memory_writable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_is_memory_range_writable(IntPtr raw, uint idx, int length); + + public bool IsMemoryRangeWritable(uint idx, int length) { + bool raw_ret = gst_buffer_is_memory_range_writable(Handle, idx, length); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_map(IntPtr raw, IntPtr info, int flags); + + public bool Map(out Gst.MapInfo info, Gst.MapFlags flags) { + IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo))); + bool raw_ret = gst_buffer_map(Handle, native_info, (int) flags); + bool ret = raw_ret; + info = Gst.MapInfo.New (native_info); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_map_range(IntPtr raw, uint idx, int length, IntPtr info, int flags); + + public bool MapRange(uint idx, int length, out Gst.MapInfo info, Gst.MapFlags flags) { + IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo))); + bool raw_ret = gst_buffer_map_range(Handle, idx, length, native_info, (int) flags); + bool ret = raw_ret; + info = Gst.MapInfo.New (native_info); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_buffer_memcmp(IntPtr raw, UIntPtr offset, byte[] mem, UIntPtr n_length); + + public int Memcmp(ulong offset, byte[] mem) { + int raw_ret = gst_buffer_memcmp(Handle, new UIntPtr (offset), mem, new UIntPtr ((ulong) (mem == null ? 0 : mem.Length))); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_memset(IntPtr raw, UIntPtr offset, byte val, UIntPtr size); + + public ulong Memset(ulong offset, byte val, ulong size) { + UIntPtr raw_ret = gst_buffer_memset(Handle, new UIntPtr (offset), val, new UIntPtr (size)); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_n_memory(IntPtr raw); + + public uint NMemory() { + uint raw_ret = gst_buffer_n_memory(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_peek_memory(IntPtr raw, uint idx); + + public Gst.Memory PeekMemory(uint idx) { + IntPtr raw_ret = gst_buffer_peek_memory(Handle, idx); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_prepend_memory(IntPtr raw, IntPtr mem); + + public void PrependMemory(Gst.Memory mem) { + mem.Owned = false; + gst_buffer_prepend_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_remove_all_memory(IntPtr raw); + + public void RemoveAllMemory() { + gst_buffer_remove_all_memory(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_remove_memory(IntPtr raw, uint idx); + + public void RemoveMemory(uint idx) { + gst_buffer_remove_memory(Handle, idx); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_remove_memory_range(IntPtr raw, uint idx, int length); + + public void RemoveMemoryRange(uint idx, int length) { + gst_buffer_remove_memory_range(Handle, idx, length); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_remove_meta(IntPtr raw, IntPtr meta); + + public bool RemoveMeta(Gst.Meta meta) { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool raw_ret = gst_buffer_remove_meta(Handle, native_meta); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_meta); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_replace_all_memory(IntPtr raw, IntPtr mem); + + public void ReplaceAllMemory(Gst.Memory mem) { + mem.Owned = false; + gst_buffer_replace_all_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_replace_memory(IntPtr raw, uint idx, IntPtr mem); + + public void ReplaceMemory(uint idx, Gst.Memory mem) { + mem.Owned = false; + gst_buffer_replace_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_replace_memory_range(IntPtr raw, uint idx, int length, IntPtr mem); + + public void ReplaceMemoryRange(uint idx, int length, Gst.Memory mem) { + mem.Owned = false; + gst_buffer_replace_memory_range(Handle, idx, length, mem == null ? IntPtr.Zero : mem.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_resize(IntPtr raw, IntPtr offset, IntPtr size); + + public void Resize(long offset, long size) { + gst_buffer_resize(Handle, new IntPtr (offset), new IntPtr (size)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_resize_range(IntPtr raw, uint idx, int length, IntPtr offset, IntPtr size); + + public bool ResizeRange(uint idx, int length, long offset, long size) { + bool raw_ret = gst_buffer_resize_range(Handle, idx, length, new IntPtr (offset), new IntPtr (size)); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_set_flags(IntPtr raw, int flags); + + public bool SetFlags(Gst.BufferFlags flags) { + bool raw_ret = gst_buffer_set_flags(Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_set_size(IntPtr raw, IntPtr size); + + public void SetSize(long size) { + gst_buffer_set_size(Handle, new IntPtr (size)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_unmap(IntPtr raw, IntPtr info); + + public void Unmap(Gst.MapInfo info) { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + gst_buffer_unmap(Handle, native_info); + Marshal.FreeHGlobal (native_info); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_unset_flags(IntPtr raw, int flags); + + public bool UnsetFlags(Gst.BufferFlags flags) { + bool raw_ret = gst_buffer_unset_flags(Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_get_max_memory(); + + public static uint MaxMemory { + get { + uint raw_ret = gst_buffer_get_max_memory(); + uint ret = raw_ret; + return ret; + } + } + + public Buffer(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_new(); + + public Buffer () + { + Raw = gst_buffer_new(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_new_allocate(IntPtr allocator, UIntPtr size, IntPtr parms); + + public Buffer (Gst.Allocator allocator, ulong size, Gst.AllocationParams parms) + { + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + Raw = gst_buffer_new_allocate(allocator == null ? IntPtr.Zero : allocator.Handle, new UIntPtr (size), native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_new_wrapped_bytes(IntPtr bytes); + + public Buffer (GLib.Bytes bytes) + { + Raw = gst_buffer_new_wrapped_bytes(bytes == null ? IntPtr.Zero : bytes.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_new_wrapped_full(int flags, byte[] data, UIntPtr maxsize, UIntPtr offset, UIntPtr size, IntPtr user_data, GLib.DestroyNotify notify); + + public Buffer (Gst.MemoryFlags flags, byte[] data, ulong maxsize, ulong offset, ulong size, IntPtr user_data, GLib.DestroyNotify notify) + { + Raw = gst_buffer_new_wrapped_full((int) flags, data, new UIntPtr (maxsize), new UIntPtr (offset), new UIntPtr (size), user_data, notify); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_buffer_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_buffer_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_buffer_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("pool" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool + , null + , "pts" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pts" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // pts + , "pool" + , "dts" + , (long) Marshal.OffsetOf(typeof(GstBuffer_ptsAlign), "pts") + , 0 + ), + new GLib.AbiField("dts" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // dts + , "pts" + , "duration" + , (long) Marshal.OffsetOf(typeof(GstBuffer_dtsAlign), "dts") + , 0 + ), + new GLib.AbiField("duration" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // duration + , "dts" + , "offset" + , (long) Marshal.OffsetOf(typeof(GstBuffer_durationAlign), "duration") + , 0 + ), + new GLib.AbiField("offset" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // offset + , "duration" + , "offset_end" + , (long) Marshal.OffsetOf(typeof(GstBuffer_offsetAlign), "offset") + , 0 + ), + new GLib.AbiField("offset_end" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // offset_end + , "offset" + , null + , (long) Marshal.OffsetOf(typeof(GstBuffer_offset_endAlign), "offset_end") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBuffer_ptsAlign + { + sbyte f1; + private ulong pts; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBuffer_dtsAlign + { + sbyte f1; + private ulong dts; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBuffer_durationAlign + { + sbyte f1; + private ulong duration; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBuffer_offsetAlign + { + sbyte f1; + private ulong offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBuffer_offset_endAlign + { + sbyte f1; + private ulong offset_end; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/BufferCopyFlags.cs b/sources/generated/Gst/BufferCopyFlags.cs new file mode 100644 index 0000000000..24bb8fcbe2 --- /dev/null +++ b/sources/generated/Gst/BufferCopyFlags.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.BufferCopyFlagsGType))] + public enum BufferCopyFlags : uint { + + None = 0, + Flags = 1, + Timestamps = 2, + Meta = 4, + Memory = 8, + Merge = 16, + Deep = 32, + } + + internal class BufferCopyFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_copy_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_buffer_copy_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/BufferFlags.cs b/sources/generated/Gst/BufferFlags.cs new file mode 100644 index 0000000000..611d3aca90 --- /dev/null +++ b/sources/generated/Gst/BufferFlags.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.BufferFlagsGType))] + public enum BufferFlags : uint { + + Live = 16, + DecodeOnly = 32, + Discont = 64, + Resync = 128, + Corrupted = 256, + Marker = 512, + Header = 1024, + Gap = 2048, + Droppable = 4096, + DeltaUnit = 8192, + TagMemory = 16384, + SyncAfter = 32768, + NonDroppable = 65536, + Last = 1048576, + } + + internal class BufferFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_buffer_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/BufferForeachMetaFunc.cs b/sources/generated/Gst/BufferForeachMetaFunc.cs new file mode 100644 index 0000000000..3b887648a4 --- /dev/null +++ b/sources/generated/Gst/BufferForeachMetaFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool BufferForeachMetaFunc(Gst.Buffer buffer, out Gst.Meta meta); + +} diff --git a/sources/generated/Gst/BufferList.cs b/sources/generated/Gst/BufferList.cs new file mode 100644 index 0000000000..18ffe1b8e4 --- /dev/null +++ b/sources/generated/Gst/BufferList.cs @@ -0,0 +1,159 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BufferList : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_buffer_list_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_buffer_list_calculate_size(IntPtr raw); + + public ulong CalculateSize() { + UIntPtr raw_ret = gst_buffer_list_calculate_size(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_copy_deep(IntPtr raw); + + public Gst.BufferList CopyDeep() { + IntPtr raw_ret = gst_buffer_list_copy_deep(Handle); + Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_list_foreach(IntPtr raw, GstSharp.BufferListFuncNative func, IntPtr user_data); + + public bool Foreach(Gst.BufferListFunc func) { + GstSharp.BufferListFuncWrapper func_wrapper = new GstSharp.BufferListFuncWrapper (func); + bool raw_ret = gst_buffer_list_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_get(IntPtr raw, uint idx); + + public Gst.Buffer Get(uint idx) { + IntPtr raw_ret = gst_buffer_list_get(Handle, idx); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_get_writable(IntPtr raw, uint idx); + + public Gst.Buffer GetWritable(uint idx) { + IntPtr raw_ret = gst_buffer_list_get_writable(Handle, idx); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_list_insert(IntPtr raw, int idx, IntPtr buffer); + + public void Insert(int idx, Gst.Buffer buffer) { + buffer.Owned = false; + gst_buffer_list_insert(Handle, idx, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_list_length(IntPtr raw); + + public uint Length() { + uint raw_ret = gst_buffer_list_length(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_list_remove(IntPtr raw, uint idx, uint length); + + public void Remove(uint idx, uint length) { + gst_buffer_list_remove(Handle, idx, length); + } + + public BufferList(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_new(); + + public BufferList () + { + Raw = gst_buffer_list_new(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_new_sized(uint size); + + public BufferList (uint size) + { + Raw = gst_buffer_list_new_sized(size); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_list_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_buffer_list_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_list_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_buffer_list_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_buffer_list_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/BufferListFunc.cs b/sources/generated/Gst/BufferListFunc.cs new file mode 100644 index 0000000000..1ca8be41dd --- /dev/null +++ b/sources/generated/Gst/BufferListFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool BufferListFunc(out Gst.Buffer buffer, uint idx); + +} diff --git a/sources/generated/Gst/BufferPool.cs b/sources/generated/Gst/BufferPool.cs new file mode 100644 index 0000000000..04e1693905 --- /dev/null +++ b/sources/generated/Gst/BufferPool.cs @@ -0,0 +1,1026 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class BufferPool : Gst.Object { + + public BufferPool (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_new(); + + public BufferPool () : base (IntPtr.Zero) + { + if (GetType () != typeof (BufferPool)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_buffer_pool_new(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("flushing")); + return (*raw_ptr); + } + } + set { + gst_buffer_pool_set_flushing(Handle, value); + } + } + + static GetOptionsNativeDelegate GetOptions_cb_delegate; + static GetOptionsNativeDelegate GetOptionsVMCallback { + get { + if (GetOptions_cb_delegate == null) + GetOptions_cb_delegate = new GetOptionsNativeDelegate (GetOptions_cb); + return GetOptions_cb_delegate; + } + } + + static void OverrideGetOptions (GLib.GType gtype) + { + OverrideGetOptions (gtype, GetOptionsVMCallback); + } + + static void OverrideGetOptions (GLib.GType gtype, GetOptionsNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_options")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetOptionsNativeDelegate (IntPtr inst); + + static IntPtr GetOptions_cb (IntPtr inst) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + string[] __result; + __result = __obj.OnGetOptions (); + return GLib.Marshaller.StringArrayToNullTermStrvPointer (__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideGetOptions")] + protected virtual string[] OnGetOptions () + { + return InternalGetOptions (); + } + + private string[] InternalGetOptions () + { + GetOptionsNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_options")); + unmanaged = (GetOptionsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetOptionsNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle); + return GLib.Marshaller.NullTermPtrToStringArray (__result, false); + } + + static SetConfigNativeDelegate SetConfig_cb_delegate; + static SetConfigNativeDelegate SetConfigVMCallback { + get { + if (SetConfig_cb_delegate == null) + SetConfig_cb_delegate = new SetConfigNativeDelegate (SetConfig_cb); + return SetConfig_cb_delegate; + } + } + + static void OverrideSetConfig (GLib.GType gtype) + { + OverrideSetConfig (gtype, SetConfigVMCallback); + } + + static void OverrideSetConfig (GLib.GType gtype, SetConfigNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_config")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetConfigNativeDelegate (IntPtr inst, IntPtr config); + + static bool SetConfig_cb (IntPtr inst, IntPtr config) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + bool __result; + __result = __obj.OnSetConfig (config == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (config, typeof (Gst.Structure), true)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideSetConfig")] + protected virtual bool OnSetConfig (Gst.Structure config) + { + return InternalSetConfig (config); + } + + private bool InternalSetConfig (Gst.Structure config) + { + SetConfigNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_config")); + unmanaged = (SetConfigNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetConfigNativeDelegate)); + } + if (unmanaged == null) return false; + + config.Owned = false; + bool __result = unmanaged (this.Handle, config == null ? IntPtr.Zero : config.Handle); + return __result; + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StopNativeDelegate (IntPtr inst); + + static bool Stop_cb (IntPtr inst) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + bool __result; + __result = __obj.OnStop (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideStop")] + protected virtual bool OnStop () + { + return InternalStop (); + } + + private bool InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static AcquireBufferNativeDelegate AcquireBuffer_cb_delegate; + static AcquireBufferNativeDelegate AcquireBufferVMCallback { + get { + if (AcquireBuffer_cb_delegate == null) + AcquireBuffer_cb_delegate = new AcquireBufferNativeDelegate (AcquireBuffer_cb); + return AcquireBuffer_cb_delegate; + } + } + + static void OverrideAcquireBuffer (GLib.GType gtype) + { + OverrideAcquireBuffer (gtype, AcquireBufferVMCallback); + } + + static void OverrideAcquireBuffer (GLib.GType gtype, AcquireBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("acquire_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AcquireBufferNativeDelegate (IntPtr inst, out IntPtr buffer, IntPtr parms); + + static int AcquireBuffer_cb (IntPtr inst, out IntPtr buffer, IntPtr parms) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + Gst.FlowReturn __result; + Gst.Buffer mybuffer; + __result = __obj.OnAcquireBuffer (out mybuffer, Gst.BufferPoolAcquireParams.New (parms)); + buffer = mybuffer == null ? IntPtr.Zero : mybuffer.Handle; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideAcquireBuffer")] + protected virtual Gst.FlowReturn OnAcquireBuffer (out Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) + { + return InternalAcquireBuffer (out buffer, parms); + } + + private Gst.FlowReturn InternalAcquireBuffer (out Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) + { + AcquireBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("acquire_buffer")); + unmanaged = (AcquireBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AcquireBufferNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr native_buffer; + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + int __result = unmanaged (this.Handle, out native_buffer, native_parms); + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_parms); + return (Gst.FlowReturn) __result; + } + + static AllocBufferNativeDelegate AllocBuffer_cb_delegate; + static AllocBufferNativeDelegate AllocBufferVMCallback { + get { + if (AllocBuffer_cb_delegate == null) + AllocBuffer_cb_delegate = new AllocBufferNativeDelegate (AllocBuffer_cb); + return AllocBuffer_cb_delegate; + } + } + + static void OverrideAllocBuffer (GLib.GType gtype) + { + OverrideAllocBuffer (gtype, AllocBufferVMCallback); + } + + static void OverrideAllocBuffer (GLib.GType gtype, AllocBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int AllocBufferNativeDelegate (IntPtr inst, IntPtr buffer, IntPtr parms); + + static int AllocBuffer_cb (IntPtr inst, IntPtr buffer, IntPtr parms) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + Gst.FlowReturn __result; + __result = __obj.OnAllocBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), Gst.BufferPoolAcquireParams.New (parms)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideAllocBuffer")] + protected virtual Gst.FlowReturn OnAllocBuffer (Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) + { + return InternalAllocBuffer (buffer, parms); + } + + private Gst.FlowReturn InternalAllocBuffer (Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) + { + AllocBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("alloc_buffer")); + unmanaged = (AllocBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AllocBufferNativeDelegate)); + } + if (unmanaged == null) return (Gst.FlowReturn) 0; + + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, native_parms); + Marshal.FreeHGlobal (native_parms); + return (Gst.FlowReturn) __result; + } + + static ResetBufferNativeDelegate ResetBuffer_cb_delegate; + static ResetBufferNativeDelegate ResetBufferVMCallback { + get { + if (ResetBuffer_cb_delegate == null) + ResetBuffer_cb_delegate = new ResetBufferNativeDelegate (ResetBuffer_cb); + return ResetBuffer_cb_delegate; + } + } + + static void OverrideResetBuffer (GLib.GType gtype) + { + OverrideResetBuffer (gtype, ResetBufferVMCallback); + } + + static void OverrideResetBuffer (GLib.GType gtype, ResetBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ResetBufferNativeDelegate (IntPtr inst, IntPtr buffer); + + static void ResetBuffer_cb (IntPtr inst, IntPtr buffer) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + __obj.OnResetBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideResetBuffer")] + protected virtual void OnResetBuffer (Gst.Buffer buffer) + { + InternalResetBuffer (buffer); + } + + private void InternalResetBuffer (Gst.Buffer buffer) + { + ResetBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset_buffer")); + unmanaged = (ResetBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetBufferNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + static ReleaseBufferNativeDelegate ReleaseBuffer_cb_delegate; + static ReleaseBufferNativeDelegate ReleaseBufferVMCallback { + get { + if (ReleaseBuffer_cb_delegate == null) + ReleaseBuffer_cb_delegate = new ReleaseBufferNativeDelegate (ReleaseBuffer_cb); + return ReleaseBuffer_cb_delegate; + } + } + + static void OverrideReleaseBuffer (GLib.GType gtype) + { + OverrideReleaseBuffer (gtype, ReleaseBufferVMCallback); + } + + static void OverrideReleaseBuffer (GLib.GType gtype, ReleaseBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("release_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ReleaseBufferNativeDelegate (IntPtr inst, IntPtr buffer); + + static void ReleaseBuffer_cb (IntPtr inst, IntPtr buffer) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + __obj.OnReleaseBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), true)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideReleaseBuffer")] + protected virtual void OnReleaseBuffer (Gst.Buffer buffer) + { + InternalReleaseBuffer (buffer); + } + + private void InternalReleaseBuffer (Gst.Buffer buffer) + { + ReleaseBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("release_buffer")); + unmanaged = (ReleaseBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReleaseBufferNativeDelegate)); + } + if (unmanaged == null) return; + + buffer.Owned = false; + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + static FreeBufferNativeDelegate FreeBuffer_cb_delegate; + static FreeBufferNativeDelegate FreeBufferVMCallback { + get { + if (FreeBuffer_cb_delegate == null) + FreeBuffer_cb_delegate = new FreeBufferNativeDelegate (FreeBuffer_cb); + return FreeBuffer_cb_delegate; + } + } + + static void OverrideFreeBuffer (GLib.GType gtype) + { + OverrideFreeBuffer (gtype, FreeBufferVMCallback); + } + + static void OverrideFreeBuffer (GLib.GType gtype, FreeBufferNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("free_buffer")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FreeBufferNativeDelegate (IntPtr inst, IntPtr buffer); + + static void FreeBuffer_cb (IntPtr inst, IntPtr buffer) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + __obj.OnFreeBuffer (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideFreeBuffer")] + protected virtual void OnFreeBuffer (Gst.Buffer buffer) + { + InternalFreeBuffer (buffer); + } + + private void InternalFreeBuffer (Gst.Buffer buffer) + { + FreeBufferNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("free_buffer")); + unmanaged = (FreeBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FreeBufferNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + static FlushStartNativeDelegate FlushStart_cb_delegate; + static FlushStartNativeDelegate FlushStartVMCallback { + get { + if (FlushStart_cb_delegate == null) + FlushStart_cb_delegate = new FlushStartNativeDelegate (FlushStart_cb); + return FlushStart_cb_delegate; + } + } + + static void OverrideFlushStart (GLib.GType gtype) + { + OverrideFlushStart (gtype, FlushStartVMCallback); + } + + static void OverrideFlushStart (GLib.GType gtype, FlushStartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush_start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FlushStartNativeDelegate (IntPtr inst); + + static void FlushStart_cb (IntPtr inst) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + __obj.OnFlushStart (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideFlushStart")] + protected virtual void OnFlushStart () + { + InternalFlushStart (); + } + + private void InternalFlushStart () + { + FlushStartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush_start")); + unmanaged = (FlushStartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushStartNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static FlushStopNativeDelegate FlushStop_cb_delegate; + static FlushStopNativeDelegate FlushStopVMCallback { + get { + if (FlushStop_cb_delegate == null) + FlushStop_cb_delegate = new FlushStopNativeDelegate (FlushStop_cb); + return FlushStop_cb_delegate; + } + } + + static void OverrideFlushStop (GLib.GType gtype) + { + OverrideFlushStop (gtype, FlushStopVMCallback); + } + + static void OverrideFlushStop (GLib.GType gtype, FlushStopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush_stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FlushStopNativeDelegate (IntPtr inst); + + static void FlushStop_cb (IntPtr inst) + { + try { + BufferPool __obj = GLib.Object.GetObject (inst, false) as BufferPool; + __obj.OnFlushStop (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.BufferPool), ConnectionMethod="OverrideFlushStop")] + protected virtual void OnFlushStop () + { + InternalFlushStop (); + } + + private void InternalFlushStop () + { + FlushStopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush_stop")); + unmanaged = (FlushStopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushStopNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_options" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_options + , null + , "set_config" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_config" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_config + , "get_options" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "set_config" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "acquire_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("acquire_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // acquire_buffer + , "stop" + , "alloc_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("alloc_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // alloc_buffer + , "acquire_buffer" + , "reset_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reset_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset_buffer + , "alloc_buffer" + , "release_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("release_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // release_buffer + , "reset_buffer" + , "free_buffer" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("free_buffer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // free_buffer + , "release_buffer" + , "flush_start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush_start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush_start + , "free_buffer" + , "flush_stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flush_stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush_stop + , "flush_start" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved + , "flush_stop" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_buffer_pool_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_config_add_option(IntPtr config, IntPtr option); + + public static void ConfigAddOption(Gst.Structure config, string option) { + IntPtr native_option = GLib.Marshaller.StringToPtrGStrdup (option); + gst_buffer_pool_config_add_option(config == null ? IntPtr.Zero : config.Handle, native_option); + GLib.Marshaller.Free (native_option); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_config_get_allocator(IntPtr config, out IntPtr allocator, IntPtr parms); + + public static bool ConfigGetAllocator(Gst.Structure config, out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + bool raw_ret = gst_buffer_pool_config_get_allocator(config == null ? IntPtr.Zero : config.Handle, out native_allocator, native_parms); + bool ret = raw_ret; + allocator = GLib.Object.GetObject(native_allocator) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_config_get_option(IntPtr config, uint index); + + public static string ConfigGetOption(Gst.Structure config, uint index) { + IntPtr raw_ret = gst_buffer_pool_config_get_option(config == null ? IntPtr.Zero : config.Handle, index); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_config_get_params(IntPtr config, out IntPtr caps, out uint size, out uint min_buffers, out uint max_buffers); + + public static bool ConfigGetParams(Gst.Structure config, out Gst.Caps caps, out uint size, out uint min_buffers, out uint max_buffers) { + IntPtr native_caps; + bool raw_ret = gst_buffer_pool_config_get_params(config == null ? IntPtr.Zero : config.Handle, out native_caps, out size, out min_buffers, out max_buffers); + bool ret = raw_ret; + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_config_has_option(IntPtr config, IntPtr option); + + public static bool ConfigHasOption(Gst.Structure config, string option) { + IntPtr native_option = GLib.Marshaller.StringToPtrGStrdup (option); + bool raw_ret = gst_buffer_pool_config_has_option(config == null ? IntPtr.Zero : config.Handle, native_option); + bool ret = raw_ret; + GLib.Marshaller.Free (native_option); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_pool_config_n_options(IntPtr config); + + public static uint ConfigNOptions(Gst.Structure config) { + uint raw_ret = gst_buffer_pool_config_n_options(config == null ? IntPtr.Zero : config.Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_config_set_allocator(IntPtr config, IntPtr allocator, IntPtr parms); + + public static void ConfigSetAllocator(Gst.Structure config, Gst.Allocator allocator, Gst.AllocationParams parms) { + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + gst_buffer_pool_config_set_allocator(config == null ? IntPtr.Zero : config.Handle, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms); + Marshal.FreeHGlobal (native_parms); + } + + public static void ConfigSetAllocator(Gst.Structure config) { + ConfigSetAllocator (config, null, Gst.AllocationParams.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_config_set_params(IntPtr config, IntPtr caps, uint size, uint min_buffers, uint max_buffers); + + public static void ConfigSetParams(Gst.Structure config, Gst.Caps caps, uint size, uint min_buffers, uint max_buffers) { + gst_buffer_pool_config_set_params(config == null ? IntPtr.Zero : config.Handle, caps == null ? IntPtr.Zero : caps.Handle, size, min_buffers, max_buffers); + } + + public static void ConfigSetParams(Gst.Structure config, uint size, uint min_buffers, uint max_buffers) { + ConfigSetParams (config, null, size, min_buffers, max_buffers); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_config_validate_params(IntPtr config, IntPtr caps, uint size, uint min_buffers, uint max_buffers); + + public static bool ConfigValidateParams(Gst.Structure config, Gst.Caps caps, uint size, uint min_buffers, uint max_buffers) { + bool raw_ret = gst_buffer_pool_config_validate_params(config == null ? IntPtr.Zero : config.Handle, caps == null ? IntPtr.Zero : caps.Handle, size, min_buffers, max_buffers); + bool ret = raw_ret; + return ret; + } + + public static bool ConfigValidateParams(Gst.Structure config, uint size, uint min_buffers, uint max_buffers) { + return ConfigValidateParams (config, null, size, min_buffers, max_buffers); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_buffer_pool_acquire_buffer(IntPtr raw, out IntPtr buffer, IntPtr parms); + + public Gst.FlowReturn AcquireBuffer(out Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) { + IntPtr native_buffer; + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + int raw_ret = gst_buffer_pool_acquire_buffer(Handle, out native_buffer, native_parms); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + Marshal.FreeHGlobal (native_parms); + return ret; + } + + public Gst.FlowReturn AcquireBuffer(out Gst.Buffer buffer) { + return AcquireBuffer (out buffer, Gst.BufferPoolAcquireParams.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_get_config(IntPtr raw); + + public Gst.Structure Config { + get { + IntPtr raw_ret = gst_buffer_pool_get_config(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_get_options(IntPtr raw); + + public string[] Options { + get { + IntPtr raw_ret = gst_buffer_pool_get_options(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_has_option(IntPtr raw, IntPtr option); + + public bool HasOption(string option) { + IntPtr native_option = GLib.Marshaller.StringToPtrGStrdup (option); + bool raw_ret = gst_buffer_pool_has_option(Handle, native_option); + bool ret = raw_ret; + GLib.Marshaller.Free (native_option); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_is_active(IntPtr raw); + + public bool IsActive { + get { + bool raw_ret = gst_buffer_pool_is_active(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_buffer_pool_release_buffer(IntPtr raw, IntPtr buffer); + + public void ReleaseBuffer(Gst.Buffer buffer) { + buffer.Owned = false; + gst_buffer_pool_release_buffer(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_set_active(IntPtr raw, bool active); + + public bool SetActive(bool active) { + bool raw_ret = gst_buffer_pool_set_active(Handle, active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_buffer_pool_set_config(IntPtr raw, IntPtr config); + + public bool SetConfig(Gst.Structure config) { + config.Owned = false; + bool raw_ret = gst_buffer_pool_set_config(Handle, config == null ? IntPtr.Zero : config.Handle); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("flushing" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(bool)) // flushing + , null + , "priv" + , (long) Marshal.OffsetOf(typeof(GstBufferPool_flushingAlign), "flushing") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "flushing" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstBufferPool_flushingAlign + { + sbyte f1; + private bool flushing; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/BufferPoolAcquireFlags.cs b/sources/generated/Gst/BufferPoolAcquireFlags.cs new file mode 100644 index 0000000000..4df0b1a18b --- /dev/null +++ b/sources/generated/Gst/BufferPoolAcquireFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.BufferPoolAcquireFlagsGType))] + public enum BufferPoolAcquireFlags : uint { + + None = 0, + KeyUnit = 1, + Dontwait = 2, + Discont = 4, + Last = 65536, + } + + internal class BufferPoolAcquireFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffer_pool_acquire_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_buffer_pool_acquire_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/BufferPoolAcquireParams.cs b/sources/generated/Gst/BufferPoolAcquireParams.cs new file mode 100644 index 0000000000..c9cca37042 --- /dev/null +++ b/sources/generated/Gst/BufferPoolAcquireParams.cs @@ -0,0 +1,50 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct BufferPoolAcquireParams : IEquatable { + + public Gst.Format Format; + public long Start; + public long Stop; + public Gst.BufferPoolAcquireFlags Flags; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.BufferPoolAcquireParams Zero = new Gst.BufferPoolAcquireParams (); + + public static Gst.BufferPoolAcquireParams New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.BufferPoolAcquireParams.Zero; + return (Gst.BufferPoolAcquireParams) Marshal.PtrToStructure (raw, typeof (Gst.BufferPoolAcquireParams)); + } + + public bool Equals (BufferPoolAcquireParams other) + { + return true && Format.Equals (other.Format) && Start.Equals (other.Start) && Stop.Equals (other.Stop) && Flags.Equals (other.Flags); + } + + public override bool Equals (object other) + { + return other is BufferPoolAcquireParams && Equals ((BufferPoolAcquireParams) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Format.GetHashCode () ^ Start.GetHashCode () ^ Stop.GetHashCode () ^ Flags.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/BufferingMode.cs b/sources/generated/Gst/BufferingMode.cs new file mode 100644 index 0000000000..8ccbbcfc91 --- /dev/null +++ b/sources/generated/Gst/BufferingMode.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.BufferingModeGType))] + public enum BufferingMode { + + Stream = 0, + Download = 1, + Timeshift = 2, + Live = 3, + } + + internal class BufferingModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_buffering_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_buffering_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Bus.cs b/sources/generated/Gst/Bus.cs new file mode 100644 index 0000000000..a146d1567a --- /dev/null +++ b/sources/generated/Gst/Bus.cs @@ -0,0 +1,441 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Bus : Gst.Object { + + public Bus (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_new(); + + public Bus () : base (IntPtr.Zero) + { + if (GetType () != typeof (Bus)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_bus_new(); + } + + [GLib.Signal("message")] + public event Gst.MessageHandler Message { + add { + this.AddSignalHandler ("message", value, typeof (Gst.MessageArgs)); + } + remove { + this.RemoveSignalHandler ("message", value); + } + } + + [GLib.Signal("sync-message")] + public event Gst.SyncMessageHandler SyncMessage { + add { + this.AddSignalHandler ("sync-message", value, typeof (Gst.SyncMessageArgs)); + } + remove { + this.RemoveSignalHandler ("sync-message", value); + } + } + + static MessageNativeDelegate Message_cb_delegate; + static MessageNativeDelegate MessageVMCallback { + get { + if (Message_cb_delegate == null) + Message_cb_delegate = new MessageNativeDelegate (Message_cb); + return Message_cb_delegate; + } + } + + static void OverrideMessage (GLib.GType gtype) + { + OverrideMessage (gtype, MessageVMCallback); + } + + static void OverrideMessage (GLib.GType gtype, MessageNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("message")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void MessageNativeDelegate (IntPtr inst, IntPtr message); + + static void Message_cb (IntPtr inst, IntPtr message) + { + try { + Bus __obj = GLib.Object.GetObject (inst, false) as Bus; + __obj.OnMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bus), ConnectionMethod="OverrideMessage")] + protected virtual void OnMessage (Gst.Message message) + { + InternalMessage (message); + } + + private void InternalMessage (Gst.Message message) + { + MessageNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("message")); + unmanaged = (MessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MessageNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle); + } + + static SyncMessageNativeDelegate SyncMessage_cb_delegate; + static SyncMessageNativeDelegate SyncMessageVMCallback { + get { + if (SyncMessage_cb_delegate == null) + SyncMessage_cb_delegate = new SyncMessageNativeDelegate (SyncMessage_cb); + return SyncMessage_cb_delegate; + } + } + + static void OverrideSyncMessage (GLib.GType gtype) + { + OverrideSyncMessage (gtype, SyncMessageVMCallback); + } + + static void OverrideSyncMessage (GLib.GType gtype, SyncMessageNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_message")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SyncMessageNativeDelegate (IntPtr inst, IntPtr message); + + static void SyncMessage_cb (IntPtr inst, IntPtr message) + { + try { + Bus __obj = GLib.Object.GetObject (inst, false) as Bus; + __obj.OnSyncMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Bus), ConnectionMethod="OverrideSyncMessage")] + protected virtual void OnSyncMessage (Gst.Message message) + { + InternalSyncMessage (message); + } + + private void InternalSyncMessage (Gst.Message message) + { + SyncMessageNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_message")); + unmanaged = (SyncMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SyncMessageNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("message" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // message + , null + , "sync_message" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("sync_message" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sync_message + , "message" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "sync_message" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_bus_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_add_signal_watch(IntPtr raw); + + public void AddSignalWatch() { + gst_bus_add_signal_watch(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_add_signal_watch_full(IntPtr raw, int priority); + + public void AddSignalWatchFull(int priority) { + gst_bus_add_signal_watch_full(Handle, priority); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_bus_add_watch_full(IntPtr raw, int priority, GstSharp.BusFuncNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public uint AddWatchFull(int priority, Gst.BusFunc func) { + GstSharp.BusFuncWrapper func_wrapper = new GstSharp.BusFuncWrapper (func); + IntPtr user_data; + GLib.DestroyNotify notify; + if (func == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + uint raw_ret = gst_bus_add_watch_full(Handle, priority, func_wrapper.NativeDelegate, user_data, notify); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bus_async_signal_func(IntPtr raw, IntPtr message, IntPtr data); + + public bool AsyncSignalFunc(Gst.Message message, IntPtr data) { + bool raw_ret = gst_bus_async_signal_func(Handle, message == null ? IntPtr.Zero : message.Handle, data); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_create_watch(IntPtr raw); + + public GLib.Source CreateWatch() { + IntPtr raw_ret = gst_bus_create_watch(Handle); + GLib.Source ret = new GLib.Source(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_disable_sync_message_emission(IntPtr raw); + + public void DisableSyncMessageEmission() { + gst_bus_disable_sync_message_emission(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_enable_sync_message_emission(IntPtr raw); + + public void EnableSyncMessageEmission() { + gst_bus_enable_sync_message_emission(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_get_pollfd(IntPtr raw, out GLib.PollFD fd); + + public GLib.PollFD Pollfd { + get { + GLib.PollFD fd; + gst_bus_get_pollfd(Handle, out fd); + return fd; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bus_have_pending(IntPtr raw); + + public bool HavePending() { + bool raw_ret = gst_bus_have_pending(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_peek(IntPtr raw); + + public Gst.Message Peek() { + IntPtr raw_ret = gst_bus_peek(Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_poll(IntPtr raw, int events, ulong timeout); + + public Gst.Message Poll(Gst.MessageType events, ulong timeout) { + IntPtr raw_ret = gst_bus_poll(Handle, (int) events, timeout); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_pop(IntPtr raw); + + public Gst.Message Pop() { + IntPtr raw_ret = gst_bus_pop(Handle); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_pop_filtered(IntPtr raw, int types); + + public Gst.Message PopFiltered(Gst.MessageType types) { + IntPtr raw_ret = gst_bus_pop_filtered(Handle, (int) types); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bus_post(IntPtr raw, IntPtr message); + + public bool Post(Gst.Message message) { + message.Owned = false; + bool raw_ret = gst_bus_post(Handle, message == null ? IntPtr.Zero : message.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_remove_signal_watch(IntPtr raw); + + public void RemoveSignalWatch() { + gst_bus_remove_signal_watch(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_bus_remove_watch(IntPtr raw); + + public bool RemoveWatch() { + bool raw_ret = gst_bus_remove_watch(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + set { + gst_bus_set_flushing(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_bus_set_sync_handler(IntPtr raw, GstSharp.BusSyncHandlerNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.BusSyncHandler SyncHandler { + set { + GstSharp.BusSyncHandlerWrapper value_wrapper = new GstSharp.BusSyncHandlerWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_bus_set_sync_handler(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_bus_sync_signal_handler(IntPtr raw, IntPtr message, IntPtr data); + + public Gst.BusSyncReply SyncSignalHandler(Gst.Message message) { + int raw_ret = gst_bus_sync_signal_handler(Handle, message == null ? IntPtr.Zero : message.Handle, IntPtr.Zero); + Gst.BusSyncReply ret = (Gst.BusSyncReply) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_timed_pop(IntPtr raw, ulong timeout); + + public Gst.Message TimedPop(ulong timeout) { + IntPtr raw_ret = gst_bus_timed_pop(Handle, timeout); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_timed_pop_filtered(IntPtr raw, ulong timeout, int types); + + public Gst.Message TimedPopFiltered(ulong timeout, Gst.MessageType types) { + IntPtr raw_ret = gst_bus_timed_pop_filtered(Handle, timeout, (int) types); + Gst.Message ret = raw_ret == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Message), true); + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/BusFlags.cs b/sources/generated/Gst/BusFlags.cs new file mode 100644 index 0000000000..5a3afc487d --- /dev/null +++ b/sources/generated/Gst/BusFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.BusFlagsGType))] + public enum BusFlags : uint { + + Flushing = 16, + FlagLast = 32, + } + + internal class BusFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_bus_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/BusFunc.cs b/sources/generated/Gst/BusFunc.cs new file mode 100644 index 0000000000..c152640711 --- /dev/null +++ b/sources/generated/Gst/BusFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool BusFunc(Gst.Bus bus, Gst.Message message); + +} diff --git a/sources/generated/Gst/BusSyncHandler.cs b/sources/generated/Gst/BusSyncHandler.cs new file mode 100644 index 0000000000..61513bfa67 --- /dev/null +++ b/sources/generated/Gst/BusSyncHandler.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.BusSyncReply BusSyncHandler(Gst.Bus bus, Gst.Message message); + +} diff --git a/sources/generated/Gst/BusSyncReply.cs b/sources/generated/Gst/BusSyncReply.cs new file mode 100644 index 0000000000..eec6d6eeff --- /dev/null +++ b/sources/generated/Gst/BusSyncReply.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.BusSyncReplyGType))] + public enum BusSyncReply { + + Drop = 0, + Pass = 1, + Async = 2, + } + + internal class BusSyncReplyGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_bus_sync_reply_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_bus_sync_reply_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Caps.cs b/sources/generated/Gst/Caps.cs new file mode 100644 index 0000000000..0c56e6deed --- /dev/null +++ b/sources/generated/Gst/Caps.cs @@ -0,0 +1,485 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Caps : Gst.MiniObject { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_caps_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_append(IntPtr raw, IntPtr caps2); + + public void Append(Gst.Caps caps2) { + caps2.Owned = false; + gst_caps_append(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_append_structure(IntPtr raw, IntPtr structure); + + public void AppendStructure(Gst.Structure structure) { + structure.Owned = false; + gst_caps_append_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_append_structure_full(IntPtr raw, IntPtr structure, IntPtr features); + + public void AppendStructureFull(Gst.Structure structure, Gst.CapsFeatures features) { + structure.Owned = false; + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + gst_caps_append_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features); + Marshal.FreeHGlobal (native_features); + } + + public void AppendStructureFull(Gst.Structure structure) { + AppendStructureFull (structure, Gst.CapsFeatures.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_can_intersect(IntPtr raw, IntPtr caps2); + + public bool CanIntersect(Gst.Caps caps2) { + bool raw_ret = gst_caps_can_intersect(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_copy(IntPtr raw); + + public Gst.Caps Copy() { + IntPtr raw_ret = gst_caps_copy(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_copy_nth(IntPtr raw, uint nth); + + public Gst.Caps CopyNth(uint nth) { + IntPtr raw_ret = gst_caps_copy_nth(Handle, nth); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_filter_and_map_in_place(IntPtr raw, GstSharp.CapsFilterMapFuncNative func, IntPtr user_data); + + public void FilterAndMapInPlace(Gst.CapsFilterMapFunc func) { + GstSharp.CapsFilterMapFuncWrapper func_wrapper = new GstSharp.CapsFilterMapFuncWrapper (func); + gst_caps_filter_and_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_fixate(IntPtr raw); + + public Gst.Caps Fixate() { + IntPtr raw_ret = gst_caps_fixate(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_foreach(IntPtr raw, GstSharp.CapsForeachFuncNative func, IntPtr user_data); + + public bool Foreach(Gst.CapsForeachFunc func) { + GstSharp.CapsForeachFuncWrapper func_wrapper = new GstSharp.CapsForeachFuncWrapper (func); + bool raw_ret = gst_caps_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_get_features(IntPtr raw, uint index); + + public Gst.CapsFeatures GetFeatures(uint index) { + IntPtr raw_ret = gst_caps_get_features(Handle, index); + Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_caps_get_size(IntPtr raw); + + public uint Size { + get { + uint raw_ret = gst_caps_get_size(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_get_structure(IntPtr raw, uint index); + + public Gst.Structure GetStructure(uint index) { + IntPtr raw_ret = gst_caps_get_structure(Handle, index); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_intersect(IntPtr raw, IntPtr caps2); + + public Gst.Caps Intersect(Gst.Caps caps2) { + IntPtr raw_ret = gst_caps_intersect(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_intersect_full(IntPtr raw, IntPtr caps2, int mode); + + public Gst.Caps IntersectFull(Gst.Caps caps2, Gst.CapsIntersectMode mode) { + IntPtr raw_ret = gst_caps_intersect_full(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle, (int) mode); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_always_compatible(IntPtr raw, IntPtr caps2); + + public bool IsAlwaysCompatible(Gst.Caps caps2) { + bool raw_ret = gst_caps_is_always_compatible(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_any(IntPtr raw); + + public bool IsAny { + get { + bool raw_ret = gst_caps_is_any(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_empty(IntPtr raw); + + public bool IsEmpty { + get { + bool raw_ret = gst_caps_is_empty(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_equal(IntPtr raw, IntPtr caps2); + + public bool IsEqual(Gst.Caps caps2) { + bool raw_ret = gst_caps_is_equal(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_equal_fixed(IntPtr raw, IntPtr caps2); + + public bool IsEqualFixed(Gst.Caps caps2) { + bool raw_ret = gst_caps_is_equal_fixed(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_fixed(IntPtr raw); + + public bool IsFixed { + get { + bool raw_ret = gst_caps_is_fixed(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_strictly_equal(IntPtr raw, IntPtr caps2); + + public bool IsStrictlyEqual(Gst.Caps caps2) { + bool raw_ret = gst_caps_is_strictly_equal(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_subset(IntPtr raw, IntPtr superset); + + public bool IsSubset(Gst.Caps superset) { + bool raw_ret = gst_caps_is_subset(Handle, superset == null ? IntPtr.Zero : superset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_subset_structure(IntPtr raw, IntPtr structure); + + public bool IsSubsetStructure(Gst.Structure structure) { + bool raw_ret = gst_caps_is_subset_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_is_subset_structure_full(IntPtr raw, IntPtr structure, IntPtr features); + + public bool IsSubsetStructureFull(Gst.Structure structure, Gst.CapsFeatures features) { + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + bool raw_ret = gst_caps_is_subset_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_features); + return ret; + } + + public bool IsSubsetStructureFull(Gst.Structure structure) { + return IsSubsetStructureFull (structure, Gst.CapsFeatures.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_map_in_place(IntPtr raw, GstSharp.CapsMapFuncNative func, IntPtr user_data); + + public bool MapInPlace(Gst.CapsMapFunc func) { + GstSharp.CapsMapFuncWrapper func_wrapper = new GstSharp.CapsMapFuncWrapper (func); + bool raw_ret = gst_caps_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_merge(IntPtr raw, IntPtr caps2); + + public Gst.Caps Merge(Gst.Caps caps2) { + caps2.Owned = false; + IntPtr raw_ret = gst_caps_merge(Handle, caps2 == null ? IntPtr.Zero : caps2.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_merge_structure(IntPtr raw, IntPtr structure); + + public Gst.Caps MergeStructure(Gst.Structure structure) { + structure.Owned = false; + IntPtr raw_ret = gst_caps_merge_structure(Handle, structure == null ? IntPtr.Zero : structure.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_merge_structure_full(IntPtr raw, IntPtr structure, IntPtr features); + + public Gst.Caps MergeStructureFull(Gst.Structure structure, Gst.CapsFeatures features) { + structure.Owned = false; + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + IntPtr raw_ret = gst_caps_merge_structure_full(Handle, structure == null ? IntPtr.Zero : structure.Handle, native_features); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + Marshal.FreeHGlobal (native_features); + return ret; + } + + public Gst.Caps MergeStructureFull(Gst.Structure structure) { + return MergeStructureFull (structure, Gst.CapsFeatures.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_normalize(IntPtr raw); + + public Gst.Caps Normalize() { + IntPtr raw_ret = gst_caps_normalize(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_remove_structure(IntPtr raw, uint idx); + + public void RemoveStructure(uint idx) { + gst_caps_remove_structure(Handle, idx); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_set_features(IntPtr raw, uint index, IntPtr features); + + public void SetFeatures(uint index, Gst.CapsFeatures features) { + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + gst_caps_set_features(Handle, index, native_features); + Marshal.FreeHGlobal (native_features); + } + + public void SetFeatures(uint index) { + SetFeatures (index, Gst.CapsFeatures.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_set_features_simple(IntPtr raw, IntPtr value); + + public Gst.CapsFeatures FeaturesSimple { + set { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_caps_set_features_simple(Handle, native_value); + Marshal.FreeHGlobal (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_set_value(IntPtr raw, IntPtr field, IntPtr value); + + public void SetValue(string field, GLib.Value value) { + IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_caps_set_value(Handle, native_field, native_value); + GLib.Marshaller.Free (native_field); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_simplify(IntPtr raw); + + public Gst.Caps Simplify() { + IntPtr raw_ret = gst_caps_simplify(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_steal_structure(IntPtr raw, uint index); + + public Gst.Structure StealStructure(uint index) { + IntPtr raw_ret = gst_caps_steal_structure(Handle, index); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_subtract(IntPtr raw, IntPtr subtrahend); + + public Gst.Caps Subtract(Gst.Caps subtrahend) { + IntPtr raw_ret = gst_caps_subtract(Handle, subtrahend == null ? IntPtr.Zero : subtrahend.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_to_string(IntPtr raw); + + public override string ToString() { + IntPtr raw_ret = gst_caps_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_truncate(IntPtr raw); + + public Gst.Caps Truncate() { + IntPtr raw_ret = gst_caps_truncate(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_from_string(IntPtr str1ng); + + public static Gst.Caps FromString(string str1ng) { + IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); + IntPtr raw_ret = gst_caps_from_string(native_str1ng); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_str1ng); + return ret; + } + + public Caps(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_new_empty(); + + public Caps () + { + Raw = gst_caps_new_empty(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_new_empty_simple(IntPtr media_type); + + public Caps (string media_type) + { + IntPtr native_media_type = GLib.Marshaller.StringToPtrGStrdup (media_type); + Raw = gst_caps_new_empty_simple(native_media_type); + GLib.Marshaller.Free (native_media_type); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_new_any(); + + public static Caps NewAny() + { + Caps result = new Caps (gst_caps_new_any()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_caps_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_caps_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_caps_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/CapsFeatures.cs b/sources/generated/Gst/CapsFeatures.cs new file mode 100644 index 0000000000..e1d7beb8ad --- /dev/null +++ b/sources/generated/Gst/CapsFeatures.cs @@ -0,0 +1,271 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct CapsFeatures : IEquatable { + + + public static Gst.CapsFeatures Zero = new Gst.CapsFeatures (); + + public static Gst.CapsFeatures New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.CapsFeatures.Zero; + return (Gst.CapsFeatures) Marshal.PtrToStructure (raw, typeof (Gst.CapsFeatures)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_new_any(); + + public static CapsFeatures NewAny() + { + CapsFeatures result = CapsFeatures.New (gst_caps_features_new_any()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_new_empty(); + + public static CapsFeatures NewEmpty() + { + CapsFeatures result = CapsFeatures.New (gst_caps_features_new_empty()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_caps_features_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_features_add(IntPtr raw, IntPtr feature); + + public void Add(string feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_feature = GLib.Marshaller.StringToPtrGStrdup (feature); + gst_caps_features_add(this_as_native, native_feature); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_feature); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_features_add_id(IntPtr raw, uint feature); + + public void AddId(uint feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_caps_features_add_id(this_as_native, feature); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_features_contains(IntPtr raw, IntPtr feature); + + public bool Contains(string feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_feature = GLib.Marshaller.StringToPtrGStrdup (feature); + bool raw_ret = gst_caps_features_contains(this_as_native, native_feature); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_feature); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_features_contains_id(IntPtr raw, uint feature); + + public bool ContainsId(uint feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_caps_features_contains_id(this_as_native, feature); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_get_nth(IntPtr raw, uint i); + + public string GetNth(uint i) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_caps_features_get_nth(this_as_native, i); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_caps_features_get_nth_id(IntPtr raw, uint i); + + public uint GetNthId(uint i) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_caps_features_get_nth_id(this_as_native, i); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_caps_features_get_size(IntPtr raw); + + public uint Size { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_caps_features_get_size(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_features_is_any(IntPtr raw); + + public bool IsAny { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_caps_features_is_any(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_features_is_equal(IntPtr raw, IntPtr features2); + + public bool IsEqual(Gst.CapsFeatures features2) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_features2 = GLib.Marshaller.StructureToPtrAlloc (features2); + bool raw_ret = gst_caps_features_is_equal(this_as_native, native_features2); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_features2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_features_remove(IntPtr raw, IntPtr feature); + + public void Remove(string feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_feature = GLib.Marshaller.StringToPtrGStrdup (feature); + gst_caps_features_remove(this_as_native, native_feature); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_feature); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_caps_features_remove_id(IntPtr raw, uint feature); + + public void RemoveId(uint feature) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_caps_features_remove_id(this_as_native, feature); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_caps_features_set_parent_refcount(IntPtr raw, int refcount); + + public bool SetParentRefcount(int refcount) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_caps_features_set_parent_refcount(this_as_native, refcount); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_caps_features_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_from_string(IntPtr features); + + public static Gst.CapsFeatures FromString(string features) { + IntPtr native_features = GLib.Marshaller.StringToPtrGStrdup (features); + IntPtr raw_ret = gst_caps_features_from_string(native_features); + Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret); + GLib.Marshaller.Free (native_features); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.CapsFeatures target) + { + target = New (native); + } + + public bool Equals (CapsFeatures other) + { + return true; + } + + public override bool Equals (object other) + { + return other is CapsFeatures && Equals ((CapsFeatures) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.CapsFeatures boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.CapsFeatures.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.CapsFeatures (GLib.Value val) + { + return (Gst.CapsFeatures) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/CapsFilterMapFunc.cs b/sources/generated/Gst/CapsFilterMapFunc.cs new file mode 100644 index 0000000000..fc00067b27 --- /dev/null +++ b/sources/generated/Gst/CapsFilterMapFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool CapsFilterMapFunc(Gst.CapsFeatures features, Gst.Structure structure); + +} diff --git a/sources/generated/Gst/CapsFlags.cs b/sources/generated/Gst/CapsFlags.cs new file mode 100644 index 0000000000..20d3d34cc5 --- /dev/null +++ b/sources/generated/Gst/CapsFlags.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.CapsFlagsGType))] + public enum CapsFlags : uint { + + Any = 16, + } + + internal class CapsFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_caps_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/CapsForeachFunc.cs b/sources/generated/Gst/CapsForeachFunc.cs new file mode 100644 index 0000000000..8ec1965f45 --- /dev/null +++ b/sources/generated/Gst/CapsForeachFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool CapsForeachFunc(Gst.CapsFeatures features, Gst.Structure structure); + +} diff --git a/sources/generated/Gst/CapsIntersectMode.cs b/sources/generated/Gst/CapsIntersectMode.cs new file mode 100644 index 0000000000..1f783689d6 --- /dev/null +++ b/sources/generated/Gst/CapsIntersectMode.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.CapsIntersectModeGType))] + public enum CapsIntersectMode { + + ZigZag = 0, + First = 1, + } + + internal class CapsIntersectModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_intersect_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_caps_intersect_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/CapsMapFunc.cs b/sources/generated/Gst/CapsMapFunc.cs new file mode 100644 index 0000000000..f8ebe4f789 --- /dev/null +++ b/sources/generated/Gst/CapsMapFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool CapsMapFunc(Gst.CapsFeatures features, Gst.Structure structure); + +} diff --git a/sources/generated/Gst/ChildAddedEventHandler.cs b/sources/generated/Gst/ChildAddedEventHandler.cs new file mode 100644 index 0000000000..6f4c0a6d9d --- /dev/null +++ b/sources/generated/Gst/ChildAddedEventHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ChildAddedEventHandler(object o, ChildAddedEventArgs args); + + public class ChildAddedEventArgs : GLib.SignalArgs { + public GLib.Object Object{ + get { + return (GLib.Object) Args [0]; + } + } + + public string Name{ + get { + return (string) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/ChildProxyAdapter.cs b/sources/generated/Gst/ChildProxyAdapter.cs new file mode 100644 index 0000000000..692e731c84 --- /dev/null +++ b/sources/generated/Gst/ChildProxyAdapter.cs @@ -0,0 +1,256 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ChildProxyAdapter : GLib.GInterfaceAdapter, Gst.IChildProxy { + + [StructLayout (LayoutKind.Sequential)] + struct GstChildProxyInterface { + public GetChildByNameNativeDelegate GetChildByName; + public GetChildByIndexNativeDelegate GetChildByIndex; + public GetChildrenCountNativeDelegate GetChildrenCount; + IntPtr ChildAddedEvent; + IntPtr ChildRemovedEvent; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + } + + static GstChildProxyInterface iface; + + static ChildProxyAdapter () + { + GLib.GType.Register (_gtype, typeof (ChildProxyAdapter)); + iface.GetChildByName = new GetChildByNameNativeDelegate (GetChildByName_cb); + iface.GetChildByIndex = new GetChildByIndexNativeDelegate (GetChildByIndex_cb); + iface.GetChildrenCount = new GetChildrenCountNativeDelegate (GetChildrenCount_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetChildByNameNativeDelegate (IntPtr inst, IntPtr name); + + static IntPtr GetChildByName_cb (IntPtr inst, IntPtr name) + { + try { + IChildProxyImplementor __obj = GLib.Object.GetObject (inst, false) as IChildProxyImplementor; + GLib.Object __result; + __result = __obj.GetChildByName (GLib.Marshaller.Utf8PtrToString (name)); + return __result == null ? IntPtr.Zero : __result.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetChildByIndexNativeDelegate (IntPtr inst, uint index); + + static IntPtr GetChildByIndex_cb (IntPtr inst, uint index) + { + try { + IChildProxyImplementor __obj = GLib.Object.GetObject (inst, false) as IChildProxyImplementor; + GLib.Object __result; + __result = __obj.GetChildByIndex (index); + return __result == null ? IntPtr.Zero : __result.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate uint GetChildrenCountNativeDelegate (IntPtr inst); + + static uint GetChildrenCount_cb (IntPtr inst) + { + try { + IChildProxyImplementor __obj = GLib.Object.GetObject (inst, false) as IChildProxyImplementor; + uint __result; + __result = __obj.ChildrenCount; + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstChildProxyInterface native_iface = (GstChildProxyInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstChildProxyInterface)); + native_iface.GetChildByName = iface.GetChildByName; + native_iface.GetChildByIndex = iface.GetChildByIndex; + native_iface.GetChildrenCount = iface.GetChildrenCount; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public ChildProxyAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public ChildProxyAdapter (IChildProxyImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public ChildProxyAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_child_proxy_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_child_proxy_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IChildProxy GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IChildProxy GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IChildProxyImplementor) + return new ChildProxyAdapter (obj as IChildProxyImplementor); + else if (obj as IChildProxy == null) + return new ChildProxyAdapter (obj.Handle); + else + return obj as IChildProxy; + } + + public IChildProxyImplementor Implementor { + get { + return implementor as IChildProxyImplementor; + } + } + + [GLib.Signal("child-removed")] + public event Gst.ChildRemovedEventHandler ChildRemovedEvent { + add { + GLib.Object.GetObject (Handle).AddSignalHandler ("child-removed", value, typeof (Gst.ChildRemovedEventArgs)); + } + remove { + GLib.Object.GetObject (Handle).RemoveSignalHandler ("child-removed", value); + } + } + + [GLib.Signal("child-added")] + public event Gst.ChildAddedEventHandler ChildAddedEvent { + add { + GLib.Object.GetObject (Handle).AddSignalHandler ("child-added", value, typeof (Gst.ChildAddedEventArgs)); + } + remove { + GLib.Object.GetObject (Handle).RemoveSignalHandler ("child-added", value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_child_proxy_child_added(IntPtr raw, IntPtr child, IntPtr name); + + public void ChildAdded(GLib.Object child, string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_child_proxy_child_added(Handle, child == null ? IntPtr.Zero : child.Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_child_proxy_child_removed(IntPtr raw, IntPtr child, IntPtr name); + + public void ChildRemoved(GLib.Object child, string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_child_proxy_child_removed(Handle, child == null ? IntPtr.Zero : child.Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_child_proxy_get_child_by_index(IntPtr raw, uint index); + + public GLib.Object GetChildByIndex(uint index) { + IntPtr raw_ret = gst_child_proxy_get_child_by_index(Handle, index); + GLib.Object ret = GLib.Object.GetObject (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_child_proxy_get_child_by_name(IntPtr raw, IntPtr name); + + public GLib.Object GetChildByName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_child_proxy_get_child_by_name(Handle, native_name); + GLib.Object ret = GLib.Object.GetObject (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_child_proxy_get_children_count(IntPtr raw); + + public uint ChildrenCount { + get { + uint raw_ret = gst_child_proxy_get_children_count(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_child_proxy_lookup(IntPtr raw, IntPtr name, out IntPtr target, out IntPtr pspec); + + public bool Lookup(string name, out GLib.Object target, out IntPtr pspec) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_target; + bool raw_ret = gst_child_proxy_lookup(Handle, native_name, out native_target, out pspec); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + target = GLib.Object.GetObject (native_target); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/ChildRemovedEventHandler.cs b/sources/generated/Gst/ChildRemovedEventHandler.cs new file mode 100644 index 0000000000..8b15df9224 --- /dev/null +++ b/sources/generated/Gst/ChildRemovedEventHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ChildRemovedEventHandler(object o, ChildRemovedEventArgs args); + + public class ChildRemovedEventArgs : GLib.SignalArgs { + public GLib.Object Object{ + get { + return (GLib.Object) Args [0]; + } + } + + public string Name{ + get { + return (string) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/Clock.cs b/sources/generated/Gst/Clock.cs new file mode 100644 index 0000000000..8aaf76822b --- /dev/null +++ b/sources/generated/Gst/Clock.cs @@ -0,0 +1,878 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Clock : Gst.Object { + + protected Clock (IntPtr raw) : base(raw) {} + + protected Clock() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_get_timeout(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_set_timeout(IntPtr raw, ulong timeout); + + [GLib.Property ("timeout")] + public ulong Timeout { + get { + ulong raw_ret = gst_clock_get_timeout(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_clock_set_timeout(Handle, value); + } + } + + [GLib.Property ("window-size")] + public int WindowSize { + get { + GLib.Value val = GetProperty ("window-size"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("window-size", val); + val.Dispose (); + } + } + + [GLib.Property ("window-threshold")] + public int WindowThreshold { + get { + GLib.Value val = GetProperty ("window-threshold"); + int ret = (int) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("window-threshold", val); + val.Dispose (); + } + } + + [GLib.Signal("synced")] + public event Gst.SyncedHandler Synced { + add { + this.AddSignalHandler ("synced", value, typeof (Gst.SyncedArgs)); + } + remove { + this.RemoveSignalHandler ("synced", value); + } + } + + static SyncedNativeDelegate Synced_cb_delegate; + static SyncedNativeDelegate SyncedVMCallback { + get { + if (Synced_cb_delegate == null) + Synced_cb_delegate = new SyncedNativeDelegate (Synced_cb); + return Synced_cb_delegate; + } + } + + static void OverrideSynced (GLib.GType gtype) + { + OverrideSynced (gtype, SyncedVMCallback); + } + + static void OverrideSynced (GLib.GType gtype, SyncedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "synced", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SyncedNativeDelegate (IntPtr inst, bool synced); + + static void Synced_cb (IntPtr inst, bool synced) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + __obj.OnSynced (synced); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideSynced")] + protected virtual void OnSynced (bool synced) + { + InternalSynced (synced); + } + + private void InternalSynced (bool synced) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (synced); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ChangeResolutionNativeDelegate ChangeResolution_cb_delegate; + static ChangeResolutionNativeDelegate ChangeResolutionVMCallback { + get { + if (ChangeResolution_cb_delegate == null) + ChangeResolution_cb_delegate = new ChangeResolutionNativeDelegate (ChangeResolution_cb); + return ChangeResolution_cb_delegate; + } + } + + static void OverrideChangeResolution (GLib.GType gtype) + { + OverrideChangeResolution (gtype, ChangeResolutionVMCallback); + } + + static void OverrideChangeResolution (GLib.GType gtype, ChangeResolutionNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate ulong ChangeResolutionNativeDelegate (IntPtr inst, ulong old_resolution, ulong new_resolution); + + static ulong ChangeResolution_cb (IntPtr inst, ulong old_resolution, ulong new_resolution) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + ulong __result; + __result = __obj.OnChangeResolution (old_resolution, new_resolution); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideChangeResolution")] + protected virtual ulong OnChangeResolution (ulong old_resolution, ulong new_resolution) + { + return InternalChangeResolution (old_resolution, new_resolution); + } + + private ulong InternalChangeResolution (ulong old_resolution, ulong new_resolution) + { + ChangeResolutionNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution")); + unmanaged = (ChangeResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangeResolutionNativeDelegate)); + } + if (unmanaged == null) return 0; + + ulong __result = unmanaged (this.Handle, old_resolution, new_resolution); + return __result; + } + + static GetResolutionNativeDelegate GetResolution_cb_delegate; + static GetResolutionNativeDelegate GetResolutionVMCallback { + get { + if (GetResolution_cb_delegate == null) + GetResolution_cb_delegate = new GetResolutionNativeDelegate (GetResolution_cb); + return GetResolution_cb_delegate; + } + } + + static void OverrideGetResolution (GLib.GType gtype) + { + OverrideGetResolution (gtype, GetResolutionVMCallback); + } + + static void OverrideGetResolution (GLib.GType gtype, GetResolutionNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate ulong GetResolutionNativeDelegate (IntPtr inst); + + static ulong GetResolution_cb (IntPtr inst) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + ulong __result; + __result = __obj.OnGetResolution (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetResolution")] + protected virtual ulong OnGetResolution () + { + return InternalGetResolution (); + } + + private ulong InternalGetResolution () + { + GetResolutionNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution")); + unmanaged = (GetResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetResolutionNativeDelegate)); + } + if (unmanaged == null) return 0; + + ulong __result = unmanaged (this.Handle); + return __result; + } + + static GetInternalTimeNativeDelegate GetInternalTime_cb_delegate; + static GetInternalTimeNativeDelegate GetInternalTimeVMCallback { + get { + if (GetInternalTime_cb_delegate == null) + GetInternalTime_cb_delegate = new GetInternalTimeNativeDelegate (GetInternalTime_cb); + return GetInternalTime_cb_delegate; + } + } + + static void OverrideGetInternalTime (GLib.GType gtype) + { + OverrideGetInternalTime (gtype, GetInternalTimeVMCallback); + } + + static void OverrideGetInternalTime (GLib.GType gtype, GetInternalTimeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate ulong GetInternalTimeNativeDelegate (IntPtr inst); + + static ulong GetInternalTime_cb (IntPtr inst) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + ulong __result; + __result = __obj.OnGetInternalTime (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetInternalTime")] + protected virtual ulong OnGetInternalTime () + { + return InternalGetInternalTime (); + } + + private ulong InternalGetInternalTime () + { + GetInternalTimeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time")); + unmanaged = (GetInternalTimeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetInternalTimeNativeDelegate)); + } + if (unmanaged == null) return 0; + + ulong __result = unmanaged (this.Handle); + return __result; + } + + static WaitNativeDelegate Wait_cb_delegate; + static WaitNativeDelegate WaitVMCallback { + get { + if (Wait_cb_delegate == null) + Wait_cb_delegate = new WaitNativeDelegate (Wait_cb); + return Wait_cb_delegate; + } + } + + static void OverrideWait (GLib.GType gtype) + { + OverrideWait (gtype, WaitVMCallback); + } + + static void OverrideWait (GLib.GType gtype, WaitNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int WaitNativeDelegate (IntPtr inst, IntPtr entry, long jitter); + + static int Wait_cb (IntPtr inst, IntPtr entry, long jitter) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + Gst.ClockReturn __result; + __result = __obj.OnWait (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false), jitter); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWait")] + protected virtual Gst.ClockReturn OnWait (Gst.ClockEntry entry, long jitter) + { + return InternalWait (entry, jitter); + } + + private Gst.ClockReturn InternalWait (Gst.ClockEntry entry, long jitter) + { + WaitNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait")); + unmanaged = (WaitNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitNativeDelegate)); + } + if (unmanaged == null) return (Gst.ClockReturn) 0; + + int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle, jitter); + return (Gst.ClockReturn) __result; + } + + static WaitAsyncNativeDelegate WaitAsync_cb_delegate; + static WaitAsyncNativeDelegate WaitAsyncVMCallback { + get { + if (WaitAsync_cb_delegate == null) + WaitAsync_cb_delegate = new WaitAsyncNativeDelegate (WaitAsync_cb); + return WaitAsync_cb_delegate; + } + } + + static void OverrideWaitAsync (GLib.GType gtype) + { + OverrideWaitAsync (gtype, WaitAsyncVMCallback); + } + + static void OverrideWaitAsync (GLib.GType gtype, WaitAsyncNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int WaitAsyncNativeDelegate (IntPtr inst, IntPtr entry); + + static int WaitAsync_cb (IntPtr inst, IntPtr entry) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + Gst.ClockReturn __result; + __result = __obj.OnWaitAsync (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false)); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitAsync")] + protected virtual Gst.ClockReturn OnWaitAsync (Gst.ClockEntry entry) + { + return InternalWaitAsync (entry); + } + + private Gst.ClockReturn InternalWaitAsync (Gst.ClockEntry entry) + { + WaitAsyncNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async")); + unmanaged = (WaitAsyncNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitAsyncNativeDelegate)); + } + if (unmanaged == null) return (Gst.ClockReturn) 0; + + int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle); + return (Gst.ClockReturn) __result; + } + + static UnscheduleNativeDelegate Unschedule_cb_delegate; + static UnscheduleNativeDelegate UnscheduleVMCallback { + get { + if (Unschedule_cb_delegate == null) + Unschedule_cb_delegate = new UnscheduleNativeDelegate (Unschedule_cb); + return Unschedule_cb_delegate; + } + } + + static void OverrideUnschedule (GLib.GType gtype) + { + OverrideUnschedule (gtype, UnscheduleVMCallback); + } + + static void OverrideUnschedule (GLib.GType gtype, UnscheduleNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void UnscheduleNativeDelegate (IntPtr inst, IntPtr entry); + + static void Unschedule_cb (IntPtr inst, IntPtr entry) + { + try { + Clock __obj = GLib.Object.GetObject (inst, false) as Clock; + __obj.OnUnschedule (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideUnschedule")] + protected virtual void OnUnschedule (Gst.ClockEntry entry) + { + InternalUnschedule (entry); + } + + private void InternalUnschedule (Gst.ClockEntry entry) + { + UnscheduleNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule")); + unmanaged = (UnscheduleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnscheduleNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("change_resolution" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // change_resolution + , null + , "get_resolution" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_resolution" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_resolution + , "change_resolution" + , "get_internal_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_internal_time" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_internal_time + , "get_resolution" + , "wait" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("wait" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // wait + , "get_internal_time" + , "wait_async" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("wait_async" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // wait_async + , "wait" + , "unschedule" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unschedule" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unschedule + , "wait_async" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "unschedule" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_clock_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_clock_id_compare_func(IntPtr id1, IntPtr id2); + + public static int IdCompareFunc(IntPtr id1, IntPtr id2) { + int raw_ret = gst_clock_id_compare_func(id1, id2); + int ret = raw_ret; + return ret; + } + + public static int IdCompareFunc() { + return IdCompareFunc (IntPtr.Zero, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_id_get_clock(IntPtr id); + + public static Gst.Clock IdGetClock(IntPtr id) { + IntPtr raw_ret = gst_clock_id_get_clock(id); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_id_get_time(IntPtr id); + + public static ulong IdGetTime(IntPtr id) { + ulong raw_ret = gst_clock_id_get_time(id); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_id_ref(IntPtr id); + + public static IntPtr IdRef(IntPtr id) { + IntPtr raw_ret = gst_clock_id_ref(id); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_id_unref(IntPtr id); + + public static void IdUnref(IntPtr id) { + gst_clock_id_unref(id); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_id_unschedule(IntPtr id); + + public static void IdUnschedule(IntPtr id) { + gst_clock_id_unschedule(id); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_id_uses_clock(IntPtr id, IntPtr clock); + + public static bool IdUsesClock(IntPtr id, Gst.Clock clock) { + bool raw_ret = gst_clock_id_uses_clock(id, clock == null ? IntPtr.Zero : clock.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_clock_id_wait(IntPtr id, out long jitter); + + public static Gst.ClockReturn IdWait(IntPtr id, out long jitter) { + int raw_ret = gst_clock_id_wait(id, out jitter); + Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_clock_id_wait_async(IntPtr id, GstSharp.ClockCallbackNative func, IntPtr user_data, GLib.DestroyNotify destroy_data); + + public static Gst.ClockReturn IdWaitAsync(IntPtr id, Gst.ClockCallback func) { + GstSharp.ClockCallbackWrapper func_wrapper = new GstSharp.ClockCallbackWrapper (func); + IntPtr user_data; + GLib.DestroyNotify destroy_data; + if (func == null) { + user_data = IntPtr.Zero; + destroy_data = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + destroy_data = GLib.DestroyHelper.NotifyHandler; + } + int raw_ret = gst_clock_id_wait_async(id, func_wrapper.NativeDelegate, user_data, destroy_data); + Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_add_observation(IntPtr raw, ulong slave, ulong master, out double r_squared); + + public bool AddObservation(ulong slave, ulong master, out double r_squared) { + bool raw_ret = gst_clock_add_observation(Handle, slave, master, out r_squared); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_add_observation_unapplied(IntPtr raw, ulong slave, ulong master, out double r_squared, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom); + + public bool AddObservationUnapplied(ulong slave, ulong master, out double r_squared, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom) { + bool raw_ret = gst_clock_add_observation_unapplied(Handle, slave, master, out r_squared, out _internal, out external, out rate_num, out rate_denom); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_adjust_unlocked(IntPtr raw, ulong _internal); + + public ulong AdjustUnlocked(ulong _internal) { + ulong raw_ret = gst_clock_adjust_unlocked(Handle, _internal); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_adjust_with_calibration(IntPtr raw, ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom); + + public ulong AdjustWithCalibration(ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) { + ulong raw_ret = gst_clock_adjust_with_calibration(Handle, internal_target, cinternal, cexternal, cnum, cdenom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_get_calibration(IntPtr raw, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom); + + public void GetCalibration(out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom) { + gst_clock_get_calibration(Handle, out _internal, out external, out rate_num, out rate_denom); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_get_internal_time(IntPtr raw); + + public ulong InternalTime { + get { + ulong raw_ret = gst_clock_get_internal_time(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_get_master(IntPtr raw); + + public Gst.Clock Master { + get { + IntPtr raw_ret = gst_clock_get_master(Handle); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_get_resolution(IntPtr raw); + + public ulong Resolution { + get { + ulong raw_ret = gst_clock_get_resolution(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_get_time(IntPtr raw); + + public ulong Time { + get { + ulong raw_ret = gst_clock_get_time(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_is_synced(IntPtr raw); + + public bool IsSynced { + get { + bool raw_ret = gst_clock_is_synced(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_new_periodic_id(IntPtr raw, ulong start_time, ulong interval); + + public IntPtr NewPeriodicId(ulong start_time, ulong interval) { + IntPtr raw_ret = gst_clock_new_periodic_id(Handle, start_time, interval); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_new_single_shot_id(IntPtr raw, ulong time); + + public IntPtr NewSingleShotId(ulong time) { + IntPtr raw_ret = gst_clock_new_single_shot_id(Handle, time); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_periodic_id_reinit(IntPtr raw, IntPtr id, ulong start_time, ulong interval); + + public bool PeriodicIdReinit(IntPtr id, ulong start_time, ulong interval) { + bool raw_ret = gst_clock_periodic_id_reinit(Handle, id, start_time, interval); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_set_calibration(IntPtr raw, ulong _internal, ulong external, ulong rate_num, ulong rate_denom); + + public void SetCalibration(ulong _internal, ulong external, ulong rate_num, ulong rate_denom) { + gst_clock_set_calibration(Handle, _internal, external, rate_num, rate_denom); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_set_master(IntPtr raw, IntPtr master); + + public bool SetMaster(Gst.Clock master) { + bool raw_ret = gst_clock_set_master(Handle, master == null ? IntPtr.Zero : master.Handle); + bool ret = raw_ret; + return ret; + } + + public bool SetMaster() { + return SetMaster (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_set_resolution(IntPtr raw, ulong resolution); + + public ulong SetResolution(ulong resolution) { + ulong raw_ret = gst_clock_set_resolution(Handle, resolution); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_clock_set_synced(IntPtr raw, bool synced); + + public void is_synced(bool synced) { + gst_clock_set_synced(Handle, synced); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_single_shot_id_reinit(IntPtr raw, IntPtr id, ulong time); + + public bool SingleShotIdReinit(IntPtr id, ulong time) { + bool raw_ret = gst_clock_single_shot_id_reinit(Handle, id, time); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_unadjust_unlocked(IntPtr raw, ulong external); + + public ulong UnadjustUnlocked(ulong external) { + ulong raw_ret = gst_clock_unadjust_unlocked(Handle, external); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_clock_unadjust_with_calibration(IntPtr raw, ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom); + + public ulong UnadjustWithCalibration(ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) { + ulong raw_ret = gst_clock_unadjust_with_calibration(Handle, external_target, cinternal, cexternal, cnum, cdenom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_clock_wait_for_sync(IntPtr raw, ulong timeout); + + public bool WaitForSync(ulong timeout) { + bool raw_ret = gst_clock_wait_for_sync(Handle, timeout); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ClockCallback.cs b/sources/generated/Gst/ClockCallback.cs new file mode 100644 index 0000000000..813366b449 --- /dev/null +++ b/sources/generated/Gst/ClockCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ClockCallback(Gst.Clock clock, ulong time, IntPtr id); + +} diff --git a/sources/generated/Gst/ClockEntry.cs b/sources/generated/Gst/ClockEntry.cs new file mode 100644 index 0000000000..9d079f744e --- /dev/null +++ b/sources/generated/Gst/ClockEntry.cs @@ -0,0 +1,321 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ClockEntry : GLib.Opaque { + + public int Refcount { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("refcount")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("refcount")); + *raw_ptr = value; + } + } + } + + public Gst.Clock Clock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock; + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public Gst.ClockEntryType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.ClockEntryType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public ulong Time { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("time")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("time")); + *raw_ptr = value; + } + } + } + + public ulong Interval { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("interval")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("interval")); + *raw_ptr = value; + } + } + } + + public Gst.ClockReturn Status { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("status")); + return (Gst.ClockReturn) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("status")); + *raw_ptr = (int) value; + } + } + } + + public IntPtr UserData { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data")); + return (*raw_ptr); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data")); + *raw_ptr = value; + } + } + } + + public bool Unscheduled { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("unscheduled")); + return (*raw_ptr); + } + } + set { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("unscheduled")); + *raw_ptr = value; + } + } + } + + public bool WokenUp { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("woken_up")); + return (*raw_ptr); + } + } + set { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("woken_up")); + *raw_ptr = value; + } + } + } + + public ClockEntry(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("refcount" + , 0 + , (uint) Marshal.SizeOf(typeof(int)) // refcount + , null + , "clock" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_refcountAlign), "refcount") + , 0 + ), + new GLib.AbiField("clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock + , "refcount" + , "type" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("type" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.ClockEntryType))) // type + , "clock" + , "time" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_typeAlign), "type") + , 0 + ), + new GLib.AbiField("time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // time + , "type" + , "interval" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_timeAlign), "time") + , 0 + ), + new GLib.AbiField("interval" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // interval + , "time" + , "status" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_intervalAlign), "interval") + , 0 + ), + new GLib.AbiField("status" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.ClockReturn))) // status + , "interval" + , "func" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_statusAlign), "status") + , 0 + ), + new GLib.AbiField("func" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // func + , "status" + , "user_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("user_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data + , "func" + , "destroy_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("destroy_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // destroy_data + , "user_data" + , "unscheduled" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_destroy_dataAlign), "destroy_data") + , 0 + ), + new GLib.AbiField("unscheduled" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // unscheduled + , "destroy_data" + , "woken_up" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_unscheduledAlign), "unscheduled") + , 0 + ), + new GLib.AbiField("woken_up" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // woken_up + , "unscheduled" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstClockEntry_woken_upAlign), "woken_up") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "woken_up" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_refcountAlign + { + sbyte f1; + private int refcount; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_typeAlign + { + sbyte f1; + private Gst.ClockEntryType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_timeAlign + { + sbyte f1; + private ulong time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_intervalAlign + { + sbyte f1; + private ulong interval; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_statusAlign + { + sbyte f1; + private Gst.ClockReturn status; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_destroy_dataAlign + { + sbyte f1; + private GLib.DestroyNotify destroy_data; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_unscheduledAlign + { + sbyte f1; + private bool unscheduled; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstClockEntry_woken_upAlign + { + sbyte f1; + private bool woken_up; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ClockEntryType.cs b/sources/generated/Gst/ClockEntryType.cs new file mode 100644 index 0000000000..45cd6878e4 --- /dev/null +++ b/sources/generated/Gst/ClockEntryType.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ClockEntryTypeGType))] + public enum ClockEntryType { + + Single = 0, + Periodic = 1, + } + + internal class ClockEntryTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_entry_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_clock_entry_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ClockFlags.cs b/sources/generated/Gst/ClockFlags.cs new file mode 100644 index 0000000000..55e02cf727 --- /dev/null +++ b/sources/generated/Gst/ClockFlags.cs @@ -0,0 +1,35 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.ClockFlagsGType))] + public enum ClockFlags : uint { + + CanDoSingleSync = 16, + CanDoSingleAsync = 32, + CanDoPeriodicSync = 64, + CanDoPeriodicAsync = 128, + CanSetResolution = 256, + CanSetMaster = 512, + NeedsStartupSync = 1024, + Last = 4096, + } + + internal class ClockFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_clock_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ClockReturn.cs b/sources/generated/Gst/ClockReturn.cs new file mode 100644 index 0000000000..e5933b245e --- /dev/null +++ b/sources/generated/Gst/ClockReturn.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ClockReturnGType))] + public enum ClockReturn { + + Ok = 0, + Early = 1, + Unscheduled = 2, + Busy = 3, + Badtime = 4, + Error = 5, + Unsupported = 6, + Done = 7, + } + + internal class ClockReturnGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_clock_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ClockType.cs b/sources/generated/Gst/ClockType.cs new file mode 100644 index 0000000000..4a3505fd25 --- /dev/null +++ b/sources/generated/Gst/ClockType.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ClockTypeGType))] + public enum ClockType { + + Realtime = 0, + Monotonic = 1, + Other = 2, + Tai = 3, + } + + internal class ClockTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_clock_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_clock_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Constants.cs b/sources/generated/Gst/Constants.cs new file mode 100644 index 0000000000..33aa331169 --- /dev/null +++ b/sources/generated/Gst/Constants.cs @@ -0,0 +1,178 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Constants { + + public const string ALLOCATOR_SYSMEM = @"SystemMemory"; + public const int BUFFER_COPY_ALL = 15; + public const int BUFFER_COPY_METADATA = 7; + public const ulong BUFFER_OFFSET_NONE = 18446744073709551615; + public const int CAN_INLINE = 1; + public const string CAPS_FEATURE_MEMORY_SYSTEM_MEMORY = @"memory:SystemMemory"; + public const ulong CLOCK_TIME_NONE = 18446744073709551615; + public const int DEBUG_BG_MASK = 240; + public const int DEBUG_FG_MASK = 15; + public const int DEBUG_FORMAT_MASK = 65280; + public const string ELEMENT_FACTORY_KLASS_DECODER = @"Decoder"; + public const string ELEMENT_FACTORY_KLASS_DECRYPTOR = @"Decryptor"; + public const string ELEMENT_FACTORY_KLASS_DEMUXER = @"Demuxer"; + public const string ELEMENT_FACTORY_KLASS_DEPAYLOADER = @"Depayloader"; + public const string ELEMENT_FACTORY_KLASS_ENCODER = @"Encoder"; + public const string ELEMENT_FACTORY_KLASS_ENCRYPTOR = @"Encryptor"; + public const string ELEMENT_FACTORY_KLASS_FORMATTER = @"Formatter"; + public const string ELEMENT_FACTORY_KLASS_HARDWARE = @"Hardware"; + public const string ELEMENT_FACTORY_KLASS_MEDIA_AUDIO = @"Audio"; + public const string ELEMENT_FACTORY_KLASS_MEDIA_IMAGE = @"Image"; + public const string ELEMENT_FACTORY_KLASS_MEDIA_METADATA = @"Metadata"; + public const string ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE = @"Subtitle"; + public const string ELEMENT_FACTORY_KLASS_MEDIA_VIDEO = @"Video"; + public const string ELEMENT_FACTORY_KLASS_MUXER = @"Muxer"; + public const string ELEMENT_FACTORY_KLASS_PARSER = @"Parser"; + public const string ELEMENT_FACTORY_KLASS_PAYLOADER = @"Payloader"; + public const string ELEMENT_FACTORY_KLASS_SINK = @"Sink"; + public const string ELEMENT_FACTORY_KLASS_SRC = @"Source"; + public const string ELEMENT_METADATA_AUTHOR = @"author"; + public const string ELEMENT_METADATA_DESCRIPTION = @"description"; + public const string ELEMENT_METADATA_DOC_URI = @"doc-uri"; + public const string ELEMENT_METADATA_ICON_NAME = @"icon-name"; + public const string ELEMENT_METADATA_KLASS = @"klass"; + public const string ELEMENT_METADATA_LONGNAME = @"long-name"; + public const string ERROR_SYSTEM = @"system error: %s"; + public const int EVENT_NUM_SHIFT = 8; + public const int EVENT_TYPE_BOTH = 3; + public const uint FLAG_SET_MASK_EXACT = 4294967295; + public const long FORMAT_PERCENT_MAX = 1000000; + public const long FORMAT_PERCENT_SCALE = 10000; + public const string FOURCC_FORMAT = @"c%c%c%c"; + public const int GROUP_ID_INVALID = 0; + public const string LICENSE_UNKNOWN = @"unknown"; + public const int LOCK_FLAG_READWRITE = 3; + public const int MAP_READWRITE = 3; + public const string META_TAG_MEMORY_STR = @"memory"; + public const long MSECOND = 1000000; + public const int PARAM_CONDITIONALLY_AVAILABLE = 16384; + public const int PARAM_CONTROLLABLE = 512; + public const int PARAM_DOC_SHOW_DEFAULT = 8192; + public const int PARAM_MUTABLE_PAUSED = 2048; + public const int PARAM_MUTABLE_PLAYING = 4096; + public const int PARAM_MUTABLE_READY = 1024; + public const int PARAM_USER_SHIFT = 65536; + public const string PROTECTION_SYSTEM_ID_CAPS_FIELD = @"protection-system"; + public const string PROTECTION_UNSPECIFIED_SYSTEM_ID = @"unspecified-system-id"; + public const string PTR_FORMAT = @"paA"; + public const int QUERY_NUM_SHIFT = 8; + public const int QUERY_TYPE_BOTH = 3; + public const long SECOND = 1000000000; + public const string SEGMENT_FORMAT = @"paB"; + public const int SEGMENT_INSTANT_FLAGS = 912; + public const int SEQNUM_INVALID = 0; + public const string STIMEP_FORMAT = @"paS"; + public const string STIME_FORMAT = @"c%"; + public const string TAG_ALBUM = @"album"; + public const string TAG_ALBUM_ARTIST = @"album-artist"; + public const string TAG_ALBUM_ARTIST_SORTNAME = @"album-artist-sortname"; + public const string TAG_ALBUM_GAIN = @"replaygain-album-gain"; + public const string TAG_ALBUM_PEAK = @"replaygain-album-peak"; + public const string TAG_ALBUM_SORTNAME = @"album-sortname"; + public const string TAG_ALBUM_VOLUME_COUNT = @"album-disc-count"; + public const string TAG_ALBUM_VOLUME_NUMBER = @"album-disc-number"; + public const string TAG_APPLICATION_DATA = @"application-data"; + public const string TAG_APPLICATION_NAME = @"application-name"; + public const string TAG_ARTIST = @"artist"; + public const string TAG_ARTIST_SORTNAME = @"artist-sortname"; + public const string TAG_ATTACHMENT = @"attachment"; + public const string TAG_AUDIO_CODEC = @"audio-codec"; + public const string TAG_BEATS_PER_MINUTE = @"beats-per-minute"; + public const string TAG_BITRATE = @"bitrate"; + public const string TAG_CODEC = @"codec"; + public const string TAG_COMMENT = @"comment"; + public const string TAG_COMPOSER = @"composer"; + public const string TAG_COMPOSER_SORTNAME = @"composer-sortname"; + public const string TAG_CONDUCTOR = @"conductor"; + public const string TAG_CONTACT = @"contact"; + public const string TAG_CONTAINER_FORMAT = @"container-format"; + public const string TAG_COPYRIGHT = @"copyright"; + public const string TAG_COPYRIGHT_URI = @"copyright-uri"; + public const string TAG_DATE = @"date"; + public const string TAG_DATE_TIME = @"datetime"; + public const string TAG_DESCRIPTION = @"description"; + public const string TAG_DEVICE_MANUFACTURER = @"device-manufacturer"; + public const string TAG_DEVICE_MODEL = @"device-model"; + public const string TAG_DURATION = @"duration"; + public const string TAG_ENCODED_BY = @"encoded-by"; + public const string TAG_ENCODER = @"encoder"; + public const string TAG_ENCODER_VERSION = @"encoder-version"; + public const string TAG_EXTENDED_COMMENT = @"extended-comment"; + public const string TAG_GENRE = @"genre"; + public const string TAG_GEO_LOCATION_CAPTURE_DIRECTION = @"geo-location-capture-direction"; + public const string TAG_GEO_LOCATION_CITY = @"geo-location-city"; + public const string TAG_GEO_LOCATION_COUNTRY = @"geo-location-country"; + public const string TAG_GEO_LOCATION_ELEVATION = @"geo-location-elevation"; + public const string TAG_GEO_LOCATION_HORIZONTAL_ERROR = @"geo-location-horizontal-error"; + public const string TAG_GEO_LOCATION_LATITUDE = @"geo-location-latitude"; + public const string TAG_GEO_LOCATION_LONGITUDE = @"geo-location-longitude"; + public const string TAG_GEO_LOCATION_MOVEMENT_DIRECTION = @"geo-location-movement-direction"; + public const string TAG_GEO_LOCATION_MOVEMENT_SPEED = @"geo-location-movement-speed"; + public const string TAG_GEO_LOCATION_NAME = @"geo-location-name"; + public const string TAG_GEO_LOCATION_SUBLOCATION = @"geo-location-sublocation"; + public const string TAG_GROUPING = @"grouping"; + public const string TAG_HOMEPAGE = @"homepage"; + public const string TAG_IMAGE = @"image"; + public const string TAG_IMAGE_ORIENTATION = @"image-orientation"; + public const string TAG_INTERPRETED_BY = @"interpreted-by"; + public const string TAG_ISRC = @"isrc"; + public const string TAG_KEYWORDS = @"keywords"; + public const string TAG_LANGUAGE_CODE = @"language-code"; + public const string TAG_LANGUAGE_NAME = @"language-name"; + public const string TAG_LICENSE = @"license"; + public const string TAG_LICENSE_URI = @"license-uri"; + public const string TAG_LOCATION = @"location"; + public const string TAG_LYRICS = @"lyrics"; + public const string TAG_MAXIMUM_BITRATE = @"maximum-bitrate"; + public const string TAG_MIDI_BASE_NOTE = @"midi-base-note"; + public const string TAG_MINIMUM_BITRATE = @"minimum-bitrate"; + public const string TAG_NOMINAL_BITRATE = @"nominal-bitrate"; + public const string TAG_ORGANIZATION = @"organization"; + public const string TAG_PERFORMER = @"performer"; + public const string TAG_PREVIEW_IMAGE = @"preview-image"; + public const string TAG_PRIVATE_DATA = @"private-data"; + public const string TAG_PUBLISHER = @"publisher"; + public const string TAG_REFERENCE_LEVEL = @"replaygain-reference-level"; + public const string TAG_SERIAL = @"serial"; + public const string TAG_SHOW_EPISODE_NUMBER = @"show-episode-number"; + public const string TAG_SHOW_NAME = @"show-name"; + public const string TAG_SHOW_SEASON_NUMBER = @"show-season-number"; + public const string TAG_SHOW_SORTNAME = @"show-sortname"; + public const string TAG_SUBTITLE_CODEC = @"subtitle-codec"; + public const string TAG_TITLE = @"title"; + public const string TAG_TITLE_SORTNAME = @"title-sortname"; + public const string TAG_TRACK_COUNT = @"track-count"; + public const string TAG_TRACK_GAIN = @"replaygain-track-gain"; + public const string TAG_TRACK_NUMBER = @"track-number"; + public const string TAG_TRACK_PEAK = @"replaygain-track-peak"; + public const string TAG_USER_RATING = @"user-rating"; + public const string TAG_VERSION = @"version"; + public const string TAG_VIDEO_CODEC = @"video-codec"; + public const string TIMEP_FORMAT = @"paT"; + public const string TIME_FORMAT = @"u:%02u:%02u.%09u"; + public const int TOC_REPEAT_COUNT_INFINITE = -1; + public const int URI_NO_PORT = 0; + public const int VALUE_EQUAL = 0; + public const int VALUE_GREATER_THAN = 1; + public const int VALUE_LESS_THAN = -1; + public const int VALUE_UNORDERED = 2; + public const int VERSION_MAJOR = 1; + public const int VERSION_MICRO = 2; + public const int VERSION_MINOR = 19; + public const int VERSION_NANO = 0; +#endregion + } +} diff --git a/sources/generated/Gst/Context.cs b/sources/generated/Gst/Context.cs new file mode 100644 index 0000000000..a1c9b58707 --- /dev/null +++ b/sources/generated/Gst/Context.cs @@ -0,0 +1,153 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct Context : IEquatable { + + + public static Gst.Context Zero = new Gst.Context (); + + public static Gst.Context New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Context.Zero; + return (Gst.Context) Marshal.PtrToStructure (raw, typeof (Gst.Context)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_context_new(IntPtr context_type, bool persistent); + + public static Context New(string context_type, bool persistent) + { + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + Context result = Context.New (gst_context_new(native_context_type, persistent)); + GLib.Marshaller.Free (native_context_type); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_context_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_context_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_context_get_context_type(IntPtr raw); + + public string ContextType { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_context_get_context_type(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_context_get_structure(IntPtr raw); + + public Gst.Structure Structure { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_context_get_structure(this_as_native); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_context_has_context_type(IntPtr raw, IntPtr context_type); + + public bool HasContextType(string context_type) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + bool raw_ret = gst_context_has_context_type(this_as_native, native_context_type); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_context_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_context_is_persistent(IntPtr raw); + + public bool IsPersistent { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_context_is_persistent(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_context_writable_structure(IntPtr raw); + + public Gst.Structure WritableStructure() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_context_writable_structure(this_as_native); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Context target) + { + target = New (native); + } + + public bool Equals (Context other) + { + return true; + } + + public override bool Equals (object other) + { + return other is Context && Equals ((Context) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Context boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Context.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Context (GLib.Value val) + { + return (Gst.Context) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/ControlBinding.cs b/sources/generated/Gst/ControlBinding.cs new file mode 100644 index 0000000000..e2f1f28dbe --- /dev/null +++ b/sources/generated/Gst/ControlBinding.cs @@ -0,0 +1,386 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ControlBinding : Gst.Object { + + protected ControlBinding (IntPtr raw) : base(raw) {} + + protected ControlBinding() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("name")] + public new string Name { + get { + GLib.Value val = GetProperty ("name"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("object")] + public Gst.Object Object { + get { + GLib.Value val = GetProperty ("object"); + Gst.Object ret = (Gst.Object) val; + val.Dispose (); + return ret; + } + } + + public string NameField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + public IntPtr Pspec { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pspec")); + return (*raw_ptr); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_control_binding_set_disabled(IntPtr raw, bool disabled); + + public bool Disabled { + set { + gst_control_binding_set_disabled(Handle, value); + } + } + + static SyncValuesNativeDelegate SyncValues_cb_delegate; + static SyncValuesNativeDelegate SyncValuesVMCallback { + get { + if (SyncValues_cb_delegate == null) + SyncValues_cb_delegate = new SyncValuesNativeDelegate (SyncValues_cb); + return SyncValues_cb_delegate; + } + } + + static void OverrideSyncValues (GLib.GType gtype) + { + OverrideSyncValues (gtype, SyncValuesVMCallback); + } + + static void OverrideSyncValues (GLib.GType gtype, SyncValuesNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_values")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SyncValuesNativeDelegate (IntPtr inst, IntPtr _object, ulong timestamp, ulong last_sync); + + static bool SyncValues_cb (IntPtr inst, IntPtr _object, ulong timestamp, ulong last_sync) + { + try { + ControlBinding __obj = GLib.Object.GetObject (inst, false) as ControlBinding; + bool __result; + __result = __obj.OnSyncValues (GLib.Object.GetObject(_object) as Gst.Object, timestamp, last_sync); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.ControlBinding), ConnectionMethod="OverrideSyncValues")] + protected virtual bool OnSyncValues (Gst.Object _object, ulong timestamp, ulong last_sync) + { + return InternalSyncValues (_object, timestamp, last_sync); + } + + private bool InternalSyncValues (Gst.Object _object, ulong timestamp, ulong last_sync) + { + SyncValuesNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_values")); + unmanaged = (SyncValuesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SyncValuesNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle, timestamp, last_sync); + return __result; + } + + static GetValueNativeDelegate GetValue_cb_delegate; + static GetValueNativeDelegate GetValueVMCallback { + get { + if (GetValue_cb_delegate == null) + GetValue_cb_delegate = new GetValueNativeDelegate (GetValue_cb); + return GetValue_cb_delegate; + } + } + + static void OverrideGetValue (GLib.GType gtype) + { + OverrideGetValue (gtype, GetValueVMCallback); + } + + static void OverrideGetValue (GLib.GType gtype, GetValueNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_value")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetValueNativeDelegate (IntPtr inst, ulong timestamp); + + static IntPtr GetValue_cb (IntPtr inst, ulong timestamp) + { + try { + ControlBinding __obj = GLib.Object.GetObject (inst, false) as ControlBinding; + GLib.Value __result; + __result = __obj.OnGetValue (timestamp); + return GLib.Marshaller.StructureToPtrAlloc (__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.ControlBinding), ConnectionMethod="OverrideGetValue")] + protected virtual GLib.Value OnGetValue (ulong timestamp) + { + return InternalGetValue (timestamp); + } + + private GLib.Value InternalGetValue (ulong timestamp) + { + GetValueNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_value")); + unmanaged = (GetValueNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetValueNativeDelegate)); + } + if (unmanaged == null) return GLib.Value.Empty; + + IntPtr __result = unmanaged (this.Handle, timestamp); + return (GLib.Value) Marshal.PtrToStructure (__result, typeof (GLib.Value)); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("sync_values" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sync_values + , null + , "get_value" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_value" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value + , "sync_values" + , "get_value_array" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_value_array" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value_array + , "get_value" + , "get_g_value_array" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_g_value_array" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_g_value_array + , "get_value_array" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "get_g_value_array" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_control_binding_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_control_binding_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_control_binding_get_g_value_array(IntPtr raw, ulong timestamp, ulong interval, uint n_values, IntPtr[] values); + + public bool GetGValueArray(ulong timestamp, ulong interval, GLib.Value[] values) { + int cnt_values = values == null ? 0 : values.Length; + IntPtr[] native_values = new IntPtr [cnt_values]; + for (int i = 0; i < cnt_values; i++) + native_values [i] = GLib.Marshaller.StructureToPtrAlloc (values[i]); + bool raw_ret = gst_control_binding_get_g_value_array(Handle, timestamp, interval, (uint) (values == null ? 0 : values.Length), native_values); + bool ret = raw_ret; + for (int i = 0; i < native_values.Length; i++) { + values [i] = (GLib.Value) Marshal.PtrToStructure (native_values[i], typeof (GLib.Value)); + Marshal.FreeHGlobal (native_values[i]); + } + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_control_binding_get_value(IntPtr raw, ulong timestamp); + + public GLib.Value GetValue(ulong timestamp) { + IntPtr raw_ret = gst_control_binding_get_value(Handle, timestamp); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_control_binding_is_disabled(IntPtr raw); + + public bool IsDisabled { + get { + bool raw_ret = gst_control_binding_is_disabled(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_control_binding_sync_values(IntPtr raw, IntPtr _object, ulong timestamp, ulong last_sync); + + public bool SyncValues(Gst.Object _object, ulong timestamp, ulong last_sync) { + bool raw_ret = gst_control_binding_sync_values(Handle, _object == null ? IntPtr.Zero : _object.Handle, timestamp, last_sync); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("name" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // name + , null + , "pspec" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pspec" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pspec + , "name" + , "object" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("object" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // object + , "pspec" + , "disabled" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("disabled" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // disabled + , "object" + , "ABI" + , (long) Marshal.OffsetOf(typeof(GstControlBinding_disabledAlign), "disabled") + , 0 + ), + // union struct ABI.abi + new GLib.AbiField("ABI.abi.priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ABI.abi.priv + , "disabled" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI.abi + + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "disabled" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI.abi.priv"}, + new List() {"ABI._gst_reserved"} + } + , "disabled" + , null + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstControlBinding_disabledAlign + { + sbyte f1; + private bool disabled; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ControlBindingConvert.cs b/sources/generated/Gst/ControlBindingConvert.cs new file mode 100644 index 0000000000..a357c33c6d --- /dev/null +++ b/sources/generated/Gst/ControlBindingConvert.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ControlBindingConvert(Gst.ControlBinding binding, double src_value, GLib.Value dest_value); + +} diff --git a/sources/generated/Gst/ControlSource.cs b/sources/generated/Gst/ControlSource.cs new file mode 100644 index 0000000000..4f79a11128 --- /dev/null +++ b/sources/generated/Gst/ControlSource.cs @@ -0,0 +1,136 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ControlSource : Gst.Object { + + protected ControlSource (IntPtr raw) : base(raw) {} + + protected ControlSource() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public Gst.ControlSourceGetValue GetValue { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("get_value")); + GstSharp.ControlSourceGetValueNative del = (GstSharp.ControlSourceGetValueNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.ControlSourceGetValueNative)); + return GstSharp.ControlSourceGetValueWrapper.GetManagedDelegate ((del)); + } + } + } + + public Gst.ControlSourceGetValueArray GetValueArray { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("get_value_array")); + GstSharp.ControlSourceGetValueArrayNative del = (GstSharp.ControlSourceGetValueArrayNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.ControlSourceGetValueArrayNative)); + return GstSharp.ControlSourceGetValueArrayWrapper.GetManagedDelegate ((del)); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_control_source_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_control_source_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_control_source_get_value(IntPtr raw, ulong timestamp, out double value); + + public bool GetValueAt(ulong timestamp, out double value) { + bool raw_ret = gst_control_source_get_value(Handle, timestamp, out value); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_control_source_get_value_array(IntPtr raw, ulong timestamp, ulong interval, uint n_values, double[] values); + + public bool GetValues(ulong timestamp, ulong interval, double[] values) { + bool raw_ret = gst_control_source_get_value_array(Handle, timestamp, interval, (uint) (values == null ? 0 : values.Length), values); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("get_value" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value + , null + , "get_value_array" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_value_array" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value_array + , "get_value" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "get_value_array" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ControlSourceGetValue.cs b/sources/generated/Gst/ControlSourceGetValue.cs new file mode 100644 index 0000000000..fc424a0335 --- /dev/null +++ b/sources/generated/Gst/ControlSourceGetValue.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ControlSourceGetValue(Gst.ControlSource self, ulong timestamp, double value); + +} diff --git a/sources/generated/Gst/ControlSourceGetValueArray.cs b/sources/generated/Gst/ControlSourceGetValueArray.cs new file mode 100644 index 0000000000..9956a6c4a3 --- /dev/null +++ b/sources/generated/Gst/ControlSourceGetValueArray.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ControlSourceGetValueArray(Gst.ControlSource self, ulong timestamp, ulong interval, uint n_values, double values); + +} diff --git a/sources/generated/Gst/CoreError.cs b/sources/generated/Gst/CoreError.cs new file mode 100644 index 0000000000..2f5f682d64 --- /dev/null +++ b/sources/generated/Gst/CoreError.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.CoreErrorGType))] + public enum CoreError { + + Failed = 1, + TooLazy = 2, + NotImplemented = 3, + StateChange = 4, + Pad = 5, + Thread = 6, + Negotiation = 7, + Event = 8, + Seek = 9, + Caps = 10, + Tag = 11, + MissingPlugin = 12, + Clock = 13, + Disabled = 14, + NumErrors = 15, + } + + internal class CoreErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_core_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_core_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/CustomMeta.cs b/sources/generated/Gst/CustomMeta.cs new file mode 100644 index 0000000000..9ff4eb9e0e --- /dev/null +++ b/sources/generated/Gst/CustomMeta.cs @@ -0,0 +1,80 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct CustomMeta : IEquatable { + + public Gst.Meta Meta; + + public static Gst.CustomMeta Zero = new Gst.CustomMeta (); + + public static Gst.CustomMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.CustomMeta.Zero; + return (Gst.CustomMeta) Marshal.PtrToStructure (raw, typeof (Gst.CustomMeta)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_custom_meta_get_structure(IntPtr raw); + + public Gst.Structure Structure { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_custom_meta_get_structure(this_as_native); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_custom_meta_has_name(IntPtr raw, IntPtr name); + + public bool HasName(string name) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_custom_meta_has_name(this_as_native, native_name); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_name); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.CustomMeta target) + { + target = New (native); + } + + public bool Equals (CustomMeta other) + { + return true && Meta.Equals (other.Meta); + } + + public override bool Equals (object other) + { + return other is CustomMeta && Equals ((CustomMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/CustomMetaTransformFunction.cs b/sources/generated/Gst/CustomMetaTransformFunction.cs new file mode 100644 index 0000000000..7c97f57ffc --- /dev/null +++ b/sources/generated/Gst/CustomMetaTransformFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool CustomMetaTransformFunction(Gst.Buffer transbuf, Gst.CustomMeta meta, Gst.Buffer buffer, uint type, IntPtr data); + +} diff --git a/sources/generated/Gst/DateTime.cs b/sources/generated/Gst/DateTime.cs new file mode 100644 index 0000000000..7a926f03c6 --- /dev/null +++ b/sources/generated/Gst/DateTime.cs @@ -0,0 +1,344 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DateTime : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_date_time_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_day(IntPtr raw); + + public int Day { + get { + int raw_ret = gst_date_time_get_day(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_hour(IntPtr raw); + + public int Hour { + get { + int raw_ret = gst_date_time_get_hour(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_microsecond(IntPtr raw); + + public int Microsecond { + get { + int raw_ret = gst_date_time_get_microsecond(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_minute(IntPtr raw); + + public int Minute { + get { + int raw_ret = gst_date_time_get_minute(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_month(IntPtr raw); + + public int Month { + get { + int raw_ret = gst_date_time_get_month(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_second(IntPtr raw); + + public int Second { + get { + int raw_ret = gst_date_time_get_second(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern float gst_date_time_get_time_zone_offset(IntPtr raw); + + public float TimeZoneOffset { + get { + float raw_ret = gst_date_time_get_time_zone_offset(Handle); + float ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_date_time_get_year(IntPtr raw); + + public int Year { + get { + int raw_ret = gst_date_time_get_year(Handle); + int ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_date_time_has_day(IntPtr raw); + + public bool HasDay { + get { + bool raw_ret = gst_date_time_has_day(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_date_time_has_month(IntPtr raw); + + public bool HasMonth { + get { + bool raw_ret = gst_date_time_has_month(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_date_time_has_second(IntPtr raw); + + public bool HasSecond { + get { + bool raw_ret = gst_date_time_has_second(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_date_time_has_time(IntPtr raw); + + public bool HasTime { + get { + bool raw_ret = gst_date_time_has_time(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_date_time_has_year(IntPtr raw); + + public bool HasYear { + get { + bool raw_ret = gst_date_time_has_year(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_to_g_date_time(IntPtr raw); + + public GLib.DateTime ToGDateTime() { + IntPtr raw_ret = gst_date_time_to_g_date_time(Handle); + GLib.DateTime ret = new GLib.DateTime(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_to_iso8601_string(IntPtr raw); + + public string ToIso8601String() { + IntPtr raw_ret = gst_date_time_to_iso8601_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + public DateTime(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new(float tzoffset, int year, int month, int day, int hour, int minute, double seconds); + + public DateTime (float tzoffset, int year, int month, int day, int hour, int minute, double seconds) + { + Raw = gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_g_date_time(IntPtr dt); + + public DateTime (GLib.DateTime dt) + { + Raw = gst_date_time_new_from_g_date_time(dt == null ? IntPtr.Zero : dt.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_iso8601_string(IntPtr str1ng); + + public DateTime (string str1ng) + { + IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); + Raw = gst_date_time_new_from_iso8601_string(native_str1ng); + GLib.Marshaller.Free (native_str1ng); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_unix_epoch_local_time(long secs); + + public DateTime (long secs) + { + Raw = gst_date_time_new_from_unix_epoch_local_time(secs); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_unix_epoch_local_time_usecs(long usecs); + + public static DateTime NewFromUnixEpochLocalTimeUsecs(long usecs) + { + DateTime result = new DateTime (gst_date_time_new_from_unix_epoch_local_time_usecs(usecs)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_unix_epoch_utc(long secs); + + public static DateTime NewFromUnixEpochUtc(long secs) + { + DateTime result = new DateTime (gst_date_time_new_from_unix_epoch_utc(secs)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_from_unix_epoch_utc_usecs(long usecs); + + public static DateTime NewFromUnixEpochUtcUsecs(long usecs) + { + DateTime result = new DateTime (gst_date_time_new_from_unix_epoch_utc_usecs(usecs)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_local_time(int year, int month, int day, int hour, int minute, double seconds); + + public DateTime (int year, int month, int day, int hour, int minute, double seconds) + { + Raw = gst_date_time_new_local_time(year, month, day, hour, minute, seconds); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_now_local_time(); + + public DateTime () + { + Raw = gst_date_time_new_now_local_time(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_now_utc(); + + public static DateTime NewNowUtc() + { + DateTime result = new DateTime (gst_date_time_new_now_utc()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_y(int year); + + public DateTime (int year) + { + Raw = gst_date_time_new_y(year); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_ym(int year, int month); + + public DateTime (int year, int month) + { + Raw = gst_date_time_new_ym(year, month); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_new_ymd(int year, int month, int day); + + public DateTime (int year, int month, int day) + { + Raw = gst_date_time_new_ymd(year, month, day); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_date_time_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_date_time_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_date_time_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_date_time_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_date_time_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Debug.cs b/sources/generated/Gst/Debug.cs new file mode 100644 index 0000000000..4b34e0ce03 --- /dev/null +++ b/sources/generated/Gst/Debug.cs @@ -0,0 +1,292 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Debug { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_add_log_function(GstSharp.LogFunctionNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public static void AddLogFunction(Gst.LogFunction func) { + GstSharp.LogFunctionWrapper func_wrapper = new GstSharp.LogFunctionWrapper (func); + IntPtr user_data; + GLib.DestroyNotify notify; + if (func == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_debug_add_log_function(func_wrapper.NativeDelegate, user_data, notify); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_add_ring_buffer_logger(uint max_size_per_thread, uint thread_timeout); + + public static void AddRingBufferLogger(uint max_size_per_thread, uint thread_timeout) { + gst_debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_bin_to_dot_data(IntPtr bin, int details); + + public static string BinToDotData(Gst.Bin bin, Gst.DebugGraphDetails details) { + IntPtr raw_ret = gst_debug_bin_to_dot_data(bin == null ? IntPtr.Zero : bin.Handle, (int) details); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_bin_to_dot_file(IntPtr bin, int details, IntPtr file_name); + + public static void BinToDotFile(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) { + IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name); + gst_debug_bin_to_dot_file(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name); + GLib.Marshaller.Free (native_file_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_bin_to_dot_file_with_ts(IntPtr bin, int details, IntPtr file_name); + + public static void BinToDotFileWithTs(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) { + IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name); + gst_debug_bin_to_dot_file_with_ts(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name); + GLib.Marshaller.Free (native_file_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_construct_term_color(uint colorinfo); + + public static string ConstructTermColor(uint colorinfo) { + IntPtr raw_ret = gst_debug_construct_term_color(colorinfo); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_debug_construct_win_color(uint colorinfo); + + public static int ConstructWinColor(uint colorinfo) { + int raw_ret = gst_debug_construct_win_color(colorinfo); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_get_all_categories(); + + public static GLib.SList[] GetAllCategories() { + IntPtr raw_ret = gst_debug_get_all_categories(); + GLib.SList[] ret = (GLib.SList[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.SList), false, true, typeof(GLib.SList)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_debug_get_color_mode(); + + public static Gst.DebugColorMode GetColorMode() { + int raw_ret = gst_debug_get_color_mode(); + Gst.DebugColorMode ret = (Gst.DebugColorMode) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_debug_get_default_threshold(); + + public static Gst.DebugLevel GetDefaultThreshold() { + int raw_ret = gst_debug_get_default_threshold(); + Gst.DebugLevel ret = (Gst.DebugLevel) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_get_stack_trace(int flags); + + public static string GetStackTrace(Gst.StackTraceFlags flags) { + IntPtr raw_ret = gst_debug_get_stack_trace((int) flags); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_debug_is_active(); + + public static bool IsActive() { + bool raw_ret = gst_debug_is_active(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_debug_is_colored(); + + public static bool IsColored() { + bool raw_ret = gst_debug_is_colored(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_level_get_name(int level); + + public static string LevelGetName(Gst.DebugLevel level) { + IntPtr raw_ret = gst_debug_level_get_name((int) level); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_log_default(IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message, IntPtr user_data); + + public static void LogDefault(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message, IntPtr user_data) { + IntPtr native_category = GLib.Marshaller.StructureToPtrAlloc (category); + IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file); + IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function); + gst_debug_log_default(native_category, (int) level, native_file, native_function, line, _object == null ? IntPtr.Zero : _object.Handle, message == null ? IntPtr.Zero : message.Handle, user_data); + Marshal.FreeHGlobal (native_category); + GLib.Marshaller.Free (native_file); + GLib.Marshaller.Free (native_function); + } + + public static void LogDefault(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, Gst.DebugMessage message) { + LogDefault (category, level, file, function, line, null, message, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_log_get_line(IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message); + + public static string LogGetLine(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message) { + IntPtr native_category = GLib.Marshaller.StructureToPtrAlloc (category); + IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file); + IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function); + IntPtr raw_ret = gst_debug_log_get_line(native_category, (int) level, native_file, native_function, line, _object == null ? IntPtr.Zero : _object.Handle, message == null ? IntPtr.Zero : message.Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + Marshal.FreeHGlobal (native_category); + GLib.Marshaller.Free (native_file); + GLib.Marshaller.Free (native_function); + return ret; + } + + public static string LogGetLine(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, Gst.DebugMessage message) { + return LogGetLine (category, level, file, function, line, null, message); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_print_stack_trace(); + + public static void PrintStackTrace() { + gst_debug_print_stack_trace(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_debug_remove_log_function(GstSharp.LogFunctionNative func); + + public static uint RemoveLogFunction(Gst.LogFunction func) { + GstSharp.LogFunctionWrapper func_wrapper = new GstSharp.LogFunctionWrapper (func); + uint raw_ret = gst_debug_remove_log_function(func_wrapper.NativeDelegate); + uint ret = raw_ret; + return ret; + } + + public static uint RemoveLogFunction() { + return RemoveLogFunction (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_debug_remove_log_function_by_data(IntPtr data); + + public static uint RemoveLogFunctionByData(IntPtr data) { + uint raw_ret = gst_debug_remove_log_function_by_data(data); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_remove_ring_buffer_logger(); + + public static void RemoveRingBufferLogger() { + gst_debug_remove_ring_buffer_logger(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_ring_buffer_logger_get_logs(); + + public static string[] RingBufferLoggerGetLogs() { + IntPtr raw_ret = gst_debug_ring_buffer_logger_get_logs(); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_active(bool active); + + public static void SetActive(bool active) { + gst_debug_set_active(active); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_color_mode(int mode); + + public static void SetColorMode(Gst.DebugColorMode mode) { + gst_debug_set_color_mode((int) mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_color_mode_from_string(IntPtr mode); + + public static void SetColorModeFromString(string mode) { + IntPtr native_mode = GLib.Marshaller.StringToPtrGStrdup (mode); + gst_debug_set_color_mode_from_string(native_mode); + GLib.Marshaller.Free (native_mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_colored(bool colored); + + public static void SetColored(bool colored) { + gst_debug_set_colored(colored); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_default_threshold(int level); + + public static void SetDefaultThreshold(Gst.DebugLevel level) { + gst_debug_set_default_threshold((int) level); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_threshold_for_name(IntPtr name, int level); + + public static void SetThresholdForName(string name, Gst.DebugLevel level) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_debug_set_threshold_for_name(native_name, (int) level); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_set_threshold_from_string(IntPtr list, bool reset); + + public static void SetThresholdFromString(string list, bool reset) { + IntPtr native_list = GLib.Marshaller.StringToPtrGStrdup (list); + gst_debug_set_threshold_from_string(native_list, reset); + GLib.Marshaller.Free (native_list); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_unset_threshold_for_name(IntPtr name); + + public static void UnsetThresholdForName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_debug_unset_threshold_for_name(native_name); + GLib.Marshaller.Free (native_name); + } + +#endregion + } +} diff --git a/sources/generated/Gst/DebugCategory.cs b/sources/generated/Gst/DebugCategory.cs new file mode 100644 index 0000000000..fc17e30980 --- /dev/null +++ b/sources/generated/Gst/DebugCategory.cs @@ -0,0 +1,76 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct DebugCategory : IEquatable { + + private Gst.DebugLevel threshold; + private uint color; + private string name; + private string description; + + public static Gst.DebugCategory Zero = new Gst.DebugCategory (); + + public static Gst.DebugCategory New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.DebugCategory.Zero; + return (Gst.DebugCategory) Marshal.PtrToStructure (raw, typeof (Gst.DebugCategory)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_category_free(IntPtr raw); + + [Obsolete] + public void Free() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_debug_category_free(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_debug_category_reset_threshold(IntPtr raw); + + public void ResetThreshold() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_debug_category_reset_threshold(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.DebugCategory target) + { + target = New (native); + } + + public bool Equals (DebugCategory other) + { + return true && threshold.Equals (other.threshold) && color.Equals (other.color) && name.Equals (other.name) && description.Equals (other.description); + } + + public override bool Equals (object other) + { + return other is DebugCategory && Equals ((DebugCategory) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ threshold.GetHashCode () ^ color.GetHashCode () ^ name.GetHashCode () ^ description.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/DebugColorFlags.cs b/sources/generated/Gst/DebugColorFlags.cs new file mode 100644 index 0000000000..1ffdaba2ea --- /dev/null +++ b/sources/generated/Gst/DebugColorFlags.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.DebugColorFlagsGType))] + public enum DebugColorFlags : uint { + + FgBlack = 0, + BgBlack = 0, + FgRed = 1, + FgGreen = 2, + FgYellow = 3, + FgBlue = 4, + FgMagenta = 5, + FgCyan = 6, + FgWhite = 7, + BgRed = 16, + BgGreen = 32, + BgYellow = 48, + BgBlue = 64, + BgMagenta = 80, + BgCyan = 96, + BgWhite = 112, + Bold = 256, + Underline = 512, + } + + internal class DebugColorFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_color_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_debug_color_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/DebugColorMode.cs b/sources/generated/Gst/DebugColorMode.cs new file mode 100644 index 0000000000..ab5d525cfa --- /dev/null +++ b/sources/generated/Gst/DebugColorMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.DebugColorModeGType))] + public enum DebugColorMode { + + Off = 0, + On = 1, + Unix = 2, + } + + internal class DebugColorModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_color_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_debug_color_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/DebugFuncPtr.cs b/sources/generated/Gst/DebugFuncPtr.cs new file mode 100644 index 0000000000..eb182fc84b --- /dev/null +++ b/sources/generated/Gst/DebugFuncPtr.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void DebugFuncPtr(); + +} diff --git a/sources/generated/Gst/DebugGraphDetails.cs b/sources/generated/Gst/DebugGraphDetails.cs new file mode 100644 index 0000000000..fd240f5d1b --- /dev/null +++ b/sources/generated/Gst/DebugGraphDetails.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.DebugGraphDetailsGType))] + public enum DebugGraphDetails : uint { + + MediaType = 1, + CapsDetails = 2, + NonDefaultParams = 4, + States = 8, + All = 15, + FullParams = 16, + Verbose = 4294967295, + } + + internal class DebugGraphDetailsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_graph_details_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_debug_graph_details_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/DebugLevel.cs b/sources/generated/Gst/DebugLevel.cs new file mode 100644 index 0000000000..49aa04bf65 --- /dev/null +++ b/sources/generated/Gst/DebugLevel.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.DebugLevelGType))] + public enum DebugLevel { + + None = 0, + Error = 1, + Warning = 2, + Fixme = 3, + Info = 4, + Debug = 5, + Log = 6, + Trace = 7, + Memdump = 9, + Count = 10, + } + + internal class DebugLevelGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_level_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_debug_level_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/DebugMessage.cs b/sources/generated/Gst/DebugMessage.cs new file mode 100644 index 0000000000..39f2d08b93 --- /dev/null +++ b/sources/generated/Gst/DebugMessage.cs @@ -0,0 +1,43 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DebugMessage : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_debug_message_get(IntPtr raw); + + public string Get() { + IntPtr raw_ret = gst_debug_message_get(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + public DebugMessage(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/DeepElementAddedHandler.cs b/sources/generated/Gst/DeepElementAddedHandler.cs new file mode 100644 index 0000000000..2dfa4e884e --- /dev/null +++ b/sources/generated/Gst/DeepElementAddedHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void DeepElementAddedHandler(object o, DeepElementAddedArgs args); + + public class DeepElementAddedArgs : GLib.SignalArgs { + public Gst.Bin SubBin{ + get { + return (Gst.Bin) Args [0]; + } + } + + public Gst.Element Element{ + get { + return (Gst.Element) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/DeepElementRemovedHandler.cs b/sources/generated/Gst/DeepElementRemovedHandler.cs new file mode 100644 index 0000000000..9ab541b0e6 --- /dev/null +++ b/sources/generated/Gst/DeepElementRemovedHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void DeepElementRemovedHandler(object o, DeepElementRemovedArgs args); + + public class DeepElementRemovedArgs : GLib.SignalArgs { + public Gst.Bin SubBin{ + get { + return (Gst.Bin) Args [0]; + } + } + + public Gst.Element Element{ + get { + return (Gst.Element) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/DeepNotifyHandler.cs b/sources/generated/Gst/DeepNotifyHandler.cs new file mode 100644 index 0000000000..a4201bb515 --- /dev/null +++ b/sources/generated/Gst/DeepNotifyHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void DeepNotifyHandler(object o, DeepNotifyArgs args); + + public class DeepNotifyArgs : GLib.SignalArgs { + public Gst.Object PropObject{ + get { + return (Gst.Object) Args [0]; + } + } + + public IntPtr Prop{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/Device.cs b/sources/generated/Gst/Device.cs new file mode 100644 index 0000000000..daeaa7fa50 --- /dev/null +++ b/sources/generated/Gst/Device.cs @@ -0,0 +1,384 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Device : Gst.Object { + + protected Device (IntPtr raw) : base(raw) {} + + protected Device() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_get_caps(IntPtr raw); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_device_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_get_device_class(IntPtr raw); + + [GLib.Property ("device-class")] + public string DeviceClass { + get { + IntPtr raw_ret = gst_device_get_device_class(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_get_display_name(IntPtr raw); + + [GLib.Property ("display-name")] + public string DisplayName { + get { + IntPtr raw_ret = gst_device_get_display_name(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_get_properties(IntPtr raw); + + [GLib.Property ("properties")] + public Gst.Structure Properties { + get { + IntPtr raw_ret = gst_device_get_properties(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + } + + [GLib.Signal("removed")] + public event System.EventHandler Removed { + add { + this.AddSignalHandler ("removed", value); + } + remove { + this.RemoveSignalHandler ("removed", value); + } + } + + static RemovedNativeDelegate Removed_cb_delegate; + static RemovedNativeDelegate RemovedVMCallback { + get { + if (Removed_cb_delegate == null) + Removed_cb_delegate = new RemovedNativeDelegate (Removed_cb); + return Removed_cb_delegate; + } + } + + static void OverrideRemoved (GLib.GType gtype) + { + OverrideRemoved (gtype, RemovedVMCallback); + } + + static void OverrideRemoved (GLib.GType gtype, RemovedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "removed", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void RemovedNativeDelegate (IntPtr inst); + + static void Removed_cb (IntPtr inst) + { + try { + Device __obj = GLib.Object.GetObject (inst, false) as Device; + __obj.OnRemoved (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Device), ConnectionMethod="OverrideRemoved")] + protected virtual void OnRemoved () + { + InternalRemoved (); + } + + private void InternalRemoved () + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (1); + GLib.Value[] vals = new GLib.Value [1]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static CreateElementNativeDelegate CreateElement_cb_delegate; + static CreateElementNativeDelegate CreateElementVMCallback { + get { + if (CreateElement_cb_delegate == null) + CreateElement_cb_delegate = new CreateElementNativeDelegate (CreateElement_cb); + return CreateElement_cb_delegate; + } + } + + static void OverrideCreateElement (GLib.GType gtype) + { + OverrideCreateElement (gtype, CreateElementVMCallback); + } + + static void OverrideCreateElement (GLib.GType gtype, CreateElementNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_element")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr CreateElementNativeDelegate (IntPtr inst, IntPtr name); + + static IntPtr CreateElement_cb (IntPtr inst, IntPtr name) + { + try { + Device __obj = GLib.Object.GetObject (inst, false) as Device; + Gst.Element __result; + __result = __obj.OnCreateElement (GLib.Marshaller.Utf8PtrToString (name)); + return __result == null ? IntPtr.Zero : __result.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Device), ConnectionMethod="OverrideCreateElement")] + protected virtual Gst.Element OnCreateElement (string name) + { + return InternalCreateElement (name); + } + + private Gst.Element InternalCreateElement (string name) + { + CreateElementNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_element")); + unmanaged = (CreateElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateElementNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr __result = unmanaged (this.Handle, native_name); + GLib.Marshaller.Free (native_name); + return GLib.Object.GetObject(__result) as Gst.Element; + } + + static ReconfigureElementNativeDelegate ReconfigureElement_cb_delegate; + static ReconfigureElementNativeDelegate ReconfigureElementVMCallback { + get { + if (ReconfigureElement_cb_delegate == null) + ReconfigureElement_cb_delegate = new ReconfigureElementNativeDelegate (ReconfigureElement_cb); + return ReconfigureElement_cb_delegate; + } + } + + static void OverrideReconfigureElement (GLib.GType gtype) + { + OverrideReconfigureElement (gtype, ReconfigureElementVMCallback); + } + + static void OverrideReconfigureElement (GLib.GType gtype, ReconfigureElementNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reconfigure_element")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool ReconfigureElementNativeDelegate (IntPtr inst, IntPtr element); + + static bool ReconfigureElement_cb (IntPtr inst, IntPtr element) + { + try { + Device __obj = GLib.Object.GetObject (inst, false) as Device; + bool __result; + __result = __obj.OnReconfigureElement (GLib.Object.GetObject(element) as Gst.Element); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Device), ConnectionMethod="OverrideReconfigureElement")] + protected virtual bool OnReconfigureElement (Gst.Element element) + { + return InternalReconfigureElement (element); + } + + private bool InternalReconfigureElement (Gst.Element element) + { + ReconfigureElementNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reconfigure_element")); + unmanaged = (ReconfigureElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReconfigureElementNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle); + return __result; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("create_element" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_element + , null + , "reconfigure_element" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("reconfigure_element" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // reconfigure_element + , "create_element" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "reconfigure_element" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_device_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_create_element(IntPtr raw, IntPtr name); + + public Gst.Element CreateElement(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_device_create_element(Handle, native_name); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_name); + return ret; + } + + public Gst.Element CreateElement() { + return CreateElement (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_has_classes(IntPtr raw, IntPtr classes); + + public bool HasClasses(string classes) { + IntPtr native_classes = GLib.Marshaller.StringToPtrGStrdup (classes); + bool raw_ret = gst_device_has_classes(Handle, native_classes); + bool ret = raw_ret; + GLib.Marshaller.Free (native_classes); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_has_classesv(IntPtr raw, IntPtr[] classes); + + public bool HasClassesv(string[] classes) { + int cnt_classes = classes == null ? 0 : classes.Length; + IntPtr[] native_classes = new IntPtr [cnt_classes + 1]; + for (int i = 0; i < cnt_classes; i++) + native_classes [i] = GLib.Marshaller.StringToPtrGStrdup (classes[i]); + native_classes [cnt_classes] = IntPtr.Zero; + bool raw_ret = gst_device_has_classesv(Handle, native_classes); + bool ret = raw_ret; + for (int i = 0; i < native_classes.Length - 1; i++) { + classes [i] = GLib.Marshaller.Utf8PtrToString (native_classes[i]); + GLib.Marshaller.Free (native_classes[i]); + } + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_reconfigure_element(IntPtr raw, IntPtr element); + + public bool ReconfigureElement(Gst.Element element) { + bool raw_ret = gst_device_reconfigure_element(Handle, element == null ? IntPtr.Zero : element.Handle); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/DeviceMonitor.cs b/sources/generated/Gst/DeviceMonitor.cs new file mode 100644 index 0000000000..89665c3f05 --- /dev/null +++ b/sources/generated/Gst/DeviceMonitor.cs @@ -0,0 +1,202 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DeviceMonitor : Gst.Object { + + public DeviceMonitor (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_monitor_new(); + + public DeviceMonitor () : base (IntPtr.Zero) + { + if (GetType () != typeof (DeviceMonitor)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_device_monitor_new(); + } + + [GLib.Property ("show-all")] + public bool ShowAll { + get { + GLib.Value val = GetProperty ("show-all"); + bool ret = (bool) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("show-all", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_monitor_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_device_monitor_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_device_monitor_add_filter(IntPtr raw, IntPtr classes, IntPtr caps); + + public uint AddFilter(string classes, Gst.Caps caps) { + IntPtr native_classes = GLib.Marshaller.StringToPtrGStrdup (classes); + uint raw_ret = gst_device_monitor_add_filter(Handle, native_classes, caps == null ? IntPtr.Zero : caps.Handle); + uint ret = raw_ret; + GLib.Marshaller.Free (native_classes); + return ret; + } + + public uint AddFilter() { + return AddFilter (null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_monitor_get_bus(IntPtr raw); + + public Gst.Bus Bus { + get { + IntPtr raw_ret = gst_device_monitor_get_bus(Handle); + Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_monitor_get_devices(IntPtr raw); + + public Gst.Device[] Devices { + get { + IntPtr raw_ret = gst_device_monitor_get_devices(Handle); + Gst.Device[] ret = (Gst.Device[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Device)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_monitor_get_providers(IntPtr raw); + + public string[] Providers { + get { + IntPtr raw_ret = gst_device_monitor_get_providers(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_monitor_get_show_all_devices(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_monitor_set_show_all_devices(IntPtr raw, bool show_all); + + public bool ShowAllDevices { + get { + bool raw_ret = gst_device_monitor_get_show_all_devices(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_device_monitor_set_show_all_devices(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_monitor_remove_filter(IntPtr raw, uint filter_id); + + public bool RemoveFilter(uint filter_id) { + bool raw_ret = gst_device_monitor_remove_filter(Handle, filter_id); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_monitor_start(IntPtr raw); + + public bool Start() { + bool raw_ret = gst_device_monitor_start(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_monitor_stop(IntPtr raw); + + public void Stop() { + gst_device_monitor_stop(Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/DeviceProvider.cs b/sources/generated/Gst/DeviceProvider.cs new file mode 100644 index 0000000000..c952cedfb7 --- /dev/null +++ b/sources/generated/Gst/DeviceProvider.cs @@ -0,0 +1,516 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DeviceProvider : Gst.Object { + + protected DeviceProvider (IntPtr raw) : base(raw) {} + + protected DeviceProvider() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_devices(IntPtr raw); + + public Gst.Device[] Devices { + get { + IntPtr raw_ret = gst_device_provider_get_devices(Handle); + Gst.Device[] ret = (Gst.Device[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Device)); + return ret; + } + } + + [GLib.Signal("provider-unhidden")] + public event Gst.ProviderUnhiddenHandler ProviderUnhidden { + add { + this.AddSignalHandler ("provider-unhidden", value, typeof (Gst.ProviderUnhiddenArgs)); + } + remove { + this.RemoveSignalHandler ("provider-unhidden", value); + } + } + + [GLib.Signal("provider-hidden")] + public event Gst.ProviderHiddenHandler ProviderHidden { + add { + this.AddSignalHandler ("provider-hidden", value, typeof (Gst.ProviderHiddenArgs)); + } + remove { + this.RemoveSignalHandler ("provider-hidden", value); + } + } + + static ProviderHiddenNativeDelegate ProviderHidden_cb_delegate; + static ProviderHiddenNativeDelegate ProviderHiddenVMCallback { + get { + if (ProviderHidden_cb_delegate == null) + ProviderHidden_cb_delegate = new ProviderHiddenNativeDelegate (ProviderHidden_cb); + return ProviderHidden_cb_delegate; + } + } + + static void OverrideProviderHidden (GLib.GType gtype) + { + OverrideProviderHidden (gtype, ProviderHiddenVMCallback); + } + + static void OverrideProviderHidden (GLib.GType gtype, ProviderHiddenNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "provider-hidden", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ProviderHiddenNativeDelegate (IntPtr inst, IntPtr _object); + + static void ProviderHidden_cb (IntPtr inst, IntPtr _object) + { + try { + DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider; + __obj.OnProviderHidden (GLib.Marshaller.Utf8PtrToString (_object)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderHidden")] + protected virtual void OnProviderHidden (string _object) + { + InternalProviderHidden (_object); + } + + private void InternalProviderHidden (string _object) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static ProviderUnhiddenNativeDelegate ProviderUnhidden_cb_delegate; + static ProviderUnhiddenNativeDelegate ProviderUnhiddenVMCallback { + get { + if (ProviderUnhidden_cb_delegate == null) + ProviderUnhidden_cb_delegate = new ProviderUnhiddenNativeDelegate (ProviderUnhidden_cb); + return ProviderUnhidden_cb_delegate; + } + } + + static void OverrideProviderUnhidden (GLib.GType gtype) + { + OverrideProviderUnhidden (gtype, ProviderUnhiddenVMCallback); + } + + static void OverrideProviderUnhidden (GLib.GType gtype, ProviderUnhiddenNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "provider-unhidden", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ProviderUnhiddenNativeDelegate (IntPtr inst, IntPtr _object); + + static void ProviderUnhidden_cb (IntPtr inst, IntPtr _object) + { + try { + DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider; + __obj.OnProviderUnhidden (GLib.Marshaller.Utf8PtrToString (_object)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderUnhidden")] + protected virtual void OnProviderUnhidden (string _object) + { + InternalProviderUnhidden (_object); + } + + private void InternalProviderUnhidden (string _object) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (_object); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static StartNativeDelegate Start_cb_delegate; + static StartNativeDelegate StartVMCallback { + get { + if (Start_cb_delegate == null) + Start_cb_delegate = new StartNativeDelegate (Start_cb); + return Start_cb_delegate; + } + } + + static void OverrideStart (GLib.GType gtype) + { + OverrideStart (gtype, StartVMCallback); + } + + static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool StartNativeDelegate (IntPtr inst); + + static bool Start_cb (IntPtr inst) + { + try { + DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider; + bool __result; + __result = __obj.OnStart (); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStart")] + protected virtual bool OnStart () + { + return InternalStart (); + } + + private bool InternalStart () + { + StartNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); + unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle); + return __result; + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StopNativeDelegate (IntPtr inst); + + static void Stop_cb (IntPtr inst) + { + try { + DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider; + __obj.OnStop (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStop")] + protected virtual void OnStop () + { + InternalStop (); + } + + private void InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("factory" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // factory + , null + , "probe" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("probe" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // probe + , "factory" + , "start" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("start" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // start + , "probe" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "start" + , "metadata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("metadata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // metadata + , "stop" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "metadata" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_device_provider_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_register(IntPtr plugin, IntPtr name, uint rank, IntPtr type); + + public static bool Register(Gst.Plugin plugin, string name, uint rank, GLib.GType type) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_device_provider_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + public static bool Register(string name, uint rank, GLib.GType type) { + return Register (null, name, rank, type); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_can_monitor(IntPtr raw); + + public bool CanMonitor() { + bool raw_ret = gst_device_provider_can_monitor(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_device_add(IntPtr raw, IntPtr device); + + public void DeviceAdd(Gst.Device device) { + gst_device_provider_device_add(Handle, device == null ? IntPtr.Zero : device.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_device_changed(IntPtr raw, IntPtr device, IntPtr changed_device); + + public void DeviceChanged(Gst.Device device, Gst.Device changed_device) { + gst_device_provider_device_changed(Handle, device == null ? IntPtr.Zero : device.Handle, changed_device == null ? IntPtr.Zero : changed_device.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_device_remove(IntPtr raw, IntPtr device); + + public void DeviceRemove(Gst.Device device) { + gst_device_provider_device_remove(Handle, device == null ? IntPtr.Zero : device.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_bus(IntPtr raw); + + public Gst.Bus Bus { + get { + IntPtr raw_ret = gst_device_provider_get_bus(Handle); + Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_factory(IntPtr raw); + + public Gst.DeviceProviderFactory Factory { + get { + IntPtr raw_ret = gst_device_provider_get_factory(Handle); + Gst.DeviceProviderFactory ret = GLib.Object.GetObject(raw_ret) as Gst.DeviceProviderFactory; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_hidden_providers(IntPtr raw); + + public string[] HiddenProviders { + get { + IntPtr raw_ret = gst_device_provider_get_hidden_providers(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_get_metadata(IntPtr raw, IntPtr key); + + public string GetMetadata(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_device_provider_get_metadata(Handle, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_hide_provider(IntPtr raw, IntPtr name); + + public void HideProvider(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_device_provider_hide_provider(Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_is_started(IntPtr raw); + + public bool IsStarted { + get { + bool raw_ret = gst_device_provider_is_started(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_start(IntPtr raw); + + public bool Start() { + bool raw_ret = gst_device_provider_start(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_stop(IntPtr raw); + + public void Stop() { + gst_device_provider_stop(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_device_provider_unhide_provider(IntPtr raw, IntPtr name); + + public void UnhideProvider(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + gst_device_provider_unhide_provider(Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("devices" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // devices + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "devices" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/DeviceProviderFactory.cs b/sources/generated/Gst/DeviceProviderFactory.cs new file mode 100644 index 0000000000..144bbcde67 --- /dev/null +++ b/sources/generated/Gst/DeviceProviderFactory.cs @@ -0,0 +1,174 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DeviceProviderFactory : Gst.PluginFeature { + + public DeviceProviderFactory (IntPtr raw) : base(raw) {} + + protected DeviceProviderFactory() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PluginFeature.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_device_provider_factory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_find(IntPtr name); + + public static Gst.DeviceProviderFactory Find(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_device_provider_factory_find(native_name); + Gst.DeviceProviderFactory ret = GLib.Object.GetObject(raw_ret, true) as Gst.DeviceProviderFactory; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get_by_name(IntPtr factoryname); + + public static Gst.DeviceProvider GetByName(string factoryname) { + IntPtr native_factoryname = GLib.Marshaller.StringToPtrGStrdup (factoryname); + IntPtr raw_ret = gst_device_provider_factory_get_by_name(native_factoryname); + Gst.DeviceProvider ret = GLib.Object.GetObject(raw_ret, true) as Gst.DeviceProvider; + GLib.Marshaller.Free (native_factoryname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_list_get_device_providers(int minrank); + + public static Gst.DeviceProviderFactory[] ListGetDeviceProviders(Gst.Rank minrank) { + IntPtr raw_ret = gst_device_provider_factory_list_get_device_providers((int) minrank); + Gst.DeviceProviderFactory[] ret = (Gst.DeviceProviderFactory[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.DeviceProviderFactory)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get(IntPtr raw); + + public Gst.DeviceProvider Get() { + IntPtr raw_ret = gst_device_provider_factory_get(Handle); + Gst.DeviceProvider ret = GLib.Object.GetObject(raw_ret, true) as Gst.DeviceProvider; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get_device_provider_type(IntPtr raw); + + public GLib.GType DeviceProviderType { + get { + IntPtr raw_ret = gst_device_provider_factory_get_device_provider_type(Handle); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get_metadata(IntPtr raw, IntPtr key); + + public string GetMetadata(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_device_provider_factory_get_metadata(Handle, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_device_provider_factory_get_metadata_keys(IntPtr raw); + + public string[] MetadataKeys { + get { + IntPtr raw_ret = gst_device_provider_factory_get_metadata_keys(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_factory_has_classes(IntPtr raw, IntPtr classes); + + public bool HasClasses(string classes) { + IntPtr native_classes = GLib.Marshaller.StringToPtrGStrdup (classes); + bool raw_ret = gst_device_provider_factory_has_classes(Handle, native_classes); + bool ret = raw_ret; + GLib.Marshaller.Free (native_classes); + return ret; + } + + public bool HasClasses() { + return HasClasses (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_device_provider_factory_has_classesv(IntPtr raw, IntPtr[] classes); + + public bool HasClassesv(string[] classes) { + int cnt_classes = classes == null ? 0 : classes.Length; + IntPtr[] native_classes = new IntPtr [cnt_classes + 1]; + for (int i = 0; i < cnt_classes; i++) + native_classes [i] = GLib.Marshaller.StringToPtrGStrdup (classes[i]); + native_classes [cnt_classes] = IntPtr.Zero; + bool raw_ret = gst_device_provider_factory_has_classesv(Handle, native_classes); + bool ret = raw_ret; + for (int i = 0; i < native_classes.Length - 1; i++) { + classes [i] = GLib.Marshaller.Utf8PtrToString (native_classes[i]); + GLib.Marshaller.Free (native_classes[i]); + } + return ret; + } + + public bool HasClassesv() { + return HasClassesv (null); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PluginFeature.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/DoLatencyHandler.cs b/sources/generated/Gst/DoLatencyHandler.cs new file mode 100644 index 0000000000..01413170a8 --- /dev/null +++ b/sources/generated/Gst/DoLatencyHandler.cs @@ -0,0 +1,12 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void DoLatencyHandler(object o, DoLatencyArgs args); + + public class DoLatencyArgs : GLib.SignalArgs { + } +} diff --git a/sources/generated/Gst/DynamicTypeFactory.cs b/sources/generated/Gst/DynamicTypeFactory.cs new file mode 100644 index 0000000000..192c1c9cf3 --- /dev/null +++ b/sources/generated/Gst/DynamicTypeFactory.cs @@ -0,0 +1,75 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class DynamicTypeFactory : Gst.PluginFeature { + + public DynamicTypeFactory (IntPtr raw) : base(raw) {} + + protected DynamicTypeFactory() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PluginFeature.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_dynamic_type_factory_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_dynamic_type_factory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_dynamic_type_factory_load(IntPtr factoryname); + + public static GLib.GType Load(string factoryname) { + IntPtr native_factoryname = GLib.Marshaller.StringToPtrGStrdup (factoryname); + IntPtr raw_ret = gst_dynamic_type_factory_load(native_factoryname); + GLib.GType ret = new GLib.GType(raw_ret); + GLib.Marshaller.Free (native_factoryname); + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PluginFeature.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Element.cs b/sources/generated/Gst/Element.cs new file mode 100644 index 0000000000..507f032380 --- /dev/null +++ b/sources/generated/Gst/Element.cs @@ -0,0 +1,2317 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Element : Gst.Object { + + protected Element (IntPtr raw) : base(raw) {} + + protected Element() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + public GLib.RecMutex StateLock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("state_lock")); + return new GLib.RecMutex((*raw_ptr)); + } + } + } + + public GLib.Cond StateCond { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("state_cond")); + return new GLib.Cond((*raw_ptr)); + } + } + } + + public uint StateCookie { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("state_cookie")); + return (*raw_ptr); + } + } + } + + public Gst.State TargetState { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("target_state")); + return (Gst.State) (*raw_ptr); + } + } + } + + public Gst.State CurrentState { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("current_state")); + return (Gst.State) (*raw_ptr); + } + } + } + + public Gst.State NextState { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("next_state")); + return (Gst.State) (*raw_ptr); + } + } + } + + public Gst.State PendingState { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("pending_state")); + return (Gst.State) (*raw_ptr); + } + } + } + + public Gst.StateChangeReturn LastReturn { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("last_return")); + return (Gst.StateChangeReturn) (*raw_ptr); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_bus(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_set_bus(IntPtr raw, IntPtr bus); + + public Gst.Bus Bus { + get { + IntPtr raw_ret = gst_element_get_bus(Handle); + Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus; + return ret; + } + set { + gst_element_set_bus(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_clock(IntPtr raw); + + public Gst.Clock Clock { + get { + IntPtr raw_ret = gst_element_get_clock(Handle); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_element_get_base_time(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_set_base_time(IntPtr raw, ulong time); + + public ulong BaseTime { + get { + ulong raw_ret = gst_element_get_base_time(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_element_set_base_time(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_element_get_start_time(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_set_start_time(IntPtr raw, ulong time); + + public ulong StartTime { + get { + ulong raw_ret = gst_element_get_start_time(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_element_set_start_time(Handle, value); + } + } + + public ushort Numpads { + get { + unsafe { + ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numpads")); + return (*raw_ptr); + } + } + } + + public GLib.List Pads { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pads")); + return new GLib.List((*raw_ptr)); + } + } + } + + public ushort Numsrcpads { + get { + unsafe { + ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numsrcpads")); + return (*raw_ptr); + } + } + } + + public GLib.List Srcpads { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpads")); + return new GLib.List((*raw_ptr)); + } + } + } + + public ushort Numsinkpads { + get { + unsafe { + ushort* raw_ptr = (ushort*)(((byte*)Handle) + abi_info.GetFieldOffset("numsinkpads")); + return (*raw_ptr); + } + } + } + + public GLib.List Sinkpads { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpads")); + return new GLib.List((*raw_ptr)); + } + } + } + + public uint PadsCookie { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("pads_cookie")); + return (*raw_ptr); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_contexts(IntPtr raw); + + public GLib.List[] Contexts { + get { + IntPtr raw_ret = gst_element_get_contexts(Handle); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GLib.List)); + return ret; + } + } + + [GLib.Signal("no-more-pads")] + public event System.EventHandler NoMorePadsEvent { + add { + this.AddSignalHandler ("no-more-pads", value); + } + remove { + this.RemoveSignalHandler ("no-more-pads", value); + } + } + + [GLib.Signal("pad-removed")] + public event Gst.PadRemovedHandler PadRemoved { + add { + this.AddSignalHandler ("pad-removed", value, typeof (Gst.PadRemovedArgs)); + } + remove { + this.RemoveSignalHandler ("pad-removed", value); + } + } + + [GLib.Signal("pad-added")] + public event Gst.PadAddedHandler PadAdded { + add { + this.AddSignalHandler ("pad-added", value, typeof (Gst.PadAddedArgs)); + } + remove { + this.RemoveSignalHandler ("pad-added", value); + } + } + + static PadAddedNativeDelegate PadAdded_cb_delegate; + static PadAddedNativeDelegate PadAddedVMCallback { + get { + if (PadAdded_cb_delegate == null) + PadAdded_cb_delegate = new PadAddedNativeDelegate (PadAdded_cb); + return PadAdded_cb_delegate; + } + } + + static void OverridePadAdded (GLib.GType gtype) + { + OverridePadAdded (gtype, PadAddedVMCallback); + } + + static void OverridePadAdded (GLib.GType gtype, PadAddedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_added")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PadAddedNativeDelegate (IntPtr inst, IntPtr new_pad); + + static void PadAdded_cb (IntPtr inst, IntPtr new_pad) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnPadAdded (GLib.Object.GetObject(new_pad) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePadAdded")] + protected virtual void OnPadAdded (Gst.Pad new_pad) + { + InternalPadAdded (new_pad); + } + + private void InternalPadAdded (Gst.Pad new_pad) + { + PadAddedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_added")); + unmanaged = (PadAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadAddedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, new_pad == null ? IntPtr.Zero : new_pad.Handle); + } + + static PadRemovedNativeDelegate PadRemoved_cb_delegate; + static PadRemovedNativeDelegate PadRemovedVMCallback { + get { + if (PadRemoved_cb_delegate == null) + PadRemoved_cb_delegate = new PadRemovedNativeDelegate (PadRemoved_cb); + return PadRemoved_cb_delegate; + } + } + + static void OverridePadRemoved (GLib.GType gtype) + { + OverridePadRemoved (gtype, PadRemovedVMCallback); + } + + static void OverridePadRemoved (GLib.GType gtype, PadRemovedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_removed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PadRemovedNativeDelegate (IntPtr inst, IntPtr old_pad); + + static void PadRemoved_cb (IntPtr inst, IntPtr old_pad) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnPadRemoved (GLib.Object.GetObject(old_pad) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePadRemoved")] + protected virtual void OnPadRemoved (Gst.Pad old_pad) + { + InternalPadRemoved (old_pad); + } + + private void InternalPadRemoved (Gst.Pad old_pad) + { + PadRemovedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_removed")); + unmanaged = (PadRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadRemovedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, old_pad == null ? IntPtr.Zero : old_pad.Handle); + } + + static NoMorePadsEventNativeDelegate NoMorePadsEvent_cb_delegate; + static NoMorePadsEventNativeDelegate NoMorePadsEventVMCallback { + get { + if (NoMorePadsEvent_cb_delegate == null) + NoMorePadsEvent_cb_delegate = new NoMorePadsEventNativeDelegate (NoMorePadsEvent_cb); + return NoMorePadsEvent_cb_delegate; + } + } + + static void OverrideNoMorePadsEvent (GLib.GType gtype) + { + OverrideNoMorePadsEvent (gtype, NoMorePadsEventVMCallback); + } + + static void OverrideNoMorePadsEvent (GLib.GType gtype, NoMorePadsEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("no_more_pads")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void NoMorePadsEventNativeDelegate (IntPtr inst); + + static void NoMorePadsEvent_cb (IntPtr inst) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnNoMorePadsEvent (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideNoMorePadsEvent")] + protected virtual void OnNoMorePadsEvent () + { + InternalNoMorePadsEvent (); + } + + private void InternalNoMorePadsEvent () + { + NoMorePadsEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("no_more_pads")); + unmanaged = (NoMorePadsEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NoMorePadsEventNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static RequestNewPadNativeDelegate RequestNewPad_cb_delegate; + static RequestNewPadNativeDelegate RequestNewPadVMCallback { + get { + if (RequestNewPad_cb_delegate == null) + RequestNewPad_cb_delegate = new RequestNewPadNativeDelegate (RequestNewPad_cb); + return RequestNewPad_cb_delegate; + } + } + + static void OverrideRequestNewPad (GLib.GType gtype) + { + OverrideRequestNewPad (gtype, RequestNewPadVMCallback); + } + + static void OverrideRequestNewPad (GLib.GType gtype, RequestNewPadNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("request_new_pad")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr RequestNewPadNativeDelegate (IntPtr inst, IntPtr templ, IntPtr name, IntPtr caps); + + static IntPtr RequestNewPad_cb (IntPtr inst, IntPtr templ, IntPtr name, IntPtr caps) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + Gst.Pad __result; + __result = __obj.OnRequestNewPad (GLib.Object.GetObject(templ) as Gst.PadTemplate, GLib.Marshaller.Utf8PtrToString (name), caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); + return __result == null ? IntPtr.Zero : __result.OwnedHandle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideRequestNewPad")] + protected virtual Gst.Pad OnRequestNewPad (Gst.PadTemplate templ, string name, Gst.Caps caps) + { + return InternalRequestNewPad (templ, name, caps); + } + + private Gst.Pad InternalRequestNewPad (Gst.PadTemplate templ, string name, Gst.Caps caps) + { + RequestNewPadNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("request_new_pad")); + unmanaged = (RequestNewPadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RequestNewPadNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr __result = unmanaged (this.Handle, templ == null ? IntPtr.Zero : templ.Handle, native_name, caps == null ? IntPtr.Zero : caps.Handle); + GLib.Marshaller.Free (native_name); + return GLib.Object.GetObject(__result, true) as Gst.Pad; + } + + static ReleasePadNativeDelegate ReleasePad_cb_delegate; + static ReleasePadNativeDelegate ReleasePadVMCallback { + get { + if (ReleasePad_cb_delegate == null) + ReleasePad_cb_delegate = new ReleasePadNativeDelegate (ReleasePad_cb); + return ReleasePad_cb_delegate; + } + } + + static void OverrideReleasePad (GLib.GType gtype) + { + OverrideReleasePad (gtype, ReleasePadVMCallback); + } + + static void OverrideReleasePad (GLib.GType gtype, ReleasePadNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("release_pad")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ReleasePadNativeDelegate (IntPtr inst, IntPtr pad); + + static void ReleasePad_cb (IntPtr inst, IntPtr pad) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnReleasePad (GLib.Object.GetObject(pad) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideReleasePad")] + protected virtual void OnReleasePad (Gst.Pad pad) + { + InternalReleasePad (pad); + } + + private void InternalReleasePad (Gst.Pad pad) + { + ReleasePadNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("release_pad")); + unmanaged = (ReleasePadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReleasePadNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle); + } + + static GetStateNativeDelegate GetState_cb_delegate; + static GetStateNativeDelegate GetStateVMCallback { + get { + if (GetState_cb_delegate == null) + GetState_cb_delegate = new GetStateNativeDelegate (GetState_cb); + return GetState_cb_delegate; + } + } + + static void OverrideGetState (GLib.GType gtype) + { + OverrideGetState (gtype, GetStateVMCallback); + } + + static void OverrideGetState (GLib.GType gtype, GetStateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_state")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int GetStateNativeDelegate (IntPtr inst, out int state, out int pending, ulong timeout); + + static int GetState_cb (IntPtr inst, out int state, out int pending, ulong timeout) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + Gst.StateChangeReturn __result; + Gst.State mystate; + Gst.State mypending; + __result = __obj.OnGetState (out mystate, out mypending, timeout); + state = (int) mystate; + pending = (int) mypending; + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideGetState")] + protected virtual Gst.StateChangeReturn OnGetState (out Gst.State state, out Gst.State pending, ulong timeout) + { + return InternalGetState (out state, out pending, timeout); + } + + private Gst.StateChangeReturn InternalGetState (out Gst.State state, out Gst.State pending, ulong timeout) + { + GetStateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_state")); + unmanaged = (GetStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetStateNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + int native_state; + int native_pending; + int __result = unmanaged (this.Handle, out native_state, out native_pending, timeout); + state = (Gst.State) native_state; + pending = (Gst.State) native_pending; + return (Gst.StateChangeReturn) __result; + } + + static SetStateNativeDelegate SetState_cb_delegate; + static SetStateNativeDelegate SetStateVMCallback { + get { + if (SetState_cb_delegate == null) + SetState_cb_delegate = new SetStateNativeDelegate (SetState_cb); + return SetState_cb_delegate; + } + } + + static void OverrideSetState (GLib.GType gtype) + { + OverrideSetState (gtype, SetStateVMCallback); + } + + static void OverrideSetState (GLib.GType gtype, SetStateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_state")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int SetStateNativeDelegate (IntPtr inst, int state); + + static int SetState_cb (IntPtr inst, int state) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + Gst.StateChangeReturn __result; + __result = __obj.OnSetState ((Gst.State) state); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetState")] + protected virtual Gst.StateChangeReturn OnSetState (Gst.State state) + { + return InternalSetState (state); + } + + private Gst.StateChangeReturn InternalSetState (Gst.State state) + { + SetStateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_state")); + unmanaged = (SetStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetStateNativeDelegate)); + } + if (unmanaged == null) return (Gst.StateChangeReturn) 0; + + int __result = unmanaged (this.Handle, (int) state); + return (Gst.StateChangeReturn) __result; + } + + static ChangeStateNativeDelegate ChangeState_cb_delegate; + static ChangeStateNativeDelegate ChangeStateVMCallback { + get { + if (ChangeState_cb_delegate == null) + ChangeState_cb_delegate = new ChangeStateNativeDelegate (ChangeState_cb); + return ChangeState_cb_delegate; + } + } + + static void OverrideChangeState (GLib.GType gtype) + { + OverrideChangeState (gtype, ChangeStateVMCallback); + } + + static void OverrideChangeState (GLib.GType gtype, ChangeStateNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_state")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate int ChangeStateNativeDelegate (IntPtr inst, int transition); + + static int ChangeState_cb (IntPtr inst, int transition) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + Gst.StateChangeReturn __result; + __result = __obj.OnChangeState ((Gst.StateChange) transition); + return (int) __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideChangeState")] + protected virtual Gst.StateChangeReturn OnChangeState (Gst.StateChange transition) + { + return InternalChangeState (transition); + } + + private Gst.StateChangeReturn InternalChangeState (Gst.StateChange transition) + { + ChangeStateNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("change_state")); + unmanaged = (ChangeStateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangeStateNativeDelegate)); + } + if (unmanaged == null) return (Gst.StateChangeReturn) 0; + + int __result = unmanaged (this.Handle, (int) transition); + return (Gst.StateChangeReturn) __result; + } + + static StateChangedNativeDelegate StateChanged_cb_delegate; + static StateChangedNativeDelegate StateChangedVMCallback { + get { + if (StateChanged_cb_delegate == null) + StateChanged_cb_delegate = new StateChangedNativeDelegate (StateChanged_cb); + return StateChanged_cb_delegate; + } + } + + static void OverrideStateChanged (GLib.GType gtype) + { + OverrideStateChanged (gtype, StateChangedVMCallback); + } + + static void OverrideStateChanged (GLib.GType gtype, StateChangedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("state_changed")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StateChangedNativeDelegate (IntPtr inst, int oldstate, int newstate, int pending); + + static void StateChanged_cb (IntPtr inst, int oldstate, int newstate, int pending) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnStateChanged ((Gst.State) oldstate, (Gst.State) newstate, (Gst.State) pending); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideStateChanged")] + protected virtual void OnStateChanged (Gst.State oldstate, Gst.State newstate, Gst.State pending) + { + InternalStateChanged (oldstate, newstate, pending); + } + + private void InternalStateChanged (Gst.State oldstate, Gst.State newstate, Gst.State pending) + { + StateChangedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("state_changed")); + unmanaged = (StateChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StateChangedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, (int) oldstate, (int) newstate, (int) pending); + } + + static SetBusNativeDelegate SetBus_cb_delegate; + static SetBusNativeDelegate SetBusVMCallback { + get { + if (SetBus_cb_delegate == null) + SetBus_cb_delegate = new SetBusNativeDelegate (SetBus_cb); + return SetBus_cb_delegate; + } + } + + static void OverrideSetBus (GLib.GType gtype) + { + OverrideSetBus (gtype, SetBusVMCallback); + } + + static void OverrideSetBus (GLib.GType gtype, SetBusNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_bus")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetBusNativeDelegate (IntPtr inst, IntPtr bus); + + static void SetBus_cb (IntPtr inst, IntPtr bus) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnSetBus (GLib.Object.GetObject(bus) as Gst.Bus); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetBus")] + protected virtual void OnSetBus (Gst.Bus bus) + { + InternalSetBus (bus); + } + + private void InternalSetBus (Gst.Bus bus) + { + SetBusNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_bus")); + unmanaged = (SetBusNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetBusNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, bus == null ? IntPtr.Zero : bus.Handle); + } + + static ProvideClockNativeDelegate ProvideClock_cb_delegate; + static ProvideClockNativeDelegate ProvideClockVMCallback { + get { + if (ProvideClock_cb_delegate == null) + ProvideClock_cb_delegate = new ProvideClockNativeDelegate (ProvideClock_cb); + return ProvideClock_cb_delegate; + } + } + + static void OverrideProvideClock (GLib.GType gtype) + { + OverrideProvideClock (gtype, ProvideClockVMCallback); + } + + static void OverrideProvideClock (GLib.GType gtype, ProvideClockNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("provide_clock")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr ProvideClockNativeDelegate (IntPtr inst); + + static IntPtr ProvideClock_cb (IntPtr inst) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + Gst.Clock __result; + __result = __obj.OnProvideClock (); + return __result == null ? IntPtr.Zero : __result.OwnedHandle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideProvideClock")] + protected virtual Gst.Clock OnProvideClock () + { + return InternalProvideClock (); + } + + private Gst.Clock InternalProvideClock () + { + ProvideClockNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("provide_clock")); + unmanaged = (ProvideClockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProvideClockNativeDelegate)); + } + if (unmanaged == null) return null; + + IntPtr __result = unmanaged (this.Handle); + return GLib.Object.GetObject(__result, true) as Gst.Clock; + } + + static SetClockNativeDelegate SetClock_cb_delegate; + static SetClockNativeDelegate SetClockVMCallback { + get { + if (SetClock_cb_delegate == null) + SetClock_cb_delegate = new SetClockNativeDelegate (SetClock_cb); + return SetClock_cb_delegate; + } + } + + static void OverrideSetClock (GLib.GType gtype) + { + OverrideSetClock (gtype, SetClockVMCallback); + } + + static void OverrideSetClock (GLib.GType gtype, SetClockNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_clock")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetClockNativeDelegate (IntPtr inst, IntPtr clock); + + static bool SetClock_cb (IntPtr inst, IntPtr clock) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + bool __result; + __result = __obj.OnSetClock (GLib.Object.GetObject(clock) as Gst.Clock); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetClock")] + protected virtual bool OnSetClock (Gst.Clock clock) + { + return InternalSetClock (clock); + } + + private bool InternalSetClock (Gst.Clock clock) + { + SetClockNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_clock")); + unmanaged = (SetClockNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetClockNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, clock == null ? IntPtr.Zero : clock.Handle); + return __result; + } + + static SendEventNativeDelegate SendEvent_cb_delegate; + static SendEventNativeDelegate SendEventVMCallback { + get { + if (SendEvent_cb_delegate == null) + SendEvent_cb_delegate = new SendEventNativeDelegate (SendEvent_cb); + return SendEvent_cb_delegate; + } + } + + static void OverrideSendEvent (GLib.GType gtype) + { + OverrideSendEvent (gtype, SendEventVMCallback); + } + + static void OverrideSendEvent (GLib.GType gtype, SendEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("send_event")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SendEventNativeDelegate (IntPtr inst, IntPtr evnt); + + static bool SendEvent_cb (IntPtr inst, IntPtr evnt) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + bool __result; + __result = __obj.OnSendEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSendEvent")] + protected virtual bool OnSendEvent (Gst.Event evnt) + { + return InternalSendEvent (evnt); + } + + private bool InternalSendEvent (Gst.Event evnt) + { + SendEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("send_event")); + unmanaged = (SendEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SendEventNativeDelegate)); + } + if (unmanaged == null) return false; + + evnt.Owned = false; + bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + + static QueryNativeDelegate Query_cb_delegate; + static QueryNativeDelegate QueryVMCallback { + get { + if (Query_cb_delegate == null) + Query_cb_delegate = new QueryNativeDelegate (Query_cb); + return Query_cb_delegate; + } + } + + static void OverrideQuery (GLib.GType gtype) + { + OverrideQuery (gtype, QueryVMCallback); + } + + static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool QueryNativeDelegate (IntPtr inst, IntPtr query); + + static bool Query_cb (IntPtr inst, IntPtr query) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + bool __result; + __result = __obj.OnQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideQuery")] + protected virtual bool OnQuery (Gst.Query query) + { + return InternalQuery (query); + } + + private bool InternalQuery (Gst.Query query) + { + QueryNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); + unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); + } + if (unmanaged == null) return false; + + bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + + static PostMessageNativeDelegate PostMessage_cb_delegate; + static PostMessageNativeDelegate PostMessageVMCallback { + get { + if (PostMessage_cb_delegate == null) + PostMessage_cb_delegate = new PostMessageNativeDelegate (PostMessage_cb); + return PostMessage_cb_delegate; + } + } + + static void OverridePostMessage (GLib.GType gtype) + { + OverridePostMessage (gtype, PostMessageVMCallback); + } + + static void OverridePostMessage (GLib.GType gtype, PostMessageNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("post_message")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool PostMessageNativeDelegate (IntPtr inst, IntPtr message); + + static bool PostMessage_cb (IntPtr inst, IntPtr message) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + bool __result; + __result = __obj.OnPostMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), true)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverridePostMessage")] + protected virtual bool OnPostMessage (Gst.Message message) + { + return InternalPostMessage (message); + } + + private bool InternalPostMessage (Gst.Message message) + { + PostMessageNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("post_message")); + unmanaged = (PostMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PostMessageNativeDelegate)); + } + if (unmanaged == null) return false; + + message.Owned = false; + bool __result = unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle); + return __result; + } + + static SetContextNativeDelegate SetContext_cb_delegate; + static SetContextNativeDelegate SetContextVMCallback { + get { + if (SetContext_cb_delegate == null) + SetContext_cb_delegate = new SetContextNativeDelegate (SetContext_cb); + return SetContext_cb_delegate; + } + } + + static void OverrideSetContext (GLib.GType gtype) + { + OverrideSetContext (gtype, SetContextVMCallback); + } + + static void OverrideSetContext (GLib.GType gtype, SetContextNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_context")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void SetContextNativeDelegate (IntPtr inst, IntPtr context); + + static void SetContext_cb (IntPtr inst, IntPtr context) + { + try { + Element __obj = GLib.Object.GetObject (inst, false) as Element; + __obj.OnSetContext (Gst.Context.New (context)); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Element), ConnectionMethod="OverrideSetContext")] + protected virtual void OnSetContext (Gst.Context context) + { + InternalSetContext (context); + } + + private void InternalSetContext (Gst.Context context) + { + SetContextNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_context")); + unmanaged = (SetContextNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetContextNativeDelegate)); + } + if (unmanaged == null) return; + + IntPtr native_context = GLib.Marshaller.StructureToPtrAlloc (context); + unmanaged (this.Handle, native_context); + Marshal.FreeHGlobal (native_context); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("metadata" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // metadata + , null + , "elementfactory" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("elementfactory" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // elementfactory + , "metadata" + , "padtemplates" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("padtemplates" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // padtemplates + , "elementfactory" + , "numpadtemplates" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("numpadtemplates" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // numpadtemplates + , "padtemplates" + , "pad_templ_cookie" + , (long) Marshal.OffsetOf(typeof(GstElement_numpadtemplatesAlign), "numpadtemplates") + , 0 + ), + new GLib.AbiField("pad_templ_cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // pad_templ_cookie + , "numpadtemplates" + , "pad_added" + , (long) Marshal.OffsetOf(typeof(GstElement_pad_templ_cookieAlign), "pad_templ_cookie") + , 0 + ), + new GLib.AbiField("pad_added" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pad_added + , "pad_templ_cookie" + , "pad_removed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pad_removed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pad_removed + , "pad_added" + , "no_more_pads" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("no_more_pads" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // no_more_pads + , "pad_removed" + , "request_new_pad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("request_new_pad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // request_new_pad + , "no_more_pads" + , "release_pad" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("release_pad" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // release_pad + , "request_new_pad" + , "get_state" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_state" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_state + , "release_pad" + , "set_state" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_state" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_state + , "get_state" + , "change_state" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("change_state" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // change_state + , "set_state" + , "state_changed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("state_changed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // state_changed + , "change_state" + , "set_bus" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_bus" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_bus + , "state_changed" + , "provide_clock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("provide_clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // provide_clock + , "set_bus" + , "set_clock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_clock + , "provide_clock" + , "send_event" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("send_event" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // send_event + , "set_clock" + , "query" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("query" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // query + , "send_event" + , "post_message" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("post_message" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // post_message + , "query" + , "set_context" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("set_context" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_context + , "post_message" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 18 // _gst_reserved + , "set_context" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_numpadtemplatesAlign + { + sbyte f1; + private int numpadtemplates; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_pad_templ_cookieAlign + { + sbyte f1; + private uint pad_templ_cookie; + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_element_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_element_make_from_uri(int type, IntPtr uri, IntPtr elementname, out IntPtr error); + + public static unsafe Gst.Element MakeFromUri(Gst.URIType type, string uri, string elementname) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_elementname = GLib.Marshaller.StringToPtrGStrdup (elementname); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_element_make_from_uri((int) type, native_uri, native_elementname, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_elementname); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static Gst.Element MakeFromUri(Gst.URIType type, string uri) { + return MakeFromUri (type, uri, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_register(IntPtr plugin, IntPtr name, uint rank, IntPtr type); + + public static bool Register(Gst.Plugin plugin, string name, uint rank, GLib.GType type) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_element_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + public static bool Register(string name, uint rank, GLib.GType type) { + return Register (null, name, rank, type); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_state_change_return_get_name(int state_ret); + + public static string StateChangeReturnGetName(Gst.StateChangeReturn state_ret) { + IntPtr raw_ret = gst_element_state_change_return_get_name((int) state_ret); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_state_get_name(int state); + + public static string StateGetName(Gst.State state) { + IntPtr raw_ret = gst_element_state_get_name((int) state); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_abort_state(IntPtr raw); + + public void AbortState() { + gst_element_abort_state(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_add_pad(IntPtr raw, IntPtr pad); + + public bool AddPad(Gst.Pad pad) { + bool raw_ret = gst_element_add_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_element_add_property_deep_notify_watch(IntPtr raw, IntPtr property_name, bool include_value); + + public ulong AddPropertyDeepNotifyWatch(string property_name, bool include_value) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + UIntPtr raw_ret = gst_element_add_property_deep_notify_watch(Handle, native_property_name, include_value); + ulong ret = (ulong) raw_ret; + GLib.Marshaller.Free (native_property_name); + return ret; + } + + public ulong AddPropertyDeepNotifyWatch(bool include_value) { + return AddPropertyDeepNotifyWatch (null, include_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_element_add_property_notify_watch(IntPtr raw, IntPtr property_name, bool include_value); + + public ulong AddPropertyNotifyWatch(string property_name, bool include_value) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + UIntPtr raw_ret = gst_element_add_property_notify_watch(Handle, native_property_name, include_value); + ulong ret = (ulong) raw_ret; + GLib.Marshaller.Free (native_property_name); + return ret; + } + + public ulong AddPropertyNotifyWatch(bool include_value) { + return AddPropertyNotifyWatch (null, include_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_call_async(IntPtr raw, GstSharp.ElementCallAsyncFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify); + + public void CallAsync(Gst.ElementCallAsyncFunc func) { + GstSharp.ElementCallAsyncFuncWrapper func_wrapper = new GstSharp.ElementCallAsyncFuncWrapper (func); + IntPtr user_data; + GLib.DestroyNotify destroy_notify; + if (func == null) { + user_data = IntPtr.Zero; + destroy_notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + destroy_notify = GLib.DestroyHelper.NotifyHandler; + } + gst_element_call_async(Handle, func_wrapper.NativeDelegate, user_data, destroy_notify); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_element_change_state(IntPtr raw, int transition); + + public Gst.StateChangeReturn ChangeState(Gst.StateChange transition) { + int raw_ret = gst_element_change_state(Handle, (int) transition); + Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_element_continue_state(IntPtr raw, int _ret); + + public Gst.StateChangeReturn ContinueState(Gst.StateChangeReturn _ret) { + int raw_ret = gst_element_continue_state(Handle, (int) _ret); + Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_create_all_pads(IntPtr raw); + + public void CreateAllPads() { + gst_element_create_all_pads(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_foreach_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data); + + public bool ForeachPad(Gst.ElementForeachPadFunc func) { + GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func); + bool raw_ret = gst_element_foreach_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_foreach_sink_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data); + + public bool ForeachSinkPad(Gst.ElementForeachPadFunc func) { + GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func); + bool raw_ret = gst_element_foreach_sink_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_foreach_src_pad(IntPtr raw, GstSharp.ElementForeachPadFuncNative func, IntPtr user_data); + + public bool ForeachSrcPad(Gst.ElementForeachPadFunc func) { + GstSharp.ElementForeachPadFuncWrapper func_wrapper = new GstSharp.ElementForeachPadFuncWrapper (func); + bool raw_ret = gst_element_foreach_src_pad(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_compatible_pad(IntPtr raw, IntPtr pad, IntPtr caps); + + public Gst.Pad GetCompatiblePad(Gst.Pad pad, Gst.Caps caps) { + IntPtr raw_ret = gst_element_get_compatible_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + return ret; + } + + public Gst.Pad GetCompatiblePad(Gst.Pad pad) { + return GetCompatiblePad (pad, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_compatible_pad_template(IntPtr raw, IntPtr compattempl); + + public Gst.PadTemplate GetCompatiblePadTemplate(Gst.PadTemplate compattempl) { + IntPtr raw_ret = gst_element_get_compatible_pad_template(Handle, compattempl == null ? IntPtr.Zero : compattempl.Handle); + Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_context(IntPtr raw, IntPtr context_type); + + public Gst.Context GetContext(string context_type) { + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + IntPtr raw_ret = gst_element_get_context(Handle, native_context_type); + Gst.Context ret = Gst.Context.New (raw_ret); + GLib.Marshaller.Free (native_context_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_context_unlocked(IntPtr raw, IntPtr context_type); + + public Gst.Context GetContextUnlocked(string context_type) { + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + IntPtr raw_ret = gst_element_get_context_unlocked(Handle, native_context_type); + Gst.Context ret = Gst.Context.New (raw_ret); + GLib.Marshaller.Free (native_context_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_element_get_current_clock_time(IntPtr raw); + + public ulong CurrentClockTime { + get { + ulong raw_ret = gst_element_get_current_clock_time(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_element_get_current_running_time(IntPtr raw); + + public ulong CurrentRunningTime { + get { + ulong raw_ret = gst_element_get_current_running_time(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_factory(IntPtr raw); + + public Gst.ElementFactory Factory { + get { + IntPtr raw_ret = gst_element_get_factory(Handle); + Gst.ElementFactory ret = GLib.Object.GetObject(raw_ret) as Gst.ElementFactory; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_metadata(IntPtr raw, IntPtr key); + + public string GetMetadata(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_element_get_metadata(Handle, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_pad_template(IntPtr raw, IntPtr name); + + public Gst.PadTemplate GetPadTemplate(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_get_pad_template(Handle, native_name); + Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_pad_template_list(IntPtr raw); + + public Gst.PadTemplate[] PadTemplateList { + get { + IntPtr raw_ret = gst_element_get_pad_template_list(Handle); + Gst.PadTemplate[] ret = (Gst.PadTemplate[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PadTemplate)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_request_pad(IntPtr raw, IntPtr name); + + public Gst.Pad GetRequestPad(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_get_request_pad(Handle, native_name); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_element_get_state(IntPtr raw, out int state, out int pending, ulong timeout); + + public Gst.StateChangeReturn GetState(out Gst.State state, out Gst.State pending, ulong timeout) { + int native_state; + int native_pending; + int raw_ret = gst_element_get_state(Handle, out native_state, out native_pending, timeout); + Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret; + state = (Gst.State) native_state; + pending = (Gst.State) native_pending; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_get_static_pad(IntPtr raw, IntPtr name); + + public Gst.Pad GetStaticPad(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_get_static_pad(Handle, native_name); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_is_locked_state(IntPtr raw); + + public bool IsLockedState { + get { + bool raw_ret = gst_element_is_locked_state(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_iterate_pads(IntPtr raw); + + public Gst.Iterator IteratePads() { + IntPtr raw_ret = gst_element_iterate_pads(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_iterate_sink_pads(IntPtr raw); + + public Gst.Iterator IterateSinkPads() { + IntPtr raw_ret = gst_element_iterate_sink_pads(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_iterate_src_pads(IntPtr raw); + + public Gst.Iterator IterateSrcPads() { + IntPtr raw_ret = gst_element_iterate_src_pads(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_link(IntPtr raw, IntPtr dest); + + public bool Link(Gst.Element dest) { + bool raw_ret = gst_element_link(Handle, dest == null ? IntPtr.Zero : dest.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_link_filtered(IntPtr raw, IntPtr dest, IntPtr filter); + + public bool LinkFiltered(Gst.Element dest, Gst.Caps filter) { + bool raw_ret = gst_element_link_filtered(Handle, dest == null ? IntPtr.Zero : dest.Handle, filter == null ? IntPtr.Zero : filter.Handle); + bool ret = raw_ret; + return ret; + } + + public bool LinkFiltered(Gst.Element dest) { + return LinkFiltered (dest, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_link_pads(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname); + + public bool LinkPads(string srcpadname, Gst.Element dest, string destpadname) { + IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname); + IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname); + bool raw_ret = gst_element_link_pads(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname); + bool ret = raw_ret; + GLib.Marshaller.Free (native_srcpadname); + GLib.Marshaller.Free (native_destpadname); + return ret; + } + + public bool LinkPads(Gst.Element dest) { + return LinkPads (null, dest, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_link_pads_filtered(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname, IntPtr filter); + + public bool LinkPadsFiltered(string srcpadname, Gst.Element dest, string destpadname, Gst.Caps filter) { + IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname); + IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname); + bool raw_ret = gst_element_link_pads_filtered(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname, filter == null ? IntPtr.Zero : filter.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_srcpadname); + GLib.Marshaller.Free (native_destpadname); + return ret; + } + + public bool LinkPadsFiltered(Gst.Element dest) { + return LinkPadsFiltered (null, dest, null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_link_pads_full(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname, int flags); + + public bool LinkPadsFull(string srcpadname, Gst.Element dest, string destpadname, Gst.PadLinkCheck flags) { + IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname); + IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname); + bool raw_ret = gst_element_link_pads_full(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname, (int) flags); + bool ret = raw_ret; + GLib.Marshaller.Free (native_srcpadname); + GLib.Marshaller.Free (native_destpadname); + return ret; + } + + public bool LinkPadsFull(Gst.Element dest, Gst.PadLinkCheck flags) { + return LinkPadsFull (null, dest, null, flags); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_lost_state(IntPtr raw); + + public void LostState() { + gst_element_lost_state(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_message_full(IntPtr raw, int type, uint domain, int code, IntPtr text, IntPtr debug, IntPtr file, IntPtr function, int line); + + public void MessageFull(Gst.MessageType type, uint domain, int code, string text, string debug, string file, string function, int line) { + IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file); + IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function); + gst_element_message_full(Handle, (int) type, domain, code, GLib.Marshaller.StringToPtrGStrdup(text), GLib.Marshaller.StringToPtrGStrdup(debug), native_file, native_function, line); + GLib.Marshaller.Free (native_file); + GLib.Marshaller.Free (native_function); + } + + public void MessageFull(Gst.MessageType type, uint domain, int code, string file, string function, int line) { + MessageFull (type, domain, code, null, null, file, function, line); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_message_full_with_details(IntPtr raw, int type, uint domain, int code, IntPtr text, IntPtr debug, IntPtr file, IntPtr function, int line, IntPtr structure); + + public void MessageFullWithDetails(Gst.MessageType type, uint domain, int code, string text, string debug, string file, string function, int line, Gst.Structure structure) { + IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file); + IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function); + structure.Owned = false; + gst_element_message_full_with_details(Handle, (int) type, domain, code, GLib.Marshaller.StringToPtrGStrdup(text), GLib.Marshaller.StringToPtrGStrdup(debug), native_file, native_function, line, structure == null ? IntPtr.Zero : structure.Handle); + GLib.Marshaller.Free (native_file); + GLib.Marshaller.Free (native_function); + } + + public void MessageFullWithDetails(Gst.MessageType type, uint domain, int code, string file, string function, int line, Gst.Structure structure) { + MessageFullWithDetails (type, domain, code, null, null, file, function, line, structure); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_no_more_pads(IntPtr raw); + + public void NoMorePads() { + gst_element_no_more_pads(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_post_message(IntPtr raw, IntPtr message); + + public bool PostMessage(Gst.Message message) { + message.Owned = false; + bool raw_ret = gst_element_post_message(Handle, message == null ? IntPtr.Zero : message.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_provide_clock(IntPtr raw); + + public Gst.Clock ProvideClock() { + IntPtr raw_ret = gst_element_provide_clock(Handle); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_query(IntPtr raw, IntPtr query); + + public bool Query(Gst.Query query) { + bool raw_ret = gst_element_query(Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_query_convert(IntPtr raw, int src_format, long src_val, int dest_format, out long dest_val); + + public bool QueryConvert(Gst.Format src_format, long src_val, Gst.Format dest_format, out long dest_val) { + bool raw_ret = gst_element_query_convert(Handle, (int) src_format, src_val, (int) dest_format, out dest_val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_query_duration(IntPtr raw, int format, out long duration); + + public bool QueryDuration(Gst.Format format, out long duration) { + bool raw_ret = gst_element_query_duration(Handle, (int) format, out duration); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_query_position(IntPtr raw, int format, out long cur); + + public bool QueryPosition(Gst.Format format, out long cur) { + bool raw_ret = gst_element_query_position(Handle, (int) format, out cur); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_release_request_pad(IntPtr raw, IntPtr pad); + + public void ReleaseRequestPad(Gst.Pad pad) { + gst_element_release_request_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_remove_pad(IntPtr raw, IntPtr pad); + + public bool RemovePad(Gst.Pad pad) { + bool raw_ret = gst_element_remove_pad(Handle, pad == null ? IntPtr.Zero : pad.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_remove_property_notify_watch(IntPtr raw, UIntPtr watch_id); + + public void RemovePropertyNotifyWatch(ulong watch_id) { + gst_element_remove_property_notify_watch(Handle, new UIntPtr (watch_id)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_request_pad(IntPtr raw, IntPtr templ, IntPtr name, IntPtr caps); + + public Gst.Pad RequestPad(Gst.PadTemplate templ, string name, Gst.Caps caps) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_request_pad(Handle, templ == null ? IntPtr.Zero : templ.Handle, native_name, caps == null ? IntPtr.Zero : caps.Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + GLib.Marshaller.Free (native_name); + return ret; + } + + public Gst.Pad RequestPad(Gst.PadTemplate templ) { + return RequestPad (templ, null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_seek(IntPtr raw, double rate, int format, int flags, int start_type, long start, int stop_type, long stop); + + public bool Seek(double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop) { + bool raw_ret = gst_element_seek(Handle, rate, (int) format, (int) flags, (int) start_type, start, (int) stop_type, stop); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_seek_simple(IntPtr raw, int format, int seek_flags, long seek_pos); + + public bool SeekSimple(Gst.Format format, Gst.SeekFlags seek_flags, long seek_pos) { + bool raw_ret = gst_element_seek_simple(Handle, (int) format, (int) seek_flags, seek_pos); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_send_event(IntPtr raw, IntPtr evnt); + + public bool SendEvent(Gst.Event evnt) { + evnt.Owned = false; + bool raw_ret = gst_element_send_event(Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_set_clock(IntPtr raw, IntPtr clock); + + public bool SetClock(Gst.Clock clock) { + bool raw_ret = gst_element_set_clock(Handle, clock == null ? IntPtr.Zero : clock.Handle); + bool ret = raw_ret; + return ret; + } + + public bool SetClock() { + return SetClock (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_set_locked_state(IntPtr raw, bool locked_state); + + public bool SetLockedState(bool locked_state) { + bool raw_ret = gst_element_set_locked_state(Handle, locked_state); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_element_set_state(IntPtr raw, int state); + + public Gst.StateChangeReturn SetState(Gst.State state) { + int raw_ret = gst_element_set_state(Handle, (int) state); + Gst.StateChangeReturn ret = (Gst.StateChangeReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_sync_state_with_parent(IntPtr raw); + + public bool SyncStateWithParent() { + bool raw_ret = gst_element_sync_state_with_parent(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_unlink(IntPtr raw, IntPtr dest); + + public void Unlink(Gst.Element dest) { + gst_element_unlink(Handle, dest == null ? IntPtr.Zero : dest.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_element_unlink_pads(IntPtr raw, IntPtr srcpadname, IntPtr dest, IntPtr destpadname); + + public void UnlinkPads(string srcpadname, Gst.Element dest, string destpadname) { + IntPtr native_srcpadname = GLib.Marshaller.StringToPtrGStrdup (srcpadname); + IntPtr native_destpadname = GLib.Marshaller.StringToPtrGStrdup (destpadname); + gst_element_unlink_pads(Handle, native_srcpadname, dest == null ? IntPtr.Zero : dest.Handle, native_destpadname); + GLib.Marshaller.Free (native_srcpadname); + GLib.Marshaller.Free (native_destpadname); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("state_lock" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // state_lock + , null + , "state_cond" + , (long) Marshal.OffsetOf(typeof(GstElement_state_lockAlign), "state_lock") + , 0 + ), + new GLib.AbiField("state_cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // state_cond + , "state_lock" + , "state_cookie" + , (long) Marshal.OffsetOf(typeof(GstElement_state_condAlign), "state_cond") + , 0 + ), + new GLib.AbiField("state_cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // state_cookie + , "state_cond" + , "target_state" + , (long) Marshal.OffsetOf(typeof(GstElement_state_cookieAlign), "state_cookie") + , 0 + ), + new GLib.AbiField("target_state" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // target_state + , "state_cookie" + , "current_state" + , (long) Marshal.OffsetOf(typeof(GstElement_target_stateAlign), "target_state") + , 0 + ), + new GLib.AbiField("current_state" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // current_state + , "target_state" + , "next_state" + , (long) Marshal.OffsetOf(typeof(GstElement_current_stateAlign), "current_state") + , 0 + ), + new GLib.AbiField("next_state" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // next_state + , "current_state" + , "pending_state" + , (long) Marshal.OffsetOf(typeof(GstElement_next_stateAlign), "next_state") + , 0 + ), + new GLib.AbiField("pending_state" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.State))) // pending_state + , "next_state" + , "last_return" + , (long) Marshal.OffsetOf(typeof(GstElement_pending_stateAlign), "pending_state") + , 0 + ), + new GLib.AbiField("last_return" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.StateChangeReturn))) // last_return + , "pending_state" + , "bus" + , (long) Marshal.OffsetOf(typeof(GstElement_last_returnAlign), "last_return") + , 0 + ), + new GLib.AbiField("bus" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // bus + , "last_return" + , "clock" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("clock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock + , "bus" + , "base_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("base_time" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // base_time + , "clock" + , "start_time" + , (long) Marshal.OffsetOf(typeof(GstElement_base_timeAlign), "base_time") + , 0 + ), + new GLib.AbiField("start_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // start_time + , "base_time" + , "numpads" + , (long) Marshal.OffsetOf(typeof(GstElement_start_timeAlign), "start_time") + , 0 + ), + new GLib.AbiField("numpads" + , -1 + , (uint) Marshal.SizeOf(typeof(ushort)) // numpads + , "start_time" + , "pads" + , (long) Marshal.OffsetOf(typeof(GstElement_numpadsAlign), "numpads") + , 0 + ), + new GLib.AbiField("pads" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pads + , "numpads" + , "numsrcpads" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("numsrcpads" + , -1 + , (uint) Marshal.SizeOf(typeof(ushort)) // numsrcpads + , "pads" + , "srcpads" + , (long) Marshal.OffsetOf(typeof(GstElement_numsrcpadsAlign), "numsrcpads") + , 0 + ), + new GLib.AbiField("srcpads" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpads + , "numsrcpads" + , "numsinkpads" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("numsinkpads" + , -1 + , (uint) Marshal.SizeOf(typeof(ushort)) // numsinkpads + , "srcpads" + , "sinkpads" + , (long) Marshal.OffsetOf(typeof(GstElement_numsinkpadsAlign), "numsinkpads") + , 0 + ), + new GLib.AbiField("sinkpads" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpads + , "numsinkpads" + , "pads_cookie" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pads_cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // pads_cookie + , "sinkpads" + , "contexts" + , (long) Marshal.OffsetOf(typeof(GstElement_pads_cookieAlign), "pads_cookie") + , 0 + ), + new GLib.AbiField("contexts" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // contexts + , "pads_cookie" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _gst_reserved + , "contexts" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_state_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI state_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_state_condAlign + { + sbyte f1; + private GLib.Cond.ABI state_cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_state_cookieAlign + { + sbyte f1; + private uint state_cookie; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_target_stateAlign + { + sbyte f1; + private Gst.State target_state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_current_stateAlign + { + sbyte f1; + private Gst.State current_state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_next_stateAlign + { + sbyte f1; + private Gst.State next_state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_pending_stateAlign + { + sbyte f1; + private Gst.State pending_state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_last_returnAlign + { + sbyte f1; + private Gst.StateChangeReturn last_return; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_base_timeAlign + { + sbyte f1; + private ulong base_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_start_timeAlign + { + sbyte f1; + private ulong start_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_numpadsAlign + { + sbyte f1; + private ushort numpads; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_numsrcpadsAlign + { + sbyte f1; + private ushort numsrcpads; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_numsinkpadsAlign + { + sbyte f1; + private ushort numsinkpads; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstElement_pads_cookieAlign + { + sbyte f1; + private uint pads_cookie; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ElementAddedHandler.cs b/sources/generated/Gst/ElementAddedHandler.cs new file mode 100644 index 0000000000..8f1892de8e --- /dev/null +++ b/sources/generated/Gst/ElementAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ElementAddedHandler(object o, ElementAddedArgs args); + + public class ElementAddedArgs : GLib.SignalArgs { + public Gst.Element Element{ + get { + return (Gst.Element) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/ElementCallAsyncFunc.cs b/sources/generated/Gst/ElementCallAsyncFunc.cs new file mode 100644 index 0000000000..feec5f05a8 --- /dev/null +++ b/sources/generated/Gst/ElementCallAsyncFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ElementCallAsyncFunc(Gst.Element element); + +} diff --git a/sources/generated/Gst/ElementFactory.cs b/sources/generated/Gst/ElementFactory.cs new file mode 100644 index 0000000000..60c157339d --- /dev/null +++ b/sources/generated/Gst/ElementFactory.cs @@ -0,0 +1,247 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ElementFactory : Gst.PluginFeature { + + public ElementFactory (IntPtr raw) : base(raw) {} + + protected ElementFactory() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PluginFeature.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_element_factory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_find(IntPtr name); + + public static Gst.ElementFactory Find(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_factory_find(native_name); + Gst.ElementFactory ret = GLib.Object.GetObject(raw_ret, true) as Gst.ElementFactory; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_list_filter(IntPtr list, IntPtr caps, int direction, bool subsetonly); + + public static Gst.ElementFactory[] ListFilter(GLib.List list, Gst.Caps caps, Gst.PadDirection direction, bool subsetonly) { + IntPtr raw_ret = gst_element_factory_list_filter(list == null ? IntPtr.Zero : list.Handle, caps == null ? IntPtr.Zero : caps.Handle, (int) direction, subsetonly); + Gst.ElementFactory[] ret = (Gst.ElementFactory[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.ElementFactory)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_list_get_elements(ulong type, int minrank); + + public static Gst.ElementFactory[] ListGetElements(ulong type, Gst.Rank minrank) { + IntPtr raw_ret = gst_element_factory_list_get_elements(type, (int) minrank); + Gst.ElementFactory[] ret = (Gst.ElementFactory[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.ElementFactory)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_make(IntPtr factoryname, IntPtr name); + + public static Gst.Element Make(string factoryname, string name) { + IntPtr native_factoryname = GLib.Marshaller.StringToPtrGStrdup (factoryname); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_factory_make(native_factoryname, native_name); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_factoryname); + GLib.Marshaller.Free (native_name); + return ret; + } + + public static Gst.Element Make(string factoryname) { + return Make (factoryname, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_can_sink_all_caps(IntPtr raw, IntPtr caps); + + public bool CanSinkAllCaps(Gst.Caps caps) { + bool raw_ret = gst_element_factory_can_sink_all_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_can_sink_any_caps(IntPtr raw, IntPtr caps); + + public bool CanSinkAnyCaps(Gst.Caps caps) { + bool raw_ret = gst_element_factory_can_sink_any_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_can_src_all_caps(IntPtr raw, IntPtr caps); + + public bool CanSrcAllCaps(Gst.Caps caps) { + bool raw_ret = gst_element_factory_can_src_all_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_can_src_any_caps(IntPtr raw, IntPtr caps); + + public bool CanSrcAnyCaps(Gst.Caps caps) { + bool raw_ret = gst_element_factory_can_src_any_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_create(IntPtr raw, IntPtr name); + + public Gst.Element Create(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_element_factory_create(Handle, native_name); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_name); + return ret; + } + + public Gst.Element Create() { + return Create (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_get_element_type(IntPtr raw); + + public GLib.GType ElementType { + get { + IntPtr raw_ret = gst_element_factory_get_element_type(Handle); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_get_metadata(IntPtr raw, IntPtr key); + + public string GetMetadata(string key) { + IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); + IntPtr raw_ret = gst_element_factory_get_metadata(Handle, native_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_get_metadata_keys(IntPtr raw); + + public string[] MetadataKeys { + get { + IntPtr raw_ret = gst_element_factory_get_metadata_keys(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_element_factory_get_num_pad_templates(IntPtr raw); + + public uint NumPadTemplates { + get { + uint raw_ret = gst_element_factory_get_num_pad_templates(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_factory_get_static_pad_templates(IntPtr raw); + + public Gst.StaticPadTemplate[] StaticPadTemplates { + get { + IntPtr raw_ret = gst_element_factory_get_static_pad_templates(Handle); + Gst.StaticPadTemplate[] ret = (Gst.StaticPadTemplate[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.StaticPadTemplate)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_element_factory_get_uri_type(IntPtr raw); + + public Gst.URIType UriType { + get { + int raw_ret = gst_element_factory_get_uri_type(Handle); + Gst.URIType ret = (Gst.URIType) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_has_interface(IntPtr raw, IntPtr interfacename); + + public bool HasInterface(string interfacename) { + IntPtr native_interfacename = GLib.Marshaller.StringToPtrGStrdup (interfacename); + bool raw_ret = gst_element_factory_has_interface(Handle, native_interfacename); + bool ret = raw_ret; + GLib.Marshaller.Free (native_interfacename); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_element_factory_list_is_type(IntPtr raw, ulong type); + + public bool ListIsType(ulong type) { + bool raw_ret = gst_element_factory_list_is_type(Handle, type); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PluginFeature.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ElementFlags.cs b/sources/generated/Gst/ElementFlags.cs new file mode 100644 index 0000000000..aa37b86944 --- /dev/null +++ b/sources/generated/Gst/ElementFlags.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.ElementFlagsGType))] + public enum ElementFlags : uint { + + LockedState = 16, + Sink = 32, + Source = 64, + ProvideClock = 128, + RequireClock = 256, + Indexable = 512, + Last = 16384, + } + + internal class ElementFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_element_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_element_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ElementForeachPadFunc.cs b/sources/generated/Gst/ElementForeachPadFunc.cs new file mode 100644 index 0000000000..8913d31e3a --- /dev/null +++ b/sources/generated/Gst/ElementForeachPadFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ElementForeachPadFunc(Gst.Element element, Gst.Pad pad); + +} diff --git a/sources/generated/Gst/ElementRemovedHandler.cs b/sources/generated/Gst/ElementRemovedHandler.cs new file mode 100644 index 0000000000..958569d5b9 --- /dev/null +++ b/sources/generated/Gst/ElementRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ElementRemovedHandler(object o, ElementRemovedArgs args); + + public class ElementRemovedArgs : GLib.SignalArgs { + public Gst.Element Element{ + get { + return (Gst.Element) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/Event.cs b/sources/generated/Gst/Event.cs new file mode 100644 index 0000000000..6657cfda1e --- /dev/null +++ b/sources/generated/Gst/Event.cs @@ -0,0 +1,791 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Event : Gst.MiniObject { + + public Gst.EventType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.EventType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public ulong Timestamp { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_event_get_seqnum(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_seqnum(IntPtr raw, uint seqnum); + + public uint Seqnum { + get { + uint raw_ret = gst_event_get_seqnum(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_event_set_seqnum(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_event_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_copy_segment(IntPtr raw, IntPtr segment); + + public void CopySegment(Gst.Segment segment) { + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + gst_event_copy_segment(Handle, native_segment); + Marshal.FreeHGlobal (native_segment); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_event_get_running_time_offset(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_running_time_offset(IntPtr raw, long offset); + + public long RunningTimeOffset { + get { + long raw_ret = gst_event_get_running_time_offset(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_event_set_running_time_offset(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_get_structure(IntPtr raw); + + public Gst.Structure Structure { + get { + IntPtr raw_ret = gst_event_get_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_event_has_name(IntPtr raw, IntPtr name); + + public bool HasName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_event_has_name(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_event_has_name_id(IntPtr raw, uint name); + + public bool HasNameId(uint name) { + bool raw_ret = gst_event_has_name_id(Handle, name); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_buffer_size(IntPtr raw, out int format, out long minsize, out long maxsize, out bool async); + + public void ParseBufferSize(out Gst.Format format, out long minsize, out long maxsize, out bool async) { + int native_format; + gst_event_parse_buffer_size(Handle, out native_format, out minsize, out maxsize, out async); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_caps(IntPtr raw, out IntPtr caps); + + public Gst.Caps ParseCaps() { + Gst.Caps caps; + IntPtr native_caps; + gst_event_parse_caps(Handle, out native_caps); + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false); + return caps; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_flush_stop(IntPtr raw, out bool reset_time); + + public bool ParseFlushStop() { + bool reset_time; + gst_event_parse_flush_stop(Handle, out reset_time); + return reset_time; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_gap(IntPtr raw, out ulong timestamp, out ulong duration); + + public void ParseGap(out ulong timestamp, out ulong duration) { + gst_event_parse_gap(Handle, out timestamp, out duration); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_gap_flags(IntPtr raw, out int flags); + + public Gst.GapFlags ParseGapFlags() { + Gst.GapFlags flags; + int native_flags; + gst_event_parse_gap_flags(Handle, out native_flags); + flags = (Gst.GapFlags) native_flags; + return flags; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_event_parse_group_id(IntPtr raw, out uint group_id); + + public bool ParseGroupId(out uint group_id) { + bool raw_ret = gst_event_parse_group_id(Handle, out group_id); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_instant_rate_change(IntPtr raw, out double rate_multiplier, out int new_flags); + + public void ParseInstantRateChange(out double rate_multiplier, out Gst.SegmentFlags new_flags) { + int native_new_flags; + gst_event_parse_instant_rate_change(Handle, out rate_multiplier, out native_new_flags); + new_flags = (Gst.SegmentFlags) native_new_flags; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_instant_rate_sync_time(IntPtr raw, out double rate_multiplier, out ulong running_time, out ulong upstream_running_time); + + public void ParseInstantRateSyncTime(out double rate_multiplier, out ulong running_time, out ulong upstream_running_time) { + gst_event_parse_instant_rate_sync_time(Handle, out rate_multiplier, out running_time, out upstream_running_time); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_latency(IntPtr raw, out ulong latency); + + public ulong ParseLatency() { + ulong latency; + gst_event_parse_latency(Handle, out latency); + return latency; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_protection(IntPtr raw, out IntPtr system_id, out IntPtr data, out IntPtr origin); + + public void ParseProtection(out string system_id, out Gst.Buffer data, out string origin) { + IntPtr native_system_id; + IntPtr native_data; + IntPtr native_origin; + gst_event_parse_protection(Handle, out native_system_id, out native_data, out native_origin); + system_id = GLib.Marshaller.Utf8PtrToString (native_system_id); + data = native_data == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_data, typeof (Gst.Buffer), false); + origin = GLib.Marshaller.Utf8PtrToString (native_origin); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_qos(IntPtr raw, out int type, out double proportion, out long diff, out ulong timestamp); + + public void ParseQos(out Gst.QOSType type, out double proportion, out long diff, out ulong timestamp) { + int native_type; + gst_event_parse_qos(Handle, out native_type, out proportion, out diff, out timestamp); + type = (Gst.QOSType) native_type; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_seek(IntPtr raw, out double rate, out int format, out int flags, out int start_type, out long start, out int stop_type, out long stop); + + public void ParseSeek(out double rate, out Gst.Format format, out Gst.SeekFlags flags, out Gst.SeekType start_type, out long start, out Gst.SeekType stop_type, out long stop) { + int native_format; + int native_flags; + int native_start_type; + int native_stop_type; + gst_event_parse_seek(Handle, out rate, out native_format, out native_flags, out native_start_type, out start, out native_stop_type, out stop); + format = (Gst.Format) native_format; + flags = (Gst.SeekFlags) native_flags; + start_type = (Gst.SeekType) native_start_type; + stop_type = (Gst.SeekType) native_stop_type; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_seek_trickmode_interval(IntPtr raw, out ulong interval); + + public ulong ParseSeekTrickmodeInterval() { + ulong interval; + gst_event_parse_seek_trickmode_interval(Handle, out interval); + return interval; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_segment(IntPtr raw, IntPtr segment); + + public Gst.Segment ParseSegment() { + Gst.Segment segment; + IntPtr native_segment = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Segment))); + gst_event_parse_segment(Handle, native_segment); + segment = Gst.Segment.New (native_segment); + Marshal.FreeHGlobal (native_segment); + return segment; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_segment_done(IntPtr raw, out int format, out long position); + + public void ParseSegmentDone(out Gst.Format format, out long position) { + int native_format; + gst_event_parse_segment_done(Handle, out native_format, out position); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_select_streams(IntPtr raw, out IntPtr streams); + + public GLib.List ParseSelectStreams() { + GLib.List streams; + IntPtr native_streams; + gst_event_parse_select_streams(Handle, out native_streams); + streams = new GLib.List(native_streams); + return streams; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_sink_message(IntPtr raw, out IntPtr msg); + + public Gst.Message ParseSinkMessage() { + Gst.Message msg; + IntPtr native_msg; + gst_event_parse_sink_message(Handle, out native_msg); + msg = native_msg == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Message), true); + return msg; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_step(IntPtr raw, out int format, out ulong amount, out double rate, out bool flush, out bool intermediate); + + public void ParseStep(out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) { + int native_format; + gst_event_parse_step(Handle, out native_format, out amount, out rate, out flush, out intermediate); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_stream(IntPtr raw, out IntPtr stream); + + public Gst.Stream ParseStream() { + Gst.Stream stream; + IntPtr native_stream; + gst_event_parse_stream(Handle, out native_stream); + stream = GLib.Object.GetObject(native_stream, true) as Gst.Stream; + return stream; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_stream_collection(IntPtr raw, out IntPtr collection); + + public Gst.StreamCollection ParseStreamCollection() { + Gst.StreamCollection collection; + IntPtr native_collection; + gst_event_parse_stream_collection(Handle, out native_collection); + collection = GLib.Object.GetObject(native_collection, true) as Gst.StreamCollection; + return collection; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_stream_flags(IntPtr raw, out int flags); + + public Gst.StreamFlags ParseStreamFlags() { + Gst.StreamFlags flags; + int native_flags; + gst_event_parse_stream_flags(Handle, out native_flags); + flags = (Gst.StreamFlags) native_flags; + return flags; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_stream_group_done(IntPtr raw, out uint group_id); + + public uint ParseStreamGroupDone() { + uint group_id; + gst_event_parse_stream_group_done(Handle, out group_id); + return group_id; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_stream_start(IntPtr raw, out IntPtr stream_id); + + public string ParseStreamStart() { + string stream_id; + IntPtr native_stream_id; + gst_event_parse_stream_start(Handle, out native_stream_id); + stream_id = GLib.Marshaller.Utf8PtrToString (native_stream_id); + return stream_id; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_tag(IntPtr raw, out IntPtr taglist); + + public Gst.TagList ParseTag() { + Gst.TagList taglist; + IntPtr native_taglist; + gst_event_parse_tag(Handle, out native_taglist); + taglist = native_taglist == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (native_taglist, typeof (Gst.TagList), false); + return taglist; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_toc(IntPtr raw, IntPtr toc, out bool updated); + + public void ParseToc(out Gst.Toc toc, out bool updated) { + IntPtr native_toc = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Toc))); + gst_event_parse_toc(Handle, native_toc, out updated); + toc = Gst.Toc.New (native_toc); + Marshal.FreeHGlobal (native_toc); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_parse_toc_select(IntPtr raw, out IntPtr uid); + + public string ParseTocSelect() { + string uid; + IntPtr native_uid; + gst_event_parse_toc_select(Handle, out native_uid); + uid = GLib.Marshaller.PtrToStringGFree(native_uid); + return uid; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_gap_flags(IntPtr raw, int flags); + + public Gst.GapFlags GapFlags { + set { + gst_event_set_gap_flags(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_group_id(IntPtr raw, uint group_id); + + public uint GroupId { + set { + gst_event_set_group_id(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_seek_trickmode_interval(IntPtr raw, ulong interval); + + public ulong SeekTrickmodeInterval { + set { + gst_event_set_seek_trickmode_interval(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_stream(IntPtr raw, IntPtr stream); + + public Gst.Stream Stream { + set { + gst_event_set_stream(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_set_stream_flags(IntPtr raw, int flags); + + public Gst.StreamFlags StreamFlags { + set { + gst_event_set_stream_flags(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_writable_structure(IntPtr raw); + + public Gst.Structure WritableStructure() { + IntPtr raw_ret = gst_event_writable_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + + public Event(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_buffer_size(int format, long minsize, long maxsize, bool async); + + public static Event NewBufferSize(Gst.Format format, long minsize, long maxsize, bool async) + { + Event result = new Event (gst_event_new_buffer_size((int) format, minsize, maxsize, async)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_caps(IntPtr caps); + + public static Event NewCaps(Gst.Caps caps) + { + Event result = new Event (gst_event_new_caps(caps == null ? IntPtr.Zero : caps.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_custom(int type, IntPtr structure); + + public static Event NewCustom(Gst.EventType type, Gst.Structure structure) + { + structure.Owned = false; + Event result = new Event (gst_event_new_custom((int) type, structure == null ? IntPtr.Zero : structure.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_eos(); + + public static Event NewEos() + { + Event result = new Event (gst_event_new_eos()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_flush_start(); + + public static Event NewFlushStart() + { + Event result = new Event (gst_event_new_flush_start()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_flush_stop(bool reset_time); + + public static Event NewFlushStop(bool reset_time) + { + Event result = new Event (gst_event_new_flush_stop(reset_time)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_gap(ulong timestamp, ulong duration); + + public static Event NewGap(ulong timestamp, ulong duration) + { + Event result = new Event (gst_event_new_gap(timestamp, duration)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_instant_rate_change(double rate_multiplier, int new_flags); + + public static Event NewInstantRateChange(double rate_multiplier, Gst.SegmentFlags new_flags) + { + Event result = new Event (gst_event_new_instant_rate_change(rate_multiplier, (int) new_flags)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_instant_rate_sync_time(double rate_multiplier, ulong running_time, ulong upstream_running_time); + + public static Event NewInstantRateSyncTime(double rate_multiplier, ulong running_time, ulong upstream_running_time) + { + Event result = new Event (gst_event_new_instant_rate_sync_time(rate_multiplier, running_time, upstream_running_time)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_latency(ulong latency); + + public static Event NewLatency(ulong latency) + { + Event result = new Event (gst_event_new_latency(latency)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_navigation(IntPtr structure); + + public static Event NewNavigation(Gst.Structure structure) + { + structure.Owned = false; + Event result = new Event (gst_event_new_navigation(structure == null ? IntPtr.Zero : structure.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_protection(IntPtr system_id, IntPtr data, IntPtr origin); + + public static Event NewProtection(string system_id, Gst.Buffer data, string origin) + { + IntPtr native_system_id = GLib.Marshaller.StringToPtrGStrdup (system_id); + IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin); + Event result = new Event (gst_event_new_protection(native_system_id, data == null ? IntPtr.Zero : data.Handle, native_origin)); + GLib.Marshaller.Free (native_system_id); + GLib.Marshaller.Free (native_origin); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_qos(int type, double proportion, long diff, ulong timestamp); + + public static Event NewQos(Gst.QOSType type, double proportion, long diff, ulong timestamp) + { + Event result = new Event (gst_event_new_qos((int) type, proportion, diff, timestamp)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_reconfigure(); + + public static Event NewReconfigure() + { + Event result = new Event (gst_event_new_reconfigure()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_seek(double rate, int format, int flags, int start_type, long start, int stop_type, long stop); + + public static Event NewSeek(double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop) + { + Event result = new Event (gst_event_new_seek(rate, (int) format, (int) flags, (int) start_type, start, (int) stop_type, stop)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_segment(IntPtr segment); + + public static Event NewSegment(Gst.Segment segment) + { + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + Event result = new Event (gst_event_new_segment(native_segment)); + Marshal.FreeHGlobal (native_segment); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_segment_done(int format, long position); + + public static Event NewSegmentDone(Gst.Format format, long position) + { + Event result = new Event (gst_event_new_segment_done((int) format, position)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_select_streams(IntPtr streams); + + public static Event NewSelectStreams(GLib.List streams) + { + Event result = new Event (gst_event_new_select_streams(streams == null ? IntPtr.Zero : streams.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_sink_message(IntPtr name, IntPtr msg); + + public static Event NewSinkMessage(string name, Gst.Message msg) + { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Event result = new Event (gst_event_new_sink_message(native_name, msg == null ? IntPtr.Zero : msg.Handle)); + GLib.Marshaller.Free (native_name); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_step(int format, ulong amount, double rate, bool flush, bool intermediate); + + public static Event NewStep(Gst.Format format, ulong amount, double rate, bool flush, bool intermediate) + { + Event result = new Event (gst_event_new_step((int) format, amount, rate, flush, intermediate)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_stream_collection(IntPtr collection); + + public static Event NewStreamCollection(Gst.StreamCollection collection) + { + Event result = new Event (gst_event_new_stream_collection(collection == null ? IntPtr.Zero : collection.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_stream_group_done(uint group_id); + + public static Event NewStreamGroupDone(uint group_id) + { + Event result = new Event (gst_event_new_stream_group_done(group_id)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_stream_start(IntPtr stream_id); + + public static Event NewStreamStart(string stream_id) + { + IntPtr native_stream_id = GLib.Marshaller.StringToPtrGStrdup (stream_id); + Event result = new Event (gst_event_new_stream_start(native_stream_id)); + GLib.Marshaller.Free (native_stream_id); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_tag(IntPtr taglist); + + public static Event NewTag(Gst.TagList taglist) + { + taglist.Owned = false; + Event result = new Event (gst_event_new_tag(taglist == null ? IntPtr.Zero : taglist.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_toc(IntPtr toc, bool updated); + + public static Event NewToc(Gst.Toc toc, bool updated) + { + IntPtr native_toc = GLib.Marshaller.StructureToPtrAlloc (toc); + Event result = new Event (gst_event_new_toc(native_toc, updated)); + Marshal.FreeHGlobal (native_toc); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_new_toc_select(IntPtr uid); + + public static Event NewTocSelect(string uid) + { + IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid); + Event result = new Event (gst_event_new_toc_select(native_uid)); + GLib.Marshaller.Free (native_uid); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_event_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_event_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_event_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_event_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.EventType))) // type + , null + , "timestamp" + , (long) Marshal.OffsetOf(typeof(GstEvent_typeAlign), "type") + , 0 + ), + new GLib.AbiField("timestamp" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // timestamp + , "type" + , "seqnum" + , (long) Marshal.OffsetOf(typeof(GstEvent_timestampAlign), "timestamp") + , 0 + ), + new GLib.AbiField("seqnum" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // seqnum + , "timestamp" + , null + , (long) Marshal.OffsetOf(typeof(GstEvent_seqnumAlign), "seqnum") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstEvent_typeAlign + { + sbyte f1; + private Gst.EventType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstEvent_timestampAlign + { + sbyte f1; + private ulong timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstEvent_seqnumAlign + { + sbyte f1; + private uint seqnum; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/EventType.cs b/sources/generated/Gst/EventType.cs new file mode 100644 index 0000000000..60b85351e3 --- /dev/null +++ b/sources/generated/Gst/EventType.cs @@ -0,0 +1,58 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.EventTypeGType))] + public enum EventType { + + Unknown = 0, + FlushStart = 2563, + FlushStop = 5127, + StreamStart = 10254, + Caps = 12814, + Segment = 17934, + StreamCollection = 19230, + Tag = 20510, + Buffersize = 23054, + SinkMessage = 25630, + StreamGroupDone = 26894, + Eos = 28174, + Toc = 30750, + Protection = 33310, + SegmentDone = 38406, + Gap = 40966, + InstantRateChange = 46090, + Qos = 48641, + Seek = 51201, + Navigation = 53761, + Latency = 56321, + Step = 58881, + Reconfigure = 61441, + TocSelect = 64001, + SelectStreams = 66561, + InstantRateSyncTime = 66817, + CustomUpstream = 69121, + CustomDownstream = 71686, + CustomDownstreamOob = 74242, + CustomDownstreamSticky = 76830, + CustomBoth = 79367, + CustomBothOob = 81923, + } + + internal class EventTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_event_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/EventTypeFlags.cs b/sources/generated/Gst/EventTypeFlags.cs new file mode 100644 index 0000000000..5e19c12ed0 --- /dev/null +++ b/sources/generated/Gst/EventTypeFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.EventTypeFlagsGType))] + public enum EventTypeFlags : uint { + + Upstream = 1, + Downstream = 2, + Serialized = 4, + Sticky = 8, + StickyMulti = 16, + } + + internal class EventTypeFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_type_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_event_type_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/FeatureAddedHandler.cs b/sources/generated/Gst/FeatureAddedHandler.cs new file mode 100644 index 0000000000..eec9d8c43c --- /dev/null +++ b/sources/generated/Gst/FeatureAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void FeatureAddedHandler(object o, FeatureAddedArgs args); + + public class FeatureAddedArgs : GLib.SignalArgs { + public Gst.PluginFeature Feature{ + get { + return (Gst.PluginFeature) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/FlagSet.cs b/sources/generated/Gst/FlagSet.cs new file mode 100644 index 0000000000..dd8704817f --- /dev/null +++ b/sources/generated/Gst/FlagSet.cs @@ -0,0 +1,54 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class FlagSet : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flagset_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_flagset_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flagset_register(IntPtr flags_type); + + public static GLib.GType Register(GLib.GType flags_type) { + IntPtr raw_ret = gst_flagset_register(flags_type.Val); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + public FlagSet(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/FlowReturn.cs b/sources/generated/Gst/FlowReturn.cs new file mode 100644 index 0000000000..e929fe99e9 --- /dev/null +++ b/sources/generated/Gst/FlowReturn.cs @@ -0,0 +1,39 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.FlowReturnGType))] + public enum FlowReturn { + + CustomError2 = -102, + CustomError1 = -101, + CustomError = -100, + NotSupported = -6, + Error = -5, + NotNegotiated = -4, + Eos = -3, + Flushing = -2, + NotLinked = -1, + Ok = 0, + CustomSuccess = 100, + CustomSuccess1 = 101, + CustomSuccess2 = 102, + } + + internal class FlowReturnGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flow_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_flow_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Format.cs b/sources/generated/Gst/Format.cs new file mode 100644 index 0000000000..b369178373 --- /dev/null +++ b/sources/generated/Gst/Format.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.FormatGType))] + public enum Format { + + Undefined = 0, + Default = 1, + Bytes = 2, + Time = 3, + Buffers = 4, + Percent = 5, + } + + internal class FormatGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_format_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_format_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/FormatDefinition.cs b/sources/generated/Gst/FormatDefinition.cs new file mode 100644 index 0000000000..41c776292a --- /dev/null +++ b/sources/generated/Gst/FormatDefinition.cs @@ -0,0 +1,48 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct FormatDefinition : IEquatable { + + public Gst.Format Value; + public string Nick; + public string Description; + public uint Quark; + + public static Gst.FormatDefinition Zero = new Gst.FormatDefinition (); + + public static Gst.FormatDefinition New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.FormatDefinition.Zero; + return (Gst.FormatDefinition) Marshal.PtrToStructure (raw, typeof (Gst.FormatDefinition)); + } + + public bool Equals (FormatDefinition other) + { + return true && Value.Equals (other.Value) && Nick.Equals (other.Nick) && Description.Equals (other.Description) && Quark.Equals (other.Quark); + } + + public override bool Equals (object other) + { + return other is FormatDefinition && Equals ((FormatDefinition) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Value.GetHashCode () ^ Nick.GetHashCode () ^ Description.GetHashCode () ^ Quark.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/GapFlags.cs b/sources/generated/Gst/GapFlags.cs new file mode 100644 index 0000000000..4c4194a27a --- /dev/null +++ b/sources/generated/Gst/GapFlags.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.GapFlagsGType))] + public enum GapFlags : uint { + + Data = 1, + } + + internal class GapFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_gap_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_gap_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/GhostPad.cs b/sources/generated/Gst/GhostPad.cs new file mode 100644 index 0000000000..ac73794c38 --- /dev/null +++ b/sources/generated/Gst/GhostPad.cs @@ -0,0 +1,209 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class GhostPad : Gst.ProxyPad { + + public GhostPad (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_new(IntPtr name, IntPtr target); + + public GhostPad (string name, Gst.Pad target) : base (IntPtr.Zero) + { + if (GetType () != typeof (GhostPad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_ghost_pad_new(native_name, target == null ? IntPtr.Zero : target.Handle); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_new_from_template(IntPtr name, IntPtr target, IntPtr templ); + + public GhostPad (string name, Gst.Pad target, Gst.PadTemplate templ) : base (IntPtr.Zero) + { + if (GetType () != typeof (GhostPad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_ghost_pad_new_from_template(native_name, target == null ? IntPtr.Zero : target.Handle, templ == null ? IntPtr.Zero : templ.Handle); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_new_no_target(IntPtr name, int dir); + + public GhostPad (string name, Gst.PadDirection dir) : base (IntPtr.Zero) + { + if (GetType () != typeof (GhostPad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_ghost_pad_new_no_target(native_name, (int) dir); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_new_no_target_from_template(IntPtr name, IntPtr templ); + + public GhostPad (string name, Gst.PadTemplate templ) : base (IntPtr.Zero) + { + if (GetType () != typeof (GhostPad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_ghost_pad_new_no_target_from_template(native_name, templ == null ? IntPtr.Zero : templ.Handle); + GLib.Marshaller.Free (native_name); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.ProxyPad.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_ghost_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ghost_pad_activate_mode_default(IntPtr pad, IntPtr parent, int mode, bool active); + + public static bool ActivateModeDefault(Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active) { + bool raw_ret = gst_ghost_pad_activate_mode_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, (int) mode, active); + bool ret = raw_ret; + return ret; + } + + public static bool ActivateModeDefault(Gst.Pad pad, Gst.PadMode mode, bool active) { + return ActivateModeDefault (pad, null, mode, active); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ghost_pad_internal_activate_mode_default(IntPtr pad, IntPtr parent, int mode, bool active); + + public static bool InternalActivateModeDefault(Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active) { + bool raw_ret = gst_ghost_pad_internal_activate_mode_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, (int) mode, active); + bool ret = raw_ret; + return ret; + } + + public static bool InternalActivateModeDefault(Gst.Pad pad, Gst.PadMode mode, bool active) { + return InternalActivateModeDefault (pad, null, mode, active); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ghost_pad_construct(IntPtr raw); + + [Obsolete] + public bool Construct() { + bool raw_ret = gst_ghost_pad_construct(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_ghost_pad_get_target(IntPtr raw); + + public Gst.Pad Target { + get { + IntPtr raw_ret = gst_ghost_pad_get_target(Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_ghost_pad_set_target(IntPtr raw, IntPtr newtarget); + + public bool SetTarget(Gst.Pad newtarget) { + bool raw_ret = gst_ghost_pad_set_target(Handle, newtarget == null ? IntPtr.Zero : newtarget.Handle); + bool ret = raw_ret; + return ret; + } + + public bool SetTarget() { + return SetTarget (null); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.ProxyPad.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Global.cs b/sources/generated/Gst/Global.cs new file mode 100644 index 0000000000..0d0442323f --- /dev/null +++ b/sources/generated/Gst/Global.cs @@ -0,0 +1,551 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Global { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_buffer_get_max_memory(); + + public static uint BufferGetMaxMemory() { + uint raw_ret = gst_buffer_get_max_memory(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_features_from_string(IntPtr features); + + public static Gst.CapsFeatures CapsFeaturesFromString(string features) { + IntPtr native_features = GLib.Marshaller.StringToPtrGStrdup (features); + IntPtr raw_ret = gst_caps_features_from_string(native_features); + Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret); + GLib.Marshaller.Free (native_features); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_caps_from_string(IntPtr str1ng); + + public static Gst.Caps CapsFromString(string str1ng) { + IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); + IntPtr raw_ret = gst_caps_from_string(native_str1ng); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + GLib.Marshaller.Free (native_str1ng); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_core_error_quark(); + + public static uint CoreErrorQuark() { + uint raw_ret = gst_core_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_deinit(); + + public static void Deinit() { + gst_deinit(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_dynamic_type_register(IntPtr plugin, IntPtr type); + + public static bool DynamicTypeRegister(Gst.Plugin plugin, GLib.GType type) { + bool raw_ret = gst_dynamic_type_register(plugin == null ? IntPtr.Zero : plugin.Handle, type.Val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_error_get_message(uint domain, int code); + + public static string ErrorGetMessage(uint domain, int code) { + IntPtr raw_ret = gst_error_get_message(domain, code); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_event_type_get_flags(int type); + + public static Gst.EventTypeFlags EventTypeGetFlags(Gst.EventType type) { + int raw_ret = gst_event_type_get_flags((int) type); + Gst.EventTypeFlags ret = (Gst.EventTypeFlags) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_event_type_get_name(int type); + + public static string EventTypeGetName(Gst.EventType type) { + IntPtr raw_ret = gst_event_type_get_name((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_event_type_to_quark(int type); + + public static uint EventTypeToQuark(Gst.EventType type) { + uint raw_ret = gst_event_type_to_quark((int) type); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_flow_get_name(int _ret); + + public static string FlowGetName(Gst.FlowReturn _ret) { + IntPtr raw_ret = gst_flow_get_name((int) _ret); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_flow_to_quark(int _ret); + + public static uint FlowToQuark(Gst.FlowReturn _ret) { + uint raw_ret = gst_flow_to_quark((int) _ret); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_get_main_executable_path(); + + public static string MainExecutablePath { + get { + IntPtr raw_ret = gst_get_main_executable_path(); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_is_caps_features(IntPtr obj); + + public static bool IsCapsFeatures(IntPtr obj) { + bool raw_ret = gst_is_caps_features(obj); + bool ret = raw_ret; + return ret; + } + + public static bool IsCapsFeatures() { + return IsCapsFeatures (IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_is_initialized(); + + public static bool IsInitialized { + get { + bool raw_ret = gst_is_initialized(); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_library_error_quark(); + + public static uint LibraryErrorQuark() { + uint raw_ret = gst_library_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_type_get_name(int type); + + public static string MessageTypeGetName(Gst.MessageType type) { + IntPtr raw_ret = gst_message_type_get_name((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_message_type_to_quark(int type); + + public static uint MessageTypeToQuark(Gst.MessageType type) { + uint raw_ret = gst_message_type_to_quark((int) type); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_meta_api_type_has_tag(IntPtr api, uint tag); + + public static bool MetaApiTypeHasTag(GLib.GType api, uint tag) { + bool raw_ret = gst_meta_api_type_has_tag(api.Val, tag); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_api_type_register(IntPtr api, IntPtr[] tags); + + public static GLib.GType MetaApiTypeRegister(string api, string[] tags) { + IntPtr native_api = GLib.Marshaller.StringToPtrGStrdup (api); + int cnt_tags = tags == null ? 0 : tags.Length; + IntPtr[] native_tags = new IntPtr [cnt_tags + 1]; + for (int i = 0; i < cnt_tags; i++) + native_tags [i] = GLib.Marshaller.StringToPtrGStrdup(tags[i]); + native_tags [cnt_tags] = IntPtr.Zero; + IntPtr raw_ret = gst_meta_api_type_register(native_api, native_tags); + GLib.GType ret = new GLib.GType(raw_ret); + GLib.Marshaller.Free (native_api); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_get_info(IntPtr impl); + + public static Gst.MetaInfo MetaGetInfo(string impl) { + IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl); + IntPtr raw_ret = gst_meta_get_info(native_impl); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_impl); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_register(IntPtr api, IntPtr impl, UIntPtr size, GstSharp.MetaInitFunctionNative init_func, GstSharp.MetaFreeFunctionNative free_func, GstSharp.MetaTransformFunctionNative transform_func); + + public static Gst.MetaInfo MetaRegister(GLib.GType api, string impl, ulong size, Gst.MetaInitFunction init_func, Gst.MetaFreeFunction free_func, Gst.MetaTransformFunction transform_func) { + IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl); + GstSharp.MetaInitFunctionWrapper init_func_wrapper = new GstSharp.MetaInitFunctionWrapper (init_func); + init_func_wrapper.PersistUntilCalled (); + GstSharp.MetaFreeFunctionWrapper free_func_wrapper = new GstSharp.MetaFreeFunctionWrapper (free_func); + free_func_wrapper.PersistUntilCalled (); + GstSharp.MetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.MetaTransformFunctionWrapper (transform_func); + transform_func_wrapper.PersistUntilCalled (); + IntPtr raw_ret = gst_meta_register(api.Val, native_impl, new UIntPtr (size), init_func_wrapper.NativeDelegate, free_func_wrapper.NativeDelegate, transform_func_wrapper.NativeDelegate); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_impl); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_register_custom(IntPtr name, IntPtr[] tags, GstSharp.CustomMetaTransformFunctionNative transform_func, IntPtr user_data, GLib.DestroyNotify destroy_data); + + public static Gst.MetaInfo MetaRegisterCustom(string name, string[] tags, Gst.CustomMetaTransformFunction transform_func) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + int cnt_tags = tags == null ? 0 : tags.Length; + IntPtr[] native_tags = new IntPtr [cnt_tags + 1]; + for (int i = 0; i < cnt_tags; i++) + native_tags [i] = GLib.Marshaller.StringToPtrGStrdup(tags[i]); + native_tags [cnt_tags] = IntPtr.Zero; + GstSharp.CustomMetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.CustomMetaTransformFunctionWrapper (transform_func); + IntPtr user_data; + GLib.DestroyNotify destroy_data; + if (transform_func == null) { + user_data = IntPtr.Zero; + destroy_data = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (transform_func_wrapper); + destroy_data = GLib.DestroyHelper.NotifyHandler; + } + IntPtr raw_ret = gst_meta_register_custom(native_name, native_tags, transform_func_wrapper.NativeDelegate, user_data, destroy_data); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + public static Gst.MetaInfo MetaRegisterCustom(string name, string[] tags) { + return MetaRegisterCustom (name, tags, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parent_buffer_meta_api_get_type(); + + public static GLib.GType ParentBufferMetaApiGetType() { + IntPtr raw_ret = gst_parent_buffer_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parent_buffer_meta_get_info(); + + public static Gst.MetaInfo ParentBufferMetaGetInfo() { + IntPtr raw_ret = gst_parent_buffer_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_plugin_error_quark(); + + public static uint PluginErrorQuark() { + uint raw_ret = gst_plugin_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_app_dir(); + + public static string PresetGetAppDir() { + IntPtr raw_ret = gst_preset_get_app_dir(); + string ret = GLib.Marshaller.FilenamePtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_set_app_dir(IntPtr app_dir); + + public static bool PresetSetAppDir(string app_dir) { + IntPtr native_app_dir = GLib.Marshaller.StringToFilenamePtr (app_dir); + bool raw_ret = gst_preset_set_app_dir(native_app_dir); + bool ret = raw_ret; + GLib.Marshaller.Free (native_app_dir); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_protection_filter_systems_by_available_decryptors(IntPtr[] system_identifiers); + + public static string[] ProtectionFilterSystemsByAvailableDecryptors(string[] system_identifiers) { + int cnt_system_identifiers = system_identifiers == null ? 0 : system_identifiers.Length; + IntPtr[] native_system_identifiers = new IntPtr [cnt_system_identifiers + 1]; + for (int i = 0; i < cnt_system_identifiers; i++) + native_system_identifiers [i] = GLib.Marshaller.StringToPtrGStrdup(system_identifiers[i]); + native_system_identifiers [cnt_system_identifiers] = IntPtr.Zero; + IntPtr raw_ret = gst_protection_filter_systems_by_available_decryptors(native_system_identifiers); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_protection_meta_api_get_type(); + + public static GLib.GType ProtectionMetaApiGetType() { + IntPtr raw_ret = gst_protection_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_protection_meta_get_info(); + + public static Gst.MetaInfo ProtectionMetaGetInfo() { + IntPtr raw_ret = gst_protection_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_protection_select_system(IntPtr[] system_identifiers); + + public static string ProtectionSelectSystem(string[] system_identifiers) { + int cnt_system_identifiers = system_identifiers == null ? 0 : system_identifiers.Length; + IntPtr[] native_system_identifiers = new IntPtr [cnt_system_identifiers + 1]; + for (int i = 0; i < cnt_system_identifiers; i++) + native_system_identifiers [i] = GLib.Marshaller.StringToPtrGStrdup(system_identifiers[i]); + native_system_identifiers [cnt_system_identifiers] = IntPtr.Zero; + IntPtr raw_ret = gst_protection_select_system(native_system_identifiers); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_query_type_get_flags(int type); + + public static Gst.QueryTypeFlags QueryTypeGetFlags(Gst.QueryType type) { + int raw_ret = gst_query_type_get_flags((int) type); + Gst.QueryTypeFlags ret = (Gst.QueryTypeFlags) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_type_get_name(int type); + + public static string QueryTypeGetName(Gst.QueryType type) { + IntPtr raw_ret = gst_query_type_get_name((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_type_to_quark(int type); + + public static uint QueryTypeToQuark(Gst.QueryType type) { + uint raw_ret = gst_query_type_to_quark((int) type); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_reference_timestamp_meta_api_get_type(); + + public static GLib.GType ReferenceTimestampMetaApiGetType() { + IntPtr raw_ret = gst_reference_timestamp_meta_api_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_reference_timestamp_meta_get_info(); + + public static Gst.MetaInfo ReferenceTimestampMetaGetInfo() { + IntPtr raw_ret = gst_reference_timestamp_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_resource_error_quark(); + + public static uint ResourceErrorQuark() { + uint raw_ret = gst_resource_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segtrap_is_enabled(); + + public static bool SegtrapIsEnabled() { + bool raw_ret = gst_segtrap_is_enabled(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_segtrap_set_enabled(bool enabled); + + public static void SegtrapSetEnabled(bool enabled) { + gst_segtrap_set_enabled(enabled); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_state_change_get_name(int transition); + + public static string StateChangeGetName(Gst.StateChange transition) { + IntPtr raw_ret = gst_state_change_get_name((int) transition); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_static_caps_get_type(); + + public static GLib.GType StaticCapsGetType() { + IntPtr raw_ret = gst_static_caps_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_static_pad_template_get_type(); + + public static GLib.GType StaticPadTemplateGetType() { + IntPtr raw_ret = gst_static_pad_template_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_stream_error_quark(); + + public static uint StreamErrorQuark() { + uint raw_ret = gst_stream_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_type_get_name(int stype); + + public static string StreamTypeGetName(Gst.StreamType stype) { + IntPtr raw_ret = gst_stream_type_get_name((int) stype); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_type_get_nick(int type); + + public static string TocEntryTypeGetNick(Gst.TocEntryType type) { + IntPtr raw_ret = gst_toc_entry_type_get_nick((int) type); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracing_get_active_tracers(); + + public static Gst.Tracer[] TracingGetActiveTracers() { + IntPtr raw_ret = gst_tracing_get_active_tracers(); + Gst.Tracer[] ret = (Gst.Tracer[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Tracer)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_get_type(); + + public static GLib.GType TypeFindGetType() { + IntPtr raw_ret = gst_type_find_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_type_find_register(IntPtr plugin, IntPtr name, uint rank, GstSharp.TypeFindFunctionNative func, IntPtr extensions, IntPtr possible_caps, IntPtr data, GLib.DestroyNotify data_notify); + + public static bool TypeFindRegister(Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string extensions, Gst.Caps possible_caps) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + GstSharp.TypeFindFunctionWrapper func_wrapper = new GstSharp.TypeFindFunctionWrapper (func); + IntPtr data; + GLib.DestroyNotify data_notify; + if (func == null) { + data = IntPtr.Zero; + data_notify = null; + } else { + data = (IntPtr) GCHandle.Alloc (func_wrapper); + data_notify = GLib.DestroyHelper.NotifyHandler; + } + IntPtr native_extensions = GLib.Marshaller.StringToPtrGStrdup (extensions); + bool raw_ret = gst_type_find_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, func_wrapper.NativeDelegate, native_extensions, possible_caps == null ? IntPtr.Zero : possible_caps.Handle, IntPtr.Zero, data_notify); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_extensions); + return ret; + } + + public static bool TypeFindRegister(string name, uint rank, Gst.TypeFindFunction func) { + return TypeFindRegister (null, name, rank, func, null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_type_is_plugin_api(IntPtr type, out int flags); + + public static bool TypeIsPluginApi(GLib.GType type, out Gst.PluginAPIFlags flags) { + int native_flags; + bool raw_ret = gst_type_is_plugin_api(type.Val, out native_flags); + bool ret = raw_ret; + flags = (Gst.PluginAPIFlags) native_flags; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_type_mark_as_plugin_api(IntPtr type, int flags); + + public static void TypeMarkAsPluginApi(GLib.GType type, Gst.PluginAPIFlags flags) { + gst_type_mark_as_plugin_api(type.Val, (int) flags); + } + +#endregion + } +} diff --git a/sources/generated/Gst/GstSharp.BufferForeachMetaFuncNative.cs b/sources/generated/Gst/GstSharp.BufferForeachMetaFuncNative.cs new file mode 100644 index 0000000000..44cb57c54d --- /dev/null +++ b/sources/generated/Gst/GstSharp.BufferForeachMetaFuncNative.cs @@ -0,0 +1,103 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool BufferForeachMetaFuncNative(IntPtr buffer, IntPtr meta, IntPtr user_data); + + internal class BufferForeachMetaFuncInvoker { + + BufferForeachMetaFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~BufferForeachMetaFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal BufferForeachMetaFuncInvoker (BufferForeachMetaFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal BufferForeachMetaFuncInvoker (BufferForeachMetaFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal BufferForeachMetaFuncInvoker (BufferForeachMetaFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.BufferForeachMetaFunc Handler { + get { + return new Gst.BufferForeachMetaFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.Buffer buffer, out Gst.Meta meta) + { + IntPtr native_meta = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Meta))); + bool __result = native_cb (buffer == null ? IntPtr.Zero : buffer.Handle, native_meta, __data); + meta = Gst.Meta.New (native_meta); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class BufferForeachMetaFuncWrapper { + + public bool NativeCallback (IntPtr buffer, IntPtr meta, IntPtr user_data) + { + try { + Gst.Meta mymeta; + + bool __ret = managed (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), out mymeta); + if (meta != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (mymeta, meta, false); + + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal BufferForeachMetaFuncNative NativeDelegate; + Gst.BufferForeachMetaFunc managed; + + public BufferForeachMetaFuncWrapper (Gst.BufferForeachMetaFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new BufferForeachMetaFuncNative (NativeCallback); + } + + public static Gst.BufferForeachMetaFunc GetManagedDelegate (BufferForeachMetaFuncNative native) + { + if (native == null) + return null; + BufferForeachMetaFuncWrapper wrapper = (BufferForeachMetaFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.BufferListFuncNative.cs b/sources/generated/Gst/GstSharp.BufferListFuncNative.cs new file mode 100644 index 0000000000..388a6e2473 --- /dev/null +++ b/sources/generated/Gst/GstSharp.BufferListFuncNative.cs @@ -0,0 +1,102 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool BufferListFuncNative(out IntPtr buffer, uint idx, IntPtr user_data); + + internal class BufferListFuncInvoker { + + BufferListFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~BufferListFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal BufferListFuncInvoker (BufferListFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal BufferListFuncInvoker (BufferListFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal BufferListFuncInvoker (BufferListFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.BufferListFunc Handler { + get { + return new Gst.BufferListFunc(InvokeNative); + } + } + + bool InvokeNative (out Gst.Buffer buffer, uint idx) + { + IntPtr native_buffer; + bool __result = native_cb (out native_buffer, idx, __data); + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return __result; + } + } + + internal class BufferListFuncWrapper { + + public bool NativeCallback (out IntPtr buffer, uint idx, IntPtr user_data) + { + try { + Gst.Buffer mybuffer; + + bool __ret = managed (out mybuffer, idx); + buffer = mybuffer == null ? IntPtr.Zero : mybuffer.Handle; + + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal BufferListFuncNative NativeDelegate; + Gst.BufferListFunc managed; + + public BufferListFuncWrapper (Gst.BufferListFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new BufferListFuncNative (NativeCallback); + } + + public static Gst.BufferListFunc GetManagedDelegate (BufferListFuncNative native) + { + if (native == null) + return null; + BufferListFuncWrapper wrapper = (BufferListFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.BusFuncNative.cs b/sources/generated/Gst/GstSharp.BusFuncNative.cs new file mode 100644 index 0000000000..97ac1c2f2f --- /dev/null +++ b/sources/generated/Gst/GstSharp.BusFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool BusFuncNative(IntPtr bus, IntPtr message, IntPtr user_data); + + internal class BusFuncInvoker { + + BusFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~BusFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal BusFuncInvoker (BusFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal BusFuncInvoker (BusFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal BusFuncInvoker (BusFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.BusFunc Handler { + get { + return new Gst.BusFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.Bus bus, Gst.Message message) + { + bool __result = native_cb (bus == null ? IntPtr.Zero : bus.Handle, message == null ? IntPtr.Zero : message.Handle, __data); + return __result; + } + } + + internal class BusFuncWrapper { + + public bool NativeCallback (IntPtr bus, IntPtr message, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(bus) as Gst.Bus, message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal BusFuncNative NativeDelegate; + Gst.BusFunc managed; + + public BusFuncWrapper (Gst.BusFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new BusFuncNative (NativeCallback); + } + + public static Gst.BusFunc GetManagedDelegate (BusFuncNative native) + { + if (native == null) + return null; + BusFuncWrapper wrapper = (BusFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.BusSyncHandlerNative.cs b/sources/generated/Gst/GstSharp.BusSyncHandlerNative.cs new file mode 100644 index 0000000000..81d899d1bd --- /dev/null +++ b/sources/generated/Gst/GstSharp.BusSyncHandlerNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int BusSyncHandlerNative(IntPtr bus, IntPtr message, IntPtr user_data); + + internal class BusSyncHandlerInvoker { + + BusSyncHandlerNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~BusSyncHandlerInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal BusSyncHandlerInvoker (BusSyncHandlerNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal BusSyncHandlerInvoker (BusSyncHandlerNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal BusSyncHandlerInvoker (BusSyncHandlerNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.BusSyncHandler Handler { + get { + return new Gst.BusSyncHandler(InvokeNative); + } + } + + Gst.BusSyncReply InvokeNative (Gst.Bus bus, Gst.Message message) + { + Gst.BusSyncReply __result = (Gst.BusSyncReply) native_cb (bus == null ? IntPtr.Zero : bus.Handle, message == null ? IntPtr.Zero : message.Handle, __data); + return __result; + } + } + + internal class BusSyncHandlerWrapper { + + public int NativeCallback (IntPtr bus, IntPtr message, IntPtr user_data) + { + try { + Gst.BusSyncReply __ret = managed (GLib.Object.GetObject(bus) as Gst.Bus, message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal BusSyncHandlerNative NativeDelegate; + Gst.BusSyncHandler managed; + + public BusSyncHandlerWrapper (Gst.BusSyncHandler managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new BusSyncHandlerNative (NativeCallback); + } + + public static Gst.BusSyncHandler GetManagedDelegate (BusSyncHandlerNative native) + { + if (native == null) + return null; + BusSyncHandlerWrapper wrapper = (BusSyncHandlerWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.CapsFilterMapFuncNative.cs b/sources/generated/Gst/GstSharp.CapsFilterMapFuncNative.cs new file mode 100644 index 0000000000..ebe0ebb81b --- /dev/null +++ b/sources/generated/Gst/GstSharp.CapsFilterMapFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CapsFilterMapFuncNative(IntPtr features, IntPtr structure, IntPtr user_data); + + internal class CapsFilterMapFuncInvoker { + + CapsFilterMapFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CapsFilterMapFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CapsFilterMapFuncInvoker (CapsFilterMapFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CapsFilterMapFuncInvoker (CapsFilterMapFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CapsFilterMapFuncInvoker (CapsFilterMapFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.CapsFilterMapFunc Handler { + get { + return new Gst.CapsFilterMapFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.CapsFeatures features, Gst.Structure structure) + { + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + bool __result = native_cb (native_features, structure == null ? IntPtr.Zero : structure.Handle, __data); + Marshal.FreeHGlobal (native_features); + return __result; + } + } + + internal class CapsFilterMapFuncWrapper { + + public bool NativeCallback (IntPtr features, IntPtr structure, IntPtr user_data) + { + try { + bool __ret = managed (Gst.CapsFeatures.New (features), structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CapsFilterMapFuncNative NativeDelegate; + Gst.CapsFilterMapFunc managed; + + public CapsFilterMapFuncWrapper (Gst.CapsFilterMapFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CapsFilterMapFuncNative (NativeCallback); + } + + public static Gst.CapsFilterMapFunc GetManagedDelegate (CapsFilterMapFuncNative native) + { + if (native == null) + return null; + CapsFilterMapFuncWrapper wrapper = (CapsFilterMapFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.CapsForeachFuncNative.cs b/sources/generated/Gst/GstSharp.CapsForeachFuncNative.cs new file mode 100644 index 0000000000..284767f1f9 --- /dev/null +++ b/sources/generated/Gst/GstSharp.CapsForeachFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CapsForeachFuncNative(IntPtr features, IntPtr structure, IntPtr user_data); + + internal class CapsForeachFuncInvoker { + + CapsForeachFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CapsForeachFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CapsForeachFuncInvoker (CapsForeachFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CapsForeachFuncInvoker (CapsForeachFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CapsForeachFuncInvoker (CapsForeachFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.CapsForeachFunc Handler { + get { + return new Gst.CapsForeachFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.CapsFeatures features, Gst.Structure structure) + { + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + bool __result = native_cb (native_features, structure == null ? IntPtr.Zero : structure.Handle, __data); + Marshal.FreeHGlobal (native_features); + return __result; + } + } + + internal class CapsForeachFuncWrapper { + + public bool NativeCallback (IntPtr features, IntPtr structure, IntPtr user_data) + { + try { + bool __ret = managed (Gst.CapsFeatures.New (features), structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CapsForeachFuncNative NativeDelegate; + Gst.CapsForeachFunc managed; + + public CapsForeachFuncWrapper (Gst.CapsForeachFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CapsForeachFuncNative (NativeCallback); + } + + public static Gst.CapsForeachFunc GetManagedDelegate (CapsForeachFuncNative native) + { + if (native == null) + return null; + CapsForeachFuncWrapper wrapper = (CapsForeachFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.CapsMapFuncNative.cs b/sources/generated/Gst/GstSharp.CapsMapFuncNative.cs new file mode 100644 index 0000000000..6826a36a53 --- /dev/null +++ b/sources/generated/Gst/GstSharp.CapsMapFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CapsMapFuncNative(IntPtr features, IntPtr structure, IntPtr user_data); + + internal class CapsMapFuncInvoker { + + CapsMapFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CapsMapFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CapsMapFuncInvoker (CapsMapFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CapsMapFuncInvoker (CapsMapFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CapsMapFuncInvoker (CapsMapFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.CapsMapFunc Handler { + get { + return new Gst.CapsMapFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.CapsFeatures features, Gst.Structure structure) + { + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + bool __result = native_cb (native_features, structure == null ? IntPtr.Zero : structure.Handle, __data); + Marshal.FreeHGlobal (native_features); + return __result; + } + } + + internal class CapsMapFuncWrapper { + + public bool NativeCallback (IntPtr features, IntPtr structure, IntPtr user_data) + { + try { + bool __ret = managed (Gst.CapsFeatures.New (features), structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (structure, typeof (Gst.Structure), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CapsMapFuncNative NativeDelegate; + Gst.CapsMapFunc managed; + + public CapsMapFuncWrapper (Gst.CapsMapFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CapsMapFuncNative (NativeCallback); + } + + public static Gst.CapsMapFunc GetManagedDelegate (CapsMapFuncNative native) + { + if (native == null) + return null; + CapsMapFuncWrapper wrapper = (CapsMapFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ClockCallbackNative.cs b/sources/generated/Gst/GstSharp.ClockCallbackNative.cs new file mode 100644 index 0000000000..3baac465c8 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ClockCallbackNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ClockCallbackNative(IntPtr clock, ulong time, IntPtr id, IntPtr user_data); + + internal class ClockCallbackInvoker { + + ClockCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ClockCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ClockCallbackInvoker (ClockCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ClockCallbackInvoker (ClockCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ClockCallbackInvoker (ClockCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ClockCallback Handler { + get { + return new Gst.ClockCallback(InvokeNative); + } + } + + bool InvokeNative (Gst.Clock clock, ulong time, IntPtr id) + { + bool __result = native_cb (clock == null ? IntPtr.Zero : clock.Handle, time, id, __data); + return __result; + } + } + + internal class ClockCallbackWrapper { + + public bool NativeCallback (IntPtr clock, ulong time, IntPtr id, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(clock) as Gst.Clock, time, id); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ClockCallbackNative NativeDelegate; + Gst.ClockCallback managed; + + public ClockCallbackWrapper (Gst.ClockCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ClockCallbackNative (NativeCallback); + } + + public static Gst.ClockCallback GetManagedDelegate (ClockCallbackNative native) + { + if (native == null) + return null; + ClockCallbackWrapper wrapper = (ClockCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ControlBindingConvertNative.cs b/sources/generated/Gst/GstSharp.ControlBindingConvertNative.cs new file mode 100644 index 0000000000..d219c535c7 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ControlBindingConvertNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void ControlBindingConvertNative(IntPtr binding, double src_value, IntPtr dest_value); + + internal class ControlBindingConvertInvoker { + + ControlBindingConvertNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ControlBindingConvertInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ControlBindingConvert Handler { + get { + return new Gst.ControlBindingConvert(InvokeNative); + } + } + + void InvokeNative (Gst.ControlBinding binding, double src_value, GLib.Value dest_value) + { + IntPtr native_dest_value = GLib.Marshaller.StructureToPtrAlloc (dest_value); + native_cb (binding == null ? IntPtr.Zero : binding.Handle, src_value, native_dest_value); + Marshal.FreeHGlobal (native_dest_value); + } + } + + internal class ControlBindingConvertWrapper { + + public void NativeCallback (IntPtr binding, double src_value, IntPtr dest_value) + { + try { + managed (GLib.Object.GetObject(binding) as Gst.ControlBinding, src_value, (GLib.Value) Marshal.PtrToStructure (dest_value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ControlBindingConvertNative NativeDelegate; + Gst.ControlBindingConvert managed; + + public ControlBindingConvertWrapper (Gst.ControlBindingConvert managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ControlBindingConvertNative (NativeCallback); + } + + public static Gst.ControlBindingConvert GetManagedDelegate (ControlBindingConvertNative native) + { + if (native == null) + return null; + ControlBindingConvertWrapper wrapper = (ControlBindingConvertWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ControlSourceGetValueArrayNative.cs b/sources/generated/Gst/GstSharp.ControlSourceGetValueArrayNative.cs new file mode 100644 index 0000000000..642122f84e --- /dev/null +++ b/sources/generated/Gst/GstSharp.ControlSourceGetValueArrayNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ControlSourceGetValueArrayNative(IntPtr self, ulong timestamp, ulong interval, uint n_values, double values); + + internal class ControlSourceGetValueArrayInvoker { + + ControlSourceGetValueArrayNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ControlSourceGetValueArrayInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ControlSourceGetValueArrayInvoker (ControlSourceGetValueArrayNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ControlSourceGetValueArrayInvoker (ControlSourceGetValueArrayNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ControlSourceGetValueArrayInvoker (ControlSourceGetValueArrayNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ControlSourceGetValueArray Handler { + get { + return new Gst.ControlSourceGetValueArray(InvokeNative); + } + } + + bool InvokeNative (Gst.ControlSource self, ulong timestamp, ulong interval, uint n_values, double values) + { + bool __result = native_cb (self == null ? IntPtr.Zero : self.Handle, timestamp, interval, n_values, values); + return __result; + } + } + + internal class ControlSourceGetValueArrayWrapper { + + public bool NativeCallback (IntPtr self, ulong timestamp, ulong interval, uint n_values, double values) + { + try { + bool __ret = managed (GLib.Object.GetObject(self) as Gst.ControlSource, timestamp, interval, n_values, values); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ControlSourceGetValueArrayNative NativeDelegate; + Gst.ControlSourceGetValueArray managed; + + public ControlSourceGetValueArrayWrapper (Gst.ControlSourceGetValueArray managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ControlSourceGetValueArrayNative (NativeCallback); + } + + public static Gst.ControlSourceGetValueArray GetManagedDelegate (ControlSourceGetValueArrayNative native) + { + if (native == null) + return null; + ControlSourceGetValueArrayWrapper wrapper = (ControlSourceGetValueArrayWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ControlSourceGetValueNative.cs b/sources/generated/Gst/GstSharp.ControlSourceGetValueNative.cs new file mode 100644 index 0000000000..ca2f199762 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ControlSourceGetValueNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ControlSourceGetValueNative(IntPtr self, ulong timestamp, double value); + + internal class ControlSourceGetValueInvoker { + + ControlSourceGetValueNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ControlSourceGetValueInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ControlSourceGetValueInvoker (ControlSourceGetValueNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ControlSourceGetValueInvoker (ControlSourceGetValueNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ControlSourceGetValueInvoker (ControlSourceGetValueNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ControlSourceGetValue Handler { + get { + return new Gst.ControlSourceGetValue(InvokeNative); + } + } + + bool InvokeNative (Gst.ControlSource self, ulong timestamp, double value) + { + bool __result = native_cb (self == null ? IntPtr.Zero : self.Handle, timestamp, value); + return __result; + } + } + + internal class ControlSourceGetValueWrapper { + + public bool NativeCallback (IntPtr self, ulong timestamp, double value) + { + try { + bool __ret = managed (GLib.Object.GetObject(self) as Gst.ControlSource, timestamp, value); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ControlSourceGetValueNative NativeDelegate; + Gst.ControlSourceGetValue managed; + + public ControlSourceGetValueWrapper (Gst.ControlSourceGetValue managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ControlSourceGetValueNative (NativeCallback); + } + + public static Gst.ControlSourceGetValue GetManagedDelegate (ControlSourceGetValueNative native) + { + if (native == null) + return null; + ControlSourceGetValueWrapper wrapper = (ControlSourceGetValueWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.CustomMetaTransformFunctionNative.cs b/sources/generated/Gst/GstSharp.CustomMetaTransformFunctionNative.cs new file mode 100644 index 0000000000..cccad55a23 --- /dev/null +++ b/sources/generated/Gst/GstSharp.CustomMetaTransformFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool CustomMetaTransformFunctionNative(IntPtr transbuf, IntPtr meta, IntPtr buffer, uint type, IntPtr data, IntPtr user_data); + + internal class CustomMetaTransformFunctionInvoker { + + CustomMetaTransformFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~CustomMetaTransformFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal CustomMetaTransformFunctionInvoker (CustomMetaTransformFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal CustomMetaTransformFunctionInvoker (CustomMetaTransformFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal CustomMetaTransformFunctionInvoker (CustomMetaTransformFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.CustomMetaTransformFunction Handler { + get { + return new Gst.CustomMetaTransformFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Buffer transbuf, Gst.CustomMeta meta, Gst.Buffer buffer, uint type, IntPtr data) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = native_cb (transbuf == null ? IntPtr.Zero : transbuf.Handle, native_meta, buffer == null ? IntPtr.Zero : buffer.Handle, type, __data, __data); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class CustomMetaTransformFunctionWrapper { + + public bool NativeCallback (IntPtr transbuf, IntPtr meta, IntPtr buffer, uint type, IntPtr data, IntPtr user_data) + { + try { + bool __ret = managed (transbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (transbuf, typeof (Gst.Buffer), false), Gst.CustomMeta.New (meta), buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), type, data); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal CustomMetaTransformFunctionNative NativeDelegate; + Gst.CustomMetaTransformFunction managed; + + public CustomMetaTransformFunctionWrapper (Gst.CustomMetaTransformFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new CustomMetaTransformFunctionNative (NativeCallback); + } + + public static Gst.CustomMetaTransformFunction GetManagedDelegate (CustomMetaTransformFunctionNative native) + { + if (native == null) + return null; + CustomMetaTransformFunctionWrapper wrapper = (CustomMetaTransformFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.DebugFuncPtrNative.cs b/sources/generated/Gst/GstSharp.DebugFuncPtrNative.cs new file mode 100644 index 0000000000..8d2a15b633 --- /dev/null +++ b/sources/generated/Gst/GstSharp.DebugFuncPtrNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void DebugFuncPtrNative(); + + internal class DebugFuncPtrInvoker { + + DebugFuncPtrNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~DebugFuncPtrInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal DebugFuncPtrInvoker (DebugFuncPtrNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal DebugFuncPtrInvoker (DebugFuncPtrNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal DebugFuncPtrInvoker (DebugFuncPtrNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.DebugFuncPtr Handler { + get { + return new Gst.DebugFuncPtr(InvokeNative); + } + } + + void InvokeNative () + { + native_cb (); + } + } + + internal class DebugFuncPtrWrapper { + + public void NativeCallback () + { + try { + managed (); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal DebugFuncPtrNative NativeDelegate; + Gst.DebugFuncPtr managed; + + public DebugFuncPtrWrapper (Gst.DebugFuncPtr managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new DebugFuncPtrNative (NativeCallback); + } + + public static Gst.DebugFuncPtr GetManagedDelegate (DebugFuncPtrNative native) + { + if (native == null) + return null; + DebugFuncPtrWrapper wrapper = (DebugFuncPtrWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ElementCallAsyncFuncNative.cs b/sources/generated/Gst/GstSharp.ElementCallAsyncFuncNative.cs new file mode 100644 index 0000000000..8aecc63ad6 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ElementCallAsyncFuncNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void ElementCallAsyncFuncNative(IntPtr element, IntPtr user_data); + + internal class ElementCallAsyncFuncInvoker { + + ElementCallAsyncFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ElementCallAsyncFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ElementCallAsyncFuncInvoker (ElementCallAsyncFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ElementCallAsyncFuncInvoker (ElementCallAsyncFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ElementCallAsyncFuncInvoker (ElementCallAsyncFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ElementCallAsyncFunc Handler { + get { + return new Gst.ElementCallAsyncFunc(InvokeNative); + } + } + + void InvokeNative (Gst.Element element) + { + native_cb (element == null ? IntPtr.Zero : element.Handle, __data); + } + } + + internal class ElementCallAsyncFuncWrapper { + + public void NativeCallback (IntPtr element, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject(element) as Gst.Element); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ElementCallAsyncFuncNative NativeDelegate; + Gst.ElementCallAsyncFunc managed; + + public ElementCallAsyncFuncWrapper (Gst.ElementCallAsyncFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ElementCallAsyncFuncNative (NativeCallback); + } + + public static Gst.ElementCallAsyncFunc GetManagedDelegate (ElementCallAsyncFuncNative native) + { + if (native == null) + return null; + ElementCallAsyncFuncWrapper wrapper = (ElementCallAsyncFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ElementForeachPadFuncNative.cs b/sources/generated/Gst/GstSharp.ElementForeachPadFuncNative.cs new file mode 100644 index 0000000000..f308e48359 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ElementForeachPadFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ElementForeachPadFuncNative(IntPtr element, IntPtr pad, IntPtr user_data); + + internal class ElementForeachPadFuncInvoker { + + ElementForeachPadFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ElementForeachPadFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ElementForeachPadFuncInvoker (ElementForeachPadFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ElementForeachPadFuncInvoker (ElementForeachPadFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ElementForeachPadFuncInvoker (ElementForeachPadFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ElementForeachPadFunc Handler { + get { + return new Gst.ElementForeachPadFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.Element element, Gst.Pad pad) + { + bool __result = native_cb (element == null ? IntPtr.Zero : element.Handle, pad == null ? IntPtr.Zero : pad.Handle, __data); + return __result; + } + } + + internal class ElementForeachPadFuncWrapper { + + public bool NativeCallback (IntPtr element, IntPtr pad, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(element) as Gst.Element, GLib.Object.GetObject(pad) as Gst.Pad); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ElementForeachPadFuncNative NativeDelegate; + Gst.ElementForeachPadFunc managed; + + public ElementForeachPadFuncWrapper (Gst.ElementForeachPadFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ElementForeachPadFuncNative (NativeCallback); + } + + public static Gst.ElementForeachPadFunc GetManagedDelegate (ElementForeachPadFuncNative native) + { + if (native == null) + return null; + ElementForeachPadFuncWrapper wrapper = (ElementForeachPadFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorCopyFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorCopyFunctionNative.cs new file mode 100644 index 0000000000..ef4f0c502e --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorCopyFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void IteratorCopyFunctionNative(IntPtr it, IntPtr copy); + + internal class IteratorCopyFunctionInvoker { + + IteratorCopyFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorCopyFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorCopyFunctionInvoker (IteratorCopyFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorCopyFunctionInvoker (IteratorCopyFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorCopyFunctionInvoker (IteratorCopyFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorCopyFunction Handler { + get { + return new Gst.IteratorCopyFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Iterator it, Gst.Iterator copy) + { + native_cb (it == null ? IntPtr.Zero : it.Handle, copy == null ? IntPtr.Zero : copy.Handle); + } + } + + internal class IteratorCopyFunctionWrapper { + + public void NativeCallback (IntPtr it, IntPtr copy) + { + try { + managed (it == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (it, typeof (Gst.Iterator), false), copy == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (copy, typeof (Gst.Iterator), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorCopyFunctionNative NativeDelegate; + Gst.IteratorCopyFunction managed; + + public IteratorCopyFunctionWrapper (Gst.IteratorCopyFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorCopyFunctionNative (NativeCallback); + } + + public static Gst.IteratorCopyFunction GetManagedDelegate (IteratorCopyFunctionNative native) + { + if (native == null) + return null; + IteratorCopyFunctionWrapper wrapper = (IteratorCopyFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorFoldFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorFoldFunctionNative.cs new file mode 100644 index 0000000000..cb20b1d95d --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorFoldFunctionNative.cs @@ -0,0 +1,99 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool IteratorFoldFunctionNative(IntPtr item, IntPtr _ret, IntPtr user_data); + + internal class IteratorFoldFunctionInvoker { + + IteratorFoldFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorFoldFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorFoldFunctionInvoker (IteratorFoldFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorFoldFunctionInvoker (IteratorFoldFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorFoldFunctionInvoker (IteratorFoldFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorFoldFunction Handler { + get { + return new Gst.IteratorFoldFunction(InvokeNative); + } + } + + bool InvokeNative (GLib.Value item, GLib.Value _ret) + { + IntPtr native_item = GLib.Marshaller.StructureToPtrAlloc (item); + IntPtr native__ret = GLib.Marshaller.StructureToPtrAlloc (_ret); + bool __result = native_cb (native_item, native__ret, __data); + Marshal.FreeHGlobal (native_item); + Marshal.FreeHGlobal (native__ret); + return __result; + } + } + + internal class IteratorFoldFunctionWrapper { + + public bool NativeCallback (IntPtr item, IntPtr _ret, IntPtr user_data) + { + try { + bool __ret = managed ((GLib.Value) Marshal.PtrToStructure (item, typeof (GLib.Value)), (GLib.Value) Marshal.PtrToStructure (_ret, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorFoldFunctionNative NativeDelegate; + Gst.IteratorFoldFunction managed; + + public IteratorFoldFunctionWrapper (Gst.IteratorFoldFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorFoldFunctionNative (NativeCallback); + } + + public static Gst.IteratorFoldFunction GetManagedDelegate (IteratorFoldFunctionNative native) + { + if (native == null) + return null; + IteratorFoldFunctionWrapper wrapper = (IteratorFoldFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorForeachFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorForeachFunctionNative.cs new file mode 100644 index 0000000000..c790d302ef --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorForeachFunctionNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void IteratorForeachFunctionNative(IntPtr item, IntPtr user_data); + + internal class IteratorForeachFunctionInvoker { + + IteratorForeachFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorForeachFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorForeachFunctionInvoker (IteratorForeachFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorForeachFunctionInvoker (IteratorForeachFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorForeachFunctionInvoker (IteratorForeachFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorForeachFunction Handler { + get { + return new Gst.IteratorForeachFunction(InvokeNative); + } + } + + void InvokeNative (GLib.Value item) + { + IntPtr native_item = GLib.Marshaller.StructureToPtrAlloc (item); + native_cb (native_item, __data); + Marshal.FreeHGlobal (native_item); + } + } + + internal class IteratorForeachFunctionWrapper { + + public void NativeCallback (IntPtr item, IntPtr user_data) + { + try { + managed ((GLib.Value) Marshal.PtrToStructure (item, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorForeachFunctionNative NativeDelegate; + Gst.IteratorForeachFunction managed; + + public IteratorForeachFunctionWrapper (Gst.IteratorForeachFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorForeachFunctionNative (NativeCallback); + } + + public static Gst.IteratorForeachFunction GetManagedDelegate (IteratorForeachFunctionNative native) + { + if (native == null) + return null; + IteratorForeachFunctionWrapper wrapper = (IteratorForeachFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorFreeFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorFreeFunctionNative.cs new file mode 100644 index 0000000000..48950d629e --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorFreeFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void IteratorFreeFunctionNative(IntPtr it); + + internal class IteratorFreeFunctionInvoker { + + IteratorFreeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorFreeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorFreeFunctionInvoker (IteratorFreeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorFreeFunctionInvoker (IteratorFreeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorFreeFunctionInvoker (IteratorFreeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorFreeFunction Handler { + get { + return new Gst.IteratorFreeFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Iterator it) + { + native_cb (it == null ? IntPtr.Zero : it.Handle); + } + } + + internal class IteratorFreeFunctionWrapper { + + public void NativeCallback (IntPtr it) + { + try { + managed (it == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (it, typeof (Gst.Iterator), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorFreeFunctionNative NativeDelegate; + Gst.IteratorFreeFunction managed; + + public IteratorFreeFunctionWrapper (Gst.IteratorFreeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorFreeFunctionNative (NativeCallback); + } + + public static Gst.IteratorFreeFunction GetManagedDelegate (IteratorFreeFunctionNative native) + { + if (native == null) + return null; + IteratorFreeFunctionWrapper wrapper = (IteratorFreeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorItemFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorItemFunctionNative.cs new file mode 100644 index 0000000000..9e7fb7ebd3 --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorItemFunctionNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int IteratorItemFunctionNative(IntPtr it, IntPtr item); + + internal class IteratorItemFunctionInvoker { + + IteratorItemFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorItemFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorItemFunctionInvoker (IteratorItemFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorItemFunctionInvoker (IteratorItemFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorItemFunctionInvoker (IteratorItemFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorItemFunction Handler { + get { + return new Gst.IteratorItemFunction(InvokeNative); + } + } + + Gst.IteratorItem InvokeNative (Gst.Iterator it, GLib.Value item) + { + IntPtr native_item = GLib.Marshaller.StructureToPtrAlloc (item); + Gst.IteratorItem __result = (Gst.IteratorItem) native_cb (it == null ? IntPtr.Zero : it.Handle, native_item); + Marshal.FreeHGlobal (native_item); + return __result; + } + } + + internal class IteratorItemFunctionWrapper { + + public int NativeCallback (IntPtr it, IntPtr item) + { + try { + Gst.IteratorItem __ret = managed (it == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (it, typeof (Gst.Iterator), false), (GLib.Value) Marshal.PtrToStructure (item, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorItemFunctionNative NativeDelegate; + Gst.IteratorItemFunction managed; + + public IteratorItemFunctionWrapper (Gst.IteratorItemFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorItemFunctionNative (NativeCallback); + } + + public static Gst.IteratorItemFunction GetManagedDelegate (IteratorItemFunctionNative native) + { + if (native == null) + return null; + IteratorItemFunctionWrapper wrapper = (IteratorItemFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorNextFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorNextFunctionNative.cs new file mode 100644 index 0000000000..ef93a001ee --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorNextFunctionNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int IteratorNextFunctionNative(IntPtr it, IntPtr _result); + + internal class IteratorNextFunctionInvoker { + + IteratorNextFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorNextFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorNextFunctionInvoker (IteratorNextFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorNextFunctionInvoker (IteratorNextFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorNextFunctionInvoker (IteratorNextFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorNextFunction Handler { + get { + return new Gst.IteratorNextFunction(InvokeNative); + } + } + + Gst.IteratorResult InvokeNative (Gst.Iterator it, GLib.Value _result) + { + IntPtr native__result = GLib.Marshaller.StructureToPtrAlloc (_result); + Gst.IteratorResult __result = (Gst.IteratorResult) native_cb (it == null ? IntPtr.Zero : it.Handle, native__result); + Marshal.FreeHGlobal (native__result); + return __result; + } + } + + internal class IteratorNextFunctionWrapper { + + public int NativeCallback (IntPtr it, IntPtr _result) + { + try { + Gst.IteratorResult __ret = managed (it == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (it, typeof (Gst.Iterator), false), (GLib.Value) Marshal.PtrToStructure (_result, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorNextFunctionNative NativeDelegate; + Gst.IteratorNextFunction managed; + + public IteratorNextFunctionWrapper (Gst.IteratorNextFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorNextFunctionNative (NativeCallback); + } + + public static Gst.IteratorNextFunction GetManagedDelegate (IteratorNextFunctionNative native) + { + if (native == null) + return null; + IteratorNextFunctionWrapper wrapper = (IteratorNextFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.IteratorResyncFunctionNative.cs b/sources/generated/Gst/GstSharp.IteratorResyncFunctionNative.cs new file mode 100644 index 0000000000..c39b3d0614 --- /dev/null +++ b/sources/generated/Gst/GstSharp.IteratorResyncFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void IteratorResyncFunctionNative(IntPtr it); + + internal class IteratorResyncFunctionInvoker { + + IteratorResyncFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~IteratorResyncFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal IteratorResyncFunctionInvoker (IteratorResyncFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal IteratorResyncFunctionInvoker (IteratorResyncFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal IteratorResyncFunctionInvoker (IteratorResyncFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.IteratorResyncFunction Handler { + get { + return new Gst.IteratorResyncFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Iterator it) + { + native_cb (it == null ? IntPtr.Zero : it.Handle); + } + } + + internal class IteratorResyncFunctionWrapper { + + public void NativeCallback (IntPtr it) + { + try { + managed (it == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (it, typeof (Gst.Iterator), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal IteratorResyncFunctionNative NativeDelegate; + Gst.IteratorResyncFunction managed; + + public IteratorResyncFunctionWrapper (Gst.IteratorResyncFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new IteratorResyncFunctionNative (NativeCallback); + } + + public static Gst.IteratorResyncFunction GetManagedDelegate (IteratorResyncFunctionNative native) + { + if (native == null) + return null; + IteratorResyncFunctionWrapper wrapper = (IteratorResyncFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.LogFunctionNative.cs b/sources/generated/Gst/GstSharp.LogFunctionNative.cs new file mode 100644 index 0000000000..b1e3b7dac6 --- /dev/null +++ b/sources/generated/Gst/GstSharp.LogFunctionNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void LogFunctionNative(IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message, IntPtr user_data); + + internal class LogFunctionInvoker { + + LogFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~LogFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal LogFunctionInvoker (LogFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal LogFunctionInvoker (LogFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal LogFunctionInvoker (LogFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.LogFunction Handler { + get { + return new Gst.LogFunction(InvokeNative); + } + } + + void InvokeNative (Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message) + { + IntPtr native_category = GLib.Marshaller.StructureToPtrAlloc (category); + IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file); + IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function); + native_cb (native_category, (int) level, native_file, native_function, line, _object == null ? IntPtr.Zero : _object.Handle, message == null ? IntPtr.Zero : message.Handle, __data); + Marshal.FreeHGlobal (native_category); + GLib.Marshaller.Free (native_file); + GLib.Marshaller.Free (native_function); + } + } + + internal class LogFunctionWrapper { + + public void NativeCallback (IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message, IntPtr user_data) + { + try { + managed (Gst.DebugCategory.New (category), (Gst.DebugLevel) level, GLib.Marshaller.Utf8PtrToString (file), GLib.Marshaller.Utf8PtrToString (function), line, GLib.Object.GetObject (_object), message == IntPtr.Zero ? null : (Gst.DebugMessage) GLib.Opaque.GetOpaque (message, typeof (Gst.DebugMessage), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal LogFunctionNative NativeDelegate; + Gst.LogFunction managed; + + public LogFunctionWrapper (Gst.LogFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new LogFunctionNative (NativeCallback); + } + + public static Gst.LogFunction GetManagedDelegate (LogFunctionNative native) + { + if (native == null) + return null; + LogFunctionWrapper wrapper = (LogFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryCopyFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryCopyFunctionNative.cs new file mode 100644 index 0000000000..d514cd78d3 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryCopyFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr MemoryCopyFunctionNative(IntPtr mem, IntPtr offset, IntPtr size); + + internal class MemoryCopyFunctionInvoker { + + MemoryCopyFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryCopyFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryCopyFunctionInvoker (MemoryCopyFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryCopyFunctionInvoker (MemoryCopyFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryCopyFunctionInvoker (MemoryCopyFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryCopyFunction Handler { + get { + return new Gst.MemoryCopyFunction(InvokeNative); + } + } + + Gst.Memory InvokeNative (Gst.Memory mem, long offset, long size) + { + Gst.Memory __result = native_cb (mem == null ? IntPtr.Zero : mem.Handle, new IntPtr (offset), new IntPtr (size)) == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (native_cb (mem == null ? IntPtr.Zero : mem.Handle, new IntPtr (offset), new IntPtr (size)), typeof (Gst.Memory), true); + return __result; + } + } + + internal class MemoryCopyFunctionWrapper { + + public IntPtr NativeCallback (IntPtr mem, IntPtr offset, IntPtr size) + { + try { + Gst.Memory __ret = managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false), (long) offset, (long) size); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryCopyFunctionNative NativeDelegate; + Gst.MemoryCopyFunction managed; + + public MemoryCopyFunctionWrapper (Gst.MemoryCopyFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryCopyFunctionNative (NativeCallback); + } + + public static Gst.MemoryCopyFunction GetManagedDelegate (MemoryCopyFunctionNative native) + { + if (native == null) + return null; + MemoryCopyFunctionWrapper wrapper = (MemoryCopyFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryIsSpanFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryIsSpanFunctionNative.cs new file mode 100644 index 0000000000..cf98fb9373 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryIsSpanFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool MemoryIsSpanFunctionNative(IntPtr mem1, IntPtr mem2, UIntPtr offset); + + internal class MemoryIsSpanFunctionInvoker { + + MemoryIsSpanFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryIsSpanFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryIsSpanFunction Handler { + get { + return new Gst.MemoryIsSpanFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Memory mem1, Gst.Memory mem2, ulong offset) + { + bool __result = native_cb (mem1 == null ? IntPtr.Zero : mem1.Handle, mem2 == null ? IntPtr.Zero : mem2.Handle, new UIntPtr (offset)); + return __result; + } + } + + internal class MemoryIsSpanFunctionWrapper { + + public bool NativeCallback (IntPtr mem1, IntPtr mem2, UIntPtr offset) + { + try { + bool __ret = managed (mem1 == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem1, typeof (Gst.Memory), false), mem2 == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem2, typeof (Gst.Memory), false), (ulong) offset); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryIsSpanFunctionNative NativeDelegate; + Gst.MemoryIsSpanFunction managed; + + public MemoryIsSpanFunctionWrapper (Gst.MemoryIsSpanFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryIsSpanFunctionNative (NativeCallback); + } + + public static Gst.MemoryIsSpanFunction GetManagedDelegate (MemoryIsSpanFunctionNative native) + { + if (native == null) + return null; + MemoryIsSpanFunctionWrapper wrapper = (MemoryIsSpanFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryMapFullFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryMapFullFunctionNative.cs new file mode 100644 index 0000000000..4926cffb30 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryMapFullFunctionNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr MemoryMapFullFunctionNative(IntPtr mem, IntPtr info, UIntPtr maxsize); + + internal class MemoryMapFullFunctionInvoker { + + MemoryMapFullFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryMapFullFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryMapFullFunctionInvoker (MemoryMapFullFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryMapFullFunctionInvoker (MemoryMapFullFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryMapFullFunctionInvoker (MemoryMapFullFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryMapFullFunction Handler { + get { + return new Gst.MemoryMapFullFunction(InvokeNative); + } + } + + IntPtr InvokeNative (Gst.Memory mem, Gst.MapInfo info, ulong maxsize) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + IntPtr __result = native_cb (mem == null ? IntPtr.Zero : mem.Handle, native_info, new UIntPtr (maxsize)); + Marshal.FreeHGlobal (native_info); + return __result; + } + } + + internal class MemoryMapFullFunctionWrapper { + + public IntPtr NativeCallback (IntPtr mem, IntPtr info, UIntPtr maxsize) + { + try { + IntPtr __ret = managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false), Gst.MapInfo.New (info), (ulong) maxsize); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryMapFullFunctionNative NativeDelegate; + Gst.MemoryMapFullFunction managed; + + public MemoryMapFullFunctionWrapper (Gst.MemoryMapFullFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryMapFullFunctionNative (NativeCallback); + } + + public static Gst.MemoryMapFullFunction GetManagedDelegate (MemoryMapFullFunctionNative native) + { + if (native == null) + return null; + MemoryMapFullFunctionWrapper wrapper = (MemoryMapFullFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryMapFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryMapFunctionNative.cs new file mode 100644 index 0000000000..4240a663b7 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryMapFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr MemoryMapFunctionNative(IntPtr mem, UIntPtr maxsize, int flags); + + internal class MemoryMapFunctionInvoker { + + MemoryMapFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryMapFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryMapFunctionInvoker (MemoryMapFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryMapFunctionInvoker (MemoryMapFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryMapFunctionInvoker (MemoryMapFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryMapFunction Handler { + get { + return new Gst.MemoryMapFunction(InvokeNative); + } + } + + IntPtr InvokeNative (Gst.Memory mem, ulong maxsize, Gst.MapFlags flags) + { + IntPtr __result = native_cb (mem == null ? IntPtr.Zero : mem.Handle, new UIntPtr (maxsize), (int) flags); + return __result; + } + } + + internal class MemoryMapFunctionWrapper { + + public IntPtr NativeCallback (IntPtr mem, UIntPtr maxsize, int flags) + { + try { + IntPtr __ret = managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false), (ulong) maxsize, (Gst.MapFlags) flags); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryMapFunctionNative NativeDelegate; + Gst.MemoryMapFunction managed; + + public MemoryMapFunctionWrapper (Gst.MemoryMapFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryMapFunctionNative (NativeCallback); + } + + public static Gst.MemoryMapFunction GetManagedDelegate (MemoryMapFunctionNative native) + { + if (native == null) + return null; + MemoryMapFunctionWrapper wrapper = (MemoryMapFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryShareFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryShareFunctionNative.cs new file mode 100644 index 0000000000..1057222c57 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryShareFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr MemoryShareFunctionNative(IntPtr mem, IntPtr offset, IntPtr size); + + internal class MemoryShareFunctionInvoker { + + MemoryShareFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryShareFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryShareFunctionInvoker (MemoryShareFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryShareFunctionInvoker (MemoryShareFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryShareFunctionInvoker (MemoryShareFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryShareFunction Handler { + get { + return new Gst.MemoryShareFunction(InvokeNative); + } + } + + Gst.Memory InvokeNative (Gst.Memory mem, long offset, long size) + { + Gst.Memory __result = native_cb (mem == null ? IntPtr.Zero : mem.Handle, new IntPtr (offset), new IntPtr (size)) == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (native_cb (mem == null ? IntPtr.Zero : mem.Handle, new IntPtr (offset), new IntPtr (size)), typeof (Gst.Memory), true); + return __result; + } + } + + internal class MemoryShareFunctionWrapper { + + public IntPtr NativeCallback (IntPtr mem, IntPtr offset, IntPtr size) + { + try { + Gst.Memory __ret = managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false), (long) offset, (long) size); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryShareFunctionNative NativeDelegate; + Gst.MemoryShareFunction managed; + + public MemoryShareFunctionWrapper (Gst.MemoryShareFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryShareFunctionNative (NativeCallback); + } + + public static Gst.MemoryShareFunction GetManagedDelegate (MemoryShareFunctionNative native) + { + if (native == null) + return null; + MemoryShareFunctionWrapper wrapper = (MemoryShareFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryUnmapFullFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryUnmapFullFunctionNative.cs new file mode 100644 index 0000000000..98357df9c9 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryUnmapFullFunctionNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MemoryUnmapFullFunctionNative(IntPtr mem, IntPtr info); + + internal class MemoryUnmapFullFunctionInvoker { + + MemoryUnmapFullFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryUnmapFullFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryUnmapFullFunctionInvoker (MemoryUnmapFullFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryUnmapFullFunctionInvoker (MemoryUnmapFullFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryUnmapFullFunctionInvoker (MemoryUnmapFullFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryUnmapFullFunction Handler { + get { + return new Gst.MemoryUnmapFullFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Memory mem, Gst.MapInfo info) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + native_cb (mem == null ? IntPtr.Zero : mem.Handle, native_info); + Marshal.FreeHGlobal (native_info); + } + } + + internal class MemoryUnmapFullFunctionWrapper { + + public void NativeCallback (IntPtr mem, IntPtr info) + { + try { + managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false), Gst.MapInfo.New (info)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryUnmapFullFunctionNative NativeDelegate; + Gst.MemoryUnmapFullFunction managed; + + public MemoryUnmapFullFunctionWrapper (Gst.MemoryUnmapFullFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryUnmapFullFunctionNative (NativeCallback); + } + + public static Gst.MemoryUnmapFullFunction GetManagedDelegate (MemoryUnmapFullFunctionNative native) + { + if (native == null) + return null; + MemoryUnmapFullFunctionWrapper wrapper = (MemoryUnmapFullFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MemoryUnmapFunctionNative.cs b/sources/generated/Gst/GstSharp.MemoryUnmapFunctionNative.cs new file mode 100644 index 0000000000..26309b2db3 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MemoryUnmapFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MemoryUnmapFunctionNative(IntPtr mem); + + internal class MemoryUnmapFunctionInvoker { + + MemoryUnmapFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MemoryUnmapFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MemoryUnmapFunctionInvoker (MemoryUnmapFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MemoryUnmapFunctionInvoker (MemoryUnmapFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MemoryUnmapFunctionInvoker (MemoryUnmapFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MemoryUnmapFunction Handler { + get { + return new Gst.MemoryUnmapFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Memory mem) + { + native_cb (mem == null ? IntPtr.Zero : mem.Handle); + } + } + + internal class MemoryUnmapFunctionWrapper { + + public void NativeCallback (IntPtr mem) + { + try { + managed (mem == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem, typeof (Gst.Memory), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MemoryUnmapFunctionNative NativeDelegate; + Gst.MemoryUnmapFunction managed; + + public MemoryUnmapFunctionWrapper (Gst.MemoryUnmapFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MemoryUnmapFunctionNative (NativeCallback); + } + + public static Gst.MemoryUnmapFunction GetManagedDelegate (MemoryUnmapFunctionNative native) + { + if (native == null) + return null; + MemoryUnmapFunctionWrapper wrapper = (MemoryUnmapFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MetaFreeFunctionNative.cs b/sources/generated/Gst/GstSharp.MetaFreeFunctionNative.cs new file mode 100644 index 0000000000..ca5c378591 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MetaFreeFunctionNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MetaFreeFunctionNative(IntPtr meta, IntPtr buffer); + + internal class MetaFreeFunctionInvoker { + + MetaFreeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MetaFreeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MetaFreeFunctionInvoker (MetaFreeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MetaFreeFunctionInvoker (MetaFreeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MetaFreeFunctionInvoker (MetaFreeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MetaFreeFunction Handler { + get { + return new Gst.MetaFreeFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Meta meta, Gst.Buffer buffer) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + native_cb (native_meta, buffer == null ? IntPtr.Zero : buffer.Handle); + Marshal.FreeHGlobal (native_meta); + } + } + + internal class MetaFreeFunctionWrapper { + + public void NativeCallback (IntPtr meta, IntPtr buffer) + { + try { + managed (Gst.Meta.New (meta), buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MetaFreeFunctionNative NativeDelegate; + Gst.MetaFreeFunction managed; + + public MetaFreeFunctionWrapper (Gst.MetaFreeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MetaFreeFunctionNative (NativeCallback); + } + + public static Gst.MetaFreeFunction GetManagedDelegate (MetaFreeFunctionNative native) + { + if (native == null) + return null; + MetaFreeFunctionWrapper wrapper = (MetaFreeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MetaInitFunctionNative.cs b/sources/generated/Gst/GstSharp.MetaInitFunctionNative.cs new file mode 100644 index 0000000000..ba2560ce2c --- /dev/null +++ b/sources/generated/Gst/GstSharp.MetaInitFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool MetaInitFunctionNative(IntPtr meta, IntPtr parms, IntPtr buffer); + + internal class MetaInitFunctionInvoker { + + MetaInitFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MetaInitFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MetaInitFunctionInvoker (MetaInitFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MetaInitFunctionInvoker (MetaInitFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MetaInitFunctionInvoker (MetaInitFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MetaInitFunction Handler { + get { + return new Gst.MetaInitFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Meta meta, IntPtr parms, Gst.Buffer buffer) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = native_cb (native_meta, parms, buffer == null ? IntPtr.Zero : buffer.Handle); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class MetaInitFunctionWrapper { + + public bool NativeCallback (IntPtr meta, IntPtr parms, IntPtr buffer) + { + try { + bool __ret = managed (Gst.Meta.New (meta), parms, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MetaInitFunctionNative NativeDelegate; + Gst.MetaInitFunction managed; + + public MetaInitFunctionWrapper (Gst.MetaInitFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MetaInitFunctionNative (NativeCallback); + } + + public static Gst.MetaInitFunction GetManagedDelegate (MetaInitFunctionNative native) + { + if (native == null) + return null; + MetaInitFunctionWrapper wrapper = (MetaInitFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MetaTransformFunctionNative.cs b/sources/generated/Gst/GstSharp.MetaTransformFunctionNative.cs new file mode 100644 index 0000000000..f4bbd19949 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MetaTransformFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool MetaTransformFunctionNative(IntPtr transbuf, IntPtr meta, IntPtr buffer, uint type, IntPtr data); + + internal class MetaTransformFunctionInvoker { + + MetaTransformFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MetaTransformFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MetaTransformFunctionInvoker (MetaTransformFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MetaTransformFunctionInvoker (MetaTransformFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MetaTransformFunctionInvoker (MetaTransformFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MetaTransformFunction Handler { + get { + return new Gst.MetaTransformFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Buffer transbuf, Gst.Meta meta, Gst.Buffer buffer, uint type, IntPtr data) + { + IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); + bool __result = native_cb (transbuf == null ? IntPtr.Zero : transbuf.Handle, native_meta, buffer == null ? IntPtr.Zero : buffer.Handle, type, __data); + Marshal.FreeHGlobal (native_meta); + return __result; + } + } + + internal class MetaTransformFunctionWrapper { + + public bool NativeCallback (IntPtr transbuf, IntPtr meta, IntPtr buffer, uint type, IntPtr data) + { + try { + bool __ret = managed (transbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (transbuf, typeof (Gst.Buffer), false), Gst.Meta.New (meta), buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false), type, data); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MetaTransformFunctionNative NativeDelegate; + Gst.MetaTransformFunction managed; + + public MetaTransformFunctionWrapper (Gst.MetaTransformFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MetaTransformFunctionNative (NativeCallback); + } + + public static Gst.MetaTransformFunction GetManagedDelegate (MetaTransformFunctionNative native) + { + if (native == null) + return null; + MetaTransformFunctionWrapper wrapper = (MetaTransformFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MiniObjectCopyFunctionNative.cs b/sources/generated/Gst/GstSharp.MiniObjectCopyFunctionNative.cs new file mode 100644 index 0000000000..d2271c7188 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MiniObjectCopyFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr MiniObjectCopyFunctionNative(IntPtr obj); + + internal class MiniObjectCopyFunctionInvoker { + + MiniObjectCopyFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MiniObjectCopyFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MiniObjectCopyFunctionInvoker (MiniObjectCopyFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MiniObjectCopyFunctionInvoker (MiniObjectCopyFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MiniObjectCopyFunctionInvoker (MiniObjectCopyFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MiniObjectCopyFunction Handler { + get { + return new Gst.MiniObjectCopyFunction(InvokeNative); + } + } + + Gst.MiniObject InvokeNative (Gst.MiniObject obj) + { + Gst.MiniObject __result = native_cb (obj == null ? IntPtr.Zero : obj.Handle) == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (native_cb (obj == null ? IntPtr.Zero : obj.Handle), typeof (Gst.MiniObject), false); + return __result; + } + } + + internal class MiniObjectCopyFunctionWrapper { + + public IntPtr NativeCallback (IntPtr obj) + { + try { + Gst.MiniObject __ret = managed (obj == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (obj, typeof (Gst.MiniObject), false)); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.Handle; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MiniObjectCopyFunctionNative NativeDelegate; + Gst.MiniObjectCopyFunction managed; + + public MiniObjectCopyFunctionWrapper (Gst.MiniObjectCopyFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MiniObjectCopyFunctionNative (NativeCallback); + } + + public static Gst.MiniObjectCopyFunction GetManagedDelegate (MiniObjectCopyFunctionNative native) + { + if (native == null) + return null; + MiniObjectCopyFunctionWrapper wrapper = (MiniObjectCopyFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MiniObjectDisposeFunctionNative.cs b/sources/generated/Gst/GstSharp.MiniObjectDisposeFunctionNative.cs new file mode 100644 index 0000000000..1ea976e898 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MiniObjectDisposeFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool MiniObjectDisposeFunctionNative(IntPtr obj); + + internal class MiniObjectDisposeFunctionInvoker { + + MiniObjectDisposeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MiniObjectDisposeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MiniObjectDisposeFunctionInvoker (MiniObjectDisposeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MiniObjectDisposeFunctionInvoker (MiniObjectDisposeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MiniObjectDisposeFunctionInvoker (MiniObjectDisposeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MiniObjectDisposeFunction Handler { + get { + return new Gst.MiniObjectDisposeFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.MiniObject obj) + { + bool __result = native_cb (obj == null ? IntPtr.Zero : obj.Handle); + return __result; + } + } + + internal class MiniObjectDisposeFunctionWrapper { + + public bool NativeCallback (IntPtr obj) + { + try { + bool __ret = managed (obj == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (obj, typeof (Gst.MiniObject), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MiniObjectDisposeFunctionNative NativeDelegate; + Gst.MiniObjectDisposeFunction managed; + + public MiniObjectDisposeFunctionWrapper (Gst.MiniObjectDisposeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MiniObjectDisposeFunctionNative (NativeCallback); + } + + public static Gst.MiniObjectDisposeFunction GetManagedDelegate (MiniObjectDisposeFunctionNative native) + { + if (native == null) + return null; + MiniObjectDisposeFunctionWrapper wrapper = (MiniObjectDisposeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MiniObjectFreeFunctionNative.cs b/sources/generated/Gst/GstSharp.MiniObjectFreeFunctionNative.cs new file mode 100644 index 0000000000..005b0b9386 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MiniObjectFreeFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MiniObjectFreeFunctionNative(IntPtr obj); + + internal class MiniObjectFreeFunctionInvoker { + + MiniObjectFreeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MiniObjectFreeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MiniObjectFreeFunctionInvoker (MiniObjectFreeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MiniObjectFreeFunctionInvoker (MiniObjectFreeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MiniObjectFreeFunctionInvoker (MiniObjectFreeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MiniObjectFreeFunction Handler { + get { + return new Gst.MiniObjectFreeFunction(InvokeNative); + } + } + + void InvokeNative (Gst.MiniObject obj) + { + native_cb (obj == null ? IntPtr.Zero : obj.Handle); + } + } + + internal class MiniObjectFreeFunctionWrapper { + + public void NativeCallback (IntPtr obj) + { + try { + managed (obj == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (obj, typeof (Gst.MiniObject), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MiniObjectFreeFunctionNative NativeDelegate; + Gst.MiniObjectFreeFunction managed; + + public MiniObjectFreeFunctionWrapper (Gst.MiniObjectFreeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MiniObjectFreeFunctionNative (NativeCallback); + } + + public static Gst.MiniObjectFreeFunction GetManagedDelegate (MiniObjectFreeFunctionNative native) + { + if (native == null) + return null; + MiniObjectFreeFunctionWrapper wrapper = (MiniObjectFreeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.MiniObjectNotifyNative.cs b/sources/generated/Gst/GstSharp.MiniObjectNotifyNative.cs new file mode 100644 index 0000000000..6731580c23 --- /dev/null +++ b/sources/generated/Gst/GstSharp.MiniObjectNotifyNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void MiniObjectNotifyNative(IntPtr user_data, IntPtr obj); + + internal class MiniObjectNotifyInvoker { + + MiniObjectNotifyNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~MiniObjectNotifyInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal MiniObjectNotifyInvoker (MiniObjectNotifyNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal MiniObjectNotifyInvoker (MiniObjectNotifyNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal MiniObjectNotifyInvoker (MiniObjectNotifyNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.MiniObjectNotify Handler { + get { + return new Gst.MiniObjectNotify(InvokeNative); + } + } + + void InvokeNative (Gst.MiniObject obj) + { + native_cb (__data, obj == null ? IntPtr.Zero : obj.Handle); + } + } + + internal class MiniObjectNotifyWrapper { + + public void NativeCallback (IntPtr user_data, IntPtr obj) + { + try { + managed (obj == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (obj, typeof (Gst.MiniObject), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal MiniObjectNotifyNative NativeDelegate; + Gst.MiniObjectNotify managed; + + public MiniObjectNotifyWrapper (Gst.MiniObjectNotify managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new MiniObjectNotifyNative (NativeCallback); + } + + public static Gst.MiniObjectNotify GetManagedDelegate (MiniObjectNotifyNative native) + { + if (native == null) + return null; + MiniObjectNotifyWrapper wrapper = (MiniObjectNotifyWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadActivateFunctionNative.cs b/sources/generated/Gst/GstSharp.PadActivateFunctionNative.cs new file mode 100644 index 0000000000..ba62915ab4 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadActivateFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadActivateFunctionNative(IntPtr pad, IntPtr parent); + + internal class PadActivateFunctionInvoker { + + PadActivateFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadActivateFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadActivateFunctionInvoker (PadActivateFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadActivateFunctionInvoker (PadActivateFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadActivateFunctionInvoker (PadActivateFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadActivateFunction Handler { + get { + return new Gst.PadActivateFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad, Gst.Object parent) + { + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle); + return __result; + } + } + + internal class PadActivateFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr parent) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadActivateFunctionNative NativeDelegate; + Gst.PadActivateFunction managed; + + public PadActivateFunctionWrapper (Gst.PadActivateFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadActivateFunctionNative (NativeCallback); + } + + public static Gst.PadActivateFunction GetManagedDelegate (PadActivateFunctionNative native) + { + if (native == null) + return null; + PadActivateFunctionWrapper wrapper = (PadActivateFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadActivateModeFunctionNative.cs b/sources/generated/Gst/GstSharp.PadActivateModeFunctionNative.cs new file mode 100644 index 0000000000..8b5e6e1c5a --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadActivateModeFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadActivateModeFunctionNative(IntPtr pad, IntPtr parent, int mode, bool active); + + internal class PadActivateModeFunctionInvoker { + + PadActivateModeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadActivateModeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadActivateModeFunctionInvoker (PadActivateModeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadActivateModeFunctionInvoker (PadActivateModeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadActivateModeFunctionInvoker (PadActivateModeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadActivateModeFunction Handler { + get { + return new Gst.PadActivateModeFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active) + { + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, (int) mode, active); + return __result; + } + } + + internal class PadActivateModeFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr parent, int mode, bool active) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, (Gst.PadMode) mode, active); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadActivateModeFunctionNative NativeDelegate; + Gst.PadActivateModeFunction managed; + + public PadActivateModeFunctionWrapper (Gst.PadActivateModeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadActivateModeFunctionNative (NativeCallback); + } + + public static Gst.PadActivateModeFunction GetManagedDelegate (PadActivateModeFunctionNative native) + { + if (native == null) + return null; + PadActivateModeFunctionWrapper wrapper = (PadActivateModeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadChainFunctionNative.cs b/sources/generated/Gst/GstSharp.PadChainFunctionNative.cs new file mode 100644 index 0000000000..3445788724 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadChainFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadChainFunctionNative(IntPtr pad, IntPtr parent, IntPtr buffer); + + internal class PadChainFunctionInvoker { + + PadChainFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadChainFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadChainFunctionInvoker (PadChainFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadChainFunctionInvoker (PadChainFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadChainFunctionInvoker (PadChainFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadChainFunction Handler { + get { + return new Gst.PadChainFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.Buffer buffer) + { + buffer.Owned = false; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + return __result; + } + } + + internal class PadChainFunctionWrapper { + + public int NativeCallback (IntPtr pad, IntPtr parent, IntPtr buffer) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), true)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadChainFunctionNative NativeDelegate; + Gst.PadChainFunction managed; + + public PadChainFunctionWrapper (Gst.PadChainFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadChainFunctionNative (NativeCallback); + } + + public static Gst.PadChainFunction GetManagedDelegate (PadChainFunctionNative native) + { + if (native == null) + return null; + PadChainFunctionWrapper wrapper = (PadChainFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadChainListFunctionNative.cs b/sources/generated/Gst/GstSharp.PadChainListFunctionNative.cs new file mode 100644 index 0000000000..678ac9c018 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadChainListFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadChainListFunctionNative(IntPtr pad, IntPtr parent, IntPtr list); + + internal class PadChainListFunctionInvoker { + + PadChainListFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadChainListFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadChainListFunctionInvoker (PadChainListFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadChainListFunctionInvoker (PadChainListFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadChainListFunctionInvoker (PadChainListFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadChainListFunction Handler { + get { + return new Gst.PadChainListFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.BufferList list) + { + list.Owned = false; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, list == null ? IntPtr.Zero : list.Handle); + return __result; + } + } + + internal class PadChainListFunctionWrapper { + + public int NativeCallback (IntPtr pad, IntPtr parent, IntPtr list) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, list == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (list, typeof (Gst.BufferList), true)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadChainListFunctionNative NativeDelegate; + Gst.PadChainListFunction managed; + + public PadChainListFunctionWrapper (Gst.PadChainListFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadChainListFunctionNative (NativeCallback); + } + + public static Gst.PadChainListFunction GetManagedDelegate (PadChainListFunctionNative native) + { + if (native == null) + return null; + PadChainListFunctionWrapper wrapper = (PadChainListFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadEventFullFunctionNative.cs b/sources/generated/Gst/GstSharp.PadEventFullFunctionNative.cs new file mode 100644 index 0000000000..bcb831d28c --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadEventFullFunctionNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadEventFullFunctionNative(IntPtr pad, IntPtr parent, IntPtr evnt); + + internal class PadEventFullFunctionInvoker { + + PadEventFullFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadEventFullFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadEventFullFunctionInvoker (PadEventFullFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadEventFullFunctionInvoker (PadEventFullFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadEventFullFunctionInvoker (PadEventFullFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadEventFullFunction Handler { + get { + return new Gst.PadEventFullFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.Event evnt) + { + evnt.Owned = false; + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + } + + internal class PadEventFullFunctionWrapper { + + public int NativeCallback (IntPtr pad, IntPtr parent, IntPtr evnt) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadEventFullFunctionNative NativeDelegate; + Gst.PadEventFullFunction managed; + + public PadEventFullFunctionWrapper (Gst.PadEventFullFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadEventFullFunctionNative (NativeCallback); + } + + public static Gst.PadEventFullFunction GetManagedDelegate (PadEventFullFunctionNative native) + { + if (native == null) + return null; + PadEventFullFunctionWrapper wrapper = (PadEventFullFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadEventFunctionNative.cs b/sources/generated/Gst/GstSharp.PadEventFunctionNative.cs new file mode 100644 index 0000000000..23c7311a55 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadEventFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadEventFunctionNative(IntPtr pad, IntPtr parent, IntPtr evnt); + + internal class PadEventFunctionInvoker { + + PadEventFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadEventFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadEventFunctionInvoker (PadEventFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadEventFunctionInvoker (PadEventFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadEventFunctionInvoker (PadEventFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadEventFunction Handler { + get { + return new Gst.PadEventFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.Event evnt) + { + evnt.Owned = false; + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + return __result; + } + } + + internal class PadEventFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr parent, IntPtr evnt) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadEventFunctionNative NativeDelegate; + Gst.PadEventFunction managed; + + public PadEventFunctionWrapper (Gst.PadEventFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadEventFunctionNative (NativeCallback); + } + + public static Gst.PadEventFunction GetManagedDelegate (PadEventFunctionNative native) + { + if (native == null) + return null; + PadEventFunctionWrapper wrapper = (PadEventFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadForwardFunctionNative.cs b/sources/generated/Gst/GstSharp.PadForwardFunctionNative.cs new file mode 100644 index 0000000000..551368c791 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadForwardFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadForwardFunctionNative(IntPtr pad, IntPtr user_data); + + internal class PadForwardFunctionInvoker { + + PadForwardFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadForwardFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadForwardFunctionInvoker (PadForwardFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadForwardFunctionInvoker (PadForwardFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadForwardFunctionInvoker (PadForwardFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadForwardFunction Handler { + get { + return new Gst.PadForwardFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad) + { + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, __data); + return __result; + } + } + + internal class PadForwardFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadForwardFunctionNative NativeDelegate; + Gst.PadForwardFunction managed; + + public PadForwardFunctionWrapper (Gst.PadForwardFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadForwardFunctionNative (NativeCallback); + } + + public static Gst.PadForwardFunction GetManagedDelegate (PadForwardFunctionNative native) + { + if (native == null) + return null; + PadForwardFunctionWrapper wrapper = (PadForwardFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadGetRangeFunctionNative.cs b/sources/generated/Gst/GstSharp.PadGetRangeFunctionNative.cs new file mode 100644 index 0000000000..02947d1078 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadGetRangeFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadGetRangeFunctionNative(IntPtr pad, IntPtr parent, ulong offset, uint length, IntPtr buffer); + + internal class PadGetRangeFunctionInvoker { + + PadGetRangeFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadGetRangeFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadGetRangeFunctionInvoker (PadGetRangeFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadGetRangeFunctionInvoker (PadGetRangeFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadGetRangeFunctionInvoker (PadGetRangeFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadGetRangeFunction Handler { + get { + return new Gst.PadGetRangeFunction(InvokeNative); + } + } + + Gst.FlowReturn InvokeNative (Gst.Pad pad, Gst.Object parent, ulong offset, uint length, Gst.Buffer buffer) + { + Gst.FlowReturn __result = (Gst.FlowReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, offset, length, buffer == null ? IntPtr.Zero : buffer.Handle); + return __result; + } + } + + internal class PadGetRangeFunctionWrapper { + + public int NativeCallback (IntPtr pad, IntPtr parent, ulong offset, uint length, IntPtr buffer) + { + try { + Gst.FlowReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, offset, length, buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadGetRangeFunctionNative NativeDelegate; + Gst.PadGetRangeFunction managed; + + public PadGetRangeFunctionWrapper (Gst.PadGetRangeFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadGetRangeFunctionNative (NativeCallback); + } + + public static Gst.PadGetRangeFunction GetManagedDelegate (PadGetRangeFunctionNative native) + { + if (native == null) + return null; + PadGetRangeFunctionWrapper wrapper = (PadGetRangeFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadIterIntLinkFunctionNative.cs b/sources/generated/Gst/GstSharp.PadIterIntLinkFunctionNative.cs new file mode 100644 index 0000000000..ab28bdde6a --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadIterIntLinkFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr PadIterIntLinkFunctionNative(IntPtr pad, IntPtr parent); + + internal class PadIterIntLinkFunctionInvoker { + + PadIterIntLinkFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadIterIntLinkFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadIterIntLinkFunctionInvoker (PadIterIntLinkFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadIterIntLinkFunctionInvoker (PadIterIntLinkFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadIterIntLinkFunctionInvoker (PadIterIntLinkFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadIterIntLinkFunction Handler { + get { + return new Gst.PadIterIntLinkFunction(InvokeNative); + } + } + + Gst.Iterator InvokeNative (Gst.Pad pad, Gst.Object parent) + { + Gst.Iterator __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle) == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle), typeof (Gst.Iterator), true); + return __result; + } + } + + internal class PadIterIntLinkFunctionWrapper { + + public IntPtr NativeCallback (IntPtr pad, IntPtr parent) + { + try { + Gst.Iterator __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object); + if (release_on_call) + gch.Free (); + return __ret == null ? IntPtr.Zero : __ret.OwnedCopy; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadIterIntLinkFunctionNative NativeDelegate; + Gst.PadIterIntLinkFunction managed; + + public PadIterIntLinkFunctionWrapper (Gst.PadIterIntLinkFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadIterIntLinkFunctionNative (NativeCallback); + } + + public static Gst.PadIterIntLinkFunction GetManagedDelegate (PadIterIntLinkFunctionNative native) + { + if (native == null) + return null; + PadIterIntLinkFunctionWrapper wrapper = (PadIterIntLinkFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadLinkFunctionNative.cs b/sources/generated/Gst/GstSharp.PadLinkFunctionNative.cs new file mode 100644 index 0000000000..e86443b639 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadLinkFunctionNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadLinkFunctionNative(IntPtr pad, IntPtr parent, IntPtr peer); + + internal class PadLinkFunctionInvoker { + + PadLinkFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadLinkFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadLinkFunctionInvoker (PadLinkFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadLinkFunctionInvoker (PadLinkFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadLinkFunctionInvoker (PadLinkFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadLinkFunction Handler { + get { + return new Gst.PadLinkFunction(InvokeNative); + } + } + + Gst.PadLinkReturn InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.Pad peer) + { + Gst.PadLinkReturn __result = (Gst.PadLinkReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, peer == null ? IntPtr.Zero : peer.Handle); + return __result; + } + } + + internal class PadLinkFunctionWrapper { + + public int NativeCallback (IntPtr pad, IntPtr parent, IntPtr peer) + { + try { + Gst.PadLinkReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, GLib.Object.GetObject(peer) as Gst.Pad); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadLinkFunctionNative NativeDelegate; + Gst.PadLinkFunction managed; + + public PadLinkFunctionWrapper (Gst.PadLinkFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadLinkFunctionNative (NativeCallback); + } + + public static Gst.PadLinkFunction GetManagedDelegate (PadLinkFunctionNative native) + { + if (native == null) + return null; + PadLinkFunctionWrapper wrapper = (PadLinkFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadProbeCallbackNative.cs b/sources/generated/Gst/GstSharp.PadProbeCallbackNative.cs new file mode 100644 index 0000000000..a8216485a3 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadProbeCallbackNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int PadProbeCallbackNative(IntPtr pad, IntPtr info, IntPtr user_data); + + internal class PadProbeCallbackInvoker { + + PadProbeCallbackNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadProbeCallbackInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadProbeCallbackInvoker (PadProbeCallbackNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadProbeCallbackInvoker (PadProbeCallbackNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadProbeCallbackInvoker (PadProbeCallbackNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadProbeCallback Handler { + get { + return new Gst.PadProbeCallback(InvokeNative); + } + } + + Gst.PadProbeReturn InvokeNative (Gst.Pad pad, Gst.PadProbeInfo info) + { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + Gst.PadProbeReturn __result = (Gst.PadProbeReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, native_info, __data); + Marshal.FreeHGlobal (native_info); + return __result; + } + } + + internal class PadProbeCallbackWrapper { + + public int NativeCallback (IntPtr pad, IntPtr info, IntPtr user_data) + { + try { + Gst.PadProbeReturn __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, Gst.PadProbeInfo.New (info)); + if (release_on_call) + gch.Free (); + return (int) __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadProbeCallbackNative NativeDelegate; + Gst.PadProbeCallback managed; + + public PadProbeCallbackWrapper (Gst.PadProbeCallback managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadProbeCallbackNative (NativeCallback); + } + + public static Gst.PadProbeCallback GetManagedDelegate (PadProbeCallbackNative native) + { + if (native == null) + return null; + PadProbeCallbackWrapper wrapper = (PadProbeCallbackWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadQueryFunctionNative.cs b/sources/generated/Gst/GstSharp.PadQueryFunctionNative.cs new file mode 100644 index 0000000000..25662e35c8 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadQueryFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadQueryFunctionNative(IntPtr pad, IntPtr parent, IntPtr query); + + internal class PadQueryFunctionInvoker { + + PadQueryFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadQueryFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadQueryFunctionInvoker (PadQueryFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadQueryFunctionInvoker (PadQueryFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadQueryFunctionInvoker (PadQueryFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadQueryFunction Handler { + get { + return new Gst.PadQueryFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad, Gst.Object parent, Gst.Query query) + { + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, query == null ? IntPtr.Zero : query.Handle); + return __result; + } + } + + internal class PadQueryFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr parent, IntPtr query) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadQueryFunctionNative NativeDelegate; + Gst.PadQueryFunction managed; + + public PadQueryFunctionWrapper (Gst.PadQueryFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadQueryFunctionNative (NativeCallback); + } + + public static Gst.PadQueryFunction GetManagedDelegate (PadQueryFunctionNative native) + { + if (native == null) + return null; + PadQueryFunctionWrapper wrapper = (PadQueryFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadStickyEventsForeachFunctionNative.cs b/sources/generated/Gst/GstSharp.PadStickyEventsForeachFunctionNative.cs new file mode 100644 index 0000000000..58787feb6d --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadStickyEventsForeachFunctionNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PadStickyEventsForeachFunctionNative(IntPtr pad, IntPtr evnt, IntPtr user_data); + + internal class PadStickyEventsForeachFunctionInvoker { + + PadStickyEventsForeachFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadStickyEventsForeachFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadStickyEventsForeachFunctionInvoker (PadStickyEventsForeachFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadStickyEventsForeachFunctionInvoker (PadStickyEventsForeachFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadStickyEventsForeachFunctionInvoker (PadStickyEventsForeachFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadStickyEventsForeachFunction Handler { + get { + return new Gst.PadStickyEventsForeachFunction(InvokeNative); + } + } + + bool InvokeNative (Gst.Pad pad, Gst.Event evnt) + { + bool __result = native_cb (pad == null ? IntPtr.Zero : pad.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, __data); + return __result; + } + } + + internal class PadStickyEventsForeachFunctionWrapper { + + public bool NativeCallback (IntPtr pad, IntPtr evnt, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(pad) as Gst.Pad, evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadStickyEventsForeachFunctionNative NativeDelegate; + Gst.PadStickyEventsForeachFunction managed; + + public PadStickyEventsForeachFunctionWrapper (Gst.PadStickyEventsForeachFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadStickyEventsForeachFunctionNative (NativeCallback); + } + + public static Gst.PadStickyEventsForeachFunction GetManagedDelegate (PadStickyEventsForeachFunctionNative native) + { + if (native == null) + return null; + PadStickyEventsForeachFunctionWrapper wrapper = (PadStickyEventsForeachFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PadUnlinkFunctionNative.cs b/sources/generated/Gst/GstSharp.PadUnlinkFunctionNative.cs new file mode 100644 index 0000000000..65cd0e692d --- /dev/null +++ b/sources/generated/Gst/GstSharp.PadUnlinkFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void PadUnlinkFunctionNative(IntPtr pad, IntPtr parent); + + internal class PadUnlinkFunctionInvoker { + + PadUnlinkFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PadUnlinkFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PadUnlinkFunctionInvoker (PadUnlinkFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PadUnlinkFunctionInvoker (PadUnlinkFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PadUnlinkFunctionInvoker (PadUnlinkFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PadUnlinkFunction Handler { + get { + return new Gst.PadUnlinkFunction(InvokeNative); + } + } + + void InvokeNative (Gst.Pad pad, Gst.Object parent) + { + native_cb (pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle); + } + } + + internal class PadUnlinkFunctionWrapper { + + public void NativeCallback (IntPtr pad, IntPtr parent) + { + try { + managed (GLib.Object.GetObject(pad) as Gst.Pad, GLib.Object.GetObject(parent) as Gst.Object); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PadUnlinkFunctionNative NativeDelegate; + Gst.PadUnlinkFunction managed; + + public PadUnlinkFunctionWrapper (Gst.PadUnlinkFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PadUnlinkFunctionNative (NativeCallback); + } + + public static Gst.PadUnlinkFunction GetManagedDelegate (PadUnlinkFunctionNative native) + { + if (native == null) + return null; + PadUnlinkFunctionWrapper wrapper = (PadUnlinkFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PluginFeatureFilterNative.cs b/sources/generated/Gst/GstSharp.PluginFeatureFilterNative.cs new file mode 100644 index 0000000000..d1eade04f6 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PluginFeatureFilterNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PluginFeatureFilterNative(IntPtr feature, IntPtr user_data); + + internal class PluginFeatureFilterInvoker { + + PluginFeatureFilterNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PluginFeatureFilterInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PluginFeatureFilterInvoker (PluginFeatureFilterNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PluginFeatureFilterInvoker (PluginFeatureFilterNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PluginFeatureFilterInvoker (PluginFeatureFilterNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PluginFeatureFilter Handler { + get { + return new Gst.PluginFeatureFilter(InvokeNative); + } + } + + bool InvokeNative (Gst.PluginFeature feature) + { + bool __result = native_cb (feature == null ? IntPtr.Zero : feature.Handle, __data); + return __result; + } + } + + internal class PluginFeatureFilterWrapper { + + public bool NativeCallback (IntPtr feature, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(feature) as Gst.PluginFeature); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PluginFeatureFilterNative NativeDelegate; + Gst.PluginFeatureFilter managed; + + public PluginFeatureFilterWrapper (Gst.PluginFeatureFilter managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PluginFeatureFilterNative (NativeCallback); + } + + public static Gst.PluginFeatureFilter GetManagedDelegate (PluginFeatureFilterNative native) + { + if (native == null) + return null; + PluginFeatureFilterWrapper wrapper = (PluginFeatureFilterWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PluginFilterNative.cs b/sources/generated/Gst/GstSharp.PluginFilterNative.cs new file mode 100644 index 0000000000..6c24d2ae96 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PluginFilterNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PluginFilterNative(IntPtr plugin, IntPtr user_data); + + internal class PluginFilterInvoker { + + PluginFilterNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PluginFilterInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PluginFilterInvoker (PluginFilterNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PluginFilterInvoker (PluginFilterNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PluginFilterInvoker (PluginFilterNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PluginFilter Handler { + get { + return new Gst.PluginFilter(InvokeNative); + } + } + + bool InvokeNative (Gst.Plugin plugin) + { + bool __result = native_cb (plugin == null ? IntPtr.Zero : plugin.Handle, __data); + return __result; + } + } + + internal class PluginFilterWrapper { + + public bool NativeCallback (IntPtr plugin, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(plugin) as Gst.Plugin); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PluginFilterNative NativeDelegate; + Gst.PluginFilter managed; + + public PluginFilterWrapper (Gst.PluginFilter managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PluginFilterNative (NativeCallback); + } + + public static Gst.PluginFilter GetManagedDelegate (PluginFilterNative native) + { + if (native == null) + return null; + PluginFilterWrapper wrapper = (PluginFilterWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PluginInitFullFuncNative.cs b/sources/generated/Gst/GstSharp.PluginInitFullFuncNative.cs new file mode 100644 index 0000000000..82127ab712 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PluginInitFullFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PluginInitFullFuncNative(IntPtr plugin, IntPtr user_data); + + internal class PluginInitFullFuncInvoker { + + PluginInitFullFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PluginInitFullFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PluginInitFullFuncInvoker (PluginInitFullFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PluginInitFullFuncInvoker (PluginInitFullFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PluginInitFullFuncInvoker (PluginInitFullFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PluginInitFullFunc Handler { + get { + return new Gst.PluginInitFullFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.Plugin plugin) + { + bool __result = native_cb (plugin == null ? IntPtr.Zero : plugin.Handle, __data); + return __result; + } + } + + internal class PluginInitFullFuncWrapper { + + public bool NativeCallback (IntPtr plugin, IntPtr user_data) + { + try { + bool __ret = managed (GLib.Object.GetObject(plugin) as Gst.Plugin); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PluginInitFullFuncNative NativeDelegate; + Gst.PluginInitFullFunc managed; + + public PluginInitFullFuncWrapper (Gst.PluginInitFullFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PluginInitFullFuncNative (NativeCallback); + } + + public static Gst.PluginInitFullFunc GetManagedDelegate (PluginInitFullFuncNative native) + { + if (native == null) + return null; + PluginInitFullFuncWrapper wrapper = (PluginInitFullFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PluginInitFuncNative.cs b/sources/generated/Gst/GstSharp.PluginInitFuncNative.cs new file mode 100644 index 0000000000..d0cf2d07c0 --- /dev/null +++ b/sources/generated/Gst/GstSharp.PluginInitFuncNative.cs @@ -0,0 +1,95 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool PluginInitFuncNative(IntPtr plugin); + + internal class PluginInitFuncInvoker { + + PluginInitFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PluginInitFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PluginInitFuncInvoker (PluginInitFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PluginInitFuncInvoker (PluginInitFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PluginInitFuncInvoker (PluginInitFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PluginInitFunc Handler { + get { + return new Gst.PluginInitFunc(InvokeNative); + } + } + + bool InvokeNative (Gst.Plugin plugin) + { + bool __result = native_cb (plugin == null ? IntPtr.Zero : plugin.Handle); + return __result; + } + } + + internal class PluginInitFuncWrapper { + + public bool NativeCallback (IntPtr plugin) + { + try { + bool __ret = managed (GLib.Object.GetObject(plugin) as Gst.Plugin); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PluginInitFuncNative NativeDelegate; + Gst.PluginInitFunc managed; + + public PluginInitFuncWrapper (Gst.PluginInitFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PluginInitFuncNative (NativeCallback); + } + + public static Gst.PluginInitFunc GetManagedDelegate (PluginInitFuncNative native) + { + if (native == null) + return null; + PluginInitFuncWrapper wrapper = (PluginInitFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.PromiseChangeFuncNative.cs b/sources/generated/Gst/GstSharp.PromiseChangeFuncNative.cs new file mode 100644 index 0000000000..c40cb9190f --- /dev/null +++ b/sources/generated/Gst/GstSharp.PromiseChangeFuncNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void PromiseChangeFuncNative(IntPtr promise, IntPtr user_data); + + internal class PromiseChangeFuncInvoker { + + PromiseChangeFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~PromiseChangeFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal PromiseChangeFuncInvoker (PromiseChangeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal PromiseChangeFuncInvoker (PromiseChangeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal PromiseChangeFuncInvoker (PromiseChangeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.PromiseChangeFunc Handler { + get { + return new Gst.PromiseChangeFunc(InvokeNative); + } + } + + void InvokeNative (Gst.Promise promise) + { + native_cb (promise == null ? IntPtr.Zero : promise.Handle, __data); + } + } + + internal class PromiseChangeFuncWrapper { + + public void NativeCallback (IntPtr promise, IntPtr user_data) + { + try { + managed (promise == IntPtr.Zero ? null : (Gst.Promise) GLib.Opaque.GetOpaque (promise, typeof (Gst.Promise), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal PromiseChangeFuncNative NativeDelegate; + Gst.PromiseChangeFunc managed; + + public PromiseChangeFuncWrapper (Gst.PromiseChangeFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new PromiseChangeFuncNative (NativeCallback); + } + + public static Gst.PromiseChangeFunc GetManagedDelegate (PromiseChangeFuncNative native) + { + if (native == null) + return null; + PromiseChangeFuncWrapper wrapper = (PromiseChangeFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.StructureFilterMapFuncNative.cs b/sources/generated/Gst/GstSharp.StructureFilterMapFuncNative.cs new file mode 100644 index 0000000000..d830447328 --- /dev/null +++ b/sources/generated/Gst/GstSharp.StructureFilterMapFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool StructureFilterMapFuncNative(uint field_id, IntPtr value, IntPtr user_data); + + internal class StructureFilterMapFuncInvoker { + + StructureFilterMapFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~StructureFilterMapFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal StructureFilterMapFuncInvoker (StructureFilterMapFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal StructureFilterMapFuncInvoker (StructureFilterMapFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal StructureFilterMapFuncInvoker (StructureFilterMapFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.StructureFilterMapFunc Handler { + get { + return new Gst.StructureFilterMapFunc(InvokeNative); + } + } + + bool InvokeNative (uint field_id, GLib.Value value) + { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool __result = native_cb (field_id, native_value, __data); + Marshal.FreeHGlobal (native_value); + return __result; + } + } + + internal class StructureFilterMapFuncWrapper { + + public bool NativeCallback (uint field_id, IntPtr value, IntPtr user_data) + { + try { + bool __ret = managed (field_id, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal StructureFilterMapFuncNative NativeDelegate; + Gst.StructureFilterMapFunc managed; + + public StructureFilterMapFuncWrapper (Gst.StructureFilterMapFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new StructureFilterMapFuncNative (NativeCallback); + } + + public static Gst.StructureFilterMapFunc GetManagedDelegate (StructureFilterMapFuncNative native) + { + if (native == null) + return null; + StructureFilterMapFuncWrapper wrapper = (StructureFilterMapFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.StructureForeachFuncNative.cs b/sources/generated/Gst/GstSharp.StructureForeachFuncNative.cs new file mode 100644 index 0000000000..174226ccac --- /dev/null +++ b/sources/generated/Gst/GstSharp.StructureForeachFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool StructureForeachFuncNative(uint field_id, IntPtr value, IntPtr user_data); + + internal class StructureForeachFuncInvoker { + + StructureForeachFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~StructureForeachFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal StructureForeachFuncInvoker (StructureForeachFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal StructureForeachFuncInvoker (StructureForeachFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal StructureForeachFuncInvoker (StructureForeachFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.StructureForeachFunc Handler { + get { + return new Gst.StructureForeachFunc(InvokeNative); + } + } + + bool InvokeNative (uint field_id, GLib.Value value) + { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool __result = native_cb (field_id, native_value, __data); + Marshal.FreeHGlobal (native_value); + return __result; + } + } + + internal class StructureForeachFuncWrapper { + + public bool NativeCallback (uint field_id, IntPtr value, IntPtr user_data) + { + try { + bool __ret = managed (field_id, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal StructureForeachFuncNative NativeDelegate; + Gst.StructureForeachFunc managed; + + public StructureForeachFuncWrapper (Gst.StructureForeachFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new StructureForeachFuncNative (NativeCallback); + } + + public static Gst.StructureForeachFunc GetManagedDelegate (StructureForeachFuncNative native) + { + if (native == null) + return null; + StructureForeachFuncWrapper wrapper = (StructureForeachFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.StructureMapFuncNative.cs b/sources/generated/Gst/GstSharp.StructureMapFuncNative.cs new file mode 100644 index 0000000000..d5fd871561 --- /dev/null +++ b/sources/generated/Gst/GstSharp.StructureMapFuncNative.cs @@ -0,0 +1,97 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool StructureMapFuncNative(uint field_id, IntPtr value, IntPtr user_data); + + internal class StructureMapFuncInvoker { + + StructureMapFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~StructureMapFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal StructureMapFuncInvoker (StructureMapFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal StructureMapFuncInvoker (StructureMapFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal StructureMapFuncInvoker (StructureMapFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.StructureMapFunc Handler { + get { + return new Gst.StructureMapFunc(InvokeNative); + } + } + + bool InvokeNative (uint field_id, GLib.Value value) + { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool __result = native_cb (field_id, native_value, __data); + Marshal.FreeHGlobal (native_value); + return __result; + } + } + + internal class StructureMapFuncWrapper { + + public bool NativeCallback (uint field_id, IntPtr value, IntPtr user_data) + { + try { + bool __ret = managed (field_id, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal StructureMapFuncNative NativeDelegate; + Gst.StructureMapFunc managed; + + public StructureMapFuncWrapper (Gst.StructureMapFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new StructureMapFuncNative (NativeCallback); + } + + public static Gst.StructureMapFunc GetManagedDelegate (StructureMapFuncNative native) + { + if (native == null) + return null; + StructureMapFuncWrapper wrapper = (StructureMapFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TagForeachFuncNative.cs b/sources/generated/Gst/GstSharp.TagForeachFuncNative.cs new file mode 100644 index 0000000000..779ff9b9a9 --- /dev/null +++ b/sources/generated/Gst/GstSharp.TagForeachFuncNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TagForeachFuncNative(IntPtr list, IntPtr tag, IntPtr user_data); + + internal class TagForeachFuncInvoker { + + TagForeachFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TagForeachFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TagForeachFuncInvoker (TagForeachFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TagForeachFuncInvoker (TagForeachFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TagForeachFuncInvoker (TagForeachFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TagForeachFunc Handler { + get { + return new Gst.TagForeachFunc(InvokeNative); + } + } + + void InvokeNative (Gst.TagList list, string tag) + { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + native_cb (list == null ? IntPtr.Zero : list.Handle, native_tag, __data); + GLib.Marshaller.Free (native_tag); + } + } + + internal class TagForeachFuncWrapper { + + public void NativeCallback (IntPtr list, IntPtr tag, IntPtr user_data) + { + try { + managed (list == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (list, typeof (Gst.TagList), false), GLib.Marshaller.Utf8PtrToString (tag)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TagForeachFuncNative NativeDelegate; + Gst.TagForeachFunc managed; + + public TagForeachFuncWrapper (Gst.TagForeachFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TagForeachFuncNative (NativeCallback); + } + + public static Gst.TagForeachFunc GetManagedDelegate (TagForeachFuncNative native) + { + if (native == null) + return null; + TagForeachFuncWrapper wrapper = (TagForeachFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TagMergeFuncNative.cs b/sources/generated/Gst/GstSharp.TagMergeFuncNative.cs new file mode 100644 index 0000000000..354f2f320d --- /dev/null +++ b/sources/generated/Gst/GstSharp.TagMergeFuncNative.cs @@ -0,0 +1,96 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TagMergeFuncNative(IntPtr dest, IntPtr src); + + internal class TagMergeFuncInvoker { + + TagMergeFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TagMergeFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TagMergeFuncInvoker (TagMergeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TagMergeFuncInvoker (TagMergeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TagMergeFuncInvoker (TagMergeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TagMergeFunc Handler { + get { + return new Gst.TagMergeFunc(InvokeNative); + } + } + + void InvokeNative (GLib.Value dest, GLib.Value src) + { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + native_cb (native_dest, native_src); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + } + } + + internal class TagMergeFuncWrapper { + + public void NativeCallback (IntPtr dest, IntPtr src) + { + try { + managed ((GLib.Value) Marshal.PtrToStructure (dest, typeof (GLib.Value)), (GLib.Value) Marshal.PtrToStructure (src, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TagMergeFuncNative NativeDelegate; + Gst.TagMergeFunc managed; + + public TagMergeFuncWrapper (Gst.TagMergeFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TagMergeFuncNative (NativeCallback); + } + + public static Gst.TagMergeFunc GetManagedDelegate (TagMergeFuncNative native) + { + if (native == null) + return null; + TagMergeFuncWrapper wrapper = (TagMergeFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TaskFunctionNative.cs b/sources/generated/Gst/GstSharp.TaskFunctionNative.cs new file mode 100644 index 0000000000..cebda742f8 --- /dev/null +++ b/sources/generated/Gst/GstSharp.TaskFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TaskFunctionNative(IntPtr user_data); + + internal class TaskFunctionInvoker { + + TaskFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TaskFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TaskFunctionInvoker (TaskFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TaskFunctionInvoker (TaskFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TaskFunctionInvoker (TaskFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TaskFunction Handler { + get { + return new Gst.TaskFunction(InvokeNative); + } + } + + void InvokeNative () + { + native_cb (__data); + } + } + + internal class TaskFunctionWrapper { + + public void NativeCallback (IntPtr user_data) + { + try { + managed (); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TaskFunctionNative NativeDelegate; + Gst.TaskFunction managed; + + public TaskFunctionWrapper (Gst.TaskFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TaskFunctionNative (NativeCallback); + } + + public static Gst.TaskFunction GetManagedDelegate (TaskFunctionNative native) + { + if (native == null) + return null; + TaskFunctionWrapper wrapper = (TaskFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TaskPoolFunctionNative.cs b/sources/generated/Gst/GstSharp.TaskPoolFunctionNative.cs new file mode 100644 index 0000000000..501ab6e669 --- /dev/null +++ b/sources/generated/Gst/GstSharp.TaskPoolFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TaskPoolFunctionNative(IntPtr user_data); + + internal class TaskPoolFunctionInvoker { + + TaskPoolFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TaskPoolFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TaskPoolFunctionInvoker (TaskPoolFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TaskPoolFunctionInvoker (TaskPoolFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TaskPoolFunctionInvoker (TaskPoolFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TaskPoolFunction Handler { + get { + return new Gst.TaskPoolFunction(InvokeNative); + } + } + + void InvokeNative () + { + native_cb (__data); + } + } + + internal class TaskPoolFunctionWrapper { + + public void NativeCallback (IntPtr user_data) + { + try { + managed (); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TaskPoolFunctionNative NativeDelegate; + Gst.TaskPoolFunction managed; + + public TaskPoolFunctionWrapper (Gst.TaskPoolFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TaskPoolFunctionNative (NativeCallback); + } + + public static Gst.TaskPoolFunction GetManagedDelegate (TaskPoolFunctionNative native) + { + if (native == null) + return null; + TaskPoolFunctionWrapper wrapper = (TaskPoolFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TaskThreadFuncNative.cs b/sources/generated/Gst/GstSharp.TaskThreadFuncNative.cs new file mode 100644 index 0000000000..64da068428 --- /dev/null +++ b/sources/generated/Gst/GstSharp.TaskThreadFuncNative.cs @@ -0,0 +1,94 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TaskThreadFuncNative(IntPtr task, out GLib.Thread thread, IntPtr user_data); + + internal class TaskThreadFuncInvoker { + + TaskThreadFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TaskThreadFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TaskThreadFuncInvoker (TaskThreadFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TaskThreadFuncInvoker (TaskThreadFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TaskThreadFuncInvoker (TaskThreadFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TaskThreadFunc Handler { + get { + return new Gst.TaskThreadFunc(InvokeNative); + } + } + + void InvokeNative (Gst.Task task, out GLib.Thread thread) + { + native_cb (task == null ? IntPtr.Zero : task.Handle, out thread, __data); + } + } + + internal class TaskThreadFuncWrapper { + + public void NativeCallback (IntPtr task, out GLib.Thread thread, IntPtr user_data) + { + try { + managed (GLib.Object.GetObject(task) as Gst.Task, out thread); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TaskThreadFuncNative NativeDelegate; + Gst.TaskThreadFunc managed; + + public TaskThreadFuncWrapper (Gst.TaskThreadFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TaskThreadFuncNative (NativeCallback); + } + + public static Gst.TaskThreadFunc GetManagedDelegate (TaskThreadFuncNative native) + { + if (native == null) + return null; + TaskThreadFuncWrapper wrapper = (TaskThreadFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.TypeFindFunctionNative.cs b/sources/generated/Gst/GstSharp.TypeFindFunctionNative.cs new file mode 100644 index 0000000000..c3551e58d4 --- /dev/null +++ b/sources/generated/Gst/GstSharp.TypeFindFunctionNative.cs @@ -0,0 +1,92 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate void TypeFindFunctionNative(IntPtr find, IntPtr user_data); + + internal class TypeFindFunctionInvoker { + + TypeFindFunctionNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~TypeFindFunctionInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal TypeFindFunctionInvoker (TypeFindFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal TypeFindFunctionInvoker (TypeFindFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal TypeFindFunctionInvoker (TypeFindFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.TypeFindFunction Handler { + get { + return new Gst.TypeFindFunction(InvokeNative); + } + } + + void InvokeNative (Gst.TypeFind find) + { + native_cb (find == null ? IntPtr.Zero : find.Handle, __data); + } + } + + internal class TypeFindFunctionWrapper { + + public void NativeCallback (IntPtr find, IntPtr user_data) + { + try { + managed (find == IntPtr.Zero ? null : (Gst.TypeFind) GLib.Opaque.GetOpaque (find, typeof (Gst.TypeFind), false)); + if (release_on_call) + gch.Free (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal TypeFindFunctionNative NativeDelegate; + Gst.TypeFindFunction managed; + + public TypeFindFunctionWrapper (Gst.TypeFindFunction managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new TypeFindFunctionNative (NativeCallback); + } + + public static Gst.TypeFindFunction GetManagedDelegate (TypeFindFunctionNative native) + { + if (native == null) + return null; + TypeFindFunctionWrapper wrapper = (TypeFindFunctionWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ValueCompareFuncNative.cs b/sources/generated/Gst/GstSharp.ValueCompareFuncNative.cs new file mode 100644 index 0000000000..4ec466adc5 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ValueCompareFuncNative.cs @@ -0,0 +1,100 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate int ValueCompareFuncNative(IntPtr value1, IntPtr value2); + + internal class ValueCompareFuncInvoker { + + ValueCompareFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ValueCompareFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ValueCompareFuncInvoker (ValueCompareFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ValueCompareFuncInvoker (ValueCompareFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ValueCompareFuncInvoker (ValueCompareFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ValueCompareFunc Handler { + get { + return new Gst.ValueCompareFunc(InvokeNative); + } + } + + int InvokeNative (GLib.Value value1, GLib.Value value2) + { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + int __result = native_cb (native_value1, native_value2); + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return __result; + } + } + + internal class ValueCompareFuncWrapper { + + public int NativeCallback (IntPtr value1, IntPtr value2) + { + try { + int __ret = managed ((GLib.Value) Marshal.PtrToStructure (value1, typeof (GLib.Value)), (GLib.Value) Marshal.PtrToStructure (value2, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ValueCompareFuncNative NativeDelegate; + Gst.ValueCompareFunc managed; + + public ValueCompareFuncWrapper (Gst.ValueCompareFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ValueCompareFuncNative (NativeCallback); + } + + public static Gst.ValueCompareFunc GetManagedDelegate (ValueCompareFuncNative native) + { + if (native == null) + return null; + ValueCompareFuncWrapper wrapper = (ValueCompareFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ValueDeserializeFuncNative.cs b/sources/generated/Gst/GstSharp.ValueDeserializeFuncNative.cs new file mode 100644 index 0000000000..323e5d35c0 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ValueDeserializeFuncNative.cs @@ -0,0 +1,99 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ValueDeserializeFuncNative(IntPtr dest, IntPtr s); + + internal class ValueDeserializeFuncInvoker { + + ValueDeserializeFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ValueDeserializeFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ValueDeserializeFuncInvoker (ValueDeserializeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ValueDeserializeFuncInvoker (ValueDeserializeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ValueDeserializeFuncInvoker (ValueDeserializeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ValueDeserializeFunc Handler { + get { + return new Gst.ValueDeserializeFunc(InvokeNative); + } + } + + bool InvokeNative (GLib.Value dest, string s) + { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); + bool __result = native_cb (native_dest, native_s); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_s); + return __result; + } + } + + internal class ValueDeserializeFuncWrapper { + + public bool NativeCallback (IntPtr dest, IntPtr s) + { + try { + bool __ret = managed ((GLib.Value) Marshal.PtrToStructure (dest, typeof (GLib.Value)), GLib.Marshaller.Utf8PtrToString (s)); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ValueDeserializeFuncNative NativeDelegate; + Gst.ValueDeserializeFunc managed; + + public ValueDeserializeFuncWrapper (Gst.ValueDeserializeFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ValueDeserializeFuncNative (NativeCallback); + } + + public static Gst.ValueDeserializeFunc GetManagedDelegate (ValueDeserializeFuncNative native) + { + if (native == null) + return null; + ValueDeserializeFuncWrapper wrapper = (ValueDeserializeFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ValueDeserializeWithPSpecFuncNative.cs b/sources/generated/Gst/GstSharp.ValueDeserializeWithPSpecFuncNative.cs new file mode 100644 index 0000000000..d3c88dae9f --- /dev/null +++ b/sources/generated/Gst/GstSharp.ValueDeserializeWithPSpecFuncNative.cs @@ -0,0 +1,99 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate bool ValueDeserializeWithPSpecFuncNative(IntPtr dest, IntPtr s, IntPtr pspec); + + internal class ValueDeserializeWithPSpecFuncInvoker { + + ValueDeserializeWithPSpecFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ValueDeserializeWithPSpecFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ValueDeserializeWithPSpecFuncInvoker (ValueDeserializeWithPSpecFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ValueDeserializeWithPSpecFuncInvoker (ValueDeserializeWithPSpecFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ValueDeserializeWithPSpecFuncInvoker (ValueDeserializeWithPSpecFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ValueDeserializeWithPSpecFunc Handler { + get { + return new Gst.ValueDeserializeWithPSpecFunc(InvokeNative); + } + } + + bool InvokeNative (GLib.Value dest, string s, IntPtr pspec) + { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); + bool __result = native_cb (native_dest, native_s, pspec); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_s); + return __result; + } + } + + internal class ValueDeserializeWithPSpecFuncWrapper { + + public bool NativeCallback (IntPtr dest, IntPtr s, IntPtr pspec) + { + try { + bool __ret = managed ((GLib.Value) Marshal.PtrToStructure (dest, typeof (GLib.Value)), GLib.Marshaller.Utf8PtrToString (s), pspec); + if (release_on_call) + gch.Free (); + return __ret; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + return false; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ValueDeserializeWithPSpecFuncNative NativeDelegate; + Gst.ValueDeserializeWithPSpecFunc managed; + + public ValueDeserializeWithPSpecFuncWrapper (Gst.ValueDeserializeWithPSpecFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ValueDeserializeWithPSpecFuncNative (NativeCallback); + } + + public static Gst.ValueDeserializeWithPSpecFunc GetManagedDelegate (ValueDeserializeWithPSpecFuncNative native) + { + if (native == null) + return null; + ValueDeserializeWithPSpecFuncWrapper wrapper = (ValueDeserializeWithPSpecFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/GstSharp.ValueSerializeFuncNative.cs b/sources/generated/Gst/GstSharp.ValueSerializeFuncNative.cs new file mode 100644 index 0000000000..8972911c27 --- /dev/null +++ b/sources/generated/Gst/GstSharp.ValueSerializeFuncNative.cs @@ -0,0 +1,98 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GstSharp { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + internal delegate IntPtr ValueSerializeFuncNative(IntPtr value1); + + internal class ValueSerializeFuncInvoker { + + ValueSerializeFuncNative native_cb; + IntPtr __data; + GLib.DestroyNotify __notify; + + ~ValueSerializeFuncInvoker () + { + if (__notify == null) + return; + __notify (__data); + } + + internal ValueSerializeFuncInvoker (ValueSerializeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {} + + internal ValueSerializeFuncInvoker (ValueSerializeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {} + + internal ValueSerializeFuncInvoker (ValueSerializeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify) + { + this.native_cb = native_cb; + __data = data; + __notify = notify; + } + + internal Gst.ValueSerializeFunc Handler { + get { + return new Gst.ValueSerializeFunc(InvokeNative); + } + } + + string InvokeNative (GLib.Value value1) + { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + string __result = GLib.Marshaller.PtrToStringGFree(native_cb (native_value1)); + Marshal.FreeHGlobal (native_value1); + return __result; + } + } + + internal class ValueSerializeFuncWrapper { + + public IntPtr NativeCallback (IntPtr value1) + { + try { + string __ret = managed ((GLib.Value) Marshal.PtrToStructure (value1, typeof (GLib.Value))); + if (release_on_call) + gch.Free (); + return GLib.Marshaller.StringToPtrGStrdup(__ret); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: Above call does not return. + throw e; + } + } + + bool release_on_call = false; + GCHandle gch; + + public void PersistUntilCalled () + { + release_on_call = true; + gch = GCHandle.Alloc (this); + } + + internal ValueSerializeFuncNative NativeDelegate; + Gst.ValueSerializeFunc managed; + + public ValueSerializeFuncWrapper (Gst.ValueSerializeFunc managed) + { + this.managed = managed; + if (managed != null) + NativeDelegate = new ValueSerializeFuncNative (NativeCallback); + } + + public static Gst.ValueSerializeFunc GetManagedDelegate (ValueSerializeFuncNative native) + { + if (native == null) + return null; + ValueSerializeFuncWrapper wrapper = (ValueSerializeFuncWrapper) native.Target; + if (wrapper == null) + return null; + return wrapper.managed; + } + } +#endregion +} diff --git a/sources/generated/Gst/IChildProxy.cs b/sources/generated/Gst/IChildProxy.cs new file mode 100644 index 0000000000..8068b21e71 --- /dev/null +++ b/sources/generated/Gst/IChildProxy.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + +#region Autogenerated code + public partial interface IChildProxy : GLib.IWrapper { + + event Gst.ChildRemovedEventHandler ChildRemovedEvent; + event Gst.ChildAddedEventHandler ChildAddedEvent; + void ChildAdded(GLib.Object child, string name); + void ChildRemoved(GLib.Object child, string name); + GLib.Object GetChildByIndex(uint index); + GLib.Object GetChildByName(string name); + uint ChildrenCount { + get; + } + bool Lookup(string name, out GLib.Object target, out IntPtr pspec); + } + + [GLib.GInterface (typeof (ChildProxyAdapter))] + public partial interface IChildProxyImplementor : GLib.IWrapper { + + GLib.Object GetChildByName (string name); + GLib.Object GetChildByIndex (uint index); + uint ChildrenCount { get; } + } +#endregion +} diff --git a/sources/generated/Gst/IPreset.cs b/sources/generated/Gst/IPreset.cs new file mode 100644 index 0000000000..07aed46cdb --- /dev/null +++ b/sources/generated/Gst/IPreset.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + +#region Autogenerated code + public partial interface IPreset : GLib.IWrapper { + + bool DeletePreset(string name); + bool GetMeta(string name, string tag, out string value); + string[] PresetNames { + get; + } + string[] PropertyNames { + get; + } + bool IsEditable { + get; + } + bool LoadPreset(string name); + bool RenamePreset(string old_name, string new_name); + bool SavePreset(string name); + bool SetMeta(string name, string tag, string value); + } + + [GLib.GInterface (typeof (PresetAdapter))] + public partial interface IPresetImplementor : GLib.IWrapper { + + string[] PresetNames { get; } + string[] PropertyNames { get; } + bool LoadPreset (string name); + bool SavePreset (string name); + bool RenamePreset (string old_name, string new_name); + bool DeletePreset (string name); + bool SetMeta (string name, string tag, string value); + bool GetMeta (string name, string tag, out string value); + } +#endregion +} diff --git a/sources/generated/Gst/ITagSetter.cs b/sources/generated/Gst/ITagSetter.cs new file mode 100644 index 0000000000..bfbbf99c9a --- /dev/null +++ b/sources/generated/Gst/ITagSetter.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + +#region Autogenerated code + public partial interface ITagSetter : GLib.IWrapper { + + void AddTagValue(Gst.TagMergeMode mode, string tag, GLib.Value value); + Gst.TagList TagList { + get; + } + Gst.TagMergeMode TagMergeMode { + get; set; + } + void MergeTags(Gst.TagList list, Gst.TagMergeMode mode); + void ResetTags(); + } + + [GLib.GInterface (typeof (TagSetterAdapter))] + public partial interface ITagSetterImplementor : GLib.IWrapper { + + } +#endregion +} diff --git a/sources/generated/Gst/ITocSetter.cs b/sources/generated/Gst/ITocSetter.cs new file mode 100644 index 0000000000..d700b4fe14 --- /dev/null +++ b/sources/generated/Gst/ITocSetter.cs @@ -0,0 +1,22 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + +#region Autogenerated code + public partial interface ITocSetter : GLib.IWrapper { + + Gst.Toc Toc { + get; set; + } + void Reset(); + } + + [GLib.GInterface (typeof (TocSetterAdapter))] + public partial interface ITocSetterImplementor : GLib.IWrapper { + + } +#endregion +} diff --git a/sources/generated/Gst/IURIHandler.cs b/sources/generated/Gst/IURIHandler.cs new file mode 100644 index 0000000000..d1270ee4a9 --- /dev/null +++ b/sources/generated/Gst/IURIHandler.cs @@ -0,0 +1,27 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + +#region Autogenerated code + public partial interface IURIHandler : GLib.IWrapper { + + string Uri { + get; + } + Gst.URIType UriType { + get; + } + bool SetUri(string uri); + } + + [GLib.GInterface (typeof (URIHandlerAdapter))] + public partial interface IURIHandlerImplementor : GLib.IWrapper { + + string Uri { get; } + bool SetUri (string uri); + } +#endregion +} diff --git a/sources/generated/Gst/Int64Range.cs b/sources/generated/Gst/Int64Range.cs new file mode 100644 index 0000000000..043bf23b6a --- /dev/null +++ b/sources/generated/Gst/Int64Range.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Int64Range : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_int64_range_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_int64_range_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public Int64Range(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Iterator.cs b/sources/generated/Gst/Iterator.cs new file mode 100644 index 0000000000..2c264e21be --- /dev/null +++ b/sources/generated/Gst/Iterator.cs @@ -0,0 +1,406 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Iterator : GLib.Opaque, IEnumerable { + + public Gst.IteratorCopyFunction CopyFunc { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("copy")); + GstSharp.IteratorCopyFunctionNative del = (GstSharp.IteratorCopyFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.IteratorCopyFunctionNative)); + return GstSharp.IteratorCopyFunctionWrapper.GetManagedDelegate ((del)); + } + } + set { + unsafe { + GstSharp.IteratorCopyFunctionWrapper wrapper = new GstSharp.IteratorCopyFunctionWrapper (value); + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("copy")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate (wrapper.NativeDelegate); + } + } + } + + public Gst.IteratorNextFunction NextFunc { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("next")); + GstSharp.IteratorNextFunctionNative del = (GstSharp.IteratorNextFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.IteratorNextFunctionNative)); + return GstSharp.IteratorNextFunctionWrapper.GetManagedDelegate ((del)); + } + } + set { + unsafe { + GstSharp.IteratorNextFunctionWrapper wrapper = new GstSharp.IteratorNextFunctionWrapper (value); + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("next")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate (wrapper.NativeDelegate); + } + } + } + + public Gst.IteratorItemFunction Item { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("item")); + GstSharp.IteratorItemFunctionNative del = (GstSharp.IteratorItemFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.IteratorItemFunctionNative)); + return GstSharp.IteratorItemFunctionWrapper.GetManagedDelegate ((del)); + } + } + set { + unsafe { + GstSharp.IteratorItemFunctionWrapper wrapper = new GstSharp.IteratorItemFunctionWrapper (value); + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("item")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate (wrapper.NativeDelegate); + } + } + } + + public Gst.IteratorResyncFunction ResyncFunc { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("resync")); + GstSharp.IteratorResyncFunctionNative del = (GstSharp.IteratorResyncFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.IteratorResyncFunctionNative)); + return GstSharp.IteratorResyncFunctionWrapper.GetManagedDelegate ((del)); + } + } + set { + unsafe { + GstSharp.IteratorResyncFunctionWrapper wrapper = new GstSharp.IteratorResyncFunctionWrapper (value); + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("resync")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate (wrapper.NativeDelegate); + } + } + } + + public Gst.IteratorFreeFunction FreeFunc { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("free")); + GstSharp.IteratorFreeFunctionNative del = (GstSharp.IteratorFreeFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.IteratorFreeFunctionNative)); + return GstSharp.IteratorFreeFunctionWrapper.GetManagedDelegate ((del)); + } + } + set { + unsafe { + GstSharp.IteratorFreeFunctionWrapper wrapper = new GstSharp.IteratorFreeFunctionWrapper (value); + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("free")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate (wrapper.NativeDelegate); + } + } + } + + public Gst.Iterator Pushed { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pushed")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Iterator), false); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pushed")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public GLib.GType Type { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return new GLib.GType((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = value.Val; + } + } + } + + public GLib.Mutex Lock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock")); + return new GLib.Mutex((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public uint Cookie { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("cookie")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("cookie")); + *raw_ptr = value; + } + } + } + + public uint MasterCookie { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("master_cookie")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("master_cookie")); + *raw_ptr = value; + } + } + } + + public uint Size { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_iterator_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_iterator_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_iterator_copy(IntPtr raw); + + public Gst.Iterator Copy() { + IntPtr raw_ret = gst_iterator_copy(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_iterator_fold(IntPtr raw, GstSharp.IteratorFoldFunctionNative func, IntPtr _ret, IntPtr user_data); + + public Gst.IteratorResult Fold(Gst.IteratorFoldFunction func, GLib.Value _ret) { + GstSharp.IteratorFoldFunctionWrapper func_wrapper = new GstSharp.IteratorFoldFunctionWrapper (func); + IntPtr native__ret = GLib.Marshaller.StructureToPtrAlloc (_ret); + int raw_ret = gst_iterator_fold(Handle, func_wrapper.NativeDelegate, native__ret, IntPtr.Zero); + Gst.IteratorResult ret = (Gst.IteratorResult) raw_ret; + Marshal.FreeHGlobal (native__ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_iterator_foreach(IntPtr raw, GstSharp.IteratorForeachFunctionNative func, IntPtr user_data); + + public Gst.IteratorResult Foreach(Gst.IteratorForeachFunction func) { + GstSharp.IteratorForeachFunctionWrapper func_wrapper = new GstSharp.IteratorForeachFunctionWrapper (func); + int raw_ret = gst_iterator_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + Gst.IteratorResult ret = (Gst.IteratorResult) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_iterator_push(IntPtr raw, IntPtr other); + + public void Push(Gst.Iterator other) { + gst_iterator_push(Handle, other == null ? IntPtr.Zero : other.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_iterator_resync(IntPtr raw); + + public void Resync() { + gst_iterator_resync(Handle); + } + + public Iterator(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_iterator_new_single(IntPtr type, IntPtr _object); + + public Iterator (GLib.GType type, GLib.Value _object) + { + IntPtr native__object = GLib.Marshaller.StructureToPtrAlloc (_object); + Raw = gst_iterator_new_single(type.Val, native__object); + Marshal.FreeHGlobal (native__object); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_iterator_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_iterator_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_iterator_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("copy" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // copy + , null + , "next" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("next" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // next + , "copy" + , "item" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("item" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // item + , "next" + , "resync" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("resync" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // resync + , "item" + , "free" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("free" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // free + , "resync" + , "pushed" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("pushed" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pushed + , "free" + , "type" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("type" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.GType)) // type + , "pushed" + , "lock" + , (long) Marshal.OffsetOf(typeof(GstIterator_typeAlign), "type") + , 0 + ), + new GLib.AbiField("lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , "type" + , "cookie" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // cookie + , "lock" + , "master_cookie" + , (long) Marshal.OffsetOf(typeof(GstIterator_cookieAlign), "cookie") + , 0 + ), + new GLib.AbiField("master_cookie" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // master_cookie + , "cookie" + , "size" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("size" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // size + , "master_cookie" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstIterator_sizeAlign), "size") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "size" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstIterator_typeAlign + { + sbyte f1; + private GLib.GType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstIterator_cookieAlign + { + sbyte f1; + private uint cookie; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstIterator_sizeAlign + { + sbyte f1; + private uint size; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/IteratorCopyFunction.cs b/sources/generated/Gst/IteratorCopyFunction.cs new file mode 100644 index 0000000000..5176fbd9ad --- /dev/null +++ b/sources/generated/Gst/IteratorCopyFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void IteratorCopyFunction(Gst.Iterator it, Gst.Iterator copy); + +} diff --git a/sources/generated/Gst/IteratorFoldFunction.cs b/sources/generated/Gst/IteratorFoldFunction.cs new file mode 100644 index 0000000000..55208b9a52 --- /dev/null +++ b/sources/generated/Gst/IteratorFoldFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool IteratorFoldFunction(GLib.Value item, GLib.Value _ret); + +} diff --git a/sources/generated/Gst/IteratorForeachFunction.cs b/sources/generated/Gst/IteratorForeachFunction.cs new file mode 100644 index 0000000000..8aaeb9f7e7 --- /dev/null +++ b/sources/generated/Gst/IteratorForeachFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void IteratorForeachFunction(GLib.Value item); + +} diff --git a/sources/generated/Gst/IteratorFreeFunction.cs b/sources/generated/Gst/IteratorFreeFunction.cs new file mode 100644 index 0000000000..050e817ab2 --- /dev/null +++ b/sources/generated/Gst/IteratorFreeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void IteratorFreeFunction(Gst.Iterator it); + +} diff --git a/sources/generated/Gst/IteratorItem.cs b/sources/generated/Gst/IteratorItem.cs new file mode 100644 index 0000000000..d8ad1477e6 --- /dev/null +++ b/sources/generated/Gst/IteratorItem.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.IteratorItemGType))] + public enum IteratorItem { + + Skip = 0, + Pass = 1, + End = 2, + } + + internal class IteratorItemGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_iterator_item_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_iterator_item_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/IteratorItemFunction.cs b/sources/generated/Gst/IteratorItemFunction.cs new file mode 100644 index 0000000000..18b34c6ea1 --- /dev/null +++ b/sources/generated/Gst/IteratorItemFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.IteratorItem IteratorItemFunction(Gst.Iterator it, GLib.Value item); + +} diff --git a/sources/generated/Gst/IteratorNextFunction.cs b/sources/generated/Gst/IteratorNextFunction.cs new file mode 100644 index 0000000000..f308eaaab4 --- /dev/null +++ b/sources/generated/Gst/IteratorNextFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.IteratorResult IteratorNextFunction(Gst.Iterator it, GLib.Value _result); + +} diff --git a/sources/generated/Gst/IteratorResult.cs b/sources/generated/Gst/IteratorResult.cs new file mode 100644 index 0000000000..ecbc513b82 --- /dev/null +++ b/sources/generated/Gst/IteratorResult.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.IteratorResultGType))] + public enum IteratorResult { + + Done = 0, + Ok = 1, + Resync = 2, + Error = 3, + } + + internal class IteratorResultGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_iterator_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_iterator_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/IteratorResyncFunction.cs b/sources/generated/Gst/IteratorResyncFunction.cs new file mode 100644 index 0000000000..809a007eaf --- /dev/null +++ b/sources/generated/Gst/IteratorResyncFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void IteratorResyncFunction(Gst.Iterator it); + +} diff --git a/sources/generated/Gst/LibraryError.cs b/sources/generated/Gst/LibraryError.cs new file mode 100644 index 0000000000..6fc30b232b --- /dev/null +++ b/sources/generated/Gst/LibraryError.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.LibraryErrorGType))] + public enum LibraryError { + + Failed = 1, + TooLazy = 2, + Init = 3, + Shutdown = 4, + Settings = 5, + Encode = 6, + NumErrors = 7, + } + + internal class LibraryErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_library_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_library_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/LinkedHandler.cs b/sources/generated/Gst/LinkedHandler.cs new file mode 100644 index 0000000000..798811f86f --- /dev/null +++ b/sources/generated/Gst/LinkedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void LinkedHandler(object o, LinkedArgs args); + + public class LinkedArgs : GLib.SignalArgs { + public Gst.Pad Peer{ + get { + return (Gst.Pad) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/LockFlags.cs b/sources/generated/Gst/LockFlags.cs new file mode 100644 index 0000000000..3e1bc18f02 --- /dev/null +++ b/sources/generated/Gst/LockFlags.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.LockFlagsGType))] + public enum LockFlags : uint { + + Read = 1, + Write = 2, + Exclusive = 4, + Last = 256, + } + + internal class LockFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_lock_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_lock_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/LogFunction.cs b/sources/generated/Gst/LogFunction.cs new file mode 100644 index 0000000000..972b418b7d --- /dev/null +++ b/sources/generated/Gst/LogFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void LogFunction(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message); + +} diff --git a/sources/generated/Gst/MapFlags.cs b/sources/generated/Gst/MapFlags.cs new file mode 100644 index 0000000000..a0a4985055 --- /dev/null +++ b/sources/generated/Gst/MapFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.MapFlagsGType))] + public enum MapFlags : uint { + + Read = 1, + Write = 2, + FlagLast = 65536, + } + + internal class MapFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_map_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_map_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/MapInfo.cs b/sources/generated/Gst/MapInfo.cs new file mode 100644 index 0000000000..3a3816a8c6 --- /dev/null +++ b/sources/generated/Gst/MapInfo.cs @@ -0,0 +1,77 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MapInfo : IEquatable { + + private IntPtr _memory; + public Gst.Memory Memory { + get { + return _memory == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (_memory, typeof (Gst.Memory), false); + } + set { + _memory = value == null ? IntPtr.Zero : value.Handle; + } + } + public Gst.MapFlags Flags; + private IntPtr _data; + private UIntPtr size; + public ulong Size { + get { + return (ulong) size; + } + set { + size = new UIntPtr (value); + } + } + private UIntPtr maxsize; + public ulong Maxsize { + get { + return (ulong) maxsize; + } + set { + maxsize = new UIntPtr (value); + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + public IntPtr[] UserData; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.MapInfo Zero = new Gst.MapInfo (); + + public static Gst.MapInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.MapInfo.Zero; + return (Gst.MapInfo) Marshal.PtrToStructure (raw, typeof (Gst.MapInfo)); + } + + public bool Equals (MapInfo other) + { + return true && Memory.Equals (other.Memory) && Flags.Equals (other.Flags) && _data.Equals (other._data) && Size.Equals (other.Size) && Maxsize.Equals (other.Maxsize) && UserData.Equals (other.UserData); + } + + public override bool Equals (object other) + { + return other is MapInfo && Equals ((MapInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Memory.GetHashCode () ^ Flags.GetHashCode () ^ _data.GetHashCode () ^ Size.GetHashCode () ^ Maxsize.GetHashCode () ^ UserData.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/Memory.cs b/sources/generated/Gst/Memory.cs new file mode 100644 index 0000000000..713f76375b --- /dev/null +++ b/sources/generated/Gst/Memory.cs @@ -0,0 +1,340 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Memory : Gst.MiniObject { + + public Gst.Allocator Allocator { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("allocator")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Allocator; + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("allocator")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public Gst.Memory Parent { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("parent")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Memory), false); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("parent")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + public ulong Maxsize { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("maxsize")); + return (ulong) (*raw_ptr); + } + } + set { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("maxsize")); + *raw_ptr = new UIntPtr (value); + } + } + } + + public ulong Align { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("align")); + return (ulong) (*raw_ptr); + } + } + set { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("align")); + *raw_ptr = new UIntPtr (value); + } + } + } + + public ulong Offset { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("offset")); + return (ulong) (*raw_ptr); + } + } + set { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("offset")); + *raw_ptr = new UIntPtr (value); + } + } + } + + public ulong Size { + get { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + return (ulong) (*raw_ptr); + } + } + set { + unsafe { + UIntPtr* raw_ptr = (UIntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("size")); + *raw_ptr = new UIntPtr (value); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_memory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_copy(IntPtr raw, IntPtr offset, IntPtr size); + + public Gst.Memory Copy(long offset, long size) { + IntPtr raw_ret = gst_memory_copy(Handle, new IntPtr (offset), new IntPtr (size)); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_memory_get_sizes(IntPtr raw, out UIntPtr offset, out UIntPtr maxsize); + + public ulong GetSizes(out ulong offset, out ulong maxsize) { + UIntPtr native_offset; + UIntPtr native_maxsize; + UIntPtr raw_ret = gst_memory_get_sizes(Handle, out native_offset, out native_maxsize); + ulong ret = (ulong) raw_ret; + offset = (ulong) native_offset; + maxsize = (ulong) native_maxsize; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_memory_is_span(IntPtr raw, IntPtr mem2, out UIntPtr offset); + + public bool IsSpan(Gst.Memory mem2, out ulong offset) { + UIntPtr native_offset; + bool raw_ret = gst_memory_is_span(Handle, mem2 == null ? IntPtr.Zero : mem2.Handle, out native_offset); + bool ret = raw_ret; + offset = (ulong) native_offset; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_memory_is_type(IntPtr raw, IntPtr mem_type); + + public bool IsType(string mem_type) { + IntPtr native_mem_type = GLib.Marshaller.StringToPtrGStrdup (mem_type); + bool raw_ret = gst_memory_is_type(Handle, native_mem_type); + bool ret = raw_ret; + GLib.Marshaller.Free (native_mem_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_make_mapped(IntPtr raw, IntPtr info, int flags); + + public Gst.Memory MakeMapped(out Gst.MapInfo info, Gst.MapFlags flags) { + IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo))); + IntPtr raw_ret = gst_memory_make_mapped(Handle, native_info, (int) flags); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + info = Gst.MapInfo.New (native_info); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_memory_map(IntPtr raw, IntPtr info, int flags); + + public bool Map(out Gst.MapInfo info, Gst.MapFlags flags) { + IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo))); + bool raw_ret = gst_memory_map(Handle, native_info, (int) flags); + bool ret = raw_ret; + info = Gst.MapInfo.New (native_info); + Marshal.FreeHGlobal (native_info); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_memory_resize(IntPtr raw, IntPtr offset, UIntPtr size); + + public void Resize(long offset, ulong size) { + gst_memory_resize(Handle, new IntPtr (offset), new UIntPtr (size)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_share(IntPtr raw, IntPtr offset, IntPtr size); + + public Gst.Memory Share(long offset, long size) { + IntPtr raw_ret = gst_memory_share(Handle, new IntPtr (offset), new IntPtr (size)); + Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_memory_unmap(IntPtr raw, IntPtr info); + + public void Unmap(Gst.MapInfo info) { + IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); + gst_memory_unmap(Handle, native_info); + Marshal.FreeHGlobal (native_info); + } + + public Memory(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_new_wrapped(int flags, byte[] data, UIntPtr maxsize, UIntPtr offset, UIntPtr size, IntPtr user_data, GLib.DestroyNotify notify); + + public Memory (Gst.MemoryFlags flags, byte[] data, ulong maxsize, ulong offset, ulong size, IntPtr user_data, GLib.DestroyNotify notify) + { + Raw = gst_memory_new_wrapped((int) flags, data, new UIntPtr (maxsize), new UIntPtr (offset), new UIntPtr (size), user_data, notify); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_memory_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_memory_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_memory_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_memory_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("allocator" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // allocator + , null + , "parent" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("parent" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parent + , "allocator" + , "maxsize" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("maxsize" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // maxsize + , "parent" + , "align" + , (long) Marshal.OffsetOf(typeof(GstMemory_maxsizeAlign), "maxsize") + , 0 + ), + new GLib.AbiField("align" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // align + , "maxsize" + , "offset" + , (long) Marshal.OffsetOf(typeof(GstMemory_alignAlign), "align") + , 0 + ), + new GLib.AbiField("offset" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // offset + , "align" + , "size" + , (long) Marshal.OffsetOf(typeof(GstMemory_offsetAlign), "offset") + , 0 + ), + new GLib.AbiField("size" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // size + , "offset" + , null + , (long) Marshal.OffsetOf(typeof(GstMemory_sizeAlign), "size") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMemory_maxsizeAlign + { + sbyte f1; + private UIntPtr maxsize; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMemory_alignAlign + { + sbyte f1; + private UIntPtr align; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMemory_offsetAlign + { + sbyte f1; + private UIntPtr offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMemory_sizeAlign + { + sbyte f1; + private UIntPtr size; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/MemoryCopyFunction.cs b/sources/generated/Gst/MemoryCopyFunction.cs new file mode 100644 index 0000000000..40c9774dfe --- /dev/null +++ b/sources/generated/Gst/MemoryCopyFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.Memory MemoryCopyFunction(Gst.Memory mem, long offset, long size); + +} diff --git a/sources/generated/Gst/MemoryFlags.cs b/sources/generated/Gst/MemoryFlags.cs new file mode 100644 index 0000000000..05c7f665fc --- /dev/null +++ b/sources/generated/Gst/MemoryFlags.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.MemoryFlagsGType))] + public enum MemoryFlags : uint { + + Readonly = 2, + NoShare = 16, + ZeroPrefixed = 32, + ZeroPadded = 64, + PhysicallyContiguous = 128, + NotMappable = 256, + Last = 1048576, + } + + internal class MemoryFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_memory_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_memory_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/MemoryIsSpanFunction.cs b/sources/generated/Gst/MemoryIsSpanFunction.cs new file mode 100644 index 0000000000..e295ef4ef2 --- /dev/null +++ b/sources/generated/Gst/MemoryIsSpanFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool MemoryIsSpanFunction(Gst.Memory mem1, Gst.Memory mem2, ulong offset); + +} diff --git a/sources/generated/Gst/MemoryMapFullFunction.cs b/sources/generated/Gst/MemoryMapFullFunction.cs new file mode 100644 index 0000000000..08b37b5c9e --- /dev/null +++ b/sources/generated/Gst/MemoryMapFullFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate IntPtr MemoryMapFullFunction(Gst.Memory mem, Gst.MapInfo info, ulong maxsize); + +} diff --git a/sources/generated/Gst/MemoryMapFunction.cs b/sources/generated/Gst/MemoryMapFunction.cs new file mode 100644 index 0000000000..28cf5cbad2 --- /dev/null +++ b/sources/generated/Gst/MemoryMapFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate IntPtr MemoryMapFunction(Gst.Memory mem, ulong maxsize, Gst.MapFlags flags); + +} diff --git a/sources/generated/Gst/MemoryShareFunction.cs b/sources/generated/Gst/MemoryShareFunction.cs new file mode 100644 index 0000000000..fea313a881 --- /dev/null +++ b/sources/generated/Gst/MemoryShareFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.Memory MemoryShareFunction(Gst.Memory mem, long offset, long size); + +} diff --git a/sources/generated/Gst/MemoryUnmapFullFunction.cs b/sources/generated/Gst/MemoryUnmapFullFunction.cs new file mode 100644 index 0000000000..934644541d --- /dev/null +++ b/sources/generated/Gst/MemoryUnmapFullFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MemoryUnmapFullFunction(Gst.Memory mem, Gst.MapInfo info); + +} diff --git a/sources/generated/Gst/MemoryUnmapFunction.cs b/sources/generated/Gst/MemoryUnmapFunction.cs new file mode 100644 index 0000000000..44e8e68224 --- /dev/null +++ b/sources/generated/Gst/MemoryUnmapFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MemoryUnmapFunction(Gst.Memory mem); + +} diff --git a/sources/generated/Gst/Message.cs b/sources/generated/Gst/Message.cs new file mode 100644 index 0000000000..f338b24146 --- /dev/null +++ b/sources/generated/Gst/Message.cs @@ -0,0 +1,1127 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Message : Gst.MiniObject { + + public Gst.MessageType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.MessageType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + public ulong Timestamp { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp")); + return (*raw_ptr); + } + } + set { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp")); + *raw_ptr = value; + } + } + } + + public Gst.Object Src { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("src")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Object; + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("src")); + *raw_ptr = value == null ? IntPtr.Zero : value.Handle; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_message_get_seqnum(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_seqnum(IntPtr raw, uint seqnum); + + public uint Seqnum { + get { + uint raw_ret = gst_message_get_seqnum(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_message_set_seqnum(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_message_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_add_redirect_entry(IntPtr raw, IntPtr location, IntPtr tag_list, IntPtr entry_struct); + + public void AddRedirectEntry(string location, Gst.TagList tag_list, Gst.Structure entry_struct) { + IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); + tag_list.Owned = false; + entry_struct.Owned = false; + gst_message_add_redirect_entry(Handle, native_location, tag_list == null ? IntPtr.Zero : tag_list.Handle, entry_struct == null ? IntPtr.Zero : entry_struct.Handle); + GLib.Marshaller.Free (native_location); + } + + public void AddRedirectEntry(string location) { + AddRedirectEntry (location, null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_message_get_num_redirect_entries(IntPtr raw); + + public ulong NumRedirectEntries { + get { + UIntPtr raw_ret = gst_message_get_num_redirect_entries(Handle); + ulong ret = (ulong) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_get_structure(IntPtr raw); + + public Gst.Structure Structure { + get { + IntPtr raw_ret = gst_message_get_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_message_has_name(IntPtr raw, IntPtr name); + + public bool HasName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_message_has_name(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_async_done(IntPtr raw, out ulong running_time); + + public ulong ParseAsyncDone() { + ulong running_time; + gst_message_parse_async_done(Handle, out running_time); + return running_time; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_buffering(IntPtr raw, out int percent); + + public int ParseBuffering() { + int percent; + gst_message_parse_buffering(Handle, out percent); + return percent; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_buffering_stats(IntPtr raw, out int mode, out int avg_in, out int avg_out, out long buffering_left); + + public void ParseBufferingStats(out Gst.BufferingMode mode, out int avg_in, out int avg_out, out long buffering_left) { + int native_mode; + gst_message_parse_buffering_stats(Handle, out native_mode, out avg_in, out avg_out, out buffering_left); + mode = (Gst.BufferingMode) native_mode; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_clock_lost(IntPtr raw, out IntPtr clock); + + public Gst.Clock ParseClockLost() { + Gst.Clock clock; + IntPtr native_clock; + gst_message_parse_clock_lost(Handle, out native_clock); + clock = GLib.Object.GetObject(native_clock) as Gst.Clock; + return clock; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_clock_provide(IntPtr raw, out IntPtr clock, out bool ready); + + public void ParseClockProvide(out Gst.Clock clock, out bool ready) { + IntPtr native_clock; + gst_message_parse_clock_provide(Handle, out native_clock, out ready); + clock = GLib.Object.GetObject(native_clock) as Gst.Clock; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_message_parse_context_type(IntPtr raw, out IntPtr context_type); + + public bool ParseContextType(out string context_type) { + IntPtr native_context_type; + bool raw_ret = gst_message_parse_context_type(Handle, out native_context_type); + bool ret = raw_ret; + context_type = GLib.Marshaller.Utf8PtrToString (native_context_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_device_added(IntPtr raw, out IntPtr device); + + public Gst.Device ParseDeviceAdded() { + Gst.Device device; + IntPtr native_device; + gst_message_parse_device_added(Handle, out native_device); + device = GLib.Object.GetObject(native_device, true) as Gst.Device; + return device; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_device_changed(IntPtr raw, out IntPtr device, out IntPtr changed_device); + + public void ParseDeviceChanged(out Gst.Device device, out Gst.Device changed_device) { + IntPtr native_device; + IntPtr native_changed_device; + gst_message_parse_device_changed(Handle, out native_device, out native_changed_device); + device = GLib.Object.GetObject(native_device, true) as Gst.Device; + changed_device = GLib.Object.GetObject(native_changed_device, true) as Gst.Device; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_device_removed(IntPtr raw, out IntPtr device); + + public Gst.Device ParseDeviceRemoved() { + Gst.Device device; + IntPtr native_device; + gst_message_parse_device_removed(Handle, out native_device); + device = GLib.Object.GetObject(native_device, true) as Gst.Device; + return device; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_error_details(IntPtr raw, out IntPtr structure); + + public Gst.Structure ParseErrorDetails() { + Gst.Structure structure; + IntPtr native_structure; + gst_message_parse_error_details(Handle, out native_structure); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); + return structure; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_message_parse_group_id(IntPtr raw, out uint group_id); + + public bool ParseGroupId(out uint group_id) { + bool raw_ret = gst_message_parse_group_id(Handle, out group_id); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_have_context(IntPtr raw, IntPtr context); + + public Gst.Context ParseHaveContext() { + Gst.Context context; + IntPtr native_context = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Context))); + gst_message_parse_have_context(Handle, native_context); + context = Gst.Context.New (native_context); + Marshal.FreeHGlobal (native_context); + return context; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_info(IntPtr raw, out IntPtr gerror, out IntPtr debug); + + public void ParseInfo(out IntPtr gerror, out string debug) { + IntPtr native_debug; + gst_message_parse_info(Handle, out gerror, out native_debug); + debug = GLib.Marshaller.PtrToStringGFree(native_debug); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_info_details(IntPtr raw, out IntPtr structure); + + public Gst.Structure ParseInfoDetails() { + Gst.Structure structure; + IntPtr native_structure; + gst_message_parse_info_details(Handle, out native_structure); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); + return structure; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_instant_rate_request(IntPtr raw, out double rate_multiplier); + + public double ParseInstantRateRequest() { + double rate_multiplier; + gst_message_parse_instant_rate_request(Handle, out rate_multiplier); + return rate_multiplier; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_new_clock(IntPtr raw, out IntPtr clock); + + public Gst.Clock ParseNewClock() { + Gst.Clock clock; + IntPtr native_clock; + gst_message_parse_new_clock(Handle, out native_clock); + clock = GLib.Object.GetObject(native_clock) as Gst.Clock; + return clock; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_progress(IntPtr raw, out int type, out IntPtr code, out IntPtr text); + + public void ParseProgress(out Gst.ProgressType type, out string code, out string text) { + int native_type; + IntPtr native_code; + IntPtr native_text; + gst_message_parse_progress(Handle, out native_type, out native_code, out native_text); + type = (Gst.ProgressType) native_type; + code = GLib.Marshaller.PtrToStringGFree(native_code); + text = GLib.Marshaller.PtrToStringGFree(native_text); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_property_notify(IntPtr raw, out IntPtr _object, out IntPtr property_name, IntPtr property_value); + + public void ParsePropertyNotify(out Gst.Object _object, out string property_name, out GLib.Value property_value) { + IntPtr native__object; + IntPtr native_property_name; + IntPtr native_property_value = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + gst_message_parse_property_notify(Handle, out native__object, out native_property_name, native_property_value); + _object = GLib.Object.GetObject(native__object) as Gst.Object; + property_name = GLib.Marshaller.Utf8PtrToString (native_property_name); + property_value = (GLib.Value) Marshal.PtrToStructure (native_property_value, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_property_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_qos(IntPtr raw, out bool live, out ulong running_time, out ulong stream_time, out ulong timestamp, out ulong duration); + + public void ParseQos(out bool live, out ulong running_time, out ulong stream_time, out ulong timestamp, out ulong duration) { + gst_message_parse_qos(Handle, out live, out running_time, out stream_time, out timestamp, out duration); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_qos_stats(IntPtr raw, out int format, out ulong processed, out ulong dropped); + + public void ParseQosStats(out Gst.Format format, out ulong processed, out ulong dropped) { + int native_format; + gst_message_parse_qos_stats(Handle, out native_format, out processed, out dropped); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_qos_values(IntPtr raw, out long jitter, out double proportion, out int quality); + + public void ParseQosValues(out long jitter, out double proportion, out int quality) { + gst_message_parse_qos_values(Handle, out jitter, out proportion, out quality); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_redirect_entry(IntPtr raw, UIntPtr entry_index, out IntPtr location, out IntPtr tag_list, out IntPtr entry_struct); + + public void ParseRedirectEntry(ulong entry_index, out string location, out Gst.TagList tag_list, out Gst.Structure entry_struct) { + IntPtr native_location; + IntPtr native_tag_list; + IntPtr native_entry_struct; + gst_message_parse_redirect_entry(Handle, new UIntPtr (entry_index), out native_location, out native_tag_list, out native_entry_struct); + location = GLib.Marshaller.Utf8PtrToString (native_location); + tag_list = native_tag_list == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (native_tag_list, typeof (Gst.TagList), false); + entry_struct = native_entry_struct == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_entry_struct, typeof (Gst.Structure), false); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_request_state(IntPtr raw, out int state); + + public Gst.State ParseRequestState() { + Gst.State state; + int native_state; + gst_message_parse_request_state(Handle, out native_state); + state = (Gst.State) native_state; + return state; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_reset_time(IntPtr raw, out ulong running_time); + + public ulong ParseResetTime() { + ulong running_time; + gst_message_parse_reset_time(Handle, out running_time); + return running_time; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_segment_done(IntPtr raw, out int format, out long position); + + public void ParseSegmentDone(out Gst.Format format, out long position) { + int native_format; + gst_message_parse_segment_done(Handle, out native_format, out position); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_segment_start(IntPtr raw, out int format, out long position); + + public void ParseSegmentStart(out Gst.Format format, out long position) { + int native_format; + gst_message_parse_segment_start(Handle, out native_format, out position); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_state_changed(IntPtr raw, out int oldstate, out int newstate, out int pending); + + public void ParseStateChanged(out Gst.State oldstate, out Gst.State newstate, out Gst.State pending) { + int native_oldstate; + int native_newstate; + int native_pending; + gst_message_parse_state_changed(Handle, out native_oldstate, out native_newstate, out native_pending); + oldstate = (Gst.State) native_oldstate; + newstate = (Gst.State) native_newstate; + pending = (Gst.State) native_pending; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_step_done(IntPtr raw, out int format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos); + + public void ParseStepDone(out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos) { + int native_format; + gst_message_parse_step_done(Handle, out native_format, out amount, out rate, out flush, out intermediate, out duration, out eos); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_step_start(IntPtr raw, out bool active, out int format, out ulong amount, out double rate, out bool flush, out bool intermediate); + + public void ParseStepStart(out bool active, out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) { + int native_format; + gst_message_parse_step_start(Handle, out active, out native_format, out amount, out rate, out flush, out intermediate); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_stream_collection(IntPtr raw, out IntPtr collection); + + public Gst.StreamCollection ParseStreamCollection() { + Gst.StreamCollection collection; + IntPtr native_collection; + gst_message_parse_stream_collection(Handle, out native_collection); + collection = GLib.Object.GetObject(native_collection, true) as Gst.StreamCollection; + return collection; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_stream_status(IntPtr raw, out int type, out IntPtr owner); + + public void ParseStreamStatus(out Gst.StreamStatusType type, out Gst.Element owner) { + int native_type; + IntPtr native_owner; + gst_message_parse_stream_status(Handle, out native_type, out native_owner); + type = (Gst.StreamStatusType) native_type; + owner = GLib.Object.GetObject(native_owner) as Gst.Element; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_streams_selected(IntPtr raw, out IntPtr collection); + + public Gst.StreamCollection ParseStreamsSelected() { + Gst.StreamCollection collection; + IntPtr native_collection; + gst_message_parse_streams_selected(Handle, out native_collection); + collection = GLib.Object.GetObject(native_collection, true) as Gst.StreamCollection; + return collection; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_structure_change(IntPtr raw, out int type, out IntPtr owner, out bool busy); + + public void ParseStructureChange(out Gst.StructureChangeType type, out Gst.Element owner, out bool busy) { + int native_type; + IntPtr native_owner; + gst_message_parse_structure_change(Handle, out native_type, out native_owner, out busy); + type = (Gst.StructureChangeType) native_type; + owner = GLib.Object.GetObject(native_owner) as Gst.Element; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_tag(IntPtr raw, out IntPtr tag_list); + + public Gst.TagList ParseTag() { + Gst.TagList tag_list; + IntPtr native_tag_list; + gst_message_parse_tag(Handle, out native_tag_list); + tag_list = native_tag_list == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (native_tag_list, typeof (Gst.TagList), true); + return tag_list; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_toc(IntPtr raw, IntPtr toc, out bool updated); + + public void ParseToc(out Gst.Toc toc, out bool updated) { + IntPtr native_toc = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Toc))); + gst_message_parse_toc(Handle, native_toc, out updated); + toc = Gst.Toc.New (native_toc); + Marshal.FreeHGlobal (native_toc); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_warning(IntPtr raw, out IntPtr gerror, out IntPtr debug); + + public void ParseWarning(out IntPtr gerror, out string debug) { + IntPtr native_debug; + gst_message_parse_warning(Handle, out gerror, out native_debug); + debug = GLib.Marshaller.PtrToStringGFree(native_debug); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_parse_warning_details(IntPtr raw, out IntPtr structure); + + public Gst.Structure ParseWarningDetails() { + Gst.Structure structure; + IntPtr native_structure; + gst_message_parse_warning_details(Handle, out native_structure); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); + return structure; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_buffering_stats(IntPtr raw, int mode, int avg_in, int avg_out, long buffering_left); + + public void SetBufferingStats(Gst.BufferingMode mode, int avg_in, int avg_out, long buffering_left) { + gst_message_set_buffering_stats(Handle, (int) mode, avg_in, avg_out, buffering_left); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_group_id(IntPtr raw, uint group_id); + + public uint GroupId { + set { + gst_message_set_group_id(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_qos_stats(IntPtr raw, int format, ulong processed, ulong dropped); + + public void SetQosStats(Gst.Format format, ulong processed, ulong dropped) { + gst_message_set_qos_stats(Handle, (int) format, processed, dropped); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_set_qos_values(IntPtr raw, long jitter, double proportion, int quality); + + public void SetQosValues(long jitter, double proportion, int quality) { + gst_message_set_qos_values(Handle, jitter, proportion, quality); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_streams_selected_add(IntPtr raw, IntPtr stream); + + public void StreamsSelectedAdd(Gst.Stream stream) { + gst_message_streams_selected_add(Handle, stream == null ? IntPtr.Zero : stream.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_message_streams_selected_get_size(IntPtr raw); + + public uint StreamsSelectedGetSize() { + uint raw_ret = gst_message_streams_selected_get_size(Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_streams_selected_get_stream(IntPtr raw, uint idx); + + public Gst.Stream StreamsSelectedGetStream(uint idx) { + IntPtr raw_ret = gst_message_streams_selected_get_stream(Handle, idx); + Gst.Stream ret = GLib.Object.GetObject(raw_ret, true) as Gst.Stream; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_writable_structure(IntPtr raw); + + public Gst.Structure WritableStructure() { + IntPtr raw_ret = gst_message_writable_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + + public Message(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_application(IntPtr src, IntPtr structure); + + public static Message NewApplication(Gst.Object src, Gst.Structure structure) + { + structure.Owned = false; + Message result = new Message (gst_message_new_application(src == null ? IntPtr.Zero : src.Handle, structure == null ? IntPtr.Zero : structure.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_async_done(IntPtr src, ulong running_time); + + public static Message NewAsyncDone(Gst.Object src, ulong running_time) + { + Message result = new Message (gst_message_new_async_done(src == null ? IntPtr.Zero : src.Handle, running_time)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_async_start(IntPtr src); + + public static Message NewAsyncStart(Gst.Object src) + { + Message result = new Message (gst_message_new_async_start(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_buffering(IntPtr src, int percent); + + public static Message NewBuffering(Gst.Object src, int percent) + { + Message result = new Message (gst_message_new_buffering(src == null ? IntPtr.Zero : src.Handle, percent)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_clock_lost(IntPtr src, IntPtr clock); + + public static Message NewClockLost(Gst.Object src, Gst.Clock clock) + { + Message result = new Message (gst_message_new_clock_lost(src == null ? IntPtr.Zero : src.Handle, clock == null ? IntPtr.Zero : clock.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_clock_provide(IntPtr src, IntPtr clock, bool ready); + + public static Message NewClockProvide(Gst.Object src, Gst.Clock clock, bool ready) + { + Message result = new Message (gst_message_new_clock_provide(src == null ? IntPtr.Zero : src.Handle, clock == null ? IntPtr.Zero : clock.Handle, ready)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_custom(int type, IntPtr src, IntPtr structure); + + public static Message NewCustom(Gst.MessageType type, Gst.Object src, Gst.Structure structure) + { + structure.Owned = false; + Message result = new Message (gst_message_new_custom((int) type, src == null ? IntPtr.Zero : src.Handle, structure == null ? IntPtr.Zero : structure.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_device_added(IntPtr src, IntPtr device); + + public static Message NewDeviceAdded(Gst.Object src, Gst.Device device) + { + Message result = new Message (gst_message_new_device_added(src == null ? IntPtr.Zero : src.Handle, device == null ? IntPtr.Zero : device.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_device_changed(IntPtr src, IntPtr device, IntPtr changed_device); + + public static Message NewDeviceChanged(Gst.Object src, Gst.Device device, Gst.Device changed_device) + { + Message result = new Message (gst_message_new_device_changed(src == null ? IntPtr.Zero : src.Handle, device == null ? IntPtr.Zero : device.Handle, changed_device == null ? IntPtr.Zero : changed_device.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_device_removed(IntPtr src, IntPtr device); + + public static Message NewDeviceRemoved(Gst.Object src, Gst.Device device) + { + Message result = new Message (gst_message_new_device_removed(src == null ? IntPtr.Zero : src.Handle, device == null ? IntPtr.Zero : device.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_duration_changed(IntPtr src); + + public static Message NewDurationChanged(Gst.Object src) + { + Message result = new Message (gst_message_new_duration_changed(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_element(IntPtr src, IntPtr structure); + + public static Message NewElement(Gst.Object src, Gst.Structure structure) + { + structure.Owned = false; + Message result = new Message (gst_message_new_element(src == null ? IntPtr.Zero : src.Handle, structure == null ? IntPtr.Zero : structure.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_eos(IntPtr src); + + public static Message NewEos(Gst.Object src) + { + Message result = new Message (gst_message_new_eos(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_error(IntPtr src, IntPtr error, IntPtr debug); + + public static Message NewError(Gst.Object src, IntPtr error, string debug) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + Message result = new Message (gst_message_new_error(src == null ? IntPtr.Zero : src.Handle, error, native_debug)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_error_with_details(IntPtr src, IntPtr error, IntPtr debug, IntPtr details); + + public static Message NewErrorWithDetails(Gst.Object src, IntPtr error, string debug, Gst.Structure details) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + details.Owned = false; + Message result = new Message (gst_message_new_error_with_details(src == null ? IntPtr.Zero : src.Handle, error, native_debug, details == null ? IntPtr.Zero : details.Handle)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_have_context(IntPtr src, IntPtr context); + + public static Message NewHaveContext(Gst.Object src, Gst.Context context) + { + IntPtr native_context = GLib.Marshaller.StructureToPtrAlloc (context); + Message result = new Message (gst_message_new_have_context(src == null ? IntPtr.Zero : src.Handle, native_context)); + Marshal.FreeHGlobal (native_context); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_info(IntPtr src, IntPtr error, IntPtr debug); + + public static Message NewInfo(Gst.Object src, IntPtr error, string debug) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + Message result = new Message (gst_message_new_info(src == null ? IntPtr.Zero : src.Handle, error, native_debug)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_info_with_details(IntPtr src, IntPtr error, IntPtr debug, IntPtr details); + + public static Message NewInfoWithDetails(Gst.Object src, IntPtr error, string debug, Gst.Structure details) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + details.Owned = false; + Message result = new Message (gst_message_new_info_with_details(src == null ? IntPtr.Zero : src.Handle, error, native_debug, details == null ? IntPtr.Zero : details.Handle)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_instant_rate_request(IntPtr src, double rate_multiplier); + + public static Message NewInstantRateRequest(Gst.Object src, double rate_multiplier) + { + Message result = new Message (gst_message_new_instant_rate_request(src == null ? IntPtr.Zero : src.Handle, rate_multiplier)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_latency(IntPtr src); + + public static Message NewLatency(Gst.Object src) + { + Message result = new Message (gst_message_new_latency(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_need_context(IntPtr src, IntPtr context_type); + + public static Message NewNeedContext(Gst.Object src, string context_type) + { + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + Message result = new Message (gst_message_new_need_context(src == null ? IntPtr.Zero : src.Handle, native_context_type)); + GLib.Marshaller.Free (native_context_type); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_new_clock(IntPtr src, IntPtr clock); + + public static Message NewNewClock(Gst.Object src, Gst.Clock clock) + { + Message result = new Message (gst_message_new_new_clock(src == null ? IntPtr.Zero : src.Handle, clock == null ? IntPtr.Zero : clock.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_progress(IntPtr src, int type, IntPtr code, IntPtr text); + + public static Message NewProgress(Gst.Object src, Gst.ProgressType type, string code, string text) + { + IntPtr native_code = GLib.Marshaller.StringToPtrGStrdup (code); + IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); + Message result = new Message (gst_message_new_progress(src == null ? IntPtr.Zero : src.Handle, (int) type, native_code, native_text)); + GLib.Marshaller.Free (native_code); + GLib.Marshaller.Free (native_text); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_property_notify(IntPtr src, IntPtr property_name, IntPtr val); + + public static Message NewPropertyNotify(Gst.Object src, string property_name, GLib.Value val) + { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr native_val = GLib.Marshaller.StructureToPtrAlloc (val); + Message result = new Message (gst_message_new_property_notify(src == null ? IntPtr.Zero : src.Handle, native_property_name, native_val)); + GLib.Marshaller.Free (native_property_name); + Marshal.FreeHGlobal (native_val); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_qos(IntPtr src, bool live, ulong running_time, ulong stream_time, ulong timestamp, ulong duration); + + public static Message NewQos(Gst.Object src, bool live, ulong running_time, ulong stream_time, ulong timestamp, ulong duration) + { + Message result = new Message (gst_message_new_qos(src == null ? IntPtr.Zero : src.Handle, live, running_time, stream_time, timestamp, duration)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_redirect(IntPtr src, IntPtr location, IntPtr tag_list, IntPtr entry_struct); + + public static Message NewRedirect(Gst.Object src, string location, Gst.TagList tag_list, Gst.Structure entry_struct) + { + IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); + tag_list.Owned = false; + entry_struct.Owned = false; + Message result = new Message (gst_message_new_redirect(src == null ? IntPtr.Zero : src.Handle, native_location, tag_list == null ? IntPtr.Zero : tag_list.Handle, entry_struct == null ? IntPtr.Zero : entry_struct.Handle)); + GLib.Marshaller.Free (native_location); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_request_state(IntPtr src, int state); + + public static Message NewRequestState(Gst.Object src, Gst.State state) + { + Message result = new Message (gst_message_new_request_state(src == null ? IntPtr.Zero : src.Handle, (int) state)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_reset_time(IntPtr src, ulong running_time); + + public static Message NewResetTime(Gst.Object src, ulong running_time) + { + Message result = new Message (gst_message_new_reset_time(src == null ? IntPtr.Zero : src.Handle, running_time)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_segment_done(IntPtr src, int format, long position); + + public static Message NewSegmentDone(Gst.Object src, Gst.Format format, long position) + { + Message result = new Message (gst_message_new_segment_done(src == null ? IntPtr.Zero : src.Handle, (int) format, position)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_segment_start(IntPtr src, int format, long position); + + public static Message NewSegmentStart(Gst.Object src, Gst.Format format, long position) + { + Message result = new Message (gst_message_new_segment_start(src == null ? IntPtr.Zero : src.Handle, (int) format, position)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_state_changed(IntPtr src, int oldstate, int newstate, int pending); + + public static Message NewStateChanged(Gst.Object src, Gst.State oldstate, Gst.State newstate, Gst.State pending) + { + Message result = new Message (gst_message_new_state_changed(src == null ? IntPtr.Zero : src.Handle, (int) oldstate, (int) newstate, (int) pending)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_state_dirty(IntPtr src); + + public static Message NewStateDirty(Gst.Object src) + { + Message result = new Message (gst_message_new_state_dirty(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_step_done(IntPtr src, int format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos); + + public static Message NewStepDone(Gst.Object src, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos) + { + Message result = new Message (gst_message_new_step_done(src == null ? IntPtr.Zero : src.Handle, (int) format, amount, rate, flush, intermediate, duration, eos)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_step_start(IntPtr src, bool active, int format, ulong amount, double rate, bool flush, bool intermediate); + + public static Message NewStepStart(Gst.Object src, bool active, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate) + { + Message result = new Message (gst_message_new_step_start(src == null ? IntPtr.Zero : src.Handle, active, (int) format, amount, rate, flush, intermediate)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_stream_collection(IntPtr src, IntPtr collection); + + public static Message NewStreamCollection(Gst.Object src, Gst.StreamCollection collection) + { + Message result = new Message (gst_message_new_stream_collection(src == null ? IntPtr.Zero : src.Handle, collection == null ? IntPtr.Zero : collection.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_stream_start(IntPtr src); + + public static Message NewStreamStart(Gst.Object src) + { + Message result = new Message (gst_message_new_stream_start(src == null ? IntPtr.Zero : src.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_stream_status(IntPtr src, int type, IntPtr owner); + + public static Message NewStreamStatus(Gst.Object src, Gst.StreamStatusType type, Gst.Element owner) + { + Message result = new Message (gst_message_new_stream_status(src == null ? IntPtr.Zero : src.Handle, (int) type, owner == null ? IntPtr.Zero : owner.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_streams_selected(IntPtr src, IntPtr collection); + + public static Message NewStreamsSelected(Gst.Object src, Gst.StreamCollection collection) + { + Message result = new Message (gst_message_new_streams_selected(src == null ? IntPtr.Zero : src.Handle, collection == null ? IntPtr.Zero : collection.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_structure_change(IntPtr src, int type, IntPtr owner, bool busy); + + public static Message NewStructureChange(Gst.Object src, Gst.StructureChangeType type, Gst.Element owner, bool busy) + { + Message result = new Message (gst_message_new_structure_change(src == null ? IntPtr.Zero : src.Handle, (int) type, owner == null ? IntPtr.Zero : owner.Handle, busy)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_tag(IntPtr src, IntPtr tag_list); + + public static Message NewTag(Gst.Object src, Gst.TagList tag_list) + { + tag_list.Owned = false; + Message result = new Message (gst_message_new_tag(src == null ? IntPtr.Zero : src.Handle, tag_list == null ? IntPtr.Zero : tag_list.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_toc(IntPtr src, IntPtr toc, bool updated); + + public static Message NewToc(Gst.Object src, Gst.Toc toc, bool updated) + { + IntPtr native_toc = GLib.Marshaller.StructureToPtrAlloc (toc); + Message result = new Message (gst_message_new_toc(src == null ? IntPtr.Zero : src.Handle, native_toc, updated)); + Marshal.FreeHGlobal (native_toc); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_warning(IntPtr src, IntPtr error, IntPtr debug); + + public static Message NewWarning(Gst.Object src, IntPtr error, string debug) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + Message result = new Message (gst_message_new_warning(src == null ? IntPtr.Zero : src.Handle, error, native_debug)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_new_warning_with_details(IntPtr src, IntPtr error, IntPtr debug, IntPtr details); + + public static Message NewWarningWithDetails(Gst.Object src, IntPtr error, string debug, Gst.Structure details) + { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + details.Owned = false; + Message result = new Message (gst_message_new_warning_with_details(src == null ? IntPtr.Zero : src.Handle, error, native_debug, details == null ? IntPtr.Zero : details.Handle)); + GLib.Marshaller.Free (native_debug); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_message_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_message_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_message_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_message_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.MessageType))) // type + , null + , "timestamp" + , (long) Marshal.OffsetOf(typeof(GstMessage_typeAlign), "type") + , 0 + ), + new GLib.AbiField("timestamp" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // timestamp + , "type" + , "src" + , (long) Marshal.OffsetOf(typeof(GstMessage_timestampAlign), "timestamp") + , 0 + ), + new GLib.AbiField("src" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // src + , "timestamp" + , "seqnum" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("seqnum" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // seqnum + , "src" + , "lock" + , (long) Marshal.OffsetOf(typeof(GstMessage_seqnumAlign), "seqnum") + , 0 + ), + new GLib.AbiField("lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , "seqnum" + , "cond" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // cond + , "lock" + , null + , (long) Marshal.OffsetOf(typeof(GstMessage_condAlign), "cond") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMessage_typeAlign + { + sbyte f1; + private Gst.MessageType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMessage_timestampAlign + { + sbyte f1; + private ulong timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMessage_seqnumAlign + { + sbyte f1; + private uint seqnum; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMessage_condAlign + { + sbyte f1; + private GLib.Cond.ABI cond; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/MessageHandler.cs b/sources/generated/Gst/MessageHandler.cs new file mode 100644 index 0000000000..8a24b97ace --- /dev/null +++ b/sources/generated/Gst/MessageHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MessageHandler(object o, MessageArgs args); + + public class MessageArgs : GLib.SignalArgs { + public Gst.Message Message{ + get { + return (Gst.Message) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/MessageType.cs b/sources/generated/Gst/MessageType.cs new file mode 100644 index 0000000000..51af3f1285 --- /dev/null +++ b/sources/generated/Gst/MessageType.cs @@ -0,0 +1,69 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.MessageTypeGType))] + public enum MessageType : uint { + + Unknown = 0, + Eos = 1, + Error = 2, + Warning = 4, + Info = 8, + Tag = 16, + Buffering = 32, + StateChanged = 64, + StateDirty = 128, + StepDone = 256, + ClockProvide = 512, + ClockLost = 1024, + NewClock = 2048, + StructureChange = 4096, + StreamStatus = 8192, + Application = 16384, + Element = 32768, + SegmentStart = 65536, + SegmentDone = 131072, + DurationChanged = 262144, + Latency = 524288, + AsyncStart = 1048576, + AsyncDone = 2097152, + RequestState = 4194304, + StepStart = 8388608, + Qos = 16777216, + Progress = 33554432, + Toc = 67108864, + ResetTime = 134217728, + StreamStart = 268435456, + NeedContext = 536870912, + HaveContext = 1073741824, + Extended = 2147483648, + DeviceAdded = 2147483649, + DeviceRemoved = 2147483650, + PropertyNotify = 2147483651, + StreamCollection = 2147483652, + StreamsSelected = 2147483653, + Redirect = 2147483654, + DeviceChanged = 2147483655, + InstantRateRequest = 2147483656, + Any = 4294967295, + } + + internal class MessageTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_message_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_message_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Meta.cs b/sources/generated/Gst/Meta.cs new file mode 100644 index 0000000000..ac19a72c08 --- /dev/null +++ b/sources/generated/Gst/Meta.cs @@ -0,0 +1,168 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct Meta : IEquatable { + + public Gst.MetaFlags Flags; + private IntPtr _info; + + public Gst.MetaInfo info { + get { return Gst.MetaInfo.New (_info); } + } + + public static Gst.Meta Zero = new Gst.Meta (); + + public static Gst.Meta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Meta.Zero; + return (Gst.Meta) Marshal.PtrToStructure (raw, typeof (Gst.Meta)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_meta_compare_seqnum(IntPtr raw, IntPtr meta2); + + public int CompareSeqnum(Gst.Meta meta2) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_meta2 = GLib.Marshaller.StructureToPtrAlloc (meta2); + int raw_ret = gst_meta_compare_seqnum(this_as_native, native_meta2); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_meta2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_meta_get_seqnum(IntPtr raw); + + public ulong Seqnum { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_meta_get_seqnum(this_as_native); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_meta_api_type_has_tag(IntPtr api, uint tag); + + public static bool ApiTypeHasTag(GLib.GType api, uint tag) { + bool raw_ret = gst_meta_api_type_has_tag(api.Val, tag); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_api_type_register(IntPtr api, IntPtr[] tags); + + public static GLib.GType ApiTypeRegister(string api, string[] tags) { + IntPtr native_api = GLib.Marshaller.StringToPtrGStrdup (api); + int cnt_tags = tags == null ? 0 : tags.Length; + IntPtr[] native_tags = new IntPtr [cnt_tags + 1]; + for (int i = 0; i < cnt_tags; i++) + native_tags [i] = GLib.Marshaller.StringToPtrGStrdup(tags[i]); + native_tags [cnt_tags] = IntPtr.Zero; + IntPtr raw_ret = gst_meta_api_type_register(native_api, native_tags); + GLib.GType ret = new GLib.GType(raw_ret); + GLib.Marshaller.Free (native_api); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_get_info(IntPtr impl); + + public static Gst.MetaInfo GetInfo(string impl) { + IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl); + IntPtr raw_ret = gst_meta_get_info(native_impl); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_impl); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_register(IntPtr api, IntPtr impl, UIntPtr size, GstSharp.MetaInitFunctionNative init_func, GstSharp.MetaFreeFunctionNative free_func, GstSharp.MetaTransformFunctionNative transform_func); + + public static Gst.MetaInfo Register(GLib.GType api, string impl, ulong size, Gst.MetaInitFunction init_func, Gst.MetaFreeFunction free_func, Gst.MetaTransformFunction transform_func) { + IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl); + GstSharp.MetaInitFunctionWrapper init_func_wrapper = new GstSharp.MetaInitFunctionWrapper (init_func); + init_func_wrapper.PersistUntilCalled (); + GstSharp.MetaFreeFunctionWrapper free_func_wrapper = new GstSharp.MetaFreeFunctionWrapper (free_func); + free_func_wrapper.PersistUntilCalled (); + GstSharp.MetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.MetaTransformFunctionWrapper (transform_func); + transform_func_wrapper.PersistUntilCalled (); + IntPtr raw_ret = gst_meta_register(api.Val, native_impl, new UIntPtr (size), init_func_wrapper.NativeDelegate, free_func_wrapper.NativeDelegate, transform_func_wrapper.NativeDelegate); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_impl); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_register_custom(IntPtr name, IntPtr[] tags, GstSharp.CustomMetaTransformFunctionNative transform_func, IntPtr user_data, GLib.DestroyNotify destroy_data); + + public static Gst.MetaInfo RegisterCustom(string name, string[] tags, Gst.CustomMetaTransformFunction transform_func) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + int cnt_tags = tags == null ? 0 : tags.Length; + IntPtr[] native_tags = new IntPtr [cnt_tags + 1]; + for (int i = 0; i < cnt_tags; i++) + native_tags [i] = GLib.Marshaller.StringToPtrGStrdup(tags[i]); + native_tags [cnt_tags] = IntPtr.Zero; + GstSharp.CustomMetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.CustomMetaTransformFunctionWrapper (transform_func); + IntPtr user_data; + GLib.DestroyNotify destroy_data; + if (transform_func == null) { + user_data = IntPtr.Zero; + destroy_data = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (transform_func_wrapper); + destroy_data = GLib.DestroyHelper.NotifyHandler; + } + IntPtr raw_ret = gst_meta_register_custom(native_name, native_tags, transform_func_wrapper.NativeDelegate, user_data, destroy_data); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + GLib.Marshaller.Free (native_name); + return ret; + } + + public static Gst.MetaInfo RegisterCustom(string name, string[] tags) { + return RegisterCustom (name, tags, null); + } + + static void ReadNative (IntPtr native, ref Gst.Meta target) + { + target = New (native); + } + + public bool Equals (Meta other) + { + return true && Flags.Equals (other.Flags) && info.Equals (other.info); + } + + public override bool Equals (object other) + { + return other is Meta && Equals ((Meta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Flags.GetHashCode () ^ info.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/MetaFlags.cs b/sources/generated/Gst/MetaFlags.cs new file mode 100644 index 0000000000..0bdd017563 --- /dev/null +++ b/sources/generated/Gst/MetaFlags.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.MetaFlagsGType))] + public enum MetaFlags : uint { + + None = 0, + Readonly = 1, + Pooled = 2, + Locked = 4, + Last = 65536, + } + + internal class MetaFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_meta_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_meta_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/MetaFreeFunction.cs b/sources/generated/Gst/MetaFreeFunction.cs new file mode 100644 index 0000000000..0dba44ca0c --- /dev/null +++ b/sources/generated/Gst/MetaFreeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MetaFreeFunction(Gst.Meta meta, Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst/MetaInfo.cs b/sources/generated/Gst/MetaInfo.cs new file mode 100644 index 0000000000..b55e79ac15 --- /dev/null +++ b/sources/generated/Gst/MetaInfo.cs @@ -0,0 +1,93 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MetaInfo : IEquatable { + + public GLib.GType Api; + public GLib.GType Type; + private UIntPtr size; + public ulong Size { + get { + return (ulong) size; + } + set { + size = new UIntPtr (value); + } + } + private GstSharp.MetaInitFunctionNative _init_func; + public Gst.MetaInitFunction InitFunc { + get { + return GstSharp.MetaInitFunctionWrapper.GetManagedDelegate (_init_func); + } + } + private GstSharp.MetaFreeFunctionNative _free_func; + public Gst.MetaFreeFunction FreeFunc { + get { + return GstSharp.MetaFreeFunctionWrapper.GetManagedDelegate (_free_func); + } + } + private GstSharp.MetaTransformFunctionNative _transform_func; + public Gst.MetaTransformFunction TransformFunc { + get { + return GstSharp.MetaTransformFunctionWrapper.GetManagedDelegate (_transform_func); + } + } + + public static Gst.MetaInfo Zero = new Gst.MetaInfo (); + + public static Gst.MetaInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.MetaInfo.Zero; + return (Gst.MetaInfo) Marshal.PtrToStructure (raw, typeof (Gst.MetaInfo)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_meta_info_is_custom(IntPtr raw); + + public bool IsCustom { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_meta_info_is_custom(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.MetaInfo target) + { + target = New (native); + } + + public bool Equals (MetaInfo other) + { + return true && Api.Equals (other.Api) && Type.Equals (other.Type) && Size.Equals (other.Size) && InitFunc.Equals (other.InitFunc) && FreeFunc.Equals (other.FreeFunc) && TransformFunc.Equals (other.TransformFunc); + } + + public override bool Equals (object other) + { + return other is MetaInfo && Equals ((MetaInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Api.GetHashCode () ^ Type.GetHashCode () ^ Size.GetHashCode () ^ InitFunc.GetHashCode () ^ FreeFunc.GetHashCode () ^ TransformFunc.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/MetaInitFunction.cs b/sources/generated/Gst/MetaInitFunction.cs new file mode 100644 index 0000000000..242799d460 --- /dev/null +++ b/sources/generated/Gst/MetaInitFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool MetaInitFunction(Gst.Meta meta, IntPtr parms, Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst/MetaTransformCopy.cs b/sources/generated/Gst/MetaTransformCopy.cs new file mode 100644 index 0000000000..cc20e651fb --- /dev/null +++ b/sources/generated/Gst/MetaTransformCopy.cs @@ -0,0 +1,63 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct MetaTransformCopy : IEquatable { + + public bool Region; + private UIntPtr offset; + public ulong Offset { + get { + return (ulong) offset; + } + set { + offset = new UIntPtr (value); + } + } + private UIntPtr size; + public ulong Size { + get { + return (ulong) size; + } + set { + size = new UIntPtr (value); + } + } + + public static Gst.MetaTransformCopy Zero = new Gst.MetaTransformCopy (); + + public static Gst.MetaTransformCopy New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.MetaTransformCopy.Zero; + return (Gst.MetaTransformCopy) Marshal.PtrToStructure (raw, typeof (Gst.MetaTransformCopy)); + } + + public bool Equals (MetaTransformCopy other) + { + return true && Region.Equals (other.Region) && Offset.Equals (other.Offset) && Size.Equals (other.Size); + } + + public override bool Equals (object other) + { + return other is MetaTransformCopy && Equals ((MetaTransformCopy) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Region.GetHashCode () ^ Offset.GetHashCode () ^ Size.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/MetaTransformFunction.cs b/sources/generated/Gst/MetaTransformFunction.cs new file mode 100644 index 0000000000..91290835e2 --- /dev/null +++ b/sources/generated/Gst/MetaTransformFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool MetaTransformFunction(Gst.Buffer transbuf, Gst.Meta meta, Gst.Buffer buffer, uint type, IntPtr data); + +} diff --git a/sources/generated/Gst/MiniObject.cs b/sources/generated/Gst/MiniObject.cs new file mode 100644 index 0000000000..f890308c65 --- /dev/null +++ b/sources/generated/Gst/MiniObject.cs @@ -0,0 +1,340 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class MiniObject : GLib.Opaque { + + public GLib.GType Type { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return new GLib.GType((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = value.Val; + } + } + } + + public int Refcount { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("refcount")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("refcount")); + *raw_ptr = value; + } + } + } + + public int Lockstate { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("lockstate")); + return (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("lockstate")); + *raw_ptr = value; + } + } + } + + public uint Flags { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + *raw_ptr = value; + } + } + } + + public IntPtr CopyFunc { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("copy")); + return (*raw_ptr); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("copy")); + *raw_ptr = value; + } + } + } + + public IntPtr Dispose { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("dispose")); + return (*raw_ptr); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("dispose")); + *raw_ptr = value; + } + } + } + + public IntPtr Free { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("free")); + return (*raw_ptr); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("free")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_mini_object_add_parent(IntPtr raw, IntPtr parent); + + public void AddParent(Gst.MiniObject parent) { + gst_mini_object_add_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mini_object_get_qdata(IntPtr raw, uint quark); + + public IntPtr GetQdata(uint quark) { + IntPtr raw_ret = gst_mini_object_get_qdata(Handle, quark); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mini_object_is_writable(IntPtr raw); + + public bool IsWritable { + get { + bool raw_ret = gst_mini_object_is_writable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_mini_object_lock(IntPtr raw, int flags); + + public bool Lock(Gst.LockFlags flags) { + bool raw_ret = gst_mini_object_lock(Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_mini_object_remove_parent(IntPtr raw, IntPtr parent); + + public void RemoveParent(Gst.MiniObject parent) { + gst_mini_object_remove_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_mini_object_set_qdata(IntPtr raw, uint quark, IntPtr data, GLib.DestroyNotify destroy); + + public void SetQdata(uint quark, IntPtr data, GLib.DestroyNotify destroy) { + gst_mini_object_set_qdata(Handle, quark, data, destroy); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mini_object_steal_qdata(IntPtr raw, uint quark); + + public IntPtr StealQdata(uint quark) { + IntPtr raw_ret = gst_mini_object_steal_qdata(Handle, quark); + IntPtr ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_mini_object_unlock(IntPtr raw, int flags); + + public void Unlock(Gst.LockFlags flags) { + gst_mini_object_unlock(Handle, (int) flags); + } + + public MiniObject(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mini_object_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_mini_object_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_mini_object_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_mini_object_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_mini_object_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , 0 + , (uint) Marshal.SizeOf(typeof(GLib.GType)) // type + , null + , "refcount" + , (long) Marshal.OffsetOf(typeof(GstMiniObject_typeAlign), "type") + , 0 + ), + new GLib.AbiField("refcount" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // refcount + , "type" + , "lockstate" + , (long) Marshal.OffsetOf(typeof(GstMiniObject_refcountAlign), "refcount") + , 0 + ), + new GLib.AbiField("lockstate" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // lockstate + , "refcount" + , "flags" + , (long) Marshal.OffsetOf(typeof(GstMiniObject_lockstateAlign), "lockstate") + , 0 + ), + new GLib.AbiField("flags" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // flags + , "lockstate" + , "copy" + , (long) Marshal.OffsetOf(typeof(GstMiniObject_flagsAlign), "flags") + , 0 + ), + new GLib.AbiField("copy" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // copy + , "flags" + , "dispose" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("dispose" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // dispose + , "copy" + , "free" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("free" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // free + , "dispose" + , "priv_uint" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv_uint" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // priv_uint + , "free" + , "priv_pointer" + , (long) Marshal.OffsetOf(typeof(GstMiniObject_priv_uintAlign), "priv_uint") + , 0 + ), + new GLib.AbiField("priv_pointer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv_pointer + , "priv_uint" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMiniObject_typeAlign + { + sbyte f1; + private GLib.GType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMiniObject_refcountAlign + { + sbyte f1; + private int refcount; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMiniObject_lockstateAlign + { + sbyte f1; + private int lockstate; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMiniObject_flagsAlign + { + sbyte f1; + private uint flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstMiniObject_priv_uintAlign + { + sbyte f1; + private uint priv_uint; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/MiniObjectCopyFunction.cs b/sources/generated/Gst/MiniObjectCopyFunction.cs new file mode 100644 index 0000000000..bbe4a15f66 --- /dev/null +++ b/sources/generated/Gst/MiniObjectCopyFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.MiniObject MiniObjectCopyFunction(Gst.MiniObject obj); + +} diff --git a/sources/generated/Gst/MiniObjectDisposeFunction.cs b/sources/generated/Gst/MiniObjectDisposeFunction.cs new file mode 100644 index 0000000000..12d2e91e08 --- /dev/null +++ b/sources/generated/Gst/MiniObjectDisposeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool MiniObjectDisposeFunction(Gst.MiniObject obj); + +} diff --git a/sources/generated/Gst/MiniObjectFlags.cs b/sources/generated/Gst/MiniObjectFlags.cs new file mode 100644 index 0000000000..4d2c3976a7 --- /dev/null +++ b/sources/generated/Gst/MiniObjectFlags.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.MiniObjectFlagsGType))] + public enum MiniObjectFlags : uint { + + Lockable = 1, + LockReadonly = 2, + MayBeLeaked = 4, + Last = 16, + } + + internal class MiniObjectFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_mini_object_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_mini_object_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/MiniObjectFreeFunction.cs b/sources/generated/Gst/MiniObjectFreeFunction.cs new file mode 100644 index 0000000000..c480a41378 --- /dev/null +++ b/sources/generated/Gst/MiniObjectFreeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MiniObjectFreeFunction(Gst.MiniObject obj); + +} diff --git a/sources/generated/Gst/MiniObjectNotify.cs b/sources/generated/Gst/MiniObjectNotify.cs new file mode 100644 index 0000000000..0370bd8aa7 --- /dev/null +++ b/sources/generated/Gst/MiniObjectNotify.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void MiniObjectNotify(Gst.MiniObject obj); + +} diff --git a/sources/generated/Gst/Object.cs b/sources/generated/Gst/Object.cs new file mode 100644 index 0000000000..076747a1c5 --- /dev/null +++ b/sources/generated/Gst/Object.cs @@ -0,0 +1,571 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Object : GLib.InitiallyUnowned { + + protected Object (IntPtr raw) : base(raw) {} + + protected Object() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_name(IntPtr raw); + + [GLib.Property ("name")] + public string Name { + get { + IntPtr raw_ret = gst_object_get_name(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("name", val); + val.Dispose (); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_parent(IntPtr raw); + + [GLib.Property ("parent")] + public Gst.Object Parent { + get { + IntPtr raw_ret = gst_object_get_parent(Handle); + Gst.Object ret = GLib.Object.GetObject(raw_ret, true) as Gst.Object; + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("parent", val); + val.Dispose (); + } + } + + public GLib.Mutex Lock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock")); + return new GLib.Mutex((*raw_ptr)); + } + } + } + + public string NameField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + public uint Flags { + get { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + return (*raw_ptr); + } + } + set { + unsafe { + uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_object_get_control_rate(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_set_control_rate(IntPtr raw, ulong control_rate); + + public ulong ControlRate { + get { + ulong raw_ret = gst_object_get_control_rate(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_object_set_control_rate(Handle, value); + } + } + + [GLib.Signal("deep-notify")] + public event Gst.DeepNotifyHandler DeepNotify { + add { + this.AddSignalHandler ("deep-notify", value, typeof (Gst.DeepNotifyArgs)); + } + remove { + this.RemoveSignalHandler ("deep-notify", value); + } + } + + static DeepNotifyNativeDelegate DeepNotify_cb_delegate; + static DeepNotifyNativeDelegate DeepNotifyVMCallback { + get { + if (DeepNotify_cb_delegate == null) + DeepNotify_cb_delegate = new DeepNotifyNativeDelegate (DeepNotify_cb); + return DeepNotify_cb_delegate; + } + } + + static void OverrideDeepNotify (GLib.GType gtype) + { + OverrideDeepNotify (gtype, DeepNotifyVMCallback); + } + + static void OverrideDeepNotify (GLib.GType gtype, DeepNotifyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_notify")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DeepNotifyNativeDelegate (IntPtr inst, IntPtr prop_object, IntPtr prop); + + static void DeepNotify_cb (IntPtr inst, IntPtr prop_object, IntPtr prop) + { + try { + Object __obj = GLib.Object.GetObject (inst, false) as Object; + __obj.OnDeepNotify (GLib.Object.GetObject(prop_object) as Gst.Object, prop); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Object), ConnectionMethod="OverrideDeepNotify")] + protected virtual void OnDeepNotify (Gst.Object prop_object, IntPtr prop) + { + InternalDeepNotify (prop_object, prop); + } + + private void InternalDeepNotify (Gst.Object prop_object, IntPtr prop) + { + DeepNotifyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_notify")); + unmanaged = (DeepNotifyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepNotifyNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, prop_object == null ? IntPtr.Zero : prop_object.Handle, prop); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("path_string_separator" + , GLib.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // path_string_separator + , null + , "deep_notify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("deep_notify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_notify + , "path_string_separator" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "deep_notify" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_object_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_check_uniqueness(IntPtr list, IntPtr name); + + public static bool CheckUniqueness(GLib.List list, string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_object_check_uniqueness(list == null ? IntPtr.Zero : list.Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_default_deep_notify(IntPtr _object, IntPtr orig, IntPtr pspec, IntPtr[] excluded_props); + + public static void DefaultDeepNotify(GLib.Object _object, Gst.Object orig, IntPtr pspec, string[] excluded_props) { + int cnt_excluded_props = excluded_props == null ? 0 : excluded_props.Length; + IntPtr[] native_excluded_props = new IntPtr [cnt_excluded_props + 1]; + for (int i = 0; i < cnt_excluded_props; i++) + native_excluded_props [i] = GLib.Marshaller.StringToPtrGStrdup (excluded_props[i]); + native_excluded_props [cnt_excluded_props] = IntPtr.Zero; + gst_object_default_deep_notify(_object == null ? IntPtr.Zero : _object.Handle, orig == null ? IntPtr.Zero : orig.Handle, pspec, native_excluded_props); + for (int i = 0; i < native_excluded_props.Length - 1; i++) { + excluded_props [i] = GLib.Marshaller.Utf8PtrToString (native_excluded_props[i]); + GLib.Marshaller.Free (native_excluded_props[i]); + } + } + + public static void DefaultDeepNotify(GLib.Object _object, Gst.Object orig, IntPtr pspec) { + DefaultDeepNotify (_object, orig, pspec, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_replace(IntPtr oldobj, IntPtr newobj); + + public static bool Replace(Gst.Object oldobj, Gst.Object newobj) { + bool raw_ret = gst_object_replace(oldobj == null ? IntPtr.Zero : oldobj.OwnedHandle, newobj == null ? IntPtr.Zero : newobj.Handle); + bool ret = raw_ret; + return ret; + } + + public static bool Replace() { + return Replace (null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_add_control_binding(IntPtr raw, IntPtr binding); + + public bool AddControlBinding(Gst.ControlBinding binding) { + bool raw_ret = gst_object_add_control_binding(Handle, binding == null ? IntPtr.Zero : binding.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_default_error(IntPtr raw, IntPtr error, IntPtr debug); + + public void DefaultError(IntPtr error, string debug) { + IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug); + gst_object_default_error(Handle, error, native_debug); + GLib.Marshaller.Free (native_debug); + } + + public void DefaultError(IntPtr error) { + DefaultError (error, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_control_binding(IntPtr raw, IntPtr property_name); + + public Gst.ControlBinding GetControlBinding(string property_name) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr raw_ret = gst_object_get_control_binding(Handle, native_property_name); + Gst.ControlBinding ret = GLib.Object.GetObject(raw_ret, true) as Gst.ControlBinding; + GLib.Marshaller.Free (native_property_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_get_g_value_array(IntPtr raw, IntPtr property_name, ulong timestamp, ulong interval, uint n_values, IntPtr[] values); + + public bool GetGValueArray(string property_name, ulong timestamp, ulong interval, GLib.Value[] values) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + int cnt_values = values == null ? 0 : values.Length; + IntPtr[] native_values = new IntPtr [cnt_values]; + for (int i = 0; i < cnt_values; i++) + native_values [i] = GLib.Marshaller.StructureToPtrAlloc (values[i]); + bool raw_ret = gst_object_get_g_value_array(Handle, native_property_name, timestamp, interval, (uint) (values == null ? 0 : values.Length), native_values); + bool ret = raw_ret; + GLib.Marshaller.Free (native_property_name); + for (int i = 0; i < native_values.Length; i++) { + values [i] = (GLib.Value) Marshal.PtrToStructure (native_values[i], typeof (GLib.Value)); + Marshal.FreeHGlobal (native_values[i]); + } + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_path_string(IntPtr raw); + + public string PathString { + get { + IntPtr raw_ret = gst_object_get_path_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_get_value(IntPtr raw, IntPtr property_name, ulong timestamp); + + public GLib.Value GetValue(string property_name, ulong timestamp) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + IntPtr raw_ret = gst_object_get_value(Handle, native_property_name, timestamp); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_property_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_has_active_control_bindings(IntPtr raw); + + public bool HasActiveControlBindings { + get { + bool raw_ret = gst_object_has_active_control_bindings(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_has_ancestor(IntPtr raw, IntPtr ancestor); + + [Obsolete] + public bool HasAncestor(Gst.Object ancestor) { + bool raw_ret = gst_object_has_ancestor(Handle, ancestor == null ? IntPtr.Zero : ancestor.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_has_as_ancestor(IntPtr raw, IntPtr ancestor); + + public bool HasAsAncestor(Gst.Object ancestor) { + bool raw_ret = gst_object_has_as_ancestor(Handle, ancestor == null ? IntPtr.Zero : ancestor.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_has_as_parent(IntPtr raw, IntPtr parent); + + public bool HasAsParent(Gst.Object parent) { + bool raw_ret = gst_object_has_as_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_ref(IntPtr raw); + + public Gst.Object Ref() { + IntPtr raw_ret = gst_object_ref(Handle); + Gst.Object ret = GLib.Object.GetObject(raw_ret, true) as Gst.Object; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_remove_control_binding(IntPtr raw, IntPtr binding); + + public bool RemoveControlBinding(Gst.ControlBinding binding) { + bool raw_ret = gst_object_remove_control_binding(Handle, binding == null ? IntPtr.Zero : binding.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_set_control_binding_disabled(IntPtr raw, IntPtr property_name, bool disabled); + + public void SetControlBindingDisabled(string property_name, bool disabled) { + IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + gst_object_set_control_binding_disabled(Handle, native_property_name, disabled); + GLib.Marshaller.Free (native_property_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_set_control_bindings_disabled(IntPtr raw, bool disabled); + + public bool ControlBindingsDisabled { + set { + gst_object_set_control_bindings_disabled(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_set_name(IntPtr raw, IntPtr name); + + public bool SetName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_object_set_name(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + public bool SetName() { + return SetName (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_set_parent(IntPtr raw, IntPtr parent); + + public bool SetParent(Gst.Object parent) { + bool raw_ret = gst_object_set_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_object_suggest_next_sync(IntPtr raw); + + public ulong SuggestNextSync() { + ulong raw_ret = gst_object_suggest_next_sync(Handle); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_object_sync_values(IntPtr raw, ulong timestamp); + + public bool SyncValues(ulong timestamp) { + bool raw_ret = gst_object_sync_values(Handle, timestamp); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_unparent(IntPtr raw); + + public void Unparent() { + gst_object_unparent(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_object_unref(IntPtr raw); + + public void Unref() { + gst_object_unref(Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("lock" + , GLib.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , null + , "name" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("name" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // name + , "lock" + , "parent" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("parent" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // parent + , "name" + , "flags" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("flags" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // flags + , "parent" + , "control_bindings" + , (long) Marshal.OffsetOf(typeof(GstObject_flagsAlign), "flags") + , 0 + ), + new GLib.AbiField("control_bindings" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // control_bindings + , "flags" + , "control_rate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("control_rate" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // control_rate + , "control_bindings" + , "last_sync" + , (long) Marshal.OffsetOf(typeof(GstObject_control_rateAlign), "control_rate") + , 0 + ), + new GLib.AbiField("last_sync" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // last_sync + , "control_rate" + , "_gst_reserved" + , (long) Marshal.OffsetOf(typeof(GstObject_last_syncAlign), "last_sync") + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // _gst_reserved + , "last_sync" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstObject_flagsAlign + { + sbyte f1; + private uint flags; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstObject_control_rateAlign + { + sbyte f1; + private ulong control_rate; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstObject_last_syncAlign + { + sbyte f1; + private ulong last_sync; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ObjectFlags.cs b/sources/generated/Gst/ObjectFlags.cs new file mode 100644 index 0000000000..e93718f3a1 --- /dev/null +++ b/sources/generated/Gst/ObjectFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.ObjectFlagsGType))] + public enum ObjectFlags : uint { + + MayBeLeaked = 1, + Last = 16, + } + + internal class ObjectFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_object_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_object_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Pad.cs b/sources/generated/Gst/Pad.cs new file mode 100644 index 0000000000..64a2f22d41 --- /dev/null +++ b/sources/generated/Gst/Pad.cs @@ -0,0 +1,1754 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Pad : Gst.Object { + + public Pad (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_new(IntPtr name, int direction); + + public Pad (string name, Gst.PadDirection direction) : base (IntPtr.Zero) + { + if (GetType () != typeof (Pad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + names.Add ("direction"); + vals.Add (new GLib.Value (direction)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_pad_new(native_name, (int) direction); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_new_from_static_template(IntPtr templ, IntPtr name); + + public Pad (Gst.StaticPadTemplate templ, string name) : base (IntPtr.Zero) + { + if (GetType () != typeof (Pad)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_templ = GLib.Marshaller.StructureToPtrAlloc (templ); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_pad_new_from_static_template(native_templ, native_name); + Marshal.FreeHGlobal (native_templ); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_new_from_template(IntPtr templ, IntPtr name); + + public Pad (Gst.PadTemplate templ, string name) : base (IntPtr.Zero) + { + if (GetType () != typeof (Pad)) { + var vals = new List (); + var names = new List (); + if (templ != null) { + names.Add ("name"); + vals.Add (new GLib.Value (name)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_pad_new_from_template(templ == null ? IntPtr.Zero : templ.Handle, native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_get_direction(IntPtr raw); + + [GLib.Property ("direction")] + public Gst.PadDirection Direction { + get { + int raw_ret = gst_pad_get_direction(Handle); + Gst.PadDirection ret = (Gst.PadDirection) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_pad_get_offset(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_offset(IntPtr raw, long offset); + + [GLib.Property ("offset")] + public long Offset { + get { + long raw_ret = gst_pad_get_offset(Handle); + long ret = raw_ret; + return ret; + } + set { + gst_pad_set_offset(Handle, value); + } + } + + [GLib.Property ("template")] + public Gst.PadTemplate Template { + get { + GLib.Value val = GetProperty ("template"); + Gst.PadTemplate ret = (Gst.PadTemplate) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("template", val); + val.Dispose (); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_element_private(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_element_private(IntPtr raw, IntPtr priv); + + public IntPtr ElementPrivate { + get { + IntPtr raw_ret = gst_pad_get_element_private(Handle); + IntPtr ret = raw_ret; + return ret; + } + set { + gst_pad_set_element_private(Handle, value); + } + } + + public Gst.PadTemplate Padtemplate { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("padtemplate")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.PadTemplate; + } + } + } + + public Gst.PadDirection DirectionField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("direction")); + return (Gst.PadDirection) (*raw_ptr); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_peer(IntPtr raw); + + public Gst.Pad Peer { + get { + IntPtr raw_ret = gst_pad_get_peer(Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + return ret; + } + } + + [GLib.Signal("unlinked")] + public event Gst.UnlinkedHandler Unlinked { + add { + this.AddSignalHandler ("unlinked", value, typeof (Gst.UnlinkedArgs)); + } + remove { + this.RemoveSignalHandler ("unlinked", value); + } + } + + [GLib.Signal("linked")] + public event Gst.LinkedHandler Linked { + add { + this.AddSignalHandler ("linked", value, typeof (Gst.LinkedArgs)); + } + remove { + this.RemoveSignalHandler ("linked", value); + } + } + + static LinkedNativeDelegate Linked_cb_delegate; + static LinkedNativeDelegate LinkedVMCallback { + get { + if (Linked_cb_delegate == null) + Linked_cb_delegate = new LinkedNativeDelegate (Linked_cb); + return Linked_cb_delegate; + } + } + + static void OverrideLinked (GLib.GType gtype) + { + OverrideLinked (gtype, LinkedVMCallback); + } + + static void OverrideLinked (GLib.GType gtype, LinkedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("linked")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void LinkedNativeDelegate (IntPtr inst, IntPtr peer); + + static void Linked_cb (IntPtr inst, IntPtr peer) + { + try { + Pad __obj = GLib.Object.GetObject (inst, false) as Pad; + __obj.OnLinked (GLib.Object.GetObject(peer) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Pad), ConnectionMethod="OverrideLinked")] + protected virtual void OnLinked (Gst.Pad peer) + { + InternalLinked (peer); + } + + private void InternalLinked (Gst.Pad peer) + { + LinkedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("linked")); + unmanaged = (LinkedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LinkedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, peer == null ? IntPtr.Zero : peer.Handle); + } + + static UnlinkedNativeDelegate Unlinked_cb_delegate; + static UnlinkedNativeDelegate UnlinkedVMCallback { + get { + if (Unlinked_cb_delegate == null) + Unlinked_cb_delegate = new UnlinkedNativeDelegate (Unlinked_cb); + return Unlinked_cb_delegate; + } + } + + static void OverrideUnlinked (GLib.GType gtype) + { + OverrideUnlinked (gtype, UnlinkedVMCallback); + } + + static void OverrideUnlinked (GLib.GType gtype, UnlinkedNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unlinked")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void UnlinkedNativeDelegate (IntPtr inst, IntPtr peer); + + static void Unlinked_cb (IntPtr inst, IntPtr peer) + { + try { + Pad __obj = GLib.Object.GetObject (inst, false) as Pad; + __obj.OnUnlinked (GLib.Object.GetObject(peer) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Pad), ConnectionMethod="OverrideUnlinked")] + protected virtual void OnUnlinked (Gst.Pad peer) + { + InternalUnlinked (peer); + } + + private void InternalUnlinked (Gst.Pad peer) + { + UnlinkedNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unlinked")); + unmanaged = (UnlinkedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnlinkedNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, peer == null ? IntPtr.Zero : peer.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("linked" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // linked + , null + , "unlinked" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlinked" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlinked + , "linked" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "unlinked" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_link_get_name(int _ret); + + public static string LinkGetName(Gst.PadLinkReturn _ret) { + IntPtr raw_ret = gst_pad_link_get_name((int) _ret); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_activate_mode(IntPtr raw, int mode, bool active); + + public bool ActivateMode(Gst.PadMode mode, bool active) { + bool raw_ret = gst_pad_activate_mode(Handle, (int) mode, active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern UIntPtr gst_pad_add_probe(IntPtr raw, int mask, GstSharp.PadProbeCallbackNative cb, IntPtr user_data, GLib.DestroyNotify destroy_data); + + public ulong AddProbe(Gst.PadProbeType mask, Gst.PadProbeCallback cb) { + GstSharp.PadProbeCallbackWrapper cb_wrapper = new GstSharp.PadProbeCallbackWrapper (cb); + IntPtr user_data; + GLib.DestroyNotify destroy_data; + if (cb == null) { + user_data = IntPtr.Zero; + destroy_data = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (cb_wrapper); + destroy_data = GLib.DestroyHelper.NotifyHandler; + } + UIntPtr raw_ret = gst_pad_add_probe(Handle, (int) mask, cb_wrapper.NativeDelegate, user_data, destroy_data); + ulong ret = (ulong) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_can_link(IntPtr raw, IntPtr sinkpad); + + public bool CanLink(Gst.Pad sinkpad) { + bool raw_ret = gst_pad_can_link(Handle, sinkpad == null ? IntPtr.Zero : sinkpad.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_chain(IntPtr raw, IntPtr buffer); + + public Gst.FlowReturn Chain(Gst.Buffer buffer) { + buffer.Owned = false; + int raw_ret = gst_pad_chain(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_chain_list(IntPtr raw, IntPtr list); + + public Gst.FlowReturn ChainList(Gst.BufferList list) { + list.Owned = false; + int raw_ret = gst_pad_chain_list(Handle, list == null ? IntPtr.Zero : list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_check_reconfigure(IntPtr raw); + + public bool CheckReconfigure() { + bool raw_ret = gst_pad_check_reconfigure(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_create_stream_id(IntPtr raw, IntPtr parent, IntPtr stream_id); + + public string CreateStreamId(Gst.Element parent, string stream_id) { + IntPtr native_stream_id = GLib.Marshaller.StringToPtrGStrdup (stream_id); + IntPtr raw_ret = gst_pad_create_stream_id(Handle, parent == null ? IntPtr.Zero : parent.Handle, native_stream_id); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_stream_id); + return ret; + } + + public string CreateStreamId(Gst.Element parent) { + return CreateStreamId (parent, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_event_default(IntPtr raw, IntPtr parent, IntPtr evnt); + + public bool EventDefault(Gst.Object parent, Gst.Event evnt) { + evnt.Owned = false; + bool raw_ret = gst_pad_event_default(Handle, parent == null ? IntPtr.Zero : parent.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + public bool EventDefault(Gst.Event evnt) { + return EventDefault (null, evnt); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_forward(IntPtr raw, GstSharp.PadForwardFunctionNative forward, IntPtr user_data); + + public bool Forward(Gst.PadForwardFunction forward) { + GstSharp.PadForwardFunctionWrapper forward_wrapper = new GstSharp.PadForwardFunctionWrapper (forward); + bool raw_ret = gst_pad_forward(Handle, forward_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_allowed_caps(IntPtr raw); + + public Gst.Caps AllowedCaps { + get { + IntPtr raw_ret = gst_pad_get_allowed_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_current_caps(IntPtr raw); + + public Gst.Caps CurrentCaps { + get { + IntPtr raw_ret = gst_pad_get_current_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_get_last_flow_return(IntPtr raw); + + public Gst.FlowReturn LastFlowReturn { + get { + int raw_ret = gst_pad_get_last_flow_return(Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_pad_template(IntPtr raw); + + public Gst.PadTemplate PadTemplate { + get { + IntPtr raw_ret = gst_pad_get_pad_template(Handle); + Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret, true) as Gst.PadTemplate; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_pad_template_caps(IntPtr raw); + + public Gst.Caps PadTemplateCaps { + get { + IntPtr raw_ret = gst_pad_get_pad_template_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_parent_element(IntPtr raw); + + public Gst.Element ParentElement { + get { + IntPtr raw_ret = gst_pad_get_parent_element(Handle); + Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_get_range(IntPtr raw, ulong offset, uint size, out IntPtr buffer); + + public Gst.FlowReturn GetRange(ulong offset, uint size, out Gst.Buffer buffer) { + IntPtr native_buffer; + int raw_ret = gst_pad_get_range(Handle, offset, size, out native_buffer); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_single_internal_link(IntPtr raw); + + public Gst.Pad SingleInternalLink { + get { + IntPtr raw_ret = gst_pad_get_single_internal_link(Handle); + Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_sticky_event(IntPtr raw, int event_type, uint idx); + + public Gst.Event GetStickyEvent(Gst.EventType event_type, uint idx) { + IntPtr raw_ret = gst_pad_get_sticky_event(Handle, (int) event_type, idx); + Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_stream(IntPtr raw); + + public Gst.Stream Stream { + get { + IntPtr raw_ret = gst_pad_get_stream(Handle); + Gst.Stream ret = GLib.Object.GetObject(raw_ret, true) as Gst.Stream; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_get_stream_id(IntPtr raw); + + public string StreamId { + get { + IntPtr raw_ret = gst_pad_get_stream_id(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_get_task_state(IntPtr raw); + + public Gst.TaskState TaskState { + get { + int raw_ret = gst_pad_get_task_state(Handle); + Gst.TaskState ret = (Gst.TaskState) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_has_current_caps(IntPtr raw); + + public bool HasCurrentCaps { + get { + bool raw_ret = gst_pad_has_current_caps(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_is_active(IntPtr raw); + + public bool IsActive { + get { + bool raw_ret = gst_pad_is_active(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_is_blocked(IntPtr raw); + + public bool IsBlocked { + get { + bool raw_ret = gst_pad_is_blocked(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_is_blocking(IntPtr raw); + + public bool IsBlocking { + get { + bool raw_ret = gst_pad_is_blocking(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_is_linked(IntPtr raw); + + public bool IsLinked { + get { + bool raw_ret = gst_pad_is_linked(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_iterate_internal_links(IntPtr raw); + + public Gst.Iterator IterateInternalLinks() { + IntPtr raw_ret = gst_pad_iterate_internal_links(Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_iterate_internal_links_default(IntPtr raw, IntPtr parent); + + public Gst.Iterator IterateInternalLinksDefault(Gst.Object parent) { + IntPtr raw_ret = gst_pad_iterate_internal_links_default(Handle, parent == null ? IntPtr.Zero : parent.Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + public Gst.Iterator IterateInternalLinksDefault() { + return IterateInternalLinksDefault (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_link(IntPtr raw, IntPtr sinkpad); + + public Gst.PadLinkReturn Link(Gst.Pad sinkpad) { + int raw_ret = gst_pad_link(Handle, sinkpad == null ? IntPtr.Zero : sinkpad.Handle); + Gst.PadLinkReturn ret = (Gst.PadLinkReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_link_full(IntPtr raw, IntPtr sinkpad, int flags); + + public Gst.PadLinkReturn LinkFull(Gst.Pad sinkpad, Gst.PadLinkCheck flags) { + int raw_ret = gst_pad_link_full(Handle, sinkpad == null ? IntPtr.Zero : sinkpad.Handle, (int) flags); + Gst.PadLinkReturn ret = (Gst.PadLinkReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_link_maybe_ghosting(IntPtr raw, IntPtr sink); + + public bool LinkMaybeGhosting(Gst.Pad sink) { + bool raw_ret = gst_pad_link_maybe_ghosting(Handle, sink == null ? IntPtr.Zero : sink.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_link_maybe_ghosting_full(IntPtr raw, IntPtr sink, int flags); + + public bool LinkMaybeGhostingFull(Gst.Pad sink, Gst.PadLinkCheck flags) { + bool raw_ret = gst_pad_link_maybe_ghosting_full(Handle, sink == null ? IntPtr.Zero : sink.Handle, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_mark_reconfigure(IntPtr raw); + + public void MarkReconfigure() { + gst_pad_mark_reconfigure(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_needs_reconfigure(IntPtr raw); + + public bool NeedsReconfigure() { + bool raw_ret = gst_pad_needs_reconfigure(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_pause_task(IntPtr raw); + + public bool PauseTask() { + bool raw_ret = gst_pad_pause_task(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_peer_query(IntPtr raw, IntPtr query); + + public bool PeerQuery(Gst.Query query) { + bool raw_ret = gst_pad_peer_query(Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_peer_query_accept_caps(IntPtr raw, IntPtr caps); + + public bool PeerQueryAcceptCaps(Gst.Caps caps) { + bool raw_ret = gst_pad_peer_query_accept_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_peer_query_caps(IntPtr raw, IntPtr filter); + + public Gst.Caps PeerQueryCaps(Gst.Caps filter) { + IntPtr raw_ret = gst_pad_peer_query_caps(Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps PeerQueryCaps() { + return PeerQueryCaps (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_peer_query_convert(IntPtr raw, int src_format, long src_val, int dest_format, out long dest_val); + + public bool PeerQueryConvert(Gst.Format src_format, long src_val, Gst.Format dest_format, out long dest_val) { + bool raw_ret = gst_pad_peer_query_convert(Handle, (int) src_format, src_val, (int) dest_format, out dest_val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_peer_query_duration(IntPtr raw, int format, out long duration); + + public bool PeerQueryDuration(Gst.Format format, out long duration) { + bool raw_ret = gst_pad_peer_query_duration(Handle, (int) format, out duration); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_peer_query_position(IntPtr raw, int format, out long cur); + + public bool PeerQueryPosition(Gst.Format format, out long cur) { + bool raw_ret = gst_pad_peer_query_position(Handle, (int) format, out cur); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_proxy_query_accept_caps(IntPtr raw, IntPtr query); + + public bool ProxyQueryAcceptCaps(Gst.Query query) { + bool raw_ret = gst_pad_proxy_query_accept_caps(Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_proxy_query_caps(IntPtr raw, IntPtr query); + + public bool ProxyQueryCaps(Gst.Query query) { + bool raw_ret = gst_pad_proxy_query_caps(Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_pull_range(IntPtr raw, ulong offset, uint size, out IntPtr buffer); + + public Gst.FlowReturn PullRange(ulong offset, uint size, out Gst.Buffer buffer) { + IntPtr native_buffer; + int raw_ret = gst_pad_pull_range(Handle, offset, size, out native_buffer); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_push(IntPtr raw, IntPtr buffer); + + public Gst.FlowReturn Push(Gst.Buffer buffer) { + buffer.Owned = false; + int raw_ret = gst_pad_push(Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_push_event(IntPtr raw, IntPtr evnt); + + public bool PushEvent(Gst.Event evnt) { + evnt.Owned = false; + bool raw_ret = gst_pad_push_event(Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_push_list(IntPtr raw, IntPtr list); + + public Gst.FlowReturn PushList(Gst.BufferList list) { + list.Owned = false; + int raw_ret = gst_pad_push_list(Handle, list == null ? IntPtr.Zero : list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query(IntPtr raw, IntPtr query); + + public bool Query(Gst.Query query) { + bool raw_ret = gst_pad_query(Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query_accept_caps(IntPtr raw, IntPtr caps); + + public bool QueryAcceptCaps(Gst.Caps caps) { + bool raw_ret = gst_pad_query_accept_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_query_caps(IntPtr raw, IntPtr filter); + + public Gst.Caps QueryCaps(Gst.Caps filter) { + IntPtr raw_ret = gst_pad_query_caps(Handle, filter == null ? IntPtr.Zero : filter.Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public Gst.Caps QueryCaps() { + return QueryCaps (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query_convert(IntPtr raw, int src_format, long src_val, int dest_format, out long dest_val); + + public bool QueryConvert(Gst.Format src_format, long src_val, Gst.Format dest_format, out long dest_val) { + bool raw_ret = gst_pad_query_convert(Handle, (int) src_format, src_val, (int) dest_format, out dest_val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query_default(IntPtr raw, IntPtr parent, IntPtr query); + + public bool QueryDefault(Gst.Object parent, Gst.Query query) { + bool raw_ret = gst_pad_query_default(Handle, parent == null ? IntPtr.Zero : parent.Handle, query == null ? IntPtr.Zero : query.Handle); + bool ret = raw_ret; + return ret; + } + + public bool QueryDefault(Gst.Query query) { + return QueryDefault (null, query); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query_duration(IntPtr raw, int format, out long duration); + + public bool QueryDuration(Gst.Format format, out long duration) { + bool raw_ret = gst_pad_query_duration(Handle, (int) format, out duration); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_query_position(IntPtr raw, int format, out long cur); + + public bool QueryPosition(Gst.Format format, out long cur) { + bool raw_ret = gst_pad_query_position(Handle, (int) format, out cur); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_remove_probe(IntPtr raw, UIntPtr id); + + public void RemoveProbe(ulong id) { + gst_pad_remove_probe(Handle, new UIntPtr (id)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_send_event(IntPtr raw, IntPtr evnt); + + public bool SendEvent(Gst.Event evnt) { + evnt.Owned = false; + bool raw_ret = gst_pad_send_event(Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_activate_function_full(IntPtr raw, GstSharp.PadActivateFunctionNative activate, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadActivateFunction ActivateFunctionFull { + set { + GstSharp.PadActivateFunctionWrapper value_wrapper = new GstSharp.PadActivateFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_activate_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_activatemode_function_full(IntPtr raw, GstSharp.PadActivateModeFunctionNative activatemode, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadActivateModeFunction ActivatemodeFunctionFull { + set { + GstSharp.PadActivateModeFunctionWrapper value_wrapper = new GstSharp.PadActivateModeFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_activatemode_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_set_active(IntPtr raw, bool active); + + public bool SetActive(bool active) { + bool raw_ret = gst_pad_set_active(Handle, active); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_chain_function_full(IntPtr raw, GstSharp.PadChainFunctionNative chain, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadChainFunction ChainFunctionFull { + set { + GstSharp.PadChainFunctionWrapper value_wrapper = new GstSharp.PadChainFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_chain_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_chain_list_function_full(IntPtr raw, GstSharp.PadChainListFunctionNative chainlist, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadChainListFunction ChainListFunctionFull { + set { + GstSharp.PadChainListFunctionWrapper value_wrapper = new GstSharp.PadChainListFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_chain_list_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_event_full_function_full(IntPtr raw, GstSharp.PadEventFullFunctionNative evnt, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadEventFullFunction EventFullFunctionFull { + set { + GstSharp.PadEventFullFunctionWrapper value_wrapper = new GstSharp.PadEventFullFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_event_full_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_event_function_full(IntPtr raw, GstSharp.PadEventFunctionNative evnt, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadEventFunction EventFunctionFull { + set { + GstSharp.PadEventFunctionWrapper value_wrapper = new GstSharp.PadEventFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_event_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_getrange_function_full(IntPtr raw, GstSharp.PadGetRangeFunctionNative get, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadGetRangeFunction GetrangeFunctionFull { + set { + GstSharp.PadGetRangeFunctionWrapper value_wrapper = new GstSharp.PadGetRangeFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_getrange_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_iterate_internal_links_function_full(IntPtr raw, GstSharp.PadIterIntLinkFunctionNative iterintlink, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadIterIntLinkFunction IterateInternalLinksFunctionFull { + set { + GstSharp.PadIterIntLinkFunctionWrapper value_wrapper = new GstSharp.PadIterIntLinkFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_iterate_internal_links_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_link_function_full(IntPtr raw, GstSharp.PadLinkFunctionNative link, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadLinkFunction LinkFunctionFull { + set { + GstSharp.PadLinkFunctionWrapper value_wrapper = new GstSharp.PadLinkFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_link_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_query_function_full(IntPtr raw, GstSharp.PadQueryFunctionNative query, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadQueryFunction QueryFunctionFull { + set { + GstSharp.PadQueryFunctionWrapper value_wrapper = new GstSharp.PadQueryFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_query_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_set_unlink_function_full(IntPtr raw, GstSharp.PadUnlinkFunctionNative unlink, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.PadUnlinkFunction UnlinkFunctionFull { + set { + GstSharp.PadUnlinkFunctionWrapper value_wrapper = new GstSharp.PadUnlinkFunctionWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_pad_set_unlink_function_full(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_start_task(IntPtr raw, GstSharp.TaskFunctionNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public bool StartTask(Gst.TaskFunction func) { + GstSharp.TaskFunctionWrapper func_wrapper = new GstSharp.TaskFunctionWrapper (func); + IntPtr user_data; + GLib.DestroyNotify notify; + if (func == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + bool raw_ret = gst_pad_start_task(Handle, func_wrapper.NativeDelegate, user_data, notify); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_sticky_events_foreach(IntPtr raw, GstSharp.PadStickyEventsForeachFunctionNative foreach_func, IntPtr user_data); + + public void StickyEventsForeach(Gst.PadStickyEventsForeachFunction foreach_func) { + GstSharp.PadStickyEventsForeachFunctionWrapper foreach_func_wrapper = new GstSharp.PadStickyEventsForeachFunctionWrapper (foreach_func); + gst_pad_sticky_events_foreach(Handle, foreach_func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_stop_task(IntPtr raw); + + public bool StopTask() { + bool raw_ret = gst_pad_stop_task(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_pad_store_sticky_event(IntPtr raw, IntPtr evnt); + + public Gst.FlowReturn StoreStickyEvent(Gst.Event evnt) { + int raw_ret = gst_pad_store_sticky_event(Handle, evnt == null ? IntPtr.Zero : evnt.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pad_unlink(IntPtr raw, IntPtr sinkpad); + + public bool Unlink(Gst.Pad sinkpad) { + bool raw_ret = gst_pad_unlink(Handle, sinkpad == null ? IntPtr.Zero : sinkpad.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_use_fixed_caps(IntPtr raw); + + public void UseFixedCaps() { + gst_pad_use_fixed_caps(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_mode_get_name(int mode); + + public static string ModeGetName(Gst.PadMode mode) { + IntPtr raw_ret = gst_pad_mode_get_name((int) mode); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("element_private" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // element_private + , null + , "padtemplate" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("padtemplate" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // padtemplate + , "element_private" + , "direction" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("direction" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.PadDirection))) // direction + , "padtemplate" + , "stream_rec_lock" + , (long) Marshal.OffsetOf(typeof(GstPad_directionAlign), "direction") + , 0 + ), + new GLib.AbiField("stream_rec_lock" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_rec_lock + , "direction" + , "task" + , (long) Marshal.OffsetOf(typeof(GstPad_stream_rec_lockAlign), "stream_rec_lock") + , 0 + ), + new GLib.AbiField("task" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // task + , "stream_rec_lock" + , "block_cond" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("block_cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // block_cond + , "task" + , "probes" + , (long) Marshal.OffsetOf(typeof(GstPad_block_condAlign), "block_cond") + , 0 + ), + new GLib.AbiField("probes" + , -1 + , GLib.HookList.abi_info.Size // probes + , "block_cond" + , "mode" + , (long) Marshal.OffsetOf(typeof(GstPad_probesAlign), "probes") + , 0 + ), + new GLib.AbiField("mode" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.PadMode))) // mode + , "probes" + , "activatefunc" + , (long) Marshal.OffsetOf(typeof(GstPad_modeAlign), "mode") + , 0 + ), + new GLib.AbiField("activatefunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatefunc + , "mode" + , "activatedata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activatedata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatedata + , "activatefunc" + , "activatenotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activatenotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatenotify + , "activatedata" + , "activatemodefunc" + , (long) Marshal.OffsetOf(typeof(GstPad_activatenotifyAlign), "activatenotify") + , 0 + ), + new GLib.AbiField("activatemodefunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatemodefunc + , "activatenotify" + , "activatemodedata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activatemodedata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatemodedata + , "activatemodefunc" + , "activatemodenotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("activatemodenotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // activatemodenotify + , "activatemodedata" + , "peer" + , (long) Marshal.OffsetOf(typeof(GstPad_activatemodenotifyAlign), "activatemodenotify") + , 0 + ), + new GLib.AbiField("peer" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // peer + , "activatemodenotify" + , "linkfunc" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("linkfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // linkfunc + , "peer" + , "linkdata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("linkdata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // linkdata + , "linkfunc" + , "linknotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("linknotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // linknotify + , "linkdata" + , "unlinkfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_linknotifyAlign), "linknotify") + , 0 + ), + new GLib.AbiField("unlinkfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlinkfunc + , "linknotify" + , "unlinkdata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlinkdata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlinkdata + , "unlinkfunc" + , "unlinknotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("unlinknotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // unlinknotify + , "unlinkdata" + , "chainfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_unlinknotifyAlign), "unlinknotify") + , 0 + ), + new GLib.AbiField("chainfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chainfunc + , "unlinknotify" + , "chaindata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("chaindata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chaindata + , "chainfunc" + , "chainnotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("chainnotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chainnotify + , "chaindata" + , "chainlistfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_chainnotifyAlign), "chainnotify") + , 0 + ), + new GLib.AbiField("chainlistfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chainlistfunc + , "chainnotify" + , "chainlistdata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("chainlistdata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chainlistdata + , "chainlistfunc" + , "chainlistnotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("chainlistnotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // chainlistnotify + , "chainlistdata" + , "getrangefunc" + , (long) Marshal.OffsetOf(typeof(GstPad_chainlistnotifyAlign), "chainlistnotify") + , 0 + ), + new GLib.AbiField("getrangefunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getrangefunc + , "chainlistnotify" + , "getrangedata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getrangedata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getrangedata + , "getrangefunc" + , "getrangenotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("getrangenotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // getrangenotify + , "getrangedata" + , "eventfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_getrangenotifyAlign), "getrangenotify") + , 0 + ), + new GLib.AbiField("eventfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // eventfunc + , "getrangenotify" + , "eventdata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("eventdata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // eventdata + , "eventfunc" + , "eventnotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("eventnotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // eventnotify + , "eventdata" + , "offset" + , (long) Marshal.OffsetOf(typeof(GstPad_eventnotifyAlign), "eventnotify") + , 0 + ), + new GLib.AbiField("offset" + , -1 + , (uint) Marshal.SizeOf(typeof(long)) // offset + , "eventnotify" + , "queryfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_offsetAlign), "offset") + , 0 + ), + new GLib.AbiField("queryfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // queryfunc + , "offset" + , "querydata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("querydata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // querydata + , "queryfunc" + , "querynotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("querynotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // querynotify + , "querydata" + , "iterintlinkfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_querynotifyAlign), "querynotify") + , 0 + ), + new GLib.AbiField("iterintlinkfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // iterintlinkfunc + , "querynotify" + , "iterintlinkdata" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("iterintlinkdata" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // iterintlinkdata + , "iterintlinkfunc" + , "iterintlinknotify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("iterintlinknotify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // iterintlinknotify + , "iterintlinkdata" + , "num_probes" + , (long) Marshal.OffsetOf(typeof(GstPad_iterintlinknotifyAlign), "iterintlinknotify") + , 0 + ), + new GLib.AbiField("num_probes" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // num_probes + , "iterintlinknotify" + , "num_blocked" + , (long) Marshal.OffsetOf(typeof(GstPad_num_probesAlign), "num_probes") + , 0 + ), + new GLib.AbiField("num_blocked" + , -1 + , (uint) Marshal.SizeOf(typeof(int)) // num_blocked + , "num_probes" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstPad_num_blockedAlign), "num_blocked") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "num_blocked" + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + // union struct ABI.abi + new GLib.AbiField("ABI.abi.last_flowret" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.FlowReturn))) // ABI.abi.last_flowret + , "priv" + , "ABI.abi.eventfullfunc" + , (long) Marshal.OffsetOf(typeof(GstPad_ABI_abi_last_flowretAlign), "ABI_abi_last_flowret") + , 0 + ), + new GLib.AbiField("ABI.abi.eventfullfunc" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ABI.abi.eventfullfunc + , "ABI.abi.last_flowret" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI.abi + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI._gst_reserved"}, + new List() {"ABI.abi.last_flowret","ABI.abi.eventfullfunc"} + } + , "priv" + , null + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_directionAlign + { + sbyte f1; + private Gst.PadDirection direction; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_stream_rec_lockAlign + { + sbyte f1; + private GLib.RecMutex.ABI stream_rec_lock; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_block_condAlign + { + sbyte f1; + private GLib.Cond.ABI block_cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_probesAlign + { + sbyte f1; + private GLib.HookList probes; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_modeAlign + { + sbyte f1; + private Gst.PadMode mode; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_activatenotifyAlign + { + sbyte f1; + private GLib.DestroyNotify activatenotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_activatemodenotifyAlign + { + sbyte f1; + private GLib.DestroyNotify activatemodenotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_linknotifyAlign + { + sbyte f1; + private GLib.DestroyNotify linknotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_unlinknotifyAlign + { + sbyte f1; + private GLib.DestroyNotify unlinknotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_chainnotifyAlign + { + sbyte f1; + private GLib.DestroyNotify chainnotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_chainlistnotifyAlign + { + sbyte f1; + private GLib.DestroyNotify chainlistnotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_getrangenotifyAlign + { + sbyte f1; + private GLib.DestroyNotify getrangenotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_eventnotifyAlign + { + sbyte f1; + private GLib.DestroyNotify eventnotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_offsetAlign + { + sbyte f1; + private long offset; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_querynotifyAlign + { + sbyte f1; + private GLib.DestroyNotify querynotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_iterintlinknotifyAlign + { + sbyte f1; + private GLib.DestroyNotify iterintlinknotify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_num_probesAlign + { + sbyte f1; + private int num_probes; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_num_blockedAlign + { + sbyte f1; + private int num_blocked; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPad_ABI_abi_last_flowretAlign + { + sbyte f1; + private Gst.FlowReturn ABI_abi_last_flowret; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PadActivateFunction.cs b/sources/generated/Gst/PadActivateFunction.cs new file mode 100644 index 0000000000..17e6e00bbc --- /dev/null +++ b/sources/generated/Gst/PadActivateFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadActivateFunction(Gst.Pad pad, Gst.Object parent); + +} diff --git a/sources/generated/Gst/PadActivateModeFunction.cs b/sources/generated/Gst/PadActivateModeFunction.cs new file mode 100644 index 0000000000..d608ac2dde --- /dev/null +++ b/sources/generated/Gst/PadActivateModeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadActivateModeFunction(Gst.Pad pad, Gst.Object parent, Gst.PadMode mode, bool active); + +} diff --git a/sources/generated/Gst/PadAddedHandler.cs b/sources/generated/Gst/PadAddedHandler.cs new file mode 100644 index 0000000000..8ab31ee87f --- /dev/null +++ b/sources/generated/Gst/PadAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PadAddedHandler(object o, PadAddedArgs args); + + public class PadAddedArgs : GLib.SignalArgs { + public Gst.Pad NewPad{ + get { + return (Gst.Pad) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/PadChainFunction.cs b/sources/generated/Gst/PadChainFunction.cs new file mode 100644 index 0000000000..235c68a5d3 --- /dev/null +++ b/sources/generated/Gst/PadChainFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.FlowReturn PadChainFunction(Gst.Pad pad, Gst.Object parent, Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst/PadChainListFunction.cs b/sources/generated/Gst/PadChainListFunction.cs new file mode 100644 index 0000000000..e61d9fcabb --- /dev/null +++ b/sources/generated/Gst/PadChainListFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.FlowReturn PadChainListFunction(Gst.Pad pad, Gst.Object parent, Gst.BufferList list); + +} diff --git a/sources/generated/Gst/PadCreatedEventHandler.cs b/sources/generated/Gst/PadCreatedEventHandler.cs new file mode 100644 index 0000000000..78a614c963 --- /dev/null +++ b/sources/generated/Gst/PadCreatedEventHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PadCreatedEventHandler(object o, PadCreatedEventArgs args); + + public class PadCreatedEventArgs : GLib.SignalArgs { + public Gst.Pad Pad{ + get { + return (Gst.Pad) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/PadDirection.cs b/sources/generated/Gst/PadDirection.cs new file mode 100644 index 0000000000..e656650135 --- /dev/null +++ b/sources/generated/Gst/PadDirection.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PadDirectionGType))] + public enum PadDirection { + + Unknown = 0, + Src = 1, + Sink = 2, + } + + internal class PadDirectionGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_direction_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_direction_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadEventFullFunction.cs b/sources/generated/Gst/PadEventFullFunction.cs new file mode 100644 index 0000000000..d654e29d17 --- /dev/null +++ b/sources/generated/Gst/PadEventFullFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.FlowReturn PadEventFullFunction(Gst.Pad pad, Gst.Object parent, Gst.Event evnt); + +} diff --git a/sources/generated/Gst/PadEventFunction.cs b/sources/generated/Gst/PadEventFunction.cs new file mode 100644 index 0000000000..8432f77065 --- /dev/null +++ b/sources/generated/Gst/PadEventFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadEventFunction(Gst.Pad pad, Gst.Object parent, Gst.Event evnt); + +} diff --git a/sources/generated/Gst/PadFlags.cs b/sources/generated/Gst/PadFlags.cs new file mode 100644 index 0000000000..d5335280f5 --- /dev/null +++ b/sources/generated/Gst/PadFlags.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PadFlagsGType))] + public enum PadFlags : uint { + + Blocked = 16, + Flushing = 32, + Eos = 64, + Blocking = 128, + NeedParent = 256, + NeedReconfigure = 512, + PendingEvents = 1024, + FixedCaps = 2048, + ProxyCaps = 4096, + ProxyAllocation = 8192, + ProxyScheduling = 16384, + AcceptIntersect = 32768, + AcceptTemplate = 65536, + Last = 1048576, + } + + internal class PadFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadForwardFunction.cs b/sources/generated/Gst/PadForwardFunction.cs new file mode 100644 index 0000000000..44e26d17d5 --- /dev/null +++ b/sources/generated/Gst/PadForwardFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadForwardFunction(Gst.Pad pad); + +} diff --git a/sources/generated/Gst/PadGetRangeFunction.cs b/sources/generated/Gst/PadGetRangeFunction.cs new file mode 100644 index 0000000000..6d70db3000 --- /dev/null +++ b/sources/generated/Gst/PadGetRangeFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.FlowReturn PadGetRangeFunction(Gst.Pad pad, Gst.Object parent, ulong offset, uint length, Gst.Buffer buffer); + +} diff --git a/sources/generated/Gst/PadIterIntLinkFunction.cs b/sources/generated/Gst/PadIterIntLinkFunction.cs new file mode 100644 index 0000000000..f8c37b9f53 --- /dev/null +++ b/sources/generated/Gst/PadIterIntLinkFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.Iterator PadIterIntLinkFunction(Gst.Pad pad, Gst.Object parent); + +} diff --git a/sources/generated/Gst/PadLinkCheck.cs b/sources/generated/Gst/PadLinkCheck.cs new file mode 100644 index 0000000000..556b1fd2eb --- /dev/null +++ b/sources/generated/Gst/PadLinkCheck.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PadLinkCheckGType))] + public enum PadLinkCheck : uint { + + Nothing = 0, + Hierarchy = 1, + TemplateCaps = 2, + Caps = 4, + Default = 5, + NoReconfigure = 8, + } + + internal class PadLinkCheckGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_link_check_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_link_check_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadLinkFunction.cs b/sources/generated/Gst/PadLinkFunction.cs new file mode 100644 index 0000000000..231346ef1d --- /dev/null +++ b/sources/generated/Gst/PadLinkFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.PadLinkReturn PadLinkFunction(Gst.Pad pad, Gst.Object parent, Gst.Pad peer); + +} diff --git a/sources/generated/Gst/PadLinkReturn.cs b/sources/generated/Gst/PadLinkReturn.cs new file mode 100644 index 0000000000..a5b7e8a547 --- /dev/null +++ b/sources/generated/Gst/PadLinkReturn.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PadLinkReturnGType))] + public enum PadLinkReturn { + + Refused = -6, + Nosched = -5, + Noformat = -4, + WrongDirection = -3, + WasLinked = -2, + WrongHierarchy = -1, + Ok = 0, + } + + internal class PadLinkReturnGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_link_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_link_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadMode.cs b/sources/generated/Gst/PadMode.cs new file mode 100644 index 0000000000..6c38557197 --- /dev/null +++ b/sources/generated/Gst/PadMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PadModeGType))] + public enum PadMode { + + None = 0, + Push = 1, + Pull = 2, + } + + internal class PadModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadPresence.cs b/sources/generated/Gst/PadPresence.cs new file mode 100644 index 0000000000..873a6fe39d --- /dev/null +++ b/sources/generated/Gst/PadPresence.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PadPresenceGType))] + public enum PadPresence { + + Always = 0, + Sometimes = 1, + Request = 2, + } + + internal class PadPresenceGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_presence_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_presence_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadProbeCallback.cs b/sources/generated/Gst/PadProbeCallback.cs new file mode 100644 index 0000000000..6117a85b49 --- /dev/null +++ b/sources/generated/Gst/PadProbeCallback.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate Gst.PadProbeReturn PadProbeCallback(Gst.Pad pad, Gst.PadProbeInfo info); + +} diff --git a/sources/generated/Gst/PadProbeInfo.cs b/sources/generated/Gst/PadProbeInfo.cs new file mode 100644 index 0000000000..78d4fbbed0 --- /dev/null +++ b/sources/generated/Gst/PadProbeInfo.cs @@ -0,0 +1,122 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct PadProbeInfo : IEquatable { + + public Gst.PadProbeType Type; + private UIntPtr id; + public ulong Id { + get { + return (ulong) id; + } + set { + id = new UIntPtr (value); + } + } + private IntPtr _data; + public ulong Offset; + public uint Size; + + public static Gst.PadProbeInfo Zero = new Gst.PadProbeInfo (); + + public static Gst.PadProbeInfo New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.PadProbeInfo.Zero; + return (Gst.PadProbeInfo) Marshal.PtrToStructure (raw, typeof (Gst.PadProbeInfo)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_info_get_buffer(IntPtr raw); + + public Gst.Buffer Buffer { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_pad_probe_info_get_buffer(this_as_native); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_info_get_buffer_list(IntPtr raw); + + public Gst.BufferList BufferList { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_pad_probe_info_get_buffer_list(this_as_native); + Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_info_get_event(IntPtr raw); + + public Gst.Event Event { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_pad_probe_info_get_event(this_as_native); + Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_info_get_query(IntPtr raw); + + public Gst.Query Query { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_pad_probe_info_get_query(this_as_native); + Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.PadProbeInfo target) + { + target = New (native); + } + + public bool Equals (PadProbeInfo other) + { + return true && Type.Equals (other.Type) && Id.Equals (other.Id) && _data.Equals (other._data) && Offset.Equals (other.Offset) && Size.Equals (other.Size); + } + + public override bool Equals (object other) + { + return other is PadProbeInfo && Equals ((PadProbeInfo) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Id.GetHashCode () ^ _data.GetHashCode () ^ Offset.GetHashCode () ^ Size.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/PadProbeReturn.cs b/sources/generated/Gst/PadProbeReturn.cs new file mode 100644 index 0000000000..877d07d4d2 --- /dev/null +++ b/sources/generated/Gst/PadProbeReturn.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PadProbeReturnGType))] + public enum PadProbeReturn { + + Drop = 0, + Ok = 1, + Remove = 2, + Pass = 3, + Handled = 4, + } + + internal class PadProbeReturnGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_probe_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadProbeType.cs b/sources/generated/Gst/PadProbeType.cs new file mode 100644 index 0000000000..d5c30cab97 --- /dev/null +++ b/sources/generated/Gst/PadProbeType.cs @@ -0,0 +1,49 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PadProbeTypeGType))] + public enum PadProbeType : uint { + + Invalid = 0, + Idle = 1, + Block = 2, + Blocking = 3, + Buffer = 16, + BufferList = 32, + EventDownstream = 64, + DataDownstream = 112, + BlockDownstream = 114, + EventUpstream = 128, + DataUpstream = 128, + BlockUpstream = 130, + EventBoth = 192, + DataBoth = 240, + EventFlush = 256, + QueryDownstream = 512, + QueryUpstream = 1024, + QueryBoth = 1536, + AllBoth = 1776, + Push = 4096, + Pull = 8192, + Scheduling = 12288, + } + + internal class PadProbeTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_probe_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_probe_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadQueryFunction.cs b/sources/generated/Gst/PadQueryFunction.cs new file mode 100644 index 0000000000..9b25c2d310 --- /dev/null +++ b/sources/generated/Gst/PadQueryFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadQueryFunction(Gst.Pad pad, Gst.Object parent, Gst.Query query); + +} diff --git a/sources/generated/Gst/PadRemovedHandler.cs b/sources/generated/Gst/PadRemovedHandler.cs new file mode 100644 index 0000000000..b49d36fdcf --- /dev/null +++ b/sources/generated/Gst/PadRemovedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PadRemovedHandler(object o, PadRemovedArgs args); + + public class PadRemovedArgs : GLib.SignalArgs { + public Gst.Pad OldPad{ + get { + return (Gst.Pad) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/PadStickyEventsForeachFunction.cs b/sources/generated/Gst/PadStickyEventsForeachFunction.cs new file mode 100644 index 0000000000..850e1b7409 --- /dev/null +++ b/sources/generated/Gst/PadStickyEventsForeachFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PadStickyEventsForeachFunction(Gst.Pad pad, Gst.Event evnt); + +} diff --git a/sources/generated/Gst/PadTemplate.cs b/sources/generated/Gst/PadTemplate.cs new file mode 100644 index 0000000000..b028cca77b --- /dev/null +++ b/sources/generated/Gst/PadTemplate.cs @@ -0,0 +1,414 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PadTemplate : Gst.Object { + + public PadTemplate (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_new(IntPtr name_template, int direction, int presence, IntPtr caps); + + public PadTemplate (string name_template, Gst.PadDirection direction, Gst.PadPresence presence, Gst.Caps caps) : base (IntPtr.Zero) + { + if (GetType () != typeof (PadTemplate)) { + var vals = new List (); + var names = new List (); + names.Add ("name_template"); + vals.Add (new GLib.Value (name_template)); + names.Add ("direction"); + vals.Add (new GLib.Value (direction)); + names.Add ("presence"); + vals.Add (new GLib.Value (presence)); + if (caps != null) { + names.Add ("caps"); + vals.Add (new GLib.Value (caps)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name_template = GLib.Marshaller.StringToPtrGStrdup (name_template); + Raw = gst_pad_template_new(native_name_template, (int) direction, (int) presence, caps == null ? IntPtr.Zero : caps.Handle); + GLib.Marshaller.Free (native_name_template); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_new_from_static_pad_template_with_gtype(IntPtr pad_template, IntPtr pad_type); + + public PadTemplate (Gst.StaticPadTemplate pad_template, GLib.GType pad_type) : base (IntPtr.Zero) + { + if (GetType () != typeof (PadTemplate)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_pad_template = GLib.Marshaller.StructureToPtrAlloc (pad_template); + Raw = gst_pad_template_new_from_static_pad_template_with_gtype(native_pad_template, pad_type.Val); + Marshal.FreeHGlobal (native_pad_template); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_new_with_gtype(IntPtr name_template, int direction, int presence, IntPtr caps, IntPtr pad_type); + + public PadTemplate (string name_template, Gst.PadDirection direction, Gst.PadPresence presence, Gst.Caps caps, GLib.GType pad_type) : base (IntPtr.Zero) + { + if (GetType () != typeof (PadTemplate)) { + var vals = new List (); + var names = new List (); + names.Add ("name_template"); + vals.Add (new GLib.Value (name_template)); + names.Add ("direction"); + vals.Add (new GLib.Value (direction)); + names.Add ("presence"); + vals.Add (new GLib.Value (presence)); + if (caps != null) { + names.Add ("caps"); + vals.Add (new GLib.Value (caps)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name_template = GLib.Marshaller.StringToPtrGStrdup (name_template); + Raw = gst_pad_template_new_with_gtype(native_name_template, (int) direction, (int) presence, caps == null ? IntPtr.Zero : caps.Handle, pad_type.Val); + GLib.Marshaller.Free (native_name_template); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_get_caps(IntPtr raw); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_pad_template_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + } + + [GLib.Property ("direction")] + public Gst.PadDirection Direction { + get { + GLib.Value val = GetProperty ("direction"); + Gst.PadDirection ret = (Gst.PadDirection) (Enum) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("gtype")] + public GLib.GType Gtype { + get { + GLib.Value val = GetProperty ("gtype"); + GLib.GType ret = (GLib.GType) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("name-template")] + public string NameTemplate { + get { + GLib.Value val = GetProperty ("name-template"); + string ret = (string) val; + val.Dispose (); + return ret; + } + } + + [GLib.Property ("presence")] + public Gst.PadPresence Presence { + get { + GLib.Value val = GetProperty ("presence"); + Gst.PadPresence ret = (Gst.PadPresence) (Enum) val; + val.Dispose (); + return ret; + } + } + + public string NameTemplateField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name_template")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + public Gst.PadDirection DirectionField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("direction")); + return (Gst.PadDirection) (*raw_ptr); + } + } + } + + public Gst.PadPresence PresenceField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("presence")); + return (Gst.PadPresence) (*raw_ptr); + } + } + } + + public Gst.Caps CapsField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("caps")); + return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Caps), false); + } + } + } + + [GLib.Signal("pad-created")] + public event Gst.PadCreatedEventHandler PadCreatedEvent { + add { + this.AddSignalHandler ("pad-created", value, typeof (Gst.PadCreatedEventArgs)); + } + remove { + this.RemoveSignalHandler ("pad-created", value); + } + } + + static PadCreatedEventNativeDelegate PadCreatedEvent_cb_delegate; + static PadCreatedEventNativeDelegate PadCreatedEventVMCallback { + get { + if (PadCreatedEvent_cb_delegate == null) + PadCreatedEvent_cb_delegate = new PadCreatedEventNativeDelegate (PadCreatedEvent_cb); + return PadCreatedEvent_cb_delegate; + } + } + + static void OverridePadCreatedEvent (GLib.GType gtype) + { + OverridePadCreatedEvent (gtype, PadCreatedEventVMCallback); + } + + static void OverridePadCreatedEvent (GLib.GType gtype, PadCreatedEventNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_created")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PadCreatedEventNativeDelegate (IntPtr inst, IntPtr pad); + + static void PadCreatedEvent_cb (IntPtr inst, IntPtr pad) + { + try { + PadTemplate __obj = GLib.Object.GetObject (inst, false) as PadTemplate; + __obj.OnPadCreatedEvent (GLib.Object.GetObject(pad) as Gst.Pad); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.PadTemplate), ConnectionMethod="OverridePadCreatedEvent")] + protected virtual void OnPadCreatedEvent (Gst.Pad pad) + { + InternalPadCreatedEvent (pad); + } + + private void InternalPadCreatedEvent (Gst.Pad pad) + { + PadCreatedEventNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pad_created")); + unmanaged = (PadCreatedEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PadCreatedEventNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, pad == null ? IntPtr.Zero : pad.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("pad_created" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pad_created + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "pad_created" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_pad_template_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_get_documentation_caps(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_template_set_documentation_caps(IntPtr raw, IntPtr caps); + + public Gst.Caps DocumentationCaps { + get { + IntPtr raw_ret = gst_pad_template_get_documentation_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + value.Owned = false; + gst_pad_template_set_documentation_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pad_template_pad_created(IntPtr raw, IntPtr pad); + + public void PadCreated(Gst.Pad pad) { + gst_pad_template_pad_created(Handle, pad == null ? IntPtr.Zero : pad.Handle); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("name_template" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // name_template + , null + , "direction" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("direction" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.PadDirection))) // direction + , "name_template" + , "presence" + , (long) Marshal.OffsetOf(typeof(GstPadTemplate_directionAlign), "direction") + , 0 + ), + new GLib.AbiField("presence" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.PadPresence))) // presence + , "direction" + , "caps" + , (long) Marshal.OffsetOf(typeof(GstPadTemplate_presenceAlign), "presence") + , 0 + ), + new GLib.AbiField("caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // caps + , "presence" + , "ABI" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // union struct ABI + new GLib.AbiField("ABI._gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved + , "caps" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI + + // union struct ABI.abi + new GLib.AbiField("ABI.abi.gtype" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.GType)) // ABI.abi.gtype + , "caps" + , "ABI.abi.documentation_caps" + , (long) Marshal.OffsetOf(typeof(GstPadTemplate_ABI_abi_gtypeAlign), "ABI_abi_gtype") + , 0 + ), + new GLib.AbiField("ABI.abi.documentation_caps" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // ABI.abi.documentation_caps + , "ABI.abi.gtype" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + // End ABI.abi + + new GLib.AbiField("ABI" + , -1 + , new List>() { // union ABI + new List() {"ABI._gst_reserved"}, + new List() {"ABI.abi.gtype","ABI.abi.documentation_caps"} + } + , "caps" + , null + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPadTemplate_directionAlign + { + sbyte f1; + private Gst.PadDirection direction; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPadTemplate_presenceAlign + { + sbyte f1; + private Gst.PadPresence presence; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPadTemplate_ABI_abi_gtypeAlign + { + sbyte f1; + private GLib.GType ABI_abi_gtype; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PadTemplateFlags.cs b/sources/generated/Gst/PadTemplateFlags.cs new file mode 100644 index 0000000000..5efdb0ec2c --- /dev/null +++ b/sources/generated/Gst/PadTemplateFlags.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PadTemplateFlagsGType))] + public enum PadTemplateFlags : uint { + + Last = 256, + } + + internal class PadTemplateFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pad_template_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pad_template_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PadUnlinkFunction.cs b/sources/generated/Gst/PadUnlinkFunction.cs new file mode 100644 index 0000000000..09f7ceccd9 --- /dev/null +++ b/sources/generated/Gst/PadUnlinkFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PadUnlinkFunction(Gst.Pad pad, Gst.Object parent); + +} diff --git a/sources/generated/Gst/ParamArray.cs b/sources/generated/Gst/ParamArray.cs new file mode 100644 index 0000000000..82b184c5bc --- /dev/null +++ b/sources/generated/Gst/ParamArray.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ParamArray : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_param_spec_array_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_param_spec_array_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public ParamArray(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ParamFraction.cs b/sources/generated/Gst/ParamFraction.cs new file mode 100644 index 0000000000..4505dc4db7 --- /dev/null +++ b/sources/generated/Gst/ParamFraction.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ParamFraction : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_param_spec_fraction_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_param_spec_fraction_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + public ParamFraction(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ParentBufferMeta.cs b/sources/generated/Gst/ParentBufferMeta.cs new file mode 100644 index 0000000000..7496e7b458 --- /dev/null +++ b/sources/generated/Gst/ParentBufferMeta.cs @@ -0,0 +1,65 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ParentBufferMeta : IEquatable { + + public Gst.Meta Parent; + private IntPtr _buffer; + public Gst.Buffer Buffer { + get { + return _buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (_buffer, typeof (Gst.Buffer), false); + } + set { + _buffer = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.ParentBufferMeta Zero = new Gst.ParentBufferMeta (); + + public static Gst.ParentBufferMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.ParentBufferMeta.Zero; + return (Gst.ParentBufferMeta) Marshal.PtrToStructure (raw, typeof (Gst.ParentBufferMeta)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parent_buffer_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_parent_buffer_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (ParentBufferMeta other) + { + return true && Parent.Equals (other.Parent) && Buffer.Equals (other.Buffer); + } + + public override bool Equals (object other) + { + return other is ParentBufferMeta && Equals ((ParentBufferMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Parent.GetHashCode () ^ Buffer.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/Parse.cs b/sources/generated/Gst/Parse.cs new file mode 100644 index 0000000000..775c60efcf --- /dev/null +++ b/sources/generated/Gst/Parse.cs @@ -0,0 +1,119 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Parse { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_bin_from_description(IntPtr bin_description, bool ghost_unlinked_pads, out IntPtr error); + + public static unsafe Gst.Bin BinFromDescription(string bin_description, bool ghost_unlinked_pads) { + IntPtr native_bin_description = GLib.Marshaller.StringToPtrGStrdup (bin_description); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_bin_from_description(native_bin_description, ghost_unlinked_pads, out error); + Gst.Bin ret = GLib.Object.GetObject(raw_ret) as Gst.Bin; + GLib.Marshaller.Free (native_bin_description); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_bin_from_description_full(IntPtr bin_description, bool ghost_unlinked_pads, IntPtr context, int flags, out IntPtr error); + + public static unsafe Gst.Element BinFromDescriptionFull(string bin_description, bool ghost_unlinked_pads, Gst.ParseContext context, Gst.ParseFlags flags) { + IntPtr native_bin_description = GLib.Marshaller.StringToPtrGStrdup (bin_description); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_bin_from_description_full(native_bin_description, ghost_unlinked_pads, context == null ? IntPtr.Zero : context.Handle, (int) flags, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_bin_description); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static Gst.Element BinFromDescriptionFull(string bin_description, bool ghost_unlinked_pads, Gst.ParseFlags flags) { + return BinFromDescriptionFull (bin_description, ghost_unlinked_pads, null, flags); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_parse_error_quark(); + + public static uint ErrorQuark() { + uint raw_ret = gst_parse_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_launch(IntPtr pipeline_description, out IntPtr error); + + public static unsafe Gst.Element Launch(string pipeline_description) { + IntPtr native_pipeline_description = GLib.Marshaller.StringToPtrGStrdup (pipeline_description); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_launch(native_pipeline_description, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_pipeline_description); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_launch_full(IntPtr pipeline_description, IntPtr context, int flags, out IntPtr error); + + public static unsafe Gst.Element LaunchFull(string pipeline_description, Gst.ParseContext context, Gst.ParseFlags flags) { + IntPtr native_pipeline_description = GLib.Marshaller.StringToPtrGStrdup (pipeline_description); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_launch_full(native_pipeline_description, context == null ? IntPtr.Zero : context.Handle, (int) flags, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + GLib.Marshaller.Free (native_pipeline_description); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static Gst.Element LaunchFull(string pipeline_description, Gst.ParseFlags flags) { + return LaunchFull (pipeline_description, null, flags); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_launchv(IntPtr[] argv, out IntPtr error); + + public static unsafe Gst.Element Launchv(string[] argv) { + int cnt_argv = argv == null ? 0 : argv.Length; + IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; + for (int i = 0; i < cnt_argv; i++) + native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); + native_argv [cnt_argv] = IntPtr.Zero; + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_launchv(native_argv, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_parse_launchv_full(IntPtr[] argv, IntPtr context, int flags, out IntPtr error); + + public static unsafe Gst.Element LaunchvFull(string[] argv, Gst.ParseContext context, Gst.ParseFlags flags) { + int cnt_argv = argv == null ? 0 : argv.Length; + IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; + for (int i = 0; i < cnt_argv; i++) + native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); + native_argv [cnt_argv] = IntPtr.Zero; + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_parse_launchv_full(native_argv, context == null ? IntPtr.Zero : context.Handle, (int) flags, out error); + Gst.Element ret = GLib.Object.GetObject(raw_ret) as Gst.Element; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + public static Gst.Element LaunchvFull(string[] argv, Gst.ParseFlags flags) { + return LaunchvFull (argv, null, flags); + } + +#endregion + } +} diff --git a/sources/generated/Gst/ParseContext.cs b/sources/generated/Gst/ParseContext.cs new file mode 100644 index 0000000000..250adf98f6 --- /dev/null +++ b/sources/generated/Gst/ParseContext.cs @@ -0,0 +1,87 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ParseContext : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_context_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_parse_context_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_context_copy(IntPtr raw); + + public Gst.ParseContext Copy() { + IntPtr raw_ret = gst_parse_context_copy(Handle); + Gst.ParseContext ret = raw_ret == IntPtr.Zero ? null : (Gst.ParseContext) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.ParseContext), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_context_get_missing_elements(IntPtr raw); + + public string[] MissingElements { + get { + IntPtr raw_ret = gst_parse_context_get_missing_elements(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + public ParseContext(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_context_new(); + + public ParseContext () + { + Raw = gst_parse_context_new(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_parse_context_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_parse_context_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_parse_context_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ParseError.cs b/sources/generated/Gst/ParseError.cs new file mode 100644 index 0000000000..295d2d8700 --- /dev/null +++ b/sources/generated/Gst/ParseError.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ParseErrorGType))] + public enum ParseError { + + Syntax = 0, + NoSuchElement = 1, + NoSuchProperty = 2, + Link = 3, + CouldNotSetProperty = 4, + EmptyBin = 5, + Empty = 6, + DelayedLink = 7, + } + + internal class ParseErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_parse_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ParseFlags.cs b/sources/generated/Gst/ParseFlags.cs new file mode 100644 index 0000000000..3f03a1cf99 --- /dev/null +++ b/sources/generated/Gst/ParseFlags.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.ParseFlagsGType))] + public enum ParseFlags : uint { + + None = 0, + FatalErrors = 1, + NoSingleElementBins = 2, + PlaceInBin = 4, + } + + internal class ParseFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_parse_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_parse_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Pipeline.cs b/sources/generated/Gst/Pipeline.cs new file mode 100644 index 0000000000..8baf4496e3 --- /dev/null +++ b/sources/generated/Gst/Pipeline.cs @@ -0,0 +1,251 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Pipeline : Gst.Bin { + + public Pipeline (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pipeline_new(IntPtr name); + + public Pipeline (string name) : base (IntPtr.Zero) + { + if (GetType () != typeof (Pipeline)) { + var vals = new List (); + var names = new List (); + names.Add ("name"); + vals.Add (new GLib.Value (name)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_pipeline_new(native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_pipeline_get_auto_flush_bus(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pipeline_set_auto_flush_bus(IntPtr raw, bool auto_flush); + + [GLib.Property ("auto-flush-bus")] + public bool AutoFlushBus { + get { + bool raw_ret = gst_pipeline_get_auto_flush_bus(Handle); + bool ret = raw_ret; + return ret; + } + set { + gst_pipeline_set_auto_flush_bus(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_pipeline_get_delay(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pipeline_set_delay(IntPtr raw, ulong delay); + + [GLib.Property ("delay")] + public ulong Delay { + get { + ulong raw_ret = gst_pipeline_get_delay(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_pipeline_set_delay(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_pipeline_get_latency(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pipeline_set_latency(IntPtr raw, ulong latency); + + [GLib.Property ("latency")] + public ulong Latency { + get { + ulong raw_ret = gst_pipeline_get_latency(Handle); + ulong ret = raw_ret; + return ret; + } + set { + gst_pipeline_set_latency(Handle, value); + } + } + + public Gst.Clock FixedClock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("fixed_clock")); + return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock; + } + } + } + + public ulong StreamTime { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_time")); + return (*raw_ptr); + } + } + } + + public ulong DelayField { + get { + unsafe { + ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("delay")); + return (*raw_ptr); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Bin.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pipeline_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_pipeline_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pipeline_auto_clock(IntPtr raw); + + public void AutoClock() { + gst_pipeline_auto_clock(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pipeline_get_pipeline_clock(IntPtr raw); + + public Gst.Clock PipelineClock { + get { + IntPtr raw_ret = gst_pipeline_get_pipeline_clock(Handle); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_pipeline_use_clock(IntPtr raw, IntPtr clock); + + public void UseClock(Gst.Clock clock) { + gst_pipeline_use_clock(Handle, clock == null ? IntPtr.Zero : clock.Handle); + } + + public void UseClock() { + UseClock (null); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("fixed_clock" + , Gst.Bin.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixed_clock + , null + , "stream_time" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stream_time" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // stream_time + , "fixed_clock" + , "delay" + , (long) Marshal.OffsetOf(typeof(GstPipeline_stream_timeAlign), "stream_time") + , 0 + ), + new GLib.AbiField("delay" + , -1 + , (uint) Marshal.SizeOf(typeof(ulong)) // delay + , "stream_time" + , "priv" + , (long) Marshal.OffsetOf(typeof(GstPipeline_delayAlign), "delay") + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "delay" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPipeline_stream_timeAlign + { + sbyte f1; + private ulong stream_time; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstPipeline_delayAlign + { + sbyte f1; + private ulong delay; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PipelineFlags.cs b/sources/generated/Gst/PipelineFlags.cs new file mode 100644 index 0000000000..8c7bd3b869 --- /dev/null +++ b/sources/generated/Gst/PipelineFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PipelineFlagsGType))] + public enum PipelineFlags : uint { + + FixedClock = 524288, + Last = 8388608, + } + + internal class PipelineFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_pipeline_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_pipeline_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Plugin.cs b/sources/generated/Gst/Plugin.cs new file mode 100644 index 0000000000..2488590d17 --- /dev/null +++ b/sources/generated/Gst/Plugin.cs @@ -0,0 +1,312 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Plugin : Gst.Object { + + public Plugin (IntPtr raw) : base(raw) {} + + protected Plugin() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_plugin_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_list_free(IntPtr list); + + public static void ListFree(GLib.List list) { + gst_plugin_list_free(list == null ? IntPtr.Zero : list.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_load_by_name(IntPtr name); + + public static Gst.Plugin LoadByName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_plugin_load_by_name(native_name); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_plugin_load_file(IntPtr filename, out IntPtr error); + + public static unsafe Gst.Plugin LoadFile(string filename) { + IntPtr native_filename = GLib.Marshaller.StringToFilenamePtr (filename); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_plugin_load_file(native_filename, out error); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + GLib.Marshaller.Free (native_filename); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_plugin_register_static(int major_version, int minor_version, IntPtr name, IntPtr description, GstSharp.PluginInitFuncNative init_func, IntPtr version, IntPtr license, IntPtr source, IntPtr package, IntPtr origin); + + public static bool RegisterStatic(int major_version, int minor_version, string name, string description, Gst.PluginInitFunc init_func, string version, string license, string source, string package, string origin) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + GstSharp.PluginInitFuncWrapper init_func_wrapper = new GstSharp.PluginInitFuncWrapper (init_func); + IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version); + IntPtr native_license = GLib.Marshaller.StringToPtrGStrdup (license); + IntPtr native_source = GLib.Marshaller.StringToPtrGStrdup (source); + IntPtr native_package = GLib.Marshaller.StringToPtrGStrdup (package); + IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin); + bool raw_ret = gst_plugin_register_static(major_version, minor_version, native_name, native_description, init_func_wrapper.NativeDelegate, native_version, native_license, native_source, native_package, native_origin); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_version); + GLib.Marshaller.Free (native_license); + GLib.Marshaller.Free (native_source); + GLib.Marshaller.Free (native_package); + GLib.Marshaller.Free (native_origin); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_plugin_register_static_full(int major_version, int minor_version, IntPtr name, IntPtr description, GstSharp.PluginInitFullFuncNative init_full_func, IntPtr version, IntPtr license, IntPtr source, IntPtr package, IntPtr origin, IntPtr user_data); + + public static bool RegisterStaticFull(int major_version, int minor_version, string name, string description, Gst.PluginInitFullFunc init_full_func, string version, string license, string source, string package, string origin) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + GstSharp.PluginInitFullFuncWrapper init_full_func_wrapper = new GstSharp.PluginInitFullFuncWrapper (init_full_func); + IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version); + IntPtr native_license = GLib.Marshaller.StringToPtrGStrdup (license); + IntPtr native_source = GLib.Marshaller.StringToPtrGStrdup (source); + IntPtr native_package = GLib.Marshaller.StringToPtrGStrdup (package); + IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin); + bool raw_ret = gst_plugin_register_static_full(major_version, minor_version, native_name, native_description, init_full_func_wrapper.NativeDelegate, native_version, native_license, native_source, native_package, native_origin, IntPtr.Zero); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_description); + GLib.Marshaller.Free (native_version); + GLib.Marshaller.Free (native_license); + GLib.Marshaller.Free (native_source); + GLib.Marshaller.Free (native_package); + GLib.Marshaller.Free (native_origin); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_add_dependency(IntPtr raw, IntPtr[] env_vars, IntPtr[] paths, IntPtr[] names, int flags); + + public void AddDependency(string[] env_vars, string[] paths, string[] names, Gst.PluginDependencyFlags flags) { + int cnt_env_vars = env_vars == null ? 0 : env_vars.Length; + IntPtr[] native_env_vars = new IntPtr [cnt_env_vars + 1]; + for (int i = 0; i < cnt_env_vars; i++) + native_env_vars [i] = GLib.Marshaller.StringToPtrGStrdup(env_vars[i]); + native_env_vars [cnt_env_vars] = IntPtr.Zero; + int cnt_paths = paths == null ? 0 : paths.Length; + IntPtr[] native_paths = new IntPtr [cnt_paths + 1]; + for (int i = 0; i < cnt_paths; i++) + native_paths [i] = GLib.Marshaller.StringToPtrGStrdup(paths[i]); + native_paths [cnt_paths] = IntPtr.Zero; + int cnt_names = names == null ? 0 : names.Length; + IntPtr[] native_names = new IntPtr [cnt_names + 1]; + for (int i = 0; i < cnt_names; i++) + native_names [i] = GLib.Marshaller.StringToPtrGStrdup(names[i]); + native_names [cnt_names] = IntPtr.Zero; + gst_plugin_add_dependency(Handle, native_env_vars, native_paths, native_names, (int) flags); + } + + public void AddDependency(Gst.PluginDependencyFlags flags) { + AddDependency (null, null, null, flags); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_add_dependency_simple(IntPtr raw, IntPtr env_vars, IntPtr paths, IntPtr names, int flags); + + public void AddDependencySimple(string env_vars, string paths, string names, Gst.PluginDependencyFlags flags) { + IntPtr native_env_vars = GLib.Marshaller.StringToPtrGStrdup (env_vars); + IntPtr native_paths = GLib.Marshaller.StringToPtrGStrdup (paths); + IntPtr native_names = GLib.Marshaller.StringToPtrGStrdup (names); + gst_plugin_add_dependency_simple(Handle, native_env_vars, native_paths, native_names, (int) flags); + GLib.Marshaller.Free (native_env_vars); + GLib.Marshaller.Free (native_paths); + GLib.Marshaller.Free (native_names); + } + + public void AddDependencySimple(Gst.PluginDependencyFlags flags) { + AddDependencySimple (null, null, null, flags); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_cache_data(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_set_cache_data(IntPtr raw, IntPtr cache_data); + + public Gst.Structure CacheData { + get { + IntPtr raw_ret = gst_plugin_get_cache_data(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + set { + value.Owned = false; + gst_plugin_set_cache_data(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_description(IntPtr raw); + + public string Description { + get { + IntPtr raw_ret = gst_plugin_get_description(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_filename(IntPtr raw); + + public string Filename { + get { + IntPtr raw_ret = gst_plugin_get_filename(Handle); + string ret = GLib.Marshaller.FilenamePtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_license(IntPtr raw); + + public string License { + get { + IntPtr raw_ret = gst_plugin_get_license(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_origin(IntPtr raw); + + public string Origin { + get { + IntPtr raw_ret = gst_plugin_get_origin(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_package(IntPtr raw); + + public string Package { + get { + IntPtr raw_ret = gst_plugin_get_package(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_release_date_string(IntPtr raw); + + public string ReleaseDateString { + get { + IntPtr raw_ret = gst_plugin_get_release_date_string(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_source(IntPtr raw); + + public string Source { + get { + IntPtr raw_ret = gst_plugin_get_source(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_get_version(IntPtr raw); + + public string Version { + get { + IntPtr raw_ret = gst_plugin_get_version(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_plugin_is_loaded(IntPtr raw); + + public bool IsLoaded { + get { + bool raw_ret = gst_plugin_is_loaded(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_load(IntPtr raw); + + public Gst.Plugin Load() { + IntPtr raw_ret = gst_plugin_load(Handle); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PluginAPIFlags.cs b/sources/generated/Gst/PluginAPIFlags.cs new file mode 100644 index 0000000000..607c0dafdd --- /dev/null +++ b/sources/generated/Gst/PluginAPIFlags.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PluginAPIFlagsGType))] + public enum PluginAPIFlags : uint { + + Members = 1, + } + + internal class PluginAPIFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_api_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_plugin_api_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PluginAddedHandler.cs b/sources/generated/Gst/PluginAddedHandler.cs new file mode 100644 index 0000000000..3db31d7621 --- /dev/null +++ b/sources/generated/Gst/PluginAddedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PluginAddedHandler(object o, PluginAddedArgs args); + + public class PluginAddedArgs : GLib.SignalArgs { + public Gst.Plugin Plugin{ + get { + return (Gst.Plugin) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/PluginDependencyFlags.cs b/sources/generated/Gst/PluginDependencyFlags.cs new file mode 100644 index 0000000000..b845e8d633 --- /dev/null +++ b/sources/generated/Gst/PluginDependencyFlags.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PluginDependencyFlagsGType))] + public enum PluginDependencyFlags : uint { + + None = 0, + Recurse = 1, + PathsAreDefaultOnly = 2, + FileNameIsSuffix = 4, + FileNameIsPrefix = 8, + PathsAreRelativeToExe = 16, + } + + internal class PluginDependencyFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_dependency_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_plugin_dependency_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PluginDesc.cs b/sources/generated/Gst/PluginDesc.cs new file mode 100644 index 0000000000..7a2293857c --- /dev/null +++ b/sources/generated/Gst/PluginDesc.cs @@ -0,0 +1,62 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct PluginDesc : IEquatable { + + public int MajorVersion; + public int MinorVersion; + public string Name; + public string Description; + private GstSharp.PluginInitFuncNative _plugin_init; + public Gst.PluginInitFunc PluginInit { + get { + return GstSharp.PluginInitFuncWrapper.GetManagedDelegate (_plugin_init); + } + } + public string Version; + public string License; + public string Source; + public string Package; + public string Origin; + public string ReleaseDatetime; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.PluginDesc Zero = new Gst.PluginDesc (); + + public static Gst.PluginDesc New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.PluginDesc.Zero; + return (Gst.PluginDesc) Marshal.PtrToStructure (raw, typeof (Gst.PluginDesc)); + } + + public bool Equals (PluginDesc other) + { + return true && MajorVersion.Equals (other.MajorVersion) && MinorVersion.Equals (other.MinorVersion) && Name.Equals (other.Name) && Description.Equals (other.Description) && PluginInit.Equals (other.PluginInit) && Version.Equals (other.Version) && License.Equals (other.License) && Source.Equals (other.Source) && Package.Equals (other.Package) && Origin.Equals (other.Origin) && ReleaseDatetime.Equals (other.ReleaseDatetime); + } + + public override bool Equals (object other) + { + return other is PluginDesc && Equals ((PluginDesc) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ MajorVersion.GetHashCode () ^ MinorVersion.GetHashCode () ^ Name.GetHashCode () ^ Description.GetHashCode () ^ PluginInit.GetHashCode () ^ Version.GetHashCode () ^ License.GetHashCode () ^ Source.GetHashCode () ^ Package.GetHashCode () ^ Origin.GetHashCode () ^ ReleaseDatetime.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/PluginError.cs b/sources/generated/Gst/PluginError.cs new file mode 100644 index 0000000000..1b20b7aa3d --- /dev/null +++ b/sources/generated/Gst/PluginError.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PluginErrorGType))] + public enum PluginError { + + Module = 0, + Dependencies = 1, + NameMismatch = 2, + } + + internal class PluginErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_plugin_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PluginFeature.cs b/sources/generated/Gst/PluginFeature.cs new file mode 100644 index 0000000000..2d36b8a5dd --- /dev/null +++ b/sources/generated/Gst/PluginFeature.cs @@ -0,0 +1,157 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PluginFeature : Gst.Object { + + protected PluginFeature (IntPtr raw) : base(raw) {} + + protected PluginFeature() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_feature_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_plugin_feature_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_feature_list_copy(IntPtr list); + + public static Gst.PluginFeature[] ListCopy(GLib.List list) { + IntPtr raw_ret = gst_plugin_feature_list_copy(list == null ? IntPtr.Zero : list.Handle); + Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_feature_list_debug(IntPtr list); + + public static void ListDebug(GLib.List list) { + gst_plugin_feature_list_debug(list == null ? IntPtr.Zero : list.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_feature_list_free(IntPtr list); + + public static void ListFree(GLib.List list) { + gst_plugin_feature_list_free(list == null ? IntPtr.Zero : list.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_plugin_feature_rank_compare_func(IntPtr p1, IntPtr p2); + + public static int RankCompareFunc(IntPtr p1, IntPtr p2) { + int raw_ret = gst_plugin_feature_rank_compare_func(p1, p2); + int ret = raw_ret; + return ret; + } + + public static int RankCompareFunc() { + return RankCompareFunc (IntPtr.Zero, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_plugin_feature_check_version(IntPtr raw, uint min_major, uint min_minor, uint min_micro); + + public bool CheckVersion(uint min_major, uint min_minor, uint min_micro) { + bool raw_ret = gst_plugin_feature_check_version(Handle, min_major, min_minor, min_micro); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_feature_get_plugin(IntPtr raw); + + public Gst.Plugin Plugin { + get { + IntPtr raw_ret = gst_plugin_feature_get_plugin(Handle); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_feature_get_plugin_name(IntPtr raw); + + public string PluginName { + get { + IntPtr raw_ret = gst_plugin_feature_get_plugin_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_plugin_feature_get_rank(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_plugin_feature_set_rank(IntPtr raw, uint rank); + + public uint Rank { + get { + uint raw_ret = gst_plugin_feature_get_rank(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_plugin_feature_set_rank(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_feature_load(IntPtr raw); + + public Gst.PluginFeature Load() { + IntPtr raw_ret = gst_plugin_feature_load(Handle); + Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PluginFeatureFilter.cs b/sources/generated/Gst/PluginFeatureFilter.cs new file mode 100644 index 0000000000..baa20f5906 --- /dev/null +++ b/sources/generated/Gst/PluginFeatureFilter.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PluginFeatureFilter(Gst.PluginFeature feature); + +} diff --git a/sources/generated/Gst/PluginFilter.cs b/sources/generated/Gst/PluginFilter.cs new file mode 100644 index 0000000000..961bd602f4 --- /dev/null +++ b/sources/generated/Gst/PluginFilter.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PluginFilter(Gst.Plugin plugin); + +} diff --git a/sources/generated/Gst/PluginFlags.cs b/sources/generated/Gst/PluginFlags.cs new file mode 100644 index 0000000000..2d533c20fc --- /dev/null +++ b/sources/generated/Gst/PluginFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.PluginFlagsGType))] + public enum PluginFlags : uint { + + Cached = 16, + Blacklisted = 32, + } + + internal class PluginFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_plugin_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_plugin_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/PluginInitFullFunc.cs b/sources/generated/Gst/PluginInitFullFunc.cs new file mode 100644 index 0000000000..3d9c9f5bd5 --- /dev/null +++ b/sources/generated/Gst/PluginInitFullFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PluginInitFullFunc(Gst.Plugin plugin); + +} diff --git a/sources/generated/Gst/PluginInitFunc.cs b/sources/generated/Gst/PluginInitFunc.cs new file mode 100644 index 0000000000..d3d4c51184 --- /dev/null +++ b/sources/generated/Gst/PluginInitFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool PluginInitFunc(Gst.Plugin plugin); + +} diff --git a/sources/generated/Gst/Poll.cs b/sources/generated/Gst/Poll.cs new file mode 100644 index 0000000000..134605b018 --- /dev/null +++ b/sources/generated/Gst/Poll.cs @@ -0,0 +1,230 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Poll : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_add_fd(IntPtr raw, IntPtr fd); + + public bool AddFd(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_add_fd(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_can_read(IntPtr raw, IntPtr fd); + + public bool FdCanRead(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_can_read(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_can_write(IntPtr raw, IntPtr fd); + + public bool FdCanWrite(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_can_write(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_ctl_pri(IntPtr raw, IntPtr fd, bool active); + + public bool FdCtlPri(Gst.PollFD fd, bool active) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_ctl_pri(Handle, native_fd, active); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_ctl_read(IntPtr raw, IntPtr fd, bool active); + + public bool FdCtlRead(Gst.PollFD fd, bool active) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_ctl_read(Handle, native_fd, active); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_ctl_write(IntPtr raw, IntPtr fd, bool active); + + public bool FdCtlWrite(Gst.PollFD fd, bool active) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_ctl_write(Handle, native_fd, active); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_has_closed(IntPtr raw, IntPtr fd); + + public bool FdHasClosed(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_has_closed(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_has_error(IntPtr raw, IntPtr fd); + + public bool FdHasError(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_has_error(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_fd_has_pri(IntPtr raw, IntPtr fd); + + public bool FdHasPri(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_fd_has_pri(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_fd_ignored(IntPtr raw, IntPtr fd); + + public void FdIgnored(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + gst_poll_fd_ignored(Handle, native_fd); + Marshal.FreeHGlobal (native_fd); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_get_read_gpollfd(IntPtr raw, out GLib.PollFD fd); + + public GLib.PollFD ReadGpollfd { + get { + GLib.PollFD fd; + gst_poll_get_read_gpollfd(Handle, out fd); + return fd; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_read_control(IntPtr raw); + + public bool ReadControl() { + bool raw_ret = gst_poll_read_control(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_remove_fd(IntPtr raw, IntPtr fd); + + public bool RemoveFd(Gst.PollFD fd) { + IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); + bool raw_ret = gst_poll_remove_fd(Handle, native_fd); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_fd); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_restart(IntPtr raw); + + public void Restart() { + gst_poll_restart(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_set_controllable(IntPtr raw, bool controllable); + + public bool SetControllable(bool controllable) { + bool raw_ret = gst_poll_set_controllable(Handle, controllable); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_set_flushing(IntPtr raw, bool flushing); + + public bool Flushing { + set { + gst_poll_set_flushing(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_poll_wait(IntPtr raw, ulong timeout); + + public int Wait(ulong timeout) { + int raw_ret = gst_poll_wait(Handle, timeout); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_poll_write_control(IntPtr raw); + + public bool WriteControl() { + bool raw_ret = gst_poll_write_control(Handle); + bool ret = raw_ret; + return ret; + } + + public Poll(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_poll_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_poll_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PollFD.cs b/sources/generated/Gst/PollFD.cs new file mode 100644 index 0000000000..fcb1f30fe9 --- /dev/null +++ b/sources/generated/Gst/PollFD.cs @@ -0,0 +1,62 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct PollFD : IEquatable { + + public int Fd; + private int idx; + + public static Gst.PollFD Zero = new Gst.PollFD (); + + public static Gst.PollFD New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.PollFD.Zero; + return (Gst.PollFD) Marshal.PtrToStructure (raw, typeof (Gst.PollFD)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_poll_fd_init(IntPtr raw); + + public void Init() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_poll_fd_init(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.PollFD target) + { + target = New (native); + } + + public bool Equals (PollFD other) + { + return true && Fd.Equals (other.Fd) && idx.Equals (other.idx); + } + + public override bool Equals (object other) + { + return other is PollFD && Equals ((PollFD) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Fd.GetHashCode () ^ idx.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/PresetAdapter.cs b/sources/generated/Gst/PresetAdapter.cs new file mode 100644 index 0000000000..40e2b020f1 --- /dev/null +++ b/sources/generated/Gst/PresetAdapter.cs @@ -0,0 +1,409 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class PresetAdapter : GLib.GInterfaceAdapter, Gst.IPreset { + + [StructLayout (LayoutKind.Sequential)] + struct GstPresetInterface { + public GetPresetNamesNativeDelegate GetPresetNames; + public GetPropertyNamesNativeDelegate GetPropertyNames; + public LoadPresetNativeDelegate LoadPreset; + public SavePresetNativeDelegate SavePreset; + public RenamePresetNativeDelegate RenamePreset; + public DeletePresetNativeDelegate DeletePreset; + public SetMetaNativeDelegate SetMeta; + public GetMetaNativeDelegate GetMeta; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + } + + static GstPresetInterface iface; + + static PresetAdapter () + { + GLib.GType.Register (_gtype, typeof (PresetAdapter)); + iface.GetPresetNames = new GetPresetNamesNativeDelegate (GetPresetNames_cb); + iface.GetPropertyNames = new GetPropertyNamesNativeDelegate (GetPropertyNames_cb); + iface.LoadPreset = new LoadPresetNativeDelegate (LoadPreset_cb); + iface.SavePreset = new SavePresetNativeDelegate (SavePreset_cb); + iface.RenamePreset = new RenamePresetNativeDelegate (RenamePreset_cb); + iface.DeletePreset = new DeletePresetNativeDelegate (DeletePreset_cb); + iface.SetMeta = new SetMetaNativeDelegate (SetMeta_cb); + iface.GetMeta = new GetMetaNativeDelegate (GetMeta_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetPresetNamesNativeDelegate (IntPtr inst); + + static IntPtr GetPresetNames_cb (IntPtr inst) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + string[] __result; + __result = __obj.PresetNames; + return GLib.Marshaller.StringArrayToNullTermStrvPointer (__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetPropertyNamesNativeDelegate (IntPtr inst); + + static IntPtr GetPropertyNames_cb (IntPtr inst) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + string[] __result; + __result = __obj.PropertyNames; + return GLib.Marshaller.StringArrayToNullTermStrvPointer (__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool LoadPresetNativeDelegate (IntPtr inst, IntPtr name); + + static bool LoadPreset_cb (IntPtr inst, IntPtr name) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + __result = __obj.LoadPreset (GLib.Marshaller.Utf8PtrToString (name)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SavePresetNativeDelegate (IntPtr inst, IntPtr name); + + static bool SavePreset_cb (IntPtr inst, IntPtr name) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + __result = __obj.SavePreset (GLib.Marshaller.Utf8PtrToString (name)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool RenamePresetNativeDelegate (IntPtr inst, IntPtr old_name, IntPtr new_name); + + static bool RenamePreset_cb (IntPtr inst, IntPtr old_name, IntPtr new_name) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + __result = __obj.RenamePreset (GLib.Marshaller.Utf8PtrToString (old_name), GLib.Marshaller.Utf8PtrToString (new_name)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool DeletePresetNativeDelegate (IntPtr inst, IntPtr name); + + static bool DeletePreset_cb (IntPtr inst, IntPtr name) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + __result = __obj.DeletePreset (GLib.Marshaller.Utf8PtrToString (name)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetMetaNativeDelegate (IntPtr inst, IntPtr name, IntPtr tag, IntPtr value); + + static bool SetMeta_cb (IntPtr inst, IntPtr name, IntPtr tag, IntPtr value) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + __result = __obj.SetMeta (GLib.Marshaller.Utf8PtrToString (name), GLib.Marshaller.Utf8PtrToString (tag), GLib.Marshaller.Utf8PtrToString (value)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool GetMetaNativeDelegate (IntPtr inst, IntPtr name, IntPtr tag, out IntPtr value); + + static bool GetMeta_cb (IntPtr inst, IntPtr name, IntPtr tag, out IntPtr value) + { + try { + IPresetImplementor __obj = GLib.Object.GetObject (inst, false) as IPresetImplementor; + bool __result; + string myvalue; + __result = __obj.GetMeta (GLib.Marshaller.Utf8PtrToString (name), GLib.Marshaller.Utf8PtrToString (tag), out myvalue); + value = GLib.Marshaller.StringToPtrGStrdup(myvalue); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstPresetInterface native_iface = (GstPresetInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstPresetInterface)); + native_iface.GetPresetNames = iface.GetPresetNames; + native_iface.GetPropertyNames = iface.GetPropertyNames; + native_iface.LoadPreset = iface.LoadPreset; + native_iface.SavePreset = iface.SavePreset; + native_iface.RenamePreset = iface.RenamePreset; + native_iface.DeletePreset = iface.DeletePreset; + native_iface.SetMeta = iface.SetMeta; + native_iface.GetMeta = iface.GetMeta; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public PresetAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public PresetAdapter (IPresetImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public PresetAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_preset_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IPreset GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IPreset GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IPresetImplementor) + return new PresetAdapter (obj as IPresetImplementor); + else if (obj as IPreset == null) + return new PresetAdapter (obj.Handle); + else + return obj as IPreset; + } + + public IPresetImplementor Implementor { + get { + return implementor as IPresetImplementor; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_app_dir(); + + public static string AppDir { + get { + IntPtr raw_ret = gst_preset_get_app_dir(); + string ret = GLib.Marshaller.FilenamePtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_set_app_dir(IntPtr app_dir); + + public static bool SetAppDir(string app_dir) { + IntPtr native_app_dir = GLib.Marshaller.StringToFilenamePtr (app_dir); + bool raw_ret = gst_preset_set_app_dir(native_app_dir); + bool ret = raw_ret; + GLib.Marshaller.Free (native_app_dir); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_delete_preset(IntPtr raw, IntPtr name); + + public bool DeletePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_delete_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_get_meta(IntPtr raw, IntPtr name, IntPtr tag, out IntPtr value); + + public bool GetMeta(string name, string tag, out string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_preset_get_meta(Handle, native_name, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_preset_names(IntPtr raw); + + public string[] PresetNames { + get { + IntPtr raw_ret = gst_preset_get_preset_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_preset_get_property_names(IntPtr raw); + + public string[] PropertyNames { + get { + IntPtr raw_ret = gst_preset_get_property_names(Handle); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_is_editable(IntPtr raw); + + public bool IsEditable { + get { + bool raw_ret = gst_preset_is_editable(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_load_preset(IntPtr raw, IntPtr name); + + public bool LoadPreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_load_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_rename_preset(IntPtr raw, IntPtr old_name, IntPtr new_name); + + public bool RenamePreset(string old_name, string new_name) { + IntPtr native_old_name = GLib.Marshaller.StringToPtrGStrdup (old_name); + IntPtr native_new_name = GLib.Marshaller.StringToPtrGStrdup (new_name); + bool raw_ret = gst_preset_rename_preset(Handle, native_old_name, native_new_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_old_name); + GLib.Marshaller.Free (native_new_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_save_preset(IntPtr raw, IntPtr name); + + public bool SavePreset(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_preset_save_preset(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_preset_set_meta(IntPtr raw, IntPtr name, IntPtr tag, IntPtr value); + + public bool SetMeta(string name, string tag, string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + bool raw_ret = gst_preset_set_meta(Handle, native_name, native_tag, native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_tag); + GLib.Marshaller.Free (native_value); + return ret; + } + + public bool SetMeta(string name, string tag) { + return SetMeta (name, tag, null); + } + +#endregion + } +} diff --git a/sources/generated/Gst/ProgressType.cs b/sources/generated/Gst/ProgressType.cs new file mode 100644 index 0000000000..2a18bbf7ac --- /dev/null +++ b/sources/generated/Gst/ProgressType.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ProgressTypeGType))] + public enum ProgressType { + + Start = 0, + Continue = 1, + Complete = 2, + Canceled = 3, + Error = 4, + } + + internal class ProgressTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_progress_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_progress_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Promise.cs b/sources/generated/Gst/Promise.cs new file mode 100644 index 0000000000..f659dc3e0d --- /dev/null +++ b/sources/generated/Gst/Promise.cs @@ -0,0 +1,114 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Promise : Gst.MiniObject { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_promise_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_promise_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_promise_expire(IntPtr raw); + + public void Expire() { + gst_promise_expire(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_promise_get_reply(IntPtr raw); + + public Gst.Structure RetrieveReply() { + IntPtr raw_ret = gst_promise_get_reply(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_promise_interrupt(IntPtr raw); + + public void Interrupt() { + gst_promise_interrupt(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_promise_reply(IntPtr raw, IntPtr s); + + public void Reply(Gst.Structure s) { + s.Owned = false; + gst_promise_reply(Handle, s == null ? IntPtr.Zero : s.Handle); + } + + public void Reply() { + Reply (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_promise_wait(IntPtr raw); + + public Gst.PromiseResult Wait() { + int raw_ret = gst_promise_wait(Handle); + Gst.PromiseResult ret = (Gst.PromiseResult) raw_ret; + return ret; + } + + public Promise(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_promise_new(); + + public Promise () + { + Raw = gst_promise_new(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_promise_new_with_change_func(GstSharp.PromiseChangeFuncNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public Promise (Gst.PromiseChangeFunc func) + { + GstSharp.PromiseChangeFuncWrapper func_wrapper = new GstSharp.PromiseChangeFuncWrapper (func); + IntPtr user_data; + GLib.DestroyNotify notify; + if (func == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (func_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + Raw = gst_promise_new_with_change_func(func_wrapper.NativeDelegate, user_data, notify); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/PromiseChangeFunc.cs b/sources/generated/Gst/PromiseChangeFunc.cs new file mode 100644 index 0000000000..fcea5386e9 --- /dev/null +++ b/sources/generated/Gst/PromiseChangeFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void PromiseChangeFunc(Gst.Promise promise); + +} diff --git a/sources/generated/Gst/PromiseResult.cs b/sources/generated/Gst/PromiseResult.cs new file mode 100644 index 0000000000..c70b47fed7 --- /dev/null +++ b/sources/generated/Gst/PromiseResult.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.PromiseResultGType))] + public enum PromiseResult { + + Pending = 0, + Interrupted = 1, + Replied = 2, + Expired = 3, + } + + internal class PromiseResultGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_promise_result_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_promise_result_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ProtectionMeta.cs b/sources/generated/Gst/ProtectionMeta.cs new file mode 100644 index 0000000000..0bfcfffa1b --- /dev/null +++ b/sources/generated/Gst/ProtectionMeta.cs @@ -0,0 +1,54 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ProtectionMeta : IEquatable { + + public Gst.Meta Meta; + private IntPtr _info; + public Gst.Structure Info { + get { + return _info == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (_info, typeof (Gst.Structure), false); + } + set { + _info = value == null ? IntPtr.Zero : value.Handle; + } + } + + public static Gst.ProtectionMeta Zero = new Gst.ProtectionMeta (); + + public static Gst.ProtectionMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.ProtectionMeta.Zero; + return (Gst.ProtectionMeta) Marshal.PtrToStructure (raw, typeof (Gst.ProtectionMeta)); + } + + public bool Equals (ProtectionMeta other) + { + return true && Meta.Equals (other.Meta) && Info.Equals (other.Info); + } + + public override bool Equals (object other) + { + return other is ProtectionMeta && Equals ((ProtectionMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Info.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/ProviderHiddenHandler.cs b/sources/generated/Gst/ProviderHiddenHandler.cs new file mode 100644 index 0000000000..e3a4aaff4e --- /dev/null +++ b/sources/generated/Gst/ProviderHiddenHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ProviderHiddenHandler(object o, ProviderHiddenArgs args); + + public class ProviderHiddenArgs : GLib.SignalArgs { + public string Object{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/ProviderUnhiddenHandler.cs b/sources/generated/Gst/ProviderUnhiddenHandler.cs new file mode 100644 index 0000000000..9a04f00e6d --- /dev/null +++ b/sources/generated/Gst/ProviderUnhiddenHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void ProviderUnhiddenHandler(object o, ProviderUnhiddenArgs args); + + public class ProviderUnhiddenArgs : GLib.SignalArgs { + public string Object{ + get { + return (string) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/ProxyPad.cs b/sources/generated/Gst/ProxyPad.cs new file mode 100644 index 0000000000..17491f8a3d --- /dev/null +++ b/sources/generated/Gst/ProxyPad.cs @@ -0,0 +1,145 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ProxyPad : Gst.Pad { + + public ProxyPad (IntPtr raw) : base(raw) {} + + protected ProxyPad() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Pad.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 1 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_proxy_pad_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_proxy_pad_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_proxy_pad_chain_default(IntPtr pad, IntPtr parent, IntPtr buffer); + + public static Gst.FlowReturn ChainDefault(Gst.Pad pad, Gst.Object parent, Gst.Buffer buffer) { + buffer.Owned = false; + int raw_ret = gst_proxy_pad_chain_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + public static Gst.FlowReturn ChainDefault(Gst.Pad pad, Gst.Buffer buffer) { + return ChainDefault (pad, null, buffer); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_proxy_pad_chain_list_default(IntPtr pad, IntPtr parent, IntPtr list); + + public static Gst.FlowReturn ChainListDefault(Gst.Pad pad, Gst.Object parent, Gst.BufferList list) { + list.Owned = false; + int raw_ret = gst_proxy_pad_chain_list_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, list == null ? IntPtr.Zero : list.Handle); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + return ret; + } + + public static Gst.FlowReturn ChainListDefault(Gst.Pad pad, Gst.BufferList list) { + return ChainListDefault (pad, null, list); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_proxy_pad_getrange_default(IntPtr pad, IntPtr parent, ulong offset, uint size, out IntPtr buffer); + + public static Gst.FlowReturn GetrangeDefault(Gst.Pad pad, Gst.Object parent, ulong offset, uint size, out Gst.Buffer buffer) { + IntPtr native_buffer; + int raw_ret = gst_proxy_pad_getrange_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle, offset, size, out native_buffer); + Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; + buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_buffer, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_proxy_pad_iterate_internal_links_default(IntPtr pad, IntPtr parent); + + public static Gst.Iterator IterateInternalLinksDefault(Gst.Pad pad, Gst.Object parent) { + IntPtr raw_ret = gst_proxy_pad_iterate_internal_links_default(pad == null ? IntPtr.Zero : pad.Handle, parent == null ? IntPtr.Zero : parent.Handle); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + public static Gst.Iterator IterateInternalLinksDefault(Gst.Pad pad) { + return IterateInternalLinksDefault (pad, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_proxy_pad_get_internal(IntPtr raw); + + public Gst.ProxyPad Internal { + get { + IntPtr raw_ret = gst_proxy_pad_get_internal(Handle); + Gst.ProxyPad ret = GLib.Object.GetObject(raw_ret, true) as Gst.ProxyPad; + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Pad.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/QOSType.cs b/sources/generated/Gst/QOSType.cs new file mode 100644 index 0000000000..5d20800514 --- /dev/null +++ b/sources/generated/Gst/QOSType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.QOSTypeGType))] + public enum QOSType { + + Overflow = 0, + Underflow = 1, + Throttle = 2, + } + + internal class QOSTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_qos_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_qos_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Query.cs b/sources/generated/Gst/Query.cs new file mode 100644 index 0000000000..f3762718b3 --- /dev/null +++ b/sources/generated/Gst/Query.cs @@ -0,0 +1,863 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Query : Gst.MiniObject { + + public Gst.QueryType Type { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return (Gst.QueryType) (*raw_ptr); + } + } + set { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = (int) value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_query_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_add_allocation_meta(IntPtr raw, IntPtr api, IntPtr parms); + + public void AddAllocationMeta(GLib.GType api, Gst.Structure parms) { + gst_query_add_allocation_meta(Handle, api.Val, parms == null ? IntPtr.Zero : parms.Handle); + } + + public void AddAllocationMeta(GLib.GType api) { + AddAllocationMeta (api, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_add_allocation_param(IntPtr raw, IntPtr allocator, IntPtr parms); + + public void AddAllocationParam(Gst.Allocator allocator, Gst.AllocationParams parms) { + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + gst_query_add_allocation_param(Handle, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms); + Marshal.FreeHGlobal (native_parms); + } + + public void AddAllocationParam() { + AddAllocationParam (null, Gst.AllocationParams.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_add_allocation_pool(IntPtr raw, IntPtr pool, uint size, uint min_buffers, uint max_buffers); + + public void AddAllocationPool(Gst.BufferPool pool, uint size, uint min_buffers, uint max_buffers) { + gst_query_add_allocation_pool(Handle, pool == null ? IntPtr.Zero : pool.Handle, size, min_buffers, max_buffers); + } + + public void AddAllocationPool(uint size, uint min_buffers, uint max_buffers) { + AddAllocationPool (null, size, min_buffers, max_buffers); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_add_buffering_range(IntPtr raw, long start, long stop); + + public bool AddBufferingRange(long start, long stop) { + bool raw_ret = gst_query_add_buffering_range(Handle, start, stop); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_add_scheduling_mode(IntPtr raw, int mode); + + public void AddSchedulingMode(Gst.PadMode mode) { + gst_query_add_scheduling_mode(Handle, (int) mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_find_allocation_meta(IntPtr raw, IntPtr api, out uint index); + + public bool FindAllocationMeta(GLib.GType api, out uint index) { + bool raw_ret = gst_query_find_allocation_meta(Handle, api.Val, out index); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_get_n_allocation_metas(IntPtr raw); + + public uint NAllocationMetas { + get { + uint raw_ret = gst_query_get_n_allocation_metas(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_get_n_allocation_params(IntPtr raw); + + public uint NAllocationParams { + get { + uint raw_ret = gst_query_get_n_allocation_params(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_get_n_allocation_pools(IntPtr raw); + + public uint NAllocationPools { + get { + uint raw_ret = gst_query_get_n_allocation_pools(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_get_n_buffering_ranges(IntPtr raw); + + public uint NBufferingRanges { + get { + uint raw_ret = gst_query_get_n_buffering_ranges(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_query_get_n_scheduling_modes(IntPtr raw); + + public uint NSchedulingModes { + get { + uint raw_ret = gst_query_get_n_scheduling_modes(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_get_structure(IntPtr raw); + + public Gst.Structure Structure { + get { + IntPtr raw_ret = gst_query_get_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_has_scheduling_mode(IntPtr raw, int mode); + + public bool HasSchedulingMode(Gst.PadMode mode) { + bool raw_ret = gst_query_has_scheduling_mode(Handle, (int) mode); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_has_scheduling_mode_with_flags(IntPtr raw, int mode, int flags); + + public bool HasSchedulingModeWithFlags(Gst.PadMode mode, Gst.SchedulingFlags flags) { + bool raw_ret = gst_query_has_scheduling_mode_with_flags(Handle, (int) mode, (int) flags); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_accept_caps(IntPtr raw, out IntPtr caps); + + public Gst.Caps ParseAcceptCaps() { + Gst.Caps caps; + IntPtr native_caps; + gst_query_parse_accept_caps(Handle, out native_caps); + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false); + return caps; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_accept_caps_result(IntPtr raw, out bool _result); + + public bool ParseAcceptCapsResult() { + bool _result; + gst_query_parse_accept_caps_result(Handle, out _result); + return _result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_allocation(IntPtr raw, out IntPtr caps, out bool need_pool); + + public void ParseAllocation(out Gst.Caps caps, out bool need_pool) { + IntPtr native_caps; + gst_query_parse_allocation(Handle, out native_caps, out need_pool); + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_bitrate(IntPtr raw, out uint nominal_bitrate); + + public uint ParseBitrate() { + uint nominal_bitrate; + gst_query_parse_bitrate(Handle, out nominal_bitrate); + return nominal_bitrate; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_buffering_percent(IntPtr raw, out bool busy, out int percent); + + public void ParseBufferingPercent(out bool busy, out int percent) { + gst_query_parse_buffering_percent(Handle, out busy, out percent); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_buffering_range(IntPtr raw, out int format, out long start, out long stop, out long estimated_total); + + public void ParseBufferingRange(out Gst.Format format, out long start, out long stop, out long estimated_total) { + int native_format; + gst_query_parse_buffering_range(Handle, out native_format, out start, out stop, out estimated_total); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_buffering_stats(IntPtr raw, out int mode, out int avg_in, out int avg_out, out long buffering_left); + + public void ParseBufferingStats(out Gst.BufferingMode mode, out int avg_in, out int avg_out, out long buffering_left) { + int native_mode; + gst_query_parse_buffering_stats(Handle, out native_mode, out avg_in, out avg_out, out buffering_left); + mode = (Gst.BufferingMode) native_mode; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_caps(IntPtr raw, out IntPtr filter); + + public Gst.Caps ParseCaps() { + Gst.Caps filter; + IntPtr native_filter; + gst_query_parse_caps(Handle, out native_filter); + filter = native_filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_filter, typeof (Gst.Caps), false); + return filter; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_caps_result(IntPtr raw, out IntPtr caps); + + public Gst.Caps ParseCapsResult() { + Gst.Caps caps; + IntPtr native_caps; + gst_query_parse_caps_result(Handle, out native_caps); + caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false); + return caps; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_context(IntPtr raw, IntPtr context); + + public Gst.Context ParseContext() { + Gst.Context context; + IntPtr native_context = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Context))); + gst_query_parse_context(Handle, native_context); + context = Gst.Context.New (native_context); + Marshal.FreeHGlobal (native_context); + return context; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_parse_context_type(IntPtr raw, out IntPtr context_type); + + public bool ParseContextType(out string context_type) { + IntPtr native_context_type; + bool raw_ret = gst_query_parse_context_type(Handle, out native_context_type); + bool ret = raw_ret; + context_type = GLib.Marshaller.Utf8PtrToString (native_context_type); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_convert(IntPtr raw, out int src_format, out long src_value, out int dest_format, out long dest_value); + + public void ParseConvert(out Gst.Format src_format, out long src_value, out Gst.Format dest_format, out long dest_value) { + int native_src_format; + int native_dest_format; + gst_query_parse_convert(Handle, out native_src_format, out src_value, out native_dest_format, out dest_value); + src_format = (Gst.Format) native_src_format; + dest_format = (Gst.Format) native_dest_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_duration(IntPtr raw, out int format, out long duration); + + public void ParseDuration(out Gst.Format format, out long duration) { + int native_format; + gst_query_parse_duration(Handle, out native_format, out duration); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_latency(IntPtr raw, out bool live, out ulong min_latency, out ulong max_latency); + + public void ParseLatency(out bool live, out ulong min_latency, out ulong max_latency) { + gst_query_parse_latency(Handle, out live, out min_latency, out max_latency); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_n_formats(IntPtr raw, out uint n_formats); + + public uint ParseNFormats() { + uint n_formats; + gst_query_parse_n_formats(Handle, out n_formats); + return n_formats; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_parse_nth_allocation_meta(IntPtr raw, uint index, out IntPtr parms); + + public GLib.GType ParseNthAllocationMeta(uint index, out Gst.Structure parms) { + IntPtr native_parms; + IntPtr raw_ret = gst_query_parse_nth_allocation_meta(Handle, index, out native_parms); + GLib.GType ret = new GLib.GType(raw_ret); + parms = native_parms == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_parms, typeof (Gst.Structure), false); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_nth_allocation_param(IntPtr raw, uint index, out IntPtr allocator, IntPtr parms); + + public void ParseNthAllocationParam(uint index, out Gst.Allocator allocator, out Gst.AllocationParams parms) { + IntPtr native_allocator; + IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); + gst_query_parse_nth_allocation_param(Handle, index, out native_allocator, native_parms); + allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; + parms = Gst.AllocationParams.New (native_parms); + Marshal.FreeHGlobal (native_parms); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_nth_allocation_pool(IntPtr raw, uint index, out IntPtr pool, out uint size, out uint min_buffers, out uint max_buffers); + + public void ParseNthAllocationPool(uint index, out Gst.BufferPool pool, out uint size, out uint min_buffers, out uint max_buffers) { + IntPtr native_pool; + gst_query_parse_nth_allocation_pool(Handle, index, out native_pool, out size, out min_buffers, out max_buffers); + pool = GLib.Object.GetObject(native_pool, true) as Gst.BufferPool; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_query_parse_nth_buffering_range(IntPtr raw, uint index, out long start, out long stop); + + public bool ParseNthBufferingRange(uint index, out long start, out long stop) { + bool raw_ret = gst_query_parse_nth_buffering_range(Handle, index, out start, out stop); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_nth_format(IntPtr raw, uint nth, out int format); + + public Gst.Format ParseNthFormat(uint nth) { + Gst.Format format; + int native_format; + gst_query_parse_nth_format(Handle, nth, out native_format); + format = (Gst.Format) native_format; + return format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_query_parse_nth_scheduling_mode(IntPtr raw, uint index); + + public Gst.PadMode ParseNthSchedulingMode(uint index) { + int raw_ret = gst_query_parse_nth_scheduling_mode(Handle, index); + Gst.PadMode ret = (Gst.PadMode) raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_position(IntPtr raw, out int format, out long cur); + + public void ParsePosition(out Gst.Format format, out long cur) { + int native_format; + gst_query_parse_position(Handle, out native_format, out cur); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_scheduling(IntPtr raw, out int flags, out int minsize, out int maxsize, out int align); + + public void ParseScheduling(out Gst.SchedulingFlags flags, out int minsize, out int maxsize, out int align) { + int native_flags; + gst_query_parse_scheduling(Handle, out native_flags, out minsize, out maxsize, out align); + flags = (Gst.SchedulingFlags) native_flags; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_seeking(IntPtr raw, out int format, out bool seekable, out long segment_start, out long segment_end); + + public void ParseSeeking(out Gst.Format format, out bool seekable, out long segment_start, out long segment_end) { + int native_format; + gst_query_parse_seeking(Handle, out native_format, out seekable, out segment_start, out segment_end); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_segment(IntPtr raw, out double rate, out int format, out long start_value, out long stop_value); + + public void ParseSegment(out double rate, out Gst.Format format, out long start_value, out long stop_value) { + int native_format; + gst_query_parse_segment(Handle, out rate, out native_format, out start_value, out stop_value); + format = (Gst.Format) native_format; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_uri(IntPtr raw, out IntPtr uri); + + public string ParseUri() { + string uri; + IntPtr native_uri; + gst_query_parse_uri(Handle, out native_uri); + uri = GLib.Marshaller.PtrToStringGFree(native_uri); + return uri; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_uri_redirection(IntPtr raw, out IntPtr uri); + + public string ParseUriRedirection() { + string uri; + IntPtr native_uri; + gst_query_parse_uri_redirection(Handle, out native_uri); + uri = GLib.Marshaller.PtrToStringGFree(native_uri); + return uri; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_parse_uri_redirection_permanent(IntPtr raw, out bool permanent); + + public bool ParseUriRedirectionPermanent() { + bool permanent; + gst_query_parse_uri_redirection_permanent(Handle, out permanent); + return permanent; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_remove_nth_allocation_meta(IntPtr raw, uint index); + + public void RemoveNthAllocationMeta(uint index) { + gst_query_remove_nth_allocation_meta(Handle, index); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_remove_nth_allocation_param(IntPtr raw, uint index); + + public void RemoveNthAllocationParam(uint index) { + gst_query_remove_nth_allocation_param(Handle, index); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_remove_nth_allocation_pool(IntPtr raw, uint index); + + public void RemoveNthAllocationPool(uint index) { + gst_query_remove_nth_allocation_pool(Handle, index); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_accept_caps_result(IntPtr raw, bool _result); + + public bool AcceptCapsResult { + set { + gst_query_set_accept_caps_result(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_bitrate(IntPtr raw, uint nominal_bitrate); + + public uint Bitrate { + set { + gst_query_set_bitrate(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_buffering_percent(IntPtr raw, bool busy, int percent); + + public void SetBufferingPercent(bool busy, int percent) { + gst_query_set_buffering_percent(Handle, busy, percent); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_buffering_range(IntPtr raw, int format, long start, long stop, long estimated_total); + + public void SetBufferingRange(Gst.Format format, long start, long stop, long estimated_total) { + gst_query_set_buffering_range(Handle, (int) format, start, stop, estimated_total); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_buffering_stats(IntPtr raw, int mode, int avg_in, int avg_out, long buffering_left); + + public void SetBufferingStats(Gst.BufferingMode mode, int avg_in, int avg_out, long buffering_left) { + gst_query_set_buffering_stats(Handle, (int) mode, avg_in, avg_out, buffering_left); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_caps_result(IntPtr raw, IntPtr caps); + + public Gst.Caps CapsResult { + set { + gst_query_set_caps_result(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_context(IntPtr raw, IntPtr value); + + public Gst.Context Context { + set { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_query_set_context(Handle, native_value); + Marshal.FreeHGlobal (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_convert(IntPtr raw, int src_format, long src_value, int dest_format, long dest_value); + + public void SetConvert(Gst.Format src_format, long src_value, Gst.Format dest_format, long dest_value) { + gst_query_set_convert(Handle, (int) src_format, src_value, (int) dest_format, dest_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_duration(IntPtr raw, int format, long duration); + + public void SetDuration(Gst.Format format, long duration) { + gst_query_set_duration(Handle, (int) format, duration); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_formatsv(IntPtr raw, int n_formats, int[] formats); + + public Gst.Format[] Formatsv { + set { + int cnt_value = value == null ? 0 : value.Length; + int[] native_value = new int [cnt_value]; + for (int i = 0; i < cnt_value; i++) + native_value [i] = (int) value[i]; + gst_query_set_formatsv(Handle, (value == null ? 0 : value.Length), native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_latency(IntPtr raw, bool live, ulong min_latency, ulong max_latency); + + public void SetLatency(bool live, ulong min_latency, ulong max_latency) { + gst_query_set_latency(Handle, live, min_latency, max_latency); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_nth_allocation_param(IntPtr raw, uint index, IntPtr allocator, IntPtr parms); + + public void SetNthAllocationParam(uint index, Gst.Allocator allocator, Gst.AllocationParams parms) { + IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms); + gst_query_set_nth_allocation_param(Handle, index, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms); + Marshal.FreeHGlobal (native_parms); + } + + public void SetNthAllocationParam(uint index) { + SetNthAllocationParam (index, null, Gst.AllocationParams.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_nth_allocation_pool(IntPtr raw, uint index, IntPtr pool, uint size, uint min_buffers, uint max_buffers); + + public void SetNthAllocationPool(uint index, Gst.BufferPool pool, uint size, uint min_buffers, uint max_buffers) { + gst_query_set_nth_allocation_pool(Handle, index, pool == null ? IntPtr.Zero : pool.Handle, size, min_buffers, max_buffers); + } + + public void SetNthAllocationPool(uint index, uint size, uint min_buffers, uint max_buffers) { + SetNthAllocationPool (index, null, size, min_buffers, max_buffers); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_position(IntPtr raw, int format, long cur); + + public void SetPosition(Gst.Format format, long cur) { + gst_query_set_position(Handle, (int) format, cur); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_scheduling(IntPtr raw, int flags, int minsize, int maxsize, int align); + + public void SetScheduling(Gst.SchedulingFlags flags, int minsize, int maxsize, int align) { + gst_query_set_scheduling(Handle, (int) flags, minsize, maxsize, align); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_seeking(IntPtr raw, int format, bool seekable, long segment_start, long segment_end); + + public void SetSeeking(Gst.Format format, bool seekable, long segment_start, long segment_end) { + gst_query_set_seeking(Handle, (int) format, seekable, segment_start, segment_end); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_segment(IntPtr raw, double rate, int format, long start_value, long stop_value); + + public void SetSegment(double rate, Gst.Format format, long start_value, long stop_value) { + gst_query_set_segment(Handle, rate, (int) format, start_value, stop_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_uri(IntPtr raw, IntPtr uri); + + public string Uri { + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_query_set_uri(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_uri_redirection(IntPtr raw, IntPtr uri); + + public string UriRedirection { + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_query_set_uri_redirection(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_set_uri_redirection_permanent(IntPtr raw, bool permanent); + + public bool UriRedirectionPermanent { + set { + gst_query_set_uri_redirection_permanent(Handle, value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_writable_structure(IntPtr raw); + + public Gst.Structure WritableStructure() { + IntPtr raw_ret = gst_query_writable_structure(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + + public Query(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_accept_caps(IntPtr caps); + + public Query (Gst.Caps caps) + { + Raw = gst_query_new_accept_caps(caps == null ? IntPtr.Zero : caps.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_allocation(IntPtr caps, bool need_pool); + + public Query (Gst.Caps caps, bool need_pool) + { + Raw = gst_query_new_allocation(caps == null ? IntPtr.Zero : caps.Handle, need_pool); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_bitrate(); + + public Query () + { + Raw = gst_query_new_bitrate(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_buffering(int format); + + public Query (Gst.Format format) + { + Raw = gst_query_new_buffering((int) format); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_caps(IntPtr filter); + + public static Query NewCaps(Gst.Caps filter) + { + Query result = new Query (gst_query_new_caps(filter == null ? IntPtr.Zero : filter.Handle)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_context(IntPtr context_type); + + public Query (string context_type) + { + IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type); + Raw = gst_query_new_context(native_context_type); + GLib.Marshaller.Free (native_context_type); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_convert(int src_format, long value, int dest_format); + + public Query (Gst.Format src_format, long value, Gst.Format dest_format) + { + Raw = gst_query_new_convert((int) src_format, value, (int) dest_format); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_custom(int type, IntPtr structure); + + public Query (Gst.QueryType type, Gst.Structure structure) + { + structure.Owned = false; + Raw = gst_query_new_custom((int) type, structure == null ? IntPtr.Zero : structure.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_drain(); + + public static Query NewDrain() + { + Query result = new Query (gst_query_new_drain()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_duration(int format); + + public static Query NewDuration(Gst.Format format) + { + Query result = new Query (gst_query_new_duration((int) format)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_formats(); + + public static Query NewFormats() + { + Query result = new Query (gst_query_new_formats()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_latency(); + + public static Query NewLatency() + { + Query result = new Query (gst_query_new_latency()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_position(int format); + + public static Query NewPosition(Gst.Format format) + { + Query result = new Query (gst_query_new_position((int) format)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_scheduling(); + + public static Query NewScheduling() + { + Query result = new Query (gst_query_new_scheduling()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_seeking(int format); + + public static Query NewSeeking(Gst.Format format) + { + Query result = new Query (gst_query_new_seeking((int) format)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_segment(int format); + + public static Query NewSegment(Gst.Format format) + { + Query result = new Query (gst_query_new_segment((int) format)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_new_uri(); + + public static Query NewUri() + { + Query result = new Query (gst_query_new_uri()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_query_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_query_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_query_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , Gst.MiniObject.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.QueryType))) // type + , null + , null + , (long) Marshal.OffsetOf(typeof(GstQuery_typeAlign), "type") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstQuery_typeAlign + { + sbyte f1; + private Gst.QueryType type; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/QueryType.cs b/sources/generated/Gst/QueryType.cs new file mode 100644 index 0000000000..fc4f82c0a9 --- /dev/null +++ b/sources/generated/Gst/QueryType.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.QueryTypeGType))] + public enum QueryType { + + Unknown = 0, + Position = 2563, + Duration = 5123, + Latency = 7683, + Jitter = 10243, + Rate = 12803, + Seeking = 15363, + Segment = 17923, + Convert = 20483, + Formats = 23043, + Buffering = 28163, + Custom = 30723, + Uri = 33283, + Allocation = 35846, + Scheduling = 38401, + AcceptCaps = 40963, + Caps = 43523, + Drain = 46086, + Context = 48643, + Bitrate = 51202, + } + + internal class QueryTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_query_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/QueryTypeFlags.cs b/sources/generated/Gst/QueryTypeFlags.cs new file mode 100644 index 0000000000..f1be657932 --- /dev/null +++ b/sources/generated/Gst/QueryTypeFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.QueryTypeFlagsGType))] + public enum QueryTypeFlags : uint { + + Upstream = 1, + Downstream = 2, + Serialized = 4, + } + + internal class QueryTypeFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_query_type_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_query_type_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Rank.cs b/sources/generated/Gst/Rank.cs new file mode 100644 index 0000000000..e2db4c1c9c --- /dev/null +++ b/sources/generated/Gst/Rank.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.RankGType))] + public enum Rank { + + None = 0, + Marginal = 64, + Secondary = 128, + Primary = 256, + } + + internal class RankGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_rank_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_rank_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/ReferenceTimestampMeta.cs b/sources/generated/Gst/ReferenceTimestampMeta.cs new file mode 100644 index 0000000000..49055862d9 --- /dev/null +++ b/sources/generated/Gst/ReferenceTimestampMeta.cs @@ -0,0 +1,67 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ReferenceTimestampMeta : IEquatable { + + public Gst.Meta Parent; + private IntPtr _reference; + public Gst.Caps Reference { + get { + return _reference == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_reference, typeof (Gst.Caps), false); + } + set { + _reference = value == null ? IntPtr.Zero : value.Handle; + } + } + public ulong Timestamp; + public ulong Duration; + + public static Gst.ReferenceTimestampMeta Zero = new Gst.ReferenceTimestampMeta (); + + public static Gst.ReferenceTimestampMeta New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.ReferenceTimestampMeta.Zero; + return (Gst.ReferenceTimestampMeta) Marshal.PtrToStructure (raw, typeof (Gst.ReferenceTimestampMeta)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_reference_timestamp_meta_get_info(); + + public static Gst.MetaInfo Info { + get { + IntPtr raw_ret = gst_reference_timestamp_meta_get_info(); + Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret); + return ret; + } + } + + public bool Equals (ReferenceTimestampMeta other) + { + return true && Parent.Equals (other.Parent) && Reference.Equals (other.Reference) && Timestamp.Equals (other.Timestamp) && Duration.Equals (other.Duration); + } + + public override bool Equals (object other) + { + return other is ReferenceTimestampMeta && Equals ((ReferenceTimestampMeta) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Parent.GetHashCode () ^ Reference.GetHashCode () ^ Timestamp.GetHashCode () ^ Duration.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/Registry.cs b/sources/generated/Gst/Registry.cs new file mode 100644 index 0000000000..b8101e08b3 --- /dev/null +++ b/sources/generated/Gst/Registry.cs @@ -0,0 +1,389 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Registry : Gst.Object { + + public Registry (IntPtr raw) : base(raw) {} + + protected Registry() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Signal("plugin-added")] + public event Gst.PluginAddedHandler PluginAdded { + add { + this.AddSignalHandler ("plugin-added", value, typeof (Gst.PluginAddedArgs)); + } + remove { + this.RemoveSignalHandler ("plugin-added", value); + } + } + + [GLib.Signal("feature-added")] + public event Gst.FeatureAddedHandler FeatureAdded { + add { + this.AddSignalHandler ("feature-added", value, typeof (Gst.FeatureAddedArgs)); + } + remove { + this.RemoveSignalHandler ("feature-added", value); + } + } + + static FeatureAddedNativeDelegate FeatureAdded_cb_delegate; + static FeatureAddedNativeDelegate FeatureAddedVMCallback { + get { + if (FeatureAdded_cb_delegate == null) + FeatureAdded_cb_delegate = new FeatureAddedNativeDelegate (FeatureAdded_cb); + return FeatureAdded_cb_delegate; + } + } + + static void OverrideFeatureAdded (GLib.GType gtype) + { + OverrideFeatureAdded (gtype, FeatureAddedVMCallback); + } + + static void OverrideFeatureAdded (GLib.GType gtype, FeatureAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "feature-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void FeatureAddedNativeDelegate (IntPtr inst, IntPtr feature); + + static void FeatureAdded_cb (IntPtr inst, IntPtr feature) + { + try { + Registry __obj = GLib.Object.GetObject (inst, false) as Registry; + __obj.OnFeatureAdded (GLib.Object.GetObject(feature) as Gst.PluginFeature); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverrideFeatureAdded")] + protected virtual void OnFeatureAdded (Gst.PluginFeature feature) + { + InternalFeatureAdded (feature); + } + + private void InternalFeatureAdded (Gst.PluginFeature feature) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (feature); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + static PluginAddedNativeDelegate PluginAdded_cb_delegate; + static PluginAddedNativeDelegate PluginAddedVMCallback { + get { + if (PluginAdded_cb_delegate == null) + PluginAdded_cb_delegate = new PluginAddedNativeDelegate (PluginAdded_cb); + return PluginAdded_cb_delegate; + } + } + + static void OverridePluginAdded (GLib.GType gtype) + { + OverridePluginAdded (gtype, PluginAddedVMCallback); + } + + static void OverridePluginAdded (GLib.GType gtype, PluginAddedNativeDelegate callback) + { + OverrideVirtualMethod (gtype, "plugin-added", callback); + } + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PluginAddedNativeDelegate (IntPtr inst, IntPtr plugin); + + static void PluginAdded_cb (IntPtr inst, IntPtr plugin) + { + try { + Registry __obj = GLib.Object.GetObject (inst, false) as Registry; + __obj.OnPluginAdded (GLib.Object.GetObject(plugin) as Gst.Plugin); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverridePluginAdded")] + protected virtual void OnPluginAdded (Gst.Plugin plugin) + { + InternalPluginAdded (plugin); + } + + private void InternalPluginAdded (Gst.Plugin plugin) + { + GLib.Value ret = GLib.Value.Empty; + GLib.ValueArray inst_and_params = new GLib.ValueArray (2); + GLib.Value[] vals = new GLib.Value [2]; + vals [0] = new GLib.Value (this); + inst_and_params.Append (vals [0]); + vals [1] = new GLib.Value (plugin); + inst_and_params.Append (vals [1]); + g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret); + foreach (GLib.Value v in vals) + v.Dispose (); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_registry_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_registry_fork_is_enabled(); + + public static bool ForkIsEnabled() { + bool raw_ret = gst_registry_fork_is_enabled(); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_registry_fork_set_enabled(bool enabled); + + public static void ForkSetEnabled(bool enabled) { + gst_registry_fork_set_enabled(enabled); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_get(); + + public static Gst.Registry Get() { + IntPtr raw_ret = gst_registry_get(); + Gst.Registry ret = GLib.Object.GetObject(raw_ret) as Gst.Registry; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_registry_add_feature(IntPtr raw, IntPtr feature); + + public bool AddFeature(Gst.PluginFeature feature) { + bool raw_ret = gst_registry_add_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_registry_add_plugin(IntPtr raw, IntPtr plugin); + + public bool AddPlugin(Gst.Plugin plugin) { + bool raw_ret = gst_registry_add_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_registry_check_feature_version(IntPtr raw, IntPtr feature_name, uint min_major, uint min_minor, uint min_micro); + + public bool CheckFeatureVersion(string feature_name, uint min_major, uint min_minor, uint min_micro) { + IntPtr native_feature_name = GLib.Marshaller.StringToPtrGStrdup (feature_name); + bool raw_ret = gst_registry_check_feature_version(Handle, native_feature_name, min_major, min_minor, min_micro); + bool ret = raw_ret; + GLib.Marshaller.Free (native_feature_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_feature_filter(IntPtr raw, GstSharp.PluginFeatureFilterNative filter, bool first, IntPtr user_data); + + public Gst.PluginFeature[] FeatureFilter(Gst.PluginFeatureFilter filter, bool first) { + GstSharp.PluginFeatureFilterWrapper filter_wrapper = new GstSharp.PluginFeatureFilterWrapper (filter); + IntPtr raw_ret = gst_registry_feature_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero); + Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_find_feature(IntPtr raw, IntPtr name, IntPtr type); + + public Gst.PluginFeature FindFeature(string name, GLib.GType type) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_registry_find_feature(Handle, native_name, type.Val); + Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_find_plugin(IntPtr raw, IntPtr name); + + public Gst.Plugin FindPlugin(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_registry_find_plugin(Handle, native_name); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_get_feature_list(IntPtr raw, IntPtr type); + + public Gst.PluginFeature[] GetFeatureList(GLib.GType type) { + IntPtr raw_ret = gst_registry_get_feature_list(Handle, type.Val); + Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_get_feature_list_by_plugin(IntPtr raw, IntPtr name); + + public Gst.PluginFeature[] GetFeatureListByPlugin(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_registry_get_feature_list_by_plugin(Handle, native_name); + Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature)); + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_registry_get_feature_list_cookie(IntPtr raw); + + public uint FeatureListCookie { + get { + uint raw_ret = gst_registry_get_feature_list_cookie(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_get_plugin_list(IntPtr raw); + + public Gst.Plugin[] PluginList { + get { + IntPtr raw_ret = gst_registry_get_plugin_list(Handle); + Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_lookup(IntPtr raw, IntPtr filename); + + public Gst.Plugin Lookup(string filename) { + IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename); + IntPtr raw_ret = gst_registry_lookup(Handle, native_filename); + Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin; + GLib.Marshaller.Free (native_filename); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_lookup_feature(IntPtr raw, IntPtr name); + + public Gst.PluginFeature LookupFeature(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_registry_lookup_feature(Handle, native_name); + Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_registry_plugin_filter(IntPtr raw, GstSharp.PluginFilterNative filter, bool first, IntPtr user_data); + + public Gst.Plugin[] PluginFilter(Gst.PluginFilter filter, bool first) { + GstSharp.PluginFilterWrapper filter_wrapper = new GstSharp.PluginFilterWrapper (filter); + IntPtr raw_ret = gst_registry_plugin_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero); + Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_registry_remove_feature(IntPtr raw, IntPtr feature); + + public void RemoveFeature(Gst.PluginFeature feature) { + gst_registry_remove_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_registry_remove_plugin(IntPtr raw, IntPtr plugin); + + public void RemovePlugin(Gst.Plugin plugin) { + gst_registry_remove_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_registry_scan_path(IntPtr raw, IntPtr path); + + public bool ScanPath(string path) { + IntPtr native_path = GLib.Marshaller.StringToFilenamePtr (path); + bool raw_ret = gst_registry_scan_path(Handle, native_path); + bool ret = raw_ret; + GLib.Marshaller.Free (native_path); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_update_registry(); + + public static bool UpdateRegistry() { + bool raw_ret = gst_update_registry(); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ResourceError.cs b/sources/generated/Gst/ResourceError.cs new file mode 100644 index 0000000000..bf19e03f8d --- /dev/null +++ b/sources/generated/Gst/ResourceError.cs @@ -0,0 +1,42 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.ResourceErrorGType))] + public enum ResourceError { + + Failed = 1, + TooLazy = 2, + NotFound = 3, + Busy = 4, + OpenRead = 5, + OpenWrite = 6, + OpenReadWrite = 7, + Close = 8, + Read = 9, + Write = 10, + Seek = 11, + Sync = 12, + Settings = 13, + NoSpaceLeft = 14, + NotAuthorized = 15, + NumErrors = 16, + } + + internal class ResourceErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_resource_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_resource_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Sample.cs b/sources/generated/Gst/Sample.cs new file mode 100644 index 0000000000..c4dbc0b463 --- /dev/null +++ b/sources/generated/Gst/Sample.cs @@ -0,0 +1,174 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Sample : Gst.MiniObject { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_sample_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_buffer(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_sample_set_buffer(IntPtr raw, IntPtr buffer); + + public Gst.Buffer Buffer { + get { + IntPtr raw_ret = gst_sample_get_buffer(Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false); + return ret; + } + set { + gst_sample_set_buffer(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_buffer_list(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_sample_set_buffer_list(IntPtr raw, IntPtr buffer_list); + + public Gst.BufferList BufferList { + get { + IntPtr raw_ret = gst_sample_get_buffer_list(Handle); + Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), false); + return ret; + } + set { + gst_sample_set_buffer_list(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_caps(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_sample_set_caps(IntPtr raw, IntPtr caps); + + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_sample_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), false); + return ret; + } + set { + gst_sample_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_info(IntPtr raw); + + public Gst.Structure Info { + get { + IntPtr raw_ret = gst_sample_get_info(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_get_segment(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_sample_set_segment(IntPtr raw, IntPtr value); + + public Gst.Segment Segment { + get { + IntPtr raw_ret = gst_sample_get_segment(Handle); + Gst.Segment ret = Gst.Segment.New (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_sample_set_segment(Handle, native_value); + Marshal.FreeHGlobal (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_sample_set_info(IntPtr raw, IntPtr info); + + public bool SetInfo(Gst.Structure info) { + info.Owned = false; + bool raw_ret = gst_sample_set_info(Handle, info == null ? IntPtr.Zero : info.Handle); + bool ret = raw_ret; + return ret; + } + + public Sample(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_new(IntPtr buffer, IntPtr caps, IntPtr segment, IntPtr info); + + public Sample (Gst.Buffer buffer, Gst.Caps caps, Gst.Segment segment, Gst.Structure info) + { + IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment); + info.Owned = false; + Raw = gst_sample_new(buffer == null ? IntPtr.Zero : buffer.Handle, caps == null ? IntPtr.Zero : caps.Handle, native_segment, info == null ? IntPtr.Zero : info.Handle); + Marshal.FreeHGlobal (native_segment); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_sample_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_sample_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_sample_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_sample_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_sample_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/SchedulingFlags.cs b/sources/generated/Gst/SchedulingFlags.cs new file mode 100644 index 0000000000..caec4e1deb --- /dev/null +++ b/sources/generated/Gst/SchedulingFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.SchedulingFlagsGType))] + public enum SchedulingFlags : uint { + + Seekable = 1, + Sequential = 2, + BandwidthLimited = 4, + } + + internal class SchedulingFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_scheduling_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_scheduling_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/SearchMode.cs b/sources/generated/Gst/SearchMode.cs new file mode 100644 index 0000000000..e0c0a95e87 --- /dev/null +++ b/sources/generated/Gst/SearchMode.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.SearchModeGType))] + public enum SearchMode { + + Exact = 0, + Before = 1, + After = 2, + } + + internal class SearchModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_search_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_search_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/SeekFlags.cs b/sources/generated/Gst/SeekFlags.cs new file mode 100644 index 0000000000..b8757bd907 --- /dev/null +++ b/sources/generated/Gst/SeekFlags.cs @@ -0,0 +1,41 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.SeekFlagsGType))] + public enum SeekFlags : uint { + + None = 0, + Flush = 1, + Accurate = 2, + KeyUnit = 4, + Segment = 8, + Trickmode = 16, + Skip = 16, + SnapBefore = 32, + SnapAfter = 64, + SnapNearest = 96, + TrickmodeKeyUnits = 128, + TrickmodeNoAudio = 256, + TrickmodeForwardPredicted = 512, + InstantRateChange = 1024, + } + + internal class SeekFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_seek_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_seek_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/SeekType.cs b/sources/generated/Gst/SeekType.cs new file mode 100644 index 0000000000..06c038ccd1 --- /dev/null +++ b/sources/generated/Gst/SeekType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.SeekTypeGType))] + public enum SeekType { + + None = 0, + Set = 1, + End = 2, + } + + internal class SeekTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_seek_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_seek_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Segment.cs b/sources/generated/Gst/Segment.cs new file mode 100644 index 0000000000..b7b9f94178 --- /dev/null +++ b/sources/generated/Gst/Segment.cs @@ -0,0 +1,300 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct Segment : IEquatable { + + public Gst.SegmentFlags Flags; + public double Rate; + public double AppliedRate; + public Gst.Format Format; + public ulong Base; + public ulong Offset; + public ulong Start; + public ulong Stop; + public ulong Time; + public ulong Position; + public ulong Duration; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.Segment Zero = new Gst.Segment (); + + public static Gst.Segment New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Segment.Zero; + return (Gst.Segment) Marshal.PtrToStructure (raw, typeof (Gst.Segment)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_segment_new(); + + public static Segment New() + { + Segment result = Segment.New (gst_segment_new()); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_segment_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_segment_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segment_clip(IntPtr raw, int format, ulong start, ulong stop, out ulong clip_start, out ulong clip_stop); + + public bool Clip(Gst.Format format, ulong start, ulong stop, out ulong clip_start, out ulong clip_stop) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_segment_clip(this_as_native, (int) format, start, stop, out clip_start, out clip_stop); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_segment_copy_into(IntPtr raw, IntPtr dest); + + public void CopyInto(Gst.Segment dest) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + gst_segment_copy_into(this_as_native, native_dest); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_dest); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segment_do_seek(IntPtr raw, double rate, int format, int flags, int start_type, ulong start, int stop_type, ulong stop, out bool update); + + public bool DoSeek(double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, ulong start, Gst.SeekType stop_type, ulong stop, out bool update) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_segment_do_seek(this_as_native, rate, (int) format, (int) flags, (int) start_type, start, (int) stop_type, stop, out update); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_segment_init(IntPtr raw, int format); + + public void Init(Gst.Format format) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_segment_init(this_as_native, (int) format); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segment_is_equal(IntPtr raw, IntPtr s1); + + public bool IsEqual(Gst.Segment s1) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_s1 = GLib.Marshaller.StructureToPtrAlloc (s1); + bool raw_ret = gst_segment_is_equal(this_as_native, native_s1); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_s1); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segment_offset_running_time(IntPtr raw, int format, long offset); + + public bool OffsetRunningTime(Gst.Format format, long offset) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_segment_offset_running_time(this_as_native, (int) format, offset); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_segment_position_from_running_time(IntPtr raw, int format, ulong running_time); + + public ulong PositionFromRunningTime(Gst.Format format, ulong running_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_segment_position_from_running_time(this_as_native, (int) format, running_time); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_segment_position_from_running_time_full(IntPtr raw, int format, ulong running_time, out ulong position); + + public int PositionFromRunningTimeFull(Gst.Format format, ulong running_time, out ulong position) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_segment_position_from_running_time_full(this_as_native, (int) format, running_time, out position); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_segment_position_from_stream_time(IntPtr raw, int format, ulong stream_time); + + public ulong PositionFromStreamTime(Gst.Format format, ulong stream_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_segment_position_from_stream_time(this_as_native, (int) format, stream_time); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_segment_position_from_stream_time_full(IntPtr raw, int format, ulong stream_time, out ulong position); + + public int PositionFromStreamTimeFull(Gst.Format format, ulong stream_time, out ulong position) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_segment_position_from_stream_time_full(this_as_native, (int) format, stream_time, out position); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_segment_set_running_time(IntPtr raw, int format, ulong running_time); + + public bool SetRunningTime(Gst.Format format, ulong running_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_segment_set_running_time(this_as_native, (int) format, running_time); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_segment_to_position(IntPtr raw, int format, ulong running_time); + + [Obsolete] + public ulong ToPosition(Gst.Format format, ulong running_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_segment_to_position(this_as_native, (int) format, running_time); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_segment_to_running_time(IntPtr raw, int format, ulong position); + + public ulong ToRunningTime(Gst.Format format, ulong position) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_segment_to_running_time(this_as_native, (int) format, position); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_segment_to_running_time_full(IntPtr raw, int format, ulong position, out ulong running_time); + + public int ToRunningTimeFull(Gst.Format format, ulong position, out ulong running_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_segment_to_running_time_full(this_as_native, (int) format, position, out running_time); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_segment_to_stream_time(IntPtr raw, int format, ulong position); + + public ulong ToStreamTime(Gst.Format format, ulong position) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + ulong raw_ret = gst_segment_to_stream_time(this_as_native, (int) format, position); + ulong ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_segment_to_stream_time_full(IntPtr raw, int format, ulong position, out ulong stream_time); + + public int ToStreamTimeFull(Gst.Format format, ulong position, out ulong stream_time) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_segment_to_stream_time_full(this_as_native, (int) format, position, out stream_time); + int ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Segment target) + { + target = New (native); + } + + public bool Equals (Segment other) + { + return true && Flags.Equals (other.Flags) && Rate.Equals (other.Rate) && AppliedRate.Equals (other.AppliedRate) && Format.Equals (other.Format) && Base.Equals (other.Base) && Offset.Equals (other.Offset) && Start.Equals (other.Start) && Stop.Equals (other.Stop) && Time.Equals (other.Time) && Position.Equals (other.Position) && Duration.Equals (other.Duration); + } + + public override bool Equals (object other) + { + return other is Segment && Equals ((Segment) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Flags.GetHashCode () ^ Rate.GetHashCode () ^ AppliedRate.GetHashCode () ^ Format.GetHashCode () ^ Base.GetHashCode () ^ Offset.GetHashCode () ^ Start.GetHashCode () ^ Stop.GetHashCode () ^ Time.GetHashCode () ^ Position.GetHashCode () ^ Duration.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Segment boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Segment.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Segment (GLib.Value val) + { + return (Gst.Segment) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/SegmentFlags.cs b/sources/generated/Gst/SegmentFlags.cs new file mode 100644 index 0000000000..37e27e0c64 --- /dev/null +++ b/sources/generated/Gst/SegmentFlags.cs @@ -0,0 +1,35 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.SegmentFlagsGType))] + public enum SegmentFlags : uint { + + None = 0, + Reset = 1, + Segment = 8, + Trickmode = 16, + Skip = 16, + TrickmodeKeyUnits = 128, + TrickmodeNoAudio = 256, + TrickmodeForwardPredicted = 512, + } + + internal class SegmentFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_segment_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_segment_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/SharedTaskPool.cs b/sources/generated/Gst/SharedTaskPool.cs new file mode 100644 index 0000000000..ecd8e821ec --- /dev/null +++ b/sources/generated/Gst/SharedTaskPool.cs @@ -0,0 +1,114 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class SharedTaskPool : Gst.TaskPool { + + public SharedTaskPool (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_shared_task_pool_new(); + + public SharedTaskPool () : base (IntPtr.Zero) + { + if (GetType () != typeof (SharedTaskPool)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_shared_task_pool_new(); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.TaskPool.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_shared_task_pool_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_shared_task_pool_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_shared_task_pool_get_max_threads(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_shared_task_pool_set_max_threads(IntPtr raw, uint max_threads); + + public uint MaxThreads { + get { + uint raw_ret = gst_shared_task_pool_get_max_threads(Handle); + uint ret = raw_ret; + return ret; + } + set { + gst_shared_task_pool_set_max_threads(Handle, value); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.TaskPool.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/StackTraceFlags.cs b/sources/generated/Gst/StackTraceFlags.cs new file mode 100644 index 0000000000..134da404e4 --- /dev/null +++ b/sources/generated/Gst/StackTraceFlags.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.StackTraceFlagsGType))] + public enum StackTraceFlags : uint { + + None = 0, + Full = 1, + } + + internal class StackTraceFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stack_trace_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_stack_trace_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/State.cs b/sources/generated/Gst/State.cs new file mode 100644 index 0000000000..feded944d8 --- /dev/null +++ b/sources/generated/Gst/State.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StateGType))] + public enum State { + + VoidPending = 0, + Null = 1, + Ready = 2, + Paused = 3, + Playing = 4, + } + + internal class StateGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StateChange.cs b/sources/generated/Gst/StateChange.cs new file mode 100644 index 0000000000..4728cf521c --- /dev/null +++ b/sources/generated/Gst/StateChange.cs @@ -0,0 +1,36 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StateChangeGType))] + public enum StateChange { + + NullToNull = 9, + NullToReady = 10, + ReadyToNull = 17, + ReadyToReady = 18, + ReadyToPaused = 19, + PausedToReady = 26, + PausedToPaused = 27, + PausedToPlaying = 28, + PlayingToPaused = 35, + PlayingToPlaying = 36, + } + + internal class StateChangeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_state_change_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_state_change_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StateChangeReturn.cs b/sources/generated/Gst/StateChangeReturn.cs new file mode 100644 index 0000000000..137e3e31c1 --- /dev/null +++ b/sources/generated/Gst/StateChangeReturn.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StateChangeReturnGType))] + public enum StateChangeReturn { + + Failure = 0, + Success = 1, + Async = 2, + NoPreroll = 3, + } + + internal class StateChangeReturnGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_state_change_return_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_state_change_return_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StaticCaps.cs b/sources/generated/Gst/StaticCaps.cs new file mode 100644 index 0000000000..4567e7e6fb --- /dev/null +++ b/sources/generated/Gst/StaticCaps.cs @@ -0,0 +1,85 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct StaticCaps : IEquatable { + + private IntPtr _caps; + public Gst.Caps Caps { + get { + return _caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_caps, typeof (Gst.Caps), false); + } + set { + _caps = value == null ? IntPtr.Zero : value.Handle; + } + } + public string String; + [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)] + private IntPtr[] _gstGstReserved; + + public static Gst.StaticCaps Zero = new Gst.StaticCaps (); + + public static Gst.StaticCaps New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.StaticCaps.Zero; + return (Gst.StaticCaps) Marshal.PtrToStructure (raw, typeof (Gst.StaticCaps)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_static_caps_cleanup(IntPtr raw); + + public void Cleanup() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_static_caps_cleanup(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_static_caps_get(IntPtr raw); + + public Gst.Caps Get() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_static_caps_get(this_as_native); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.StaticCaps target) + { + target = New (native); + } + + public bool Equals (StaticCaps other) + { + return true && Caps.Equals (other.Caps) && String.Equals (other.String); + } + + public override bool Equals (object other) + { + return other is StaticCaps && Equals ((StaticCaps) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Caps.GetHashCode () ^ String.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/StaticPadTemplate.cs b/sources/generated/Gst/StaticPadTemplate.cs new file mode 100644 index 0000000000..82d56686c4 --- /dev/null +++ b/sources/generated/Gst/StaticPadTemplate.cs @@ -0,0 +1,81 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct StaticPadTemplate : IEquatable { + + public string NameTemplate; + public Gst.PadDirection Direction; + public Gst.PadPresence Presence; + public Gst.StaticCaps StaticCaps; + + public static Gst.StaticPadTemplate Zero = new Gst.StaticPadTemplate (); + + public static Gst.StaticPadTemplate New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.StaticPadTemplate.Zero; + return (Gst.StaticPadTemplate) Marshal.PtrToStructure (raw, typeof (Gst.StaticPadTemplate)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_static_pad_template_get(IntPtr raw); + + public Gst.PadTemplate Get() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_static_pad_template_get(this_as_native); + Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_static_pad_template_get_caps(IntPtr raw); + + public Gst.Caps Caps { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_static_pad_template_get_caps(this_as_native); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + static void ReadNative (IntPtr native, ref Gst.StaticPadTemplate target) + { + target = New (native); + } + + public bool Equals (StaticPadTemplate other) + { + return true && NameTemplate.Equals (other.NameTemplate) && Direction.Equals (other.Direction) && Presence.Equals (other.Presence) && StaticCaps.Equals (other.StaticCaps); + } + + public override bool Equals (object other) + { + return other is StaticPadTemplate && Equals ((StaticPadTemplate) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ NameTemplate.GetHashCode () ^ Direction.GetHashCode () ^ Presence.GetHashCode () ^ StaticCaps.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/Stream.cs b/sources/generated/Gst/Stream.cs new file mode 100644 index 0000000000..de20e81c0a --- /dev/null +++ b/sources/generated/Gst/Stream.cs @@ -0,0 +1,208 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Stream : Gst.Object { + + public Stream (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_new(IntPtr stream_id, IntPtr caps, int type, int flags); + + public Stream (string stream_id, Gst.Caps caps, Gst.StreamType type, Gst.StreamFlags flags) : base (IntPtr.Zero) + { + if (GetType () != typeof (Stream)) { + var vals = new List (); + var names = new List (); + names.Add ("stream_id"); + vals.Add (new GLib.Value (stream_id)); + if (caps != null) { + names.Add ("caps"); + vals.Add (new GLib.Value (caps)); + } + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_stream_id = GLib.Marshaller.StringToPtrGStrdup (stream_id); + Raw = gst_stream_new(native_stream_id, caps == null ? IntPtr.Zero : caps.Handle, (int) type, (int) flags); + GLib.Marshaller.Free (native_stream_id); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_get_caps(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_set_caps(IntPtr raw, IntPtr caps); + + [GLib.Property ("caps")] + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_stream_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + set { + gst_stream_set_caps(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_stream_get_stream_flags(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_set_stream_flags(IntPtr raw, int flags); + + [GLib.Property ("stream-flags")] + public Gst.StreamFlags StreamFlags { + get { + int raw_ret = gst_stream_get_stream_flags(Handle); + Gst.StreamFlags ret = (Gst.StreamFlags) raw_ret; + return ret; + } + set { + gst_stream_set_stream_flags(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_get_stream_id(IntPtr raw); + + [GLib.Property ("stream-id")] + public string StreamId { + get { + IntPtr raw_ret = gst_stream_get_stream_id(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_stream_get_stream_type(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_set_stream_type(IntPtr raw, int stream_type); + + [GLib.Property ("stream-type")] + public Gst.StreamType StreamType { + get { + int raw_ret = gst_stream_get_stream_type(Handle); + Gst.StreamType ret = (Gst.StreamType) raw_ret; + return ret; + } + set { + gst_stream_set_stream_type(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_get_tags(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_stream_set_tags(IntPtr raw, IntPtr tags); + + [GLib.Property ("tags")] + public Gst.TagList Tags { + get { + IntPtr raw_ret = gst_stream_get_tags(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + set { + gst_stream_set_tags(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + public string StreamIdField { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_id")); + return GLib.Marshaller.Utf8PtrToString ((*raw_ptr)); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_stream_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("stream_id" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stream_id + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "stream_id" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/StreamCollection.cs b/sources/generated/Gst/StreamCollection.cs new file mode 100644 index 0000000000..bc64bc6c3b --- /dev/null +++ b/sources/generated/Gst/StreamCollection.cs @@ -0,0 +1,228 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class StreamCollection : Gst.Object { + + public StreamCollection (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_collection_new(IntPtr upstream_id); + + public StreamCollection (string upstream_id) : base (IntPtr.Zero) + { + if (GetType () != typeof (StreamCollection)) { + var vals = new List (); + var names = new List (); + names.Add ("upstream_id"); + vals.Add (new GLib.Value (upstream_id)); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + IntPtr native_upstream_id = GLib.Marshaller.StringToPtrGStrdup (upstream_id); + Raw = gst_stream_collection_new(native_upstream_id); + GLib.Marshaller.Free (native_upstream_id); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_collection_get_upstream_id(IntPtr raw); + + [GLib.Property ("upstream-id")] + public string UpstreamId { + get { + IntPtr raw_ret = gst_stream_collection_get_upstream_id(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("upstream-id", val); + val.Dispose (); + } + } + + [GLib.Signal("stream-notify")] + public event Gst.StreamNotifyHandler StreamNotify { + add { + this.AddSignalHandler ("stream-notify", value, typeof (Gst.StreamNotifyArgs)); + } + remove { + this.RemoveSignalHandler ("stream-notify", value); + } + } + + static StreamNotifyNativeDelegate StreamNotify_cb_delegate; + static StreamNotifyNativeDelegate StreamNotifyVMCallback { + get { + if (StreamNotify_cb_delegate == null) + StreamNotify_cb_delegate = new StreamNotifyNativeDelegate (StreamNotify_cb); + return StreamNotify_cb_delegate; + } + } + + static void OverrideStreamNotify (GLib.GType gtype) + { + OverrideStreamNotify (gtype, StreamNotifyVMCallback); + } + + static void OverrideStreamNotify (GLib.GType gtype, StreamNotifyNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stream_notify")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StreamNotifyNativeDelegate (IntPtr inst, IntPtr _object, IntPtr p0); + + static void StreamNotify_cb (IntPtr inst, IntPtr _object, IntPtr p0) + { + try { + StreamCollection __obj = GLib.Object.GetObject (inst, false) as StreamCollection; + __obj.OnStreamNotify (GLib.Object.GetObject(_object) as Gst.Stream, p0); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.StreamCollection), ConnectionMethod="OverrideStreamNotify")] + protected virtual void OnStreamNotify (Gst.Stream _object, IntPtr p0) + { + InternalStreamNotify (_object, p0); + } + + private void InternalStreamNotify (Gst.Stream _object, IntPtr p0) + { + StreamNotifyNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stream_notify")); + unmanaged = (StreamNotifyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StreamNotifyNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle, p0); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("stream_notify" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stream_notify + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "stream_notify" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_collection_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_stream_collection_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_stream_collection_add_stream(IntPtr raw, IntPtr stream); + + public bool AddStream(Gst.Stream stream) { + bool raw_ret = gst_stream_collection_add_stream(Handle, stream == null ? IntPtr.Zero : stream.OwnedHandle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_stream_collection_get_size(IntPtr raw); + + public uint Size { + get { + uint raw_ret = gst_stream_collection_get_size(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_collection_get_stream(IntPtr raw, uint index); + + public Gst.Stream GetStream(uint index) { + IntPtr raw_ret = gst_stream_collection_get_stream(Handle, index); + Gst.Stream ret = GLib.Object.GetObject(raw_ret) as Gst.Stream; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("upstream_id" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // upstream_id + , null + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "upstream_id" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/StreamError.cs b/sources/generated/Gst/StreamError.cs new file mode 100644 index 0000000000..139edafbe7 --- /dev/null +++ b/sources/generated/Gst/StreamError.cs @@ -0,0 +1,40 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StreamErrorGType))] + public enum StreamError { + + Failed = 1, + TooLazy = 2, + NotImplemented = 3, + TypeNotFound = 4, + WrongType = 5, + CodecNotFound = 6, + Decode = 7, + Encode = 8, + Demux = 9, + Mux = 10, + Format = 11, + Decrypt = 12, + DecryptNokey = 13, + NumErrors = 14, + } + + internal class StreamErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_stream_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StreamFlags.cs b/sources/generated/Gst/StreamFlags.cs new file mode 100644 index 0000000000..19da640900 --- /dev/null +++ b/sources/generated/Gst/StreamFlags.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.StreamFlagsGType))] + public enum StreamFlags : uint { + + None = 0, + Sparse = 1, + Select = 2, + Unselect = 4, + } + + internal class StreamFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_stream_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StreamNotifyHandler.cs b/sources/generated/Gst/StreamNotifyHandler.cs new file mode 100644 index 0000000000..1aef38d105 --- /dev/null +++ b/sources/generated/Gst/StreamNotifyHandler.cs @@ -0,0 +1,24 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void StreamNotifyHandler(object o, StreamNotifyArgs args); + + public class StreamNotifyArgs : GLib.SignalArgs { + public Gst.Stream Object{ + get { + return (Gst.Stream) Args [0]; + } + } + + public IntPtr P0{ + get { + return (IntPtr) Args [1]; + } + } + + } +} diff --git a/sources/generated/Gst/StreamStatusType.cs b/sources/generated/Gst/StreamStatusType.cs new file mode 100644 index 0000000000..faba8fef38 --- /dev/null +++ b/sources/generated/Gst/StreamStatusType.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StreamStatusTypeGType))] + public enum StreamStatusType { + + Create = 0, + Enter = 1, + Leave = 2, + Destroy = 3, + Start = 8, + Pause = 9, + Stop = 10, + } + + internal class StreamStatusTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_status_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_stream_status_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StreamType.cs b/sources/generated/Gst/StreamType.cs new file mode 100644 index 0000000000..e3ee514a2a --- /dev/null +++ b/sources/generated/Gst/StreamType.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.StreamTypeGType))] + public enum StreamType : uint { + + Unknown = 1, + Audio = 2, + Video = 4, + Container = 8, + Text = 16, + } + + internal class StreamTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_stream_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_stream_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/Structure.cs b/sources/generated/Gst/Structure.cs new file mode 100644 index 0000000000..3b58198599 --- /dev/null +++ b/sources/generated/Gst/Structure.cs @@ -0,0 +1,688 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Structure : GLib.Opaque { + + public GLib.GType Type { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + return new GLib.GType((*raw_ptr)); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type")); + *raw_ptr = value.Val; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_get_name(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_set_name(IntPtr raw, IntPtr name); + + public string Name { + get { + IntPtr raw_ret = gst_structure_get_name(Handle); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_structure_set_name(Handle, native_value); + GLib.Marshaller.Free (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_structure_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_can_intersect(IntPtr raw, IntPtr struct2); + + public bool CanIntersect(Gst.Structure struct2) { + bool raw_ret = gst_structure_can_intersect(Handle, struct2 == null ? IntPtr.Zero : struct2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_copy(IntPtr raw); + + public Gst.Structure Copy() { + IntPtr raw_ret = gst_structure_copy(Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_filter_and_map_in_place(IntPtr raw, GstSharp.StructureFilterMapFuncNative func, IntPtr user_data); + + public void FilterAndMapInPlace(Gst.StructureFilterMapFunc func) { + GstSharp.StructureFilterMapFuncWrapper func_wrapper = new GstSharp.StructureFilterMapFuncWrapper (func); + gst_structure_filter_and_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_fixate(IntPtr raw); + + public void Fixate() { + gst_structure_fixate(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field(IntPtr raw, IntPtr field_name); + + public bool FixateField(string field_name) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + bool raw_ret = gst_structure_fixate_field(Handle, native_field_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field_boolean(IntPtr raw, IntPtr field_name, bool target); + + public bool FixateFieldBoolean(string field_name, bool target) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + bool raw_ret = gst_structure_fixate_field_boolean(Handle, native_field_name, target); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field_nearest_double(IntPtr raw, IntPtr field_name, double target); + + public bool FixateFieldNearestDouble(string field_name, double target) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + bool raw_ret = gst_structure_fixate_field_nearest_double(Handle, native_field_name, target); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field_nearest_fraction(IntPtr raw, IntPtr field_name, int target_numerator, int target_denominator); + + public bool FixateFieldNearestFraction(string field_name, int target_numerator, int target_denominator) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + bool raw_ret = gst_structure_fixate_field_nearest_fraction(Handle, native_field_name, target_numerator, target_denominator); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field_nearest_int(IntPtr raw, IntPtr field_name, int target); + + public bool FixateFieldNearestInt(string field_name, int target) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + bool raw_ret = gst_structure_fixate_field_nearest_int(Handle, native_field_name, target); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_fixate_field_string(IntPtr raw, IntPtr field_name, IntPtr target); + + public bool FixateFieldString(string field_name, string target) { + IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name); + IntPtr native_target = GLib.Marshaller.StringToPtrGStrdup (target); + bool raw_ret = gst_structure_fixate_field_string(Handle, native_field_name, native_target); + bool ret = raw_ret; + GLib.Marshaller.Free (native_field_name); + GLib.Marshaller.Free (native_target); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_foreach(IntPtr raw, GstSharp.StructureForeachFuncNative func, IntPtr user_data); + + public bool Foreach(Gst.StructureForeachFunc func) { + GstSharp.StructureForeachFuncWrapper func_wrapper = new GstSharp.StructureForeachFuncWrapper (func); + bool raw_ret = gst_structure_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_array(IntPtr raw, IntPtr fieldname, out IntPtr array); + + public bool GetArray(string fieldname, out GLib.ValueArray array) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_array; + bool raw_ret = gst_structure_get_array(Handle, native_fieldname, out native_array); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + array = new GLib.ValueArray(native_array); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_boolean(IntPtr raw, IntPtr fieldname, out bool value); + + public bool GetBoolean(string fieldname, out bool value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_boolean(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_clock_time(IntPtr raw, IntPtr fieldname, out ulong value); + + public bool GetClockTime(string fieldname, out ulong value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_clock_time(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_date(IntPtr raw, IntPtr fieldname, out IntPtr value); + + public bool GetDate(string fieldname, out GLib.Date value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_value; + bool raw_ret = gst_structure_get_date(Handle, native_fieldname, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + value = new GLib.Date(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_date_time(IntPtr raw, IntPtr fieldname, out IntPtr value); + + public bool GetDateTime(string fieldname, out Gst.DateTime value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_value; + bool raw_ret = gst_structure_get_date_time(Handle, native_fieldname, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_double(IntPtr raw, IntPtr fieldname, out double value); + + public bool GetDouble(string fieldname, out double value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_double(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_enum(IntPtr raw, IntPtr fieldname, IntPtr enumtype, out int value); + + public bool GetEnum(string fieldname, GLib.GType enumtype, out int value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_enum(Handle, native_fieldname, enumtype.Val, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_get_field_type(IntPtr raw, IntPtr fieldname); + + public GLib.GType GetFieldType(string fieldname) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr raw_ret = gst_structure_get_field_type(Handle, native_fieldname); + GLib.GType ret = new GLib.GType(raw_ret); + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_flagset(IntPtr raw, IntPtr fieldname, out uint value_flags, out uint value_mask); + + public bool GetFlagset(string fieldname, out uint value_flags, out uint value_mask) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_flagset(Handle, native_fieldname, out value_flags, out value_mask); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_fraction(IntPtr raw, IntPtr fieldname, out int value_numerator, out int value_denominator); + + public bool GetFraction(string fieldname, out int value_numerator, out int value_denominator) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_fraction(Handle, native_fieldname, out value_numerator, out value_denominator); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_int(IntPtr raw, IntPtr fieldname, out int value); + + public bool GetInt(string fieldname, out int value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_int(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_int64(IntPtr raw, IntPtr fieldname, out long value); + + public bool GetInt64(string fieldname, out long value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_int64(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_list(IntPtr raw, IntPtr fieldname, out IntPtr array); + + public bool GetList(string fieldname, out GLib.ValueArray array) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_array; + bool raw_ret = gst_structure_get_list(Handle, native_fieldname, out native_array); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + array = new GLib.ValueArray(native_array); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_structure_get_name_id(IntPtr raw); + + public uint NameId { + get { + uint raw_ret = gst_structure_get_name_id(Handle); + uint ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_get_string(IntPtr raw, IntPtr fieldname); + + public string GetString(string fieldname) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr raw_ret = gst_structure_get_string(Handle, native_fieldname); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_uint(IntPtr raw, IntPtr fieldname, out uint value); + + public bool GetUint(string fieldname, out uint value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_uint(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_get_uint64(IntPtr raw, IntPtr fieldname, out ulong value); + + public bool GetUint64(string fieldname, out ulong value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_get_uint64(Handle, native_fieldname, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_get_value(IntPtr raw, IntPtr fieldname); + + public GLib.Value GetValue(string fieldname) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr raw_ret = gst_structure_get_value(Handle, native_fieldname); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_has_field(IntPtr raw, IntPtr fieldname); + + public bool HasField(string fieldname) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_has_field(Handle, native_fieldname); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_has_field_typed(IntPtr raw, IntPtr fieldname, IntPtr type); + + public bool HasFieldTyped(string fieldname, GLib.GType type) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + bool raw_ret = gst_structure_has_field_typed(Handle, native_fieldname, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_fieldname); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_has_name(IntPtr raw, IntPtr name); + + public bool HasName(string name) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_structure_has_name(Handle, native_name); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_id_get_value(IntPtr raw, uint field); + + public GLib.Value IdGetValue(uint field) { + IntPtr raw_ret = gst_structure_id_get_value(Handle, field); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_id_has_field(IntPtr raw, uint field); + + public bool IdHasField(uint field) { + bool raw_ret = gst_structure_id_has_field(Handle, field); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_id_has_field_typed(IntPtr raw, uint field, IntPtr type); + + public bool IdHasFieldTyped(uint field, GLib.GType type) { + bool raw_ret = gst_structure_id_has_field_typed(Handle, field, type.Val); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_id_set_value(IntPtr raw, uint field, IntPtr value); + + public void IdSetValue(uint field, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_structure_id_set_value(Handle, field, native_value); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_id_take_value(IntPtr raw, uint field, IntPtr value); + + public void IdTakeValue(uint field, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_structure_id_take_value(Handle, field, native_value); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_intersect(IntPtr raw, IntPtr struct2); + + public Gst.Structure Intersect(Gst.Structure struct2) { + IntPtr raw_ret = gst_structure_intersect(Handle, struct2 == null ? IntPtr.Zero : struct2.Handle); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_is_equal(IntPtr raw, IntPtr structure2); + + public bool IsEqual(Gst.Structure structure2) { + bool raw_ret = gst_structure_is_equal(Handle, structure2 == null ? IntPtr.Zero : structure2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_is_subset(IntPtr raw, IntPtr superset); + + public bool IsSubset(Gst.Structure superset) { + bool raw_ret = gst_structure_is_subset(Handle, superset == null ? IntPtr.Zero : superset.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_map_in_place(IntPtr raw, GstSharp.StructureMapFuncNative func, IntPtr user_data); + + public bool MapInPlace(Gst.StructureMapFunc func) { + GstSharp.StructureMapFuncWrapper func_wrapper = new GstSharp.StructureMapFuncWrapper (func); + bool raw_ret = gst_structure_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_structure_n_fields(IntPtr raw); + + public int NFields() { + int raw_ret = gst_structure_n_fields(Handle); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_nth_field_name(IntPtr raw, uint index); + + public string NthFieldName(uint index) { + IntPtr raw_ret = gst_structure_nth_field_name(Handle, index); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_remove_all_fields(IntPtr raw); + + public void RemoveAllFields() { + gst_structure_remove_all_fields(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_remove_field(IntPtr raw, IntPtr fieldname); + + public void RemoveField(string fieldname) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + gst_structure_remove_field(Handle, native_fieldname); + GLib.Marshaller.Free (native_fieldname); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_set_array(IntPtr raw, IntPtr fieldname, IntPtr array); + + public void SetArray(string fieldname, GLib.ValueArray array) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + gst_structure_set_array(Handle, native_fieldname, array == null ? IntPtr.Zero : array.Handle); + GLib.Marshaller.Free (native_fieldname); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_set_list(IntPtr raw, IntPtr fieldname, IntPtr array); + + public void SetList(string fieldname, GLib.ValueArray array) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + gst_structure_set_list(Handle, native_fieldname, array == null ? IntPtr.Zero : array.Handle); + GLib.Marshaller.Free (native_fieldname); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_structure_set_parent_refcount(IntPtr raw, int refcount); + + public bool SetParentRefcount(int refcount) { + bool raw_ret = gst_structure_set_parent_refcount(Handle, refcount); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_set_value(IntPtr raw, IntPtr fieldname, IntPtr value); + + public void SetValue(string fieldname, GLib.Value value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_structure_set_value(Handle, native_fieldname, native_value); + GLib.Marshaller.Free (native_fieldname); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_take_value(IntPtr raw, IntPtr fieldname, IntPtr value); + + public void TakeValue(string fieldname, GLib.Value value) { + IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_structure_take_value(Handle, native_fieldname, native_value); + GLib.Marshaller.Free (native_fieldname); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_to_string(IntPtr raw); + + public override string ToString() { + IntPtr raw_ret = gst_structure_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + public Structure(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_from_string(IntPtr str1ng, out IntPtr end); + + public Structure (string str1ng, out string end) + { + IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); + IntPtr native_end; + Raw = gst_structure_from_string(native_str1ng, out native_end); + GLib.Marshaller.Free (native_str1ng); + end = GLib.Marshaller.Utf8PtrToString (native_end); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_new_empty(IntPtr name); + + public Structure (string name) + { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + Raw = gst_structure_new_empty(native_name); + GLib.Marshaller.Free (native_name); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_new_from_string(IntPtr str1ng); + + public static Structure NewFromString(string str1ng) + { + IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); + Structure result = new Structure (gst_structure_new_from_string(native_str1ng)); + GLib.Marshaller.Free (native_str1ng); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_new_id_empty(uint quark); + + public Structure (uint quark) + { + Raw = gst_structure_new_id_empty(quark); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_structure_free(IntPtr raw); + + protected override void Free (IntPtr raw) + { + gst_structure_free (raw); + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_structure_free; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("type" + , 0 + , (uint) Marshal.SizeOf(typeof(GLib.GType)) // type + , null + , "name" + , (long) Marshal.OffsetOf(typeof(GstStructure_typeAlign), "type") + , 0 + ), + new GLib.AbiField("name" + , -1 + , (uint) Marshal.SizeOf(typeof(uint)) // name + , "type" + , null + , (long) Marshal.OffsetOf(typeof(GstStructure_nameAlign), "name") + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstStructure_typeAlign + { + sbyte f1; + private GLib.GType type; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstStructure_nameAlign + { + sbyte f1; + private string name; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/StructureChangeType.cs b/sources/generated/Gst/StructureChangeType.cs new file mode 100644 index 0000000000..eb25d5ffc6 --- /dev/null +++ b/sources/generated/Gst/StructureChangeType.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.StructureChangeTypeGType))] + public enum StructureChangeType { + + Link = 0, + Unlink = 1, + } + + internal class StructureChangeTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_structure_change_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_structure_change_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/StructureFilterMapFunc.cs b/sources/generated/Gst/StructureFilterMapFunc.cs new file mode 100644 index 0000000000..753acbfbf0 --- /dev/null +++ b/sources/generated/Gst/StructureFilterMapFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool StructureFilterMapFunc(uint field_id, GLib.Value value); + +} diff --git a/sources/generated/Gst/StructureForeachFunc.cs b/sources/generated/Gst/StructureForeachFunc.cs new file mode 100644 index 0000000000..c90af81d09 --- /dev/null +++ b/sources/generated/Gst/StructureForeachFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool StructureForeachFunc(uint field_id, GLib.Value value); + +} diff --git a/sources/generated/Gst/StructureMapFunc.cs b/sources/generated/Gst/StructureMapFunc.cs new file mode 100644 index 0000000000..412eb4783e --- /dev/null +++ b/sources/generated/Gst/StructureMapFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool StructureMapFunc(uint field_id, GLib.Value value); + +} diff --git a/sources/generated/Gst/SyncMessageHandler.cs b/sources/generated/Gst/SyncMessageHandler.cs new file mode 100644 index 0000000000..f16365c4ac --- /dev/null +++ b/sources/generated/Gst/SyncMessageHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void SyncMessageHandler(object o, SyncMessageArgs args); + + public class SyncMessageArgs : GLib.SignalArgs { + public Gst.Message Message{ + get { + return (Gst.Message) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/SyncedHandler.cs b/sources/generated/Gst/SyncedHandler.cs new file mode 100644 index 0000000000..59f5a4b9b5 --- /dev/null +++ b/sources/generated/Gst/SyncedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void SyncedHandler(object o, SyncedArgs args); + + public class SyncedArgs : GLib.SignalArgs { + public bool Synced{ + get { + return (bool) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/SystemClock.cs b/sources/generated/Gst/SystemClock.cs new file mode 100644 index 0000000000..909ac2cd44 --- /dev/null +++ b/sources/generated/Gst/SystemClock.cs @@ -0,0 +1,123 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class SystemClock : Gst.Clock { + + public SystemClock (IntPtr raw) : base(raw) {} + + protected SystemClock() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("clock-type")] + public Gst.ClockType ClockType { + get { + GLib.Value val = GetProperty ("clock-type"); + Gst.ClockType ret = (Gst.ClockType) (Enum) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value((Enum) value); + SetProperty("clock-type", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Clock.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_system_clock_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_system_clock_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_system_clock_obtain(); + + public static Gst.Clock Obtain() { + IntPtr raw_ret = gst_system_clock_obtain(); + Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_system_clock_set_default(IntPtr new_clock); + + public static Gst.Clock Default { + set { + gst_system_clock_set_default(value == null ? IntPtr.Zero : value.Handle); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Clock.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/Tag.cs b/sources/generated/Gst/Tag.cs new file mode 100644 index 0000000000..dd9d77e97e --- /dev/null +++ b/sources/generated/Gst/Tag.cs @@ -0,0 +1,540 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Tag { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_exists(IntPtr tag); + + public static bool Exists(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_exists(native_tag); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_description(IntPtr tag); + + public static string GetDescription(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr raw_ret = gst_tag_get_description(native_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_get_flag(IntPtr tag); + + public static Gst.TagFlag GetFlag(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + int raw_ret = gst_tag_get_flag(native_tag); + Gst.TagFlag ret = (Gst.TagFlag) raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_nick(IntPtr tag); + + public static string GetNick(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr raw_ret = gst_tag_get_nick(native_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_type(IntPtr tag); + + public static GLib.GType GetType(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr raw_ret = gst_tag_get_type(native_tag); + GLib.GType ret = new GLib.GType(raw_ret); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_is_fixed(IntPtr tag); + + public static bool IsFixed(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_is_fixed(native_tag); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_copy_value(IntPtr dest, IntPtr list, IntPtr tag); + + public static bool ListCopyValue(ref GLib.Value dest, Gst.TagList list, string tag) { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_copy_value(native_dest, list == null ? IntPtr.Zero : list.Handle, native_tag); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_merge_strings_with_comma(IntPtr dest, IntPtr src); + + public static GLib.Value MergeStringsWithComma(GLib.Value src) { + GLib.Value dest; + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + gst_tag_merge_strings_with_comma(native_dest, native_src); + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_merge_use_first(IntPtr dest, IntPtr src); + + public static GLib.Value MergeUseFirst(GLib.Value src) { + GLib.Value dest; + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + gst_tag_merge_use_first(native_dest, native_src); + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_check_language_code(IntPtr lang_code); + + public static bool CheckLanguageCode(string lang_code) { + IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code); + bool raw_ret = gst_tag_check_language_code(native_lang_code); + bool ret = raw_ret; + GLib.Marshaller.Free (native_lang_code); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_freeform_string_to_utf8(IntPtr[] data, int size, IntPtr[] env_vars); + + public static string FreeformStringToUtf8(string[] data, int size, string[] env_vars) { + int cnt_data = data == null ? 0 : data.Length; + IntPtr[] native_data = new IntPtr [cnt_data]; + for (int i = 0; i < cnt_data; i++) + native_data [i] = GLib.Marshaller.StringToPtrGStrdup(data[i]); + int cnt_env_vars = env_vars == null ? 0 : env_vars.Length; + IntPtr[] native_env_vars = new IntPtr [cnt_env_vars + 1]; + for (int i = 0; i < cnt_env_vars; i++) + native_env_vars [i] = GLib.Marshaller.StringToPtrGStrdup(env_vars[i]); + native_env_vars [cnt_env_vars] = IntPtr.Zero; + IntPtr raw_ret = gst_tag_freeform_string_to_utf8(native_data, size, native_env_vars); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_from_id3_tag(IntPtr id3_tag); + + public static string FromId3Tag(string id3_tag) { + IntPtr native_id3_tag = GLib.Marshaller.StringToPtrGStrdup (id3_tag); + IntPtr raw_ret = gst_tag_from_id3_tag(native_id3_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_id3_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_from_id3_user_tag(IntPtr type, IntPtr id3_user_tag); + + public static string FromId3UserTag(string type, string id3_user_tag) { + IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type); + IntPtr native_id3_user_tag = GLib.Marshaller.StringToPtrGStrdup (id3_user_tag); + IntPtr raw_ret = gst_tag_from_id3_user_tag(native_type, native_id3_user_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_type); + GLib.Marshaller.Free (native_id3_user_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_from_vorbis_tag(IntPtr vorbis_tag); + + public static string FromVorbisTag(string vorbis_tag) { + IntPtr native_vorbis_tag = GLib.Marshaller.StringToPtrGStrdup (vorbis_tag); + IntPtr raw_ret = gst_tag_from_vorbis_tag(native_vorbis_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_vorbis_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_tag_get_id3v2_tag_size(IntPtr buffer); + + public static uint GetId3v2TagSize(Gst.Buffer buffer) { + uint raw_ret = gst_tag_get_id3v2_tag_size(buffer == null ? IntPtr.Zero : buffer.Handle); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_language_code_iso_639_1(IntPtr lang_code); + + public static string GetLanguageCodeIso6391(string lang_code) { + IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code); + IntPtr raw_ret = gst_tag_get_language_code_iso_639_1(native_lang_code); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_lang_code); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_language_code_iso_639_2B(IntPtr lang_code); + + public static string GetLanguageCodeIso6392B(string lang_code) { + IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code); + IntPtr raw_ret = gst_tag_get_language_code_iso_639_2B(native_lang_code); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_lang_code); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_language_code_iso_639_2T(IntPtr lang_code); + + public static string GetLanguageCodeIso6392T(string lang_code) { + IntPtr native_lang_code = GLib.Marshaller.StringToPtrGStrdup (lang_code); + IntPtr raw_ret = gst_tag_get_language_code_iso_639_2T(native_lang_code); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_lang_code); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_language_codes(); + + public static string[] GetLanguageCodes() { + IntPtr raw_ret = gst_tag_get_language_codes(); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_language_name(IntPtr language_code); + + public static string GetLanguageName(string language_code) { + IntPtr native_language_code = GLib.Marshaller.StringToPtrGStrdup (language_code); + IntPtr raw_ret = gst_tag_get_language_name(native_language_code); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_language_code); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_license_description(IntPtr license_ref); + + public static string GetLicenseDescription(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + IntPtr raw_ret = gst_tag_get_license_description(native_license_ref); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_get_license_flags(IntPtr license_ref); + + public static Gst.Tags.TagLicenseFlags GetLicenseFlags(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + int raw_ret = gst_tag_get_license_flags(native_license_ref); + Gst.Tags.TagLicenseFlags ret = (Gst.Tags.TagLicenseFlags) raw_ret; + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_license_jurisdiction(IntPtr license_ref); + + public static string GetLicenseJurisdiction(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + IntPtr raw_ret = gst_tag_get_license_jurisdiction(native_license_ref); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_license_nick(IntPtr license_ref); + + public static string GetLicenseNick(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + IntPtr raw_ret = gst_tag_get_license_nick(native_license_ref); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_license_title(IntPtr license_ref); + + public static string GetLicenseTitle(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + IntPtr raw_ret = gst_tag_get_license_title(native_license_ref); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_license_version(IntPtr license_ref); + + public static string GetLicenseVersion(string license_ref) { + IntPtr native_license_ref = GLib.Marshaller.StringToPtrGStrdup (license_ref); + IntPtr raw_ret = gst_tag_get_license_version(native_license_ref); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_license_ref); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_get_licenses(); + + public static string[] GetLicenses() { + IntPtr raw_ret = gst_tag_get_licenses(); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_tag_id3_genre_count(); + + public static uint Id3GenreCount() { + uint raw_ret = gst_tag_id3_genre_count(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_id3_genre_get(uint id); + + public static string Id3GenreGet(uint id) { + IntPtr raw_ret = gst_tag_id3_genre_get(id); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_image_data_to_image_sample(byte[] image_data, uint image_data_len, int image_type); + + public static Gst.Sample ImageDataToImageSample(byte[] image_data, uint image_data_len, Gst.Tags.TagImageType image_type) { + IntPtr raw_ret = gst_tag_image_data_to_image_sample(image_data, image_data_len, (int) image_type); + Gst.Sample ret = raw_ret == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_add_id3_image(IntPtr tag_list, byte[] image_data, uint image_data_len, uint id3_picture_type); + + public static bool ListAddId3Image(Gst.TagList tag_list, byte[] image_data, uint image_data_len, uint id3_picture_type) { + bool raw_ret = gst_tag_list_add_id3_image(tag_list == null ? IntPtr.Zero : tag_list.Handle, image_data, image_data_len, id3_picture_type); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_exif_buffer(IntPtr buffer, int byte_order, uint base_offset); + + public static Gst.TagList ListFromExifBuffer(Gst.Buffer buffer, int byte_order, uint base_offset) { + IntPtr raw_ret = gst_tag_list_from_exif_buffer(buffer == null ? IntPtr.Zero : buffer.Handle, byte_order, base_offset); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_exif_buffer_with_tiff_header(IntPtr buffer); + + public static Gst.TagList ListFromExifBufferWithTiffHeader(Gst.Buffer buffer) { + IntPtr raw_ret = gst_tag_list_from_exif_buffer_with_tiff_header(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_id3v2_tag(IntPtr buffer); + + public static Gst.TagList ListFromId3v2Tag(Gst.Buffer buffer) { + IntPtr raw_ret = gst_tag_list_from_id3v2_tag(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_vorbiscomment(byte[] data, UIntPtr size, byte[] id_data, uint id_data_length, out IntPtr vendor_string); + + public static Gst.TagList ListFromVorbiscomment(byte[] data, ulong size, byte[] id_data, uint id_data_length, out string vendor_string) { + IntPtr native_vendor_string; + IntPtr raw_ret = gst_tag_list_from_vorbiscomment(data, new UIntPtr (size), id_data, id_data_length, out native_vendor_string); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + vendor_string = GLib.Marshaller.PtrToStringGFree(native_vendor_string); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_vorbiscomment_buffer(IntPtr buffer, byte[] id_data, uint id_data_length, out IntPtr vendor_string); + + public static Gst.TagList ListFromVorbiscommentBuffer(Gst.Buffer buffer, byte[] id_data, uint id_data_length, out string vendor_string) { + IntPtr native_vendor_string; + IntPtr raw_ret = gst_tag_list_from_vorbiscomment_buffer(buffer == null ? IntPtr.Zero : buffer.Handle, id_data, id_data_length, out native_vendor_string); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + vendor_string = GLib.Marshaller.PtrToStringGFree(native_vendor_string); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_from_xmp_buffer(IntPtr buffer); + + public static Gst.TagList ListFromXmpBuffer(Gst.Buffer buffer) { + IntPtr raw_ret = gst_tag_list_from_xmp_buffer(buffer == null ? IntPtr.Zero : buffer.Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_new_from_id3v1(byte[] data); + + public static Gst.TagList ListNewFromId3v1(byte[] data) { + data = new byte[128]; + IntPtr raw_ret = gst_tag_list_new_from_id3v1(data); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_to_exif_buffer(IntPtr taglist, int byte_order, uint base_offset); + + public static Gst.Buffer ListToExifBuffer(Gst.TagList taglist, int byte_order, uint base_offset) { + IntPtr raw_ret = gst_tag_list_to_exif_buffer(taglist == null ? IntPtr.Zero : taglist.Handle, byte_order, base_offset); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_to_exif_buffer_with_tiff_header(IntPtr taglist); + + public static Gst.Buffer ListToExifBufferWithTiffHeader(Gst.TagList taglist) { + IntPtr raw_ret = gst_tag_list_to_exif_buffer_with_tiff_header(taglist == null ? IntPtr.Zero : taglist.Handle); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_to_vorbiscomment_buffer(IntPtr list, byte[] id_data, uint id_data_length, IntPtr vendor_string); + + public static Gst.Buffer ListToVorbiscommentBuffer(Gst.TagList list, byte[] id_data, uint id_data_length, string vendor_string) { + IntPtr native_vendor_string = GLib.Marshaller.StringToPtrGStrdup (vendor_string); + IntPtr raw_ret = gst_tag_list_to_vorbiscomment_buffer(list == null ? IntPtr.Zero : list.Handle, id_data, id_data_length, native_vendor_string); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + GLib.Marshaller.Free (native_vendor_string); + return ret; + } + + public static Gst.Buffer ListToVorbiscommentBuffer(Gst.TagList list, byte[] id_data, uint id_data_length) { + return ListToVorbiscommentBuffer (list, id_data, id_data_length, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_to_xmp_buffer(IntPtr list, bool read_only, IntPtr[] schemas); + + public static Gst.Buffer ListToXmpBuffer(Gst.TagList list, bool read_only, string[] schemas) { + int cnt_schemas = schemas == null ? 0 : schemas.Length; + IntPtr[] native_schemas = new IntPtr [cnt_schemas + 1]; + for (int i = 0; i < cnt_schemas; i++) + native_schemas [i] = GLib.Marshaller.StringToPtrGStrdup(schemas[i]); + native_schemas [cnt_schemas] = IntPtr.Zero; + IntPtr raw_ret = gst_tag_list_to_xmp_buffer(list == null ? IntPtr.Zero : list.Handle, read_only, native_schemas); + Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_parse_extended_comment(IntPtr ext_comment, out IntPtr key, out IntPtr lang, out IntPtr value, bool fail_if_no_key); + + public static bool ParseExtendedComment(string ext_comment, out string key, out string lang, out string value, bool fail_if_no_key) { + IntPtr native_ext_comment = GLib.Marshaller.StringToPtrGStrdup (ext_comment); + IntPtr native_key; + IntPtr native_lang; + IntPtr native_value; + bool raw_ret = gst_tag_parse_extended_comment(native_ext_comment, out native_key, out native_lang, out native_value, fail_if_no_key); + bool ret = raw_ret; + GLib.Marshaller.Free (native_ext_comment); + key = GLib.Marshaller.PtrToStringGFree(native_key); + lang = GLib.Marshaller.PtrToStringGFree(native_lang); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_register_musicbrainz_tags(); + + public static void RegisterMusicbrainzTags() { + gst_tag_register_musicbrainz_tags(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_to_id3_tag(IntPtr gst_tag); + + public static string ToId3Tag(string gst_tag) { + IntPtr native_gst_tag = GLib.Marshaller.StringToPtrGStrdup (gst_tag); + IntPtr raw_ret = gst_tag_to_id3_tag(native_gst_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_gst_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_to_vorbis_comments(IntPtr list, IntPtr tag); + + public static string[] ToVorbisComments(Gst.TagList list, string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr raw_ret = gst_tag_to_vorbis_comments(list == null ? IntPtr.Zero : list.Handle, native_tag); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(string)); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_to_vorbis_tag(IntPtr gst_tag); + + public static string ToVorbisTag(string gst_tag) { + IntPtr native_gst_tag = GLib.Marshaller.StringToPtrGStrdup (gst_tag); + IntPtr raw_ret = gst_tag_to_vorbis_tag(native_gst_tag); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + GLib.Marshaller.Free (native_gst_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_xmp_list_schemas(); + + public static string[] XmpListSchemas() { + IntPtr raw_ret = gst_tag_xmp_list_schemas(); + string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/TagFlag.cs b/sources/generated/Gst/TagFlag.cs new file mode 100644 index 0000000000..c9575b0f9d --- /dev/null +++ b/sources/generated/Gst/TagFlag.cs @@ -0,0 +1,31 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TagFlagGType))] + public enum TagFlag { + + Undefined = 0, + Meta = 1, + Encoded = 2, + Decoded = 3, + Count = 4, + } + + internal class TagFlagGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_flag_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_flag_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TagForeachFunc.cs b/sources/generated/Gst/TagForeachFunc.cs new file mode 100644 index 0000000000..914192f06d --- /dev/null +++ b/sources/generated/Gst/TagForeachFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TagForeachFunc(Gst.TagList list, string tag); + +} diff --git a/sources/generated/Gst/TagList.cs b/sources/generated/Gst/TagList.cs new file mode 100644 index 0000000000..553b50a1dd --- /dev/null +++ b/sources/generated/Gst/TagList.cs @@ -0,0 +1,540 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TagList : Gst.MiniObject { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_tag_list_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_add_value(IntPtr raw, int mode, IntPtr tag, IntPtr value); + + public void AddValue(Gst.TagMergeMode mode, string tag, GLib.Value value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_tag_list_add_value(Handle, (int) mode, native_tag, native_value); + GLib.Marshaller.Free (native_tag); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_copy(IntPtr raw); + + public Gst.TagList Copy() { + IntPtr raw_ret = gst_tag_list_copy(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_foreach(IntPtr raw, GstSharp.TagForeachFuncNative func, IntPtr user_data); + + public void Foreach(Gst.TagForeachFunc func) { + GstSharp.TagForeachFuncWrapper func_wrapper = new GstSharp.TagForeachFuncWrapper (func); + gst_tag_list_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_boolean(IntPtr raw, IntPtr tag, out bool value); + + public bool GetBoolean(string tag, out bool value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_boolean(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_boolean_index(IntPtr raw, IntPtr tag, uint index, out bool value); + + public bool GetBooleanIndex(string tag, uint index, out bool value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_boolean_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_date(IntPtr raw, IntPtr tag, out IntPtr value); + + public bool GetDate(string tag, out GLib.Date value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_date(Handle, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = new GLib.Date(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_date_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value); + + public bool GetDateIndex(string tag, uint index, out GLib.Date value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_date_index(Handle, native_tag, index, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = new GLib.Date(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_date_time(IntPtr raw, IntPtr tag, out IntPtr value); + + public bool GetDateTime(string tag, out Gst.DateTime value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_date_time(Handle, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_date_time_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value); + + public bool GetDateTimeIndex(string tag, uint index, out Gst.DateTime value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_date_time_index(Handle, native_tag, index, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_double(IntPtr raw, IntPtr tag, out double value); + + public bool GetDouble(string tag, out double value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_double(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_double_index(IntPtr raw, IntPtr tag, uint index, out double value); + + public bool GetDoubleIndex(string tag, uint index, out double value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_double_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_float(IntPtr raw, IntPtr tag, out float value); + + public bool GetFloat(string tag, out float value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_float(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_float_index(IntPtr raw, IntPtr tag, uint index, out float value); + + public bool GetFloatIndex(string tag, uint index, out float value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_float_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_int(IntPtr raw, IntPtr tag, out int value); + + public bool GetInt(string tag, out int value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_int(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_int64(IntPtr raw, IntPtr tag, out long value); + + public bool GetInt64(string tag, out long value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_int64(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_int64_index(IntPtr raw, IntPtr tag, uint index, out long value); + + public bool GetInt64Index(string tag, uint index, out long value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_int64_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_int_index(IntPtr raw, IntPtr tag, uint index, out int value); + + public bool GetIntIndex(string tag, uint index, out int value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_int_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_pointer(IntPtr raw, IntPtr tag, out IntPtr value); + + public bool GetPointer(string tag, out IntPtr value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_pointer(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_pointer_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value); + + public bool GetPointerIndex(string tag, uint index, out IntPtr value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_pointer_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_sample(IntPtr raw, IntPtr tag, out IntPtr sample); + + public bool GetSample(string tag, out Gst.Sample sample) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_sample; + bool raw_ret = gst_tag_list_get_sample(Handle, native_tag, out native_sample); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + sample = native_sample == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (native_sample, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_sample_index(IntPtr raw, IntPtr tag, uint index, out IntPtr sample); + + public bool GetSampleIndex(string tag, uint index, out Gst.Sample sample) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_sample; + bool raw_ret = gst_tag_list_get_sample_index(Handle, native_tag, index, out native_sample); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + sample = native_sample == IntPtr.Zero ? null : (Gst.Sample) GLib.Opaque.GetOpaque (native_sample, typeof (Gst.Sample), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_list_get_scope(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_set_scope(IntPtr raw, int scope); + + public Gst.TagScope Scope { + get { + int raw_ret = gst_tag_list_get_scope(Handle); + Gst.TagScope ret = (Gst.TagScope) raw_ret; + return ret; + } + set { + gst_tag_list_set_scope(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_string(IntPtr raw, IntPtr tag, out IntPtr value); + + public bool GetString(string tag, out string value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_string(Handle, native_tag, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_string_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value); + + public bool GetStringIndex(string tag, uint index, out string value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_get_string_index(Handle, native_tag, index, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.PtrToStringGFree(native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_tag_list_get_tag_size(IntPtr raw, IntPtr tag); + + public uint GetTagSize(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + uint raw_ret = gst_tag_list_get_tag_size(Handle, native_tag); + uint ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_uint(IntPtr raw, IntPtr tag, out uint value); + + public bool GetUint(string tag, out uint value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_uint(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_uint64(IntPtr raw, IntPtr tag, out ulong value); + + public bool GetUint64(string tag, out ulong value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_uint64(Handle, native_tag, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_uint64_index(IntPtr raw, IntPtr tag, uint index, out ulong value); + + public bool GetUint64Index(string tag, uint index, out ulong value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_uint64_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_get_uint_index(IntPtr raw, IntPtr tag, uint index, out uint value); + + public bool GetUintIndex(string tag, uint index, out uint value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_get_uint_index(Handle, native_tag, index, out value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_get_value_index(IntPtr raw, IntPtr tag, uint index); + + public GLib.Value GetValueIndex(string tag, uint index) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr raw_ret = gst_tag_list_get_value_index(Handle, native_tag, index); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + GLib.Marshaller.Free (native_tag); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_insert(IntPtr raw, IntPtr from, int mode); + + public void Insert(Gst.TagList from, Gst.TagMergeMode mode) { + gst_tag_list_insert(Handle, from == null ? IntPtr.Zero : from.Handle, (int) mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_is_empty(IntPtr raw); + + public bool IsEmpty { + get { + bool raw_ret = gst_tag_list_is_empty(Handle); + bool ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_is_equal(IntPtr raw, IntPtr list2); + + public bool IsEqual(Gst.TagList list2) { + bool raw_ret = gst_tag_list_is_equal(Handle, list2 == null ? IntPtr.Zero : list2.Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_merge(IntPtr raw, IntPtr list2, int mode); + + public Gst.TagList Merge(Gst.TagList list2, Gst.TagMergeMode mode) { + IntPtr raw_ret = gst_tag_list_merge(Handle, list2 == null ? IntPtr.Zero : list2.Handle, (int) mode); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), true); + return ret; + } + + public Gst.TagList Merge(Gst.TagMergeMode mode) { + return Merge (null, mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_list_n_tags(IntPtr raw); + + public int NTags() { + int raw_ret = gst_tag_list_n_tags(Handle); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_nth_tag_name(IntPtr raw, uint index); + + public string NthTagName(uint index) { + IntPtr raw_ret = gst_tag_list_nth_tag_name(Handle, index); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_peek_string_index(IntPtr raw, IntPtr tag, uint index, out IntPtr value); + + public bool PeekStringIndex(string tag, uint index, out string value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value; + bool raw_ret = gst_tag_list_peek_string_index(Handle, native_tag, index, out native_value); + bool ret = raw_ret; + GLib.Marshaller.Free (native_tag); + value = GLib.Marshaller.Utf8PtrToString (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_remove_tag(IntPtr raw, IntPtr tag); + + public void RemoveTag(string tag) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + gst_tag_list_remove_tag(Handle, native_tag); + GLib.Marshaller.Free (native_tag); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_to_string(IntPtr raw); + + public override string ToString() { + IntPtr raw_ret = gst_tag_list_to_string(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tag_list_copy_value(IntPtr dest, IntPtr list, IntPtr tag); + + public static bool CopyValue(ref GLib.Value dest, Gst.TagList list, string tag) { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + bool raw_ret = gst_tag_list_copy_value(native_dest, list == null ? IntPtr.Zero : list.Handle, native_tag); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_tag); + return ret; + } + + public TagList(IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_new_empty(); + + public TagList () + { + Raw = gst_tag_list_new_empty(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_new_from_string(IntPtr str); + + public TagList (string str) + { + IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); + Raw = gst_tag_list_new_from_string(native_str); + GLib.Marshaller.Free (native_str); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_list_ref(IntPtr raw); + + protected override void Ref (IntPtr raw) + { + if (!Owned) { + gst_tag_list_ref (raw); + Owned = true; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_list_unref(IntPtr raw); + + protected override void Unref (IntPtr raw) + { + if (Owned) { + gst_tag_list_unref (raw); + Owned = false; + } + } + + protected override Action DisposeUnmanagedFunc { + get { + return gst_tag_list_unref; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TagMergeFunc.cs b/sources/generated/Gst/TagMergeFunc.cs new file mode 100644 index 0000000000..7d76c5a1cd --- /dev/null +++ b/sources/generated/Gst/TagMergeFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TagMergeFunc(GLib.Value dest, GLib.Value src); + +} diff --git a/sources/generated/Gst/TagMergeMode.cs b/sources/generated/Gst/TagMergeMode.cs new file mode 100644 index 0000000000..f2f7baeb27 --- /dev/null +++ b/sources/generated/Gst/TagMergeMode.cs @@ -0,0 +1,34 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TagMergeModeGType))] + public enum TagMergeMode { + + Undefined = 0, + ReplaceAll = 1, + Replace = 2, + Append = 3, + Prepend = 4, + Keep = 5, + KeepAll = 6, + Count = 7, + } + + internal class TagMergeModeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_merge_mode_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_merge_mode_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TagScope.cs b/sources/generated/Gst/TagScope.cs new file mode 100644 index 0000000000..e26f54f212 --- /dev/null +++ b/sources/generated/Gst/TagScope.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TagScopeGType))] + public enum TagScope { + + Stream = 0, + Global = 1, + } + + internal class TagScopeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_scope_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tag_scope_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TagSetterAdapter.cs b/sources/generated/Gst/TagSetterAdapter.cs new file mode 100644 index 0000000000..f1465b086e --- /dev/null +++ b/sources/generated/Gst/TagSetterAdapter.cs @@ -0,0 +1,158 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TagSetterAdapter : GLib.GInterfaceAdapter, Gst.ITagSetter { + + [StructLayout (LayoutKind.Sequential)] + struct GstTagSetterInterface { + } + + static GstTagSetterInterface iface; + + static TagSetterAdapter () + { + GLib.GType.Register (_gtype, typeof (TagSetterAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public TagSetterAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public TagSetterAdapter (ITagSetterImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public TagSetterAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_setter_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_tag_setter_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static ITagSetter GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static ITagSetter GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is ITagSetterImplementor) + return new TagSetterAdapter (obj as ITagSetterImplementor); + else if (obj as ITagSetter == null) + return new TagSetterAdapter (obj.Handle); + else + return obj as ITagSetter; + } + + public ITagSetterImplementor Implementor { + get { + return implementor as ITagSetterImplementor; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_add_tag_value(IntPtr raw, int mode, IntPtr tag, IntPtr value); + + public void AddTagValue(Gst.TagMergeMode mode, string tag, GLib.Value value) { + IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_tag_setter_add_tag_value(Handle, (int) mode, native_tag, native_value); + GLib.Marshaller.Free (native_tag); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tag_setter_get_tag_list(IntPtr raw); + + public Gst.TagList TagList { + get { + IntPtr raw_ret = gst_tag_setter_get_tag_list(Handle); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_tag_setter_get_tag_merge_mode(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_set_tag_merge_mode(IntPtr raw, int mode); + + public Gst.TagMergeMode TagMergeMode { + get { + int raw_ret = gst_tag_setter_get_tag_merge_mode(Handle); + Gst.TagMergeMode ret = (Gst.TagMergeMode) raw_ret; + return ret; + } + set { + gst_tag_setter_set_tag_merge_mode(Handle, (int) value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_merge_tags(IntPtr raw, IntPtr list, int mode); + + public void MergeTags(Gst.TagList list, Gst.TagMergeMode mode) { + gst_tag_setter_merge_tags(Handle, list == null ? IntPtr.Zero : list.Handle, (int) mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_tag_setter_reset_tags(IntPtr raw); + + public void ResetTags() { + gst_tag_setter_reset_tags(Handle); + } + +#endregion + } +} diff --git a/sources/generated/Gst/Task.cs b/sources/generated/Gst/Task.cs new file mode 100644 index 0000000000..f8cbed0c8c --- /dev/null +++ b/sources/generated/Gst/Task.cs @@ -0,0 +1,379 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Task : Gst.Object { + + public Task (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_new(GstSharp.TaskFunctionNative func, IntPtr user_data, GLib.DestroyNotify notify); + + public Task (Gst.TaskFunction func, IntPtr user_data, GLib.DestroyNotify notify) : base (IntPtr.Zero) + { + if (GetType () != typeof (Task)) { + var vals = new List (); + var names = new List (); + CreateNativeObject (names.ToArray (), vals.ToArray ()); + return; + } + GstSharp.TaskFunctionWrapper func_wrapper = new GstSharp.TaskFunctionWrapper (func); + Raw = gst_task_new(func_wrapper.NativeDelegate, user_data, notify); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_task_get_state(IntPtr raw); + + public Gst.TaskState State { + get { + int raw_ret = gst_task_get_state(Handle); + Gst.TaskState ret = (Gst.TaskState) raw_ret; + return ret; + } + } + + public GLib.Cond Cond { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("cond")); + return new GLib.Cond((*raw_ptr)); + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_set_lock(IntPtr raw, IntPtr mutex); + + public GLib.RecMutex Lock { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock")); + return new GLib.RecMutex((*raw_ptr)); + } + } + set { + gst_task_set_lock(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + public Gst.TaskFunction Func { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("func")); + GstSharp.TaskFunctionNative del = (GstSharp.TaskFunctionNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GstSharp.TaskFunctionNative)); + return GstSharp.TaskFunctionWrapper.GetManagedDelegate ((del)); + } + } + } + + public IntPtr UserData { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data")); + return (*raw_ptr); + } + } + } + + public bool Running { + get { + unsafe { + bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("running")); + return (*raw_ptr); + } + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("pool" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "pool" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_task_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_cleanup_all(); + + public static void CleanupAll() { + gst_task_cleanup_all(); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_get_pool(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_set_pool(IntPtr raw, IntPtr pool); + + public Gst.TaskPool Pool { + get { + IntPtr raw_ret = gst_task_get_pool(Handle); + Gst.TaskPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.TaskPool; + return ret; + } + set { + gst_task_set_pool(Handle, value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_join(IntPtr raw); + + public bool Join() { + bool raw_ret = gst_task_join(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_pause(IntPtr raw); + + public bool Pause() { + bool raw_ret = gst_task_pause(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_resume(IntPtr raw); + + public bool Resume() { + bool raw_ret = gst_task_resume(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_set_enter_callback(IntPtr raw, GstSharp.TaskThreadFuncNative enter_func, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.TaskThreadFunc EnterCallback { + set { + GstSharp.TaskThreadFuncWrapper value_wrapper = new GstSharp.TaskThreadFuncWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_task_set_enter_callback(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_set_leave_callback(IntPtr raw, GstSharp.TaskThreadFuncNative leave_func, IntPtr user_data, GLib.DestroyNotify notify); + + public Gst.TaskThreadFunc LeaveCallback { + set { + GstSharp.TaskThreadFuncWrapper value_wrapper = new GstSharp.TaskThreadFuncWrapper (value); + IntPtr user_data; + GLib.DestroyNotify notify; + if (value == null) { + user_data = IntPtr.Zero; + notify = null; + } else { + user_data = (IntPtr) GCHandle.Alloc (value_wrapper); + notify = GLib.DestroyHelper.NotifyHandler; + } + gst_task_set_leave_callback(Handle, value_wrapper.NativeDelegate, user_data, notify); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_set_state(IntPtr raw, int state); + + public bool SetState(Gst.TaskState state) { + bool raw_ret = gst_task_set_state(Handle, (int) state); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_start(IntPtr raw); + + public bool Start() { + bool raw_ret = gst_task_start(Handle); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_task_stop(IntPtr raw); + + public bool Stop() { + bool raw_ret = gst_task_stop(Handle); + bool ret = raw_ret; + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("state" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.TaskState))) // state + , null + , "cond" + , (long) Marshal.OffsetOf(typeof(GstTask_stateAlign), "state") + , 0 + ), + new GLib.AbiField("cond" + , -1 + , (uint) Marshal.SizeOf(typeof(GLib.Cond.ABI)) // cond + , "state" + , "lock" + , (long) Marshal.OffsetOf(typeof(GstTask_condAlign), "cond") + , 0 + ), + new GLib.AbiField("lock" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock + , "cond" + , "func" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("func" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // func + , "lock" + , "user_data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("user_data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data + , "func" + , "notify" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("notify" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // notify + , "user_data" + , "running" + , (long) Marshal.OffsetOf(typeof(GstTask_notifyAlign), "notify") + , 0 + ), + new GLib.AbiField("running" + , -1 + , (uint) Marshal.SizeOf(typeof(bool)) // running + , "notify" + , "thread" + , (long) Marshal.OffsetOf(typeof(GstTask_runningAlign), "running") + , 0 + ), + new GLib.AbiField("thread" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // thread + , "running" + , "priv" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("priv" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , "thread" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTask_stateAlign + { + sbyte f1; + private Gst.TaskState state; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTask_condAlign + { + sbyte f1; + private GLib.Cond.ABI cond; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTask_notifyAlign + { + sbyte f1; + private GLib.DestroyNotify notify; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GstTask_runningAlign + { + sbyte f1; + private bool running; + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TaskFunction.cs b/sources/generated/Gst/TaskFunction.cs new file mode 100644 index 0000000000..25ead870db --- /dev/null +++ b/sources/generated/Gst/TaskFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TaskFunction(); + +} diff --git a/sources/generated/Gst/TaskPool.cs b/sources/generated/Gst/TaskPool.cs new file mode 100644 index 0000000000..0af4a6347d --- /dev/null +++ b/sources/generated/Gst/TaskPool.cs @@ -0,0 +1,469 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TaskPool : Gst.Object { + + public TaskPool (IntPtr raw) : base(raw) {} + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_pool_new(); + + public TaskPool () : base (IntPtr.Zero) + { + if (GetType () != typeof (TaskPool)) { + CreateNativeObject (new string [0], new GLib.Value[0]); + return; + } + Raw = gst_task_pool_new(); + } + + static PrepareNativeDelegate Prepare_cb_delegate; + static PrepareNativeDelegate PrepareVMCallback { + get { + if (Prepare_cb_delegate == null) + Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb); + return Prepare_cb_delegate; + } + } + + static void OverridePrepare (GLib.GType gtype) + { + OverridePrepare (gtype, PrepareVMCallback); + } + + static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PrepareNativeDelegate (IntPtr inst, out IntPtr error); + + static void Prepare_cb (IntPtr inst, out IntPtr error) + { + error = IntPtr.Zero; + + try { + TaskPool __obj = GLib.Object.GetObject (inst, false) as TaskPool; + __obj.OnPrepare (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.TaskPool), ConnectionMethod="OverridePrepare")] + protected virtual void OnPrepare () + { + InternalPrepare (); + } + + private void InternalPrepare () + { + PrepareNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare")); + unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + IntPtr error = IntPtr.Zero; + unmanaged (this.Handle, out error); + } + + static CleanupNativeDelegate Cleanup_cb_delegate; + static CleanupNativeDelegate CleanupVMCallback { + get { + if (Cleanup_cb_delegate == null) + Cleanup_cb_delegate = new CleanupNativeDelegate (Cleanup_cb); + return Cleanup_cb_delegate; + } + } + + static void OverrideCleanup (GLib.GType gtype) + { + OverrideCleanup (gtype, CleanupVMCallback); + } + + static void OverrideCleanup (GLib.GType gtype, CleanupNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("cleanup")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void CleanupNativeDelegate (IntPtr inst); + + static void Cleanup_cb (IntPtr inst) + { + try { + TaskPool __obj = GLib.Object.GetObject (inst, false) as TaskPool; + __obj.OnCleanup (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.TaskPool), ConnectionMethod="OverrideCleanup")] + protected virtual void OnCleanup () + { + InternalCleanup (); + } + + private void InternalCleanup () + { + CleanupNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("cleanup")); + unmanaged = (CleanupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CleanupNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static PushNativeDelegate Push_cb_delegate; + static PushNativeDelegate PushVMCallback { + get { + if (Push_cb_delegate == null) + Push_cb_delegate = new PushNativeDelegate (Push_cb); + return Push_cb_delegate; + } + } + + static void OverridePush (GLib.GType gtype) + { + OverridePush (gtype, PushVMCallback); + } + + static void OverridePush (GLib.GType gtype, PushNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("push")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr PushNativeDelegate (IntPtr inst, GstSharp.TaskPoolFunctionNative func, IntPtr user_data, out IntPtr error); + + static IntPtr Push_cb (IntPtr inst, GstSharp.TaskPoolFunctionNative func, IntPtr user_data, out IntPtr error) + { + error = IntPtr.Zero; + + try { + TaskPool __obj = GLib.Object.GetObject (inst, false) as TaskPool; + IntPtr __result; + GstSharp.TaskPoolFunctionInvoker func_invoker = new GstSharp.TaskPoolFunctionInvoker (func, user_data); + __result = __obj.OnPush (func_invoker.Handler); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.TaskPool), ConnectionMethod="OverridePush")] + protected virtual IntPtr OnPush (Gst.TaskPoolFunction func) + { + return InternalPush (func); + } + + private IntPtr InternalPush (Gst.TaskPoolFunction func) + { + PushNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("push")); + unmanaged = (PushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushNativeDelegate)); + } + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); + + GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper (func); + func_wrapper.PersistUntilCalled (); + IntPtr error = IntPtr.Zero; + IntPtr __result = unmanaged (this.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error); + return __result; + } + + static JoinNativeDelegate Join_cb_delegate; + static JoinNativeDelegate JoinVMCallback { + get { + if (Join_cb_delegate == null) + Join_cb_delegate = new JoinNativeDelegate (Join_cb); + return Join_cb_delegate; + } + } + + static void OverrideJoin (GLib.GType gtype) + { + OverrideJoin (gtype, JoinVMCallback); + } + + static void OverrideJoin (GLib.GType gtype, JoinNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("join")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void JoinNativeDelegate (IntPtr inst, IntPtr id); + + static void Join_cb (IntPtr inst, IntPtr id) + { + try { + TaskPool __obj = GLib.Object.GetObject (inst, false) as TaskPool; + __obj.OnJoin (id); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.TaskPool), ConnectionMethod="OverrideJoin")] + protected virtual void OnJoin (IntPtr id) + { + InternalJoin (id); + } + + private void InternalJoin (IntPtr id) + { + JoinNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("join")); + unmanaged = (JoinNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(JoinNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, id); + } + + static DisposeHandleNativeDelegate DisposeHandle_cb_delegate; + static DisposeHandleNativeDelegate DisposeHandleVMCallback { + get { + if (DisposeHandle_cb_delegate == null) + DisposeHandle_cb_delegate = new DisposeHandleNativeDelegate (DisposeHandle_cb); + return DisposeHandle_cb_delegate; + } + } + + static void OverrideDisposeHandle (GLib.GType gtype) + { + OverrideDisposeHandle (gtype, DisposeHandleVMCallback); + } + + static void OverrideDisposeHandle (GLib.GType gtype, DisposeHandleNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("dispose_handle")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void DisposeHandleNativeDelegate (IntPtr inst, IntPtr id); + + static void DisposeHandle_cb (IntPtr inst, IntPtr id) + { + try { + TaskPool __obj = GLib.Object.GetObject (inst, false) as TaskPool; + __obj.OnDisposeHandle (id); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.TaskPool), ConnectionMethod="OverrideDisposeHandle")] + protected virtual void OnDisposeHandle (IntPtr id) + { + InternalDisposeHandle (id); + } + + private void InternalDisposeHandle (IntPtr id) + { + DisposeHandleNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("dispose_handle")); + unmanaged = (DisposeHandleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DisposeHandleNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle, id); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("prepare" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare + , null + , "cleanup" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("cleanup" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // cleanup + , "prepare" + , "push" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("push" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // push + , "cleanup" + , "join" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("join" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // join + , "push" + , "dispose_handle" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("dispose_handle" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // dispose_handle + , "join" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _gst_reserved + , "dispose_handle" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_pool_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_task_pool_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_pool_cleanup(IntPtr raw); + + public void Cleanup() { + gst_task_pool_cleanup(Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_pool_dispose_handle(IntPtr raw, IntPtr id); + + public void DisposeHandle(IntPtr id) { + gst_task_pool_dispose_handle(Handle, id); + } + + public void DisposeHandle() { + DisposeHandle (IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_task_pool_join(IntPtr raw, IntPtr id); + + public void Join(IntPtr id) { + gst_task_pool_join(Handle, id); + } + + public void Join() { + Join (IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe void gst_task_pool_prepare(IntPtr raw, out IntPtr error); + + public unsafe void Prepare() { + IntPtr error = IntPtr.Zero; + gst_task_pool_prepare(Handle, out error); + if (error != IntPtr.Zero) throw new GLib.GException (error); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_task_pool_push(IntPtr raw, GstSharp.TaskPoolFunctionNative func, IntPtr user_data, out IntPtr error); + + public unsafe IntPtr Push(Gst.TaskPoolFunction func) { + GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper (func); + func_wrapper.PersistUntilCalled (); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_task_pool_push(Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error); + IntPtr ret = raw_ret; + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("pool" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "pool" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TaskPoolFunction.cs b/sources/generated/Gst/TaskPoolFunction.cs new file mode 100644 index 0000000000..6e497d56bf --- /dev/null +++ b/sources/generated/Gst/TaskPoolFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TaskPoolFunction(); + +} diff --git a/sources/generated/Gst/TaskState.cs b/sources/generated/Gst/TaskState.cs new file mode 100644 index 0000000000..8e3f11e803 --- /dev/null +++ b/sources/generated/Gst/TaskState.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TaskStateGType))] + public enum TaskState { + + Started = 0, + Stopped = 1, + Paused = 2, + } + + internal class TaskStateGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_task_state_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_task_state_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TaskThreadFunc.cs b/sources/generated/Gst/TaskThreadFunc.cs new file mode 100644 index 0000000000..658fda9866 --- /dev/null +++ b/sources/generated/Gst/TaskThreadFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TaskThreadFunc(Gst.Task task, out GLib.Thread thread); + +} diff --git a/sources/generated/Gst/TimedValue.cs b/sources/generated/Gst/TimedValue.cs new file mode 100644 index 0000000000..2eae575815 --- /dev/null +++ b/sources/generated/Gst/TimedValue.cs @@ -0,0 +1,46 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct TimedValue : IEquatable { + + public ulong Timestamp; + public double Value; + + public static Gst.TimedValue Zero = new Gst.TimedValue (); + + public static Gst.TimedValue New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.TimedValue.Zero; + return (Gst.TimedValue) Marshal.PtrToStructure (raw, typeof (Gst.TimedValue)); + } + + public bool Equals (TimedValue other) + { + return true && Timestamp.Equals (other.Timestamp) && Value.Equals (other.Value); + } + + public override bool Equals (object other) + { + return other is TimedValue && Equals ((TimedValue) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Timestamp.GetHashCode () ^ Value.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst/Toc.cs b/sources/generated/Gst/Toc.cs new file mode 100644 index 0000000000..4f6dcf5680 --- /dev/null +++ b/sources/generated/Gst/Toc.cs @@ -0,0 +1,188 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct Toc : IEquatable { + + + public static Gst.Toc Zero = new Gst.Toc (); + + public static Gst.Toc New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Toc.Zero; + return (Gst.Toc) Marshal.PtrToStructure (raw, typeof (Gst.Toc)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_new(int scope); + + public static Toc New(Gst.TocScope scope) + { + Toc result = Toc.New (gst_toc_new((int) scope)); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_toc_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_append_entry(IntPtr raw, IntPtr entry); + + public void AppendEntry(Gst.TocEntry entry) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_entry = GLib.Marshaller.StructureToPtrAlloc (entry); + gst_toc_append_entry(this_as_native, native_entry); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_entry); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_dump(IntPtr raw); + + public void Dump() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_toc_dump(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_find_entry(IntPtr raw, IntPtr uid); + + public Gst.TocEntry FindEntry(string uid) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid); + IntPtr raw_ret = gst_toc_find_entry(this_as_native, native_uid); + Gst.TocEntry ret = Gst.TocEntry.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_uid); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_get_entries(IntPtr raw); + + public GLib.List[] Entries { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_get_entries(this_as_native); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GLib.List)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_toc_get_scope(IntPtr raw); + + public Gst.TocScope Scope { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_toc_get_scope(this_as_native); + Gst.TocScope ret = (Gst.TocScope) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_get_tags(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_set_tags(IntPtr raw, IntPtr tags); + + public Gst.TagList Tags { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_get_tags(this_as_native); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + value.Owned = false; + gst_toc_set_tags(this_as_native, value == null ? IntPtr.Zero : value.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_toc_merge_tags(this_as_native, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + static void ReadNative (IntPtr native, ref Gst.Toc target) + { + target = New (native); + } + + public bool Equals (Toc other) + { + return true; + } + + public override bool Equals (object other) + { + return other is Toc && Equals ((Toc) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Toc boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Toc.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Toc (GLib.Value val) + { + return (Gst.Toc) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/TocEntry.cs b/sources/generated/Gst/TocEntry.cs new file mode 100644 index 0000000000..71eb620482 --- /dev/null +++ b/sources/generated/Gst/TocEntry.cs @@ -0,0 +1,289 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct TocEntry : IEquatable { + + + public static Gst.TocEntry Zero = new Gst.TocEntry (); + + public static Gst.TocEntry New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.TocEntry.Zero; + return (Gst.TocEntry) Marshal.PtrToStructure (raw, typeof (Gst.TocEntry)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_new(int type, IntPtr uid); + + public static TocEntry New(Gst.TocEntryType type, string uid) + { + IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid); + TocEntry result = TocEntry.New (gst_toc_entry_new((int) type, native_uid)); + GLib.Marshaller.Free (native_uid); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_toc_entry_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_entry_append_sub_entry(IntPtr raw, IntPtr subentry); + + public void AppendSubEntry(Gst.TocEntry subentry) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_subentry = GLib.Marshaller.StructureToPtrAlloc (subentry); + gst_toc_entry_append_sub_entry(this_as_native, native_subentry); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_subentry); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_toc_entry_get_entry_type(IntPtr raw); + + public Gst.TocEntryType EntryType { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int raw_ret = gst_toc_entry_get_entry_type(this_as_native); + Gst.TocEntryType ret = (Gst.TocEntryType) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_toc_entry_get_loop(IntPtr raw, out int loop_type, out int repeat_count); + + public bool GetLoop(out Gst.TocLoopType loop_type, out int repeat_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + int native_loop_type; + bool raw_ret = gst_toc_entry_get_loop(this_as_native, out native_loop_type, out repeat_count); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + loop_type = (Gst.TocLoopType) native_loop_type; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_parent(IntPtr raw); + + public Gst.TocEntry Parent { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_entry_get_parent(this_as_native); + Gst.TocEntry ret = Gst.TocEntry.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_toc_entry_get_start_stop_times(IntPtr raw, out long start, out long stop); + + public bool GetStartStopTimes(out long start, out long stop) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_toc_entry_get_start_stop_times(this_as_native, out start, out stop); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_sub_entries(IntPtr raw); + + public GLib.List[] SubEntries { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_entry_get_sub_entries(this_as_native); + GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GLib.List)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_tags(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_entry_set_tags(IntPtr raw, IntPtr tags); + + public Gst.TagList Tags { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_entry_get_tags(this_as_native); + Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + set { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + value.Owned = false; + gst_toc_entry_set_tags(this_as_native, value == null ? IntPtr.Zero : value.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_toc(IntPtr raw); + + public Gst.Toc Toc { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_entry_get_toc(this_as_native); + Gst.Toc ret = Gst.Toc.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_get_uid(IntPtr raw); + + public string Uid { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_toc_entry_get_uid(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_toc_entry_is_alternative(IntPtr raw); + + public bool IsAlternative { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_toc_entry_is_alternative(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_toc_entry_is_sequence(IntPtr raw); + + public bool IsSequence { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_toc_entry_is_sequence(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_entry_merge_tags(IntPtr raw, IntPtr tags, int mode); + + public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_toc_entry_merge_tags(this_as_native, tags == null ? IntPtr.Zero : tags.Handle, (int) mode); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + public void MergeTags(Gst.TagMergeMode mode) { + MergeTags (null, mode); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_entry_set_loop(IntPtr raw, int loop_type, int repeat_count); + + public void SetLoop(Gst.TocLoopType loop_type, int repeat_count) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_toc_entry_set_loop(this_as_native, (int) loop_type, repeat_count); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_entry_set_start_stop_times(IntPtr raw, long start, long stop); + + public void SetStartStopTimes(long start, long stop) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_toc_entry_set_start_stop_times(this_as_native, start, stop); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + static void ReadNative (IntPtr native, ref Gst.TocEntry target) + { + target = New (native); + } + + public bool Equals (TocEntry other) + { + return true; + } + + public override bool Equals (object other) + { + return other is TocEntry && Equals ((TocEntry) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.TocEntry boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.TocEntry.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.TocEntry (GLib.Value val) + { + return (Gst.TocEntry) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/TocEntryType.cs b/sources/generated/Gst/TocEntryType.cs new file mode 100644 index 0000000000..ba6da81424 --- /dev/null +++ b/sources/generated/Gst/TocEntryType.cs @@ -0,0 +1,33 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TocEntryTypeGType))] + public enum TocEntryType { + + Angle = -3, + Version = -2, + Edition = -1, + Invalid = 0, + Title = 1, + Track = 2, + Chapter = 3, + } + + internal class TocEntryTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_entry_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_toc_entry_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TocLoopType.cs b/sources/generated/Gst/TocLoopType.cs new file mode 100644 index 0000000000..1187cb3589 --- /dev/null +++ b/sources/generated/Gst/TocLoopType.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TocLoopTypeGType))] + public enum TocLoopType { + + None = 0, + Forward = 1, + Reverse = 2, + PingPong = 3, + } + + internal class TocLoopTypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_loop_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_toc_loop_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TocScope.cs b/sources/generated/Gst/TocScope.cs new file mode 100644 index 0000000000..5490deb1f7 --- /dev/null +++ b/sources/generated/Gst/TocScope.cs @@ -0,0 +1,28 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TocScopeGType))] + public enum TocScope { + + Global = 1, + Current = 2, + } + + internal class TocScopeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_scope_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_toc_scope_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TocSetterAdapter.cs b/sources/generated/Gst/TocSetterAdapter.cs new file mode 100644 index 0000000000..8323c17d12 --- /dev/null +++ b/sources/generated/Gst/TocSetterAdapter.cs @@ -0,0 +1,131 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TocSetterAdapter : GLib.GInterfaceAdapter, Gst.ITocSetter { + + [StructLayout (LayoutKind.Sequential)] + struct GstTocSetterInterface { + } + + static GstTocSetterInterface iface; + + static TocSetterAdapter () + { + GLib.GType.Register (_gtype, typeof (TocSetterAdapter)); + } + + static void Initialize (IntPtr ptr, IntPtr data) + { + } + + GLib.Object implementor; + + public TocSetterAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public TocSetterAdapter (ITocSetterImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public TocSetterAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_setter_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_toc_setter_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static ITocSetter GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static ITocSetter GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is ITocSetterImplementor) + return new TocSetterAdapter (obj as ITocSetterImplementor); + else if (obj as ITocSetter == null) + return new TocSetterAdapter (obj.Handle); + else + return obj as ITocSetter; + } + + public ITocSetterImplementor Implementor { + get { + return implementor as ITocSetterImplementor; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_toc_setter_get_toc(IntPtr raw); + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_setter_set_toc(IntPtr raw, IntPtr value); + + public Gst.Toc Toc { + get { + IntPtr raw_ret = gst_toc_setter_get_toc(Handle); + Gst.Toc ret = Gst.Toc.New (raw_ret); + return ret; + } + set { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_toc_setter_set_toc(Handle, native_value); + Marshal.FreeHGlobal (native_value); + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_toc_setter_reset(IntPtr raw); + + public void Reset() { + gst_toc_setter_reset(Handle); + } + +#endregion + } +} diff --git a/sources/generated/Gst/Tracer.cs b/sources/generated/Gst/Tracer.cs new file mode 100644 index 0000000000..d36dd43f16 --- /dev/null +++ b/sources/generated/Gst/Tracer.cs @@ -0,0 +1,120 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Tracer : Gst.Object { + + protected Tracer (IntPtr raw) : base(raw) {} + + protected Tracer() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + [GLib.Property ("params")] + public string Params { + get { + GLib.Value val = GetProperty ("params"); + string ret = (string) val; + val.Dispose (); + return ret; + } + set { + GLib.Value val = new GLib.Value(value); + SetProperty("params", val); + val.Dispose (); + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (new List{ + new GLib.AbiField("_gst_reserved" + , Gst.Object.class_abi.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , null + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_tracer_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_tracer_register(IntPtr plugin, IntPtr name, IntPtr type); + + public static bool Register(Gst.Plugin plugin, string name, GLib.GType type) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_tracer_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, type.Val); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + public static bool Register(string name, GLib.GType type) { + return Register (null, name, type); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("priv" + , Gst.Object.abi_info.Fields + , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv + , null + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "priv" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TracerFactory.cs b/sources/generated/Gst/TracerFactory.cs new file mode 100644 index 0000000000..bf59f4f605 --- /dev/null +++ b/sources/generated/Gst/TracerFactory.cs @@ -0,0 +1,86 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TracerFactory : Gst.PluginFeature { + + public TracerFactory (IntPtr raw) : base(raw) {} + + protected TracerFactory() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PluginFeature.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_factory_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_tracer_factory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_factory_get_list(); + + public static Gst.TracerFactory[] List { + get { + IntPtr raw_ret = gst_tracer_factory_get_list(); + Gst.TracerFactory[] ret = (Gst.TracerFactory[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.TracerFactory)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_factory_get_tracer_type(IntPtr raw); + + public GLib.GType TracerType { + get { + IntPtr raw_ret = gst_tracer_factory_get_tracer_type(Handle); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PluginFeature.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TracerRecord.cs b/sources/generated/Gst/TracerRecord.cs new file mode 100644 index 0000000000..4fb345db32 --- /dev/null +++ b/sources/generated/Gst/TracerRecord.cs @@ -0,0 +1,64 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TracerRecord : Gst.Object { + + public TracerRecord (IntPtr raw) : base(raw) {} + + protected TracerRecord() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_record_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_tracer_record_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.Object.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TracerValueFlags.cs b/sources/generated/Gst/TracerValueFlags.cs new file mode 100644 index 0000000000..8392711801 --- /dev/null +++ b/sources/generated/Gst/TracerValueFlags.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [Flags] + [GLib.GType (typeof (Gst.TracerValueFlagsGType))] + public enum TracerValueFlags : uint { + + None = 0, + Optional = 1, + Aggregated = 2, + } + + internal class TracerValueFlagsGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_value_flags_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tracer_value_flags_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TracerValueScope.cs b/sources/generated/Gst/TracerValueScope.cs new file mode 100644 index 0000000000..9aef9a52be --- /dev/null +++ b/sources/generated/Gst/TracerValueScope.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TracerValueScopeGType))] + public enum TracerValueScope { + + Process = 0, + Thread = 1, + Element = 2, + Pad = 3, + } + + internal class TracerValueScopeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_tracer_value_scope_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_tracer_value_scope_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/TypeFind.cs b/sources/generated/Gst/TypeFind.cs new file mode 100644 index 0000000000..85f1402c16 --- /dev/null +++ b/sources/generated/Gst/TypeFind.cs @@ -0,0 +1,134 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TypeFind : GLib.Opaque { + + public IntPtr Data { + get { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("data")); + return (*raw_ptr); + } + } + set { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("data")); + *raw_ptr = value; + } + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_type_find_get_length(IntPtr raw); + + public ulong Length { + get { + ulong raw_ret = gst_type_find_get_length(Handle); + ulong ret = raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_type_find_suggest(IntPtr raw, uint probability, IntPtr caps); + + public void Suggest(uint probability, Gst.Caps caps) { + gst_type_find_suggest(Handle, probability, caps == null ? IntPtr.Zero : caps.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_type_find_register(IntPtr plugin, IntPtr name, uint rank, GstSharp.TypeFindFunctionNative func, IntPtr extensions, IntPtr possible_caps, IntPtr data, GLib.DestroyNotify data_notify); + + public static bool Register(Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string extensions, Gst.Caps possible_caps) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + GstSharp.TypeFindFunctionWrapper func_wrapper = new GstSharp.TypeFindFunctionWrapper (func); + IntPtr data; + GLib.DestroyNotify data_notify; + if (func == null) { + data = IntPtr.Zero; + data_notify = null; + } else { + data = (IntPtr) GCHandle.Alloc (func_wrapper); + data_notify = GLib.DestroyHelper.NotifyHandler; + } + IntPtr native_extensions = GLib.Marshaller.StringToPtrGStrdup (extensions); + bool raw_ret = gst_type_find_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, func_wrapper.NativeDelegate, native_extensions, possible_caps == null ? IntPtr.Zero : possible_caps.Handle, IntPtr.Zero, data_notify); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_extensions); + return ret; + } + + public static bool Register(string name, uint rank, Gst.TypeFindFunction func) { + return Register (null, name, rank, func, null, null); + } + + public TypeFind(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + new GLib.AbiField("peek" + , 0 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // peek + , null + , "suggest" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("suggest" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // suggest + , "peek" + , "data" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("data" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // data + , "suggest" + , "get_length" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("get_length" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_length + , "data" + , "_gst_reserved" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("_gst_reserved" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , "get_length" + , null + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TypeFindFactory.cs b/sources/generated/Gst/TypeFindFactory.cs new file mode 100644 index 0000000000..525266deb9 --- /dev/null +++ b/sources/generated/Gst/TypeFindFactory.cs @@ -0,0 +1,104 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class TypeFindFactory : Gst.PluginFeature { + + public TypeFindFactory (IntPtr raw) : base(raw) {} + + protected TypeFindFactory() : base(IntPtr.Zero) + { + CreateNativeObject (new string [0], new GLib.Value [0]); + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _class_abi = null; + static public new GLib.AbiStruct class_abi { + get { + if (_class_abi == null) + _class_abi = new GLib.AbiStruct (Gst.PluginFeature.class_abi.Fields); + + return _class_abi; + } + } + + + // End of the ABI representation. + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_factory_get_type(); + + public static new GLib.GType GType { + get { + IntPtr raw_ret = gst_type_find_factory_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_factory_get_list(); + + public static Gst.TypeFindFactory[] List { + get { + IntPtr raw_ret = gst_type_find_factory_get_list(); + Gst.TypeFindFactory[] ret = (Gst.TypeFindFactory[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.TypeFindFactory)); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_type_find_factory_call_function(IntPtr raw, IntPtr find); + + public void CallFunction(Gst.TypeFind find) { + gst_type_find_factory_call_function(Handle, find == null ? IntPtr.Zero : find.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_factory_get_caps(IntPtr raw); + + public Gst.Caps Caps { + get { + IntPtr raw_ret = gst_type_find_factory_get_caps(Handle); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), false); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_type_find_factory_has_function(IntPtr raw); + + public bool HasFunction { + get { + bool raw_ret = gst_type_find_factory_has_function(Handle); + bool ret = raw_ret; + return ret; + } + } + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.PluginFeature.abi_info.Fields); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/TypeFindFunction.cs b/sources/generated/Gst/TypeFindFunction.cs new file mode 100644 index 0000000000..1d09c502bf --- /dev/null +++ b/sources/generated/Gst/TypeFindFunction.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void TypeFindFunction(Gst.TypeFind find); + +} diff --git a/sources/generated/Gst/TypeFindProbability.cs b/sources/generated/Gst/TypeFindProbability.cs new file mode 100644 index 0000000000..2ed325b963 --- /dev/null +++ b/sources/generated/Gst/TypeFindProbability.cs @@ -0,0 +1,32 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.TypeFindProbabilityGType))] + public enum TypeFindProbability { + + None = 0, + Minimum = 1, + Possible = 50, + Likely = 80, + NearlyCertain = 99, + Maximum = 100, + } + + internal class TypeFindProbabilityGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_type_find_probability_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_type_find_probability_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/URIError.cs b/sources/generated/Gst/URIError.cs new file mode 100644 index 0000000000..3543430f60 --- /dev/null +++ b/sources/generated/Gst/URIError.cs @@ -0,0 +1,30 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.URIErrorGType))] + public enum URIError { + + UnsupportedProtocol = 0, + BadUri = 1, + BadState = 2, + BadReference = 3, + } + + internal class URIErrorGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_error_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_uri_error_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/URIHandlerAdapter.cs b/sources/generated/Gst/URIHandlerAdapter.cs new file mode 100644 index 0000000000..08a34d934c --- /dev/null +++ b/sources/generated/Gst/URIHandlerAdapter.cs @@ -0,0 +1,188 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class URIHandlerAdapter : GLib.GInterfaceAdapter, Gst.IURIHandler { + + [StructLayout (LayoutKind.Sequential)] + struct GstURIHandlerInterface { + IntPtr GetProtocols; + public GetUriNativeDelegate GetUri; + public SetUriNativeDelegate SetUri; + } + + static GstURIHandlerInterface iface; + + static URIHandlerAdapter () + { + GLib.GType.Register (_gtype, typeof (URIHandlerAdapter)); + iface.GetUri = new GetUriNativeDelegate (GetUri_cb); + iface.SetUri = new SetUriNativeDelegate (SetUri_cb); + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate IntPtr GetUriNativeDelegate (IntPtr inst); + + static IntPtr GetUri_cb (IntPtr inst) + { + try { + IURIHandlerImplementor __obj = GLib.Object.GetObject (inst, false) as IURIHandlerImplementor; + string __result; + __result = __obj.Uri; + return GLib.Marshaller.StringToPtrGStrdup(__result); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate bool SetUriNativeDelegate (IntPtr inst, IntPtr uri, out IntPtr error); + + static bool SetUri_cb (IntPtr inst, IntPtr uri, out IntPtr error) + { + error = IntPtr.Zero; + + try { + IURIHandlerImplementor __obj = GLib.Object.GetObject (inst, false) as IURIHandlerImplementor; + bool __result; + __result = __obj.SetUri (GLib.Marshaller.Utf8PtrToString (uri)); + return __result; + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, true); + // NOTREACHED: above call does not return. + throw e; + } + } + + static int class_offset = 2 * IntPtr.Size; + + static void Initialize (IntPtr ptr, IntPtr data) + { + IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset); + GstURIHandlerInterface native_iface = (GstURIHandlerInterface) Marshal.PtrToStructure (ifaceptr, typeof (GstURIHandlerInterface)); + native_iface.GetUri = iface.GetUri; + native_iface.SetUri = iface.SetUri; + Marshal.StructureToPtr (native_iface, ifaceptr, false); + } + + GLib.Object implementor; + + public URIHandlerAdapter () + { + InitHandler = new GLib.GInterfaceInitHandler (Initialize); + } + + public URIHandlerAdapter (IURIHandlerImplementor implementor) + { + if (implementor == null) + throw new ArgumentNullException ("implementor"); + else if (!(implementor is GLib.Object)) + throw new ArgumentException ("implementor must be a subclass of GLib.Object"); + this.implementor = implementor as GLib.Object; + } + + public URIHandlerAdapter (IntPtr handle) + { + if (!_gtype.IsInstance (handle)) + throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle"); + implementor = GLib.Object.GetObject (handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_handler_get_type(); + + private static GLib.GType _gtype = new GLib.GType (gst_uri_handler_get_type ()); + + public static GLib.GType GType { + get { + return _gtype; + } + } + + public override GLib.GType GInterfaceGType { + get { + return _gtype; + } + } + + public override IntPtr Handle { + get { + return implementor.Handle; + } + } + + public IntPtr OwnedHandle { + get { + return implementor.OwnedHandle; + } + } + + public static IURIHandler GetObject (IntPtr handle, bool owned) + { + GLib.Object obj = GLib.Object.GetObject (handle, owned); + return GetObject (obj); + } + + public static IURIHandler GetObject (GLib.Object obj) + { + if (obj == null) + return null; + else if (obj is IURIHandlerImplementor) + return new URIHandlerAdapter (obj as IURIHandlerImplementor); + else if (obj as IURIHandler == null) + return new URIHandlerAdapter (obj.Handle); + else + return obj as IURIHandler; + } + + public IURIHandlerImplementor Implementor { + get { + return implementor as IURIHandlerImplementor; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_handler_get_uri(IntPtr raw); + + public string Uri { + get { + IntPtr raw_ret = gst_uri_handler_get_uri(Handle); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_uri_handler_get_uri_type(IntPtr raw); + + public Gst.URIType UriType { + get { + int raw_ret = gst_uri_handler_get_uri_type(Handle); + Gst.URIType ret = (Gst.URIType) raw_ret; + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_handler_set_uri(IntPtr raw, IntPtr uri, out IntPtr error); + + public bool SetUri(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr error = IntPtr.Zero; + bool raw_ret = gst_uri_handler_set_uri(Handle, native_uri, out error); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/URIType.cs b/sources/generated/Gst/URIType.cs new file mode 100644 index 0000000000..8dd8031f55 --- /dev/null +++ b/sources/generated/Gst/URIType.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.URITypeGType))] + public enum URIType { + + Unknown = 0, + Sink = 1, + Src = 2, + } + + internal class URITypeGType { + [DllImport ("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_type_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_uri_type_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst/UnlinkedHandler.cs b/sources/generated/Gst/UnlinkedHandler.cs new file mode 100644 index 0000000000..df6a2e1098 --- /dev/null +++ b/sources/generated/Gst/UnlinkedHandler.cs @@ -0,0 +1,18 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate void UnlinkedHandler(object o, UnlinkedArgs args); + + public class UnlinkedArgs : GLib.SignalArgs { + public Gst.Pad Peer{ + get { + return (Gst.Pad) Args [0]; + } + } + + } +} diff --git a/sources/generated/Gst/Uri.cs b/sources/generated/Gst/Uri.cs new file mode 100644 index 0000000000..1e935fff55 --- /dev/null +++ b/sources/generated/Gst/Uri.cs @@ -0,0 +1,786 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct Uri : IEquatable { + + + public static Gst.Uri Zero = new Gst.Uri (); + + public static Gst.Uri New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Uri.Zero; + return (Gst.Uri) Marshal.PtrToStructure (raw, typeof (Gst.Uri)); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_new(IntPtr scheme, IntPtr userinfo, IntPtr host, uint port, IntPtr path, IntPtr query, IntPtr fragment); + + public static Uri New(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) + { + IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); + IntPtr native_userinfo = GLib.Marshaller.StringToPtrGStrdup (userinfo); + IntPtr native_host = GLib.Marshaller.StringToPtrGStrdup (host); + IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path); + IntPtr native_query = GLib.Marshaller.StringToPtrGStrdup (query); + IntPtr native_fragment = GLib.Marshaller.StringToPtrGStrdup (fragment); + Uri result = Uri.New (gst_uri_new(native_scheme, native_userinfo, native_host, port, native_path, native_query, native_fragment)); + GLib.Marshaller.Free (native_scheme); + GLib.Marshaller.Free (native_userinfo); + GLib.Marshaller.Free (native_host); + GLib.Marshaller.Free (native_path); + GLib.Marshaller.Free (native_query); + GLib.Marshaller.Free (native_fragment); + return result; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_uri_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_append_path(IntPtr raw, IntPtr relative_path); + + public bool AppendPath(string relative_path) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_relative_path = GLib.Marshaller.StringToPtrGStrdup (relative_path); + bool raw_ret = gst_uri_append_path(this_as_native, native_relative_path); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_relative_path); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_append_path_segment(IntPtr raw, IntPtr path_segment); + + public bool AppendPathSegment(string path_segment) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_path_segment = GLib.Marshaller.StringToPtrGStrdup (path_segment); + bool raw_ret = gst_uri_append_path_segment(this_as_native, native_path_segment); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_path_segment); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_equal(IntPtr raw, IntPtr second); + + public bool Equal(Gst.Uri second) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_second = GLib.Marshaller.StructureToPtrAlloc (second); + bool raw_ret = gst_uri_equal(this_as_native, native_second); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_second); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_from_string_with_base(IntPtr raw, IntPtr uri); + + public Gst.Uri FromStringWithBase(string uri) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_from_string_with_base(this_as_native, native_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_fragment(IntPtr raw); + + public string Fragment { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_fragment(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_host(IntPtr raw); + + public string Host { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_host(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern System.IntPtr gst_uri_get_media_fragment_table(IntPtr raw); + + public string[] MediaFragmentTable { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + System.IntPtr raw_ret = gst_uri_get_media_fragment_table(this_as_native); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(System.IntPtr), true, true, typeof(string)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_path(IntPtr raw); + + public string Path { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_path(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_path_segments(IntPtr raw); + + public string[] PathSegments { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_path_segments(this_as_native); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(string)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_path_string(IntPtr raw); + + public string PathString { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_path_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_uri_get_port(IntPtr raw); + + public uint Port { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + uint raw_ret = gst_uri_get_port(this_as_native); + uint ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_query_keys(IntPtr raw); + + public string[] QueryKeys { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_query_keys(this_as_native); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, true, typeof(string)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_query_string(IntPtr raw); + + public string QueryString { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_query_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern System.IntPtr gst_uri_get_query_table(IntPtr raw); + + public string[] QueryTable { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + System.IntPtr raw_ret = gst_uri_get_query_table(this_as_native); + string[] ret = (string[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(System.IntPtr), true, true, typeof(string)); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_query_value(IntPtr raw, IntPtr query_key); + + public string GetQueryValue(string query_key) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_query_key = GLib.Marshaller.StringToPtrGStrdup (query_key); + IntPtr raw_ret = gst_uri_get_query_value(this_as_native, native_query_key); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_query_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_scheme(IntPtr raw); + + public string Scheme { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_scheme(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_userinfo(IntPtr raw); + + public string Userinfo { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_get_userinfo(this_as_native); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_is_normalized(IntPtr raw); + + public bool IsNormalized { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_is_normalized(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_is_writable(IntPtr raw); + + public bool IsWritable { + get { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_is_writable(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_join(IntPtr raw, IntPtr ref_uri); + + public Gst.Uri Join(Gst.Uri ref_uri) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_ref_uri = GLib.Marshaller.StructureToPtrAlloc (ref_uri); + IntPtr raw_ret = gst_uri_join(this_as_native, native_ref_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + Marshal.FreeHGlobal (native_ref_uri); + return ret; + } + + public Gst.Uri Join() { + return Join (Gst.Uri.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_make_writable(IntPtr raw); + + public Gst.Uri MakeWritable() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_make_writable(this_as_native); + Gst.Uri ret = Gst.Uri.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_new_with_base(IntPtr raw, IntPtr scheme, IntPtr userinfo, IntPtr host, uint port, IntPtr path, IntPtr query, IntPtr fragment); + + public Gst.Uri NewWithBase(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); + IntPtr native_userinfo = GLib.Marshaller.StringToPtrGStrdup (userinfo); + IntPtr native_host = GLib.Marshaller.StringToPtrGStrdup (host); + IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path); + IntPtr native_query = GLib.Marshaller.StringToPtrGStrdup (query); + IntPtr native_fragment = GLib.Marshaller.StringToPtrGStrdup (fragment); + IntPtr raw_ret = gst_uri_new_with_base(this_as_native, native_scheme, native_userinfo, native_host, port, native_path, native_query, native_fragment); + Gst.Uri ret = Gst.Uri.New (raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_scheme); + GLib.Marshaller.Free (native_userinfo); + GLib.Marshaller.Free (native_host); + GLib.Marshaller.Free (native_path); + GLib.Marshaller.Free (native_query); + GLib.Marshaller.Free (native_fragment); + return ret; + } + + public Gst.Uri NewWithBase(uint port) { + return NewWithBase (null, null, null, port, null, null, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_normalize(IntPtr raw); + + public bool Normalize() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_normalize(this_as_native); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_query_has_key(IntPtr raw, IntPtr query_key); + + public bool QueryHasKey(string query_key) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_query_key = GLib.Marshaller.StringToPtrGStrdup (query_key); + bool raw_ret = gst_uri_query_has_key(this_as_native, native_query_key); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_query_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_remove_query_key(IntPtr raw, IntPtr query_key); + + public bool RemoveQueryKey(string query_key) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_query_key = GLib.Marshaller.StringToPtrGStrdup (query_key); + bool raw_ret = gst_uri_remove_query_key(this_as_native, native_query_key); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_query_key); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_fragment(IntPtr raw, IntPtr fragment); + + public bool SetFragment(string fragment) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_fragment = GLib.Marshaller.StringToPtrGStrdup (fragment); + bool raw_ret = gst_uri_set_fragment(this_as_native, native_fragment); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_fragment); + return ret; + } + + public bool SetFragment() { + return SetFragment (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_host(IntPtr raw, IntPtr host); + + public bool SetHost(string host) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_host = GLib.Marshaller.StringToPtrGStrdup (host); + bool raw_ret = gst_uri_set_host(this_as_native, native_host); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_host); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_path(IntPtr raw, IntPtr path); + + public bool SetPath(string path) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path); + bool raw_ret = gst_uri_set_path(this_as_native, native_path); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_path); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_path_segments(IntPtr raw, IntPtr path_segments); + + public bool SetPathSegments(GLib.List path_segments) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_set_path_segments(this_as_native, path_segments == null ? IntPtr.Zero : path_segments.Handle); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + public bool SetPathSegments() { + return SetPathSegments (null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_path_string(IntPtr raw, IntPtr path); + + public bool SetPathString(string path) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path); + bool raw_ret = gst_uri_set_path_string(this_as_native, native_path); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_path); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_port(IntPtr raw, uint port); + + public bool SetPort(uint port) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_set_port(this_as_native, port); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_query_string(IntPtr raw, IntPtr query); + + public bool SetQueryString(string query) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_query = GLib.Marshaller.StringToPtrGStrdup (query); + bool raw_ret = gst_uri_set_query_string(this_as_native, native_query); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_query); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_query_table(IntPtr raw, System.IntPtr query_table); + + public bool SetQueryTable(System.IntPtr query_table) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_uri_set_query_table(this_as_native, query_table); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + public bool SetQueryTable() { + return SetQueryTable (IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_query_value(IntPtr raw, IntPtr query_key, IntPtr query_value); + + public bool SetQueryValue(string query_key, string query_value) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_query_key = GLib.Marshaller.StringToPtrGStrdup (query_key); + IntPtr native_query_value = GLib.Marshaller.StringToPtrGStrdup (query_value); + bool raw_ret = gst_uri_set_query_value(this_as_native, native_query_key, native_query_value); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_query_key); + GLib.Marshaller.Free (native_query_value); + return ret; + } + + public bool SetQueryValue(string query_key) { + return SetQueryValue (query_key, null); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_scheme(IntPtr raw, IntPtr scheme); + + public bool SetScheme(string scheme) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); + bool raw_ret = gst_uri_set_scheme(this_as_native, native_scheme); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_scheme); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_set_userinfo(IntPtr raw, IntPtr userinfo); + + public bool SetUserinfo(string userinfo) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_userinfo = GLib.Marshaller.StringToPtrGStrdup (userinfo); + bool raw_ret = gst_uri_set_userinfo(this_as_native, native_userinfo); + bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_userinfo); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_to_string(IntPtr raw); + + public override string ToString() { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_uri_to_string(this_as_native); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_construct(IntPtr protocol, IntPtr location); + + [Obsolete] + public static string Construct(string protocol, string location) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); + IntPtr raw_ret = gst_uri_construct(native_protocol, native_location); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + GLib.Marshaller.Free (native_location); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_from_string(IntPtr uri); + + public static Gst.Uri FromString(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_from_string(native_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_from_string_escaped(IntPtr uri); + + public static Gst.Uri FromStringEscaped(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_from_string_escaped(native_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_location(IntPtr uri); + + public static string GetLocation(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_get_location(native_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_protocol(IntPtr uri); + + public static string GetProtocol(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_get_protocol(native_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_has_protocol(IntPtr uri, IntPtr protocol); + + public static bool HasProtocol(string uri, string protocol) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_has_protocol(native_uri, native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_is_valid(IntPtr uri); + + public static bool IsValid(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + bool raw_ret = gst_uri_is_valid(native_uri); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_join_strings(IntPtr base_uri, IntPtr ref_uri); + + public static string JoinStrings(string base_uri, string ref_uri) { + IntPtr native_base_uri = GLib.Marshaller.StringToPtrGStrdup (base_uri); + IntPtr native_ref_uri = GLib.Marshaller.StringToPtrGStrdup (ref_uri); + IntPtr raw_ret = gst_uri_join_strings(native_base_uri, native_ref_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_base_uri); + GLib.Marshaller.Free (native_ref_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_protocol_is_supported(int type, IntPtr protocol); + + public static bool ProtocolIsSupported(Gst.URIType type, string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_protocol_is_supported((int) type, native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_protocol_is_valid(IntPtr protocol); + + public static bool ProtocolIsValid(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_protocol_is_valid(native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_protocol); + return ret; + } + + static void ReadNative (IntPtr native, ref Gst.Uri target) + { + target = New (native); + } + + public bool Equals (Uri other) + { + return true; + } + + public override bool Equals (object other) + { + return other is Uri && Equals ((Uri) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } + + public static explicit operator GLib.Value (Gst.Uri boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Uri.GType); + val.Val = boxed; + return val; + } + + public static explicit operator Gst.Uri (GLib.Value val) + { + return (Gst.Uri) val.Val; + } +#endregion + } +} diff --git a/sources/generated/Gst/Util.cs b/sources/generated/Gst/Util.cs new file mode 100644 index 0000000000..1d1b78099a --- /dev/null +++ b/sources/generated/Gst/Util.cs @@ -0,0 +1,445 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Util { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern unsafe IntPtr gst_filename_to_uri(IntPtr filename, out IntPtr error); + + public static unsafe string FilenameToUri(string filename) { + IntPtr native_filename = GLib.Marshaller.StringToFilenamePtr (filename); + IntPtr error = IntPtr.Zero; + IntPtr raw_ret = gst_filename_to_uri(native_filename, out error); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_filename); + if (error != IntPtr.Zero) throw new GLib.GException (error); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_format_get_by_nick(IntPtr nick); + + public static Gst.Format FormatGetByNick(string nick) { + IntPtr native_nick = GLib.Marshaller.StringToPtrGStrdup (nick); + int raw_ret = gst_format_get_by_nick(native_nick); + Gst.Format ret = (Gst.Format) raw_ret; + GLib.Marshaller.Free (native_nick); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_format_get_details(int format); + + public static Gst.FormatDefinition FormatGetDetails(Gst.Format format) { + IntPtr raw_ret = gst_format_get_details((int) format); + Gst.FormatDefinition ret = Gst.FormatDefinition.New (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_format_get_name(int format); + + public static string FormatGetName(Gst.Format format) { + IntPtr raw_ret = gst_format_get_name((int) format); + string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_format_iterate_definitions(); + + public static Gst.Iterator FormatIterateDefinitions() { + IntPtr raw_ret = gst_format_iterate_definitions(); + Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_format_register(IntPtr nick, IntPtr description); + + public static Gst.Format FormatRegister(string nick, string description) { + IntPtr native_nick = GLib.Marshaller.StringToPtrGStrdup (nick); + IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description); + int raw_ret = gst_format_register(native_nick, native_description); + Gst.Format ret = (Gst.Format) raw_ret; + GLib.Marshaller.Free (native_nick); + GLib.Marshaller.Free (native_description); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_format_to_quark(int format); + + public static uint FormatToQuark(Gst.Format format) { + uint raw_ret = gst_format_to_quark((int) format); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_construct(IntPtr protocol, IntPtr location); + + [Obsolete] + public static string UriConstruct(string protocol, string location) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); + IntPtr raw_ret = gst_uri_construct(native_protocol, native_location); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_protocol); + GLib.Marshaller.Free (native_location); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_uri_error_quark(); + + public static uint UriErrorQuark() { + uint raw_ret = gst_uri_error_quark(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_from_string(IntPtr uri); + + public static Gst.Uri UriFromString(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_from_string(native_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_from_string_escaped(IntPtr uri); + + public static Gst.Uri UriFromStringEscaped(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_from_string_escaped(native_uri); + Gst.Uri ret = Gst.Uri.New (raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_location(IntPtr uri); + + public static string UriGetLocation(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_get_location(native_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_get_protocol(IntPtr uri); + + public static string UriGetProtocol(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr raw_ret = gst_uri_get_protocol(native_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_has_protocol(IntPtr uri, IntPtr protocol); + + public static bool UriHasProtocol(string uri, string protocol) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_has_protocol(native_uri, native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_is_valid(IntPtr uri); + + public static bool UriIsValid(string uri) { + IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); + bool raw_ret = gst_uri_is_valid(native_uri); + bool ret = raw_ret; + GLib.Marshaller.Free (native_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_uri_join_strings(IntPtr base_uri, IntPtr ref_uri); + + public static string UriJoinStrings(string base_uri, string ref_uri) { + IntPtr native_base_uri = GLib.Marshaller.StringToPtrGStrdup (base_uri); + IntPtr native_ref_uri = GLib.Marshaller.StringToPtrGStrdup (ref_uri); + IntPtr raw_ret = gst_uri_join_strings(native_base_uri, native_ref_uri); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + GLib.Marshaller.Free (native_base_uri); + GLib.Marshaller.Free (native_ref_uri); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_protocol_is_supported(int type, IntPtr protocol); + + public static bool UriProtocolIsSupported(Gst.URIType type, string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_protocol_is_supported((int) type, native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_uri_protocol_is_valid(IntPtr protocol); + + public static bool UriProtocolIsValid(string protocol) { + IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); + bool raw_ret = gst_uri_protocol_is_valid(native_protocol); + bool ret = raw_ret; + GLib.Marshaller.Free (native_protocol); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_double_to_fraction(double src, out int dest_n, out int dest_d); + + public static void DoubleToFraction(double src, out int dest_n, out int dest_d) { + gst_util_double_to_fraction(src, out dest_n, out dest_d); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_dump_buffer(IntPtr buf); + + public static void DumpBuffer(Gst.Buffer buf) { + gst_util_dump_buffer(buf == null ? IntPtr.Zero : buf.Handle); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_dump_mem(byte[] mem, uint size); + + public static void DumpMem(byte[] mem, uint size) { + gst_util_dump_mem(mem, size); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_util_fraction_add(int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d); + + public static bool FractionAdd(int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d) { + bool raw_ret = gst_util_fraction_add(a_n, a_d, b_n, b_d, out res_n, out res_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_util_fraction_compare(int a_n, int a_d, int b_n, int b_d); + + public static int FractionCompare(int a_n, int a_d, int b_n, int b_d) { + int raw_ret = gst_util_fraction_compare(a_n, a_d, b_n, b_d); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_util_fraction_multiply(int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d); + + public static bool FractionMultiply(int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d) { + bool raw_ret = gst_util_fraction_multiply(a_n, a_d, b_n, b_d, out res_n, out res_d); + bool ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_fraction_to_double(int src_n, int src_d, out double dest); + + public static double FractionToDouble(int src_n, int src_d) { + double dest; + gst_util_fraction_to_double(src_n, src_d, out dest); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_gdouble_to_guint64(double value); + + public static ulong GdoubleToGuint64(double value) { + ulong raw_ret = gst_util_gdouble_to_guint64(value); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_util_get_object_array(IntPtr _object, IntPtr name, out IntPtr array); + + public static bool GetObjectArray(GLib.Object _object, string name, out GLib.ValueArray array) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_array; + bool raw_ret = gst_util_get_object_array(_object == null ? IntPtr.Zero : _object.Handle, native_name, out native_array); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + array = new GLib.ValueArray(native_array); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_get_timestamp(); + + public static ulong GetTimestamp() { + ulong raw_ret = gst_util_get_timestamp(); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_util_greatest_common_divisor(int a, int b); + + public static int GreatestCommonDivisor(int a, int b) { + int raw_ret = gst_util_greatest_common_divisor(a, b); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_util_greatest_common_divisor_int64(long a, long b); + + public static long GreatestCommonDivisorInt64(long a, long b) { + long raw_ret = gst_util_greatest_common_divisor_int64(a, b); + long ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_util_group_id_next(); + + public static uint GroupIdNext() { + uint raw_ret = gst_util_group_id_next(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_util_guint64_to_gdouble(ulong value); + + public static double Guint64ToGdouble(ulong value) { + double raw_ret = gst_util_guint64_to_gdouble(value); + double ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_util_seqnum_compare(uint s1, uint s2); + + public static int SeqnumCompare(uint s1, uint s2) { + int raw_ret = gst_util_seqnum_compare(s1, s2); + int ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_util_seqnum_next(); + + public static uint SeqnumNext() { + uint raw_ret = gst_util_seqnum_next(); + uint ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_set_object_arg(IntPtr _object, IntPtr name, IntPtr value); + + public static void SetObjectArg(GLib.Object _object, string name, string value) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); + gst_util_set_object_arg(_object == null ? IntPtr.Zero : _object.Handle, native_name, native_value); + GLib.Marshaller.Free (native_name); + GLib.Marshaller.Free (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_util_set_object_array(IntPtr _object, IntPtr name, IntPtr array); + + public static bool SetObjectArray(GLib.Object _object, string name, GLib.ValueArray array) { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + bool raw_ret = gst_util_set_object_array(_object == null ? IntPtr.Zero : _object.Handle, native_name, array == null ? IntPtr.Zero : array.Handle); + bool ret = raw_ret; + GLib.Marshaller.Free (native_name); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_util_set_value_from_string(IntPtr value, IntPtr value_str); + + public static GLib.Value SetValueFromString(string value_str) { + GLib.Value value; + IntPtr native_value = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_value_str = GLib.Marshaller.StringToPtrGStrdup (value_str); + gst_util_set_value_from_string(native_value, native_value_str); + value = (GLib.Value) Marshal.PtrToStructure (native_value, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + GLib.Marshaller.Free (native_value_str); + return value; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale(ulong val, ulong num, ulong denom); + + public static ulong Uint64Scale(ulong val, ulong num, ulong denom) { + ulong raw_ret = gst_util_uint64_scale(val, num, denom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale_ceil(ulong val, ulong num, ulong denom); + + public static ulong Uint64ScaleCeil(ulong val, ulong num, ulong denom) { + ulong raw_ret = gst_util_uint64_scale_ceil(val, num, denom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale_int(ulong val, int num, int denom); + + public static ulong Uint64ScaleInt(ulong val, int num, int denom) { + ulong raw_ret = gst_util_uint64_scale_int(val, num, denom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale_int_ceil(ulong val, int num, int denom); + + public static ulong Uint64ScaleIntCeil(ulong val, int num, int denom) { + ulong raw_ret = gst_util_uint64_scale_int_ceil(val, num, denom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale_int_round(ulong val, int num, int denom); + + public static ulong Uint64ScaleIntRound(ulong val, int num, int denom) { + ulong raw_ret = gst_util_uint64_scale_int_round(val, num, denom); + ulong ret = raw_ret; + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_util_uint64_scale_round(ulong val, ulong num, ulong denom); + + public static ulong Uint64ScaleRound(ulong val, ulong num, ulong denom) { + ulong raw_ret = gst_util_uint64_scale_round(val, num, denom); + ulong ret = raw_ret; + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/Value.cs b/sources/generated/Gst/Value.cs new file mode 100644 index 0000000000..ca37e5c2f5 --- /dev/null +++ b/sources/generated/Gst/Value.cs @@ -0,0 +1,581 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class Value { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_can_compare(IntPtr value1, IntPtr value2); + + public static bool CanCompare(GLib.Value value1, GLib.Value value2) { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_can_compare(native_value1, native_value2); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_can_intersect(IntPtr value1, IntPtr value2); + + public static bool CanIntersect(GLib.Value value1, GLib.Value value2) { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_can_intersect(native_value1, native_value2); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_can_subtract(IntPtr minuend, IntPtr subtrahend); + + public static bool CanSubtract(GLib.Value minuend, GLib.Value subtrahend) { + IntPtr native_minuend = GLib.Marshaller.StructureToPtrAlloc (minuend); + IntPtr native_subtrahend = GLib.Marshaller.StructureToPtrAlloc (subtrahend); + bool raw_ret = gst_value_can_subtract(native_minuend, native_subtrahend); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_minuend); + Marshal.FreeHGlobal (native_subtrahend); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_can_union(IntPtr value1, IntPtr value2); + + public static bool CanUnion(GLib.Value value1, GLib.Value value2) { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_can_union(native_value1, native_value2); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_compare(IntPtr value1, IntPtr value2); + + public static int Compare(GLib.Value value1, GLib.Value value2) { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + int raw_ret = gst_value_compare(native_value1, native_value2); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_deserialize(IntPtr dest, IntPtr src); + + public static bool Deserialize(out GLib.Value dest, string src) { + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_src = GLib.Marshaller.StringToPtrGStrdup (src); + bool raw_ret = gst_value_deserialize(native_dest, native_src); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_src); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_deserialize_with_pspec(IntPtr dest, IntPtr src, IntPtr pspec); + + public static bool DeserializeWithPspec(out GLib.Value dest, string src, IntPtr pspec) { + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_src = GLib.Marshaller.StringToPtrGStrdup (src); + bool raw_ret = gst_value_deserialize_with_pspec(native_dest, native_src, pspec); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + GLib.Marshaller.Free (native_src); + return ret; + } + + public static bool DeserializeWithPspec(out GLib.Value dest, string src) { + return DeserializeWithPspec (out dest, src, IntPtr.Zero); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_fixate(IntPtr dest, IntPtr src); + + public static bool Fixate(GLib.Value dest, GLib.Value src) { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + bool raw_ret = gst_value_fixate(native_dest, native_src); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_fraction_multiply(IntPtr product, IntPtr factor1, IntPtr factor2); + + public static bool FractionMultiply(GLib.Value product, GLib.Value factor1, GLib.Value factor2) { + IntPtr native_product = GLib.Marshaller.StructureToPtrAlloc (product); + IntPtr native_factor1 = GLib.Marshaller.StructureToPtrAlloc (factor1); + IntPtr native_factor2 = GLib.Marshaller.StructureToPtrAlloc (factor2); + bool raw_ret = gst_value_fraction_multiply(native_product, native_factor1, native_factor2); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_product); + Marshal.FreeHGlobal (native_factor1); + Marshal.FreeHGlobal (native_factor2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_fraction_subtract(IntPtr dest, IntPtr minuend, IntPtr subtrahend); + + public static bool FractionSubtract(GLib.Value dest, GLib.Value minuend, GLib.Value subtrahend) { + IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest); + IntPtr native_minuend = GLib.Marshaller.StructureToPtrAlloc (minuend); + IntPtr native_subtrahend = GLib.Marshaller.StructureToPtrAlloc (subtrahend); + bool raw_ret = gst_value_fraction_subtract(native_dest, native_minuend, native_subtrahend); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_minuend); + Marshal.FreeHGlobal (native_subtrahend); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern ulong gst_value_get_bitmask(IntPtr value); + + public static ulong GetBitmask(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + ulong raw_ret = gst_value_get_bitmask(native_value); + ulong ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_get_caps(IntPtr value); + + public static Gst.Caps GetCaps(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_get_caps(native_value); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), false); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_get_caps_features(IntPtr value); + + public static Gst.CapsFeatures GetCapsFeatures(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_get_caps_features(native_value); + Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_value_get_double_range_max(IntPtr value); + + public static double GetDoubleRangeMax(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + double raw_ret = gst_value_get_double_range_max(native_value); + double ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern double gst_value_get_double_range_min(IntPtr value); + + public static double GetDoubleRangeMin(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + double raw_ret = gst_value_get_double_range_min(native_value); + double ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_value_get_flagset_flags(IntPtr value); + + public static uint GetFlagsetFlags(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + uint raw_ret = gst_value_get_flagset_flags(native_value); + uint ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_value_get_flagset_mask(IntPtr value); + + public static uint GetFlagsetMask(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + uint raw_ret = gst_value_get_flagset_mask(native_value); + uint ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_get_fraction_denominator(IntPtr value); + + public static int GetFractionDenominator(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + int raw_ret = gst_value_get_fraction_denominator(native_value); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_get_fraction_numerator(IntPtr value); + + public static int GetFractionNumerator(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + int raw_ret = gst_value_get_fraction_numerator(native_value); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_get_fraction_range_max(IntPtr value); + + public static GLib.Value GetFractionRangeMax(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_get_fraction_range_max(native_value); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_get_fraction_range_min(IntPtr value); + + public static GLib.Value GetFractionRangeMin(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_get_fraction_range_min(native_value); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_value_get_int64_range_max(IntPtr value); + + public static long GetInt64RangeMax(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + long raw_ret = gst_value_get_int64_range_max(native_value); + long ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_value_get_int64_range_min(IntPtr value); + + public static long GetInt64RangeMin(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + long raw_ret = gst_value_get_int64_range_min(native_value); + long ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern long gst_value_get_int64_range_step(IntPtr value); + + public static long GetInt64RangeStep(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + long raw_ret = gst_value_get_int64_range_step(native_value); + long ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_get_int_range_max(IntPtr value); + + public static int GetIntRangeMax(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + int raw_ret = gst_value_get_int_range_max(native_value); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_get_int_range_min(IntPtr value); + + public static int GetIntRangeMin(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + int raw_ret = gst_value_get_int_range_min(native_value); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern int gst_value_get_int_range_step(IntPtr value); + + public static int GetIntRangeStep(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + int raw_ret = gst_value_get_int_range_step(native_value); + int ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_get_structure(IntPtr value); + + public static Gst.Structure GetStructure(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_get_structure(native_value); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_init_and_copy(IntPtr dest, IntPtr src); + + public static GLib.Value InitAndCopy(GLib.Value src) { + GLib.Value dest; + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src); + gst_value_init_and_copy(native_dest, native_src); + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_src); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_intersect(IntPtr dest, IntPtr value1, IntPtr value2); + + public static bool Intersect(out GLib.Value dest, GLib.Value value1, GLib.Value value2) { + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_intersect(native_dest, native_value1, native_value2); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_is_fixed(IntPtr value); + + public static bool IsFixed(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = gst_value_is_fixed(native_value); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_is_subset(IntPtr value1, IntPtr value2); + + public static bool IsSubset(GLib.Value value1, GLib.Value value2) { + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_is_subset(native_value1, native_value2); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_register(IntPtr table); + + public static void Register(Gst.ValueTable table) { + IntPtr native_table = GLib.Marshaller.StructureToPtrAlloc (table); + gst_value_register(native_table); + Marshal.FreeHGlobal (native_table); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_serialize(IntPtr value); + + public static string Serialize(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_serialize(native_value); + string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_bitmask(IntPtr value, ulong bitmask); + + public static void SetBitmask(GLib.Value value, ulong bitmask) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_bitmask(native_value, bitmask); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_caps(IntPtr value, IntPtr caps); + + public static void SetCaps(GLib.Value value, Gst.Caps caps) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_caps(native_value, caps == null ? IntPtr.Zero : caps.Handle); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_caps_features(IntPtr value, IntPtr features); + + public static void SetCapsFeatures(GLib.Value value, Gst.CapsFeatures features) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_features = GLib.Marshaller.StructureToPtrAlloc (features); + gst_value_set_caps_features(native_value, native_features); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_features); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_double_range(IntPtr value, double start, double end); + + public static void SetDoubleRange(GLib.Value value, double start, double end) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_double_range(native_value, start, end); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_flagset(IntPtr value, uint flags, uint mask); + + public static void SetFlagset(GLib.Value value, uint flags, uint mask) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_flagset(native_value, flags, mask); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_fraction(IntPtr value, int numerator, int denominator); + + public static void SetFraction(GLib.Value value, int numerator, int denominator) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_fraction(native_value, numerator, denominator); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_fraction_range(IntPtr value, IntPtr start, IntPtr end); + + public static void SetFractionRange(GLib.Value value, GLib.Value start, GLib.Value end) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); + IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); + gst_value_set_fraction_range(native_value, native_start, native_end); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_start); + Marshal.FreeHGlobal (native_end); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_fraction_range_full(IntPtr value, int numerator_start, int denominator_start, int numerator_end, int denominator_end); + + public static void SetFractionRangeFull(GLib.Value value, int numerator_start, int denominator_start, int numerator_end, int denominator_end) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_fraction_range_full(native_value, numerator_start, denominator_start, numerator_end, denominator_end); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_int64_range(IntPtr value, long start, long end); + + public static void SetInt64Range(GLib.Value value, long start, long end) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_int64_range(native_value, start, end); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_int64_range_step(IntPtr value, long start, long end, long step); + + public static void SetInt64RangeStep(GLib.Value value, long start, long end, long step) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_int64_range_step(native_value, start, end, step); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_int_range(IntPtr value, int start, int end); + + public static void SetIntRange(GLib.Value value, int start, int end) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_int_range(native_value, start, end); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_int_range_step(IntPtr value, int start, int end, int step); + + public static void SetIntRangeStep(GLib.Value value, int start, int end, int step) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_int_range_step(native_value, start, end, step); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_set_structure(IntPtr value, IntPtr structure); + + public static void SetStructure(GLib.Value value, Gst.Structure structure) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + gst_value_set_structure(native_value, structure == null ? IntPtr.Zero : structure.Handle); + Marshal.FreeHGlobal (native_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_subtract(IntPtr dest, IntPtr minuend, IntPtr subtrahend); + + public static bool Subtract(out GLib.Value dest, GLib.Value minuend, GLib.Value subtrahend) { + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_minuend = GLib.Marshaller.StructureToPtrAlloc (minuend); + IntPtr native_subtrahend = GLib.Marshaller.StructureToPtrAlloc (subtrahend); + bool raw_ret = gst_value_subtract(native_dest, native_minuend, native_subtrahend); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_minuend); + Marshal.FreeHGlobal (native_subtrahend); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_value_union(IntPtr dest, IntPtr value1, IntPtr value2); + + public static bool Union(out GLib.Value dest, GLib.Value value1, GLib.Value value2) { + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + bool raw_ret = gst_value_union(native_dest, native_value1, native_value2); + bool ret = raw_ret; + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return ret; + } + +#endregion + } +} diff --git a/sources/generated/Gst/ValueArray.cs b/sources/generated/Gst/ValueArray.cs new file mode 100644 index 0000000000..f210e7673c --- /dev/null +++ b/sources/generated/Gst/ValueArray.cs @@ -0,0 +1,111 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ValueArray : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_array_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_value_array_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_array_append_and_take_value(IntPtr value, IntPtr append_value); + + public static void AppendAndTakeValue(GLib.Value value, GLib.Value append_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_append_value = GLib.Marshaller.StructureToPtrAlloc (append_value); + gst_value_array_append_and_take_value(native_value, native_append_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_append_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_array_append_value(IntPtr value, IntPtr append_value); + + public static void AppendValue(GLib.Value value, GLib.Value append_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_append_value = GLib.Marshaller.StructureToPtrAlloc (append_value); + gst_value_array_append_value(native_value, native_append_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_append_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_value_array_get_size(IntPtr value); + + public static uint GetSize(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + uint raw_ret = gst_value_array_get_size(native_value); + uint ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_array_get_value(IntPtr value, uint index); + + public static GLib.Value GetValue(GLib.Value value, uint index) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_array_get_value(native_value, index); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_array_init(IntPtr value, uint prealloc); + + public static GLib.Value Init(GLib.Value value, uint prealloc) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_array_init(native_value, prealloc); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_array_prepend_value(IntPtr value, IntPtr prepend_value); + + public static void PrependValue(GLib.Value value, GLib.Value prepend_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_prepend_value = GLib.Marshaller.StructureToPtrAlloc (prepend_value); + gst_value_array_prepend_value(native_value, native_prepend_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_prepend_value); + } + + public ValueArray(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ValueCompareFunc.cs b/sources/generated/Gst/ValueCompareFunc.cs new file mode 100644 index 0000000000..8d8cb21821 --- /dev/null +++ b/sources/generated/Gst/ValueCompareFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate int ValueCompareFunc(GLib.Value value1, GLib.Value value2); + +} diff --git a/sources/generated/Gst/ValueDeserializeFunc.cs b/sources/generated/Gst/ValueDeserializeFunc.cs new file mode 100644 index 0000000000..ce8b0e304f --- /dev/null +++ b/sources/generated/Gst/ValueDeserializeFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ValueDeserializeFunc(GLib.Value dest, string s); + +} diff --git a/sources/generated/Gst/ValueDeserializeWithPSpecFunc.cs b/sources/generated/Gst/ValueDeserializeWithPSpecFunc.cs new file mode 100644 index 0000000000..328a472711 --- /dev/null +++ b/sources/generated/Gst/ValueDeserializeWithPSpecFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate bool ValueDeserializeWithPSpecFunc(GLib.Value dest, string s, IntPtr pspec); + +} diff --git a/sources/generated/Gst/ValueList.cs b/sources/generated/Gst/ValueList.cs new file mode 100644 index 0000000000..d586e96597 --- /dev/null +++ b/sources/generated/Gst/ValueList.cs @@ -0,0 +1,143 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + public partial class ValueList : GLib.Opaque { + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_list_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_value_list_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_list_append_and_take_value(IntPtr value, IntPtr append_value); + + public static void AppendAndTakeValue(GLib.Value value, GLib.Value append_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_append_value = GLib.Marshaller.StructureToPtrAlloc (append_value); + gst_value_list_append_and_take_value(native_value, native_append_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_append_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_list_append_value(IntPtr value, IntPtr append_value); + + public static void AppendValue(GLib.Value value, GLib.Value append_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_append_value = GLib.Marshaller.StructureToPtrAlloc (append_value); + gst_value_list_append_value(native_value, native_append_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_append_value); + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_list_concat(IntPtr dest, IntPtr value1, IntPtr value2); + + public static GLib.Value Concat(GLib.Value value1, GLib.Value value2) { + GLib.Value dest; + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + gst_value_list_concat(native_dest, native_value1, native_value2); + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern uint gst_value_list_get_size(IntPtr value); + + public static uint GetSize(GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + uint raw_ret = gst_value_list_get_size(native_value); + uint ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_list_get_value(IntPtr value, uint index); + + public static GLib.Value GetValue(GLib.Value value, uint index) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_list_get_value(native_value, index); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_value_list_init(IntPtr value, uint prealloc); + + public static GLib.Value Init(GLib.Value value, uint prealloc) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr raw_ret = gst_value_list_init(native_value, prealloc); + GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_value); + return ret; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_list_merge(IntPtr dest, IntPtr value1, IntPtr value2); + + public static GLib.Value Merge(GLib.Value value1, GLib.Value value2) { + GLib.Value dest; + IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); + IntPtr native_value1 = GLib.Marshaller.StructureToPtrAlloc (value1); + IntPtr native_value2 = GLib.Marshaller.StructureToPtrAlloc (value2); + gst_value_list_merge(native_dest, native_value1, native_value2); + dest = (GLib.Value) Marshal.PtrToStructure (native_dest, typeof (GLib.Value)); + Marshal.FreeHGlobal (native_dest); + Marshal.FreeHGlobal (native_value1); + Marshal.FreeHGlobal (native_value2); + return dest; + } + + [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_value_list_prepend_value(IntPtr value, IntPtr prepend_value); + + public static void PrependValue(GLib.Value value, GLib.Value prepend_value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + IntPtr native_prepend_value = GLib.Marshaller.StructureToPtrAlloc (prepend_value); + gst_value_list_prepend_value(native_value, native_prepend_value); + Marshal.FreeHGlobal (native_value); + Marshal.FreeHGlobal (native_prepend_value); + } + + public ValueList(IntPtr raw) : base(raw) {} + + + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (new List{ + }); + + return _abi_info; + } + } + + + // End of the ABI representation. + +#endregion + } +} diff --git a/sources/generated/Gst/ValueSerializeFunc.cs b/sources/generated/Gst/ValueSerializeFunc.cs new file mode 100644 index 0000000000..d167661b5e --- /dev/null +++ b/sources/generated/Gst/ValueSerializeFunc.cs @@ -0,0 +1,10 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + + public delegate string ValueSerializeFunc(GLib.Value value1); + +} diff --git a/sources/generated/Gst/ValueTable.cs b/sources/generated/Gst/ValueTable.cs new file mode 100644 index 0000000000..e0325167c1 --- /dev/null +++ b/sources/generated/Gst/ValueTable.cs @@ -0,0 +1,71 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct ValueTable : IEquatable { + + public GLib.GType Type; + private GstSharp.ValueCompareFuncNative _compare; + public Gst.ValueCompareFunc Compare { + get { + return GstSharp.ValueCompareFuncWrapper.GetManagedDelegate (_compare); + } + } + private GstSharp.ValueSerializeFuncNative _serialize; + public Gst.ValueSerializeFunc Serialize { + get { + return GstSharp.ValueSerializeFuncWrapper.GetManagedDelegate (_serialize); + } + } + private GstSharp.ValueDeserializeFuncNative _deserialize; + public Gst.ValueDeserializeFunc Deserialize { + get { + return GstSharp.ValueDeserializeFuncWrapper.GetManagedDelegate (_deserialize); + } + } + private GstSharp.ValueDeserializeWithPSpecFuncNative _deserialize_with_pspec; + public Gst.ValueDeserializeWithPSpecFunc DeserializeWithPspec { + get { + return GstSharp.ValueDeserializeWithPSpecFuncWrapper.GetManagedDelegate (_deserialize_with_pspec); + } + } + [MarshalAs (UnmanagedType.ByValArray, SizeConst=3)] + private IntPtr[] _gstGstReserved; + + public static Gst.ValueTable Zero = new Gst.ValueTable (); + + public static Gst.ValueTable New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.ValueTable.Zero; + return (Gst.ValueTable) Marshal.PtrToStructure (raw, typeof (Gst.ValueTable)); + } + + public bool Equals (ValueTable other) + { + return true && Type.Equals (other.Type) && Compare.Equals (other.Compare) && Serialize.Equals (other.Serialize) && Deserialize.Equals (other.Deserialize) && DeserializeWithPspec.Equals (other.DeserializeWithPspec); + } + + public override bool Equals (object other) + { + return other is ValueTable && Equals ((ValueTable) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Compare.GetHashCode () ^ Serialize.GetHashCode () ^ Deserialize.GetHashCode () ^ DeserializeWithPspec.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/GtkSharp/ObjectManager.cs b/sources/generated/GtkSharp/ObjectManager.cs new file mode 100644 index 0000000000..beada7d0cb --- /dev/null +++ b/sources/generated/GtkSharp/ObjectManager.cs @@ -0,0 +1,83 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace GtkSharp.GstreamerSharp { + + public class ObjectManager { + + static bool initialized = false; + // Call this method from the appropriate module init function. + public static void Initialize () + { + if (initialized) + return; + + initialized = true; + GLib.GType.Register (Gst.App.AppSink.GType, typeof (Gst.App.AppSink)); + GLib.GType.Register (Gst.App.AppSrc.GType, typeof (Gst.App.AppSrc)); + GLib.GType.Register (Gst.Audio.AudioBaseSink.GType, typeof (Gst.Audio.AudioBaseSink)); + GLib.GType.Register (Gst.Audio.AudioBaseSrc.GType, typeof (Gst.Audio.AudioBaseSrc)); + GLib.GType.Register (Gst.Audio.AudioCdSrc.GType, typeof (Gst.Audio.AudioCdSrc)); + GLib.GType.Register (Gst.Audio.AudioClock.GType, typeof (Gst.Audio.AudioClock)); + GLib.GType.Register (Gst.Audio.AudioDecoder.GType, typeof (Gst.Audio.AudioDecoder)); + GLib.GType.Register (Gst.Audio.AudioEncoder.GType, typeof (Gst.Audio.AudioEncoder)); + GLib.GType.Register (Gst.Audio.AudioFilter.GType, typeof (Gst.Audio.AudioFilter)); + GLib.GType.Register (Gst.Audio.AudioRingBuffer.GType, typeof (Gst.Audio.AudioRingBuffer)); + GLib.GType.Register (Gst.Audio.AudioSink.GType, typeof (Gst.Audio.AudioSink)); + GLib.GType.Register (Gst.Audio.AudioSrc.GType, typeof (Gst.Audio.AudioSrc)); + GLib.GType.Register (Gst.Base.Adapter.GType, typeof (Gst.Base.Adapter)); + GLib.GType.Register (Gst.Base.Aggregator.GType, typeof (Gst.Base.Aggregator)); + GLib.GType.Register (Gst.Base.AggregatorPad.GType, typeof (Gst.Base.AggregatorPad)); + GLib.GType.Register (Gst.Base.BaseParse.GType, typeof (Gst.Base.BaseParse)); + GLib.GType.Register (Gst.Base.BaseSink.GType, typeof (Gst.Base.BaseSink)); + GLib.GType.Register (Gst.Base.BaseSrc.GType, typeof (Gst.Base.BaseSrc)); + GLib.GType.Register (Gst.Base.BaseTransform.GType, typeof (Gst.Base.BaseTransform)); + GLib.GType.Register (Gst.Base.CollectPads.GType, typeof (Gst.Base.CollectPads)); + GLib.GType.Register (Gst.Base.DataQueue.GType, typeof (Gst.Base.DataQueue)); + GLib.GType.Register (Gst.Base.PushSrc.GType, typeof (Gst.Base.PushSrc)); + GLib.GType.Register (Gst.Controller.ARGBControlBinding.GType, typeof (Gst.Controller.ARGBControlBinding)); + GLib.GType.Register (Gst.Controller.DirectControlBinding.GType, typeof (Gst.Controller.DirectControlBinding)); + GLib.GType.Register (Gst.Controller.InterpolationControlSource.GType, typeof (Gst.Controller.InterpolationControlSource)); + GLib.GType.Register (Gst.Controller.LFOControlSource.GType, typeof (Gst.Controller.LFOControlSource)); + GLib.GType.Register (Gst.Controller.ProxyControlBinding.GType, typeof (Gst.Controller.ProxyControlBinding)); + GLib.GType.Register (Gst.Controller.TimedValueControlSource.GType, typeof (Gst.Controller.TimedValueControlSource)); + GLib.GType.Register (Gst.Controller.TriggerControlSource.GType, typeof (Gst.Controller.TriggerControlSource)); + GLib.GType.Register (Gst.Net.NetClientClock.GType, typeof (Gst.Net.NetClientClock)); + GLib.GType.Register (Gst.Net.NetTimeProvider.GType, typeof (Gst.Net.NetTimeProvider)); + GLib.GType.Register (Gst.Net.PtpClock.GType, typeof (Gst.Net.PtpClock)); + GLib.GType.Register (Gst.PbUtils.AudioVisualizer.GType, typeof (Gst.PbUtils.AudioVisualizer)); + GLib.GType.Register (Gst.PbUtils.Discoverer.GType, typeof (Gst.PbUtils.Discoverer)); + GLib.GType.Register (Gst.PbUtils.DiscovererAudioInfo.GType, typeof (Gst.PbUtils.DiscovererAudioInfo)); + GLib.GType.Register (Gst.PbUtils.DiscovererContainerInfo.GType, typeof (Gst.PbUtils.DiscovererContainerInfo)); + GLib.GType.Register (Gst.PbUtils.DiscovererInfo.GType, typeof (Gst.PbUtils.DiscovererInfo)); + GLib.GType.Register (Gst.PbUtils.DiscovererStreamInfo.GType, typeof (Gst.PbUtils.DiscovererStreamInfo)); + GLib.GType.Register (Gst.PbUtils.DiscovererSubtitleInfo.GType, typeof (Gst.PbUtils.DiscovererSubtitleInfo)); + GLib.GType.Register (Gst.PbUtils.DiscovererVideoInfo.GType, typeof (Gst.PbUtils.DiscovererVideoInfo)); + GLib.GType.Register (Gst.PbUtils.EncodingAudioProfile.GType, typeof (Gst.PbUtils.EncodingAudioProfile)); + GLib.GType.Register (Gst.PbUtils.EncodingContainerProfile.GType, typeof (Gst.PbUtils.EncodingContainerProfile)); + GLib.GType.Register (Gst.PbUtils.EncodingProfile.GType, typeof (Gst.PbUtils.EncodingProfile)); + GLib.GType.Register (Gst.PbUtils.EncodingTarget.GType, typeof (Gst.PbUtils.EncodingTarget)); + GLib.GType.Register (Gst.PbUtils.EncodingVideoProfile.GType, typeof (Gst.PbUtils.EncodingVideoProfile)); + GLib.GType.Register (Gst.Rtp.RTPBaseAudioPayload.GType, typeof (Gst.Rtp.RTPBaseAudioPayload)); + GLib.GType.Register (Gst.Rtp.RTPBaseDepayload.GType, typeof (Gst.Rtp.RTPBaseDepayload)); + GLib.GType.Register (Gst.Rtp.RTPBasePayload.GType, typeof (Gst.Rtp.RTPBasePayload)); + GLib.GType.Register (Gst.Tags.TagDemux.GType, typeof (Gst.Tags.TagDemux)); + GLib.GType.Register (Gst.Tags.TagMux.GType, typeof (Gst.Tags.TagMux)); + GLib.GType.Register (Gst.Video.ColorBalanceChannel.GType, typeof (Gst.Video.ColorBalanceChannel)); + GLib.GType.Register (Gst.Video.VideoAggregator.GType, typeof (Gst.Video.VideoAggregator)); + GLib.GType.Register (Gst.Video.VideoAggregatorConvertPad.GType, typeof (Gst.Video.VideoAggregatorConvertPad)); + GLib.GType.Register (Gst.Video.VideoAggregatorPad.GType, typeof (Gst.Video.VideoAggregatorPad)); + GLib.GType.Register (Gst.Video.VideoBufferPool.GType, typeof (Gst.Video.VideoBufferPool)); + GLib.GType.Register (Gst.Video.VideoDecoder.GType, typeof (Gst.Video.VideoDecoder)); + GLib.GType.Register (Gst.Video.VideoEncoder.GType, typeof (Gst.Video.VideoEncoder)); + GLib.GType.Register (Gst.Video.VideoFilter.GType, typeof (Gst.Video.VideoFilter)); + GLib.GType.Register (Gst.Video.VideoSink.GType, typeof (Gst.Video.VideoSink)); + GLib.GType.Register (Gst.WebRTC.WebRTCDTLSTransport.GType, typeof (Gst.WebRTC.WebRTCDTLSTransport)); + GLib.GType.Register (Gst.WebRTC.WebRTCDataChannel.GType, typeof (Gst.WebRTC.WebRTCDataChannel)); + GLib.GType.Register (Gst.WebRTC.WebRTCICETransport.GType, typeof (Gst.WebRTC.WebRTCICETransport)); + GLib.GType.Register (Gst.WebRTC.WebRTCRTPReceiver.GType, typeof (Gst.WebRTC.WebRTCRTPReceiver)); + GLib.GType.Register (Gst.WebRTC.WebRTCRTPSender.GType, typeof (Gst.WebRTC.WebRTCRTPSender)); + GLib.GType.Register (Gst.WebRTC.WebRTCRTPTransceiver.GType, typeof (Gst.WebRTC.WebRTCRTPTransceiver)); + } + } +} diff --git a/sources/generated/gstreamer-sharp-abi.c b/sources/generated/gstreamer-sharp-abi.c new file mode 100644 index 0000000000..1124f91ea5 --- /dev/null +++ b/sources/generated/gstreamer-sharp-abi.c @@ -0,0 +1,985 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) { + g_print("\"sizeof(GstAllocatorClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAllocatorClass)); + g_print("\"GstAllocatorClass.alloc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocatorClass, alloc)); + g_print("\"GstAllocatorClass.free\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocatorClass, free)); + g_print("\"sizeof(GstAllocator)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAllocator)); + g_print("\"GstAllocator.mem_type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_type)); + g_print("\"GstAllocator.mem_map\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_map)); + g_print("\"GstAllocator.mem_unmap\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_unmap)); + g_print("\"GstAllocator.mem_copy\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_copy)); + g_print("\"GstAllocator.mem_share\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_share)); + g_print("\"GstAllocator.mem_is_span\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_is_span)); + g_print("\"GstAllocator.mem_map_full\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_map_full)); + g_print("\"GstAllocator.mem_unmap_full\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, mem_unmap_full)); + g_print("\"GstAllocator.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAllocator, priv)); + g_print("\"sizeof(GstBinClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBinClass)); + g_print("\"GstBinClass.pool\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, pool)); + g_print("\"GstBinClass.element_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, element_added)); + g_print("\"GstBinClass.element_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, element_removed)); + g_print("\"GstBinClass.add_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, add_element)); + g_print("\"GstBinClass.remove_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, remove_element)); + g_print("\"GstBinClass.handle_message\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, handle_message)); + g_print("\"GstBinClass.do_latency\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, do_latency)); + g_print("\"GstBinClass.deep_element_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, deep_element_added)); + g_print("\"GstBinClass.deep_element_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBinClass, deep_element_removed)); + g_print("\"sizeof(GstBin)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBin)); + g_print("\"GstBin.numchildren\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, numchildren)); + g_print("\"GstBin.children\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, children)); + g_print("\"GstBin.children_cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, children_cookie)); + g_print("\"GstBin.child_bus\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, child_bus)); + g_print("\"GstBin.messages\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, messages)); + g_print("\"GstBin.polling\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, polling)); + g_print("\"GstBin.state_dirty\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, state_dirty)); + g_print("\"GstBin.clock_dirty\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, clock_dirty)); + g_print("\"GstBin.provided_clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, provided_clock)); + g_print("\"GstBin.clock_provider\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, clock_provider)); + g_print("\"GstBin.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBin, priv)); + g_print("\"sizeof(GstBufferPoolClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBufferPoolClass)); + g_print("\"GstBufferPoolClass.get_options\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, get_options)); + g_print("\"GstBufferPoolClass.set_config\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, set_config)); + g_print("\"GstBufferPoolClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, start)); + g_print("\"GstBufferPoolClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, stop)); + g_print("\"GstBufferPoolClass.acquire_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, acquire_buffer)); + g_print("\"GstBufferPoolClass.alloc_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, alloc_buffer)); + g_print("\"GstBufferPoolClass.reset_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, reset_buffer)); + g_print("\"GstBufferPoolClass.release_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, release_buffer)); + g_print("\"GstBufferPoolClass.free_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, free_buffer)); + g_print("\"GstBufferPoolClass.flush_start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, flush_start)); + g_print("\"GstBufferPoolClass.flush_stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPoolClass, flush_stop)); + g_print("\"sizeof(GstBufferPool)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBufferPool)); + g_print("\"GstBufferPool.flushing\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPool, flushing)); + g_print("\"GstBufferPool.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBufferPool, priv)); + g_print("\"sizeof(GstBusClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBusClass)); + g_print("\"GstBusClass.message\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBusClass, message)); + g_print("\"GstBusClass.sync_message\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBusClass, sync_message)); + g_print("\"sizeof(GstBus)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBus)); + g_print("\"GstBus.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBus, priv)); + g_print("\"sizeof(GstClockClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstClockClass)); + g_print("\"GstClockClass.change_resolution\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, change_resolution)); + g_print("\"GstClockClass.get_resolution\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, get_resolution)); + g_print("\"GstClockClass.get_internal_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, get_internal_time)); + g_print("\"GstClockClass.wait\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, wait)); + g_print("\"GstClockClass.wait_async\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, wait_async)); + g_print("\"GstClockClass.unschedule\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockClass, unschedule)); + g_print("\"sizeof(GstClock)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstClock)); + g_print("\"GstClock.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClock, priv)); + g_print("\"sizeof(GstControlBindingClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstControlBindingClass)); + g_print("\"GstControlBindingClass.sync_values\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBindingClass, sync_values)); + g_print("\"GstControlBindingClass.get_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBindingClass, get_value)); + g_print("\"GstControlBindingClass.get_value_array\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBindingClass, get_value_array)); + g_print("\"GstControlBindingClass.get_g_value_array\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBindingClass, get_g_value_array)); + g_print("\"sizeof(GstControlBinding)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstControlBinding)); + g_print("\"GstControlBinding.name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBinding, name)); + g_print("\"GstControlBinding.pspec\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBinding, pspec)); + g_print("\"GstControlBinding.object\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBinding, object)); + g_print("\"GstControlBinding.disabled\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlBinding, disabled)); + g_print("\"sizeof(GstControlSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstControlSourceClass)); + g_print("\"sizeof(GstControlSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstControlSource)); + g_print("\"GstControlSource.get_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlSource, get_value)); + g_print("\"GstControlSource.get_value_array\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstControlSource, get_value_array)); + g_print("\"sizeof(GstDeviceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDeviceClass)); + g_print("\"GstDeviceClass.create_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceClass, create_element)); + g_print("\"GstDeviceClass.reconfigure_element\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceClass, reconfigure_element)); + g_print("\"sizeof(GstDevice)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDevice)); + g_print("\"GstDevice.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDevice, priv)); + g_print("\"sizeof(GstDeviceMonitorClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDeviceMonitorClass)); + g_print("\"sizeof(GstDeviceMonitor)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDeviceMonitor)); + g_print("\"GstDeviceMonitor.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceMonitor, priv)); + g_print("\"sizeof(GstDeviceProviderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDeviceProviderClass)); + g_print("\"GstDeviceProviderClass.factory\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProviderClass, factory)); + g_print("\"GstDeviceProviderClass.probe\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProviderClass, probe)); + g_print("\"GstDeviceProviderClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProviderClass, start)); + g_print("\"GstDeviceProviderClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProviderClass, stop)); + g_print("\"GstDeviceProviderClass.metadata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProviderClass, metadata)); + g_print("\"sizeof(GstDeviceProvider)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDeviceProvider)); + g_print("\"GstDeviceProvider.devices\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProvider, devices)); + g_print("\"GstDeviceProvider.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDeviceProvider, priv)); + g_print("\"sizeof(GstElementClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstElementClass)); + g_print("\"GstElementClass.metadata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, metadata)); + g_print("\"GstElementClass.elementfactory\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, elementfactory)); + g_print("\"GstElementClass.padtemplates\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, padtemplates)); + g_print("\"GstElementClass.numpadtemplates\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, numpadtemplates)); + g_print("\"GstElementClass.pad_templ_cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, pad_templ_cookie)); + g_print("\"GstElementClass.pad_added\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, pad_added)); + g_print("\"GstElementClass.pad_removed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, pad_removed)); + g_print("\"GstElementClass.no_more_pads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, no_more_pads)); + g_print("\"GstElementClass.request_new_pad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, request_new_pad)); + g_print("\"GstElementClass.release_pad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, release_pad)); + g_print("\"GstElementClass.get_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, get_state)); + g_print("\"GstElementClass.set_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, set_state)); + g_print("\"GstElementClass.change_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, change_state)); + g_print("\"GstElementClass.state_changed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, state_changed)); + g_print("\"GstElementClass.set_bus\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, set_bus)); + g_print("\"GstElementClass.provide_clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, provide_clock)); + g_print("\"GstElementClass.set_clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, set_clock)); + g_print("\"GstElementClass.send_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, send_event)); + g_print("\"GstElementClass.query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, query)); + g_print("\"GstElementClass.post_message\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, post_message)); + g_print("\"GstElementClass.set_context\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElementClass, set_context)); + g_print("\"sizeof(GstElement)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstElement)); + g_print("\"GstElement.state_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, state_lock)); + g_print("\"GstElement.state_cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, state_cond)); + g_print("\"GstElement.state_cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, state_cookie)); + g_print("\"GstElement.target_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, target_state)); + g_print("\"GstElement.current_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, current_state)); + g_print("\"GstElement.next_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, next_state)); + g_print("\"GstElement.pending_state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, pending_state)); + g_print("\"GstElement.last_return\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, last_return)); + g_print("\"GstElement.bus\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, bus)); + g_print("\"GstElement.clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, clock)); + g_print("\"GstElement.base_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, base_time)); + g_print("\"GstElement.start_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, start_time)); + g_print("\"GstElement.numpads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, numpads)); + g_print("\"GstElement.pads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, pads)); + g_print("\"GstElement.numsrcpads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, numsrcpads)); + g_print("\"GstElement.srcpads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, srcpads)); + g_print("\"GstElement.numsinkpads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, numsinkpads)); + g_print("\"GstElement.sinkpads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, sinkpads)); + g_print("\"GstElement.pads_cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, pads_cookie)); + g_print("\"GstElement.contexts\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstElement, contexts)); + g_print("\"sizeof(GstGhostPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstGhostPadClass)); + g_print("\"sizeof(GstGhostPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstGhostPad)); + g_print("\"GstGhostPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstGhostPad, priv)); + g_print("\"sizeof(GstObjectClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstObjectClass)); + g_print("\"GstObjectClass.path_string_separator\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObjectClass, path_string_separator)); + g_print("\"GstObjectClass.deep_notify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObjectClass, deep_notify)); + g_print("\"sizeof(GstObject)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstObject)); + g_print("\"GstObject.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, lock)); + g_print("\"GstObject.name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, name)); + g_print("\"GstObject.parent\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, parent)); + g_print("\"GstObject.flags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, flags)); + g_print("\"GstObject.control_bindings\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, control_bindings)); + g_print("\"GstObject.control_rate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, control_rate)); + g_print("\"GstObject.last_sync\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstObject, last_sync)); + g_print("\"sizeof(GstPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPadClass)); + g_print("\"GstPadClass.linked\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadClass, linked)); + g_print("\"GstPadClass.unlinked\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadClass, unlinked)); + g_print("\"sizeof(GstPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPad)); + g_print("\"GstPad.element_private\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, element_private)); + g_print("\"GstPad.padtemplate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, padtemplate)); + g_print("\"GstPad.direction\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, direction)); + g_print("\"GstPad.stream_rec_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, stream_rec_lock)); + g_print("\"GstPad.task\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, task)); + g_print("\"GstPad.block_cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, block_cond)); + g_print("\"GstPad.probes\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, probes)); + g_print("\"GstPad.mode\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, mode)); + g_print("\"GstPad.activatefunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatefunc)); + g_print("\"GstPad.activatedata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatedata)); + g_print("\"GstPad.activatenotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatenotify)); + g_print("\"GstPad.activatemodefunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatemodefunc)); + g_print("\"GstPad.activatemodedata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatemodedata)); + g_print("\"GstPad.activatemodenotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, activatemodenotify)); + g_print("\"GstPad.peer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, peer)); + g_print("\"GstPad.linkfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, linkfunc)); + g_print("\"GstPad.linkdata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, linkdata)); + g_print("\"GstPad.linknotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, linknotify)); + g_print("\"GstPad.unlinkfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, unlinkfunc)); + g_print("\"GstPad.unlinkdata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, unlinkdata)); + g_print("\"GstPad.unlinknotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, unlinknotify)); + g_print("\"GstPad.chainfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chainfunc)); + g_print("\"GstPad.chaindata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chaindata)); + g_print("\"GstPad.chainnotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chainnotify)); + g_print("\"GstPad.chainlistfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chainlistfunc)); + g_print("\"GstPad.chainlistdata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chainlistdata)); + g_print("\"GstPad.chainlistnotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, chainlistnotify)); + g_print("\"GstPad.getrangefunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, getrangefunc)); + g_print("\"GstPad.getrangedata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, getrangedata)); + g_print("\"GstPad.getrangenotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, getrangenotify)); + g_print("\"GstPad.eventfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, eventfunc)); + g_print("\"GstPad.eventdata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, eventdata)); + g_print("\"GstPad.eventnotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, eventnotify)); + g_print("\"GstPad.offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, offset)); + g_print("\"GstPad.queryfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, queryfunc)); + g_print("\"GstPad.querydata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, querydata)); + g_print("\"GstPad.querynotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, querynotify)); + g_print("\"GstPad.iterintlinkfunc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, iterintlinkfunc)); + g_print("\"GstPad.iterintlinkdata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, iterintlinkdata)); + g_print("\"GstPad.iterintlinknotify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, iterintlinknotify)); + g_print("\"GstPad.num_probes\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, num_probes)); + g_print("\"GstPad.num_blocked\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, num_blocked)); + g_print("\"GstPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPad, priv)); + g_print("\"sizeof(GstPadTemplateClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPadTemplateClass)); + g_print("\"GstPadTemplateClass.pad_created\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadTemplateClass, pad_created)); + g_print("\"sizeof(GstPadTemplate)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPadTemplate)); + g_print("\"GstPadTemplate.name_template\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadTemplate, name_template)); + g_print("\"GstPadTemplate.direction\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadTemplate, direction)); + g_print("\"GstPadTemplate.presence\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadTemplate, presence)); + g_print("\"GstPadTemplate.caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPadTemplate, caps)); + g_print("\"sizeof(GstPipelineClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPipelineClass)); + g_print("\"sizeof(GstPipeline)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPipeline)); + g_print("\"GstPipeline.fixed_clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPipeline, fixed_clock)); + g_print("\"GstPipeline.stream_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPipeline, stream_time)); + g_print("\"GstPipeline.delay\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPipeline, delay)); + g_print("\"GstPipeline.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPipeline, priv)); + g_print("\"sizeof(GstProxyPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstProxyPadClass)); + g_print("\"sizeof(GstProxyPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstProxyPad)); + g_print("\"GstProxyPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstProxyPad, priv)); + g_print("\"sizeof(GstRegistry)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRegistry)); + g_print("\"GstRegistry.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRegistry, priv)); + g_print("\"sizeof(GstSharedTaskPoolClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstSharedTaskPoolClass)); + g_print("\"sizeof(GstSharedTaskPool)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstSharedTaskPool)); + g_print("\"GstSharedTaskPool.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSharedTaskPool, priv)); + g_print("\"sizeof(GstStreamClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstStreamClass)); + g_print("\"sizeof(GstStream)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstStream)); + g_print("\"GstStream.stream_id\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStream, stream_id)); + g_print("\"GstStream.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStream, priv)); + g_print("\"sizeof(GstStreamCollectionClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstStreamCollectionClass)); + g_print("\"GstStreamCollectionClass.stream_notify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStreamCollectionClass, stream_notify)); + g_print("\"sizeof(GstStreamCollection)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstStreamCollection)); + g_print("\"GstStreamCollection.upstream_id\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStreamCollection, upstream_id)); + g_print("\"GstStreamCollection.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStreamCollection, priv)); + g_print("\"sizeof(GstSystemClockClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstSystemClockClass)); + g_print("\"sizeof(GstSystemClock)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstSystemClock)); + g_print("\"GstSystemClock.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSystemClock, priv)); + g_print("\"sizeof(GstTaskClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTaskClass)); + g_print("\"GstTaskClass.pool\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskClass, pool)); + g_print("\"sizeof(GstTask)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTask)); + g_print("\"GstTask.state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, state)); + g_print("\"GstTask.cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, cond)); + g_print("\"GstTask.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, lock)); + g_print("\"GstTask.func\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, func)); + g_print("\"GstTask.user_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, user_data)); + g_print("\"GstTask.notify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, notify)); + g_print("\"GstTask.running\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, running)); + g_print("\"GstTask.thread\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, thread)); + g_print("\"GstTask.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTask, priv)); + g_print("\"sizeof(GstTaskPoolClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTaskPoolClass)); + g_print("\"GstTaskPoolClass.prepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPoolClass, prepare)); + g_print("\"GstTaskPoolClass.cleanup\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPoolClass, cleanup)); + g_print("\"GstTaskPoolClass.push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPoolClass, push)); + g_print("\"GstTaskPoolClass.join\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPoolClass, join)); + g_print("\"GstTaskPoolClass.dispose_handle\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPoolClass, dispose_handle)); + g_print("\"sizeof(GstTaskPool)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTaskPool)); + g_print("\"GstTaskPool.pool\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTaskPool, pool)); + g_print("\"sizeof(GstTracerClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTracerClass)); + g_print("\"sizeof(GstTracer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTracer)); + g_print("\"GstTracer.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTracer, priv)); + g_print("\"sizeof(GstBuffer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBuffer)); + g_print("\"GstBuffer.pool\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, pool)); + g_print("\"GstBuffer.pts\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, pts)); + g_print("\"GstBuffer.dts\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, dts)); + g_print("\"GstBuffer.duration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, duration)); + g_print("\"GstBuffer.offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, offset)); + g_print("\"GstBuffer.offset_end\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBuffer, offset_end)); + g_print("\"sizeof(GstClockEntry)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstClockEntry)); + g_print("\"GstClockEntry.refcount\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, refcount)); + g_print("\"GstClockEntry.clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, clock)); + g_print("\"GstClockEntry.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, type)); + g_print("\"GstClockEntry.time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, time)); + g_print("\"GstClockEntry.interval\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, interval)); + g_print("\"GstClockEntry.status\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, status)); + g_print("\"GstClockEntry.func\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, func)); + g_print("\"GstClockEntry.user_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, user_data)); + g_print("\"GstClockEntry.destroy_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, destroy_data)); + g_print("\"GstClockEntry.unscheduled\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, unscheduled)); + g_print("\"GstClockEntry.woken_up\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstClockEntry, woken_up)); + g_print("\"sizeof(GstEvent)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstEvent)); + g_print("\"GstEvent.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstEvent, type)); + g_print("\"GstEvent.timestamp\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstEvent, timestamp)); + g_print("\"GstEvent.seqnum\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstEvent, seqnum)); + g_print("\"sizeof(GstIterator)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstIterator)); + g_print("\"GstIterator.copy\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, copy)); + g_print("\"GstIterator.next\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, next)); + g_print("\"GstIterator.item\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, item)); + g_print("\"GstIterator.resync\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, resync)); + g_print("\"GstIterator.free\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, free)); + g_print("\"GstIterator.pushed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, pushed)); + g_print("\"GstIterator.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, type)); + g_print("\"GstIterator.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, lock)); + g_print("\"GstIterator.cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, cookie)); + g_print("\"GstIterator.master_cookie\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, master_cookie)); + g_print("\"GstIterator.size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstIterator, size)); + g_print("\"sizeof(GstMemory)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstMemory)); + g_print("\"GstMemory.allocator\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, allocator)); + g_print("\"GstMemory.parent\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, parent)); + g_print("\"GstMemory.maxsize\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, maxsize)); + g_print("\"GstMemory.align\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, align)); + g_print("\"GstMemory.offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, offset)); + g_print("\"GstMemory.size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMemory, size)); + g_print("\"sizeof(GstMessage)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstMessage)); + g_print("\"GstMessage.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, type)); + g_print("\"GstMessage.timestamp\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, timestamp)); + g_print("\"GstMessage.src\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, src)); + g_print("\"GstMessage.seqnum\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, seqnum)); + g_print("\"GstMessage.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, lock)); + g_print("\"GstMessage.cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMessage, cond)); + g_print("\"sizeof(GstMiniObject)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstMiniObject)); + g_print("\"GstMiniObject.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, type)); + g_print("\"GstMiniObject.refcount\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, refcount)); + g_print("\"GstMiniObject.lockstate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, lockstate)); + g_print("\"GstMiniObject.flags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, flags)); + g_print("\"GstMiniObject.copy\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, copy)); + g_print("\"GstMiniObject.dispose\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, dispose)); + g_print("\"GstMiniObject.free\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, free)); + g_print("\"GstMiniObject.priv_uint\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, priv_uint)); + g_print("\"GstMiniObject.priv_pointer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMiniObject, priv_pointer)); + g_print("\"sizeof(GstQuery)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstQuery)); + g_print("\"GstQuery.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstQuery, type)); + g_print("\"sizeof(GstStructure)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstStructure)); + g_print("\"GstStructure.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStructure, type)); + g_print("\"GstStructure.name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstStructure, name)); + g_print("\"sizeof(GstTypeFind)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTypeFind)); + g_print("\"GstTypeFind.peek\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTypeFind, peek)); + g_print("\"GstTypeFind.suggest\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTypeFind, suggest)); + g_print("\"GstTypeFind.data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTypeFind, data)); + g_print("\"GstTypeFind.get_length\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTypeFind, get_length)); + g_print("\"sizeof(GstAppSinkClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAppSinkClass)); + g_print("\"GstAppSinkClass.eos\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, eos)); + g_print("\"GstAppSinkClass.new_preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, new_preroll)); + g_print("\"GstAppSinkClass.new_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, new_sample)); + g_print("\"GstAppSinkClass.pull_preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, pull_preroll)); + g_print("\"GstAppSinkClass.pull_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, pull_sample)); + g_print("\"GstAppSinkClass.try_pull_preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, try_pull_preroll)); + g_print("\"GstAppSinkClass.try_pull_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSinkClass, try_pull_sample)); + g_print("\"sizeof(GstAppSink)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAppSink)); + g_print("\"GstAppSink.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSink, priv)); + g_print("\"sizeof(GstAppSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAppSrcClass)); + g_print("\"GstAppSrcClass.need_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, need_data)); + g_print("\"GstAppSrcClass.enough_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, enough_data)); + g_print("\"GstAppSrcClass.seek_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, seek_data)); + g_print("\"GstAppSrcClass.push_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, push_buffer)); + g_print("\"GstAppSrcClass.end_of_stream\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, end_of_stream)); + g_print("\"GstAppSrcClass.push_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, push_sample)); + g_print("\"GstAppSrcClass.push_buffer_list\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrcClass, push_buffer_list)); + g_print("\"sizeof(GstAppSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAppSrc)); + g_print("\"GstAppSrc.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAppSrc, priv)); + g_print("\"sizeof(GstAudioBaseSinkClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioBaseSinkClass)); + g_print("\"GstAudioBaseSinkClass.create_ringbuffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSinkClass, create_ringbuffer)); + g_print("\"GstAudioBaseSinkClass.payload\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSinkClass, payload)); + g_print("\"sizeof(GstAudioBaseSink)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioBaseSink)); + g_print("\"GstAudioBaseSink.ringbuffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, ringbuffer)); + g_print("\"GstAudioBaseSink.buffer_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, buffer_time)); + g_print("\"GstAudioBaseSink.latency_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, latency_time)); + g_print("\"GstAudioBaseSink.next_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, next_sample)); + g_print("\"GstAudioBaseSink.provided_clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, provided_clock)); + g_print("\"GstAudioBaseSink.eos_rendering\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, eos_rendering)); + g_print("\"GstAudioBaseSink.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSink, priv)); + g_print("\"sizeof(GstAudioBaseSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioBaseSrcClass)); + g_print("\"GstAudioBaseSrcClass.create_ringbuffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrcClass, create_ringbuffer)); + g_print("\"sizeof(GstAudioBaseSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioBaseSrc)); + g_print("\"GstAudioBaseSrc.ringbuffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, ringbuffer)); + g_print("\"GstAudioBaseSrc.buffer_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, buffer_time)); + g_print("\"GstAudioBaseSrc.latency_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, latency_time)); + g_print("\"GstAudioBaseSrc.next_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, next_sample)); + g_print("\"GstAudioBaseSrc.clock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, clock)); + g_print("\"GstAudioBaseSrc.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioBaseSrc, priv)); + g_print("\"sizeof(GstAudioCdSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioCdSrcClass)); + g_print("\"GstAudioCdSrcClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioCdSrcClass, open)); + g_print("\"GstAudioCdSrcClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioCdSrcClass, close)); + g_print("\"GstAudioCdSrcClass.read_sector\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioCdSrcClass, read_sector)); + g_print("\"sizeof(GstAudioCdSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioCdSrc)); + g_print("\"GstAudioCdSrc.tags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioCdSrc, tags)); + g_print("\"GstAudioCdSrc.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioCdSrc, priv)); + g_print("\"sizeof(GstAudioClockClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioClockClass)); + g_print("\"sizeof(GstAudioClock)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioClock)); + g_print("\"GstAudioClock.func\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioClock, func)); + g_print("\"GstAudioClock.user_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioClock, user_data)); + g_print("\"GstAudioClock.destroy_notify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioClock, destroy_notify)); + g_print("\"GstAudioClock.last_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioClock, last_time)); + g_print("\"GstAudioClock.time_offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioClock, time_offset)); + g_print("\"sizeof(GstAudioDecoderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioDecoderClass)); + g_print("\"GstAudioDecoderClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, start)); + g_print("\"GstAudioDecoderClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, stop)); + g_print("\"GstAudioDecoderClass.set_format\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, set_format)); + g_print("\"GstAudioDecoderClass.parse\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, parse)); + g_print("\"GstAudioDecoderClass.handle_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, handle_frame)); + g_print("\"GstAudioDecoderClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, flush)); + g_print("\"GstAudioDecoderClass.pre_push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, pre_push)); + g_print("\"GstAudioDecoderClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, sink_event)); + g_print("\"GstAudioDecoderClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, src_event)); + g_print("\"GstAudioDecoderClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, open)); + g_print("\"GstAudioDecoderClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, close)); + g_print("\"GstAudioDecoderClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, negotiate)); + g_print("\"GstAudioDecoderClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, decide_allocation)); + g_print("\"GstAudioDecoderClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, propose_allocation)); + g_print("\"GstAudioDecoderClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, sink_query)); + g_print("\"GstAudioDecoderClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, src_query)); + g_print("\"GstAudioDecoderClass.getcaps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, getcaps)); + g_print("\"GstAudioDecoderClass.transform_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoderClass, transform_meta)); + g_print("\"sizeof(GstAudioDecoder)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioDecoder)); + g_print("\"GstAudioDecoder.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, sinkpad)); + g_print("\"GstAudioDecoder.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, srcpad)); + g_print("\"GstAudioDecoder.stream_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, stream_lock)); + g_print("\"GstAudioDecoder.input_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, input_segment)); + g_print("\"GstAudioDecoder.output_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, output_segment)); + g_print("\"GstAudioDecoder.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioDecoder, priv)); + g_print("\"sizeof(GstAudioEncoderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioEncoderClass)); + g_print("\"GstAudioEncoderClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, start)); + g_print("\"GstAudioEncoderClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, stop)); + g_print("\"GstAudioEncoderClass.set_format\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, set_format)); + g_print("\"GstAudioEncoderClass.handle_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, handle_frame)); + g_print("\"GstAudioEncoderClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, flush)); + g_print("\"GstAudioEncoderClass.pre_push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, pre_push)); + g_print("\"GstAudioEncoderClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, sink_event)); + g_print("\"GstAudioEncoderClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, src_event)); + g_print("\"GstAudioEncoderClass.getcaps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, getcaps)); + g_print("\"GstAudioEncoderClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, open)); + g_print("\"GstAudioEncoderClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, close)); + g_print("\"GstAudioEncoderClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, negotiate)); + g_print("\"GstAudioEncoderClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, decide_allocation)); + g_print("\"GstAudioEncoderClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, propose_allocation)); + g_print("\"GstAudioEncoderClass.transform_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, transform_meta)); + g_print("\"GstAudioEncoderClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, sink_query)); + g_print("\"GstAudioEncoderClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoderClass, src_query)); + g_print("\"sizeof(GstAudioEncoder)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioEncoder)); + g_print("\"GstAudioEncoder.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, sinkpad)); + g_print("\"GstAudioEncoder.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, srcpad)); + g_print("\"GstAudioEncoder.stream_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, stream_lock)); + g_print("\"GstAudioEncoder.input_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, input_segment)); + g_print("\"GstAudioEncoder.output_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, output_segment)); + g_print("\"GstAudioEncoder.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioEncoder, priv)); + g_print("\"sizeof(GstAudioFilterClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioFilterClass)); + g_print("\"GstAudioFilterClass.setup\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioFilterClass, setup)); + g_print("\"sizeof(GstAudioFilter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioFilter)); + g_print("\"GstAudioFilter.info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioFilter, info)); + g_print("\"sizeof(GstAudioRingBufferClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioRingBufferClass)); + g_print("\"GstAudioRingBufferClass.open_device\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, open_device)); + g_print("\"GstAudioRingBufferClass.acquire\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, acquire)); + g_print("\"GstAudioRingBufferClass.release\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, release)); + g_print("\"GstAudioRingBufferClass.close_device\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, close_device)); + g_print("\"GstAudioRingBufferClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, start)); + g_print("\"GstAudioRingBufferClass.pause\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, pause)); + g_print("\"GstAudioRingBufferClass.resume\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, resume)); + g_print("\"GstAudioRingBufferClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, stop)); + g_print("\"GstAudioRingBufferClass.delay\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, delay)); + g_print("\"GstAudioRingBufferClass.activate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, activate)); + g_print("\"GstAudioRingBufferClass.commit\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, commit)); + g_print("\"GstAudioRingBufferClass.clear_all\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferClass, clear_all)); + g_print("\"sizeof(GstAudioRingBuffer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioRingBuffer)); + g_print("\"GstAudioRingBuffer.cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, cond)); + g_print("\"GstAudioRingBuffer.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, open)); + g_print("\"GstAudioRingBuffer.acquired\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, acquired)); + g_print("\"GstAudioRingBuffer.memory\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, memory)); + g_print("\"GstAudioRingBuffer.size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, size)); + g_print("\"GstAudioRingBuffer.timestamps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, timestamps)); + g_print("\"GstAudioRingBuffer.spec\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, spec)); + g_print("\"GstAudioRingBuffer.samples_per_seg\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, samples_per_seg)); + g_print("\"GstAudioRingBuffer.empty_seg\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, empty_seg)); + g_print("\"GstAudioRingBuffer.state\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, state)); + g_print("\"GstAudioRingBuffer.segdone\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, segdone)); + g_print("\"GstAudioRingBuffer.segbase\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, segbase)); + g_print("\"GstAudioRingBuffer.waiting\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, waiting)); + g_print("\"GstAudioRingBuffer.callback\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, callback)); + g_print("\"GstAudioRingBuffer.cb_data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, cb_data)); + g_print("\"GstAudioRingBuffer.need_reorder\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, need_reorder)); + g_print("\"GstAudioRingBuffer.channel_reorder_map\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, channel_reorder_map)); + g_print("\"GstAudioRingBuffer.flushing\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, flushing)); + g_print("\"GstAudioRingBuffer.may_start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, may_start)); + g_print("\"GstAudioRingBuffer.active\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, active)); + g_print("\"GstAudioRingBuffer.cb_data_notify\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBuffer, cb_data_notify)); + g_print("\"sizeof(GstAudioSinkClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioSinkClass)); + g_print("\"GstAudioSinkClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, open)); + g_print("\"GstAudioSinkClass.prepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, prepare)); + g_print("\"GstAudioSinkClass.unprepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, unprepare)); + g_print("\"GstAudioSinkClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, close)); + g_print("\"GstAudioSinkClass.write\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, write)); + g_print("\"GstAudioSinkClass.delay\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, delay)); + g_print("\"GstAudioSinkClass.reset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, reset)); + g_print("\"GstAudioSinkClass.pause\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, pause)); + g_print("\"GstAudioSinkClass.resume\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, resume)); + g_print("\"GstAudioSinkClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, stop)); + g_print("\"GstAudioSinkClass.extension\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSinkClass, extension)); + g_print("\"sizeof(GstAudioSink)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioSink)); + g_print("\"GstAudioSink.thread\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSink, thread)); + g_print("\"sizeof(GstAudioSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioSrcClass)); + g_print("\"GstAudioSrcClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, open)); + g_print("\"GstAudioSrcClass.prepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, prepare)); + g_print("\"GstAudioSrcClass.unprepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, unprepare)); + g_print("\"GstAudioSrcClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, close)); + g_print("\"GstAudioSrcClass.read\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, read)); + g_print("\"GstAudioSrcClass.delay\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, delay)); + g_print("\"GstAudioSrcClass.reset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrcClass, reset)); + g_print("\"sizeof(GstAudioSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioSrc)); + g_print("\"GstAudioSrc.thread\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioSrc, thread)); + g_print("\"sizeof(GstAudioInfo)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioInfo)); + g_print("\"GstAudioInfo.finfo\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, finfo)); + g_print("\"GstAudioInfo.flags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, flags)); + g_print("\"GstAudioInfo.layout\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, layout)); + g_print("\"GstAudioInfo.rate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, rate)); + g_print("\"GstAudioInfo.channels\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, channels)); + g_print("\"GstAudioInfo.bpf\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, bpf)); + g_print("\"GstAudioInfo.position\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioInfo, position)); + g_print("\"sizeof(GstAudioRingBufferSpec)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioRingBufferSpec)); + g_print("\"GstAudioRingBufferSpec.caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, caps)); + g_print("\"GstAudioRingBufferSpec.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, type)); + g_print("\"GstAudioRingBufferSpec.info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, info)); + g_print("\"GstAudioRingBufferSpec.latency_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, latency_time)); + g_print("\"GstAudioRingBufferSpec.buffer_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, buffer_time)); + g_print("\"GstAudioRingBufferSpec.segsize\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, segsize)); + g_print("\"GstAudioRingBufferSpec.segtotal\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, segtotal)); + g_print("\"GstAudioRingBufferSpec.seglatency\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioRingBufferSpec, seglatency)); + g_print("\"sizeof(GstAggregatorClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregatorClass)); + g_print("\"GstAggregatorClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, flush)); + g_print("\"GstAggregatorClass.clip\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, clip)); + g_print("\"GstAggregatorClass.finish_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, finish_buffer)); + g_print("\"GstAggregatorClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, sink_event)); + g_print("\"GstAggregatorClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, sink_query)); + g_print("\"GstAggregatorClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, src_event)); + g_print("\"GstAggregatorClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, src_query)); + g_print("\"GstAggregatorClass.src_activate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, src_activate)); + g_print("\"GstAggregatorClass.aggregate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, aggregate)); + g_print("\"GstAggregatorClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, stop)); + g_print("\"GstAggregatorClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, start)); + g_print("\"GstAggregatorClass.get_next_time\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, get_next_time)); + g_print("\"GstAggregatorClass.create_new_pad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, create_new_pad)); + g_print("\"GstAggregatorClass.update_src_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, update_src_caps)); + g_print("\"GstAggregatorClass.fixate_src_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, fixate_src_caps)); + g_print("\"GstAggregatorClass.negotiated_src_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, negotiated_src_caps)); + g_print("\"GstAggregatorClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, decide_allocation)); + g_print("\"GstAggregatorClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, propose_allocation)); + g_print("\"GstAggregatorClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, negotiate)); + g_print("\"GstAggregatorClass.sink_event_pre_queue\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, sink_event_pre_queue)); + g_print("\"GstAggregatorClass.sink_query_pre_queue\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, sink_query_pre_queue)); + g_print("\"GstAggregatorClass.finish_buffer_list\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, finish_buffer_list)); + g_print("\"GstAggregatorClass.peek_next_sample\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, peek_next_sample)); + g_print("\"sizeof(GstAggregator)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregator)); + g_print("\"GstAggregator.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregator, srcpad)); + g_print("\"GstAggregator.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregator, priv)); + g_print("\"sizeof(GstAggregatorPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregatorPadClass)); + g_print("\"GstAggregatorPadClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorPadClass, flush)); + g_print("\"GstAggregatorPadClass.skip_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorPadClass, skip_buffer)); + g_print("\"sizeof(GstAggregatorPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregatorPad)); + g_print("\"GstAggregatorPad.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorPad, segment)); + g_print("\"GstAggregatorPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorPad, priv)); + g_print("\"sizeof(GstBaseParseClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseParseClass)); + g_print("\"GstBaseParseClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, start)); + g_print("\"GstBaseParseClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, stop)); + g_print("\"GstBaseParseClass.set_sink_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, set_sink_caps)); + g_print("\"GstBaseParseClass.handle_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, handle_frame)); + g_print("\"GstBaseParseClass.pre_push_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, pre_push_frame)); + g_print("\"GstBaseParseClass.convert\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, convert)); + g_print("\"GstBaseParseClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, sink_event)); + g_print("\"GstBaseParseClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, src_event)); + g_print("\"GstBaseParseClass.get_sink_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, get_sink_caps)); + g_print("\"GstBaseParseClass.detect\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, detect)); + g_print("\"GstBaseParseClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, sink_query)); + g_print("\"GstBaseParseClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParseClass, src_query)); + g_print("\"sizeof(GstBaseParse)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseParse)); + g_print("\"GstBaseParse.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParse, sinkpad)); + g_print("\"GstBaseParse.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParse, srcpad)); + g_print("\"GstBaseParse.flags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParse, flags)); + g_print("\"GstBaseParse.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParse, segment)); + g_print("\"GstBaseParse.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseParse, priv)); + g_print("\"sizeof(GstBaseSinkClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseSinkClass)); + g_print("\"GstBaseSinkClass.get_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, get_caps)); + g_print("\"GstBaseSinkClass.set_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, set_caps)); + g_print("\"GstBaseSinkClass.fixate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, fixate)); + g_print("\"GstBaseSinkClass.activate_pull\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, activate_pull)); + g_print("\"GstBaseSinkClass.get_times\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, get_times)); + g_print("\"GstBaseSinkClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, propose_allocation)); + g_print("\"GstBaseSinkClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, start)); + g_print("\"GstBaseSinkClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, stop)); + g_print("\"GstBaseSinkClass.unlock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, unlock)); + g_print("\"GstBaseSinkClass.unlock_stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, unlock_stop)); + g_print("\"GstBaseSinkClass.query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, query)); + g_print("\"GstBaseSinkClass.event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, event)); + g_print("\"GstBaseSinkClass.wait_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, wait_event)); + g_print("\"GstBaseSinkClass.prepare\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, prepare)); + g_print("\"GstBaseSinkClass.prepare_list\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, prepare_list)); + g_print("\"GstBaseSinkClass.preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, preroll)); + g_print("\"GstBaseSinkClass.render\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, render)); + g_print("\"GstBaseSinkClass.render_list\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSinkClass, render_list)); + g_print("\"sizeof(GstBaseSink)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseSink)); + g_print("\"GstBaseSink.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, sinkpad)); + g_print("\"GstBaseSink.pad_mode\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, pad_mode)); + g_print("\"GstBaseSink.offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, offset)); + g_print("\"GstBaseSink.can_activate_pull\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, can_activate_pull)); + g_print("\"GstBaseSink.can_activate_push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, can_activate_push)); + g_print("\"GstBaseSink.preroll_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, preroll_lock)); + g_print("\"GstBaseSink.preroll_cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, preroll_cond)); + g_print("\"GstBaseSink.eos\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, eos)); + g_print("\"GstBaseSink.need_preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, need_preroll)); + g_print("\"GstBaseSink.have_preroll\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, have_preroll)); + g_print("\"GstBaseSink.playing_async\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, playing_async)); + g_print("\"GstBaseSink.have_newsegment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, have_newsegment)); + g_print("\"GstBaseSink.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, segment)); + g_print("\"GstBaseSink.clock_id\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, clock_id)); + g_print("\"GstBaseSink.sync\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, sync)); + g_print("\"GstBaseSink.flushing\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, flushing)); + g_print("\"GstBaseSink.running\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, running)); + g_print("\"GstBaseSink.max_lateness\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, max_lateness)); + g_print("\"GstBaseSink.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSink, priv)); + g_print("\"sizeof(GstBaseSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseSrcClass)); + g_print("\"GstBaseSrcClass.get_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, get_caps)); + g_print("\"GstBaseSrcClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, negotiate)); + g_print("\"GstBaseSrcClass.fixate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, fixate)); + g_print("\"GstBaseSrcClass.set_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, set_caps)); + g_print("\"GstBaseSrcClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, decide_allocation)); + g_print("\"GstBaseSrcClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, start)); + g_print("\"GstBaseSrcClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, stop)); + g_print("\"GstBaseSrcClass.get_times\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, get_times)); + g_print("\"GstBaseSrcClass.get_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, get_size)); + g_print("\"GstBaseSrcClass.is_seekable\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, is_seekable)); + g_print("\"GstBaseSrcClass.prepare_seek_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, prepare_seek_segment)); + g_print("\"GstBaseSrcClass.do_seek\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, do_seek)); + g_print("\"GstBaseSrcClass.unlock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, unlock)); + g_print("\"GstBaseSrcClass.unlock_stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, unlock_stop)); + g_print("\"GstBaseSrcClass.query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, query)); + g_print("\"GstBaseSrcClass.event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, event)); + g_print("\"GstBaseSrcClass.create\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, create)); + g_print("\"GstBaseSrcClass.alloc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, alloc)); + g_print("\"GstBaseSrcClass.fill\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrcClass, fill)); + g_print("\"sizeof(GstBaseSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseSrc)); + g_print("\"GstBaseSrc.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, srcpad)); + g_print("\"GstBaseSrc.live_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, live_lock)); + g_print("\"GstBaseSrc.live_cond\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, live_cond)); + g_print("\"GstBaseSrc.is_live\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, is_live)); + g_print("\"GstBaseSrc.live_running\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, live_running)); + g_print("\"GstBaseSrc.blocksize\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, blocksize)); + g_print("\"GstBaseSrc.can_activate_push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, can_activate_push)); + g_print("\"GstBaseSrc.random_access\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, random_access)); + g_print("\"GstBaseSrc.clock_id\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, clock_id)); + g_print("\"GstBaseSrc.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, segment)); + g_print("\"GstBaseSrc.need_newsegment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, need_newsegment)); + g_print("\"GstBaseSrc.num_buffers\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, num_buffers)); + g_print("\"GstBaseSrc.num_buffers_left\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, num_buffers_left)); + g_print("\"GstBaseSrc.typefind\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, typefind)); + g_print("\"GstBaseSrc.running\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, running)); + g_print("\"GstBaseSrc.pending_seek\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, pending_seek)); + g_print("\"GstBaseSrc.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseSrc, priv)); + g_print("\"sizeof(GstBaseTransformClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseTransformClass)); + g_print("\"GstBaseTransformClass.passthrough_on_same_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, passthrough_on_same_caps)); + g_print("\"GstBaseTransformClass.transform_ip_on_passthrough\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform_ip_on_passthrough)); + g_print("\"GstBaseTransformClass.transform_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform_caps)); + g_print("\"GstBaseTransformClass.fixate_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, fixate_caps)); + g_print("\"GstBaseTransformClass.accept_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, accept_caps)); + g_print("\"GstBaseTransformClass.set_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, set_caps)); + g_print("\"GstBaseTransformClass.query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, query)); + g_print("\"GstBaseTransformClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, decide_allocation)); + g_print("\"GstBaseTransformClass.filter_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, filter_meta)); + g_print("\"GstBaseTransformClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, propose_allocation)); + g_print("\"GstBaseTransformClass.transform_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform_size)); + g_print("\"GstBaseTransformClass.get_unit_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, get_unit_size)); + g_print("\"GstBaseTransformClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, start)); + g_print("\"GstBaseTransformClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, stop)); + g_print("\"GstBaseTransformClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, sink_event)); + g_print("\"GstBaseTransformClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, src_event)); + g_print("\"GstBaseTransformClass.prepare_output_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, prepare_output_buffer)); + g_print("\"GstBaseTransformClass.copy_metadata\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, copy_metadata)); + g_print("\"GstBaseTransformClass.transform_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform_meta)); + g_print("\"GstBaseTransformClass.before_transform\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, before_transform)); + g_print("\"GstBaseTransformClass.transform\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform)); + g_print("\"GstBaseTransformClass.transform_ip\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, transform_ip)); + g_print("\"GstBaseTransformClass.submit_input_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, submit_input_buffer)); + g_print("\"GstBaseTransformClass.generate_output\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransformClass, generate_output)); + g_print("\"sizeof(GstBaseTransform)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstBaseTransform)); + g_print("\"GstBaseTransform.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, sinkpad)); + g_print("\"GstBaseTransform.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, srcpad)); + g_print("\"GstBaseTransform.have_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, have_segment)); + g_print("\"GstBaseTransform.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, segment)); + g_print("\"GstBaseTransform.queued_buf\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, queued_buf)); + g_print("\"GstBaseTransform.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstBaseTransform, priv)); + g_print("\"sizeof(GstCollectPadsClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstCollectPadsClass)); + g_print("\"sizeof(GstCollectPads)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstCollectPads)); + g_print("\"GstCollectPads.data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstCollectPads, data)); + g_print("\"GstCollectPads.stream_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstCollectPads, stream_lock)); + g_print("\"GstCollectPads.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstCollectPads, priv)); + g_print("\"sizeof(GstDataQueueClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDataQueueClass)); + g_print("\"GstDataQueueClass.empty\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDataQueueClass, empty)); + g_print("\"GstDataQueueClass.full\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDataQueueClass, full)); + g_print("\"sizeof(GstDataQueue)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDataQueue)); + g_print("\"GstDataQueue.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDataQueue, priv)); + g_print("\"sizeof(GstPushSrcClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPushSrcClass)); + g_print("\"GstPushSrcClass.create\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPushSrcClass, create)); + g_print("\"GstPushSrcClass.alloc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPushSrcClass, alloc)); + g_print("\"GstPushSrcClass.fill\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPushSrcClass, fill)); + g_print("\"sizeof(GstPushSrc)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPushSrc)); + g_print("\"sizeof(GstByteReader)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstByteReader)); + g_print("\"GstByteReader.data\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstByteReader, data)); + g_print("\"GstByteReader.size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstByteReader, size)); + g_print("\"GstByteReader.byte\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstByteReader, byte)); + g_print("\"sizeof(GstARGBControlBindingClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstARGBControlBindingClass)); + g_print("\"sizeof(GstARGBControlBinding)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstARGBControlBinding)); + g_print("\"GstARGBControlBinding.cs_a\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, cs_a)); + g_print("\"GstARGBControlBinding.cs_r\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, cs_r)); + g_print("\"GstARGBControlBinding.cs_g\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, cs_g)); + g_print("\"GstARGBControlBinding.cs_b\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, cs_b)); + g_print("\"GstARGBControlBinding.cur_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, cur_value)); + g_print("\"GstARGBControlBinding.last_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstARGBControlBinding, last_value)); + g_print("\"sizeof(GstDirectControlBindingClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDirectControlBindingClass)); + g_print("\"sizeof(GstDirectControlBinding)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDirectControlBinding)); + g_print("\"GstDirectControlBinding.cs\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, cs)); + g_print("\"GstDirectControlBinding.cur_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, cur_value)); + g_print("\"GstDirectControlBinding.last_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, last_value)); + g_print("\"GstDirectControlBinding.byte_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, byte_size)); + g_print("\"GstDirectControlBinding.convert_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, convert_value)); + g_print("\"GstDirectControlBinding.convert_g_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDirectControlBinding, convert_g_value)); + g_print("\"sizeof(GstInterpolationControlSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstInterpolationControlSourceClass)); + g_print("\"sizeof(GstInterpolationControlSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstInterpolationControlSource)); + g_print("\"GstInterpolationControlSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstInterpolationControlSource, priv)); + g_print("\"sizeof(GstLFOControlSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstLFOControlSourceClass)); + g_print("\"sizeof(GstLFOControlSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstLFOControlSource)); + g_print("\"GstLFOControlSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstLFOControlSource, priv)); + g_print("\"GstLFOControlSource.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstLFOControlSource, lock)); + g_print("\"sizeof(GstProxyControlBindingClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstProxyControlBindingClass)); + g_print("\"sizeof(GstProxyControlBinding)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstProxyControlBinding)); + g_print("\"GstProxyControlBinding.ref_object\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstProxyControlBinding, ref_object)); + g_print("\"GstProxyControlBinding.property_name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstProxyControlBinding, property_name)); + g_print("\"sizeof(GstTimedValueControlSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTimedValueControlSourceClass)); + g_print("\"sizeof(GstTimedValueControlSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTimedValueControlSource)); + g_print("\"GstTimedValueControlSource.lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTimedValueControlSource, lock)); + g_print("\"GstTimedValueControlSource.values\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTimedValueControlSource, values)); + g_print("\"GstTimedValueControlSource.nvalues\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTimedValueControlSource, nvalues)); + g_print("\"GstTimedValueControlSource.valid_cache\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTimedValueControlSource, valid_cache)); + g_print("\"GstTimedValueControlSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTimedValueControlSource, priv)); + g_print("\"sizeof(GstTriggerControlSourceClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTriggerControlSourceClass)); + g_print("\"sizeof(GstTriggerControlSource)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTriggerControlSource)); + g_print("\"GstTriggerControlSource.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTriggerControlSource, priv)); + g_print("\"sizeof(GstNetClientClockClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstNetClientClockClass)); + g_print("\"sizeof(GstNetClientClock)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstNetClientClock)); + g_print("\"GstNetClientClock.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstNetClientClock, priv)); + g_print("\"sizeof(GstNetTimeProviderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstNetTimeProviderClass)); + g_print("\"sizeof(GstNetTimeProvider)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstNetTimeProvider)); + g_print("\"GstNetTimeProvider.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstNetTimeProvider, priv)); + g_print("\"sizeof(GstPtpClockClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPtpClockClass)); + g_print("\"sizeof(GstPtpClock)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstPtpClock)); + g_print("\"GstPtpClock.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstPtpClock, priv)); + g_print("\"sizeof(GstAudioVisualizerClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioVisualizerClass)); + g_print("\"GstAudioVisualizerClass.setup\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizerClass, setup)); + g_print("\"GstAudioVisualizerClass.render\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizerClass, render)); + g_print("\"GstAudioVisualizerClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizerClass, decide_allocation)); + g_print("\"sizeof(GstAudioVisualizer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAudioVisualizer)); + g_print("\"GstAudioVisualizer.req_spf\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizer, req_spf)); + g_print("\"GstAudioVisualizer.vinfo\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizer, vinfo)); + g_print("\"GstAudioVisualizer.ainfo\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizer, ainfo)); + g_print("\"GstAudioVisualizer.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAudioVisualizer, priv)); + g_print("\"sizeof(GstDiscovererClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDiscovererClass)); + g_print("\"GstDiscovererClass.finished\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscovererClass, finished)); + g_print("\"GstDiscovererClass.starting\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscovererClass, starting)); + g_print("\"GstDiscovererClass.discovered\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscovererClass, discovered)); + g_print("\"GstDiscovererClass.source_setup\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscovererClass, source_setup)); + g_print("\"GstDiscovererClass._reserved\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscovererClass, _reserved)); + g_print("\"sizeof(GstDiscoverer)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstDiscoverer)); + g_print("\"GstDiscoverer.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscoverer, priv)); + g_print("\"GstDiscoverer._reserved\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstDiscoverer, _reserved)); + g_print("\"sizeof(GstRTPBaseAudioPayloadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBaseAudioPayloadClass)); + g_print("\"sizeof(GstRTPBaseAudioPayload)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBaseAudioPayload)); + g_print("\"GstRTPBaseAudioPayload.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseAudioPayload, priv)); + g_print("\"GstRTPBaseAudioPayload.base_ts\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseAudioPayload, base_ts)); + g_print("\"GstRTPBaseAudioPayload.frame_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseAudioPayload, frame_size)); + g_print("\"GstRTPBaseAudioPayload.frame_duration\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseAudioPayload, frame_duration)); + g_print("\"GstRTPBaseAudioPayload.sample_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseAudioPayload, sample_size)); + g_print("\"sizeof(GstRTPBaseDepayloadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBaseDepayloadClass)); + g_print("\"GstRTPBaseDepayloadClass.set_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayloadClass, set_caps)); + g_print("\"GstRTPBaseDepayloadClass.process\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayloadClass, process)); + g_print("\"GstRTPBaseDepayloadClass.packet_lost\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayloadClass, packet_lost)); + g_print("\"GstRTPBaseDepayloadClass.handle_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayloadClass, handle_event)); + g_print("\"GstRTPBaseDepayloadClass.process_rtp_packet\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayloadClass, process_rtp_packet)); + g_print("\"sizeof(GstRTPBaseDepayload)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBaseDepayload)); + g_print("\"GstRTPBaseDepayload.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, sinkpad)); + g_print("\"GstRTPBaseDepayload.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, srcpad)); + g_print("\"GstRTPBaseDepayload.clock_rate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, clock_rate)); + g_print("\"GstRTPBaseDepayload.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, segment)); + g_print("\"GstRTPBaseDepayload.need_newsegment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, need_newsegment)); + g_print("\"GstRTPBaseDepayload.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBaseDepayload, priv)); + g_print("\"sizeof(GstRTPBasePayloadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBasePayloadClass)); + g_print("\"GstRTPBasePayloadClass.get_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, get_caps)); + g_print("\"GstRTPBasePayloadClass.set_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, set_caps)); + g_print("\"GstRTPBasePayloadClass.handle_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, handle_buffer)); + g_print("\"GstRTPBasePayloadClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, sink_event)); + g_print("\"GstRTPBasePayloadClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, src_event)); + g_print("\"GstRTPBasePayloadClass.query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayloadClass, query)); + g_print("\"sizeof(GstRTPBasePayload)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstRTPBasePayload)); + g_print("\"GstRTPBasePayload.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, sinkpad)); + g_print("\"GstRTPBasePayload.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, srcpad)); + g_print("\"GstRTPBasePayload.ts_base\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, ts_base)); + g_print("\"GstRTPBasePayload.seqnum_base\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, seqnum_base)); + g_print("\"GstRTPBasePayload.media\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, media)); + g_print("\"GstRTPBasePayload.encoding_name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, encoding_name)); + g_print("\"GstRTPBasePayload.dynamic\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, dynamic)); + g_print("\"GstRTPBasePayload.clock_rate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, clock_rate)); + g_print("\"GstRTPBasePayload.ts_offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, ts_offset)); + g_print("\"GstRTPBasePayload.timestamp\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, timestamp)); + g_print("\"GstRTPBasePayload.seqnum_offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, seqnum_offset)); + g_print("\"GstRTPBasePayload.seqnum\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, seqnum)); + g_print("\"GstRTPBasePayload.max_ptime\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, max_ptime)); + g_print("\"GstRTPBasePayload.pt\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, pt)); + g_print("\"GstRTPBasePayload.ssrc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, ssrc)); + g_print("\"GstRTPBasePayload.current_ssrc\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, current_ssrc)); + g_print("\"GstRTPBasePayload.mtu\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, mtu)); + g_print("\"GstRTPBasePayload.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, segment)); + g_print("\"GstRTPBasePayload.min_ptime\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, min_ptime)); + g_print("\"GstRTPBasePayload.ptime\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, ptime)); + g_print("\"GstRTPBasePayload.ptime_multiple\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, ptime_multiple)); + g_print("\"GstRTPBasePayload.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstRTPBasePayload, priv)); + g_print("\"sizeof(GstMIKEYMessage)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstMIKEYMessage)); + g_print("\"GstMIKEYMessage.version\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, version)); + g_print("\"GstMIKEYMessage.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, type)); + g_print("\"GstMIKEYMessage.V\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, V)); + g_print("\"GstMIKEYMessage.prf_func\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, prf_func)); + g_print("\"GstMIKEYMessage.CSB_id\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, CSB_id)); + g_print("\"GstMIKEYMessage.map_type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, map_type)); + g_print("\"GstMIKEYMessage.map_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, map_info)); + g_print("\"GstMIKEYMessage.payloads\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYMessage, payloads)); + g_print("\"sizeof(GstMIKEYPayload)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstMIKEYPayload)); + g_print("\"GstMIKEYPayload.type\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYPayload, type)); + g_print("\"GstMIKEYPayload.len\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstMIKEYPayload, len)); + g_print("\"sizeof(GstSDPMessage)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstSDPMessage)); + g_print("\"GstSDPMessage.version\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, version)); + g_print("\"GstSDPMessage.origin\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, origin)); + g_print("\"GstSDPMessage.session_name\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, session_name)); + g_print("\"GstSDPMessage.information\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, information)); + g_print("\"GstSDPMessage.uri\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, uri)); + g_print("\"GstSDPMessage.emails\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, emails)); + g_print("\"GstSDPMessage.phones\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, phones)); + g_print("\"GstSDPMessage.connection\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, connection)); + g_print("\"GstSDPMessage.bandwidths\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, bandwidths)); + g_print("\"GstSDPMessage.times\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, times)); + g_print("\"GstSDPMessage.zones\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, zones)); + g_print("\"GstSDPMessage.key\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, key)); + g_print("\"GstSDPMessage.attributes\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, attributes)); + g_print("\"GstSDPMessage.medias\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstSDPMessage, medias)); + g_print("\"sizeof(GstTagDemuxClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTagDemuxClass)); + g_print("\"GstTagDemuxClass.min_start_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, min_start_size)); + g_print("\"GstTagDemuxClass.min_end_size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, min_end_size)); + g_print("\"GstTagDemuxClass.identify_tag\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, identify_tag)); + g_print("\"GstTagDemuxClass.parse_tag\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, parse_tag)); + g_print("\"GstTagDemuxClass.merge_tags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, merge_tags)); + g_print("\"GstTagDemuxClass.reserved\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemuxClass, reserved)); + g_print("\"sizeof(GstTagDemux)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTagDemux)); + g_print("\"GstTagDemux.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemux, priv)); + g_print("\"GstTagDemux.reserved\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagDemux, reserved)); + g_print("\"sizeof(GstTagMuxClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTagMuxClass)); + g_print("\"GstTagMuxClass.render_start_tag\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagMuxClass, render_start_tag)); + g_print("\"GstTagMuxClass.render_end_tag\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagMuxClass, render_end_tag)); + g_print("\"sizeof(GstTagMux)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstTagMux)); + g_print("\"GstTagMux.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstTagMux, priv)); + g_print("\"sizeof(GstColorBalanceChannelClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstColorBalanceChannelClass)); + g_print("\"GstColorBalanceChannelClass.value_changed\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstColorBalanceChannelClass, value_changed)); + g_print("\"sizeof(GstColorBalanceChannel)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstColorBalanceChannel)); + g_print("\"GstColorBalanceChannel.label\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstColorBalanceChannel, label)); + g_print("\"GstColorBalanceChannel.min_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstColorBalanceChannel, min_value)); + g_print("\"GstColorBalanceChannel.max_value\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstColorBalanceChannel, max_value)); + g_print("\"sizeof(GstVideoAggregatorClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregatorClass)); + g_print("\"GstVideoAggregatorClass.update_caps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorClass, update_caps)); + g_print("\"GstVideoAggregatorClass.aggregate_frames\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorClass, aggregate_frames)); + g_print("\"GstVideoAggregatorClass.create_output_buffer\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorClass, create_output_buffer)); + g_print("\"GstVideoAggregatorClass.find_best_format\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorClass, find_best_format)); + g_print("\"sizeof(GstVideoAggregator)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregator)); + g_print("\"GstVideoAggregator.info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregator, info)); + g_print("\"GstVideoAggregator.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregator, priv)); + g_print("\"sizeof(GstVideoAggregatorConvertPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregatorConvertPadClass)); + g_print("\"GstVideoAggregatorConvertPadClass.create_conversion_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorConvertPadClass, create_conversion_info)); + g_print("\"sizeof(GstVideoAggregatorConvertPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregatorConvertPad)); + g_print("\"GstVideoAggregatorConvertPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorConvertPad, priv)); + g_print("\"sizeof(GstVideoAggregatorPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregatorPadClass)); + g_print("\"GstVideoAggregatorPadClass.update_conversion_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorPadClass, update_conversion_info)); + g_print("\"GstVideoAggregatorPadClass.prepare_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorPadClass, prepare_frame)); + g_print("\"GstVideoAggregatorPadClass.clean_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorPadClass, clean_frame)); + g_print("\"sizeof(GstVideoAggregatorPad)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoAggregatorPad)); + g_print("\"GstVideoAggregatorPad.info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorPad, info)); + g_print("\"GstVideoAggregatorPad.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoAggregatorPad, priv)); + g_print("\"sizeof(GstVideoBufferPool)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoBufferPool)); + g_print("\"GstVideoBufferPool.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoBufferPool, priv)); + g_print("\"sizeof(GstVideoDecoderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoDecoderClass)); + g_print("\"GstVideoDecoderClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, open)); + g_print("\"GstVideoDecoderClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, close)); + g_print("\"GstVideoDecoderClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, start)); + g_print("\"GstVideoDecoderClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, stop)); + g_print("\"GstVideoDecoderClass.parse\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, parse)); + g_print("\"GstVideoDecoderClass.set_format\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, set_format)); + g_print("\"GstVideoDecoderClass.reset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, reset)); + g_print("\"GstVideoDecoderClass.finish\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, finish)); + g_print("\"GstVideoDecoderClass.handle_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, handle_frame)); + g_print("\"GstVideoDecoderClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, sink_event)); + g_print("\"GstVideoDecoderClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, src_event)); + g_print("\"GstVideoDecoderClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, negotiate)); + g_print("\"GstVideoDecoderClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, decide_allocation)); + g_print("\"GstVideoDecoderClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, propose_allocation)); + g_print("\"GstVideoDecoderClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, flush)); + g_print("\"GstVideoDecoderClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, sink_query)); + g_print("\"GstVideoDecoderClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, src_query)); + g_print("\"GstVideoDecoderClass.getcaps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, getcaps)); + g_print("\"GstVideoDecoderClass.drain\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, drain)); + g_print("\"GstVideoDecoderClass.transform_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoderClass, transform_meta)); + g_print("\"sizeof(GstVideoDecoder)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoDecoder)); + g_print("\"GstVideoDecoder.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, sinkpad)); + g_print("\"GstVideoDecoder.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, srcpad)); + g_print("\"GstVideoDecoder.stream_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, stream_lock)); + g_print("\"GstVideoDecoder.input_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, input_segment)); + g_print("\"GstVideoDecoder.output_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, output_segment)); + g_print("\"GstVideoDecoder.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoDecoder, priv)); + g_print("\"sizeof(GstVideoEncoderClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoEncoderClass)); + g_print("\"GstVideoEncoderClass.open\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, open)); + g_print("\"GstVideoEncoderClass.close\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, close)); + g_print("\"GstVideoEncoderClass.start\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, start)); + g_print("\"GstVideoEncoderClass.stop\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, stop)); + g_print("\"GstVideoEncoderClass.set_format\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, set_format)); + g_print("\"GstVideoEncoderClass.handle_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, handle_frame)); + g_print("\"GstVideoEncoderClass.reset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, reset)); + g_print("\"GstVideoEncoderClass.finish\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, finish)); + g_print("\"GstVideoEncoderClass.pre_push\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, pre_push)); + g_print("\"GstVideoEncoderClass.getcaps\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, getcaps)); + g_print("\"GstVideoEncoderClass.sink_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, sink_event)); + g_print("\"GstVideoEncoderClass.src_event\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, src_event)); + g_print("\"GstVideoEncoderClass.negotiate\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, negotiate)); + g_print("\"GstVideoEncoderClass.decide_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, decide_allocation)); + g_print("\"GstVideoEncoderClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, propose_allocation)); + g_print("\"GstVideoEncoderClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, flush)); + g_print("\"GstVideoEncoderClass.sink_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, sink_query)); + g_print("\"GstVideoEncoderClass.src_query\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, src_query)); + g_print("\"GstVideoEncoderClass.transform_meta\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoderClass, transform_meta)); + g_print("\"sizeof(GstVideoEncoder)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoEncoder)); + g_print("\"GstVideoEncoder.sinkpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, sinkpad)); + g_print("\"GstVideoEncoder.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, srcpad)); + g_print("\"GstVideoEncoder.stream_lock\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, stream_lock)); + g_print("\"GstVideoEncoder.input_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, input_segment)); + g_print("\"GstVideoEncoder.output_segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, output_segment)); + g_print("\"GstVideoEncoder.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoEncoder, priv)); + g_print("\"sizeof(GstVideoFilterClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoFilterClass)); + g_print("\"GstVideoFilterClass.set_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilterClass, set_info)); + g_print("\"GstVideoFilterClass.transform_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilterClass, transform_frame)); + g_print("\"GstVideoFilterClass.transform_frame_ip\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilterClass, transform_frame_ip)); + g_print("\"sizeof(GstVideoFilter)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoFilter)); + g_print("\"GstVideoFilter.negotiated\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilter, negotiated)); + g_print("\"GstVideoFilter.in_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilter, in_info)); + g_print("\"GstVideoFilter.out_info\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoFilter, out_info)); + g_print("\"sizeof(GstVideoSinkClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoSinkClass)); + g_print("\"GstVideoSinkClass.show_frame\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoSinkClass, show_frame)); + g_print("\"sizeof(GstVideoSink)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoSink)); + g_print("\"GstVideoSink.width\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoSink, width)); + g_print("\"GstVideoSink.height\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoSink, height)); + g_print("\"GstVideoSink.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoSink, priv)); + g_print("\"sizeof(GstVideoInfo)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstVideoInfo)); + g_print("\"GstVideoInfo.finfo\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, finfo)); + g_print("\"GstVideoInfo.interlace_mode\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, interlace_mode)); + g_print("\"GstVideoInfo.flags\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, flags)); + g_print("\"GstVideoInfo.width\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, width)); + g_print("\"GstVideoInfo.height\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, height)); + g_print("\"GstVideoInfo.size\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, size)); + g_print("\"GstVideoInfo.views\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, views)); + g_print("\"GstVideoInfo.chroma_site\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, chroma_site)); + g_print("\"GstVideoInfo.colorimetry\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, colorimetry)); + g_print("\"GstVideoInfo.par_n\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, par_n)); + g_print("\"GstVideoInfo.par_d\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, par_d)); + g_print("\"GstVideoInfo.fps_n\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, fps_n)); + g_print("\"GstVideoInfo.fps_d\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, fps_d)); + g_print("\"GstVideoInfo.offset\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, offset)); + g_print("\"GstVideoInfo.stride\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstVideoInfo, stride)); + return 0; +} diff --git a/sources/generated/gstreamer-sharp-abi.cs b/sources/generated/gstreamer-sharp-abi.cs new file mode 100644 index 0000000000..7c8eff7630 --- /dev/null +++ b/sources/generated/gstreamer-sharp-abi.cs @@ -0,0 +1,980 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +using Gst; +using Gst.Video; +using Gst.Sdp; +using Gst.Tags; +using Gst.Rtsp; +using Gst.PbUtils; +using Gst.Net; +using Gst.FFT; +using Gst.Controller; +using Gst.Base; +using Gst.Audio; +using Gst.App; +using System; + +namespace AbiTester { + class ___Gst { + public static void Main (string[] args) { + Console.WriteLine("\"sizeof(GstAllocatorClass)\": \"" + Gst.Allocator.class_abi.Size + "\""); + Console.WriteLine("\"GstAllocatorClass.alloc\": \"" + Gst.Allocator.class_abi.GetFieldOffset("alloc") + "\""); + Console.WriteLine("\"GstAllocatorClass.free\": \"" + Gst.Allocator.class_abi.GetFieldOffset("free") + "\""); + Console.WriteLine("\"sizeof(GstAllocator)\": \"" + Gst.Allocator.abi_info.Size + "\""); + Console.WriteLine("\"GstAllocator.mem_type\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_type") + "\""); + Console.WriteLine("\"GstAllocator.mem_map\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_map") + "\""); + Console.WriteLine("\"GstAllocator.mem_unmap\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_unmap") + "\""); + Console.WriteLine("\"GstAllocator.mem_copy\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_copy") + "\""); + Console.WriteLine("\"GstAllocator.mem_share\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_share") + "\""); + Console.WriteLine("\"GstAllocator.mem_is_span\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_is_span") + "\""); + Console.WriteLine("\"GstAllocator.mem_map_full\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_map_full") + "\""); + Console.WriteLine("\"GstAllocator.mem_unmap_full\": \"" + Gst.Allocator.abi_info.GetFieldOffset("mem_unmap_full") + "\""); + Console.WriteLine("\"GstAllocator.priv\": \"" + Gst.Allocator.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBinClass)\": \"" + Gst.Bin.class_abi.Size + "\""); + Console.WriteLine("\"GstBinClass.pool\": \"" + Gst.Bin.class_abi.GetFieldOffset("pool") + "\""); + Console.WriteLine("\"GstBinClass.element_added\": \"" + Gst.Bin.class_abi.GetFieldOffset("element_added") + "\""); + Console.WriteLine("\"GstBinClass.element_removed\": \"" + Gst.Bin.class_abi.GetFieldOffset("element_removed") + "\""); + Console.WriteLine("\"GstBinClass.add_element\": \"" + Gst.Bin.class_abi.GetFieldOffset("add_element") + "\""); + Console.WriteLine("\"GstBinClass.remove_element\": \"" + Gst.Bin.class_abi.GetFieldOffset("remove_element") + "\""); + Console.WriteLine("\"GstBinClass.handle_message\": \"" + Gst.Bin.class_abi.GetFieldOffset("handle_message") + "\""); + Console.WriteLine("\"GstBinClass.do_latency\": \"" + Gst.Bin.class_abi.GetFieldOffset("do_latency") + "\""); + Console.WriteLine("\"GstBinClass.deep_element_added\": \"" + Gst.Bin.class_abi.GetFieldOffset("deep_element_added") + "\""); + Console.WriteLine("\"GstBinClass.deep_element_removed\": \"" + Gst.Bin.class_abi.GetFieldOffset("deep_element_removed") + "\""); + Console.WriteLine("\"sizeof(GstBin)\": \"" + Gst.Bin.abi_info.Size + "\""); + Console.WriteLine("\"GstBin.numchildren\": \"" + Gst.Bin.abi_info.GetFieldOffset("numchildren") + "\""); + Console.WriteLine("\"GstBin.children\": \"" + Gst.Bin.abi_info.GetFieldOffset("children") + "\""); + Console.WriteLine("\"GstBin.children_cookie\": \"" + Gst.Bin.abi_info.GetFieldOffset("children_cookie") + "\""); + Console.WriteLine("\"GstBin.child_bus\": \"" + Gst.Bin.abi_info.GetFieldOffset("child_bus") + "\""); + Console.WriteLine("\"GstBin.messages\": \"" + Gst.Bin.abi_info.GetFieldOffset("messages") + "\""); + Console.WriteLine("\"GstBin.polling\": \"" + Gst.Bin.abi_info.GetFieldOffset("polling") + "\""); + Console.WriteLine("\"GstBin.state_dirty\": \"" + Gst.Bin.abi_info.GetFieldOffset("state_dirty") + "\""); + Console.WriteLine("\"GstBin.clock_dirty\": \"" + Gst.Bin.abi_info.GetFieldOffset("clock_dirty") + "\""); + Console.WriteLine("\"GstBin.provided_clock\": \"" + Gst.Bin.abi_info.GetFieldOffset("provided_clock") + "\""); + Console.WriteLine("\"GstBin.clock_provider\": \"" + Gst.Bin.abi_info.GetFieldOffset("clock_provider") + "\""); + Console.WriteLine("\"GstBin.priv\": \"" + Gst.Bin.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBufferPoolClass)\": \"" + Gst.BufferPool.class_abi.Size + "\""); + Console.WriteLine("\"GstBufferPoolClass.get_options\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("get_options") + "\""); + Console.WriteLine("\"GstBufferPoolClass.set_config\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("set_config") + "\""); + Console.WriteLine("\"GstBufferPoolClass.start\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstBufferPoolClass.stop\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstBufferPoolClass.acquire_buffer\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("acquire_buffer") + "\""); + Console.WriteLine("\"GstBufferPoolClass.alloc_buffer\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("alloc_buffer") + "\""); + Console.WriteLine("\"GstBufferPoolClass.reset_buffer\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("reset_buffer") + "\""); + Console.WriteLine("\"GstBufferPoolClass.release_buffer\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("release_buffer") + "\""); + Console.WriteLine("\"GstBufferPoolClass.free_buffer\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("free_buffer") + "\""); + Console.WriteLine("\"GstBufferPoolClass.flush_start\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("flush_start") + "\""); + Console.WriteLine("\"GstBufferPoolClass.flush_stop\": \"" + Gst.BufferPool.class_abi.GetFieldOffset("flush_stop") + "\""); + Console.WriteLine("\"sizeof(GstBufferPool)\": \"" + Gst.BufferPool.abi_info.Size + "\""); + Console.WriteLine("\"GstBufferPool.flushing\": \"" + Gst.BufferPool.abi_info.GetFieldOffset("flushing") + "\""); + Console.WriteLine("\"GstBufferPool.priv\": \"" + Gst.BufferPool.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBusClass)\": \"" + Gst.Bus.class_abi.Size + "\""); + Console.WriteLine("\"GstBusClass.message\": \"" + Gst.Bus.class_abi.GetFieldOffset("message") + "\""); + Console.WriteLine("\"GstBusClass.sync_message\": \"" + Gst.Bus.class_abi.GetFieldOffset("sync_message") + "\""); + Console.WriteLine("\"sizeof(GstBus)\": \"" + Gst.Bus.abi_info.Size + "\""); + Console.WriteLine("\"GstBus.priv\": \"" + Gst.Bus.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstClockClass)\": \"" + Gst.Clock.class_abi.Size + "\""); + Console.WriteLine("\"GstClockClass.change_resolution\": \"" + Gst.Clock.class_abi.GetFieldOffset("change_resolution") + "\""); + Console.WriteLine("\"GstClockClass.get_resolution\": \"" + Gst.Clock.class_abi.GetFieldOffset("get_resolution") + "\""); + Console.WriteLine("\"GstClockClass.get_internal_time\": \"" + Gst.Clock.class_abi.GetFieldOffset("get_internal_time") + "\""); + Console.WriteLine("\"GstClockClass.wait\": \"" + Gst.Clock.class_abi.GetFieldOffset("wait") + "\""); + Console.WriteLine("\"GstClockClass.wait_async\": \"" + Gst.Clock.class_abi.GetFieldOffset("wait_async") + "\""); + Console.WriteLine("\"GstClockClass.unschedule\": \"" + Gst.Clock.class_abi.GetFieldOffset("unschedule") + "\""); + Console.WriteLine("\"sizeof(GstClock)\": \"" + Gst.Clock.abi_info.Size + "\""); + Console.WriteLine("\"GstClock.priv\": \"" + Gst.Clock.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstControlBindingClass)\": \"" + Gst.ControlBinding.class_abi.Size + "\""); + Console.WriteLine("\"GstControlBindingClass.sync_values\": \"" + Gst.ControlBinding.class_abi.GetFieldOffset("sync_values") + "\""); + Console.WriteLine("\"GstControlBindingClass.get_value\": \"" + Gst.ControlBinding.class_abi.GetFieldOffset("get_value") + "\""); + Console.WriteLine("\"GstControlBindingClass.get_value_array\": \"" + Gst.ControlBinding.class_abi.GetFieldOffset("get_value_array") + "\""); + Console.WriteLine("\"GstControlBindingClass.get_g_value_array\": \"" + Gst.ControlBinding.class_abi.GetFieldOffset("get_g_value_array") + "\""); + Console.WriteLine("\"sizeof(GstControlBinding)\": \"" + Gst.ControlBinding.abi_info.Size + "\""); + Console.WriteLine("\"GstControlBinding.name\": \"" + Gst.ControlBinding.abi_info.GetFieldOffset("name") + "\""); + Console.WriteLine("\"GstControlBinding.pspec\": \"" + Gst.ControlBinding.abi_info.GetFieldOffset("pspec") + "\""); + Console.WriteLine("\"GstControlBinding.object\": \"" + Gst.ControlBinding.abi_info.GetFieldOffset("object") + "\""); + Console.WriteLine("\"GstControlBinding.disabled\": \"" + Gst.ControlBinding.abi_info.GetFieldOffset("disabled") + "\""); + Console.WriteLine("\"sizeof(GstControlSourceClass)\": \"" + Gst.ControlSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstControlSource)\": \"" + Gst.ControlSource.abi_info.Size + "\""); + Console.WriteLine("\"GstControlSource.get_value\": \"" + Gst.ControlSource.abi_info.GetFieldOffset("get_value") + "\""); + Console.WriteLine("\"GstControlSource.get_value_array\": \"" + Gst.ControlSource.abi_info.GetFieldOffset("get_value_array") + "\""); + Console.WriteLine("\"sizeof(GstDeviceClass)\": \"" + Gst.Device.class_abi.Size + "\""); + Console.WriteLine("\"GstDeviceClass.create_element\": \"" + Gst.Device.class_abi.GetFieldOffset("create_element") + "\""); + Console.WriteLine("\"GstDeviceClass.reconfigure_element\": \"" + Gst.Device.class_abi.GetFieldOffset("reconfigure_element") + "\""); + Console.WriteLine("\"sizeof(GstDevice)\": \"" + Gst.Device.abi_info.Size + "\""); + Console.WriteLine("\"GstDevice.priv\": \"" + Gst.Device.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstDeviceMonitorClass)\": \"" + Gst.DeviceMonitor.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstDeviceMonitor)\": \"" + Gst.DeviceMonitor.abi_info.Size + "\""); + Console.WriteLine("\"GstDeviceMonitor.priv\": \"" + Gst.DeviceMonitor.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstDeviceProviderClass)\": \"" + Gst.DeviceProvider.class_abi.Size + "\""); + Console.WriteLine("\"GstDeviceProviderClass.factory\": \"" + Gst.DeviceProvider.class_abi.GetFieldOffset("factory") + "\""); + Console.WriteLine("\"GstDeviceProviderClass.probe\": \"" + Gst.DeviceProvider.class_abi.GetFieldOffset("probe") + "\""); + Console.WriteLine("\"GstDeviceProviderClass.start\": \"" + Gst.DeviceProvider.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstDeviceProviderClass.stop\": \"" + Gst.DeviceProvider.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstDeviceProviderClass.metadata\": \"" + Gst.DeviceProvider.class_abi.GetFieldOffset("metadata") + "\""); + Console.WriteLine("\"sizeof(GstDeviceProvider)\": \"" + Gst.DeviceProvider.abi_info.Size + "\""); + Console.WriteLine("\"GstDeviceProvider.devices\": \"" + Gst.DeviceProvider.abi_info.GetFieldOffset("devices") + "\""); + Console.WriteLine("\"GstDeviceProvider.priv\": \"" + Gst.DeviceProvider.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstElementClass)\": \"" + Gst.Element.class_abi.Size + "\""); + Console.WriteLine("\"GstElementClass.metadata\": \"" + Gst.Element.class_abi.GetFieldOffset("metadata") + "\""); + Console.WriteLine("\"GstElementClass.elementfactory\": \"" + Gst.Element.class_abi.GetFieldOffset("elementfactory") + "\""); + Console.WriteLine("\"GstElementClass.padtemplates\": \"" + Gst.Element.class_abi.GetFieldOffset("padtemplates") + "\""); + Console.WriteLine("\"GstElementClass.numpadtemplates\": \"" + Gst.Element.class_abi.GetFieldOffset("numpadtemplates") + "\""); + Console.WriteLine("\"GstElementClass.pad_templ_cookie\": \"" + Gst.Element.class_abi.GetFieldOffset("pad_templ_cookie") + "\""); + Console.WriteLine("\"GstElementClass.pad_added\": \"" + Gst.Element.class_abi.GetFieldOffset("pad_added") + "\""); + Console.WriteLine("\"GstElementClass.pad_removed\": \"" + Gst.Element.class_abi.GetFieldOffset("pad_removed") + "\""); + Console.WriteLine("\"GstElementClass.no_more_pads\": \"" + Gst.Element.class_abi.GetFieldOffset("no_more_pads") + "\""); + Console.WriteLine("\"GstElementClass.request_new_pad\": \"" + Gst.Element.class_abi.GetFieldOffset("request_new_pad") + "\""); + Console.WriteLine("\"GstElementClass.release_pad\": \"" + Gst.Element.class_abi.GetFieldOffset("release_pad") + "\""); + Console.WriteLine("\"GstElementClass.get_state\": \"" + Gst.Element.class_abi.GetFieldOffset("get_state") + "\""); + Console.WriteLine("\"GstElementClass.set_state\": \"" + Gst.Element.class_abi.GetFieldOffset("set_state") + "\""); + Console.WriteLine("\"GstElementClass.change_state\": \"" + Gst.Element.class_abi.GetFieldOffset("change_state") + "\""); + Console.WriteLine("\"GstElementClass.state_changed\": \"" + Gst.Element.class_abi.GetFieldOffset("state_changed") + "\""); + Console.WriteLine("\"GstElementClass.set_bus\": \"" + Gst.Element.class_abi.GetFieldOffset("set_bus") + "\""); + Console.WriteLine("\"GstElementClass.provide_clock\": \"" + Gst.Element.class_abi.GetFieldOffset("provide_clock") + "\""); + Console.WriteLine("\"GstElementClass.set_clock\": \"" + Gst.Element.class_abi.GetFieldOffset("set_clock") + "\""); + Console.WriteLine("\"GstElementClass.send_event\": \"" + Gst.Element.class_abi.GetFieldOffset("send_event") + "\""); + Console.WriteLine("\"GstElementClass.query\": \"" + Gst.Element.class_abi.GetFieldOffset("query") + "\""); + Console.WriteLine("\"GstElementClass.post_message\": \"" + Gst.Element.class_abi.GetFieldOffset("post_message") + "\""); + Console.WriteLine("\"GstElementClass.set_context\": \"" + Gst.Element.class_abi.GetFieldOffset("set_context") + "\""); + Console.WriteLine("\"sizeof(GstElement)\": \"" + Gst.Element.abi_info.Size + "\""); + Console.WriteLine("\"GstElement.state_lock\": \"" + Gst.Element.abi_info.GetFieldOffset("state_lock") + "\""); + Console.WriteLine("\"GstElement.state_cond\": \"" + Gst.Element.abi_info.GetFieldOffset("state_cond") + "\""); + Console.WriteLine("\"GstElement.state_cookie\": \"" + Gst.Element.abi_info.GetFieldOffset("state_cookie") + "\""); + Console.WriteLine("\"GstElement.target_state\": \"" + Gst.Element.abi_info.GetFieldOffset("target_state") + "\""); + Console.WriteLine("\"GstElement.current_state\": \"" + Gst.Element.abi_info.GetFieldOffset("current_state") + "\""); + Console.WriteLine("\"GstElement.next_state\": \"" + Gst.Element.abi_info.GetFieldOffset("next_state") + "\""); + Console.WriteLine("\"GstElement.pending_state\": \"" + Gst.Element.abi_info.GetFieldOffset("pending_state") + "\""); + Console.WriteLine("\"GstElement.last_return\": \"" + Gst.Element.abi_info.GetFieldOffset("last_return") + "\""); + Console.WriteLine("\"GstElement.bus\": \"" + Gst.Element.abi_info.GetFieldOffset("bus") + "\""); + Console.WriteLine("\"GstElement.clock\": \"" + Gst.Element.abi_info.GetFieldOffset("clock") + "\""); + Console.WriteLine("\"GstElement.base_time\": \"" + Gst.Element.abi_info.GetFieldOffset("base_time") + "\""); + Console.WriteLine("\"GstElement.start_time\": \"" + Gst.Element.abi_info.GetFieldOffset("start_time") + "\""); + Console.WriteLine("\"GstElement.numpads\": \"" + Gst.Element.abi_info.GetFieldOffset("numpads") + "\""); + Console.WriteLine("\"GstElement.pads\": \"" + Gst.Element.abi_info.GetFieldOffset("pads") + "\""); + Console.WriteLine("\"GstElement.numsrcpads\": \"" + Gst.Element.abi_info.GetFieldOffset("numsrcpads") + "\""); + Console.WriteLine("\"GstElement.srcpads\": \"" + Gst.Element.abi_info.GetFieldOffset("srcpads") + "\""); + Console.WriteLine("\"GstElement.numsinkpads\": \"" + Gst.Element.abi_info.GetFieldOffset("numsinkpads") + "\""); + Console.WriteLine("\"GstElement.sinkpads\": \"" + Gst.Element.abi_info.GetFieldOffset("sinkpads") + "\""); + Console.WriteLine("\"GstElement.pads_cookie\": \"" + Gst.Element.abi_info.GetFieldOffset("pads_cookie") + "\""); + Console.WriteLine("\"GstElement.contexts\": \"" + Gst.Element.abi_info.GetFieldOffset("contexts") + "\""); + Console.WriteLine("\"sizeof(GstGhostPadClass)\": \"" + Gst.GhostPad.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstGhostPad)\": \"" + Gst.GhostPad.abi_info.Size + "\""); + Console.WriteLine("\"GstGhostPad.priv\": \"" + Gst.GhostPad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstObjectClass)\": \"" + Gst.Object.class_abi.Size + "\""); + Console.WriteLine("\"GstObjectClass.path_string_separator\": \"" + Gst.Object.class_abi.GetFieldOffset("path_string_separator") + "\""); + Console.WriteLine("\"GstObjectClass.deep_notify\": \"" + Gst.Object.class_abi.GetFieldOffset("deep_notify") + "\""); + Console.WriteLine("\"sizeof(GstObject)\": \"" + Gst.Object.abi_info.Size + "\""); + Console.WriteLine("\"GstObject.lock\": \"" + Gst.Object.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"GstObject.name\": \"" + Gst.Object.abi_info.GetFieldOffset("name") + "\""); + Console.WriteLine("\"GstObject.parent\": \"" + Gst.Object.abi_info.GetFieldOffset("parent") + "\""); + Console.WriteLine("\"GstObject.flags\": \"" + Gst.Object.abi_info.GetFieldOffset("flags") + "\""); + Console.WriteLine("\"GstObject.control_bindings\": \"" + Gst.Object.abi_info.GetFieldOffset("control_bindings") + "\""); + Console.WriteLine("\"GstObject.control_rate\": \"" + Gst.Object.abi_info.GetFieldOffset("control_rate") + "\""); + Console.WriteLine("\"GstObject.last_sync\": \"" + Gst.Object.abi_info.GetFieldOffset("last_sync") + "\""); + Console.WriteLine("\"sizeof(GstPadClass)\": \"" + Gst.Pad.class_abi.Size + "\""); + Console.WriteLine("\"GstPadClass.linked\": \"" + Gst.Pad.class_abi.GetFieldOffset("linked") + "\""); + Console.WriteLine("\"GstPadClass.unlinked\": \"" + Gst.Pad.class_abi.GetFieldOffset("unlinked") + "\""); + Console.WriteLine("\"sizeof(GstPad)\": \"" + Gst.Pad.abi_info.Size + "\""); + Console.WriteLine("\"GstPad.element_private\": \"" + Gst.Pad.abi_info.GetFieldOffset("element_private") + "\""); + Console.WriteLine("\"GstPad.padtemplate\": \"" + Gst.Pad.abi_info.GetFieldOffset("padtemplate") + "\""); + Console.WriteLine("\"GstPad.direction\": \"" + Gst.Pad.abi_info.GetFieldOffset("direction") + "\""); + Console.WriteLine("\"GstPad.stream_rec_lock\": \"" + Gst.Pad.abi_info.GetFieldOffset("stream_rec_lock") + "\""); + Console.WriteLine("\"GstPad.task\": \"" + Gst.Pad.abi_info.GetFieldOffset("task") + "\""); + Console.WriteLine("\"GstPad.block_cond\": \"" + Gst.Pad.abi_info.GetFieldOffset("block_cond") + "\""); + Console.WriteLine("\"GstPad.probes\": \"" + Gst.Pad.abi_info.GetFieldOffset("probes") + "\""); + Console.WriteLine("\"GstPad.mode\": \"" + Gst.Pad.abi_info.GetFieldOffset("mode") + "\""); + Console.WriteLine("\"GstPad.activatefunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatefunc") + "\""); + Console.WriteLine("\"GstPad.activatedata\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatedata") + "\""); + Console.WriteLine("\"GstPad.activatenotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatenotify") + "\""); + Console.WriteLine("\"GstPad.activatemodefunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatemodefunc") + "\""); + Console.WriteLine("\"GstPad.activatemodedata\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatemodedata") + "\""); + Console.WriteLine("\"GstPad.activatemodenotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("activatemodenotify") + "\""); + Console.WriteLine("\"GstPad.peer\": \"" + Gst.Pad.abi_info.GetFieldOffset("peer") + "\""); + Console.WriteLine("\"GstPad.linkfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("linkfunc") + "\""); + Console.WriteLine("\"GstPad.linkdata\": \"" + Gst.Pad.abi_info.GetFieldOffset("linkdata") + "\""); + Console.WriteLine("\"GstPad.linknotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("linknotify") + "\""); + Console.WriteLine("\"GstPad.unlinkfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("unlinkfunc") + "\""); + Console.WriteLine("\"GstPad.unlinkdata\": \"" + Gst.Pad.abi_info.GetFieldOffset("unlinkdata") + "\""); + Console.WriteLine("\"GstPad.unlinknotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("unlinknotify") + "\""); + Console.WriteLine("\"GstPad.chainfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("chainfunc") + "\""); + Console.WriteLine("\"GstPad.chaindata\": \"" + Gst.Pad.abi_info.GetFieldOffset("chaindata") + "\""); + Console.WriteLine("\"GstPad.chainnotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("chainnotify") + "\""); + Console.WriteLine("\"GstPad.chainlistfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("chainlistfunc") + "\""); + Console.WriteLine("\"GstPad.chainlistdata\": \"" + Gst.Pad.abi_info.GetFieldOffset("chainlistdata") + "\""); + Console.WriteLine("\"GstPad.chainlistnotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("chainlistnotify") + "\""); + Console.WriteLine("\"GstPad.getrangefunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("getrangefunc") + "\""); + Console.WriteLine("\"GstPad.getrangedata\": \"" + Gst.Pad.abi_info.GetFieldOffset("getrangedata") + "\""); + Console.WriteLine("\"GstPad.getrangenotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("getrangenotify") + "\""); + Console.WriteLine("\"GstPad.eventfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("eventfunc") + "\""); + Console.WriteLine("\"GstPad.eventdata\": \"" + Gst.Pad.abi_info.GetFieldOffset("eventdata") + "\""); + Console.WriteLine("\"GstPad.eventnotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("eventnotify") + "\""); + Console.WriteLine("\"GstPad.offset\": \"" + Gst.Pad.abi_info.GetFieldOffset("offset") + "\""); + Console.WriteLine("\"GstPad.queryfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("queryfunc") + "\""); + Console.WriteLine("\"GstPad.querydata\": \"" + Gst.Pad.abi_info.GetFieldOffset("querydata") + "\""); + Console.WriteLine("\"GstPad.querynotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("querynotify") + "\""); + Console.WriteLine("\"GstPad.iterintlinkfunc\": \"" + Gst.Pad.abi_info.GetFieldOffset("iterintlinkfunc") + "\""); + Console.WriteLine("\"GstPad.iterintlinkdata\": \"" + Gst.Pad.abi_info.GetFieldOffset("iterintlinkdata") + "\""); + Console.WriteLine("\"GstPad.iterintlinknotify\": \"" + Gst.Pad.abi_info.GetFieldOffset("iterintlinknotify") + "\""); + Console.WriteLine("\"GstPad.num_probes\": \"" + Gst.Pad.abi_info.GetFieldOffset("num_probes") + "\""); + Console.WriteLine("\"GstPad.num_blocked\": \"" + Gst.Pad.abi_info.GetFieldOffset("num_blocked") + "\""); + Console.WriteLine("\"GstPad.priv\": \"" + Gst.Pad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstPadTemplateClass)\": \"" + Gst.PadTemplate.class_abi.Size + "\""); + Console.WriteLine("\"GstPadTemplateClass.pad_created\": \"" + Gst.PadTemplate.class_abi.GetFieldOffset("pad_created") + "\""); + Console.WriteLine("\"sizeof(GstPadTemplate)\": \"" + Gst.PadTemplate.abi_info.Size + "\""); + Console.WriteLine("\"GstPadTemplate.name_template\": \"" + Gst.PadTemplate.abi_info.GetFieldOffset("name_template") + "\""); + Console.WriteLine("\"GstPadTemplate.direction\": \"" + Gst.PadTemplate.abi_info.GetFieldOffset("direction") + "\""); + Console.WriteLine("\"GstPadTemplate.presence\": \"" + Gst.PadTemplate.abi_info.GetFieldOffset("presence") + "\""); + Console.WriteLine("\"GstPadTemplate.caps\": \"" + Gst.PadTemplate.abi_info.GetFieldOffset("caps") + "\""); + Console.WriteLine("\"sizeof(GstPipelineClass)\": \"" + Gst.Pipeline.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstPipeline)\": \"" + Gst.Pipeline.abi_info.Size + "\""); + Console.WriteLine("\"GstPipeline.fixed_clock\": \"" + Gst.Pipeline.abi_info.GetFieldOffset("fixed_clock") + "\""); + Console.WriteLine("\"GstPipeline.stream_time\": \"" + Gst.Pipeline.abi_info.GetFieldOffset("stream_time") + "\""); + Console.WriteLine("\"GstPipeline.delay\": \"" + Gst.Pipeline.abi_info.GetFieldOffset("delay") + "\""); + Console.WriteLine("\"GstPipeline.priv\": \"" + Gst.Pipeline.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstProxyPadClass)\": \"" + Gst.ProxyPad.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstProxyPad)\": \"" + Gst.ProxyPad.abi_info.Size + "\""); + Console.WriteLine("\"GstProxyPad.priv\": \"" + Gst.ProxyPad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstRegistry)\": \"" + Gst.Registry.abi_info.Size + "\""); + Console.WriteLine("\"GstRegistry.priv\": \"" + Gst.Registry.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstSharedTaskPoolClass)\": \"" + Gst.SharedTaskPool.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstSharedTaskPool)\": \"" + Gst.SharedTaskPool.abi_info.Size + "\""); + Console.WriteLine("\"GstSharedTaskPool.priv\": \"" + Gst.SharedTaskPool.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstStreamClass)\": \"" + Gst.Stream.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstStream)\": \"" + Gst.Stream.abi_info.Size + "\""); + Console.WriteLine("\"GstStream.stream_id\": \"" + Gst.Stream.abi_info.GetFieldOffset("stream_id") + "\""); + Console.WriteLine("\"GstStream.priv\": \"" + Gst.Stream.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstStreamCollectionClass)\": \"" + Gst.StreamCollection.class_abi.Size + "\""); + Console.WriteLine("\"GstStreamCollectionClass.stream_notify\": \"" + Gst.StreamCollection.class_abi.GetFieldOffset("stream_notify") + "\""); + Console.WriteLine("\"sizeof(GstStreamCollection)\": \"" + Gst.StreamCollection.abi_info.Size + "\""); + Console.WriteLine("\"GstStreamCollection.upstream_id\": \"" + Gst.StreamCollection.abi_info.GetFieldOffset("upstream_id") + "\""); + Console.WriteLine("\"GstStreamCollection.priv\": \"" + Gst.StreamCollection.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstSystemClockClass)\": \"" + Gst.SystemClock.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstSystemClock)\": \"" + Gst.SystemClock.abi_info.Size + "\""); + Console.WriteLine("\"GstSystemClock.priv\": \"" + Gst.SystemClock.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstTaskClass)\": \"" + Gst.Task.class_abi.Size + "\""); + Console.WriteLine("\"GstTaskClass.pool\": \"" + Gst.Task.class_abi.GetFieldOffset("pool") + "\""); + Console.WriteLine("\"sizeof(GstTask)\": \"" + Gst.Task.abi_info.Size + "\""); + Console.WriteLine("\"GstTask.state\": \"" + Gst.Task.abi_info.GetFieldOffset("state") + "\""); + Console.WriteLine("\"GstTask.cond\": \"" + Gst.Task.abi_info.GetFieldOffset("cond") + "\""); + Console.WriteLine("\"GstTask.lock\": \"" + Gst.Task.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"GstTask.func\": \"" + Gst.Task.abi_info.GetFieldOffset("func") + "\""); + Console.WriteLine("\"GstTask.user_data\": \"" + Gst.Task.abi_info.GetFieldOffset("user_data") + "\""); + Console.WriteLine("\"GstTask.notify\": \"" + Gst.Task.abi_info.GetFieldOffset("notify") + "\""); + Console.WriteLine("\"GstTask.running\": \"" + Gst.Task.abi_info.GetFieldOffset("running") + "\""); + Console.WriteLine("\"GstTask.thread\": \"" + Gst.Task.abi_info.GetFieldOffset("thread") + "\""); + Console.WriteLine("\"GstTask.priv\": \"" + Gst.Task.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstTaskPoolClass)\": \"" + Gst.TaskPool.class_abi.Size + "\""); + Console.WriteLine("\"GstTaskPoolClass.prepare\": \"" + Gst.TaskPool.class_abi.GetFieldOffset("prepare") + "\""); + Console.WriteLine("\"GstTaskPoolClass.cleanup\": \"" + Gst.TaskPool.class_abi.GetFieldOffset("cleanup") + "\""); + Console.WriteLine("\"GstTaskPoolClass.push\": \"" + Gst.TaskPool.class_abi.GetFieldOffset("push") + "\""); + Console.WriteLine("\"GstTaskPoolClass.join\": \"" + Gst.TaskPool.class_abi.GetFieldOffset("join") + "\""); + Console.WriteLine("\"GstTaskPoolClass.dispose_handle\": \"" + Gst.TaskPool.class_abi.GetFieldOffset("dispose_handle") + "\""); + Console.WriteLine("\"sizeof(GstTaskPool)\": \"" + Gst.TaskPool.abi_info.Size + "\""); + Console.WriteLine("\"GstTaskPool.pool\": \"" + Gst.TaskPool.abi_info.GetFieldOffset("pool") + "\""); + Console.WriteLine("\"sizeof(GstTracerClass)\": \"" + Gst.Tracer.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstTracer)\": \"" + Gst.Tracer.abi_info.Size + "\""); + Console.WriteLine("\"GstTracer.priv\": \"" + Gst.Tracer.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBuffer)\": \"" + Gst.Buffer.abi_info.Size + "\""); + Console.WriteLine("\"GstBuffer.pool\": \"" + Gst.Buffer.abi_info.GetFieldOffset("pool") + "\""); + Console.WriteLine("\"GstBuffer.pts\": \"" + Gst.Buffer.abi_info.GetFieldOffset("pts") + "\""); + Console.WriteLine("\"GstBuffer.dts\": \"" + Gst.Buffer.abi_info.GetFieldOffset("dts") + "\""); + Console.WriteLine("\"GstBuffer.duration\": \"" + Gst.Buffer.abi_info.GetFieldOffset("duration") + "\""); + Console.WriteLine("\"GstBuffer.offset\": \"" + Gst.Buffer.abi_info.GetFieldOffset("offset") + "\""); + Console.WriteLine("\"GstBuffer.offset_end\": \"" + Gst.Buffer.abi_info.GetFieldOffset("offset_end") + "\""); + Console.WriteLine("\"sizeof(GstClockEntry)\": \"" + Gst.ClockEntry.abi_info.Size + "\""); + Console.WriteLine("\"GstClockEntry.refcount\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("refcount") + "\""); + Console.WriteLine("\"GstClockEntry.clock\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("clock") + "\""); + Console.WriteLine("\"GstClockEntry.type\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstClockEntry.time\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("time") + "\""); + Console.WriteLine("\"GstClockEntry.interval\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("interval") + "\""); + Console.WriteLine("\"GstClockEntry.status\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("status") + "\""); + Console.WriteLine("\"GstClockEntry.func\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("func") + "\""); + Console.WriteLine("\"GstClockEntry.user_data\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("user_data") + "\""); + Console.WriteLine("\"GstClockEntry.destroy_data\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("destroy_data") + "\""); + Console.WriteLine("\"GstClockEntry.unscheduled\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("unscheduled") + "\""); + Console.WriteLine("\"GstClockEntry.woken_up\": \"" + Gst.ClockEntry.abi_info.GetFieldOffset("woken_up") + "\""); + Console.WriteLine("\"sizeof(GstEvent)\": \"" + Gst.Event.abi_info.Size + "\""); + Console.WriteLine("\"GstEvent.type\": \"" + Gst.Event.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstEvent.timestamp\": \"" + Gst.Event.abi_info.GetFieldOffset("timestamp") + "\""); + Console.WriteLine("\"GstEvent.seqnum\": \"" + Gst.Event.abi_info.GetFieldOffset("seqnum") + "\""); + Console.WriteLine("\"sizeof(GstIterator)\": \"" + Gst.Iterator.abi_info.Size + "\""); + Console.WriteLine("\"GstIterator.copy\": \"" + Gst.Iterator.abi_info.GetFieldOffset("copy") + "\""); + Console.WriteLine("\"GstIterator.next\": \"" + Gst.Iterator.abi_info.GetFieldOffset("next") + "\""); + Console.WriteLine("\"GstIterator.item\": \"" + Gst.Iterator.abi_info.GetFieldOffset("item") + "\""); + Console.WriteLine("\"GstIterator.resync\": \"" + Gst.Iterator.abi_info.GetFieldOffset("resync") + "\""); + Console.WriteLine("\"GstIterator.free\": \"" + Gst.Iterator.abi_info.GetFieldOffset("free") + "\""); + Console.WriteLine("\"GstIterator.pushed\": \"" + Gst.Iterator.abi_info.GetFieldOffset("pushed") + "\""); + Console.WriteLine("\"GstIterator.type\": \"" + Gst.Iterator.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstIterator.lock\": \"" + Gst.Iterator.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"GstIterator.cookie\": \"" + Gst.Iterator.abi_info.GetFieldOffset("cookie") + "\""); + Console.WriteLine("\"GstIterator.master_cookie\": \"" + Gst.Iterator.abi_info.GetFieldOffset("master_cookie") + "\""); + Console.WriteLine("\"GstIterator.size\": \"" + Gst.Iterator.abi_info.GetFieldOffset("size") + "\""); + Console.WriteLine("\"sizeof(GstMemory)\": \"" + Gst.Memory.abi_info.Size + "\""); + Console.WriteLine("\"GstMemory.allocator\": \"" + Gst.Memory.abi_info.GetFieldOffset("allocator") + "\""); + Console.WriteLine("\"GstMemory.parent\": \"" + Gst.Memory.abi_info.GetFieldOffset("parent") + "\""); + Console.WriteLine("\"GstMemory.maxsize\": \"" + Gst.Memory.abi_info.GetFieldOffset("maxsize") + "\""); + Console.WriteLine("\"GstMemory.align\": \"" + Gst.Memory.abi_info.GetFieldOffset("align") + "\""); + Console.WriteLine("\"GstMemory.offset\": \"" + Gst.Memory.abi_info.GetFieldOffset("offset") + "\""); + Console.WriteLine("\"GstMemory.size\": \"" + Gst.Memory.abi_info.GetFieldOffset("size") + "\""); + Console.WriteLine("\"sizeof(GstMessage)\": \"" + Gst.Message.abi_info.Size + "\""); + Console.WriteLine("\"GstMessage.type\": \"" + Gst.Message.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstMessage.timestamp\": \"" + Gst.Message.abi_info.GetFieldOffset("timestamp") + "\""); + Console.WriteLine("\"GstMessage.src\": \"" + Gst.Message.abi_info.GetFieldOffset("src") + "\""); + Console.WriteLine("\"GstMessage.seqnum\": \"" + Gst.Message.abi_info.GetFieldOffset("seqnum") + "\""); + Console.WriteLine("\"GstMessage.lock\": \"" + Gst.Message.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"GstMessage.cond\": \"" + Gst.Message.abi_info.GetFieldOffset("cond") + "\""); + Console.WriteLine("\"sizeof(GstMiniObject)\": \"" + Gst.MiniObject.abi_info.Size + "\""); + Console.WriteLine("\"GstMiniObject.type\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstMiniObject.refcount\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("refcount") + "\""); + Console.WriteLine("\"GstMiniObject.lockstate\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("lockstate") + "\""); + Console.WriteLine("\"GstMiniObject.flags\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("flags") + "\""); + Console.WriteLine("\"GstMiniObject.copy\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("copy") + "\""); + Console.WriteLine("\"GstMiniObject.dispose\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("dispose") + "\""); + Console.WriteLine("\"GstMiniObject.free\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("free") + "\""); + Console.WriteLine("\"GstMiniObject.priv_uint\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("priv_uint") + "\""); + Console.WriteLine("\"GstMiniObject.priv_pointer\": \"" + Gst.MiniObject.abi_info.GetFieldOffset("priv_pointer") + "\""); + Console.WriteLine("\"sizeof(GstQuery)\": \"" + Gst.Query.abi_info.Size + "\""); + Console.WriteLine("\"GstQuery.type\": \"" + Gst.Query.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"sizeof(GstStructure)\": \"" + Gst.Structure.abi_info.Size + "\""); + Console.WriteLine("\"GstStructure.type\": \"" + Gst.Structure.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstStructure.name\": \"" + Gst.Structure.abi_info.GetFieldOffset("name") + "\""); + Console.WriteLine("\"sizeof(GstTypeFind)\": \"" + Gst.TypeFind.abi_info.Size + "\""); + Console.WriteLine("\"GstTypeFind.peek\": \"" + Gst.TypeFind.abi_info.GetFieldOffset("peek") + "\""); + Console.WriteLine("\"GstTypeFind.suggest\": \"" + Gst.TypeFind.abi_info.GetFieldOffset("suggest") + "\""); + Console.WriteLine("\"GstTypeFind.data\": \"" + Gst.TypeFind.abi_info.GetFieldOffset("data") + "\""); + Console.WriteLine("\"GstTypeFind.get_length\": \"" + Gst.TypeFind.abi_info.GetFieldOffset("get_length") + "\""); + Console.WriteLine("\"sizeof(GstAppSinkClass)\": \"" + Gst.App.AppSink.class_abi.Size + "\""); + Console.WriteLine("\"GstAppSinkClass.eos\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("eos") + "\""); + Console.WriteLine("\"GstAppSinkClass.new_preroll\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("new_preroll") + "\""); + Console.WriteLine("\"GstAppSinkClass.new_sample\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("new_sample") + "\""); + Console.WriteLine("\"GstAppSinkClass.pull_preroll\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("pull_preroll") + "\""); + Console.WriteLine("\"GstAppSinkClass.pull_sample\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("pull_sample") + "\""); + Console.WriteLine("\"GstAppSinkClass.try_pull_preroll\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("try_pull_preroll") + "\""); + Console.WriteLine("\"GstAppSinkClass.try_pull_sample\": \"" + Gst.App.AppSink.class_abi.GetFieldOffset("try_pull_sample") + "\""); + Console.WriteLine("\"sizeof(GstAppSink)\": \"" + Gst.App.AppSink.abi_info.Size + "\""); + Console.WriteLine("\"GstAppSink.priv\": \"" + Gst.App.AppSink.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAppSrcClass)\": \"" + Gst.App.AppSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstAppSrcClass.need_data\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("need_data") + "\""); + Console.WriteLine("\"GstAppSrcClass.enough_data\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("enough_data") + "\""); + Console.WriteLine("\"GstAppSrcClass.seek_data\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("seek_data") + "\""); + Console.WriteLine("\"GstAppSrcClass.push_buffer\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("push_buffer") + "\""); + Console.WriteLine("\"GstAppSrcClass.end_of_stream\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("end_of_stream") + "\""); + Console.WriteLine("\"GstAppSrcClass.push_sample\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("push_sample") + "\""); + Console.WriteLine("\"GstAppSrcClass.push_buffer_list\": \"" + Gst.App.AppSrc.class_abi.GetFieldOffset("push_buffer_list") + "\""); + Console.WriteLine("\"sizeof(GstAppSrc)\": \"" + Gst.App.AppSrc.abi_info.Size + "\""); + Console.WriteLine("\"GstAppSrc.priv\": \"" + Gst.App.AppSrc.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioBaseSinkClass)\": \"" + Gst.Audio.AudioBaseSink.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioBaseSinkClass.create_ringbuffer\": \"" + Gst.Audio.AudioBaseSink.class_abi.GetFieldOffset("create_ringbuffer") + "\""); + Console.WriteLine("\"GstAudioBaseSinkClass.payload\": \"" + Gst.Audio.AudioBaseSink.class_abi.GetFieldOffset("payload") + "\""); + Console.WriteLine("\"sizeof(GstAudioBaseSink)\": \"" + Gst.Audio.AudioBaseSink.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioBaseSink.ringbuffer\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("ringbuffer") + "\""); + Console.WriteLine("\"GstAudioBaseSink.buffer_time\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("buffer_time") + "\""); + Console.WriteLine("\"GstAudioBaseSink.latency_time\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("latency_time") + "\""); + Console.WriteLine("\"GstAudioBaseSink.next_sample\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("next_sample") + "\""); + Console.WriteLine("\"GstAudioBaseSink.provided_clock\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("provided_clock") + "\""); + Console.WriteLine("\"GstAudioBaseSink.eos_rendering\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("eos_rendering") + "\""); + Console.WriteLine("\"GstAudioBaseSink.priv\": \"" + Gst.Audio.AudioBaseSink.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioBaseSrcClass)\": \"" + Gst.Audio.AudioBaseSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioBaseSrcClass.create_ringbuffer\": \"" + Gst.Audio.AudioBaseSrc.class_abi.GetFieldOffset("create_ringbuffer") + "\""); + Console.WriteLine("\"sizeof(GstAudioBaseSrc)\": \"" + Gst.Audio.AudioBaseSrc.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioBaseSrc.ringbuffer\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("ringbuffer") + "\""); + Console.WriteLine("\"GstAudioBaseSrc.buffer_time\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("buffer_time") + "\""); + Console.WriteLine("\"GstAudioBaseSrc.latency_time\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("latency_time") + "\""); + Console.WriteLine("\"GstAudioBaseSrc.next_sample\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("next_sample") + "\""); + Console.WriteLine("\"GstAudioBaseSrc.clock\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("clock") + "\""); + Console.WriteLine("\"GstAudioBaseSrc.priv\": \"" + Gst.Audio.AudioBaseSrc.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioCdSrcClass)\": \"" + Gst.Audio.AudioCdSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioCdSrcClass.open\": \"" + Gst.Audio.AudioCdSrc.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioCdSrcClass.close\": \"" + Gst.Audio.AudioCdSrc.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstAudioCdSrcClass.read_sector\": \"" + Gst.Audio.AudioCdSrc.class_abi.GetFieldOffset("read_sector") + "\""); + Console.WriteLine("\"sizeof(GstAudioCdSrc)\": \"" + Gst.Audio.AudioCdSrc.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioCdSrc.tags\": \"" + Gst.Audio.AudioCdSrc.abi_info.GetFieldOffset("tags") + "\""); + Console.WriteLine("\"GstAudioCdSrc.priv\": \"" + Gst.Audio.AudioCdSrc.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioClockClass)\": \"" + Gst.Audio.AudioClock.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstAudioClock)\": \"" + Gst.Audio.AudioClock.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioClock.func\": \"" + Gst.Audio.AudioClock.abi_info.GetFieldOffset("func") + "\""); + Console.WriteLine("\"GstAudioClock.user_data\": \"" + Gst.Audio.AudioClock.abi_info.GetFieldOffset("user_data") + "\""); + Console.WriteLine("\"GstAudioClock.destroy_notify\": \"" + Gst.Audio.AudioClock.abi_info.GetFieldOffset("destroy_notify") + "\""); + Console.WriteLine("\"GstAudioClock.last_time\": \"" + Gst.Audio.AudioClock.abi_info.GetFieldOffset("last_time") + "\""); + Console.WriteLine("\"GstAudioClock.time_offset\": \"" + Gst.Audio.AudioClock.abi_info.GetFieldOffset("time_offset") + "\""); + Console.WriteLine("\"sizeof(GstAudioDecoderClass)\": \"" + Gst.Audio.AudioDecoder.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioDecoderClass.start\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.stop\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.set_format\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("set_format") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.parse\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("parse") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.handle_frame\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("handle_frame") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.flush\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.pre_push\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("pre_push") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.sink_event\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.src_event\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.open\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.close\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.negotiate\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.decide_allocation\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.propose_allocation\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.sink_query\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.src_query\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.getcaps\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("getcaps") + "\""); + Console.WriteLine("\"GstAudioDecoderClass.transform_meta\": \"" + Gst.Audio.AudioDecoder.class_abi.GetFieldOffset("transform_meta") + "\""); + Console.WriteLine("\"sizeof(GstAudioDecoder)\": \"" + Gst.Audio.AudioDecoder.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioDecoder.sinkpad\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstAudioDecoder.srcpad\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstAudioDecoder.stream_lock\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("stream_lock") + "\""); + Console.WriteLine("\"GstAudioDecoder.input_segment\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("input_segment") + "\""); + Console.WriteLine("\"GstAudioDecoder.output_segment\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("output_segment") + "\""); + Console.WriteLine("\"GstAudioDecoder.priv\": \"" + Gst.Audio.AudioDecoder.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioEncoderClass)\": \"" + Gst.Audio.AudioEncoder.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioEncoderClass.start\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.stop\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.set_format\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("set_format") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.handle_frame\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("handle_frame") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.flush\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.pre_push\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("pre_push") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.sink_event\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.src_event\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.getcaps\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("getcaps") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.open\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.close\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.negotiate\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.decide_allocation\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.propose_allocation\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.transform_meta\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("transform_meta") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.sink_query\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstAudioEncoderClass.src_query\": \"" + Gst.Audio.AudioEncoder.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"sizeof(GstAudioEncoder)\": \"" + Gst.Audio.AudioEncoder.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioEncoder.sinkpad\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstAudioEncoder.srcpad\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstAudioEncoder.stream_lock\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("stream_lock") + "\""); + Console.WriteLine("\"GstAudioEncoder.input_segment\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("input_segment") + "\""); + Console.WriteLine("\"GstAudioEncoder.output_segment\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("output_segment") + "\""); + Console.WriteLine("\"GstAudioEncoder.priv\": \"" + Gst.Audio.AudioEncoder.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioFilterClass)\": \"" + Gst.Audio.AudioFilter.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioFilterClass.setup\": \"" + Gst.Audio.AudioFilter.class_abi.GetFieldOffset("setup") + "\""); + Console.WriteLine("\"sizeof(GstAudioFilter)\": \"" + Gst.Audio.AudioFilter.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioFilter.info\": \"" + Gst.Audio.AudioFilter.abi_info.GetFieldOffset("info") + "\""); + Console.WriteLine("\"sizeof(GstAudioRingBufferClass)\": \"" + Gst.Audio.AudioRingBuffer.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.open_device\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("open_device") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.acquire\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("acquire") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.release\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("release") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.close_device\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("close_device") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.start\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.pause\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("pause") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.resume\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("resume") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.stop\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.delay\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("delay") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.activate\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("activate") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.commit\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("commit") + "\""); + Console.WriteLine("\"GstAudioRingBufferClass.clear_all\": \"" + Gst.Audio.AudioRingBuffer.class_abi.GetFieldOffset("clear_all") + "\""); + Console.WriteLine("\"sizeof(GstAudioRingBuffer)\": \"" + Gst.Audio.AudioRingBuffer.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioRingBuffer.cond\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("cond") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.open\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.acquired\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("acquired") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.memory\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("memory") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.size\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("size") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.timestamps\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("timestamps") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.spec\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("spec") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.samples_per_seg\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("samples_per_seg") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.empty_seg\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("empty_seg") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.state\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("state") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.segdone\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("segdone") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.segbase\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("segbase") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.waiting\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("waiting") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.callback\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("callback") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.cb_data\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("cb_data") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.need_reorder\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("need_reorder") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.channel_reorder_map\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("channel_reorder_map") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.flushing\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("flushing") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.may_start\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("may_start") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.active\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("active") + "\""); + Console.WriteLine("\"GstAudioRingBuffer.cb_data_notify\": \"" + Gst.Audio.AudioRingBuffer.abi_info.GetFieldOffset("cb_data_notify") + "\""); + Console.WriteLine("\"sizeof(GstAudioSinkClass)\": \"" + Gst.Audio.AudioSink.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioSinkClass.open\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioSinkClass.prepare\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("prepare") + "\""); + Console.WriteLine("\"GstAudioSinkClass.unprepare\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("unprepare") + "\""); + Console.WriteLine("\"GstAudioSinkClass.close\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstAudioSinkClass.write\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("write") + "\""); + Console.WriteLine("\"GstAudioSinkClass.delay\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("delay") + "\""); + Console.WriteLine("\"GstAudioSinkClass.reset\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("reset") + "\""); + Console.WriteLine("\"GstAudioSinkClass.pause\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("pause") + "\""); + Console.WriteLine("\"GstAudioSinkClass.resume\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("resume") + "\""); + Console.WriteLine("\"GstAudioSinkClass.stop\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstAudioSinkClass.extension\": \"" + Gst.Audio.AudioSink.class_abi.GetFieldOffset("extension") + "\""); + Console.WriteLine("\"sizeof(GstAudioSink)\": \"" + Gst.Audio.AudioSink.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioSink.thread\": \"" + Gst.Audio.AudioSink.abi_info.GetFieldOffset("thread") + "\""); + Console.WriteLine("\"sizeof(GstAudioSrcClass)\": \"" + Gst.Audio.AudioSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioSrcClass.open\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstAudioSrcClass.prepare\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("prepare") + "\""); + Console.WriteLine("\"GstAudioSrcClass.unprepare\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("unprepare") + "\""); + Console.WriteLine("\"GstAudioSrcClass.close\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstAudioSrcClass.read\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("read") + "\""); + Console.WriteLine("\"GstAudioSrcClass.delay\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("delay") + "\""); + Console.WriteLine("\"GstAudioSrcClass.reset\": \"" + Gst.Audio.AudioSrc.class_abi.GetFieldOffset("reset") + "\""); + Console.WriteLine("\"sizeof(GstAudioSrc)\": \"" + Gst.Audio.AudioSrc.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioSrc.thread\": \"" + Gst.Audio.AudioSrc.abi_info.GetFieldOffset("thread") + "\""); + Console.WriteLine("\"sizeof(GstAudioInfo)\": \"" + Gst.Audio.AudioInfo.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioInfo.finfo\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("finfo") + "\""); + Console.WriteLine("\"GstAudioInfo.flags\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("flags") + "\""); + Console.WriteLine("\"GstAudioInfo.layout\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("layout") + "\""); + Console.WriteLine("\"GstAudioInfo.rate\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("rate") + "\""); + Console.WriteLine("\"GstAudioInfo.channels\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("channels") + "\""); + Console.WriteLine("\"GstAudioInfo.bpf\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("bpf") + "\""); + Console.WriteLine("\"GstAudioInfo.position\": \"" + Gst.Audio.AudioInfo.abi_info.GetFieldOffset("position") + "\""); + Console.WriteLine("\"sizeof(GstAudioRingBufferSpec)\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.caps\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("caps") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.type\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.info\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("info") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.latency_time\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("latency_time") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.buffer_time\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("buffer_time") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.segsize\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("segsize") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.segtotal\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("segtotal") + "\""); + Console.WriteLine("\"GstAudioRingBufferSpec.seglatency\": \"" + Gst.Audio.AudioRingBufferSpec.abi_info.GetFieldOffset("seglatency") + "\""); + Console.WriteLine("\"sizeof(GstAggregatorClass)\": \"" + Gst.Base.Aggregator.class_abi.Size + "\""); + Console.WriteLine("\"GstAggregatorClass.flush\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstAggregatorClass.clip\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("clip") + "\""); + Console.WriteLine("\"GstAggregatorClass.finish_buffer\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("finish_buffer") + "\""); + Console.WriteLine("\"GstAggregatorClass.sink_event\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstAggregatorClass.sink_query\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstAggregatorClass.src_event\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstAggregatorClass.src_query\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"GstAggregatorClass.src_activate\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("src_activate") + "\""); + Console.WriteLine("\"GstAggregatorClass.aggregate\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("aggregate") + "\""); + Console.WriteLine("\"GstAggregatorClass.stop\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstAggregatorClass.start\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstAggregatorClass.get_next_time\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("get_next_time") + "\""); + Console.WriteLine("\"GstAggregatorClass.create_new_pad\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("create_new_pad") + "\""); + Console.WriteLine("\"GstAggregatorClass.update_src_caps\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("update_src_caps") + "\""); + Console.WriteLine("\"GstAggregatorClass.fixate_src_caps\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("fixate_src_caps") + "\""); + Console.WriteLine("\"GstAggregatorClass.negotiated_src_caps\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("negotiated_src_caps") + "\""); + Console.WriteLine("\"GstAggregatorClass.decide_allocation\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstAggregatorClass.propose_allocation\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstAggregatorClass.negotiate\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstAggregatorClass.sink_event_pre_queue\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("sink_event_pre_queue") + "\""); + Console.WriteLine("\"GstAggregatorClass.sink_query_pre_queue\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("sink_query_pre_queue") + "\""); + Console.WriteLine("\"GstAggregatorClass.finish_buffer_list\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("finish_buffer_list") + "\""); + Console.WriteLine("\"GstAggregatorClass.peek_next_sample\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("peek_next_sample") + "\""); + Console.WriteLine("\"sizeof(GstAggregator)\": \"" + Gst.Base.Aggregator.abi_info.Size + "\""); + Console.WriteLine("\"GstAggregator.srcpad\": \"" + Gst.Base.Aggregator.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstAggregator.priv\": \"" + Gst.Base.Aggregator.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAggregatorPadClass)\": \"" + Gst.Base.AggregatorPad.class_abi.Size + "\""); + Console.WriteLine("\"GstAggregatorPadClass.flush\": \"" + Gst.Base.AggregatorPad.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstAggregatorPadClass.skip_buffer\": \"" + Gst.Base.AggregatorPad.class_abi.GetFieldOffset("skip_buffer") + "\""); + Console.WriteLine("\"sizeof(GstAggregatorPad)\": \"" + Gst.Base.AggregatorPad.abi_info.Size + "\""); + Console.WriteLine("\"GstAggregatorPad.segment\": \"" + Gst.Base.AggregatorPad.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstAggregatorPad.priv\": \"" + Gst.Base.AggregatorPad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBaseParseClass)\": \"" + Gst.Base.BaseParse.class_abi.Size + "\""); + Console.WriteLine("\"GstBaseParseClass.start\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstBaseParseClass.stop\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstBaseParseClass.set_sink_caps\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("set_sink_caps") + "\""); + Console.WriteLine("\"GstBaseParseClass.handle_frame\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("handle_frame") + "\""); + Console.WriteLine("\"GstBaseParseClass.pre_push_frame\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("pre_push_frame") + "\""); + Console.WriteLine("\"GstBaseParseClass.convert\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("convert") + "\""); + Console.WriteLine("\"GstBaseParseClass.sink_event\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstBaseParseClass.src_event\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstBaseParseClass.get_sink_caps\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("get_sink_caps") + "\""); + Console.WriteLine("\"GstBaseParseClass.detect\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("detect") + "\""); + Console.WriteLine("\"GstBaseParseClass.sink_query\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstBaseParseClass.src_query\": \"" + Gst.Base.BaseParse.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"sizeof(GstBaseParse)\": \"" + Gst.Base.BaseParse.abi_info.Size + "\""); + Console.WriteLine("\"GstBaseParse.sinkpad\": \"" + Gst.Base.BaseParse.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstBaseParse.srcpad\": \"" + Gst.Base.BaseParse.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstBaseParse.flags\": \"" + Gst.Base.BaseParse.abi_info.GetFieldOffset("flags") + "\""); + Console.WriteLine("\"GstBaseParse.segment\": \"" + Gst.Base.BaseParse.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstBaseParse.priv\": \"" + Gst.Base.BaseParse.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBaseSinkClass)\": \"" + Gst.Base.BaseSink.class_abi.Size + "\""); + Console.WriteLine("\"GstBaseSinkClass.get_caps\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("get_caps") + "\""); + Console.WriteLine("\"GstBaseSinkClass.set_caps\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("set_caps") + "\""); + Console.WriteLine("\"GstBaseSinkClass.fixate\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("fixate") + "\""); + Console.WriteLine("\"GstBaseSinkClass.activate_pull\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("activate_pull") + "\""); + Console.WriteLine("\"GstBaseSinkClass.get_times\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("get_times") + "\""); + Console.WriteLine("\"GstBaseSinkClass.propose_allocation\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstBaseSinkClass.start\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstBaseSinkClass.stop\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstBaseSinkClass.unlock\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("unlock") + "\""); + Console.WriteLine("\"GstBaseSinkClass.unlock_stop\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("unlock_stop") + "\""); + Console.WriteLine("\"GstBaseSinkClass.query\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("query") + "\""); + Console.WriteLine("\"GstBaseSinkClass.event\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("event") + "\""); + Console.WriteLine("\"GstBaseSinkClass.wait_event\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("wait_event") + "\""); + Console.WriteLine("\"GstBaseSinkClass.prepare\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("prepare") + "\""); + Console.WriteLine("\"GstBaseSinkClass.prepare_list\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("prepare_list") + "\""); + Console.WriteLine("\"GstBaseSinkClass.preroll\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("preroll") + "\""); + Console.WriteLine("\"GstBaseSinkClass.render\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("render") + "\""); + Console.WriteLine("\"GstBaseSinkClass.render_list\": \"" + Gst.Base.BaseSink.class_abi.GetFieldOffset("render_list") + "\""); + Console.WriteLine("\"sizeof(GstBaseSink)\": \"" + Gst.Base.BaseSink.abi_info.Size + "\""); + Console.WriteLine("\"GstBaseSink.sinkpad\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstBaseSink.pad_mode\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("pad_mode") + "\""); + Console.WriteLine("\"GstBaseSink.offset\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("offset") + "\""); + Console.WriteLine("\"GstBaseSink.can_activate_pull\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("can_activate_pull") + "\""); + Console.WriteLine("\"GstBaseSink.can_activate_push\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("can_activate_push") + "\""); + Console.WriteLine("\"GstBaseSink.preroll_lock\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("preroll_lock") + "\""); + Console.WriteLine("\"GstBaseSink.preroll_cond\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("preroll_cond") + "\""); + Console.WriteLine("\"GstBaseSink.eos\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("eos") + "\""); + Console.WriteLine("\"GstBaseSink.need_preroll\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("need_preroll") + "\""); + Console.WriteLine("\"GstBaseSink.have_preroll\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("have_preroll") + "\""); + Console.WriteLine("\"GstBaseSink.playing_async\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("playing_async") + "\""); + Console.WriteLine("\"GstBaseSink.have_newsegment\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("have_newsegment") + "\""); + Console.WriteLine("\"GstBaseSink.segment\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstBaseSink.clock_id\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("clock_id") + "\""); + Console.WriteLine("\"GstBaseSink.sync\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("sync") + "\""); + Console.WriteLine("\"GstBaseSink.flushing\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("flushing") + "\""); + Console.WriteLine("\"GstBaseSink.running\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("running") + "\""); + Console.WriteLine("\"GstBaseSink.max_lateness\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("max_lateness") + "\""); + Console.WriteLine("\"GstBaseSink.priv\": \"" + Gst.Base.BaseSink.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBaseSrcClass)\": \"" + Gst.Base.BaseSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstBaseSrcClass.get_caps\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("get_caps") + "\""); + Console.WriteLine("\"GstBaseSrcClass.negotiate\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstBaseSrcClass.fixate\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("fixate") + "\""); + Console.WriteLine("\"GstBaseSrcClass.set_caps\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("set_caps") + "\""); + Console.WriteLine("\"GstBaseSrcClass.decide_allocation\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstBaseSrcClass.start\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstBaseSrcClass.stop\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstBaseSrcClass.get_times\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("get_times") + "\""); + Console.WriteLine("\"GstBaseSrcClass.get_size\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("get_size") + "\""); + Console.WriteLine("\"GstBaseSrcClass.is_seekable\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("is_seekable") + "\""); + Console.WriteLine("\"GstBaseSrcClass.prepare_seek_segment\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("prepare_seek_segment") + "\""); + Console.WriteLine("\"GstBaseSrcClass.do_seek\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("do_seek") + "\""); + Console.WriteLine("\"GstBaseSrcClass.unlock\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("unlock") + "\""); + Console.WriteLine("\"GstBaseSrcClass.unlock_stop\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("unlock_stop") + "\""); + Console.WriteLine("\"GstBaseSrcClass.query\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("query") + "\""); + Console.WriteLine("\"GstBaseSrcClass.event\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("event") + "\""); + Console.WriteLine("\"GstBaseSrcClass.create\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("create") + "\""); + Console.WriteLine("\"GstBaseSrcClass.alloc\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("alloc") + "\""); + Console.WriteLine("\"GstBaseSrcClass.fill\": \"" + Gst.Base.BaseSrc.class_abi.GetFieldOffset("fill") + "\""); + Console.WriteLine("\"sizeof(GstBaseSrc)\": \"" + Gst.Base.BaseSrc.abi_info.Size + "\""); + Console.WriteLine("\"GstBaseSrc.srcpad\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstBaseSrc.live_lock\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("live_lock") + "\""); + Console.WriteLine("\"GstBaseSrc.live_cond\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("live_cond") + "\""); + Console.WriteLine("\"GstBaseSrc.is_live\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("is_live") + "\""); + Console.WriteLine("\"GstBaseSrc.live_running\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("live_running") + "\""); + Console.WriteLine("\"GstBaseSrc.blocksize\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("blocksize") + "\""); + Console.WriteLine("\"GstBaseSrc.can_activate_push\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("can_activate_push") + "\""); + Console.WriteLine("\"GstBaseSrc.random_access\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("random_access") + "\""); + Console.WriteLine("\"GstBaseSrc.clock_id\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("clock_id") + "\""); + Console.WriteLine("\"GstBaseSrc.segment\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstBaseSrc.need_newsegment\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("need_newsegment") + "\""); + Console.WriteLine("\"GstBaseSrc.num_buffers\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("num_buffers") + "\""); + Console.WriteLine("\"GstBaseSrc.num_buffers_left\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("num_buffers_left") + "\""); + Console.WriteLine("\"GstBaseSrc.typefind\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("typefind") + "\""); + Console.WriteLine("\"GstBaseSrc.running\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("running") + "\""); + Console.WriteLine("\"GstBaseSrc.pending_seek\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("pending_seek") + "\""); + Console.WriteLine("\"GstBaseSrc.priv\": \"" + Gst.Base.BaseSrc.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstBaseTransformClass)\": \"" + Gst.Base.BaseTransform.class_abi.Size + "\""); + Console.WriteLine("\"GstBaseTransformClass.passthrough_on_same_caps\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("passthrough_on_same_caps") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform_ip_on_passthrough\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform_ip_on_passthrough") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform_caps\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform_caps") + "\""); + Console.WriteLine("\"GstBaseTransformClass.fixate_caps\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("fixate_caps") + "\""); + Console.WriteLine("\"GstBaseTransformClass.accept_caps\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("accept_caps") + "\""); + Console.WriteLine("\"GstBaseTransformClass.set_caps\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("set_caps") + "\""); + Console.WriteLine("\"GstBaseTransformClass.query\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("query") + "\""); + Console.WriteLine("\"GstBaseTransformClass.decide_allocation\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstBaseTransformClass.filter_meta\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("filter_meta") + "\""); + Console.WriteLine("\"GstBaseTransformClass.propose_allocation\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform_size\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform_size") + "\""); + Console.WriteLine("\"GstBaseTransformClass.get_unit_size\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("get_unit_size") + "\""); + Console.WriteLine("\"GstBaseTransformClass.start\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstBaseTransformClass.stop\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstBaseTransformClass.sink_event\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstBaseTransformClass.src_event\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstBaseTransformClass.prepare_output_buffer\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("prepare_output_buffer") + "\""); + Console.WriteLine("\"GstBaseTransformClass.copy_metadata\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("copy_metadata") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform_meta\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform_meta") + "\""); + Console.WriteLine("\"GstBaseTransformClass.before_transform\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("before_transform") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform") + "\""); + Console.WriteLine("\"GstBaseTransformClass.transform_ip\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("transform_ip") + "\""); + Console.WriteLine("\"GstBaseTransformClass.submit_input_buffer\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("submit_input_buffer") + "\""); + Console.WriteLine("\"GstBaseTransformClass.generate_output\": \"" + Gst.Base.BaseTransform.class_abi.GetFieldOffset("generate_output") + "\""); + Console.WriteLine("\"sizeof(GstBaseTransform)\": \"" + Gst.Base.BaseTransform.abi_info.Size + "\""); + Console.WriteLine("\"GstBaseTransform.sinkpad\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstBaseTransform.srcpad\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstBaseTransform.have_segment\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("have_segment") + "\""); + Console.WriteLine("\"GstBaseTransform.segment\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstBaseTransform.queued_buf\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("queued_buf") + "\""); + Console.WriteLine("\"GstBaseTransform.priv\": \"" + Gst.Base.BaseTransform.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstCollectPadsClass)\": \"" + Gst.Base.CollectPads.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstCollectPads)\": \"" + Gst.Base.CollectPads.abi_info.Size + "\""); + Console.WriteLine("\"GstCollectPads.data\": \"" + Gst.Base.CollectPads.abi_info.GetFieldOffset("data") + "\""); + Console.WriteLine("\"GstCollectPads.stream_lock\": \"" + Gst.Base.CollectPads.abi_info.GetFieldOffset("stream_lock") + "\""); + Console.WriteLine("\"GstCollectPads.priv\": \"" + Gst.Base.CollectPads.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstDataQueueClass)\": \"" + Gst.Base.DataQueue.class_abi.Size + "\""); + Console.WriteLine("\"GstDataQueueClass.empty\": \"" + Gst.Base.DataQueue.class_abi.GetFieldOffset("empty") + "\""); + Console.WriteLine("\"GstDataQueueClass.full\": \"" + Gst.Base.DataQueue.class_abi.GetFieldOffset("full") + "\""); + Console.WriteLine("\"sizeof(GstDataQueue)\": \"" + Gst.Base.DataQueue.abi_info.Size + "\""); + Console.WriteLine("\"GstDataQueue.priv\": \"" + Gst.Base.DataQueue.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstPushSrcClass)\": \"" + Gst.Base.PushSrc.class_abi.Size + "\""); + Console.WriteLine("\"GstPushSrcClass.create\": \"" + Gst.Base.PushSrc.class_abi.GetFieldOffset("create") + "\""); + Console.WriteLine("\"GstPushSrcClass.alloc\": \"" + Gst.Base.PushSrc.class_abi.GetFieldOffset("alloc") + "\""); + Console.WriteLine("\"GstPushSrcClass.fill\": \"" + Gst.Base.PushSrc.class_abi.GetFieldOffset("fill") + "\""); + Console.WriteLine("\"sizeof(GstPushSrc)\": \"" + Gst.Base.PushSrc.abi_info.Size + "\""); + Console.WriteLine("\"sizeof(GstByteReader)\": \"" + Gst.Base.ByteReader.abi_info.Size + "\""); + Console.WriteLine("\"GstByteReader.data\": \"" + Gst.Base.ByteReader.abi_info.GetFieldOffset("data") + "\""); + Console.WriteLine("\"GstByteReader.size\": \"" + Gst.Base.ByteReader.abi_info.GetFieldOffset("size") + "\""); + Console.WriteLine("\"GstByteReader.byte\": \"" + Gst.Base.ByteReader.abi_info.GetFieldOffset("byte") + "\""); + Console.WriteLine("\"sizeof(GstARGBControlBindingClass)\": \"" + Gst.Controller.ARGBControlBinding.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstARGBControlBinding)\": \"" + Gst.Controller.ARGBControlBinding.abi_info.Size + "\""); + Console.WriteLine("\"GstARGBControlBinding.cs_a\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("cs_a") + "\""); + Console.WriteLine("\"GstARGBControlBinding.cs_r\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("cs_r") + "\""); + Console.WriteLine("\"GstARGBControlBinding.cs_g\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("cs_g") + "\""); + Console.WriteLine("\"GstARGBControlBinding.cs_b\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("cs_b") + "\""); + Console.WriteLine("\"GstARGBControlBinding.cur_value\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("cur_value") + "\""); + Console.WriteLine("\"GstARGBControlBinding.last_value\": \"" + Gst.Controller.ARGBControlBinding.abi_info.GetFieldOffset("last_value") + "\""); + Console.WriteLine("\"sizeof(GstDirectControlBindingClass)\": \"" + Gst.Controller.DirectControlBinding.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstDirectControlBinding)\": \"" + Gst.Controller.DirectControlBinding.abi_info.Size + "\""); + Console.WriteLine("\"GstDirectControlBinding.cs\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("cs") + "\""); + Console.WriteLine("\"GstDirectControlBinding.cur_value\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("cur_value") + "\""); + Console.WriteLine("\"GstDirectControlBinding.last_value\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("last_value") + "\""); + Console.WriteLine("\"GstDirectControlBinding.byte_size\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("byte_size") + "\""); + Console.WriteLine("\"GstDirectControlBinding.convert_value\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("convert_value") + "\""); + Console.WriteLine("\"GstDirectControlBinding.convert_g_value\": \"" + Gst.Controller.DirectControlBinding.abi_info.GetFieldOffset("convert_g_value") + "\""); + Console.WriteLine("\"sizeof(GstInterpolationControlSourceClass)\": \"" + Gst.Controller.InterpolationControlSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstInterpolationControlSource)\": \"" + Gst.Controller.InterpolationControlSource.abi_info.Size + "\""); + Console.WriteLine("\"GstInterpolationControlSource.priv\": \"" + Gst.Controller.InterpolationControlSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstLFOControlSourceClass)\": \"" + Gst.Controller.LFOControlSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstLFOControlSource)\": \"" + Gst.Controller.LFOControlSource.abi_info.Size + "\""); + Console.WriteLine("\"GstLFOControlSource.priv\": \"" + Gst.Controller.LFOControlSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GstLFOControlSource.lock\": \"" + Gst.Controller.LFOControlSource.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"sizeof(GstProxyControlBindingClass)\": \"" + Gst.Controller.ProxyControlBinding.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstProxyControlBinding)\": \"" + Gst.Controller.ProxyControlBinding.abi_info.Size + "\""); + Console.WriteLine("\"GstProxyControlBinding.ref_object\": \"" + Gst.Controller.ProxyControlBinding.abi_info.GetFieldOffset("ref_object") + "\""); + Console.WriteLine("\"GstProxyControlBinding.property_name\": \"" + Gst.Controller.ProxyControlBinding.abi_info.GetFieldOffset("property_name") + "\""); + Console.WriteLine("\"sizeof(GstTimedValueControlSourceClass)\": \"" + Gst.Controller.TimedValueControlSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstTimedValueControlSource)\": \"" + Gst.Controller.TimedValueControlSource.abi_info.Size + "\""); + Console.WriteLine("\"GstTimedValueControlSource.lock\": \"" + Gst.Controller.TimedValueControlSource.abi_info.GetFieldOffset("lock") + "\""); + Console.WriteLine("\"GstTimedValueControlSource.values\": \"" + Gst.Controller.TimedValueControlSource.abi_info.GetFieldOffset("values") + "\""); + Console.WriteLine("\"GstTimedValueControlSource.nvalues\": \"" + Gst.Controller.TimedValueControlSource.abi_info.GetFieldOffset("nvalues") + "\""); + Console.WriteLine("\"GstTimedValueControlSource.valid_cache\": \"" + Gst.Controller.TimedValueControlSource.abi_info.GetFieldOffset("valid_cache") + "\""); + Console.WriteLine("\"GstTimedValueControlSource.priv\": \"" + Gst.Controller.TimedValueControlSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstTriggerControlSourceClass)\": \"" + Gst.Controller.TriggerControlSource.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstTriggerControlSource)\": \"" + Gst.Controller.TriggerControlSource.abi_info.Size + "\""); + Console.WriteLine("\"GstTriggerControlSource.priv\": \"" + Gst.Controller.TriggerControlSource.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstNetClientClockClass)\": \"" + Gst.Net.NetClientClock.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstNetClientClock)\": \"" + Gst.Net.NetClientClock.abi_info.Size + "\""); + Console.WriteLine("\"GstNetClientClock.priv\": \"" + Gst.Net.NetClientClock.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstNetTimeProviderClass)\": \"" + Gst.Net.NetTimeProvider.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstNetTimeProvider)\": \"" + Gst.Net.NetTimeProvider.abi_info.Size + "\""); + Console.WriteLine("\"GstNetTimeProvider.priv\": \"" + Gst.Net.NetTimeProvider.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstPtpClockClass)\": \"" + Gst.Net.PtpClock.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstPtpClock)\": \"" + Gst.Net.PtpClock.abi_info.Size + "\""); + Console.WriteLine("\"GstPtpClock.priv\": \"" + Gst.Net.PtpClock.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstAudioVisualizerClass)\": \"" + Gst.PbUtils.AudioVisualizer.class_abi.Size + "\""); + Console.WriteLine("\"GstAudioVisualizerClass.setup\": \"" + Gst.PbUtils.AudioVisualizer.class_abi.GetFieldOffset("setup") + "\""); + Console.WriteLine("\"GstAudioVisualizerClass.render\": \"" + Gst.PbUtils.AudioVisualizer.class_abi.GetFieldOffset("render") + "\""); + Console.WriteLine("\"GstAudioVisualizerClass.decide_allocation\": \"" + Gst.PbUtils.AudioVisualizer.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"sizeof(GstAudioVisualizer)\": \"" + Gst.PbUtils.AudioVisualizer.abi_info.Size + "\""); + Console.WriteLine("\"GstAudioVisualizer.req_spf\": \"" + Gst.PbUtils.AudioVisualizer.abi_info.GetFieldOffset("req_spf") + "\""); + Console.WriteLine("\"GstAudioVisualizer.vinfo\": \"" + Gst.PbUtils.AudioVisualizer.abi_info.GetFieldOffset("vinfo") + "\""); + Console.WriteLine("\"GstAudioVisualizer.ainfo\": \"" + Gst.PbUtils.AudioVisualizer.abi_info.GetFieldOffset("ainfo") + "\""); + Console.WriteLine("\"GstAudioVisualizer.priv\": \"" + Gst.PbUtils.AudioVisualizer.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstDiscovererClass)\": \"" + Gst.PbUtils.Discoverer.class_abi.Size + "\""); + Console.WriteLine("\"GstDiscovererClass.finished\": \"" + Gst.PbUtils.Discoverer.class_abi.GetFieldOffset("finished") + "\""); + Console.WriteLine("\"GstDiscovererClass.starting\": \"" + Gst.PbUtils.Discoverer.class_abi.GetFieldOffset("starting") + "\""); + Console.WriteLine("\"GstDiscovererClass.discovered\": \"" + Gst.PbUtils.Discoverer.class_abi.GetFieldOffset("discovered") + "\""); + Console.WriteLine("\"GstDiscovererClass.source_setup\": \"" + Gst.PbUtils.Discoverer.class_abi.GetFieldOffset("source_setup") + "\""); + Console.WriteLine("\"GstDiscovererClass._reserved\": \"" + Gst.PbUtils.Discoverer.class_abi.GetFieldOffset("_reserved") + "\""); + Console.WriteLine("\"sizeof(GstDiscoverer)\": \"" + Gst.PbUtils.Discoverer.abi_info.Size + "\""); + Console.WriteLine("\"GstDiscoverer.priv\": \"" + Gst.PbUtils.Discoverer.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GstDiscoverer._reserved\": \"" + Gst.PbUtils.Discoverer.abi_info.GetFieldOffset("_reserved") + "\""); + Console.WriteLine("\"sizeof(GstRTPBaseAudioPayloadClass)\": \"" + Gst.Rtp.RTPBaseAudioPayload.class_abi.Size + "\""); + Console.WriteLine("\"sizeof(GstRTPBaseAudioPayload)\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.Size + "\""); + Console.WriteLine("\"GstRTPBaseAudioPayload.priv\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GstRTPBaseAudioPayload.base_ts\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.GetFieldOffset("base_ts") + "\""); + Console.WriteLine("\"GstRTPBaseAudioPayload.frame_size\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.GetFieldOffset("frame_size") + "\""); + Console.WriteLine("\"GstRTPBaseAudioPayload.frame_duration\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.GetFieldOffset("frame_duration") + "\""); + Console.WriteLine("\"GstRTPBaseAudioPayload.sample_size\": \"" + Gst.Rtp.RTPBaseAudioPayload.abi_info.GetFieldOffset("sample_size") + "\""); + Console.WriteLine("\"sizeof(GstRTPBaseDepayloadClass)\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.Size + "\""); + Console.WriteLine("\"GstRTPBaseDepayloadClass.set_caps\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.GetFieldOffset("set_caps") + "\""); + Console.WriteLine("\"GstRTPBaseDepayloadClass.process\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.GetFieldOffset("process") + "\""); + Console.WriteLine("\"GstRTPBaseDepayloadClass.packet_lost\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.GetFieldOffset("packet_lost") + "\""); + Console.WriteLine("\"GstRTPBaseDepayloadClass.handle_event\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.GetFieldOffset("handle_event") + "\""); + Console.WriteLine("\"GstRTPBaseDepayloadClass.process_rtp_packet\": \"" + Gst.Rtp.RTPBaseDepayload.class_abi.GetFieldOffset("process_rtp_packet") + "\""); + Console.WriteLine("\"sizeof(GstRTPBaseDepayload)\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.Size + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.sinkpad\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.srcpad\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.clock_rate\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("clock_rate") + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.segment\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.need_newsegment\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("need_newsegment") + "\""); + Console.WriteLine("\"GstRTPBaseDepayload.priv\": \"" + Gst.Rtp.RTPBaseDepayload.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstRTPBasePayloadClass)\": \"" + Gst.Rtp.RTPBasePayload.class_abi.Size + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.get_caps\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("get_caps") + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.set_caps\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("set_caps") + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.handle_buffer\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("handle_buffer") + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.sink_event\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.src_event\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstRTPBasePayloadClass.query\": \"" + Gst.Rtp.RTPBasePayload.class_abi.GetFieldOffset("query") + "\""); + Console.WriteLine("\"sizeof(GstRTPBasePayload)\": \"" + Gst.Rtp.RTPBasePayload.abi_info.Size + "\""); + Console.WriteLine("\"GstRTPBasePayload.sinkpad\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstRTPBasePayload.srcpad\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstRTPBasePayload.ts_base\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("ts_base") + "\""); + Console.WriteLine("\"GstRTPBasePayload.seqnum_base\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("seqnum_base") + "\""); + Console.WriteLine("\"GstRTPBasePayload.media\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("media") + "\""); + Console.WriteLine("\"GstRTPBasePayload.encoding_name\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("encoding_name") + "\""); + Console.WriteLine("\"GstRTPBasePayload.dynamic\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("dynamic") + "\""); + Console.WriteLine("\"GstRTPBasePayload.clock_rate\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("clock_rate") + "\""); + Console.WriteLine("\"GstRTPBasePayload.ts_offset\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("ts_offset") + "\""); + Console.WriteLine("\"GstRTPBasePayload.timestamp\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("timestamp") + "\""); + Console.WriteLine("\"GstRTPBasePayload.seqnum_offset\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("seqnum_offset") + "\""); + Console.WriteLine("\"GstRTPBasePayload.seqnum\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("seqnum") + "\""); + Console.WriteLine("\"GstRTPBasePayload.max_ptime\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("max_ptime") + "\""); + Console.WriteLine("\"GstRTPBasePayload.pt\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("pt") + "\""); + Console.WriteLine("\"GstRTPBasePayload.ssrc\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("ssrc") + "\""); + Console.WriteLine("\"GstRTPBasePayload.current_ssrc\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("current_ssrc") + "\""); + Console.WriteLine("\"GstRTPBasePayload.mtu\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("mtu") + "\""); + Console.WriteLine("\"GstRTPBasePayload.segment\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("segment") + "\""); + Console.WriteLine("\"GstRTPBasePayload.min_ptime\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("min_ptime") + "\""); + Console.WriteLine("\"GstRTPBasePayload.ptime\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("ptime") + "\""); + Console.WriteLine("\"GstRTPBasePayload.ptime_multiple\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("ptime_multiple") + "\""); + Console.WriteLine("\"GstRTPBasePayload.priv\": \"" + Gst.Rtp.RTPBasePayload.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstMIKEYMessage)\": \"" + Gst.Sdp.MIKEYMessage.abi_info.Size + "\""); + Console.WriteLine("\"GstMIKEYMessage.version\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("version") + "\""); + Console.WriteLine("\"GstMIKEYMessage.type\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstMIKEYMessage.V\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("V") + "\""); + Console.WriteLine("\"GstMIKEYMessage.prf_func\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("prf_func") + "\""); + Console.WriteLine("\"GstMIKEYMessage.CSB_id\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("CSB_id") + "\""); + Console.WriteLine("\"GstMIKEYMessage.map_type\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("map_type") + "\""); + Console.WriteLine("\"GstMIKEYMessage.map_info\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("map_info") + "\""); + Console.WriteLine("\"GstMIKEYMessage.payloads\": \"" + Gst.Sdp.MIKEYMessage.abi_info.GetFieldOffset("payloads") + "\""); + Console.WriteLine("\"sizeof(GstMIKEYPayload)\": \"" + Gst.Sdp.MIKEYPayload.abi_info.Size + "\""); + Console.WriteLine("\"GstMIKEYPayload.type\": \"" + Gst.Sdp.MIKEYPayload.abi_info.GetFieldOffset("type") + "\""); + Console.WriteLine("\"GstMIKEYPayload.len\": \"" + Gst.Sdp.MIKEYPayload.abi_info.GetFieldOffset("len") + "\""); + Console.WriteLine("\"sizeof(GstSDPMessage)\": \"" + Gst.Sdp.SDPMessage.abi_info.Size + "\""); + Console.WriteLine("\"GstSDPMessage.version\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("version") + "\""); + Console.WriteLine("\"GstSDPMessage.origin\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("origin") + "\""); + Console.WriteLine("\"GstSDPMessage.session_name\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("session_name") + "\""); + Console.WriteLine("\"GstSDPMessage.information\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("information") + "\""); + Console.WriteLine("\"GstSDPMessage.uri\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("uri") + "\""); + Console.WriteLine("\"GstSDPMessage.emails\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("emails") + "\""); + Console.WriteLine("\"GstSDPMessage.phones\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("phones") + "\""); + Console.WriteLine("\"GstSDPMessage.connection\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("connection") + "\""); + Console.WriteLine("\"GstSDPMessage.bandwidths\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("bandwidths") + "\""); + Console.WriteLine("\"GstSDPMessage.times\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("times") + "\""); + Console.WriteLine("\"GstSDPMessage.zones\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("zones") + "\""); + Console.WriteLine("\"GstSDPMessage.key\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("key") + "\""); + Console.WriteLine("\"GstSDPMessage.attributes\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("attributes") + "\""); + Console.WriteLine("\"GstSDPMessage.medias\": \"" + Gst.Sdp.SDPMessage.abi_info.GetFieldOffset("medias") + "\""); + Console.WriteLine("\"sizeof(GstTagDemuxClass)\": \"" + Gst.Tags.TagDemux.class_abi.Size + "\""); + Console.WriteLine("\"GstTagDemuxClass.min_start_size\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("min_start_size") + "\""); + Console.WriteLine("\"GstTagDemuxClass.min_end_size\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("min_end_size") + "\""); + Console.WriteLine("\"GstTagDemuxClass.identify_tag\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("identify_tag") + "\""); + Console.WriteLine("\"GstTagDemuxClass.parse_tag\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("parse_tag") + "\""); + Console.WriteLine("\"GstTagDemuxClass.merge_tags\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("merge_tags") + "\""); + Console.WriteLine("\"GstTagDemuxClass.reserved\": \"" + Gst.Tags.TagDemux.class_abi.GetFieldOffset("reserved") + "\""); + Console.WriteLine("\"sizeof(GstTagDemux)\": \"" + Gst.Tags.TagDemux.abi_info.Size + "\""); + Console.WriteLine("\"GstTagDemux.priv\": \"" + Gst.Tags.TagDemux.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"GstTagDemux.reserved\": \"" + Gst.Tags.TagDemux.abi_info.GetFieldOffset("reserved") + "\""); + Console.WriteLine("\"sizeof(GstTagMuxClass)\": \"" + Gst.Tags.TagMux.class_abi.Size + "\""); + Console.WriteLine("\"GstTagMuxClass.render_start_tag\": \"" + Gst.Tags.TagMux.class_abi.GetFieldOffset("render_start_tag") + "\""); + Console.WriteLine("\"GstTagMuxClass.render_end_tag\": \"" + Gst.Tags.TagMux.class_abi.GetFieldOffset("render_end_tag") + "\""); + Console.WriteLine("\"sizeof(GstTagMux)\": \"" + Gst.Tags.TagMux.abi_info.Size + "\""); + Console.WriteLine("\"GstTagMux.priv\": \"" + Gst.Tags.TagMux.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstColorBalanceChannelClass)\": \"" + Gst.Video.ColorBalanceChannel.class_abi.Size + "\""); + Console.WriteLine("\"GstColorBalanceChannelClass.value_changed\": \"" + Gst.Video.ColorBalanceChannel.class_abi.GetFieldOffset("value_changed") + "\""); + Console.WriteLine("\"sizeof(GstColorBalanceChannel)\": \"" + Gst.Video.ColorBalanceChannel.abi_info.Size + "\""); + Console.WriteLine("\"GstColorBalanceChannel.label\": \"" + Gst.Video.ColorBalanceChannel.abi_info.GetFieldOffset("label") + "\""); + Console.WriteLine("\"GstColorBalanceChannel.min_value\": \"" + Gst.Video.ColorBalanceChannel.abi_info.GetFieldOffset("min_value") + "\""); + Console.WriteLine("\"GstColorBalanceChannel.max_value\": \"" + Gst.Video.ColorBalanceChannel.abi_info.GetFieldOffset("max_value") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregatorClass)\": \"" + Gst.Video.VideoAggregator.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoAggregatorClass.update_caps\": \"" + Gst.Video.VideoAggregator.class_abi.GetFieldOffset("update_caps") + "\""); + Console.WriteLine("\"GstVideoAggregatorClass.aggregate_frames\": \"" + Gst.Video.VideoAggregator.class_abi.GetFieldOffset("aggregate_frames") + "\""); + Console.WriteLine("\"GstVideoAggregatorClass.create_output_buffer\": \"" + Gst.Video.VideoAggregator.class_abi.GetFieldOffset("create_output_buffer") + "\""); + Console.WriteLine("\"GstVideoAggregatorClass.find_best_format\": \"" + Gst.Video.VideoAggregator.class_abi.GetFieldOffset("find_best_format") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregator)\": \"" + Gst.Video.VideoAggregator.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoAggregator.info\": \"" + Gst.Video.VideoAggregator.abi_info.GetFieldOffset("info") + "\""); + Console.WriteLine("\"GstVideoAggregator.priv\": \"" + Gst.Video.VideoAggregator.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregatorConvertPadClass)\": \"" + Gst.Video.VideoAggregatorConvertPad.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoAggregatorConvertPadClass.create_conversion_info\": \"" + Gst.Video.VideoAggregatorConvertPad.class_abi.GetFieldOffset("create_conversion_info") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregatorConvertPad)\": \"" + Gst.Video.VideoAggregatorConvertPad.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoAggregatorConvertPad.priv\": \"" + Gst.Video.VideoAggregatorConvertPad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregatorPadClass)\": \"" + Gst.Video.VideoAggregatorPad.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoAggregatorPadClass.update_conversion_info\": \"" + Gst.Video.VideoAggregatorPad.class_abi.GetFieldOffset("update_conversion_info") + "\""); + Console.WriteLine("\"GstVideoAggregatorPadClass.prepare_frame\": \"" + Gst.Video.VideoAggregatorPad.class_abi.GetFieldOffset("prepare_frame") + "\""); + Console.WriteLine("\"GstVideoAggregatorPadClass.clean_frame\": \"" + Gst.Video.VideoAggregatorPad.class_abi.GetFieldOffset("clean_frame") + "\""); + Console.WriteLine("\"sizeof(GstVideoAggregatorPad)\": \"" + Gst.Video.VideoAggregatorPad.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoAggregatorPad.info\": \"" + Gst.Video.VideoAggregatorPad.abi_info.GetFieldOffset("info") + "\""); + Console.WriteLine("\"GstVideoAggregatorPad.priv\": \"" + Gst.Video.VideoAggregatorPad.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoBufferPool)\": \"" + Gst.Video.VideoBufferPool.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoBufferPool.priv\": \"" + Gst.Video.VideoBufferPool.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoDecoderClass)\": \"" + Gst.Video.VideoDecoder.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoDecoderClass.open\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.close\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.start\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.stop\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.parse\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("parse") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.set_format\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("set_format") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.reset\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("reset") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.finish\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("finish") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.handle_frame\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("handle_frame") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.sink_event\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.src_event\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.negotiate\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.decide_allocation\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.propose_allocation\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.flush\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.sink_query\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.src_query\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.getcaps\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("getcaps") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.drain\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("drain") + "\""); + Console.WriteLine("\"GstVideoDecoderClass.transform_meta\": \"" + Gst.Video.VideoDecoder.class_abi.GetFieldOffset("transform_meta") + "\""); + Console.WriteLine("\"sizeof(GstVideoDecoder)\": \"" + Gst.Video.VideoDecoder.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoDecoder.sinkpad\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstVideoDecoder.srcpad\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstVideoDecoder.stream_lock\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("stream_lock") + "\""); + Console.WriteLine("\"GstVideoDecoder.input_segment\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("input_segment") + "\""); + Console.WriteLine("\"GstVideoDecoder.output_segment\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("output_segment") + "\""); + Console.WriteLine("\"GstVideoDecoder.priv\": \"" + Gst.Video.VideoDecoder.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoEncoderClass)\": \"" + Gst.Video.VideoEncoder.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoEncoderClass.open\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("open") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.close\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("close") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.start\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("start") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.stop\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("stop") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.set_format\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("set_format") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.handle_frame\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("handle_frame") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.reset\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("reset") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.finish\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("finish") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.pre_push\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("pre_push") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.getcaps\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("getcaps") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.sink_event\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("sink_event") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.src_event\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("src_event") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.negotiate\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("negotiate") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.decide_allocation\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("decide_allocation") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.propose_allocation\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("propose_allocation") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.flush\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("flush") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.sink_query\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("sink_query") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.src_query\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("src_query") + "\""); + Console.WriteLine("\"GstVideoEncoderClass.transform_meta\": \"" + Gst.Video.VideoEncoder.class_abi.GetFieldOffset("transform_meta") + "\""); + Console.WriteLine("\"sizeof(GstVideoEncoder)\": \"" + Gst.Video.VideoEncoder.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoEncoder.sinkpad\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("sinkpad") + "\""); + Console.WriteLine("\"GstVideoEncoder.srcpad\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("srcpad") + "\""); + Console.WriteLine("\"GstVideoEncoder.stream_lock\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("stream_lock") + "\""); + Console.WriteLine("\"GstVideoEncoder.input_segment\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("input_segment") + "\""); + Console.WriteLine("\"GstVideoEncoder.output_segment\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("output_segment") + "\""); + Console.WriteLine("\"GstVideoEncoder.priv\": \"" + Gst.Video.VideoEncoder.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoFilterClass)\": \"" + Gst.Video.VideoFilter.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoFilterClass.set_info\": \"" + Gst.Video.VideoFilter.class_abi.GetFieldOffset("set_info") + "\""); + Console.WriteLine("\"GstVideoFilterClass.transform_frame\": \"" + Gst.Video.VideoFilter.class_abi.GetFieldOffset("transform_frame") + "\""); + Console.WriteLine("\"GstVideoFilterClass.transform_frame_ip\": \"" + Gst.Video.VideoFilter.class_abi.GetFieldOffset("transform_frame_ip") + "\""); + Console.WriteLine("\"sizeof(GstVideoFilter)\": \"" + Gst.Video.VideoFilter.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoFilter.negotiated\": \"" + Gst.Video.VideoFilter.abi_info.GetFieldOffset("negotiated") + "\""); + Console.WriteLine("\"GstVideoFilter.in_info\": \"" + Gst.Video.VideoFilter.abi_info.GetFieldOffset("in_info") + "\""); + Console.WriteLine("\"GstVideoFilter.out_info\": \"" + Gst.Video.VideoFilter.abi_info.GetFieldOffset("out_info") + "\""); + Console.WriteLine("\"sizeof(GstVideoSinkClass)\": \"" + Gst.Video.VideoSink.class_abi.Size + "\""); + Console.WriteLine("\"GstVideoSinkClass.show_frame\": \"" + Gst.Video.VideoSink.class_abi.GetFieldOffset("show_frame") + "\""); + Console.WriteLine("\"sizeof(GstVideoSink)\": \"" + Gst.Video.VideoSink.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoSink.width\": \"" + Gst.Video.VideoSink.abi_info.GetFieldOffset("width") + "\""); + Console.WriteLine("\"GstVideoSink.height\": \"" + Gst.Video.VideoSink.abi_info.GetFieldOffset("height") + "\""); + Console.WriteLine("\"GstVideoSink.priv\": \"" + Gst.Video.VideoSink.abi_info.GetFieldOffset("priv") + "\""); + Console.WriteLine("\"sizeof(GstVideoInfo)\": \"" + Gst.Video.VideoInfo.abi_info.Size + "\""); + Console.WriteLine("\"GstVideoInfo.finfo\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("finfo") + "\""); + Console.WriteLine("\"GstVideoInfo.interlace_mode\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("interlace_mode") + "\""); + Console.WriteLine("\"GstVideoInfo.flags\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("flags") + "\""); + Console.WriteLine("\"GstVideoInfo.width\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("width") + "\""); + Console.WriteLine("\"GstVideoInfo.height\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("height") + "\""); + Console.WriteLine("\"GstVideoInfo.size\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("size") + "\""); + Console.WriteLine("\"GstVideoInfo.views\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("views") + "\""); + Console.WriteLine("\"GstVideoInfo.chroma_site\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("chroma_site") + "\""); + Console.WriteLine("\"GstVideoInfo.colorimetry\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("colorimetry") + "\""); + Console.WriteLine("\"GstVideoInfo.par_n\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("par_n") + "\""); + Console.WriteLine("\"GstVideoInfo.par_d\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("par_d") + "\""); + Console.WriteLine("\"GstVideoInfo.fps_n\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("fps_n") + "\""); + Console.WriteLine("\"GstVideoInfo.fps_d\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("fps_d") + "\""); + Console.WriteLine("\"GstVideoInfo.offset\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("offset") + "\""); + Console.WriteLine("\"GstVideoInfo.stride\": \"" + Gst.Video.VideoInfo.abi_info.GetFieldOffset("stride") + "\""); + } + } +} diff --git a/sources/generated/gstreamer-sharp-api.xml b/sources/generated/gstreamer-sharp-api.xml new file mode 100644 index 0000000000..e1d046cb3a --- /dev/null +++ b/sources/generated/gstreamer-sharp-api.xml @@ -0,0 +1,31491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + missing glib:type-name + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + missing glib:type-name + + + + + + + + missing glib:type-name + + + + + + + + + missing glib:type-name + + + + + + + + + + missing glib:type-name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +