input/InputStream: pass std::span<std::byte> to Read()
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright The Music Player Daemon Project
|
||||
|
||||
#ifndef MPD_FFMPEG_IO_HXX
|
||||
#define MPD_FFMPEG_IO_HXX
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include "libavformat/avio.h"
|
||||
}
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
|
||||
class DecoderClient;
|
||||
class InputStream;
|
||||
@@ -27,11 +28,9 @@ struct AvioStream {
|
||||
bool Open();
|
||||
|
||||
private:
|
||||
int Read(void *buffer, int size);
|
||||
int Read(std::span<std::byte> dest);
|
||||
int64_t Seek(int64_t pos, int whence);
|
||||
|
||||
static int _Read(void *opaque, uint8_t *buf, int size);
|
||||
static int64_t _Seek(void *opaque, int64_t pos, int whence);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user