Remove Opus code from the project
This commit is contained in:
parent
482e55f3de
commit
9cba1af32a
|
@ -1,22 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "formats/generic.hh"
|
|
||||||
|
|
||||||
namespace uvg_rtp {
|
|
||||||
|
|
||||||
namespace opus {
|
|
||||||
struct opus_config {
|
|
||||||
uint32_t samplerate;
|
|
||||||
uint8_t channels;
|
|
||||||
uint8_t config_number;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* TODO: */
|
|
||||||
rtp_error_t push_frame(uvg_rtp::sender *sender, uint8_t *data, uint32_t data_len, int flags);
|
|
||||||
|
|
||||||
/* TODO: */
|
|
||||||
rtp_error_t push_frame(uvg_rtp::sender *sender, std::unique_ptr<uint8_t[]> data, uint32_t data_len, int flags);
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,6 +1,5 @@
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/formats/media.cc \
|
src/formats/media.cc \
|
||||||
src/formats/opus.cc \
|
|
||||||
src/formats/hevc.cc \
|
src/formats/hevc.cc \
|
||||||
src/formats/hevc_pkt_handler.cc \
|
src/formats/hevc_pkt_handler.cc \
|
||||||
src/formats/hevc_recv_optimistic.cc
|
src/formats/hevc_recv_optimistic.cc
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
#if 0
|
|
||||||
#include <cstring>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "debug.hh"
|
|
||||||
#include "send.hh"
|
|
||||||
|
|
||||||
#include "formats/opus.hh"
|
|
||||||
|
|
||||||
/* Validity of arguments is checked by uvg_rtp::sender. We just need to relay them there */
|
|
||||||
rtp_error_t uvg_rtp::opus::push_frame(uvg_rtp::sender *sender, uint8_t *data, uint32_t data_len, int flags)
|
|
||||||
{
|
|
||||||
return uvg_rtp::generic::push_frame(sender, data, data_len, flags);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
rtp_error_t ret;
|
|
||||||
|
|
||||||
if ((ret = uvg_rtp::sender::write_rtp_header(conn, timestamp)) != RTP_OK) {
|
|
||||||
LOG_ERROR("Failed to write RTP Header for Opus frame!");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return uvg_rtp::sender::write_payload(conn, data, data_len);
|
|
||||||
|
|
||||||
uint8_t buffer[MAX_PACKET] = { 0 };
|
|
||||||
RTPOpus::OpusConfig *config = (RTPOpus::OpusConfig *)conn->getConfig();
|
|
||||||
|
|
||||||
LOG_DEBUG("sending opus packet of size %u", dataLen);
|
|
||||||
|
|
||||||
if (config == nullptr) {
|
|
||||||
LOG_ERROR("Opus config has not been set!");
|
|
||||||
return RTP_INVALID_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer[0] = (config->configurationNumber << 3) |
|
|
||||||
(config->channels > 1 ? (1 << 2) : 0) | 0;
|
|
||||||
|
|
||||||
memcpy(&buffer[1], data, dataLen);
|
|
||||||
|
|
||||||
return RTPGeneric::pushGenericFrame(conn, buffer, dataLen + 1, 0);
|
|
||||||
|
|
||||||
conn->setPayloadType(RTP_FORMAT_OPUS);
|
|
||||||
return RTPGeneric::pushGenericFrame(conn, data, dataLen, 0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
rtp_error_t uvg_rtp::opus::push_frame(uvg_rtp::sender *sender, std::unique_ptr<uint8_t[]> data, uint32_t data_len, int flags)
|
|
||||||
{
|
|
||||||
return uvg_rtp::generic::push_frame(sender, std::move(data), data_len, flags);
|
|
||||||
}
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue