ZLMediaKit/src/Rtp/RtpSplitter.h

39 lines
1.1 KiB
C++
Raw Normal View History

2019-12-05 19:20:12 +08:00
/*
2020-04-04 20:30:09 +08:00
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
2019-12-06 11:54:10 +08:00
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
*
2020-04-04 20:30:09 +08:00
* 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.
2019-12-06 11:54:10 +08:00
*/
2019-12-05 19:20:12 +08:00
2019-12-06 11:54:10 +08:00
#ifndef ZLMEDIAKIT_RTPSPLITTER_H
#define ZLMEDIAKIT_RTPSPLITTER_H
2019-12-05 19:20:12 +08:00
2019-12-06 11:54:10 +08:00
#if defined(ENABLE_RTPPROXY)
2019-12-05 19:20:12 +08:00
#include "Http/HttpRequestSplitter.h"
2019-12-06 11:54:10 +08:00
namespace mediakit{
2019-12-05 19:20:12 +08:00
class RtpSplitter : public HttpRequestSplitter{
public:
RtpSplitter();
virtual ~RtpSplitter();
2020-08-15 09:48:27 +08:00
2019-12-05 19:20:12 +08:00
protected:
/**
* rtp包回调
*/
virtual void onRtpPacket(const char *data,uint64_t len) = 0;
2020-08-15 09:48:27 +08:00
2019-12-05 19:20:12 +08:00
protected:
const char *onSearchPacketTail(const char *data,int len) override ;
2020-08-15 09:48:27 +08:00
const char *onSearchPacketTail_l(const char *data,int len);
2019-12-05 19:20:12 +08:00
int64_t onRecvHeader(const char *data,uint64_t len) override;
};
2019-12-06 11:54:10 +08:00
}//namespace mediakit
#endif//defined(ENABLE_RTPPROXY)
#endif //ZLMEDIAKIT_RTPSPLITTER_H