{"id":1151,"date":"2023-12-14T23:13:05","date_gmt":"2023-12-14T15:13:05","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=1151"},"modified":"2023-12-14T23:15:43","modified_gmt":"2023-12-14T15:15:43","slug":"gstelement","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=1151","title":{"rendered":"GstElement"},"content":{"rendered":"<p>GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating GstElement subclasses.<\/p>\n<p>GstElement \u662f\u6784\u5efa\u5143\u7d20\u7684\u62bd\u8c61\u57fa\u7c7b<\/p>\n<p>The name of a GstElement can be get with gst_element_get_name and set with gst_element_set_name. For speed, GST_ELEMENT_NAME can be used in the core when using the appropriate locking. Do not use this in plug-ins or applications in order to retain ABI compatibility.<\/p>\n<p>Elements can have pads (of the type GstPad). These pads link to pads on other elements. GstBuffer flow between these linked pads. <\/p>\n<p>A GstElement has a GList of GstPad structures for all their input (or sink) and output (or source) pads. <\/p>\n<p>Core and plug-in writers can add and remove pads with gst_element_add_pad and gst_element_remove_pad.<\/p>\n<p>Element \u6709 pads , \u7c7b\u578b\u4e3a GstPad<\/p>\n<p>An existing pad of an element can be retrieved by name with gst_element_get_static_pad. <\/p>\n<p>A new dynamic pad can be created using gst_element_request_pad with a GstPadTemplate. An iterator of all pads can be retrieved with gst_element_iterate_pads.<\/p>\n<p>Elements can be linked through their pads. If the link is straightforward, use the gst_element_link convenience function to link two elements, or gst_element_link_many for more elements in a row. <\/p>\n<p>Use gst_element_link_filtered to link two elements constrained by a specified set of GstCaps. For finer control, use gst_element_link_pads and gst_element_link_pads_filtered to specify the pads to link on each element by name.<\/p>\n<p>Each element has a state (see GstState). You can get and set the state of an element with gst_element_get_state and gst_element_set_state. Setting a state triggers a GstStateChange. To get a string representation of a GstState, use gst_element_state_get_name.<\/p>\n<p>You can get and set a GstClock on an element using gst_element_get_clock and gst_element_set_clock. <\/p>\n<p>Some elements can provide a clock for the pipeline if the GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the gst_element_provide_clock method one can retrieve the clock provided by such an element. Not all elements require a clock to operate correctly. If the GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the element with gst_element_set_clock.<\/p>\n<p>Note that clock selection and distribution is normally handled by the toplevel GstPipeline so the clock functions are only to be used in very specific situations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating GstElement subclasses. GstElement \u662f\u6784\u5efa\u5143\u7d20\u7684\u62bd\u8c61\u57fa\u7c7b The name of a GstElement can be get with gst_element_get_name and set with gst_element_set_name. For speed, GST_ELEMENT_NAME can be used [&hellip;] <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=1151\" title=\"Permanent Link to: GstElement\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1151","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1151"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1151"}],"version-history":[{"count":2,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1151\/revisions"}],"predecessor-version":[{"id":1153,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1151\/revisions\/1153"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}