mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-02 16:37:34 +08:00
rtp解包采用自有代码
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user