RtpSplitter.h 1.06 KB
Newer Older
Gemfield committed
1
/*
xiongziliang committed
2
 * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
3 4 5
 *
 * This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
 *
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_RTPSPLITTER_H
#define ZLMEDIAKIT_RTPSPLITTER_H
Gemfield committed
13

14
#if defined(ENABLE_RTPPROXY)
Gemfield committed
15
#include "Http/HttpRequestSplitter.h"
16 17

namespace mediakit{
Gemfield committed
18 19 20 21 22

class RtpSplitter : public HttpRequestSplitter{
public:
    RtpSplitter();
    virtual ~RtpSplitter();
23

Gemfield committed
24 25 26 27 28
protected:
    /**
     * 收到rtp包回调
     */
    virtual void onRtpPacket(const char *data,uint64_t len) = 0;
29

Gemfield committed
30 31
protected:
    const char *onSearchPacketTail(const char *data,int len) override ;
32
    const char *onSearchPacketTail_l(const char *data,int len);
Gemfield committed
33 34 35
    int64_t onRecvHeader(const char *data,uint64_t len) override;
};

36 37 38
}//namespace mediakit
#endif//defined(ENABLE_RTPPROXY)
#endif //ZLMEDIAKIT_RTPSPLITTER_H