PSDecoder.h 976 Bytes
Newer Older
Gemfield committed
1
/*
xiongziliang committed
2
 * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
3
 *
4
 * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
5
 *
xiongziliang committed
6 7 8
 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
9
 */
Gemfield committed
10

11 12
#ifndef ZLMEDIAKIT_PSDECODER_H
#define ZLMEDIAKIT_PSDECODER_H
Gemfield committed
13

14 15
#if defined(ENABLE_RTPPROXY)
#include <stdint.h>
xiongziliang committed
16
#include "Decoder.h"
17
namespace mediakit{
Gemfield committed
18

xiongziliang committed
19 20
//ps解析器
class PSDecoder : public Decoder {
Gemfield committed
21 22
public:
    PSDecoder();
xiongziliang committed
23
    ~PSDecoder();
xia-chu committed
24
    ssize_t input(const uint8_t* data, size_t bytes) override;
25 26 27
    void setOnDecode(onDecode cb) override;
    void setOnStream(onStream cb) override;

Gemfield committed
28
private:
29
    void *_ps_demuxer = nullptr;
xiongziliang committed
30
    onDecode _on_decode;
31
    onStream _on_stream;
Gemfield committed
32 33
};

34 35 36
}//namespace mediakit
#endif//defined(ENABLE_RTPPROXY)
#endif //ZLMEDIAKIT_PSDECODER_H