Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-07-26 18:33:14 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-07-26 18:46:32 +0300
commit0eb777cf5acf7c48ade2a83de5f441e96cf61b90 (patch)
tree8fbe97f7e3876b598fca03c3e5b9a59cb7a9763f /tutorial
parent1730de6cea10cb73ff1ab882a8235d540bfa5061 (diff)
Update for removal of ObjectImpl::get_type_data()
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/src/identity.rs3
-rw-r--r--tutorial/src/progressbin.rs3
-rw-r--r--tutorial/src/rgb2gray.rs3
-rw-r--r--tutorial/src/sinesrc.rs3
-rw-r--r--tutorial/tutorial-1.md10
-rw-r--r--tutorial/tutorial-2.md3
6 files changed, 3 insertions, 22 deletions
diff --git a/tutorial/src/identity.rs b/tutorial/src/identity.rs
index c4d615a97..e77b44fdd 100644
--- a/tutorial/src/identity.rs
+++ b/tutorial/src/identity.rs
@@ -230,9 +230,6 @@ impl ObjectSubclass for Identity {
// Implementation of glib::Object virtual methods
impl ObjectImpl for Identity {
- // This macro provides some boilerplate
- glib_object_impl!();
-
// Called right after construction of a new instance
fn constructed(&self, obj: &glib::Object) {
// Call the parent class' ::constructed() implementation first
diff --git a/tutorial/src/progressbin.rs b/tutorial/src/progressbin.rs
index 0af0871bf..35a9e650d 100644
--- a/tutorial/src/progressbin.rs
+++ b/tutorial/src/progressbin.rs
@@ -156,9 +156,6 @@ impl ObjectSubclass for ProgressBin {
// Implementation of glib::Object virtual methods
impl ObjectImpl for ProgressBin {
- // This macro provides some boilerplate
- glib_object_impl!();
-
// Called whenever a value of a property is changed. It can be called
// at any time from any thread.
fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) {
diff --git a/tutorial/src/rgb2gray.rs b/tutorial/src/rgb2gray.rs
index e06fa0240..af47ad352 100644
--- a/tutorial/src/rgb2gray.rs
+++ b/tutorial/src/rgb2gray.rs
@@ -237,9 +237,6 @@ impl ObjectSubclass for Rgb2Gray {
// Implementation of glib::Object virtual methods
impl ObjectImpl for Rgb2Gray {
- // This macro provides some boilerplate.
- glib_object_impl!();
-
// Called whenever a value of a property is changed. It can be called
// at any time from any thread.
fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) {
diff --git a/tutorial/src/sinesrc.rs b/tutorial/src/sinesrc.rs
index 0befa1fd7..2c4bad8ca 100644
--- a/tutorial/src/sinesrc.rs
+++ b/tutorial/src/sinesrc.rs
@@ -280,9 +280,6 @@ impl ObjectSubclass for SineSrc {
// Implementation of glib::Object virtual methods
impl ObjectImpl for SineSrc {
- // This macro provides some boilerplate.
- glib_object_impl!();
-
// Called right after construction of a new instance
fn constructed(&self, obj: &glib::Object) {
// Call the parent class' ::constructed() implementation first
diff --git a/tutorial/tutorial-1.md b/tutorial/tutorial-1.md
index 924da6532..3f0933e78 100644
--- a/tutorial/tutorial-1.md
+++ b/tutorial/tutorial-1.md
@@ -257,12 +257,10 @@ In the `new` function we return our empty struct.
In the `class_init` function we, again, set up some metadata for our new element. In this case these are a description, a classification of our element, a longer description and the author. The metadata can later be retrieved and made use of via the [`Registry`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.Registry.html) and [`PluginFeature`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.PluginFeature.html)/[`ElementFactory`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.ElementFactory.html) API. We also configure the `BaseTransform` class and define that we will never operate in-place (producing our output in the input buffer), and that we don’t want to work in passthrough mode if the input/output formats are the same.
-Additionally we need to implement various traits on the Rgb2Gray struct, which will later be used to override virtual methods of the various parent classes of our element. For now we can keep the trait implementations empty, except for `ObjectImpl` trait which should simply call the `glib_object_impl!()` macro for some boilerplate code. There is one trait implementation required per parent class.
+Additionally we need to implement various traits on the Rgb2Gray struct, which will later be used to override virtual methods of the various parent classes of our element. For now we can keep the trait implementations empty. There is one trait implementation required per parent class.
```rust
-impl ObjectImpl for Rgb2Gray {
- glib_object_impl!();
-}
+impl ObjectImpl for Rgb2Gray {}
impl ElementImpl for Rgb2Gray {}
impl BaseTransformImpl for Rgb2Gray {}
```
@@ -287,9 +285,7 @@ impl ObjectSubclass for Rgb2Gray {
glib_object_subclass!();
}
-impl ObjectImpl for Rgb2Gray {
- glib_object_impl!();
-}
+impl ObjectImpl for Rgb2Gray {}
impl ElementImpl for Rgb2Gray {}
diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md
index 9c8217616..f1f03f769 100644
--- a/tutorial/tutorial-2.md
+++ b/tutorial/tutorial-2.md
@@ -230,9 +230,6 @@ impl ObjectSubclass for SineSrc {
}
impl ObjectImpl for SineSrc {
- // This macro provides some boilerplate.
- glib_object_impl!();
-
// Called right after construction of a new instance
fn constructed(&self, obj: &glib::Object) {
// Call the parent class' ::constructed() implementation first