GstCheck-1.0.gir 161 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661
  1. <?xml version="1.0"?>
  2. <!-- This file was automatically generated from C sources - DO NOT EDIT!
  3. To affect the contents of this file, edit the original C definitions,
  4. and/or use gtk-doc annotations. -->
  5. <repository version="1.2"
  6. xmlns="http://www.gtk.org/introspection/core/1.0"
  7. xmlns:c="http://www.gtk.org/introspection/c/1.0"
  8. xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  9. <include name="Gst" version="1.0"/>
  10. <package name="gstreamer-check-1.0"/>
  11. <c:include name="gst/check/check.h"/>
  12. <namespace name="GstCheck"
  13. version="1.0"
  14. shared-library="libgstcheck-1.0.so.0"
  15. c:identifier-prefixes="Gst"
  16. c:symbol-prefixes="gst">
  17. <record name="CheckABIStruct" c:type="GstCheckABIStruct">
  18. <field name="name" writable="1">
  19. <type name="utf8" c:type="const char*"/>
  20. </field>
  21. <field name="size" writable="1">
  22. <type name="gint" c:type="int"/>
  23. </field>
  24. <field name="abi_size" writable="1">
  25. <type name="gint" c:type="int"/>
  26. </field>
  27. </record>
  28. <record name="Harness" c:type="GstHarness" version="1.6">
  29. <doc xml:space="preserve">#GstHarness is meant to make writing unit test for GStreamer much easier.
  30. It can be thought of as a way of treating a #GstElement as a black box,
  31. deterministically feeding it data, and controlling what data it outputs.
  32. The basic structure of #GstHarness is two "floating" #GstPads that connect
  33. to the harnessed #GstElement src and sink #GstPads like so:
  34. &lt;programlisting&gt;
  35. __________________________
  36. _____ | _____ _____ | _____
  37. | | | | | | | | | |
  38. | src |--+-| sink| Element | src |-+--| sink|
  39. |_____| | |_____| |_____| | |_____|
  40. |__________________________|
  41. &lt;/programlisting&gt;
  42. With this, you can now simulate any environment the #GstElement might find
  43. itself in. By specifying the #GstCaps of the harness #GstPads, using
  44. functions like gst_harness_set_src_caps() or gst_harness_set_sink_caps_str(),
  45. you can test how the #GstElement interacts with different caps sets.
  46. Your harnessed #GstElement can of course also be a bin, and using
  47. gst_harness_new_parse() supporting standard gst-launch syntax, you can
  48. easily test a whole pipeline instead of just one element.
  49. You can then go on to push #GstBuffers and #GstEvents on to the srcpad,
  50. using functions like gst_harness_push() and gst_harness_push_event(), and
  51. then pull them out to examine them with gst_harness_pull() and
  52. gst_harness_pull_event().
  53. &lt;example&gt;
  54. &lt;title&gt;A simple buffer-in buffer-out example&lt;/title&gt;
  55. &lt;programlisting language="c"&gt;
  56. #include &amp;lt;gst/gst.h&amp;gt;
  57. #include &amp;lt;gst/check/gstharness.h&amp;gt;
  58. GstHarness *h;
  59. GstBuffer *in_buf;
  60. GstBuffer *out_buf;
  61. // attach the harness to the src and sink pad of GstQueue
  62. h = gst_harness_new ("queue");
  63. // we must specify a caps before pushing buffers
  64. gst_harness_set_src_caps_str (h, "mycaps");
  65. // create a buffer of size 42
  66. in_buf = gst_harness_create_buffer (h, 42);
  67. // push the buffer into the queue
  68. gst_harness_push (h, in_buf);
  69. // pull the buffer from the queue
  70. out_buf = gst_harness_pull (h);
  71. // validate the buffer in is the same as buffer out
  72. fail_unless (in_buf == out_buf);
  73. // cleanup
  74. gst_buffer_unref (out_buf);
  75. gst_harness_teardown (h);
  76. &lt;/programlisting&gt;
  77. &lt;/example&gt;
  78. Another main feature of the #GstHarness is its integration with the
  79. #GstTestClock. Operating the #GstTestClock can be very challenging, but
  80. #GstHarness simplifies some of the most desired actions a lot, like wanting
  81. to manually advance the clock while at the same time releasing a #GstClockID
  82. that is waiting, with functions like gst_harness_crank_single_clock_wait().
  83. #GstHarness also supports sub-harnesses, as a way of generating and
  84. validating data. A sub-harness is another #GstHarness that is managed by
  85. the "parent" harness, and can either be created by using the standard
  86. gst_harness_new type functions directly on the (GstHarness *)-&gt;src_harness,
  87. or using the much more convenient gst_harness_add_src() or
  88. gst_harness_add_sink_parse(). If you have a decoder-element you want to test,
  89. (like vp8dec) it can be very useful to add a src-harness with both a
  90. src-element (videotestsrc) and an encoder (vp8enc) to feed the decoder data
  91. with different configurations, by simply doing:
  92. &lt;example&gt;
  93. &lt;programlisting language="c"&gt;
  94. GstHarness * h = gst_harness_new (h, "vp8dec");
  95. gst_harness_add_src_parse (h, "videotestsrc is-live=1 ! vp8enc", TRUE);
  96. &lt;/programlisting&gt;
  97. &lt;/example&gt;
  98. and then feeding it data with:
  99. &lt;example&gt;
  100. &lt;programlisting language="c"&gt;
  101. gst_harness_push_from_src (h);
  102. &lt;/programlisting&gt;
  103. &lt;/example&gt;</doc>
  104. <field name="element" writable="1">
  105. <doc xml:space="preserve">the element inside the harness</doc>
  106. <type name="Gst.Element" c:type="GstElement*"/>
  107. </field>
  108. <field name="srcpad" writable="1">
  109. <doc xml:space="preserve">the internal harness source pad</doc>
  110. <type name="Gst.Pad" c:type="GstPad*"/>
  111. </field>
  112. <field name="sinkpad" writable="1">
  113. <doc xml:space="preserve">the internal harness sink pad</doc>
  114. <type name="Gst.Pad" c:type="GstPad*"/>
  115. </field>
  116. <field name="src_harness" writable="1">
  117. <doc xml:space="preserve">the source (input) harness (if any)</doc>
  118. <type name="Harness" c:type="GstHarness*"/>
  119. </field>
  120. <field name="sink_harness" writable="1">
  121. <doc xml:space="preserve">the sink (output) harness (if any)</doc>
  122. <type name="Harness" c:type="GstHarness*"/>
  123. </field>
  124. <field name="priv" readable="0" private="1">
  125. <type name="HarnessPrivate" c:type="GstHarnessPrivate*"/>
  126. </field>
  127. <method name="add_element_full"
  128. c:identifier="gst_harness_add_element_full"
  129. version="1.6"
  130. introspectable="0">
  131. <doc xml:space="preserve">Adds a #GstElement to an empty #GstHarness
  132. MT safe.</doc>
  133. <return-value transfer-ownership="none">
  134. <type name="none" c:type="void"/>
  135. </return-value>
  136. <parameters>
  137. <instance-parameter name="h" transfer-ownership="none">
  138. <doc xml:space="preserve">a #GstHarness</doc>
  139. <type name="Harness" c:type="GstHarness*"/>
  140. </instance-parameter>
  141. <parameter name="element" transfer-ownership="none">
  142. <doc xml:space="preserve">a #GstElement to add to the harness (transfer none)</doc>
  143. <type name="Gst.Element" c:type="GstElement*"/>
  144. </parameter>
  145. <parameter name="hsrc"
  146. transfer-ownership="none"
  147. nullable="1"
  148. allow-none="1">
  149. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness srcpad.
  150. %NULL will not create a harness srcpad.</doc>
  151. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  152. </parameter>
  153. <parameter name="element_sinkpad_name"
  154. transfer-ownership="none"
  155. nullable="1"
  156. allow-none="1">
  157. <doc xml:space="preserve">a #gchar with the name of the element
  158. sinkpad that is then linked to the harness srcpad. Can be a static or request
  159. or a sometimes pad that has been added. %NULL will not get/request a sinkpad
  160. from the element. (Like if the element is a src.)</doc>
  161. <type name="utf8" c:type="const gchar*"/>
  162. </parameter>
  163. <parameter name="hsink"
  164. transfer-ownership="none"
  165. nullable="1"
  166. allow-none="1">
  167. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness sinkpad.
  168. %NULL will not create a harness sinkpad.</doc>
  169. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  170. </parameter>
  171. <parameter name="element_srcpad_name"
  172. transfer-ownership="none"
  173. nullable="1"
  174. allow-none="1">
  175. <doc xml:space="preserve">a #gchar with the name of the element
  176. srcpad that is then linked to the harness sinkpad, similar to the
  177. @element_sinkpad_name.</doc>
  178. <type name="utf8" c:type="const gchar*"/>
  179. </parameter>
  180. </parameters>
  181. </method>
  182. <method name="add_element_sink_pad"
  183. c:identifier="gst_harness_add_element_sink_pad"
  184. version="1.6">
  185. <doc xml:space="preserve">Links the specifed #GstPad the @GstHarness srcpad.
  186. MT safe.</doc>
  187. <return-value transfer-ownership="none">
  188. <type name="none" c:type="void"/>
  189. </return-value>
  190. <parameters>
  191. <instance-parameter name="h" transfer-ownership="none">
  192. <doc xml:space="preserve">a #GstHarness</doc>
  193. <type name="Harness" c:type="GstHarness*"/>
  194. </instance-parameter>
  195. <parameter name="sinkpad" transfer-ownership="none">
  196. <doc xml:space="preserve">a #GstPad to link to the harness srcpad</doc>
  197. <type name="Gst.Pad" c:type="GstPad*"/>
  198. </parameter>
  199. </parameters>
  200. </method>
  201. <method name="add_element_src_pad"
  202. c:identifier="gst_harness_add_element_src_pad"
  203. version="1.6">
  204. <doc xml:space="preserve">Links the specifed #GstPad the @GstHarness sinkpad. This can be useful if
  205. perhaps the srcpad did not exist at the time of creating the harness,
  206. like a demuxer that provides a sometimes-pad after receiving data.
  207. MT safe.</doc>
  208. <return-value transfer-ownership="none">
  209. <type name="none" c:type="void"/>
  210. </return-value>
  211. <parameters>
  212. <instance-parameter name="h" transfer-ownership="none">
  213. <doc xml:space="preserve">a #GstHarness</doc>
  214. <type name="Harness" c:type="GstHarness*"/>
  215. </instance-parameter>
  216. <parameter name="srcpad" transfer-ownership="none">
  217. <doc xml:space="preserve">a #GstPad to link to the harness sinkpad</doc>
  218. <type name="Gst.Pad" c:type="GstPad*"/>
  219. </parameter>
  220. </parameters>
  221. </method>
  222. <method name="add_parse"
  223. c:identifier="gst_harness_add_parse"
  224. version="1.6"
  225. introspectable="0">
  226. <doc xml:space="preserve">Parses the @launchline and puts that in a #GstBin,
  227. and then attches the supplied #GstHarness to the bin.
  228. MT safe.</doc>
  229. <return-value transfer-ownership="none">
  230. <type name="none" c:type="void"/>
  231. </return-value>
  232. <parameters>
  233. <instance-parameter name="h" transfer-ownership="none">
  234. <doc xml:space="preserve">a #GstHarness</doc>
  235. <type name="Harness" c:type="GstHarness*"/>
  236. </instance-parameter>
  237. <parameter name="launchline" transfer-ownership="none">
  238. <doc xml:space="preserve">a #gchar describing a gst-launch type line</doc>
  239. <type name="utf8" c:type="const gchar*"/>
  240. </parameter>
  241. </parameters>
  242. </method>
  243. <method name="add_probe"
  244. c:identifier="gst_harness_add_probe"
  245. version="1.6">
  246. <doc xml:space="preserve">A convenience function to allows you to call gst_pad_add_probe on a
  247. #GstPad of a #GstElement that are residing inside the #GstHarness,
  248. by using normal gst_pad_add_probe syntax
  249. MT safe.</doc>
  250. <return-value transfer-ownership="none">
  251. <type name="none" c:type="void"/>
  252. </return-value>
  253. <parameters>
  254. <instance-parameter name="h" transfer-ownership="none">
  255. <doc xml:space="preserve">a #GstHarness</doc>
  256. <type name="Harness" c:type="GstHarness*"/>
  257. </instance-parameter>
  258. <parameter name="element_name" transfer-ownership="none">
  259. <doc xml:space="preserve">a #gchar with a #GstElementFactory name</doc>
  260. <type name="utf8" c:type="const gchar*"/>
  261. </parameter>
  262. <parameter name="pad_name" transfer-ownership="none">
  263. <doc xml:space="preserve">a #gchar with the name of the pad to attach the probe to</doc>
  264. <type name="utf8" c:type="const gchar*"/>
  265. </parameter>
  266. <parameter name="mask" transfer-ownership="none">
  267. <doc xml:space="preserve">a #GstPadProbeType (see gst_pad_add_probe)</doc>
  268. <type name="Gst.PadProbeType" c:type="GstPadProbeType"/>
  269. </parameter>
  270. <parameter name="callback"
  271. transfer-ownership="none"
  272. scope="notified"
  273. closure="4"
  274. destroy="5">
  275. <doc xml:space="preserve">a #GstPadProbeCallback (see gst_pad_add_probe)</doc>
  276. <type name="Gst.PadProbeCallback" c:type="GstPadProbeCallback"/>
  277. </parameter>
  278. <parameter name="user_data"
  279. transfer-ownership="none"
  280. nullable="1"
  281. allow-none="1">
  282. <doc xml:space="preserve">a #gpointer (see gst_pad_add_probe)</doc>
  283. <type name="gpointer" c:type="gpointer"/>
  284. </parameter>
  285. <parameter name="destroy_data"
  286. transfer-ownership="none"
  287. scope="async">
  288. <doc xml:space="preserve">a #GDestroyNotify (see gst_pad_add_probe)</doc>
  289. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  290. </parameter>
  291. </parameters>
  292. </method>
  293. <method name="add_sink"
  294. c:identifier="gst_harness_add_sink"
  295. version="1.6">
  296. <doc xml:space="preserve">Similar to gst_harness_add_sink_harness, this is a convenience to
  297. directly create a sink-harness using the @sink_element_name name specified.
  298. MT safe.</doc>
  299. <return-value transfer-ownership="none">
  300. <type name="none" c:type="void"/>
  301. </return-value>
  302. <parameters>
  303. <instance-parameter name="h" transfer-ownership="none">
  304. <doc xml:space="preserve">a #GstHarness</doc>
  305. <type name="Harness" c:type="GstHarness*"/>
  306. </instance-parameter>
  307. <parameter name="sink_element_name" transfer-ownership="none">
  308. <doc xml:space="preserve">a #gchar with the name of a #GstElement</doc>
  309. <type name="utf8" c:type="const gchar*"/>
  310. </parameter>
  311. </parameters>
  312. </method>
  313. <method name="add_sink_harness"
  314. c:identifier="gst_harness_add_sink_harness"
  315. version="1.6">
  316. <doc xml:space="preserve">Similar to gst_harness_add_src, this allows you to send the data coming out
  317. of your harnessed #GstElement to a sink-element, allowing to test different
  318. responses the element output might create in sink elements. An example might
  319. be an existing sink providing some analytical data on the input it receives that
  320. can be useful to your testing. If the goal is to test a sink-element itself,
  321. this is better acheived using gst_harness_new directly on the sink.
  322. If a sink-harness already exists it will be replaced.
  323. MT safe.</doc>
  324. <return-value transfer-ownership="none">
  325. <type name="none" c:type="void"/>
  326. </return-value>
  327. <parameters>
  328. <instance-parameter name="h" transfer-ownership="none">
  329. <doc xml:space="preserve">a #GstHarness</doc>
  330. <type name="Harness" c:type="GstHarness*"/>
  331. </instance-parameter>
  332. <parameter name="sink_harness" transfer-ownership="full">
  333. <doc xml:space="preserve">a #GstHarness to be added as a sink-harness.</doc>
  334. <type name="Harness" c:type="GstHarness*"/>
  335. </parameter>
  336. </parameters>
  337. </method>
  338. <method name="add_sink_parse"
  339. c:identifier="gst_harness_add_sink_parse"
  340. version="1.6">
  341. <doc xml:space="preserve">Similar to gst_harness_add_sink, this allows you to specify a launch-line
  342. instead of just an element name. See gst_harness_add_src_parse for details.
  343. MT safe.</doc>
  344. <return-value transfer-ownership="none">
  345. <type name="none" c:type="void"/>
  346. </return-value>
  347. <parameters>
  348. <instance-parameter name="h" transfer-ownership="none">
  349. <doc xml:space="preserve">a #GstHarness</doc>
  350. <type name="Harness" c:type="GstHarness*"/>
  351. </instance-parameter>
  352. <parameter name="launchline" transfer-ownership="none">
  353. <doc xml:space="preserve">a #gchar with the name of a #GstElement</doc>
  354. <type name="utf8" c:type="const gchar*"/>
  355. </parameter>
  356. </parameters>
  357. </method>
  358. <method name="add_src" c:identifier="gst_harness_add_src" version="1.6">
  359. <doc xml:space="preserve">Similar to gst_harness_add_src_harness, this is a convenience to
  360. directly create a src-harness using the @src_element_name name specified.
  361. MT safe.</doc>
  362. <return-value transfer-ownership="none">
  363. <type name="none" c:type="void"/>
  364. </return-value>
  365. <parameters>
  366. <instance-parameter name="h" transfer-ownership="none">
  367. <doc xml:space="preserve">a #GstHarness</doc>
  368. <type name="Harness" c:type="GstHarness*"/>
  369. </instance-parameter>
  370. <parameter name="src_element_name" transfer-ownership="none">
  371. <doc xml:space="preserve">a #gchar with the name of a #GstElement</doc>
  372. <type name="utf8" c:type="const gchar*"/>
  373. </parameter>
  374. <parameter name="has_clock_wait" transfer-ownership="none">
  375. <doc xml:space="preserve">a #gboolean specifying if the #GstElement uses
  376. gst_clock_wait_id internally.</doc>
  377. <type name="gboolean" c:type="gboolean"/>
  378. </parameter>
  379. </parameters>
  380. </method>
  381. <method name="add_src_harness"
  382. c:identifier="gst_harness_add_src_harness"
  383. version="1.6">
  384. <doc xml:space="preserve">A src-harness is a great way of providing the #GstHarness with data.
  385. By adding a src-type #GstElement, it is then easy to use functions like
  386. gst_harness_push_from_src or gst_harness_src_crank_and_push_many
  387. to provide your harnessed element with input. The @has_clock_wait variable
  388. is a greate way to control you src-element with, in that you can have it
  389. produce a buffer for you by simply cranking the clock, and not have it
  390. spin out of control producing buffers as fast as possible.
  391. If a src-harness already exists it will be replaced.
  392. MT safe.</doc>
  393. <return-value transfer-ownership="none">
  394. <type name="none" c:type="void"/>
  395. </return-value>
  396. <parameters>
  397. <instance-parameter name="h" transfer-ownership="none">
  398. <doc xml:space="preserve">a #GstHarness</doc>
  399. <type name="Harness" c:type="GstHarness*"/>
  400. </instance-parameter>
  401. <parameter name="src_harness" transfer-ownership="full">
  402. <doc xml:space="preserve">a #GstHarness to be added as a src-harness.</doc>
  403. <type name="Harness" c:type="GstHarness*"/>
  404. </parameter>
  405. <parameter name="has_clock_wait" transfer-ownership="none">
  406. <doc xml:space="preserve">a #gboolean specifying if the #GstElement uses
  407. gst_clock_wait_id internally.</doc>
  408. <type name="gboolean" c:type="gboolean"/>
  409. </parameter>
  410. </parameters>
  411. </method>
  412. <method name="add_src_parse"
  413. c:identifier="gst_harness_add_src_parse"
  414. version="1.6">
  415. <doc xml:space="preserve">Similar to gst_harness_add_src, this allows you to specify a launch-line,
  416. which can be useful for both having more then one #GstElement acting as your
  417. src (Like a src producing raw buffers, and then an encoder, providing encoded
  418. data), but also by allowing you to set properties like "is-live" directly on
  419. the elements.
  420. MT safe.</doc>
  421. <return-value transfer-ownership="none">
  422. <type name="none" c:type="void"/>
  423. </return-value>
  424. <parameters>
  425. <instance-parameter name="h" transfer-ownership="none">
  426. <doc xml:space="preserve">a #GstHarness</doc>
  427. <type name="Harness" c:type="GstHarness*"/>
  428. </instance-parameter>
  429. <parameter name="launchline" transfer-ownership="none">
  430. <doc xml:space="preserve">a #gchar describing a gst-launch type line</doc>
  431. <type name="utf8" c:type="const gchar*"/>
  432. </parameter>
  433. <parameter name="has_clock_wait" transfer-ownership="none">
  434. <doc xml:space="preserve">a #gboolean specifying if the #GstElement uses
  435. gst_clock_wait_id internally.</doc>
  436. <type name="gboolean" c:type="gboolean"/>
  437. </parameter>
  438. </parameters>
  439. </method>
  440. <method name="buffers_in_queue"
  441. c:identifier="gst_harness_buffers_in_queue"
  442. version="1.6">
  443. <doc xml:space="preserve">The number of #GstBuffers currently in the #GstHarness sinkpad #GAsyncQueue
  444. MT safe.</doc>
  445. <return-value transfer-ownership="none">
  446. <doc xml:space="preserve">a #guint number of buffers in the queue</doc>
  447. <type name="guint" c:type="guint"/>
  448. </return-value>
  449. <parameters>
  450. <instance-parameter name="h" transfer-ownership="none">
  451. <doc xml:space="preserve">a #GstHarness</doc>
  452. <type name="Harness" c:type="GstHarness*"/>
  453. </instance-parameter>
  454. </parameters>
  455. </method>
  456. <method name="buffers_received"
  457. c:identifier="gst_harness_buffers_received"
  458. version="1.6">
  459. <doc xml:space="preserve">The total number of #GstBuffers that has arrived on the #GstHarness sinkpad.
  460. This number includes buffers that have been dropped as well as buffers
  461. that have already been pulled out.
  462. MT safe.</doc>
  463. <return-value transfer-ownership="none">
  464. <doc xml:space="preserve">a #guint number of buffers received</doc>
  465. <type name="guint" c:type="guint"/>
  466. </return-value>
  467. <parameters>
  468. <instance-parameter name="h" transfer-ownership="none">
  469. <doc xml:space="preserve">a #GstHarness</doc>
  470. <type name="Harness" c:type="GstHarness*"/>
  471. </instance-parameter>
  472. </parameters>
  473. </method>
  474. <method name="crank_multiple_clock_waits"
  475. c:identifier="gst_harness_crank_multiple_clock_waits"
  476. version="1.6">
  477. <doc xml:space="preserve">Similar to gst_harness_crank_single_clock_wait(), this is the function to use
  478. if your harnessed element(s) are using more then one gst_clock_id_wait.
  479. Failing to do so can (and will) make it racy which #GstClockID you actually
  480. are releasing, where as this function will process all the waits at the
  481. same time, ensuring that one thread can't register another wait before
  482. both are released.
  483. MT safe.</doc>
  484. <return-value transfer-ownership="none">
  485. <doc xml:space="preserve">a @gboolean %TRUE if the "crank" was successful, %FALSE if not.</doc>
  486. <type name="gboolean" c:type="gboolean"/>
  487. </return-value>
  488. <parameters>
  489. <instance-parameter name="h" transfer-ownership="none">
  490. <doc xml:space="preserve">a #GstHarness</doc>
  491. <type name="Harness" c:type="GstHarness*"/>
  492. </instance-parameter>
  493. <parameter name="waits" transfer-ownership="none">
  494. <doc xml:space="preserve">a #guint describing the number of #GstClockIDs to crank</doc>
  495. <type name="guint" c:type="guint"/>
  496. </parameter>
  497. </parameters>
  498. </method>
  499. <method name="crank_single_clock_wait"
  500. c:identifier="gst_harness_crank_single_clock_wait"
  501. version="1.6">
  502. <doc xml:space="preserve">A "crank" consists of three steps:
  503. 1: Wait for a #GstClockID to be registered with the #GstTestClock.
  504. 2: Advance the #GstTestClock to the time the #GstClockID is waiting for.
  505. 3: Release the #GstClockID wait.
  506. Together, this provides an easy way to not have to think about the details
  507. around clocks and time, but still being able to write deterministic tests
  508. that are dependant on this. A "crank" can be though of as the notion of
  509. manually driving the clock forward to its next logical step.
  510. MT safe.</doc>
  511. <return-value transfer-ownership="none">
  512. <doc xml:space="preserve">a @gboolean %TRUE if the "crank" was successful, %FALSE if not.</doc>
  513. <type name="gboolean" c:type="gboolean"/>
  514. </return-value>
  515. <parameters>
  516. <instance-parameter name="h" transfer-ownership="none">
  517. <doc xml:space="preserve">a #GstHarness</doc>
  518. <type name="Harness" c:type="GstHarness*"/>
  519. </instance-parameter>
  520. </parameters>
  521. </method>
  522. <method name="create_buffer"
  523. c:identifier="gst_harness_create_buffer"
  524. version="1.6">
  525. <doc xml:space="preserve">Allocates a buffer using a #GstBufferPool if present, or else using the
  526. configured #GstAllocator and #GstAllocationParams
  527. MT safe.</doc>
  528. <return-value transfer-ownership="full">
  529. <doc xml:space="preserve">a #GstBuffer of size @size</doc>
  530. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  531. </return-value>
  532. <parameters>
  533. <instance-parameter name="h" transfer-ownership="none">
  534. <doc xml:space="preserve">a #GstHarness</doc>
  535. <type name="Harness" c:type="GstHarness*"/>
  536. </instance-parameter>
  537. <parameter name="size" transfer-ownership="none">
  538. <doc xml:space="preserve">a #gsize specifying the size of the buffer</doc>
  539. <type name="gsize" c:type="gsize"/>
  540. </parameter>
  541. </parameters>
  542. </method>
  543. <method name="dump_to_file"
  544. c:identifier="gst_harness_dump_to_file"
  545. version="1.6">
  546. <doc xml:space="preserve">Allows you to dump the #GstBuffers the #GstHarness sinkpad #GAsyncQueue
  547. to a file.
  548. MT safe.</doc>
  549. <return-value transfer-ownership="none">
  550. <type name="none" c:type="void"/>
  551. </return-value>
  552. <parameters>
  553. <instance-parameter name="h" transfer-ownership="none">
  554. <doc xml:space="preserve">a #GstHarness</doc>
  555. <type name="Harness" c:type="GstHarness*"/>
  556. </instance-parameter>
  557. <parameter name="filename" transfer-ownership="none">
  558. <doc xml:space="preserve">a #gchar with a the name of a file</doc>
  559. <type name="utf8" c:type="const gchar*"/>
  560. </parameter>
  561. </parameters>
  562. </method>
  563. <method name="events_in_queue"
  564. c:identifier="gst_harness_events_in_queue"
  565. version="1.6">
  566. <doc xml:space="preserve">The number of #GstEvents currently in the #GstHarness sinkpad #GAsyncQueue
  567. MT safe.</doc>
  568. <return-value transfer-ownership="none">
  569. <doc xml:space="preserve">a #guint number of events in the queue</doc>
  570. <type name="guint" c:type="guint"/>
  571. </return-value>
  572. <parameters>
  573. <instance-parameter name="h" transfer-ownership="none">
  574. <doc xml:space="preserve">a #GstHarness</doc>
  575. <type name="Harness" c:type="GstHarness*"/>
  576. </instance-parameter>
  577. </parameters>
  578. </method>
  579. <method name="events_received"
  580. c:identifier="gst_harness_events_received"
  581. version="1.6">
  582. <doc xml:space="preserve">The total number of #GstEvents that has arrived on the #GstHarness sinkpad
  583. This number includes events handled by the harness as well as events
  584. that have already been pulled out.
  585. MT safe.</doc>
  586. <return-value transfer-ownership="none">
  587. <doc xml:space="preserve">a #guint number of events received</doc>
  588. <type name="guint" c:type="guint"/>
  589. </return-value>
  590. <parameters>
  591. <instance-parameter name="h" transfer-ownership="none">
  592. <doc xml:space="preserve">a #GstHarness</doc>
  593. <type name="Harness" c:type="GstHarness*"/>
  594. </instance-parameter>
  595. </parameters>
  596. </method>
  597. <method name="find_element"
  598. c:identifier="gst_harness_find_element"
  599. version="1.6">
  600. <doc xml:space="preserve">Most useful in conjunction with gst_harness_new_parse, this will scan the
  601. #GstElements inside the #GstHarness, and check if any of them matches
  602. @element_name. Typical usecase being that you need to access one of the
  603. harnessed elements for properties and/or signals.
  604. MT safe.</doc>
  605. <return-value transfer-ownership="full" nullable="1">
  606. <doc xml:space="preserve">a #GstElement or %NULL if not found</doc>
  607. <type name="Gst.Element" c:type="GstElement*"/>
  608. </return-value>
  609. <parameters>
  610. <instance-parameter name="h" transfer-ownership="none">
  611. <doc xml:space="preserve">a #GstHarness</doc>
  612. <type name="Harness" c:type="GstHarness*"/>
  613. </instance-parameter>
  614. <parameter name="element_name" transfer-ownership="none">
  615. <doc xml:space="preserve">a #gchar with a #GstElementFactory name</doc>
  616. <type name="utf8" c:type="const gchar*"/>
  617. </parameter>
  618. </parameters>
  619. </method>
  620. <method name="get"
  621. c:identifier="gst_harness_get"
  622. version="1.6"
  623. introspectable="0">
  624. <doc xml:space="preserve">A convenience function to allows you to call g_object_get on a #GstElement
  625. that are residing inside the #GstHarness, by using normal g_object_get
  626. syntax.
  627. MT safe.</doc>
  628. <return-value transfer-ownership="none">
  629. <type name="none" c:type="void"/>
  630. </return-value>
  631. <parameters>
  632. <instance-parameter name="h" transfer-ownership="none">
  633. <doc xml:space="preserve">a #GstHarness</doc>
  634. <type name="Harness" c:type="GstHarness*"/>
  635. </instance-parameter>
  636. <parameter name="element_name" transfer-ownership="none">
  637. <doc xml:space="preserve">a #gchar with a #GstElementFactory name</doc>
  638. <type name="utf8" c:type="const gchar*"/>
  639. </parameter>
  640. <parameter name="first_property_name" transfer-ownership="none">
  641. <doc xml:space="preserve">a #gchar with the first property name</doc>
  642. <type name="utf8" c:type="const gchar*"/>
  643. </parameter>
  644. <parameter name="..." transfer-ownership="none">
  645. <doc xml:space="preserve">return location for the first property, followed optionally by more
  646. name/return location pairs, followed by %NULL</doc>
  647. <varargs/>
  648. </parameter>
  649. </parameters>
  650. </method>
  651. <method name="get_allocator"
  652. c:identifier="gst_harness_get_allocator"
  653. version="1.6">
  654. <doc xml:space="preserve">Gets the @allocator and its @params that has been decided to use after an
  655. allocation query.
  656. MT safe.</doc>
  657. <return-value transfer-ownership="none">
  658. <type name="none" c:type="void"/>
  659. </return-value>
  660. <parameters>
  661. <instance-parameter name="h" transfer-ownership="none">
  662. <doc xml:space="preserve">a #GstHarness</doc>
  663. <type name="Harness" c:type="GstHarness*"/>
  664. </instance-parameter>
  665. <parameter name="allocator"
  666. direction="out"
  667. caller-allocates="0"
  668. transfer-ownership="none"
  669. optional="1"
  670. allow-none="1">
  671. <doc xml:space="preserve">the #GstAllocator used</doc>
  672. <type name="Gst.Allocator" c:type="GstAllocator**"/>
  673. </parameter>
  674. <parameter name="params"
  675. direction="out"
  676. caller-allocates="1"
  677. transfer-ownership="full"
  678. optional="1"
  679. allow-none="1">
  680. <doc xml:space="preserve">the #GstAllocationParams of
  681. @allocator</doc>
  682. <type name="Gst.AllocationParams" c:type="GstAllocationParams*"/>
  683. </parameter>
  684. </parameters>
  685. </method>
  686. <method name="get_last_pushed_timestamp"
  687. c:identifier="gst_harness_get_last_pushed_timestamp"
  688. version="1.6">
  689. <doc xml:space="preserve">Get the timestamp of the last #GstBuffer pushed on the #GstHarness srcpad,
  690. typically with gst_harness_push or gst_harness_push_from_src.
  691. MT safe.</doc>
  692. <return-value transfer-ownership="none">
  693. <doc xml:space="preserve">a #GstClockTime with the timestamp or %GST_CLOCK_TIME_NONE if no
  694. #GstBuffer has been pushed on the #GstHarness srcpad</doc>
  695. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  696. </return-value>
  697. <parameters>
  698. <instance-parameter name="h" transfer-ownership="none">
  699. <doc xml:space="preserve">a #GstHarness</doc>
  700. <type name="Harness" c:type="GstHarness*"/>
  701. </instance-parameter>
  702. </parameters>
  703. </method>
  704. <method name="get_testclock"
  705. c:identifier="gst_harness_get_testclock"
  706. version="1.6">
  707. <doc xml:space="preserve">Get the #GstTestClock. Useful if specific operations on the testclock is
  708. needed.
  709. MT safe.</doc>
  710. <return-value transfer-ownership="full">
  711. <doc xml:space="preserve">a #GstTestClock, or %NULL if the testclock is not
  712. present.</doc>
  713. <type name="TestClock" c:type="GstTestClock*"/>
  714. </return-value>
  715. <parameters>
  716. <instance-parameter name="h" transfer-ownership="none">
  717. <doc xml:space="preserve">a #GstHarness</doc>
  718. <type name="Harness" c:type="GstHarness*"/>
  719. </instance-parameter>
  720. </parameters>
  721. </method>
  722. <method name="play" c:identifier="gst_harness_play" version="1.6">
  723. <doc xml:space="preserve">This will set the harnessed #GstElement to %GST_STATE_PLAYING.
  724. #GstElements without a sink-#GstPad and with the %GST_ELEMENT_FLAG_SOURCE
  725. flag set is concidered a src #GstElement
  726. Non-src #GstElements (like sinks and filters) are automatically set to
  727. playing by the #GstHarness, but src #GstElements are not to avoid them
  728. starting to produce buffers.
  729. Hence, for src #GstElement you must call gst_harness_play() explicitly.
  730. MT safe.</doc>
  731. <return-value transfer-ownership="none">
  732. <type name="none" c:type="void"/>
  733. </return-value>
  734. <parameters>
  735. <instance-parameter name="h" transfer-ownership="none">
  736. <doc xml:space="preserve">a #GstHarness</doc>
  737. <type name="Harness" c:type="GstHarness*"/>
  738. </instance-parameter>
  739. </parameters>
  740. </method>
  741. <method name="pull" c:identifier="gst_harness_pull" version="1.6">
  742. <doc xml:space="preserve">Pulls a #GstBuffer from the #GAsyncQueue on the #GstHarness sinkpad. The pull
  743. will timeout in 60 seconds. This is the standard way of getting a buffer
  744. from a harnessed #GstElement.
  745. MT safe.</doc>
  746. <return-value transfer-ownership="full">
  747. <doc xml:space="preserve">a #GstBuffer or %NULL if timed out.</doc>
  748. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  749. </return-value>
  750. <parameters>
  751. <instance-parameter name="h" transfer-ownership="none">
  752. <doc xml:space="preserve">a #GstHarness</doc>
  753. <type name="Harness" c:type="GstHarness*"/>
  754. </instance-parameter>
  755. </parameters>
  756. </method>
  757. <method name="pull_event"
  758. c:identifier="gst_harness_pull_event"
  759. version="1.6">
  760. <doc xml:space="preserve">Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness sinkpad.
  761. Timeouts after 60 seconds similar to gst_harness_pull.
  762. MT safe.</doc>
  763. <return-value transfer-ownership="full">
  764. <doc xml:space="preserve">a #GstEvent or %NULL if timed out.</doc>
  765. <type name="Gst.Event" c:type="GstEvent*"/>
  766. </return-value>
  767. <parameters>
  768. <instance-parameter name="h" transfer-ownership="none">
  769. <doc xml:space="preserve">a #GstHarness</doc>
  770. <type name="Harness" c:type="GstHarness*"/>
  771. </instance-parameter>
  772. </parameters>
  773. </method>
  774. <method name="pull_upstream_event"
  775. c:identifier="gst_harness_pull_upstream_event"
  776. version="1.6">
  777. <doc xml:space="preserve">Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness srcpad.
  778. Timeouts after 60 seconds similar to gst_harness_pull.
  779. MT safe.</doc>
  780. <return-value transfer-ownership="full">
  781. <doc xml:space="preserve">a #GstEvent or %NULL if timed out.</doc>
  782. <type name="Gst.Event" c:type="GstEvent*"/>
  783. </return-value>
  784. <parameters>
  785. <instance-parameter name="h" transfer-ownership="none">
  786. <doc xml:space="preserve">a #GstHarness</doc>
  787. <type name="Harness" c:type="GstHarness*"/>
  788. </instance-parameter>
  789. </parameters>
  790. </method>
  791. <method name="push" c:identifier="gst_harness_push" version="1.6">
  792. <doc xml:space="preserve">Pushes a #GstBuffer on the #GstHarness srcpad. The standard way of
  793. interacting with an harnessed element.
  794. MT safe.</doc>
  795. <return-value transfer-ownership="none">
  796. <doc xml:space="preserve">a #GstFlowReturn with the result from the push</doc>
  797. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  798. </return-value>
  799. <parameters>
  800. <instance-parameter name="h" transfer-ownership="none">
  801. <doc xml:space="preserve">a #GstHarness</doc>
  802. <type name="Harness" c:type="GstHarness*"/>
  803. </instance-parameter>
  804. <parameter name="buffer" transfer-ownership="none">
  805. <doc xml:space="preserve">a #GstBuffer to push</doc>
  806. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  807. </parameter>
  808. </parameters>
  809. </method>
  810. <method name="push_and_pull"
  811. c:identifier="gst_harness_push_and_pull"
  812. version="1.6">
  813. <doc xml:space="preserve">Basically a gst_harness_push and a gst_harness_pull in one line. Reflects
  814. the fact that you often want to do exactly this in your test: Push one buffer
  815. in, and inspect the outcome.
  816. MT safe.</doc>
  817. <return-value transfer-ownership="full">
  818. <doc xml:space="preserve">a #GstBuffer or %NULL if timed out.</doc>
  819. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  820. </return-value>
  821. <parameters>
  822. <instance-parameter name="h" transfer-ownership="none">
  823. <doc xml:space="preserve">a #GstHarness</doc>
  824. <type name="Harness" c:type="GstHarness*"/>
  825. </instance-parameter>
  826. <parameter name="buffer" transfer-ownership="none">
  827. <doc xml:space="preserve">a #GstBuffer to push</doc>
  828. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  829. </parameter>
  830. </parameters>
  831. </method>
  832. <method name="push_event"
  833. c:identifier="gst_harness_push_event"
  834. version="1.6">
  835. <doc xml:space="preserve">Pushes an #GstEvent on the #GstHarness srcpad.
  836. MT safe.</doc>
  837. <return-value transfer-ownership="none">
  838. <doc xml:space="preserve">a #gboolean with the result from the push</doc>
  839. <type name="gboolean" c:type="gboolean"/>
  840. </return-value>
  841. <parameters>
  842. <instance-parameter name="h" transfer-ownership="none">
  843. <doc xml:space="preserve">a #GstHarness</doc>
  844. <type name="Harness" c:type="GstHarness*"/>
  845. </instance-parameter>
  846. <parameter name="event" transfer-ownership="none">
  847. <doc xml:space="preserve">a #GstEvent to push</doc>
  848. <type name="Gst.Event" c:type="GstEvent*"/>
  849. </parameter>
  850. </parameters>
  851. </method>
  852. <method name="push_from_src"
  853. c:identifier="gst_harness_push_from_src"
  854. version="1.6">
  855. <doc xml:space="preserve">Transfer data from the src-#GstHarness to the main-#GstHarness. It consists
  856. of 4 steps:
  857. 1: Make sure the src is started. (see: gst_harness_play)
  858. 2: Crank the clock (see: gst_harness_crank_single_clock_wait)
  859. 3: Pull a #GstBuffer from the src-#GstHarness (see: gst_harness_pull)
  860. 4: Push the same #GstBuffer into the main-#GstHarness (see: gst_harness_push)
  861. MT safe.</doc>
  862. <return-value transfer-ownership="none">
  863. <doc xml:space="preserve">a #GstFlowReturn with the result of the push</doc>
  864. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  865. </return-value>
  866. <parameters>
  867. <instance-parameter name="h" transfer-ownership="none">
  868. <doc xml:space="preserve">a #GstHarness</doc>
  869. <type name="Harness" c:type="GstHarness*"/>
  870. </instance-parameter>
  871. </parameters>
  872. </method>
  873. <method name="push_to_sink"
  874. c:identifier="gst_harness_push_to_sink"
  875. version="1.6">
  876. <doc xml:space="preserve">Transfer one #GstBuffer from the main-#GstHarness to the sink-#GstHarness.
  877. See gst_harness_push_from_src for details.
  878. MT safe.</doc>
  879. <return-value transfer-ownership="none">
  880. <doc xml:space="preserve">a #GstFlowReturn with the result of the push</doc>
  881. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  882. </return-value>
  883. <parameters>
  884. <instance-parameter name="h" transfer-ownership="none">
  885. <doc xml:space="preserve">a #GstHarness</doc>
  886. <type name="Harness" c:type="GstHarness*"/>
  887. </instance-parameter>
  888. </parameters>
  889. </method>
  890. <method name="push_upstream_event"
  891. c:identifier="gst_harness_push_upstream_event"
  892. version="1.6">
  893. <doc xml:space="preserve">Pushes an #GstEvent on the #GstHarness sinkpad.
  894. MT safe.</doc>
  895. <return-value transfer-ownership="none">
  896. <doc xml:space="preserve">a #gboolean with the result from the push</doc>
  897. <type name="gboolean" c:type="gboolean"/>
  898. </return-value>
  899. <parameters>
  900. <instance-parameter name="h" transfer-ownership="none">
  901. <doc xml:space="preserve">a #GstHarness</doc>
  902. <type name="Harness" c:type="GstHarness*"/>
  903. </instance-parameter>
  904. <parameter name="event" transfer-ownership="none">
  905. <doc xml:space="preserve">a #GstEvent to push</doc>
  906. <type name="Gst.Event" c:type="GstEvent*"/>
  907. </parameter>
  908. </parameters>
  909. </method>
  910. <method name="query_latency"
  911. c:identifier="gst_harness_query_latency"
  912. version="1.6">
  913. <doc xml:space="preserve">Get the min latency reported by any harnessed #GstElement.
  914. MT safe.</doc>
  915. <return-value transfer-ownership="none">
  916. <doc xml:space="preserve">a #GstClockTime with min latency</doc>
  917. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  918. </return-value>
  919. <parameters>
  920. <instance-parameter name="h" transfer-ownership="none">
  921. <doc xml:space="preserve">a #GstHarness</doc>
  922. <type name="Harness" c:type="GstHarness*"/>
  923. </instance-parameter>
  924. </parameters>
  925. </method>
  926. <method name="set"
  927. c:identifier="gst_harness_set"
  928. version="1.6"
  929. introspectable="0">
  930. <doc xml:space="preserve">A convenience function to allows you to call g_object_set on a #GstElement
  931. that are residing inside the #GstHarness, by using normal g_object_set
  932. syntax.
  933. MT safe.</doc>
  934. <return-value transfer-ownership="none">
  935. <type name="none" c:type="void"/>
  936. </return-value>
  937. <parameters>
  938. <instance-parameter name="h" transfer-ownership="none">
  939. <doc xml:space="preserve">a #GstHarness</doc>
  940. <type name="Harness" c:type="GstHarness*"/>
  941. </instance-parameter>
  942. <parameter name="element_name" transfer-ownership="none">
  943. <doc xml:space="preserve">a #gchar with a #GstElementFactory name</doc>
  944. <type name="utf8" c:type="const gchar*"/>
  945. </parameter>
  946. <parameter name="first_property_name" transfer-ownership="none">
  947. <doc xml:space="preserve">a #gchar with the first property name</doc>
  948. <type name="utf8" c:type="const gchar*"/>
  949. </parameter>
  950. <parameter name="..." transfer-ownership="none">
  951. <doc xml:space="preserve">value for the first property, followed optionally by more
  952. name/value pairs, followed by %NULL</doc>
  953. <varargs/>
  954. </parameter>
  955. </parameters>
  956. </method>
  957. <method name="set_blocking_push_mode"
  958. c:identifier="gst_harness_set_blocking_push_mode"
  959. version="1.6">
  960. <doc xml:space="preserve">Setting this will make the harness block in the chain-function, and
  961. then release when gst_harness_pull() or gst_harness_try_pull() is called.
  962. Can be useful when wanting to control a src-element that is not implementing
  963. gst_clock_id_wait() so it can't be controlled by the #GstTestClock, since
  964. it otherwise would produce buffers as fast as possible.
  965. MT safe.</doc>
  966. <return-value transfer-ownership="none">
  967. <type name="none" c:type="void"/>
  968. </return-value>
  969. <parameters>
  970. <instance-parameter name="h" transfer-ownership="none">
  971. <doc xml:space="preserve">a #GstHarness</doc>
  972. <type name="Harness" c:type="GstHarness*"/>
  973. </instance-parameter>
  974. </parameters>
  975. </method>
  976. <method name="set_caps"
  977. c:identifier="gst_harness_set_caps"
  978. version="1.6">
  979. <doc xml:space="preserve">Sets the @GstHarness srcpad and sinkpad caps.
  980. MT safe.</doc>
  981. <return-value transfer-ownership="none">
  982. <type name="none" c:type="void"/>
  983. </return-value>
  984. <parameters>
  985. <instance-parameter name="h" transfer-ownership="none">
  986. <doc xml:space="preserve">a #GstHarness</doc>
  987. <type name="Harness" c:type="GstHarness*"/>
  988. </instance-parameter>
  989. <parameter name="in" transfer-ownership="full">
  990. <doc xml:space="preserve">a #GstCaps to set on the harness srcpad</doc>
  991. <type name="Gst.Caps" c:type="GstCaps*"/>
  992. </parameter>
  993. <parameter name="out" transfer-ownership="full">
  994. <doc xml:space="preserve">a #GstCaps to set on the harness sinkpad</doc>
  995. <type name="Gst.Caps" c:type="GstCaps*"/>
  996. </parameter>
  997. </parameters>
  998. </method>
  999. <method name="set_caps_str"
  1000. c:identifier="gst_harness_set_caps_str"
  1001. version="1.6">
  1002. <doc xml:space="preserve">Sets the @GstHarness srcpad and sinkpad caps using strings.
  1003. MT safe.</doc>
  1004. <return-value transfer-ownership="none">
  1005. <type name="none" c:type="void"/>
  1006. </return-value>
  1007. <parameters>
  1008. <instance-parameter name="h" transfer-ownership="none">
  1009. <doc xml:space="preserve">a #GstHarness</doc>
  1010. <type name="Harness" c:type="GstHarness*"/>
  1011. </instance-parameter>
  1012. <parameter name="in" transfer-ownership="none">
  1013. <doc xml:space="preserve">a @gchar describing a #GstCaps to set on the harness srcpad</doc>
  1014. <type name="utf8" c:type="const gchar*"/>
  1015. </parameter>
  1016. <parameter name="out" transfer-ownership="none">
  1017. <doc xml:space="preserve">a @gchar describing a #GstCaps to set on the harness sinkpad</doc>
  1018. <type name="utf8" c:type="const gchar*"/>
  1019. </parameter>
  1020. </parameters>
  1021. </method>
  1022. <method name="set_drop_buffers"
  1023. c:identifier="gst_harness_set_drop_buffers"
  1024. version="1.6">
  1025. <doc xml:space="preserve">When set to %TRUE, instead of placing the buffers arriving from the harnessed
  1026. #GstElement inside the sinkpads #GAsyncQueue, they are instead unreffed.
  1027. MT safe.</doc>
  1028. <return-value transfer-ownership="none">
  1029. <type name="none" c:type="void"/>
  1030. </return-value>
  1031. <parameters>
  1032. <instance-parameter name="h" transfer-ownership="none">
  1033. <doc xml:space="preserve">a #GstHarness</doc>
  1034. <type name="Harness" c:type="GstHarness*"/>
  1035. </instance-parameter>
  1036. <parameter name="drop_buffers" transfer-ownership="none">
  1037. <doc xml:space="preserve">a #gboolean specifying to drop outgoing buffers or not</doc>
  1038. <type name="gboolean" c:type="gboolean"/>
  1039. </parameter>
  1040. </parameters>
  1041. </method>
  1042. <method name="set_forwarding"
  1043. c:identifier="gst_harness_set_forwarding"
  1044. version="1.6">
  1045. <doc xml:space="preserve">As a convenience, a src-harness will forward %GST_EVENT_STREAM_START,
  1046. %GST_EVENT_CAPS and %GST_EVENT_SEGMENT to the main-harness if forwarding
  1047. is enabled, and forward any sticky-events from the main-harness to
  1048. the sink-harness. It will also forward the %GST_QUERY_ALLOCATION.
  1049. If forwarding is disabled, the user will have to either manually push
  1050. these events from the src-harness using gst_harness_src_push_event(), or
  1051. create and push them manually. While this will allow full control and
  1052. inspection of these events, for the most cases having forwarding enabled
  1053. will be sufficient when writing a test where the src-harness' main function
  1054. is providing data for the main-harness.
  1055. Forwarding is enabled by default.
  1056. MT safe.</doc>
  1057. <return-value transfer-ownership="none">
  1058. <type name="none" c:type="void"/>
  1059. </return-value>
  1060. <parameters>
  1061. <instance-parameter name="h" transfer-ownership="none">
  1062. <doc xml:space="preserve">a #GstHarness</doc>
  1063. <type name="Harness" c:type="GstHarness*"/>
  1064. </instance-parameter>
  1065. <parameter name="forwarding" transfer-ownership="none">
  1066. <doc xml:space="preserve">a #gboolean to enable/disable forwarding</doc>
  1067. <type name="gboolean" c:type="gboolean"/>
  1068. </parameter>
  1069. </parameters>
  1070. </method>
  1071. <method name="set_propose_allocator"
  1072. c:identifier="gst_harness_set_propose_allocator"
  1073. version="1.6">
  1074. <doc xml:space="preserve">Sets the @allocator and @params to propose when receiving an allocation
  1075. query.
  1076. MT safe.</doc>
  1077. <return-value transfer-ownership="none">
  1078. <type name="none" c:type="void"/>
  1079. </return-value>
  1080. <parameters>
  1081. <instance-parameter name="h" transfer-ownership="none">
  1082. <doc xml:space="preserve">a #GstHarness</doc>
  1083. <type name="Harness" c:type="GstHarness*"/>
  1084. </instance-parameter>
  1085. <parameter name="allocator"
  1086. transfer-ownership="full"
  1087. nullable="1"
  1088. allow-none="1">
  1089. <doc xml:space="preserve">a #GstAllocator</doc>
  1090. <type name="Gst.Allocator" c:type="GstAllocator*"/>
  1091. </parameter>
  1092. <parameter name="params"
  1093. transfer-ownership="none"
  1094. nullable="1"
  1095. allow-none="1">
  1096. <doc xml:space="preserve">a #GstAllocationParams</doc>
  1097. <type name="Gst.AllocationParams"
  1098. c:type="const GstAllocationParams*"/>
  1099. </parameter>
  1100. </parameters>
  1101. </method>
  1102. <method name="set_sink_caps"
  1103. c:identifier="gst_harness_set_sink_caps"
  1104. version="1.6">
  1105. <doc xml:space="preserve">Sets the @GstHarness sinkpad caps.
  1106. MT safe.</doc>
  1107. <return-value transfer-ownership="none">
  1108. <type name="none" c:type="void"/>
  1109. </return-value>
  1110. <parameters>
  1111. <instance-parameter name="h" transfer-ownership="none">
  1112. <doc xml:space="preserve">a #GstHarness</doc>
  1113. <type name="Harness" c:type="GstHarness*"/>
  1114. </instance-parameter>
  1115. <parameter name="caps" transfer-ownership="full">
  1116. <doc xml:space="preserve">a #GstCaps to set on the harness sinkpad</doc>
  1117. <type name="Gst.Caps" c:type="GstCaps*"/>
  1118. </parameter>
  1119. </parameters>
  1120. </method>
  1121. <method name="set_sink_caps_str"
  1122. c:identifier="gst_harness_set_sink_caps_str"
  1123. version="1.6">
  1124. <doc xml:space="preserve">Sets the @GstHarness sinkpad caps using a string.
  1125. MT safe.</doc>
  1126. <return-value transfer-ownership="none">
  1127. <type name="none" c:type="void"/>
  1128. </return-value>
  1129. <parameters>
  1130. <instance-parameter name="h" transfer-ownership="none">
  1131. <doc xml:space="preserve">a #GstHarness</doc>
  1132. <type name="Harness" c:type="GstHarness*"/>
  1133. </instance-parameter>
  1134. <parameter name="str" transfer-ownership="none">
  1135. <doc xml:space="preserve">a @gchar describing a #GstCaps to set on the harness sinkpad</doc>
  1136. <type name="utf8" c:type="const gchar*"/>
  1137. </parameter>
  1138. </parameters>
  1139. </method>
  1140. <method name="set_src_caps"
  1141. c:identifier="gst_harness_set_src_caps"
  1142. version="1.6">
  1143. <doc xml:space="preserve">Sets the @GstHarness srcpad caps. This must be done before any buffers
  1144. can legally be pushed from the harness to the element.
  1145. MT safe.</doc>
  1146. <return-value transfer-ownership="none">
  1147. <type name="none" c:type="void"/>
  1148. </return-value>
  1149. <parameters>
  1150. <instance-parameter name="h" transfer-ownership="none">
  1151. <doc xml:space="preserve">a #GstHarness</doc>
  1152. <type name="Harness" c:type="GstHarness*"/>
  1153. </instance-parameter>
  1154. <parameter name="caps" transfer-ownership="full">
  1155. <doc xml:space="preserve">a #GstCaps to set on the harness srcpad</doc>
  1156. <type name="Gst.Caps" c:type="GstCaps*"/>
  1157. </parameter>
  1158. </parameters>
  1159. </method>
  1160. <method name="set_src_caps_str"
  1161. c:identifier="gst_harness_set_src_caps_str"
  1162. version="1.6">
  1163. <doc xml:space="preserve">Sets the @GstHarness srcpad caps using a string. This must be done before
  1164. any buffers can legally be pushed from the harness to the element.
  1165. MT safe.</doc>
  1166. <return-value transfer-ownership="none">
  1167. <type name="none" c:type="void"/>
  1168. </return-value>
  1169. <parameters>
  1170. <instance-parameter name="h" transfer-ownership="none">
  1171. <doc xml:space="preserve">a #GstHarness</doc>
  1172. <type name="Harness" c:type="GstHarness*"/>
  1173. </instance-parameter>
  1174. <parameter name="str" transfer-ownership="none">
  1175. <doc xml:space="preserve">a @gchar describing a #GstCaps to set on the harness srcpad</doc>
  1176. <type name="utf8" c:type="const gchar*"/>
  1177. </parameter>
  1178. </parameters>
  1179. </method>
  1180. <method name="set_time"
  1181. c:identifier="gst_harness_set_time"
  1182. version="1.6">
  1183. <doc xml:space="preserve">Advance the #GstTestClock to a specific time.
  1184. MT safe.</doc>
  1185. <return-value transfer-ownership="none">
  1186. <doc xml:space="preserve">a @gboolean %TRUE if the time could be set. %FALSE if not.</doc>
  1187. <type name="gboolean" c:type="gboolean"/>
  1188. </return-value>
  1189. <parameters>
  1190. <instance-parameter name="h" transfer-ownership="none">
  1191. <doc xml:space="preserve">a #GstHarness</doc>
  1192. <type name="Harness" c:type="GstHarness*"/>
  1193. </instance-parameter>
  1194. <parameter name="time" transfer-ownership="none">
  1195. <doc xml:space="preserve">a #GstClockTime to advance the clock to</doc>
  1196. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  1197. </parameter>
  1198. </parameters>
  1199. </method>
  1200. <method name="set_upstream_latency"
  1201. c:identifier="gst_harness_set_upstream_latency"
  1202. version="1.6">
  1203. <doc xml:space="preserve">Sets the min latency reported by #GstHarness when receiving a latency-query
  1204. MT safe.</doc>
  1205. <return-value transfer-ownership="none">
  1206. <type name="none" c:type="void"/>
  1207. </return-value>
  1208. <parameters>
  1209. <instance-parameter name="h" transfer-ownership="none">
  1210. <doc xml:space="preserve">a #GstHarness</doc>
  1211. <type name="Harness" c:type="GstHarness*"/>
  1212. </instance-parameter>
  1213. <parameter name="latency" transfer-ownership="none">
  1214. <doc xml:space="preserve">a #GstClockTime specifying the latency</doc>
  1215. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  1216. </parameter>
  1217. </parameters>
  1218. </method>
  1219. <method name="sink_push_many"
  1220. c:identifier="gst_harness_sink_push_many"
  1221. version="1.6">
  1222. <doc xml:space="preserve">Convenience that calls gst_harness_push_to_sink @pushes number of times.
  1223. Will abort the pushing if any one push fails.
  1224. MT safe.</doc>
  1225. <return-value transfer-ownership="none">
  1226. <doc xml:space="preserve">a #GstFlowReturn with the result of the push</doc>
  1227. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  1228. </return-value>
  1229. <parameters>
  1230. <instance-parameter name="h" transfer-ownership="none">
  1231. <doc xml:space="preserve">a #GstHarness</doc>
  1232. <type name="Harness" c:type="GstHarness*"/>
  1233. </instance-parameter>
  1234. <parameter name="pushes" transfer-ownership="none">
  1235. <doc xml:space="preserve">a #gint with the number of calls to gst_harness_push_to_sink</doc>
  1236. <type name="gint" c:type="gint"/>
  1237. </parameter>
  1238. </parameters>
  1239. </method>
  1240. <method name="src_crank_and_push_many"
  1241. c:identifier="gst_harness_src_crank_and_push_many"
  1242. version="1.6">
  1243. <doc xml:space="preserve">Transfer data from the src-#GstHarness to the main-#GstHarness. Similar to
  1244. gst_harness_push_from_src, this variant allows you to specify how many cranks
  1245. and how many pushes to perform. This can be useful for both moving a lot
  1246. of data at the same time, as well as cases when one crank does not equal one
  1247. buffer to push and v.v.
  1248. MT safe.</doc>
  1249. <return-value transfer-ownership="none">
  1250. <doc xml:space="preserve">a #GstFlowReturn with the result of the push</doc>
  1251. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  1252. </return-value>
  1253. <parameters>
  1254. <instance-parameter name="h" transfer-ownership="none">
  1255. <doc xml:space="preserve">a #GstHarness</doc>
  1256. <type name="Harness" c:type="GstHarness*"/>
  1257. </instance-parameter>
  1258. <parameter name="cranks" transfer-ownership="none">
  1259. <doc xml:space="preserve">a #gint with the number of calls to gst_harness_crank_single_clock_wait</doc>
  1260. <type name="gint" c:type="gint"/>
  1261. </parameter>
  1262. <parameter name="pushes" transfer-ownership="none">
  1263. <doc xml:space="preserve">a #gint with the number of calls to gst_harness_push</doc>
  1264. <type name="gint" c:type="gint"/>
  1265. </parameter>
  1266. </parameters>
  1267. </method>
  1268. <method name="src_push_event"
  1269. c:identifier="gst_harness_src_push_event"
  1270. version="1.6">
  1271. <doc xml:space="preserve">Similar to what gst_harness_src_push does with #GstBuffers, this transfers
  1272. a #GstEvent from the src-#GstHarness to the main-#GstHarness. Note that
  1273. some #GstEvents are being transferred automagically. Look at sink_forward_pad
  1274. for details.
  1275. MT safe.</doc>
  1276. <return-value transfer-ownership="none">
  1277. <doc xml:space="preserve">a #gboolean with the result of the push</doc>
  1278. <type name="gboolean" c:type="gboolean"/>
  1279. </return-value>
  1280. <parameters>
  1281. <instance-parameter name="h" transfer-ownership="none">
  1282. <doc xml:space="preserve">a #GstHarness</doc>
  1283. <type name="Harness" c:type="GstHarness*"/>
  1284. </instance-parameter>
  1285. </parameters>
  1286. </method>
  1287. <method name="stress_custom_start"
  1288. c:identifier="gst_harness_stress_custom_start"
  1289. version="1.6"
  1290. introspectable="0">
  1291. <doc xml:space="preserve">Start a custom stress-thread that will call your @callback for every
  1292. iteration allowing you to do something nasty.
  1293. MT safe.</doc>
  1294. <return-value>
  1295. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1296. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1297. </return-value>
  1298. <parameters>
  1299. <instance-parameter name="h" transfer-ownership="none">
  1300. <doc xml:space="preserve">a #GstHarness</doc>
  1301. <type name="Harness" c:type="GstHarness*"/>
  1302. </instance-parameter>
  1303. <parameter name="init"
  1304. transfer-ownership="none"
  1305. nullable="1"
  1306. allow-none="1">
  1307. <doc xml:space="preserve">a #GFunc that is called initially and only once</doc>
  1308. <type name="GLib.Func" c:type="GFunc"/>
  1309. </parameter>
  1310. <parameter name="callback" transfer-ownership="none" closure="2">
  1311. <doc xml:space="preserve">a #GFunc that is called as often as possible</doc>
  1312. <type name="GLib.Func" c:type="GFunc"/>
  1313. </parameter>
  1314. <parameter name="data"
  1315. transfer-ownership="none"
  1316. nullable="1"
  1317. allow-none="1">
  1318. <doc xml:space="preserve">a #gpointer with custom data to pass to the @callback function</doc>
  1319. <type name="gpointer" c:type="gpointer"/>
  1320. </parameter>
  1321. <parameter name="sleep" transfer-ownership="none">
  1322. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1323. each call to the @callback</doc>
  1324. <type name="gulong" c:type="gulong"/>
  1325. </parameter>
  1326. </parameters>
  1327. </method>
  1328. <method name="stress_property_start_full"
  1329. c:identifier="gst_harness_stress_property_start_full"
  1330. version="1.6"
  1331. introspectable="0">
  1332. <doc xml:space="preserve">Call g_object_set with @name and @value in intervals of @sleep microseconds
  1333. MT safe.</doc>
  1334. <return-value>
  1335. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1336. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1337. </return-value>
  1338. <parameters>
  1339. <instance-parameter name="h" transfer-ownership="none">
  1340. <doc xml:space="preserve">a #GstHarness</doc>
  1341. <type name="Harness" c:type="GstHarness*"/>
  1342. </instance-parameter>
  1343. <parameter name="name" transfer-ownership="none">
  1344. <doc xml:space="preserve">a #gchar specifying a property name</doc>
  1345. <type name="utf8" c:type="const gchar*"/>
  1346. </parameter>
  1347. <parameter name="value" transfer-ownership="none">
  1348. <doc xml:space="preserve">a #GValue to set the property to</doc>
  1349. <type name="GObject.Value" c:type="const GValue*"/>
  1350. </parameter>
  1351. <parameter name="sleep" transfer-ownership="none">
  1352. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1353. each g_object_set with @name and @value</doc>
  1354. <type name="gulong" c:type="gulong"/>
  1355. </parameter>
  1356. </parameters>
  1357. </method>
  1358. <method name="stress_push_buffer_start_full"
  1359. c:identifier="gst_harness_stress_push_buffer_start_full"
  1360. version="1.6"
  1361. introspectable="0">
  1362. <doc xml:space="preserve">Push a #GstBuffer in intervals of @sleep microseconds.
  1363. MT safe.</doc>
  1364. <return-value>
  1365. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1366. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1367. </return-value>
  1368. <parameters>
  1369. <instance-parameter name="h" transfer-ownership="none">
  1370. <doc xml:space="preserve">a #GstHarness</doc>
  1371. <type name="Harness" c:type="GstHarness*"/>
  1372. </instance-parameter>
  1373. <parameter name="caps" transfer-ownership="none">
  1374. <doc xml:space="preserve">a #GstCaps for the #GstBuffer</doc>
  1375. <type name="Gst.Caps" c:type="GstCaps*"/>
  1376. </parameter>
  1377. <parameter name="segment" transfer-ownership="none">
  1378. <doc xml:space="preserve">a #GstSegment</doc>
  1379. <type name="Gst.Segment" c:type="const GstSegment*"/>
  1380. </parameter>
  1381. <parameter name="buf" transfer-ownership="none">
  1382. <doc xml:space="preserve">a #GstBuffer to push</doc>
  1383. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  1384. </parameter>
  1385. <parameter name="sleep" transfer-ownership="none">
  1386. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1387. each call to gst_pad_push</doc>
  1388. <type name="gulong" c:type="gulong"/>
  1389. </parameter>
  1390. </parameters>
  1391. </method>
  1392. <method name="stress_push_buffer_with_cb_start_full"
  1393. c:identifier="gst_harness_stress_push_buffer_with_cb_start_full"
  1394. version="1.6"
  1395. introspectable="0">
  1396. <doc xml:space="preserve">Push a #GstBuffer returned by @func in intervals of @sleep microseconds.
  1397. MT safe.</doc>
  1398. <return-value>
  1399. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1400. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1401. </return-value>
  1402. <parameters>
  1403. <instance-parameter name="h" transfer-ownership="none">
  1404. <doc xml:space="preserve">a #GstHarness</doc>
  1405. <type name="Harness" c:type="GstHarness*"/>
  1406. </instance-parameter>
  1407. <parameter name="caps" transfer-ownership="none">
  1408. <doc xml:space="preserve">a #GstCaps for the #GstBuffer</doc>
  1409. <type name="Gst.Caps" c:type="GstCaps*"/>
  1410. </parameter>
  1411. <parameter name="segment" transfer-ownership="none">
  1412. <doc xml:space="preserve">a #GstSegment</doc>
  1413. <type name="Gst.Segment" c:type="const GstSegment*"/>
  1414. </parameter>
  1415. <parameter name="func"
  1416. transfer-ownership="none"
  1417. scope="notified"
  1418. closure="3"
  1419. destroy="4">
  1420. <doc xml:space="preserve">a #GstHarnessPrepareBufferFunc function called before every iteration
  1421. to prepare / create a #GstBuffer for pushing</doc>
  1422. <type name="HarnessPrepareBufferFunc"
  1423. c:type="GstHarnessPrepareBufferFunc"/>
  1424. </parameter>
  1425. <parameter name="data"
  1426. transfer-ownership="none"
  1427. nullable="1"
  1428. allow-none="1">
  1429. <doc xml:space="preserve">a #gpointer with data to the #GstHarnessPrepareBufferFunc function</doc>
  1430. <type name="gpointer" c:type="gpointer"/>
  1431. </parameter>
  1432. <parameter name="notify" transfer-ownership="none" scope="async">
  1433. <doc xml:space="preserve">a #GDestroyNotify that is called when thread is stopped</doc>
  1434. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  1435. </parameter>
  1436. <parameter name="sleep" transfer-ownership="none">
  1437. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1438. each call to gst_pad_push</doc>
  1439. <type name="gulong" c:type="gulong"/>
  1440. </parameter>
  1441. </parameters>
  1442. </method>
  1443. <method name="stress_push_event_start_full"
  1444. c:identifier="gst_harness_stress_push_event_start_full"
  1445. version="1.6"
  1446. introspectable="0">
  1447. <doc xml:space="preserve">Push the @event onto the harnessed #GstElement sinkpad in intervals of
  1448. @sleep microseconds
  1449. MT safe.</doc>
  1450. <return-value>
  1451. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1452. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1453. </return-value>
  1454. <parameters>
  1455. <instance-parameter name="h" transfer-ownership="none">
  1456. <doc xml:space="preserve">a #GstHarness</doc>
  1457. <type name="Harness" c:type="GstHarness*"/>
  1458. </instance-parameter>
  1459. <parameter name="event" transfer-ownership="none">
  1460. <doc xml:space="preserve">a #GstEvent to push</doc>
  1461. <type name="Gst.Event" c:type="GstEvent*"/>
  1462. </parameter>
  1463. <parameter name="sleep" transfer-ownership="none">
  1464. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1465. each gst_event_push with @event</doc>
  1466. <type name="gulong" c:type="gulong"/>
  1467. </parameter>
  1468. </parameters>
  1469. </method>
  1470. <method name="stress_push_event_with_cb_start_full"
  1471. c:identifier="gst_harness_stress_push_event_with_cb_start_full"
  1472. version="1.8"
  1473. introspectable="0">
  1474. <doc xml:space="preserve">Push a #GstEvent returned by @func onto the harnessed #GstElement sinkpad
  1475. in intervals of @sleep microseconds.
  1476. MT safe.</doc>
  1477. <return-value>
  1478. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1479. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1480. </return-value>
  1481. <parameters>
  1482. <instance-parameter name="h" transfer-ownership="none">
  1483. <doc xml:space="preserve">a #GstHarness</doc>
  1484. <type name="Harness" c:type="GstHarness*"/>
  1485. </instance-parameter>
  1486. <parameter name="func"
  1487. transfer-ownership="none"
  1488. scope="notified"
  1489. closure="1"
  1490. destroy="2">
  1491. <doc xml:space="preserve">a #GstHarnessPrepareEventFunc function called before every iteration
  1492. to prepare / create a #GstEvent for pushing</doc>
  1493. <type name="HarnessPrepareEventFunc"
  1494. c:type="GstHarnessPrepareEventFunc"/>
  1495. </parameter>
  1496. <parameter name="data"
  1497. transfer-ownership="none"
  1498. nullable="1"
  1499. allow-none="1">
  1500. <doc xml:space="preserve">a #gpointer with data to the #GstHarnessPrepareEventFunc function</doc>
  1501. <type name="gpointer" c:type="gpointer"/>
  1502. </parameter>
  1503. <parameter name="notify" transfer-ownership="none" scope="async">
  1504. <doc xml:space="preserve">a #GDestroyNotify that is called when thread is stopped</doc>
  1505. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  1506. </parameter>
  1507. <parameter name="sleep" transfer-ownership="none">
  1508. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1509. each call to gst_pad_push</doc>
  1510. <type name="gulong" c:type="gulong"/>
  1511. </parameter>
  1512. </parameters>
  1513. </method>
  1514. <method name="stress_push_upstream_event_start_full"
  1515. c:identifier="gst_harness_stress_push_upstream_event_start_full"
  1516. version="1.6"
  1517. introspectable="0">
  1518. <doc xml:space="preserve">Push the @event onto the harnessed #GstElement srcpad in intervals of
  1519. @sleep microseconds.
  1520. MT safe.</doc>
  1521. <return-value>
  1522. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1523. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1524. </return-value>
  1525. <parameters>
  1526. <instance-parameter name="h" transfer-ownership="none">
  1527. <doc xml:space="preserve">a #GstHarness</doc>
  1528. <type name="Harness" c:type="GstHarness*"/>
  1529. </instance-parameter>
  1530. <parameter name="event" transfer-ownership="none">
  1531. <doc xml:space="preserve">a #GstEvent to push</doc>
  1532. <type name="Gst.Event" c:type="GstEvent*"/>
  1533. </parameter>
  1534. <parameter name="sleep" transfer-ownership="none">
  1535. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1536. each gst_event_push with @event</doc>
  1537. <type name="gulong" c:type="gulong"/>
  1538. </parameter>
  1539. </parameters>
  1540. </method>
  1541. <method name="stress_push_upstream_event_with_cb_start_full"
  1542. c:identifier="gst_harness_stress_push_upstream_event_with_cb_start_full"
  1543. version="1.8"
  1544. introspectable="0">
  1545. <doc xml:space="preserve">Push a #GstEvent returned by @func onto the harnessed #GstElement srcpad
  1546. in intervals of @sleep microseconds.
  1547. MT safe.</doc>
  1548. <return-value>
  1549. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1550. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1551. </return-value>
  1552. <parameters>
  1553. <instance-parameter name="h" transfer-ownership="none">
  1554. <doc xml:space="preserve">a #GstHarness</doc>
  1555. <type name="Harness" c:type="GstHarness*"/>
  1556. </instance-parameter>
  1557. <parameter name="func"
  1558. transfer-ownership="none"
  1559. scope="notified"
  1560. closure="1"
  1561. destroy="2">
  1562. <doc xml:space="preserve">a #GstHarnessPrepareEventFunc function called before every iteration
  1563. to prepare / create a #GstEvent for pushing</doc>
  1564. <type name="HarnessPrepareEventFunc"
  1565. c:type="GstHarnessPrepareEventFunc"/>
  1566. </parameter>
  1567. <parameter name="data"
  1568. transfer-ownership="none"
  1569. nullable="1"
  1570. allow-none="1">
  1571. <doc xml:space="preserve">a #gpointer with data to the #GstHarnessPrepareEventFunc function</doc>
  1572. <type name="gpointer" c:type="gpointer"/>
  1573. </parameter>
  1574. <parameter name="notify" transfer-ownership="none" scope="async">
  1575. <doc xml:space="preserve">a #GDestroyNotify that is called when thread is stopped</doc>
  1576. <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
  1577. </parameter>
  1578. <parameter name="sleep" transfer-ownership="none">
  1579. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1580. each call to gst_pad_push</doc>
  1581. <type name="gulong" c:type="gulong"/>
  1582. </parameter>
  1583. </parameters>
  1584. </method>
  1585. <method name="stress_requestpad_start_full"
  1586. c:identifier="gst_harness_stress_requestpad_start_full"
  1587. version="1.6"
  1588. introspectable="0">
  1589. <doc xml:space="preserve">Call gst_element_request_pad in intervals of @sleep microseconds
  1590. MT safe.</doc>
  1591. <return-value>
  1592. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1593. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1594. </return-value>
  1595. <parameters>
  1596. <instance-parameter name="h" transfer-ownership="none">
  1597. <doc xml:space="preserve">a #GstHarness</doc>
  1598. <type name="Harness" c:type="GstHarness*"/>
  1599. </instance-parameter>
  1600. <parameter name="templ" transfer-ownership="none">
  1601. <doc xml:space="preserve">a #GstPadTemplate</doc>
  1602. <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
  1603. </parameter>
  1604. <parameter name="name" transfer-ownership="none">
  1605. <doc xml:space="preserve">a #gchar</doc>
  1606. <type name="utf8" c:type="const gchar*"/>
  1607. </parameter>
  1608. <parameter name="caps" transfer-ownership="none">
  1609. <doc xml:space="preserve">a #GstCaps</doc>
  1610. <type name="Gst.Caps" c:type="GstCaps*"/>
  1611. </parameter>
  1612. <parameter name="release" transfer-ownership="none">
  1613. <doc xml:space="preserve">a #gboolean</doc>
  1614. <type name="gboolean" c:type="gboolean"/>
  1615. </parameter>
  1616. <parameter name="sleep" transfer-ownership="none">
  1617. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1618. each gst_element_request_pad</doc>
  1619. <type name="gulong" c:type="gulong"/>
  1620. </parameter>
  1621. </parameters>
  1622. </method>
  1623. <method name="stress_statechange_start_full"
  1624. c:identifier="gst_harness_stress_statechange_start_full"
  1625. version="1.6"
  1626. introspectable="0">
  1627. <doc xml:space="preserve">Change the state of your harnessed #GstElement from NULL to PLAYING and
  1628. back again, only pausing for @sleep microseconds every time.
  1629. MT safe.</doc>
  1630. <return-value>
  1631. <doc xml:space="preserve">a #GstHarnessThread</doc>
  1632. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  1633. </return-value>
  1634. <parameters>
  1635. <instance-parameter name="h" transfer-ownership="none">
  1636. <doc xml:space="preserve">a #GstHarness</doc>
  1637. <type name="Harness" c:type="GstHarness*"/>
  1638. </instance-parameter>
  1639. <parameter name="sleep" transfer-ownership="none">
  1640. <doc xml:space="preserve">a #gulong specifying how long to sleep in (microseconds) for
  1641. each state-change</doc>
  1642. <type name="gulong" c:type="gulong"/>
  1643. </parameter>
  1644. </parameters>
  1645. </method>
  1646. <method name="teardown"
  1647. c:identifier="gst_harness_teardown"
  1648. version="1.6">
  1649. <doc xml:space="preserve">Tears down a @GstHarness, freeing all resources allocated using it.
  1650. MT safe.</doc>
  1651. <return-value transfer-ownership="none">
  1652. <type name="none" c:type="void"/>
  1653. </return-value>
  1654. <parameters>
  1655. <instance-parameter name="h" transfer-ownership="none">
  1656. <doc xml:space="preserve">a #GstHarness</doc>
  1657. <type name="Harness" c:type="GstHarness*"/>
  1658. </instance-parameter>
  1659. </parameters>
  1660. </method>
  1661. <method name="try_pull"
  1662. c:identifier="gst_harness_try_pull"
  1663. version="1.6">
  1664. <doc xml:space="preserve">Pulls a #GstBuffer from the #GAsyncQueue on the #GstHarness sinkpad. Unlike
  1665. gst_harness_pull this will not wait for any buffers if not any are present,
  1666. and return %NULL straight away.
  1667. MT safe.</doc>
  1668. <return-value transfer-ownership="full">
  1669. <doc xml:space="preserve">a #GstBuffer or %NULL if no buffers are present in the #GAsyncQueue</doc>
  1670. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  1671. </return-value>
  1672. <parameters>
  1673. <instance-parameter name="h" transfer-ownership="none">
  1674. <doc xml:space="preserve">a #GstHarness</doc>
  1675. <type name="Harness" c:type="GstHarness*"/>
  1676. </instance-parameter>
  1677. </parameters>
  1678. </method>
  1679. <method name="try_pull_event"
  1680. c:identifier="gst_harness_try_pull_event"
  1681. version="1.6">
  1682. <doc xml:space="preserve">Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness sinkpad.
  1683. See gst_harness_try_pull for details.
  1684. MT safe.</doc>
  1685. <return-value transfer-ownership="full">
  1686. <doc xml:space="preserve">a #GstEvent or %NULL if no buffers are present in the #GAsyncQueue</doc>
  1687. <type name="Gst.Event" c:type="GstEvent*"/>
  1688. </return-value>
  1689. <parameters>
  1690. <instance-parameter name="h" transfer-ownership="none">
  1691. <doc xml:space="preserve">a #GstHarness</doc>
  1692. <type name="Harness" c:type="GstHarness*"/>
  1693. </instance-parameter>
  1694. </parameters>
  1695. </method>
  1696. <method name="try_pull_upstream_event"
  1697. c:identifier="gst_harness_try_pull_upstream_event"
  1698. version="1.6">
  1699. <doc xml:space="preserve">Pulls an #GstEvent from the #GAsyncQueue on the #GstHarness srcpad.
  1700. See gst_harness_try_pull for details.
  1701. MT safe.</doc>
  1702. <return-value transfer-ownership="full">
  1703. <doc xml:space="preserve">a #GstEvent or %NULL if no buffers are present in the #GAsyncQueue</doc>
  1704. <type name="Gst.Event" c:type="GstEvent*"/>
  1705. </return-value>
  1706. <parameters>
  1707. <instance-parameter name="h" transfer-ownership="none">
  1708. <doc xml:space="preserve">a #GstHarness</doc>
  1709. <type name="Harness" c:type="GstHarness*"/>
  1710. </instance-parameter>
  1711. </parameters>
  1712. </method>
  1713. <method name="upstream_events_in_queue"
  1714. c:identifier="gst_harness_upstream_events_in_queue"
  1715. version="1.6">
  1716. <doc xml:space="preserve">The number of #GstEvents currently in the #GstHarness srcpad #GAsyncQueue
  1717. MT safe.</doc>
  1718. <return-value transfer-ownership="none">
  1719. <doc xml:space="preserve">a #guint number of events in the queue</doc>
  1720. <type name="guint" c:type="guint"/>
  1721. </return-value>
  1722. <parameters>
  1723. <instance-parameter name="h" transfer-ownership="none">
  1724. <doc xml:space="preserve">a #GstHarness</doc>
  1725. <type name="Harness" c:type="GstHarness*"/>
  1726. </instance-parameter>
  1727. </parameters>
  1728. </method>
  1729. <method name="upstream_events_received"
  1730. c:identifier="gst_harness_upstream_events_received"
  1731. version="1.6">
  1732. <doc xml:space="preserve">The total number of #GstEvents that has arrived on the #GstHarness srcpad
  1733. This number includes events handled by the harness as well as events
  1734. that have already been pulled out.
  1735. MT safe.</doc>
  1736. <return-value transfer-ownership="none">
  1737. <doc xml:space="preserve">a #guint number of events received</doc>
  1738. <type name="guint" c:type="guint"/>
  1739. </return-value>
  1740. <parameters>
  1741. <instance-parameter name="h" transfer-ownership="none">
  1742. <doc xml:space="preserve">a #GstHarness</doc>
  1743. <type name="Harness" c:type="GstHarness*"/>
  1744. </instance-parameter>
  1745. </parameters>
  1746. </method>
  1747. <method name="use_systemclock"
  1748. c:identifier="gst_harness_use_systemclock"
  1749. version="1.6">
  1750. <doc xml:space="preserve">Sets the system #GstClock on the @GstHarness #GstElement
  1751. MT safe.</doc>
  1752. <return-value transfer-ownership="none">
  1753. <type name="none" c:type="void"/>
  1754. </return-value>
  1755. <parameters>
  1756. <instance-parameter name="h" transfer-ownership="none">
  1757. <doc xml:space="preserve">a #GstHarness</doc>
  1758. <type name="Harness" c:type="GstHarness*"/>
  1759. </instance-parameter>
  1760. </parameters>
  1761. </method>
  1762. <method name="use_testclock"
  1763. c:identifier="gst_harness_use_testclock"
  1764. version="1.6">
  1765. <doc xml:space="preserve">Sets the #GstTestClock on the #GstHarness #GstElement
  1766. MT safe.</doc>
  1767. <return-value transfer-ownership="none">
  1768. <type name="none" c:type="void"/>
  1769. </return-value>
  1770. <parameters>
  1771. <instance-parameter name="h" transfer-ownership="none">
  1772. <doc xml:space="preserve">a #GstHarness</doc>
  1773. <type name="Harness" c:type="GstHarness*"/>
  1774. </instance-parameter>
  1775. </parameters>
  1776. </method>
  1777. <method name="wait_for_clock_id_waits"
  1778. c:identifier="gst_harness_wait_for_clock_id_waits"
  1779. version="1.6">
  1780. <doc xml:space="preserve">Waits for @timeout seconds until @waits number of #GstClockID waits is
  1781. registered with the #GstTestClock. Useful for writing deterministic tests,
  1782. where you want to make sure that an expected number of waits have been
  1783. reached.
  1784. MT safe.</doc>
  1785. <return-value transfer-ownership="none">
  1786. <doc xml:space="preserve">a @gboolean %TRUE if the waits have been registered, %FALSE if not.
  1787. (Could be that it timed out waiting or that more waits then waits was found)</doc>
  1788. <type name="gboolean" c:type="gboolean"/>
  1789. </return-value>
  1790. <parameters>
  1791. <instance-parameter name="h" transfer-ownership="none">
  1792. <doc xml:space="preserve">a #GstHarness</doc>
  1793. <type name="Harness" c:type="GstHarness*"/>
  1794. </instance-parameter>
  1795. <parameter name="waits" transfer-ownership="none">
  1796. <doc xml:space="preserve">a #guint describing the numbers of #GstClockID registered with
  1797. the #GstTestClock</doc>
  1798. <type name="guint" c:type="guint"/>
  1799. </parameter>
  1800. <parameter name="timeout" transfer-ownership="none">
  1801. <doc xml:space="preserve">a #guint describing how many seconds to wait for @waits to be true</doc>
  1802. <type name="guint" c:type="guint"/>
  1803. </parameter>
  1804. </parameters>
  1805. </method>
  1806. <function name="new"
  1807. c:identifier="gst_harness_new"
  1808. version="1.6"
  1809. introspectable="0">
  1810. <doc xml:space="preserve">Creates a new harness. Works like gst_harness_new_with_padnames(), except it
  1811. assumes the #GstElement sinkpad is named "sink" and srcpad is named "src"
  1812. MT safe.</doc>
  1813. <return-value transfer-ownership="full">
  1814. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1815. not be created</doc>
  1816. <type name="Harness" c:type="GstHarness*"/>
  1817. </return-value>
  1818. <parameters>
  1819. <parameter name="element_name" transfer-ownership="none">
  1820. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  1821. <type name="utf8" c:type="const gchar*"/>
  1822. </parameter>
  1823. </parameters>
  1824. </function>
  1825. <function name="new_empty"
  1826. c:identifier="gst_harness_new_empty"
  1827. version="1.8"
  1828. introspectable="0">
  1829. <doc xml:space="preserve">Creates a new empty harness. Use gst_harness_add_element_full() to add
  1830. an #GstElement to it.
  1831. MT safe.</doc>
  1832. <return-value transfer-ownership="full">
  1833. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1834. not be created</doc>
  1835. <type name="Harness" c:type="GstHarness*"/>
  1836. </return-value>
  1837. </function>
  1838. <function name="new_full"
  1839. c:identifier="gst_harness_new_full"
  1840. version="1.6"
  1841. introspectable="0">
  1842. <doc xml:space="preserve">Creates a new harness.
  1843. MT safe.</doc>
  1844. <return-value transfer-ownership="full">
  1845. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1846. not be created</doc>
  1847. <type name="Harness" c:type="GstHarness*"/>
  1848. </return-value>
  1849. <parameters>
  1850. <parameter name="element" transfer-ownership="none">
  1851. <doc xml:space="preserve">a #GstElement to attach the harness to (transfer none)</doc>
  1852. <type name="Gst.Element" c:type="GstElement*"/>
  1853. </parameter>
  1854. <parameter name="hsrc"
  1855. transfer-ownership="none"
  1856. nullable="1"
  1857. allow-none="1">
  1858. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness srcpad.
  1859. %NULL will not create a harness srcpad.</doc>
  1860. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  1861. </parameter>
  1862. <parameter name="element_sinkpad_name"
  1863. transfer-ownership="none"
  1864. nullable="1"
  1865. allow-none="1">
  1866. <doc xml:space="preserve">a #gchar with the name of the element
  1867. sinkpad that is then linked to the harness srcpad. Can be a static or request
  1868. or a sometimes pad that has been added. %NULL will not get/request a sinkpad
  1869. from the element. (Like if the element is a src.)</doc>
  1870. <type name="utf8" c:type="const gchar*"/>
  1871. </parameter>
  1872. <parameter name="hsink"
  1873. transfer-ownership="none"
  1874. nullable="1"
  1875. allow-none="1">
  1876. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness sinkpad.
  1877. %NULL will not create a harness sinkpad.</doc>
  1878. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  1879. </parameter>
  1880. <parameter name="element_srcpad_name"
  1881. transfer-ownership="none"
  1882. nullable="1"
  1883. allow-none="1">
  1884. <doc xml:space="preserve">a #gchar with the name of the element
  1885. srcpad that is then linked to the harness sinkpad, similar to the
  1886. @element_sinkpad_name.</doc>
  1887. <type name="utf8" c:type="const gchar*"/>
  1888. </parameter>
  1889. </parameters>
  1890. </function>
  1891. <function name="new_parse"
  1892. c:identifier="gst_harness_new_parse"
  1893. version="1.6"
  1894. introspectable="0">
  1895. <doc xml:space="preserve">Creates a new harness, parsing the @launchline and putting that in a #GstBin,
  1896. and then attches the harness to the bin.
  1897. MT safe.</doc>
  1898. <return-value transfer-ownership="full">
  1899. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1900. not be created</doc>
  1901. <type name="Harness" c:type="GstHarness*"/>
  1902. </return-value>
  1903. <parameters>
  1904. <parameter name="launchline" transfer-ownership="none">
  1905. <doc xml:space="preserve">a #gchar describing a gst-launch type line</doc>
  1906. <type name="utf8" c:type="const gchar*"/>
  1907. </parameter>
  1908. </parameters>
  1909. </function>
  1910. <function name="new_with_element"
  1911. c:identifier="gst_harness_new_with_element"
  1912. version="1.6"
  1913. introspectable="0">
  1914. <doc xml:space="preserve">Creates a new harness. Works in the same way as gst_harness_new_full(), only
  1915. that generic padtemplates are used for the harness src and sinkpads, which
  1916. will be sufficient in most usecases.
  1917. MT safe.</doc>
  1918. <return-value transfer-ownership="full">
  1919. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1920. not be created</doc>
  1921. <type name="Harness" c:type="GstHarness*"/>
  1922. </return-value>
  1923. <parameters>
  1924. <parameter name="element" transfer-ownership="none">
  1925. <doc xml:space="preserve">a #GstElement to attach the harness to (transfer none)</doc>
  1926. <type name="Gst.Element" c:type="GstElement*"/>
  1927. </parameter>
  1928. <parameter name="element_sinkpad_name"
  1929. transfer-ownership="none"
  1930. nullable="1"
  1931. allow-none="1">
  1932. <doc xml:space="preserve">a #gchar with the name of the element
  1933. sinkpad that is then linked to the harness srcpad. %NULL does not attach a
  1934. sinkpad</doc>
  1935. <type name="utf8" c:type="const gchar*"/>
  1936. </parameter>
  1937. <parameter name="element_srcpad_name"
  1938. transfer-ownership="none"
  1939. nullable="1"
  1940. allow-none="1">
  1941. <doc xml:space="preserve">a #gchar with the name of the element
  1942. srcpad that is then linked to the harness sinkpad. %NULL does not attach a
  1943. srcpad</doc>
  1944. <type name="utf8" c:type="const gchar*"/>
  1945. </parameter>
  1946. </parameters>
  1947. </function>
  1948. <function name="new_with_padnames"
  1949. c:identifier="gst_harness_new_with_padnames"
  1950. version="1.6"
  1951. introspectable="0">
  1952. <doc xml:space="preserve">Creates a new harness. Works like gst_harness_new_with_element(),
  1953. except you specify the factoryname of the #GstElement
  1954. MT safe.</doc>
  1955. <return-value transfer-ownership="full">
  1956. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1957. not be created</doc>
  1958. <type name="Harness" c:type="GstHarness*"/>
  1959. </return-value>
  1960. <parameters>
  1961. <parameter name="element_name" transfer-ownership="none">
  1962. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  1963. <type name="utf8" c:type="const gchar*"/>
  1964. </parameter>
  1965. <parameter name="element_sinkpad_name"
  1966. transfer-ownership="none"
  1967. nullable="1"
  1968. allow-none="1">
  1969. <doc xml:space="preserve">a #gchar with the name of the element
  1970. sinkpad that is then linked to the harness srcpad. %NULL does not attach a
  1971. sinkpad</doc>
  1972. <type name="utf8" c:type="const gchar*"/>
  1973. </parameter>
  1974. <parameter name="element_srcpad_name"
  1975. transfer-ownership="none"
  1976. nullable="1"
  1977. allow-none="1">
  1978. <doc xml:space="preserve">a #gchar with the name of the element
  1979. srcpad that is then linked to the harness sinkpad. %NULL does not attach a
  1980. srcpad</doc>
  1981. <type name="utf8" c:type="const gchar*"/>
  1982. </parameter>
  1983. </parameters>
  1984. </function>
  1985. <function name="new_with_templates"
  1986. c:identifier="gst_harness_new_with_templates"
  1987. version="1.6"
  1988. introspectable="0">
  1989. <doc xml:space="preserve">Creates a new harness, like gst_harness_new_full(), except it
  1990. assumes the #GstElement sinkpad is named "sink" and srcpad is named "src"
  1991. MT safe.</doc>
  1992. <return-value transfer-ownership="full">
  1993. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  1994. not be created</doc>
  1995. <type name="Harness" c:type="GstHarness*"/>
  1996. </return-value>
  1997. <parameters>
  1998. <parameter name="element_name" transfer-ownership="none">
  1999. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  2000. <type name="utf8" c:type="const gchar*"/>
  2001. </parameter>
  2002. <parameter name="hsrc"
  2003. transfer-ownership="none"
  2004. nullable="1"
  2005. allow-none="1">
  2006. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness srcpad.
  2007. %NULL will not create a harness srcpad.</doc>
  2008. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  2009. </parameter>
  2010. <parameter name="hsink"
  2011. transfer-ownership="none"
  2012. nullable="1"
  2013. allow-none="1">
  2014. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness sinkpad.
  2015. %NULL will not create a harness sinkpad.</doc>
  2016. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  2017. </parameter>
  2018. </parameters>
  2019. </function>
  2020. <function name="stress_thread_stop"
  2021. c:identifier="gst_harness_stress_thread_stop"
  2022. version="1.6">
  2023. <doc xml:space="preserve">Stop the running #GstHarnessThread
  2024. MT safe.</doc>
  2025. <return-value transfer-ownership="none">
  2026. <type name="guint" c:type="guint"/>
  2027. </return-value>
  2028. <parameters>
  2029. <parameter name="t" transfer-ownership="none">
  2030. <doc xml:space="preserve">a #GstHarnessThread</doc>
  2031. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  2032. </parameter>
  2033. </parameters>
  2034. </function>
  2035. </record>
  2036. <callback name="HarnessPrepareBufferFunc"
  2037. c:type="GstHarnessPrepareBufferFunc"
  2038. version="1.6">
  2039. <return-value transfer-ownership="full">
  2040. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2041. </return-value>
  2042. <parameters>
  2043. <parameter name="h" transfer-ownership="none">
  2044. <doc xml:space="preserve">a #GstHarness</doc>
  2045. <type name="Harness" c:type="GstHarness*"/>
  2046. </parameter>
  2047. <parameter name="data"
  2048. transfer-ownership="none"
  2049. nullable="1"
  2050. allow-none="1">
  2051. <doc xml:space="preserve">user data</doc>
  2052. <type name="gpointer" c:type="gpointer"/>
  2053. </parameter>
  2054. </parameters>
  2055. </callback>
  2056. <callback name="HarnessPrepareEventFunc"
  2057. c:type="GstHarnessPrepareEventFunc"
  2058. version="1.8">
  2059. <return-value transfer-ownership="full">
  2060. <type name="Gst.Event" c:type="GstEvent*"/>
  2061. </return-value>
  2062. <parameters>
  2063. <parameter name="h" transfer-ownership="none">
  2064. <doc xml:space="preserve">a #GstHarness</doc>
  2065. <type name="Harness" c:type="GstHarness*"/>
  2066. </parameter>
  2067. <parameter name="data"
  2068. transfer-ownership="none"
  2069. nullable="1"
  2070. allow-none="1">
  2071. <doc xml:space="preserve">user data</doc>
  2072. <type name="gpointer" c:type="gpointer"/>
  2073. </parameter>
  2074. </parameters>
  2075. </callback>
  2076. <record name="HarnessPrivate" c:type="GstHarnessPrivate" disguised="1">
  2077. </record>
  2078. <record name="HarnessThread"
  2079. c:type="GstHarnessThread"
  2080. disguised="1"
  2081. version="1.6">
  2082. <doc xml:space="preserve">Opaque handle representing a GstHarness stress testing thread.</doc>
  2083. </record>
  2084. <record name="StreamConsistency"
  2085. c:type="GstStreamConsistency"
  2086. disguised="1">
  2087. <doc xml:space="preserve">Opaque consistency checker handle.</doc>
  2088. </record>
  2089. <class name="TestClock"
  2090. c:symbol-prefix="test_clock"
  2091. c:type="GstTestClock"
  2092. version="1.2"
  2093. parent="Gst.Clock"
  2094. glib:type-name="GstTestClock"
  2095. glib:get-type="gst_test_clock_get_type"
  2096. glib:type-struct="TestClockClass">
  2097. <doc xml:space="preserve">GstTestClock is an implementation of #GstClock which has different
  2098. behaviour compared to #GstSystemClock. Time for #GstSystemClock advances
  2099. according to the system time, while time for #GstTestClock changes only
  2100. when gst_test_clock_set_time() or gst_test_clock_advance_time() are
  2101. called. #GstTestClock provides unit tests with the possibility to
  2102. precisely advance the time in a deterministic manner, independent of the
  2103. system time or any other external factors.
  2104. &lt;example&gt;
  2105. &lt;title&gt;Advancing the time of a #GstTestClock&lt;/title&gt;
  2106. &lt;programlisting language="c"&gt;
  2107. #include &amp;lt;gst/gst.h&amp;gt;
  2108. #include &amp;lt;gst/check/gsttestclock.h&amp;gt;
  2109. GstClock *clock;
  2110. GstTestClock *test_clock;
  2111. clock = gst_test_clock_new ();
  2112. test_clock = GST_TEST_CLOCK (clock);
  2113. GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  2114. gst_test_clock_advance_time ( test_clock, 1 * GST_SECOND);
  2115. GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  2116. g_usleep (10 * G_USEC_PER_SEC);
  2117. GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  2118. gst_test_clock_set_time (test_clock, 42 * GST_SECOND);
  2119. GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  2120. ...
  2121. &lt;/programlisting&gt;
  2122. &lt;/example&gt;
  2123. #GstClock allows for setting up single shot or periodic clock notifications
  2124. as well as waiting for these notifications synchronously (using
  2125. gst_clock_id_wait()) or asynchronously (using gst_clock_id_wait_async() or
  2126. gst_clock_id_wait_async()). This is used by many GStreamer elements,
  2127. among them #GstBaseSrc and #GstBaseSink.
  2128. #GstTestClock keeps track of these clock notifications. By calling
  2129. gst_test_clock_wait_for_next_pending_id() or
  2130. gst_test_clock_wait_for_multiple_pending_ids() a unit tests may wait for the
  2131. next one or several clock notifications to be requested. Additionally unit
  2132. tests may release blocked waits in a controlled fashion by calling
  2133. gst_test_clock_process_next_clock_id(). This way a unit test can control the
  2134. inaccuracy (jitter) of clock notifications, since the test can decide to
  2135. release blocked waits when the clock time has advanced exactly to, or past,
  2136. the requested clock notification time.
  2137. There are also interfaces for determining if a notification belongs to a
  2138. #GstTestClock or not, as well as getting the number of requested clock
  2139. notifications so far.
  2140. N.B.: When a unit test waits for a certain amount of clock notifications to
  2141. be requested in gst_test_clock_wait_for_next_pending_id() or
  2142. gst_test_clock_wait_for_multiple_pending_ids() then these functions may block
  2143. for a long time. If they block forever then the expected clock notifications
  2144. were never requested from #GstTestClock, and so the assumptions in the code
  2145. of the unit test are wrong. The unit test case runner in gstcheck is
  2146. expected to catch these cases either by the default test case timeout or the
  2147. one set for the unit test by calling tcase_set_timeout\(\).
  2148. The sample code below assumes that the element under test will delay a
  2149. buffer pushed on the source pad by some latency until it arrives on the sink
  2150. pad. Moreover it is assumed that the element will at some point call
  2151. gst_clock_id_wait() to synchronously wait for a specific time. The first
  2152. buffer sent will arrive exactly on time only delayed by the latency. The
  2153. second buffer will arrive a little late (7ms) due to simulated jitter in the
  2154. clock notification.
  2155. &lt;example&gt;
  2156. &lt;title&gt;Demonstration of how to work with clock notifications and #GstTestClock&lt;/title&gt;
  2157. &lt;programlisting language="c"&gt;
  2158. #include &amp;lt;gst/gst.h&amp;gt;
  2159. #include &amp;lt;gst/check/gstcheck.h&amp;gt;
  2160. #include &amp;lt;gst/check/gsttestclock.h&amp;gt;
  2161. GstClockTime latency;
  2162. GstElement *element;
  2163. GstPad *srcpad;
  2164. GstClock *clock;
  2165. GstTestClock *test_clock;
  2166. GstBuffer buf;
  2167. GstClockID pending_id;
  2168. GstClockID processed_id;
  2169. latency = 42 * GST_MSECOND;
  2170. element = create_element (latency, ...);
  2171. srcpad = get_source_pad (element);
  2172. clock = gst_test_clock_new ();
  2173. test_clock = GST_TEST_CLOCK (clock);
  2174. gst_element_set_clock (element, clock);
  2175. GST_INFO ("Set time, create and push the first buffer\n");
  2176. gst_test_clock_set_time (test_clock, 0);
  2177. buf = create_test_buffer (gst_clock_get_time (clock), ...);
  2178. gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);
  2179. GST_INFO ("Block until element is waiting for a clock notification\n");
  2180. gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  2181. GST_INFO ("Advance to the requested time of the clock notification\n");
  2182. gst_test_clock_advance_time (test_clock, latency);
  2183. GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  2184. processed_id = gst_test_clock_process_next_clock_id (test_clock);
  2185. g_assert (processed_id == pending_id);
  2186. g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  2187. gst_clock_id_unref (pending_id);
  2188. gst_clock_id_unref (processed_id);
  2189. GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  2190. g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  2191. buf = get_buffer_pushed_by_element (element, ...);
  2192. g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, latency);
  2193. gst_buffer_unref (buf);
  2194. GST_INFO ("Check that element does not wait for any clock notification\n");
  2195. g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL));
  2196. GST_INFO ("Set time, create and push the second buffer\n");
  2197. gst_test_clock_advance_time (test_clock, 10 * GST_SECOND);
  2198. buf = create_test_buffer (gst_clock_get_time (clock), ...);
  2199. gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);
  2200. GST_INFO ("Block until element is waiting for a new clock notification\n");
  2201. (gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  2202. GST_INFO ("Advance past 7ms beyond the requested time of the clock notification\n");
  2203. gst_test_clock_advance_time (test_clock, latency + 7 * GST_MSECOND);
  2204. GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  2205. processed_id = gst_test_clock_process_next_clock_id (test_clock);
  2206. g_assert (processed_id == pending_id);
  2207. g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  2208. gst_clock_id_unref (pending_id);
  2209. gst_clock_id_unref (processed_id);
  2210. GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  2211. g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  2212. buf = get_buffer_pushed_by_element (element, ...);
  2213. g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==,
  2214. 10 * GST_SECOND + latency + 7 * GST_MSECOND);
  2215. gst_buffer_unref (buf);
  2216. GST_INFO ("Check that element does not wait for any clock notification\n");
  2217. g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL));
  2218. ...
  2219. &lt;/programlisting&gt;
  2220. &lt;/example&gt;
  2221. Since #GstTestClock is only supposed to be used in unit tests it calls
  2222. g_assert(), g_assert_cmpint() or g_assert_cmpuint() to validate all function
  2223. arguments. This will highlight any issues with the unit test code itself.</doc>
  2224. <constructor name="new" c:identifier="gst_test_clock_new" version="1.2">
  2225. <doc xml:space="preserve">Creates a new test clock with its time set to zero.
  2226. MT safe.</doc>
  2227. <return-value transfer-ownership="full">
  2228. <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
  2229. <type name="Gst.Clock" c:type="GstClock*"/>
  2230. </return-value>
  2231. </constructor>
  2232. <constructor name="new_with_start_time"
  2233. c:identifier="gst_test_clock_new_with_start_time"
  2234. version="1.2">
  2235. <doc xml:space="preserve">Creates a new test clock with its time set to the specified time.
  2236. MT safe.</doc>
  2237. <return-value transfer-ownership="full">
  2238. <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
  2239. <type name="Gst.Clock" c:type="GstClock*"/>
  2240. </return-value>
  2241. <parameters>
  2242. <parameter name="start_time" transfer-ownership="none">
  2243. <doc xml:space="preserve">a #GstClockTime set to the desired start time of the clock.</doc>
  2244. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  2245. </parameter>
  2246. </parameters>
  2247. </constructor>
  2248. <function name="id_list_get_latest_time"
  2249. c:identifier="gst_test_clock_id_list_get_latest_time"
  2250. version="1.4">
  2251. <doc xml:space="preserve">Finds the latest time inside the list.
  2252. MT safe.</doc>
  2253. <return-value transfer-ownership="none">
  2254. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  2255. </return-value>
  2256. <parameters>
  2257. <parameter name="pending_list"
  2258. transfer-ownership="none"
  2259. nullable="1"
  2260. allow-none="1">
  2261. <doc xml:space="preserve">List
  2262. of of pending #GstClockIDs</doc>
  2263. <type name="GLib.List" c:type="const GList*">
  2264. <type name="Gst.ClockID"/>
  2265. </type>
  2266. </parameter>
  2267. </parameters>
  2268. </function>
  2269. <method name="advance_time"
  2270. c:identifier="gst_test_clock_advance_time"
  2271. version="1.2">
  2272. <doc xml:space="preserve">Advances the time of the @test_clock by the amount given by @delta. The
  2273. time of @test_clock is monotonically increasing, therefore providing a
  2274. @delta which is negative or zero is a programming error.
  2275. MT safe.</doc>
  2276. <return-value transfer-ownership="none">
  2277. <type name="none" c:type="void"/>
  2278. </return-value>
  2279. <parameters>
  2280. <instance-parameter name="test_clock" transfer-ownership="none">
  2281. <doc xml:space="preserve">a #GstTestClock for which to increase the time</doc>
  2282. <type name="TestClock" c:type="GstTestClock*"/>
  2283. </instance-parameter>
  2284. <parameter name="delta" transfer-ownership="none">
  2285. <doc xml:space="preserve">a positive #GstClockTimeDiff to be added to the time of the clock</doc>
  2286. <type name="Gst.ClockTimeDiff" c:type="GstClockTimeDiff"/>
  2287. </parameter>
  2288. </parameters>
  2289. </method>
  2290. <method name="crank" c:identifier="gst_test_clock_crank" version="1.8">
  2291. <doc xml:space="preserve">A "crank" consists of three steps:
  2292. 1: Wait for a #GstClockID to be registered with the #GstTestClock.
  2293. 2: Advance the #GstTestClock to the time the #GstClockID is waiting for.
  2294. 3: Release the #GstClockID wait.
  2295. A "crank" can be though of as the notion of
  2296. manually driving the clock forward to its next logical step.</doc>
  2297. <return-value transfer-ownership="none">
  2298. <doc xml:space="preserve">%TRUE if the crank was successful, %FALSE otherwise.
  2299. MT safe.</doc>
  2300. <type name="gboolean" c:type="gboolean"/>
  2301. </return-value>
  2302. <parameters>
  2303. <instance-parameter name="test_clock" transfer-ownership="none">
  2304. <doc xml:space="preserve">#GstTestClock to crank</doc>
  2305. <type name="TestClock" c:type="GstTestClock*"/>
  2306. </instance-parameter>
  2307. </parameters>
  2308. </method>
  2309. <method name="get_next_entry_time"
  2310. c:identifier="gst_test_clock_get_next_entry_time"
  2311. version="1.2">
  2312. <doc xml:space="preserve">Retrieve the requested time for the next pending clock notification.
  2313. MT safe.</doc>
  2314. <return-value transfer-ownership="none">
  2315. <doc xml:space="preserve">a #GstClockTime set to the time of the next pending clock
  2316. notification. If no clock notifications have been requested
  2317. %GST_CLOCK_TIME_NONE will be returned.</doc>
  2318. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  2319. </return-value>
  2320. <parameters>
  2321. <instance-parameter name="test_clock" transfer-ownership="none">
  2322. <doc xml:space="preserve">a #GstTestClock to fetch the next clock notification time for</doc>
  2323. <type name="TestClock" c:type="GstTestClock*"/>
  2324. </instance-parameter>
  2325. </parameters>
  2326. </method>
  2327. <method name="has_id" c:identifier="gst_test_clock_has_id" version="1.2">
  2328. <doc xml:space="preserve">Checks whether @test_clock was requested to provide the clock notification
  2329. given by @id.
  2330. MT safe.</doc>
  2331. <return-value transfer-ownership="none">
  2332. <doc xml:space="preserve">%TRUE if the clock has been asked to provide the given clock
  2333. notification, %FALSE otherwise.</doc>
  2334. <type name="gboolean" c:type="gboolean"/>
  2335. </return-value>
  2336. <parameters>
  2337. <instance-parameter name="test_clock" transfer-ownership="none">
  2338. <doc xml:space="preserve">a #GstTestClock to ask if it provided the notification</doc>
  2339. <type name="TestClock" c:type="GstTestClock*"/>
  2340. </instance-parameter>
  2341. <parameter name="id" transfer-ownership="none">
  2342. <doc xml:space="preserve">a #GstClockID clock notification</doc>
  2343. <type name="Gst.ClockID" c:type="GstClockID"/>
  2344. </parameter>
  2345. </parameters>
  2346. </method>
  2347. <method name="peek_id_count"
  2348. c:identifier="gst_test_clock_peek_id_count"
  2349. version="1.2">
  2350. <doc xml:space="preserve">Determine the number of pending clock notifications that have been
  2351. requested from the @test_clock.
  2352. MT safe.</doc>
  2353. <return-value transfer-ownership="none">
  2354. <doc xml:space="preserve">the number of pending clock notifications.</doc>
  2355. <type name="guint" c:type="guint"/>
  2356. </return-value>
  2357. <parameters>
  2358. <instance-parameter name="test_clock" transfer-ownership="none">
  2359. <doc xml:space="preserve">a #GstTestClock for which to count notifications</doc>
  2360. <type name="TestClock" c:type="GstTestClock*"/>
  2361. </instance-parameter>
  2362. </parameters>
  2363. </method>
  2364. <method name="peek_next_pending_id"
  2365. c:identifier="gst_test_clock_peek_next_pending_id"
  2366. version="1.2">
  2367. <doc xml:space="preserve">Determines if the @pending_id is the next clock notification scheduled to
  2368. be triggered given the current time of the @test_clock.
  2369. MT safe.</doc>
  2370. <return-value transfer-ownership="none">
  2371. <doc xml:space="preserve">%TRUE if @pending_id is the next clock notification to be
  2372. triggered, %FALSE otherwise.</doc>
  2373. <type name="gboolean" c:type="gboolean"/>
  2374. </return-value>
  2375. <parameters>
  2376. <instance-parameter name="test_clock" transfer-ownership="none">
  2377. <doc xml:space="preserve">a #GstTestClock to check the clock notifications for</doc>
  2378. <type name="TestClock" c:type="GstTestClock*"/>
  2379. </instance-parameter>
  2380. <parameter name="pending_id"
  2381. direction="out"
  2382. caller-allocates="0"
  2383. transfer-ownership="full"
  2384. optional="1"
  2385. allow-none="1">
  2386. <doc xml:space="preserve">a #GstClockID clock
  2387. notification to look for</doc>
  2388. <type name="Gst.ClockID" c:type="GstClockID*"/>
  2389. </parameter>
  2390. </parameters>
  2391. </method>
  2392. <method name="process_id_list"
  2393. c:identifier="gst_test_clock_process_id_list"
  2394. version="1.4">
  2395. <doc xml:space="preserve">Processes and releases the pending IDs in the list.
  2396. MT safe.</doc>
  2397. <return-value transfer-ownership="none">
  2398. <type name="guint" c:type="guint"/>
  2399. </return-value>
  2400. <parameters>
  2401. <instance-parameter name="test_clock" transfer-ownership="none">
  2402. <doc xml:space="preserve">#GstTestClock for which to process the pending IDs</doc>
  2403. <type name="TestClock" c:type="GstTestClock*"/>
  2404. </instance-parameter>
  2405. <parameter name="pending_list"
  2406. transfer-ownership="none"
  2407. nullable="1"
  2408. allow-none="1">
  2409. <doc xml:space="preserve">List
  2410. of pending #GstClockIDs</doc>
  2411. <type name="GLib.List" c:type="const GList*">
  2412. <type name="Gst.ClockID"/>
  2413. </type>
  2414. </parameter>
  2415. </parameters>
  2416. </method>
  2417. <method name="process_next_clock_id"
  2418. c:identifier="gst_test_clock_process_next_clock_id"
  2419. version="1.2">
  2420. <doc xml:space="preserve">MT safe.</doc>
  2421. <return-value transfer-ownership="full">
  2422. <doc xml:space="preserve">a #GstClockID containing the next pending clock
  2423. notification.</doc>
  2424. <type name="Gst.ClockID" c:type="GstClockID"/>
  2425. </return-value>
  2426. <parameters>
  2427. <instance-parameter name="test_clock" transfer-ownership="none">
  2428. <doc xml:space="preserve">a #GstTestClock for which to retrieve the next pending clock
  2429. notification</doc>
  2430. <type name="TestClock" c:type="GstTestClock*"/>
  2431. </instance-parameter>
  2432. </parameters>
  2433. </method>
  2434. <method name="set_time"
  2435. c:identifier="gst_test_clock_set_time"
  2436. version="1.2">
  2437. <doc xml:space="preserve">Sets the time of @test_clock to the time given by @new_time. The time of
  2438. @test_clock is monotonically increasing, therefore providing a @new_time
  2439. which is earlier or equal to the time of the clock as given by
  2440. gst_clock_get_time() is a programming error.
  2441. MT safe.</doc>
  2442. <return-value transfer-ownership="none">
  2443. <type name="none" c:type="void"/>
  2444. </return-value>
  2445. <parameters>
  2446. <instance-parameter name="test_clock" transfer-ownership="none">
  2447. <doc xml:space="preserve">a #GstTestClock of which to set the time</doc>
  2448. <type name="TestClock" c:type="GstTestClock*"/>
  2449. </instance-parameter>
  2450. <parameter name="new_time" transfer-ownership="none">
  2451. <doc xml:space="preserve">a #GstClockTime later than that returned by gst_clock_get_time()</doc>
  2452. <type name="Gst.ClockTime" c:type="GstClockTime"/>
  2453. </parameter>
  2454. </parameters>
  2455. </method>
  2456. <method name="wait_for_multiple_pending_ids"
  2457. c:identifier="gst_test_clock_wait_for_multiple_pending_ids"
  2458. version="1.4">
  2459. <doc xml:space="preserve">Blocks until at least @count clock notifications have been requested from
  2460. @test_clock. There is no timeout for this wait, see the main description of
  2461. #GstTestClock.
  2462. MT safe.</doc>
  2463. <return-value transfer-ownership="none">
  2464. <type name="none" c:type="void"/>
  2465. </return-value>
  2466. <parameters>
  2467. <instance-parameter name="test_clock" transfer-ownership="none">
  2468. <doc xml:space="preserve">#GstTestClock for which to await having enough pending clock</doc>
  2469. <type name="TestClock" c:type="GstTestClock*"/>
  2470. </instance-parameter>
  2471. <parameter name="count" transfer-ownership="none">
  2472. <doc xml:space="preserve">the number of pending clock notifications to wait for</doc>
  2473. <type name="guint" c:type="guint"/>
  2474. </parameter>
  2475. <parameter name="pending_list"
  2476. direction="out"
  2477. caller-allocates="0"
  2478. transfer-ownership="full"
  2479. optional="1"
  2480. allow-none="1">
  2481. <doc xml:space="preserve">Address
  2482. of a #GList pointer variable to store the list of pending #GstClockIDs
  2483. that expired, or %NULL</doc>
  2484. <type name="GLib.List" c:type="GList**">
  2485. <type name="Gst.ClockID"/>
  2486. </type>
  2487. </parameter>
  2488. </parameters>
  2489. </method>
  2490. <method name="wait_for_next_pending_id"
  2491. c:identifier="gst_test_clock_wait_for_next_pending_id"
  2492. version="1.2">
  2493. <doc xml:space="preserve">Waits until a clock notification is requested from @test_clock. There is no
  2494. timeout for this wait, see the main description of #GstTestClock. A reference
  2495. to the pending clock notification is stored in @pending_id.
  2496. MT safe.</doc>
  2497. <return-value transfer-ownership="none">
  2498. <type name="none" c:type="void"/>
  2499. </return-value>
  2500. <parameters>
  2501. <instance-parameter name="test_clock" transfer-ownership="none">
  2502. <doc xml:space="preserve">#GstTestClock for which to get the pending clock notification</doc>
  2503. <type name="TestClock" c:type="GstTestClock*"/>
  2504. </instance-parameter>
  2505. <parameter name="pending_id"
  2506. direction="out"
  2507. caller-allocates="0"
  2508. transfer-ownership="full"
  2509. optional="1"
  2510. allow-none="1">
  2511. <doc xml:space="preserve">#GstClockID
  2512. with information about the pending clock notification</doc>
  2513. <type name="Gst.ClockID" c:type="GstClockID*"/>
  2514. </parameter>
  2515. </parameters>
  2516. </method>
  2517. <method name="wait_for_pending_id_count"
  2518. c:identifier="gst_test_clock_wait_for_pending_id_count"
  2519. version="1.2"
  2520. deprecated="1">
  2521. <doc xml:space="preserve">Blocks until at least @count clock notifications have been requested from
  2522. @test_clock. There is no timeout for this wait, see the main description of
  2523. #GstTestClock.</doc>
  2524. <doc-deprecated xml:space="preserve">use gst_test_clock_wait_for_multiple_pending_ids() instead.</doc-deprecated>
  2525. <return-value transfer-ownership="none">
  2526. <type name="none" c:type="void"/>
  2527. </return-value>
  2528. <parameters>
  2529. <instance-parameter name="test_clock" transfer-ownership="none">
  2530. <doc xml:space="preserve">#GstTestClock for which to await having enough pending clock</doc>
  2531. <type name="TestClock" c:type="GstTestClock*"/>
  2532. </instance-parameter>
  2533. <parameter name="count" transfer-ownership="none">
  2534. <doc xml:space="preserve">the number of pending clock notifications to wait for</doc>
  2535. <type name="guint" c:type="guint"/>
  2536. </parameter>
  2537. </parameters>
  2538. </method>
  2539. <property name="start-time"
  2540. writable="1"
  2541. construct-only="1"
  2542. transfer-ownership="none">
  2543. <doc xml:space="preserve">When a #GstTestClock is constructed it will have a certain start time set.
  2544. If the clock was created using gst_test_clock_new_with_start_time() then
  2545. this property contains the value of the @start_time argument. If
  2546. gst_test_clock_new() was called the clock started at time zero, and thus
  2547. this property contains the value 0.</doc>
  2548. <type name="guint64" c:type="guint64"/>
  2549. </property>
  2550. <field name="parent">
  2551. <type name="Gst.Clock" c:type="GstClock"/>
  2552. </field>
  2553. <field name="priv" readable="0" private="1">
  2554. <type name="TestClockPrivate" c:type="GstTestClockPrivate*"/>
  2555. </field>
  2556. </class>
  2557. <record name="TestClockClass"
  2558. c:type="GstTestClockClass"
  2559. glib:is-gtype-struct-for="TestClock"
  2560. version="1.2">
  2561. <doc xml:space="preserve">The class of a #GstTestClock, which has no virtual methods to override.</doc>
  2562. <field name="parent_class">
  2563. <doc xml:space="preserve">the parent class structure</doc>
  2564. <type name="Gst.ClockClass" c:type="GstClockClass"/>
  2565. </field>
  2566. </record>
  2567. <record name="TestClockPrivate" c:type="GstTestClockPrivate" disguised="1">
  2568. </record>
  2569. <function name="buffer_straw_get_buffer"
  2570. c:identifier="gst_buffer_straw_get_buffer">
  2571. <doc xml:space="preserve">Get one buffer from @pad. Implemented via buffer probes. This function will
  2572. block until the pipeline passes a buffer over @pad, so for robust behavior
  2573. in unit tests, you need to use check's timeout to fail out in the case that a
  2574. buffer never arrives.
  2575. You must have previously called gst_buffer_straw_start_pipeline() on
  2576. @pipeline and @pad.</doc>
  2577. <return-value transfer-ownership="full">
  2578. <doc xml:space="preserve">the captured #GstBuffer.</doc>
  2579. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2580. </return-value>
  2581. <parameters>
  2582. <parameter name="bin" transfer-ownership="none">
  2583. <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
  2584. <type name="Gst.Element" c:type="GstElement*"/>
  2585. </parameter>
  2586. <parameter name="pad" transfer-ownership="none">
  2587. <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
  2588. <type name="Gst.Pad" c:type="GstPad*"/>
  2589. </parameter>
  2590. </parameters>
  2591. </function>
  2592. <function name="buffer_straw_start_pipeline"
  2593. c:identifier="gst_buffer_straw_start_pipeline">
  2594. <doc xml:space="preserve">Sets up a pipeline for buffer sucking. This will allow you to call
  2595. gst_buffer_straw_get_buffer() to access buffers as they pass over @pad.
  2596. This function is normally used in unit tests that want to verify that a
  2597. particular element is outputting correct buffers. For example, you would make
  2598. a pipeline via gst_parse_launch(), pull out the pad you want to monitor, then
  2599. call gst_buffer_straw_get_buffer() to get the buffers that pass through @pad.
  2600. The pipeline will block until you have sucked off the buffers.
  2601. This function will set the state of @bin to PLAYING; to clean up, be sure to
  2602. call gst_buffer_straw_stop_pipeline().
  2603. Note that you may not start two buffer straws at the same time. This function
  2604. is intended for unit tests, not general API use. In fact it calls fail_if
  2605. from libcheck, so you cannot use it outside unit tests.</doc>
  2606. <return-value transfer-ownership="none">
  2607. <type name="none" c:type="void"/>
  2608. </return-value>
  2609. <parameters>
  2610. <parameter name="bin" transfer-ownership="none">
  2611. <doc xml:space="preserve">the pipeline to run</doc>
  2612. <type name="Gst.Element" c:type="GstElement*"/>
  2613. </parameter>
  2614. <parameter name="pad" transfer-ownership="none">
  2615. <doc xml:space="preserve">a pad on an element in @bin</doc>
  2616. <type name="Gst.Pad" c:type="GstPad*"/>
  2617. </parameter>
  2618. </parameters>
  2619. </function>
  2620. <function name="buffer_straw_stop_pipeline"
  2621. c:identifier="gst_buffer_straw_stop_pipeline">
  2622. <doc xml:space="preserve">Set @bin to #GST_STATE_NULL and release resource allocated in
  2623. gst_buffer_straw_start_pipeline().
  2624. You must have previously called gst_buffer_straw_start_pipeline() on
  2625. @pipeline and @pad.</doc>
  2626. <return-value transfer-ownership="none">
  2627. <type name="none" c:type="void"/>
  2628. </return-value>
  2629. <parameters>
  2630. <parameter name="bin" transfer-ownership="none">
  2631. <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
  2632. <type name="Gst.Element" c:type="GstElement*"/>
  2633. </parameter>
  2634. <parameter name="pad" transfer-ownership="none">
  2635. <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
  2636. <type name="Gst.Pad" c:type="GstPad*"/>
  2637. </parameter>
  2638. </parameters>
  2639. </function>
  2640. <function name="check_abi_list" c:identifier="gst_check_abi_list">
  2641. <return-value transfer-ownership="none">
  2642. <type name="none" c:type="void"/>
  2643. </return-value>
  2644. <parameters>
  2645. <parameter name="list" transfer-ownership="none">
  2646. <type name="CheckABIStruct" c:type="GstCheckABIStruct"/>
  2647. </parameter>
  2648. <parameter name="have_abi_sizes" transfer-ownership="none">
  2649. <type name="gboolean" c:type="gboolean"/>
  2650. </parameter>
  2651. </parameters>
  2652. </function>
  2653. <function name="check_buffer_data" c:identifier="gst_check_buffer_data">
  2654. <doc xml:space="preserve">Compare the buffer contents with @data and @size.</doc>
  2655. <return-value transfer-ownership="none">
  2656. <type name="none" c:type="void"/>
  2657. </return-value>
  2658. <parameters>
  2659. <parameter name="buffer" transfer-ownership="none">
  2660. <doc xml:space="preserve">buffer to compare</doc>
  2661. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2662. </parameter>
  2663. <parameter name="data"
  2664. transfer-ownership="none"
  2665. nullable="1"
  2666. allow-none="1">
  2667. <doc xml:space="preserve">data to compare to</doc>
  2668. <type name="gpointer" c:type="gconstpointer"/>
  2669. </parameter>
  2670. <parameter name="size" transfer-ownership="none">
  2671. <doc xml:space="preserve">size of data to compare</doc>
  2672. <type name="gsize" c:type="gsize"/>
  2673. </parameter>
  2674. </parameters>
  2675. </function>
  2676. <function name="check_caps_equal" c:identifier="gst_check_caps_equal">
  2677. <doc xml:space="preserve">Compare two caps with gst_caps_is_equal and fail unless they are
  2678. equal.</doc>
  2679. <return-value transfer-ownership="none">
  2680. <type name="none" c:type="void"/>
  2681. </return-value>
  2682. <parameters>
  2683. <parameter name="caps1" transfer-ownership="none">
  2684. <doc xml:space="preserve">first caps to compare</doc>
  2685. <type name="Gst.Caps" c:type="GstCaps*"/>
  2686. </parameter>
  2687. <parameter name="caps2" transfer-ownership="none">
  2688. <doc xml:space="preserve">second caps to compare</doc>
  2689. <type name="Gst.Caps" c:type="GstCaps*"/>
  2690. </parameter>
  2691. </parameters>
  2692. </function>
  2693. <function name="check_chain_func" c:identifier="gst_check_chain_func">
  2694. <return-value transfer-ownership="none">
  2695. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  2696. </return-value>
  2697. <parameters>
  2698. <parameter name="pad" transfer-ownership="none">
  2699. <type name="Gst.Pad" c:type="GstPad*"/>
  2700. </parameter>
  2701. <parameter name="parent" transfer-ownership="none">
  2702. <type name="Gst.Object" c:type="GstObject*"/>
  2703. </parameter>
  2704. <parameter name="buffer" transfer-ownership="none">
  2705. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2706. </parameter>
  2707. </parameters>
  2708. </function>
  2709. <function name="check_drop_buffers" c:identifier="gst_check_drop_buffers">
  2710. <doc xml:space="preserve">Unref and remove all buffers that are in the global @buffers GList,
  2711. emptying the list.</doc>
  2712. <return-value transfer-ownership="none">
  2713. <type name="none" c:type="void"/>
  2714. </return-value>
  2715. </function>
  2716. <function name="check_element_push_buffer"
  2717. c:identifier="gst_check_element_push_buffer">
  2718. <doc xml:space="preserve">Create an element using the factory providing the @element_name and
  2719. push the @buffer_in to this element. The element should create one buffer
  2720. and this will be compared with @buffer_out. We only check the caps
  2721. and the data of the buffers. This function unrefs the buffers.</doc>
  2722. <return-value transfer-ownership="none">
  2723. <type name="none" c:type="void"/>
  2724. </return-value>
  2725. <parameters>
  2726. <parameter name="element_name" transfer-ownership="none">
  2727. <doc xml:space="preserve">name of the element that needs to be created</doc>
  2728. <type name="utf8" c:type="const gchar*"/>
  2729. </parameter>
  2730. <parameter name="buffer_in" transfer-ownership="none">
  2731. <doc xml:space="preserve">push this buffer to the element</doc>
  2732. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2733. </parameter>
  2734. <parameter name="caps_in" transfer-ownership="none">
  2735. <doc xml:space="preserve">the #GstCaps expected of the sinkpad of the element</doc>
  2736. <type name="Gst.Caps" c:type="GstCaps*"/>
  2737. </parameter>
  2738. <parameter name="buffer_out" transfer-ownership="none">
  2739. <doc xml:space="preserve">compare the result with this buffer</doc>
  2740. <type name="Gst.Buffer" c:type="GstBuffer*"/>
  2741. </parameter>
  2742. <parameter name="caps_out" transfer-ownership="none">
  2743. <doc xml:space="preserve">the #GstCaps expected of the srcpad of the element</doc>
  2744. <type name="Gst.Caps" c:type="GstCaps*"/>
  2745. </parameter>
  2746. </parameters>
  2747. </function>
  2748. <function name="check_element_push_buffer_list"
  2749. c:identifier="gst_check_element_push_buffer_list">
  2750. <doc xml:space="preserve">Create an element using the factory providing the @element_name and push the
  2751. buffers in @buffer_in to this element. The element should create the buffers
  2752. equal to the buffers in @buffer_out. We only check the size and the data of
  2753. the buffers. This function unrefs the buffers in the two lists.
  2754. The last_flow_return parameter indicates the expected flow return value from
  2755. pushing the final buffer in the list.
  2756. This can be used to set up a test which pushes some buffers and then an
  2757. invalid buffer, when the final buffer is expected to fail, for example.</doc>
  2758. <return-value transfer-ownership="none">
  2759. <type name="none" c:type="void"/>
  2760. </return-value>
  2761. <parameters>
  2762. <parameter name="element_name" transfer-ownership="none">
  2763. <doc xml:space="preserve">name of the element that needs to be created</doc>
  2764. <type name="utf8" c:type="const gchar*"/>
  2765. </parameter>
  2766. <parameter name="buffer_in" transfer-ownership="full">
  2767. <doc xml:space="preserve">a list of buffers that needs to be
  2768. pushed to the element</doc>
  2769. <type name="GLib.List" c:type="GList*">
  2770. <type name="Gst.Buffer"/>
  2771. </type>
  2772. </parameter>
  2773. <parameter name="caps_in" transfer-ownership="none">
  2774. <doc xml:space="preserve">the #GstCaps expected of the sinkpad of the element</doc>
  2775. <type name="Gst.Caps" c:type="GstCaps*"/>
  2776. </parameter>
  2777. <parameter name="buffer_out" transfer-ownership="full">
  2778. <doc xml:space="preserve">a list of buffers that we expect from
  2779. the element</doc>
  2780. <type name="GLib.List" c:type="GList*">
  2781. <type name="Gst.Buffer"/>
  2782. </type>
  2783. </parameter>
  2784. <parameter name="caps_out" transfer-ownership="none">
  2785. <doc xml:space="preserve">the #GstCaps expected of the srcpad of the element</doc>
  2786. <type name="Gst.Caps" c:type="GstCaps*"/>
  2787. </parameter>
  2788. <parameter name="last_flow_return" transfer-ownership="none">
  2789. <doc xml:space="preserve">the last buffer push needs to give this GstFlowReturn</doc>
  2790. <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
  2791. </parameter>
  2792. </parameters>
  2793. </function>
  2794. <function name="check_init" c:identifier="gst_check_init">
  2795. <return-value transfer-ownership="none">
  2796. <type name="none" c:type="void"/>
  2797. </return-value>
  2798. <parameters>
  2799. <parameter name="argc" transfer-ownership="none">
  2800. <type name="gint" c:type="int*"/>
  2801. </parameter>
  2802. <parameter name="argv" transfer-ownership="none">
  2803. <type name="utf8" c:type="char**"/>
  2804. </parameter>
  2805. </parameters>
  2806. </function>
  2807. <function name="check_message_error"
  2808. c:identifier="gst_check_message_error">
  2809. <return-value transfer-ownership="none">
  2810. <type name="none" c:type="void"/>
  2811. </return-value>
  2812. <parameters>
  2813. <parameter name="message" transfer-ownership="none">
  2814. <type name="Gst.Message" c:type="GstMessage*"/>
  2815. </parameter>
  2816. <parameter name="type" transfer-ownership="none">
  2817. <type name="Gst.MessageType" c:type="GstMessageType"/>
  2818. </parameter>
  2819. <parameter name="domain" transfer-ownership="none">
  2820. <type name="GLib.Quark" c:type="GQuark"/>
  2821. </parameter>
  2822. <parameter name="code" transfer-ownership="none">
  2823. <type name="gint" c:type="gint"/>
  2824. </parameter>
  2825. </parameters>
  2826. </function>
  2827. <function name="check_object_destroyed_on_unref"
  2828. c:identifier="gst_check_object_destroyed_on_unref"
  2829. version="1.6">
  2830. <doc xml:space="preserve">Unrefs @object_to_unref and checks that is has properly been
  2831. destroyed.</doc>
  2832. <return-value transfer-ownership="none">
  2833. <type name="none" c:type="void"/>
  2834. </return-value>
  2835. <parameters>
  2836. <parameter name="object_to_unref"
  2837. transfer-ownership="none"
  2838. nullable="1"
  2839. allow-none="1">
  2840. <doc xml:space="preserve">The #GObject to unref</doc>
  2841. <type name="gpointer" c:type="gpointer"/>
  2842. </parameter>
  2843. </parameters>
  2844. </function>
  2845. <function name="check_objects_destroyed_on_unref"
  2846. c:identifier="gst_check_objects_destroyed_on_unref"
  2847. version="1.6"
  2848. introspectable="0">
  2849. <doc xml:space="preserve">Unrefs @object_to_unref and checks that is has properly been
  2850. destroyed, also checks that the other objects passed in
  2851. parametter have been destroyed as a concequence of
  2852. unrefing @object_to_unref. Last variable argument should be NULL.</doc>
  2853. <return-value transfer-ownership="none">
  2854. <type name="none" c:type="void"/>
  2855. </return-value>
  2856. <parameters>
  2857. <parameter name="object_to_unref"
  2858. transfer-ownership="none"
  2859. nullable="1"
  2860. allow-none="1">
  2861. <doc xml:space="preserve">The #GObject to unref</doc>
  2862. <type name="gpointer" c:type="gpointer"/>
  2863. </parameter>
  2864. <parameter name="first_object"
  2865. transfer-ownership="none"
  2866. nullable="1"
  2867. allow-none="1">
  2868. <doc xml:space="preserve">The first object that should be destroyed as a
  2869. concequence of unrefing @object_to_unref.</doc>
  2870. <type name="gpointer" c:type="gpointer"/>
  2871. </parameter>
  2872. <parameter name="..." transfer-ownership="none">
  2873. <doc xml:space="preserve">Additional object that should have been destroyed.</doc>
  2874. <varargs/>
  2875. </parameter>
  2876. </parameters>
  2877. </function>
  2878. <function name="check_run_suite"
  2879. c:identifier="gst_check_run_suite"
  2880. introspectable="0">
  2881. <return-value transfer-ownership="none">
  2882. <type name="gint" c:type="gint"/>
  2883. </return-value>
  2884. <parameters>
  2885. <parameter name="suite" transfer-ownership="none">
  2886. <type c:type="Suite*"/>
  2887. </parameter>
  2888. <parameter name="name" transfer-ownership="none">
  2889. <type name="utf8" c:type="const gchar*"/>
  2890. </parameter>
  2891. <parameter name="fname" transfer-ownership="none">
  2892. <type name="utf8" c:type="const gchar*"/>
  2893. </parameter>
  2894. </parameters>
  2895. </function>
  2896. <function name="check_setup_element"
  2897. c:identifier="gst_check_setup_element">
  2898. <doc xml:space="preserve">setup an element for a filter test with mysrcpad and mysinkpad</doc>
  2899. <return-value transfer-ownership="full">
  2900. <doc xml:space="preserve">a new element</doc>
  2901. <type name="Gst.Element" c:type="GstElement*"/>
  2902. </return-value>
  2903. <parameters>
  2904. <parameter name="factory" transfer-ownership="none">
  2905. <doc xml:space="preserve">factory</doc>
  2906. <type name="utf8" c:type="const gchar*"/>
  2907. </parameter>
  2908. </parameters>
  2909. </function>
  2910. <function name="check_setup_events" c:identifier="gst_check_setup_events">
  2911. <doc xml:space="preserve">Push stream-start, caps and segment event, which consist of the minimum
  2912. required events to allow streaming. Caps is optional to allow raw src
  2913. testing. If @element has more than one src or sink pad, use
  2914. gst_check_setup_events_with_stream_id() instead.</doc>
  2915. <return-value transfer-ownership="none">
  2916. <type name="none" c:type="void"/>
  2917. </return-value>
  2918. <parameters>
  2919. <parameter name="srcpad" transfer-ownership="none">
  2920. <doc xml:space="preserve">The src #GstPad to push on</doc>
  2921. <type name="Gst.Pad" c:type="GstPad*"/>
  2922. </parameter>
  2923. <parameter name="element" transfer-ownership="none">
  2924. <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
  2925. <type name="Gst.Element" c:type="GstElement*"/>
  2926. </parameter>
  2927. <parameter name="caps"
  2928. transfer-ownership="none"
  2929. nullable="1"
  2930. allow-none="1">
  2931. <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
  2932. <type name="Gst.Caps" c:type="GstCaps*"/>
  2933. </parameter>
  2934. <parameter name="format" transfer-ownership="none">
  2935. <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
  2936. <type name="Gst.Format" c:type="GstFormat"/>
  2937. </parameter>
  2938. </parameters>
  2939. </function>
  2940. <function name="check_setup_events_with_stream_id"
  2941. c:identifier="gst_check_setup_events_with_stream_id">
  2942. <doc xml:space="preserve">Push stream-start, caps and segment event, which consist of the minimum
  2943. required events to allow streaming. Caps is optional to allow raw src
  2944. testing.</doc>
  2945. <return-value transfer-ownership="none">
  2946. <type name="none" c:type="void"/>
  2947. </return-value>
  2948. <parameters>
  2949. <parameter name="srcpad" transfer-ownership="none">
  2950. <doc xml:space="preserve">The src #GstPad to push on</doc>
  2951. <type name="Gst.Pad" c:type="GstPad*"/>
  2952. </parameter>
  2953. <parameter name="element" transfer-ownership="none">
  2954. <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
  2955. <type name="Gst.Element" c:type="GstElement*"/>
  2956. </parameter>
  2957. <parameter name="caps"
  2958. transfer-ownership="none"
  2959. nullable="1"
  2960. allow-none="1">
  2961. <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
  2962. <type name="Gst.Caps" c:type="GstCaps*"/>
  2963. </parameter>
  2964. <parameter name="format" transfer-ownership="none">
  2965. <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
  2966. <type name="Gst.Format" c:type="GstFormat"/>
  2967. </parameter>
  2968. <parameter name="stream_id" transfer-ownership="none">
  2969. <doc xml:space="preserve">A unique identifier for the stream</doc>
  2970. <type name="utf8" c:type="const gchar*"/>
  2971. </parameter>
  2972. </parameters>
  2973. </function>
  2974. <function name="check_setup_sink_pad"
  2975. c:identifier="gst_check_setup_sink_pad">
  2976. <doc xml:space="preserve">Does the same as #gst_check_setup_sink_pad_by_name with the &lt;emphasis&gt; name &lt;/emphasis&gt; parameter equal to "src".</doc>
  2977. <return-value transfer-ownership="full">
  2978. <doc xml:space="preserve">a new pad that can be used to check the output of @element</doc>
  2979. <type name="Gst.Pad" c:type="GstPad*"/>
  2980. </return-value>
  2981. <parameters>
  2982. <parameter name="element" transfer-ownership="none">
  2983. <doc xml:space="preserve">element to setup pad on</doc>
  2984. <type name="Gst.Element" c:type="GstElement*"/>
  2985. </parameter>
  2986. <parameter name="tmpl" transfer-ownership="none">
  2987. <doc xml:space="preserve">pad template</doc>
  2988. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  2989. </parameter>
  2990. </parameters>
  2991. </function>
  2992. <function name="check_setup_sink_pad_by_name"
  2993. c:identifier="gst_check_setup_sink_pad_by_name">
  2994. <doc xml:space="preserve">Creates a new sink pad (based on the given @tmpl) and links it to the given @element src pad
  2995. (the pad that matches the given @name).
  2996. You can set event/chain/query functions on this pad to check the output of the @element.</doc>
  2997. <return-value transfer-ownership="full">
  2998. <doc xml:space="preserve">a new pad that can be used to check the output of @element</doc>
  2999. <type name="Gst.Pad" c:type="GstPad*"/>
  3000. </return-value>
  3001. <parameters>
  3002. <parameter name="element" transfer-ownership="none">
  3003. <doc xml:space="preserve">element to setup pad on</doc>
  3004. <type name="Gst.Element" c:type="GstElement*"/>
  3005. </parameter>
  3006. <parameter name="tmpl" transfer-ownership="none">
  3007. <doc xml:space="preserve">pad template</doc>
  3008. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3009. </parameter>
  3010. <parameter name="name" transfer-ownership="none">
  3011. <doc xml:space="preserve">Name of the @element src pad that will be linked to the sink pad that will be setup</doc>
  3012. <type name="utf8" c:type="const gchar*"/>
  3013. </parameter>
  3014. </parameters>
  3015. </function>
  3016. <function name="check_setup_sink_pad_by_name_from_template"
  3017. c:identifier="gst_check_setup_sink_pad_by_name_from_template"
  3018. version="1.4">
  3019. <return-value transfer-ownership="full">
  3020. <doc xml:space="preserve">a new pad</doc>
  3021. <type name="Gst.Pad" c:type="GstPad*"/>
  3022. </return-value>
  3023. <parameters>
  3024. <parameter name="element" transfer-ownership="none">
  3025. <doc xml:space="preserve">element to setup pad on</doc>
  3026. <type name="Gst.Element" c:type="GstElement*"/>
  3027. </parameter>
  3028. <parameter name="tmpl" transfer-ownership="none">
  3029. <doc xml:space="preserve">pad template</doc>
  3030. <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
  3031. </parameter>
  3032. <parameter name="name" transfer-ownership="none">
  3033. <doc xml:space="preserve">name</doc>
  3034. <type name="utf8" c:type="const gchar*"/>
  3035. </parameter>
  3036. </parameters>
  3037. </function>
  3038. <function name="check_setup_sink_pad_from_template"
  3039. c:identifier="gst_check_setup_sink_pad_from_template"
  3040. version="1.4">
  3041. <return-value transfer-ownership="full">
  3042. <doc xml:space="preserve">a new pad</doc>
  3043. <type name="Gst.Pad" c:type="GstPad*"/>
  3044. </return-value>
  3045. <parameters>
  3046. <parameter name="element" transfer-ownership="none">
  3047. <doc xml:space="preserve">element to setup pad on</doc>
  3048. <type name="Gst.Element" c:type="GstElement*"/>
  3049. </parameter>
  3050. <parameter name="tmpl" transfer-ownership="none">
  3051. <doc xml:space="preserve">pad template</doc>
  3052. <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
  3053. </parameter>
  3054. </parameters>
  3055. </function>
  3056. <function name="check_setup_src_pad"
  3057. c:identifier="gst_check_setup_src_pad">
  3058. <doc xml:space="preserve">Does the same as #gst_check_setup_src_pad_by_name with the &lt;emphasis&gt; name &lt;/emphasis&gt; parameter equal to "sink".</doc>
  3059. <return-value transfer-ownership="full">
  3060. <doc xml:space="preserve">A new pad that can be used to inject data on @element</doc>
  3061. <type name="Gst.Pad" c:type="GstPad*"/>
  3062. </return-value>
  3063. <parameters>
  3064. <parameter name="element" transfer-ownership="none">
  3065. <doc xml:space="preserve">element to setup pad on</doc>
  3066. <type name="Gst.Element" c:type="GstElement*"/>
  3067. </parameter>
  3068. <parameter name="tmpl" transfer-ownership="none">
  3069. <doc xml:space="preserve">pad template</doc>
  3070. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3071. </parameter>
  3072. </parameters>
  3073. </function>
  3074. <function name="check_setup_src_pad_by_name"
  3075. c:identifier="gst_check_setup_src_pad_by_name">
  3076. <doc xml:space="preserve">Creates a new src pad (based on the given @tmpl) and links it to the given @element sink pad (the pad that matches the given @name).
  3077. Before using the src pad to push data on @element you need to call #gst_check_setup_events on the created src pad.
  3078. Example of how to push a buffer on @element:
  3079. |[&lt;!-- language="C" --&gt;
  3080. static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
  3081. GST_PAD_SINK,
  3082. GST_PAD_ALWAYS,
  3083. GST_STATIC_CAPS (YOUR_CAPS_TEMPLATE_STRING)
  3084. );
  3085. static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
  3086. GST_PAD_SRC,
  3087. GST_PAD_ALWAYS,
  3088. GST_STATIC_CAPS (YOUR_CAPS_TEMPLATE_STRING)
  3089. );
  3090. GstElement * element = gst_check_setup_element ("element");
  3091. GstPad * mysrcpad = gst_check_setup_src_pad (element, &amp;srctemplate);
  3092. GstPad * mysinkpad = gst_check_setup_sink_pad (element, &amp;sinktemplate);
  3093. gst_pad_set_active (mysrcpad, TRUE);
  3094. gst_pad_set_active (mysinkpad, TRUE);
  3095. fail_unless (gst_element_set_state (element, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, "could not set to playing");
  3096. GstCaps * caps = gst_caps_from_string (YOUR_DESIRED_SINK_CAPS);
  3097. gst_check_setup_events (mysrcpad, element, caps, GST_FORMAT_TIME);
  3098. gst_caps_unref (caps);
  3099. fail_unless (gst_pad_push (mysrcpad, gst_buffer_new_and_alloc(2)) == GST_FLOW_OK);
  3100. ]|
  3101. For very simple input/output test scenarios checkout #gst_check_element_push_buffer_list and #gst_check_element_push_buffer.</doc>
  3102. <return-value transfer-ownership="full">
  3103. <doc xml:space="preserve">A new pad that can be used to inject data on @element</doc>
  3104. <type name="Gst.Pad" c:type="GstPad*"/>
  3105. </return-value>
  3106. <parameters>
  3107. <parameter name="element" transfer-ownership="none">
  3108. <doc xml:space="preserve">element to setup src pad on</doc>
  3109. <type name="Gst.Element" c:type="GstElement*"/>
  3110. </parameter>
  3111. <parameter name="tmpl" transfer-ownership="none">
  3112. <doc xml:space="preserve">pad template</doc>
  3113. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3114. </parameter>
  3115. <parameter name="name" transfer-ownership="none">
  3116. <doc xml:space="preserve">Name of the @element sink pad that will be linked to the src pad that will be setup</doc>
  3117. <type name="utf8" c:type="const gchar*"/>
  3118. </parameter>
  3119. </parameters>
  3120. </function>
  3121. <function name="check_setup_src_pad_by_name_from_template"
  3122. c:identifier="gst_check_setup_src_pad_by_name_from_template"
  3123. version="1.4">
  3124. <return-value transfer-ownership="full">
  3125. <doc xml:space="preserve">a new pad</doc>
  3126. <type name="Gst.Pad" c:type="GstPad*"/>
  3127. </return-value>
  3128. <parameters>
  3129. <parameter name="element" transfer-ownership="none">
  3130. <doc xml:space="preserve">element to setup pad on</doc>
  3131. <type name="Gst.Element" c:type="GstElement*"/>
  3132. </parameter>
  3133. <parameter name="tmpl" transfer-ownership="none">
  3134. <doc xml:space="preserve">pad template</doc>
  3135. <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
  3136. </parameter>
  3137. <parameter name="name" transfer-ownership="none">
  3138. <doc xml:space="preserve">name</doc>
  3139. <type name="utf8" c:type="const gchar*"/>
  3140. </parameter>
  3141. </parameters>
  3142. </function>
  3143. <function name="check_setup_src_pad_from_template"
  3144. c:identifier="gst_check_setup_src_pad_from_template"
  3145. version="1.4">
  3146. <return-value transfer-ownership="full">
  3147. <doc xml:space="preserve">a new pad</doc>
  3148. <type name="Gst.Pad" c:type="GstPad*"/>
  3149. </return-value>
  3150. <parameters>
  3151. <parameter name="element" transfer-ownership="none">
  3152. <doc xml:space="preserve">element to setup pad on</doc>
  3153. <type name="Gst.Element" c:type="GstElement*"/>
  3154. </parameter>
  3155. <parameter name="tmpl" transfer-ownership="none">
  3156. <doc xml:space="preserve">pad template</doc>
  3157. <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
  3158. </parameter>
  3159. </parameters>
  3160. </function>
  3161. <function name="check_teardown_element"
  3162. c:identifier="gst_check_teardown_element">
  3163. <return-value transfer-ownership="none">
  3164. <type name="none" c:type="void"/>
  3165. </return-value>
  3166. <parameters>
  3167. <parameter name="element" transfer-ownership="none">
  3168. <type name="Gst.Element" c:type="GstElement*"/>
  3169. </parameter>
  3170. </parameters>
  3171. </function>
  3172. <function name="check_teardown_pad_by_name"
  3173. c:identifier="gst_check_teardown_pad_by_name">
  3174. <return-value transfer-ownership="none">
  3175. <type name="none" c:type="void"/>
  3176. </return-value>
  3177. <parameters>
  3178. <parameter name="element" transfer-ownership="none">
  3179. <type name="Gst.Element" c:type="GstElement*"/>
  3180. </parameter>
  3181. <parameter name="name" transfer-ownership="none">
  3182. <type name="utf8" c:type="const gchar*"/>
  3183. </parameter>
  3184. </parameters>
  3185. </function>
  3186. <function name="check_teardown_sink_pad"
  3187. c:identifier="gst_check_teardown_sink_pad">
  3188. <return-value transfer-ownership="none">
  3189. <type name="none" c:type="void"/>
  3190. </return-value>
  3191. <parameters>
  3192. <parameter name="element" transfer-ownership="none">
  3193. <type name="Gst.Element" c:type="GstElement*"/>
  3194. </parameter>
  3195. </parameters>
  3196. </function>
  3197. <function name="check_teardown_src_pad"
  3198. c:identifier="gst_check_teardown_src_pad">
  3199. <return-value transfer-ownership="none">
  3200. <type name="none" c:type="void"/>
  3201. </return-value>
  3202. <parameters>
  3203. <parameter name="element" transfer-ownership="none">
  3204. <type name="Gst.Element" c:type="GstElement*"/>
  3205. </parameter>
  3206. </parameters>
  3207. </function>
  3208. <function name="consistency_checker_add_pad"
  3209. c:identifier="gst_consistency_checker_add_pad">
  3210. <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
  3211. data flow is inconsistent.</doc>
  3212. <return-value transfer-ownership="none">
  3213. <doc xml:space="preserve">%TRUE if the pad was added</doc>
  3214. <type name="gboolean" c:type="gboolean"/>
  3215. </return-value>
  3216. <parameters>
  3217. <parameter name="consist" transfer-ownership="none">
  3218. <doc xml:space="preserve">The #GstStreamConsistency handle</doc>
  3219. <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
  3220. </parameter>
  3221. <parameter name="pad" transfer-ownership="none">
  3222. <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
  3223. <type name="Gst.Pad" c:type="GstPad*"/>
  3224. </parameter>
  3225. </parameters>
  3226. </function>
  3227. <function name="consistency_checker_free"
  3228. c:identifier="gst_consistency_checker_free">
  3229. <doc xml:space="preserve">Frees the allocated data and probes associated with @consist.</doc>
  3230. <return-value transfer-ownership="none">
  3231. <type name="none" c:type="void"/>
  3232. </return-value>
  3233. <parameters>
  3234. <parameter name="consist" transfer-ownership="none">
  3235. <doc xml:space="preserve">The #GstStreamConsistency to free.</doc>
  3236. <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
  3237. </parameter>
  3238. </parameters>
  3239. </function>
  3240. <function name="consistency_checker_new"
  3241. c:identifier="gst_consistency_checker_new"
  3242. introspectable="0">
  3243. <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
  3244. data flow is inconsistent.</doc>
  3245. <return-value>
  3246. <doc xml:space="preserve">A #GstStreamConsistency structure used to track data flow.</doc>
  3247. <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
  3248. </return-value>
  3249. <parameters>
  3250. <parameter name="pad" transfer-ownership="none">
  3251. <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
  3252. <type name="Gst.Pad" c:type="GstPad*"/>
  3253. </parameter>
  3254. </parameters>
  3255. </function>
  3256. <function name="consistency_checker_reset"
  3257. c:identifier="gst_consistency_checker_reset">
  3258. <doc xml:space="preserve">Reset the stream checker's internal variables.</doc>
  3259. <return-value transfer-ownership="none">
  3260. <type name="none" c:type="void"/>
  3261. </return-value>
  3262. <parameters>
  3263. <parameter name="consist" transfer-ownership="none">
  3264. <doc xml:space="preserve">The #GstStreamConsistency to reset.</doc>
  3265. <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
  3266. </parameter>
  3267. </parameters>
  3268. </function>
  3269. <function name="harness_new"
  3270. c:identifier="gst_harness_new"
  3271. moved-to="Harness.new"
  3272. version="1.6"
  3273. introspectable="0">
  3274. <doc xml:space="preserve">Creates a new harness. Works like gst_harness_new_with_padnames(), except it
  3275. assumes the #GstElement sinkpad is named "sink" and srcpad is named "src"
  3276. MT safe.</doc>
  3277. <return-value transfer-ownership="full">
  3278. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3279. not be created</doc>
  3280. <type name="Harness" c:type="GstHarness*"/>
  3281. </return-value>
  3282. <parameters>
  3283. <parameter name="element_name" transfer-ownership="none">
  3284. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  3285. <type name="utf8" c:type="const gchar*"/>
  3286. </parameter>
  3287. </parameters>
  3288. </function>
  3289. <function name="harness_new_empty"
  3290. c:identifier="gst_harness_new_empty"
  3291. moved-to="Harness.new_empty"
  3292. version="1.8"
  3293. introspectable="0">
  3294. <doc xml:space="preserve">Creates a new empty harness. Use gst_harness_add_element_full() to add
  3295. an #GstElement to it.
  3296. MT safe.</doc>
  3297. <return-value transfer-ownership="full">
  3298. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3299. not be created</doc>
  3300. <type name="Harness" c:type="GstHarness*"/>
  3301. </return-value>
  3302. </function>
  3303. <function name="harness_new_full"
  3304. c:identifier="gst_harness_new_full"
  3305. moved-to="Harness.new_full"
  3306. version="1.6"
  3307. introspectable="0">
  3308. <doc xml:space="preserve">Creates a new harness.
  3309. MT safe.</doc>
  3310. <return-value transfer-ownership="full">
  3311. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3312. not be created</doc>
  3313. <type name="Harness" c:type="GstHarness*"/>
  3314. </return-value>
  3315. <parameters>
  3316. <parameter name="element" transfer-ownership="none">
  3317. <doc xml:space="preserve">a #GstElement to attach the harness to (transfer none)</doc>
  3318. <type name="Gst.Element" c:type="GstElement*"/>
  3319. </parameter>
  3320. <parameter name="hsrc"
  3321. transfer-ownership="none"
  3322. nullable="1"
  3323. allow-none="1">
  3324. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness srcpad.
  3325. %NULL will not create a harness srcpad.</doc>
  3326. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3327. </parameter>
  3328. <parameter name="element_sinkpad_name"
  3329. transfer-ownership="none"
  3330. nullable="1"
  3331. allow-none="1">
  3332. <doc xml:space="preserve">a #gchar with the name of the element
  3333. sinkpad that is then linked to the harness srcpad. Can be a static or request
  3334. or a sometimes pad that has been added. %NULL will not get/request a sinkpad
  3335. from the element. (Like if the element is a src.)</doc>
  3336. <type name="utf8" c:type="const gchar*"/>
  3337. </parameter>
  3338. <parameter name="hsink"
  3339. transfer-ownership="none"
  3340. nullable="1"
  3341. allow-none="1">
  3342. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness sinkpad.
  3343. %NULL will not create a harness sinkpad.</doc>
  3344. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3345. </parameter>
  3346. <parameter name="element_srcpad_name"
  3347. transfer-ownership="none"
  3348. nullable="1"
  3349. allow-none="1">
  3350. <doc xml:space="preserve">a #gchar with the name of the element
  3351. srcpad that is then linked to the harness sinkpad, similar to the
  3352. @element_sinkpad_name.</doc>
  3353. <type name="utf8" c:type="const gchar*"/>
  3354. </parameter>
  3355. </parameters>
  3356. </function>
  3357. <function name="harness_new_parse"
  3358. c:identifier="gst_harness_new_parse"
  3359. moved-to="Harness.new_parse"
  3360. version="1.6"
  3361. introspectable="0">
  3362. <doc xml:space="preserve">Creates a new harness, parsing the @launchline and putting that in a #GstBin,
  3363. and then attches the harness to the bin.
  3364. MT safe.</doc>
  3365. <return-value transfer-ownership="full">
  3366. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3367. not be created</doc>
  3368. <type name="Harness" c:type="GstHarness*"/>
  3369. </return-value>
  3370. <parameters>
  3371. <parameter name="launchline" transfer-ownership="none">
  3372. <doc xml:space="preserve">a #gchar describing a gst-launch type line</doc>
  3373. <type name="utf8" c:type="const gchar*"/>
  3374. </parameter>
  3375. </parameters>
  3376. </function>
  3377. <function name="harness_new_with_element"
  3378. c:identifier="gst_harness_new_with_element"
  3379. moved-to="Harness.new_with_element"
  3380. version="1.6"
  3381. introspectable="0">
  3382. <doc xml:space="preserve">Creates a new harness. Works in the same way as gst_harness_new_full(), only
  3383. that generic padtemplates are used for the harness src and sinkpads, which
  3384. will be sufficient in most usecases.
  3385. MT safe.</doc>
  3386. <return-value transfer-ownership="full">
  3387. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3388. not be created</doc>
  3389. <type name="Harness" c:type="GstHarness*"/>
  3390. </return-value>
  3391. <parameters>
  3392. <parameter name="element" transfer-ownership="none">
  3393. <doc xml:space="preserve">a #GstElement to attach the harness to (transfer none)</doc>
  3394. <type name="Gst.Element" c:type="GstElement*"/>
  3395. </parameter>
  3396. <parameter name="element_sinkpad_name"
  3397. transfer-ownership="none"
  3398. nullable="1"
  3399. allow-none="1">
  3400. <doc xml:space="preserve">a #gchar with the name of the element
  3401. sinkpad that is then linked to the harness srcpad. %NULL does not attach a
  3402. sinkpad</doc>
  3403. <type name="utf8" c:type="const gchar*"/>
  3404. </parameter>
  3405. <parameter name="element_srcpad_name"
  3406. transfer-ownership="none"
  3407. nullable="1"
  3408. allow-none="1">
  3409. <doc xml:space="preserve">a #gchar with the name of the element
  3410. srcpad that is then linked to the harness sinkpad. %NULL does not attach a
  3411. srcpad</doc>
  3412. <type name="utf8" c:type="const gchar*"/>
  3413. </parameter>
  3414. </parameters>
  3415. </function>
  3416. <function name="harness_new_with_padnames"
  3417. c:identifier="gst_harness_new_with_padnames"
  3418. moved-to="Harness.new_with_padnames"
  3419. version="1.6"
  3420. introspectable="0">
  3421. <doc xml:space="preserve">Creates a new harness. Works like gst_harness_new_with_element(),
  3422. except you specify the factoryname of the #GstElement
  3423. MT safe.</doc>
  3424. <return-value transfer-ownership="full">
  3425. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3426. not be created</doc>
  3427. <type name="Harness" c:type="GstHarness*"/>
  3428. </return-value>
  3429. <parameters>
  3430. <parameter name="element_name" transfer-ownership="none">
  3431. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  3432. <type name="utf8" c:type="const gchar*"/>
  3433. </parameter>
  3434. <parameter name="element_sinkpad_name"
  3435. transfer-ownership="none"
  3436. nullable="1"
  3437. allow-none="1">
  3438. <doc xml:space="preserve">a #gchar with the name of the element
  3439. sinkpad that is then linked to the harness srcpad. %NULL does not attach a
  3440. sinkpad</doc>
  3441. <type name="utf8" c:type="const gchar*"/>
  3442. </parameter>
  3443. <parameter name="element_srcpad_name"
  3444. transfer-ownership="none"
  3445. nullable="1"
  3446. allow-none="1">
  3447. <doc xml:space="preserve">a #gchar with the name of the element
  3448. srcpad that is then linked to the harness sinkpad. %NULL does not attach a
  3449. srcpad</doc>
  3450. <type name="utf8" c:type="const gchar*"/>
  3451. </parameter>
  3452. </parameters>
  3453. </function>
  3454. <function name="harness_new_with_templates"
  3455. c:identifier="gst_harness_new_with_templates"
  3456. moved-to="Harness.new_with_templates"
  3457. version="1.6"
  3458. introspectable="0">
  3459. <doc xml:space="preserve">Creates a new harness, like gst_harness_new_full(), except it
  3460. assumes the #GstElement sinkpad is named "sink" and srcpad is named "src"
  3461. MT safe.</doc>
  3462. <return-value transfer-ownership="full">
  3463. <doc xml:space="preserve">a #GstHarness, or %NULL if the harness could
  3464. not be created</doc>
  3465. <type name="Harness" c:type="GstHarness*"/>
  3466. </return-value>
  3467. <parameters>
  3468. <parameter name="element_name" transfer-ownership="none">
  3469. <doc xml:space="preserve">a #gchar describing the #GstElement name</doc>
  3470. <type name="utf8" c:type="const gchar*"/>
  3471. </parameter>
  3472. <parameter name="hsrc"
  3473. transfer-ownership="none"
  3474. nullable="1"
  3475. allow-none="1">
  3476. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness srcpad.
  3477. %NULL will not create a harness srcpad.</doc>
  3478. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3479. </parameter>
  3480. <parameter name="hsink"
  3481. transfer-ownership="none"
  3482. nullable="1"
  3483. allow-none="1">
  3484. <doc xml:space="preserve">a #GstStaticPadTemplate describing the harness sinkpad.
  3485. %NULL will not create a harness sinkpad.</doc>
  3486. <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
  3487. </parameter>
  3488. </parameters>
  3489. </function>
  3490. <function name="harness_stress_thread_stop"
  3491. c:identifier="gst_harness_stress_thread_stop"
  3492. moved-to="Harness.stress_thread_stop"
  3493. version="1.6">
  3494. <doc xml:space="preserve">Stop the running #GstHarnessThread
  3495. MT safe.</doc>
  3496. <return-value transfer-ownership="none">
  3497. <type name="guint" c:type="guint"/>
  3498. </return-value>
  3499. <parameters>
  3500. <parameter name="t" transfer-ownership="none">
  3501. <doc xml:space="preserve">a #GstHarnessThread</doc>
  3502. <type name="HarnessThread" c:type="GstHarnessThread*"/>
  3503. </parameter>
  3504. </parameters>
  3505. </function>
  3506. </namespace>
  3507. </repository>