Commit db1ef33d authored by Adrien Béraud's avatar Adrien Béraud Committed by Philippe Gorley

mediaframe: add const pointer method

Change-Id: Ifeaf66cf06d8859be25642064ce09761a1552894
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 556061ee
......@@ -80,7 +80,8 @@ public:
virtual ~MediaFrame() = default;
// Return a pointer on underlaying buffer
AVFrame* pointer() const noexcept { return frame_.get(); }
const AVFrame* pointer() const noexcept { return frame_.get(); }
AVFrame* pointer() noexcept { return frame_.get(); }
// Fill this MediaFrame with data from o
void copyFrom(const MediaFrame& o);
......
......@@ -310,7 +310,7 @@ MediaDecoder::decode(VideoFrame& result)
#endif // RING_VIDEO
MediaDecoder::Status
MediaDecoder::decode(const AudioFrame& decodedFrame)
MediaDecoder::decode(AudioFrame& decodedFrame)
{
const auto frame = decodedFrame.pointer();
......
......@@ -89,7 +89,7 @@ class MediaDecoder {
#endif // RING_VIDEO
int setupFromAudioData();
Status decode(const AudioFrame&);
Status decode(AudioFrame&);
void writeToRingBuffer(const AudioFrame&, RingBuffer&, const AudioFormat);
int getWidth() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment