Unified code style (#2137)

This commit is contained in:
老衲不出家
2022-12-02 14:43:06 +08:00
committed by GitHub
parent a12b7c8021
commit f05a9501fa
62 changed files with 166 additions and 149 deletions

View File

@@ -20,9 +20,9 @@ namespace mediakit {
class Decoder {
public:
typedef std::shared_ptr<Decoder> Ptr;
typedef std::function<void(int stream, int codecid, int flags, int64_t pts, int64_t dts, const void *data, size_t bytes)> onDecode;
typedef std::function<void(int stream, int codecid, const void *extra, size_t bytes, int finish)> onStream;
using Ptr = std::shared_ptr<Decoder>;
using onDecode = std::function<void(int stream, int codecid, int flags, int64_t pts, int64_t dts, const void *data, size_t bytes)>;
using onStream = std::function<void(int stream, int codecid, const void *extra, size_t bytes, int finish)>;
virtual ssize_t input(const uint8_t *data, size_t bytes) = 0;
void setOnDecode(onDecode cb);
@@ -41,7 +41,7 @@ class DecoderImp{
public:
typedef enum { decoder_ts = 0, decoder_ps } Type;
typedef std::shared_ptr<DecoderImp> Ptr;
using Ptr = std::shared_ptr<DecoderImp>;
~DecoderImp() = default;
static Ptr createDecoder(Type type, MediaSinkInterface *sink);