rtp解包采用自有代码

This commit is contained in:
xiongziliang
2020-09-06 17:51:21 +08:00
parent 9fa2221a79
commit 74d6689a65
5 changed files with 10 additions and 110 deletions

View File

@@ -14,16 +14,16 @@
#if defined(ENABLE_RTPPROXY)
#include "Rtsp/RtpReceiver.h"
#include "RtpDecoder.h"
#include "Decoder.h"
#include "Common/Device.h"
#include "Common/Stamp.h"
#include "Http/HttpRequestSplitter.h"
#include "Extension/CommonRtp.h"
using namespace mediakit;
namespace mediakit{
class RtpProcess : public HttpRequestSplitter, public RtpReceiver , public RtpDecoder, public SockInfo, public MediaSinkInterface, public std::enable_shared_from_this<RtpProcess>{
class RtpProcess : public HttpRequestSplitter, public RtpReceiver, public SockInfo, public MediaSinkInterface, public std::enable_shared_from_this<RtpProcess>{
public:
typedef std::shared_ptr<RtpProcess> Ptr;
RtpProcess(const string &stream_id);
@@ -67,7 +67,6 @@ public:
protected:
void onRtpSorted(const RtpPacket::Ptr &rtp, int track_index) override ;
void onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestamp, int flags) override;
void inputFrame(const Frame::Ptr &frame) override;
void addTrack(const Track::Ptr & track) override;
void resetTracks() override {};
@@ -77,8 +76,10 @@ protected:
private:
void emitOnPublish();
void onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestamp);
private:
std::shared_ptr<CommonRtpDecoder> _rtp_decoder;
std::shared_ptr<FILE> _save_file_rtp;
std::shared_ptr<FILE> _save_file_ps;
std::shared_ptr<FILE> _save_file_video;