mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Change class name RtpVideoSession to RtpCodec
This commit is contained in:
@@ -47,7 +47,7 @@ IceTransmission::~IceTransmission() {
|
||||
}
|
||||
|
||||
int IceTransmission::InitIceTransmission(std::string &ip, int port) {
|
||||
rtp_video_session_ = std::make_unique<RtpVideoSession>(PAYLOAD_TYPE::H264);
|
||||
rtp_codec_ = std::make_unique<RtpCodec>(PAYLOAD_TYPE::H264);
|
||||
rtp_video_receiver_ = std::make_unique<RtpVideoReceiver>();
|
||||
rtp_video_receiver_->SetOnReceiveCompleteFrame(
|
||||
[this](VideoFrame &video_frame) -> void {
|
||||
@@ -211,8 +211,8 @@ int IceTransmission::SendData(const char *data, size_t size) {
|
||||
if (JUICE_STATE_COMPLETED == state_) {
|
||||
std::vector<RtpPacket> packets;
|
||||
|
||||
if (rtp_video_session_) {
|
||||
rtp_video_session_->Encode((uint8_t *)data, size, packets);
|
||||
if (rtp_codec_) {
|
||||
rtp_codec_->Encode((uint8_t *)data, size, packets);
|
||||
}
|
||||
if (rtp_video_sender_) {
|
||||
rtp_video_sender_->Enqueue(packets);
|
||||
@@ -223,7 +223,7 @@ int IceTransmission::SendData(const char *data, size_t size) {
|
||||
// }
|
||||
|
||||
// std::vector<RtpPacket> packets =
|
||||
// rtp_video_session_->Encode((uint8_t *)(data), size);
|
||||
// rtp_codec_->Encode((uint8_t *)(data), size);
|
||||
|
||||
// send_ringbuffer_.insert(send_ringbuffer_.end(), packets.begin(),
|
||||
// packets.end());
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include "congestion_control.h"
|
||||
#include "ice_agent.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "rtp_codec.h"
|
||||
#include "rtp_packet.h"
|
||||
#include "rtp_video_receiver.h"
|
||||
#include "rtp_video_sender.h"
|
||||
#include "rtp_video_session.h"
|
||||
#include "ws_transmission.h"
|
||||
|
||||
class IceTransmission {
|
||||
@@ -72,7 +72,7 @@ class IceTransmission {
|
||||
juice_state_t state_ = JUICE_STATE_DISCONNECTED;
|
||||
|
||||
private:
|
||||
std::unique_ptr<RtpVideoSession> rtp_video_session_ = nullptr;
|
||||
std::unique_ptr<RtpCodec> rtp_codec_ = nullptr;
|
||||
std::unique_ptr<RtpVideoReceiver> rtp_video_receiver_ = nullptr;
|
||||
std::unique_ptr<RtpVideoSender> rtp_video_sender_ = nullptr;
|
||||
uint8_t *rtp_payload_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user