diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-05-03 21:38:24 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-05-03 22:31:58 +0300 |
commit | 029a7a51591e791b94b16233f11642d88fb26cca (patch) | |
tree | fcd369726e301179376dd1cfd57061c8d0a81841 | |
parent | 5877ca96c79804d62f24d098e3198ab1353f4262 (diff) |
QGst/sample: Fix const-ness of Sample methods
Getters in general should be const, even if it's just for
looking nice in the API documentation :)
The returned Structure there doesn't need to be const because
the underlying GstStructure object is copied anyway in C++
-rw-r--r-- | src/QGst/sample.cpp | 6 | ||||
-rw-r--r-- | src/QGst/sample.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/QGst/sample.cpp b/src/QGst/sample.cpp index 1711660..625fbbd 100644 --- a/src/QGst/sample.cpp +++ b/src/QGst/sample.cpp @@ -35,17 +35,17 @@ SamplePtr Sample::create(const BufferPtr & buffer, const CapsPtr & caps, return SamplePtr::wrap(gst_sample_new(buffer, caps, segment, cinfo), false); } -BufferPtr Sample::buffer() +BufferPtr Sample::buffer() const { return BufferPtr::wrap(gst_sample_get_buffer(object<GstSample>())); } -CapsPtr Sample::caps() +CapsPtr Sample::caps() const { return CapsPtr::wrap(gst_sample_get_caps(object<GstSample>())); } -const Structure Sample::info() +Structure Sample::info() const { return Structure(gst_sample_get_info(object<GstSample>())); } diff --git a/src/QGst/sample.h b/src/QGst/sample.h index 318f386..bc7d37a 100644 --- a/src/QGst/sample.h +++ b/src/QGst/sample.h @@ -35,9 +35,9 @@ public: static SamplePtr create(const BufferPtr & buffer, const CapsPtr & caps, const Segment & segment, const Structure & info); - BufferPtr buffer(); - CapsPtr caps(); - const Structure info(); + BufferPtr buffer() const; + CapsPtr caps() const; + Structure info() const; Segment segment() const; }; } //namespace QGst |