Skip to content

Commit

Permalink
Cleanup remaining payload channel references (#1326)
Browse files Browse the repository at this point in the history
Cleanup remaining payload channel references
  • Loading branch information
jmillan committed Feb 5, 2024
1 parent 20a606a commit 5775aff
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 24 deletions.
2 changes: 0 additions & 2 deletions rust/src/worker/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ where
version.as_ptr(),
0,
0,
0,
0,
channel_read_fn,
channel_read_ctx,
channel_write_fn,
Expand Down
3 changes: 1 addition & 2 deletions worker/include/Channel/ChannelNotifier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Channel
FBS::Notification::Body type,
flatbuffers::Offset<Body>& body)
{
auto& builder = ChannelNotifier::bufferBuilder;
auto& builder = this->bufferBuilder;
auto notification = FBS::Notification::CreateNotificationDirect(
builder, targetId.c_str(), event, type, body.Union());

Expand All @@ -50,7 +50,6 @@ namespace Channel
this->channel->Send(builder.GetBufferPointer(), builder.GetSize());
builder.Reset();
}
void Emit(const FBS::Notification::Notification& notification);

private:
// Passed by argument.
Expand Down
2 changes: 0 additions & 2 deletions worker/include/lib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ extern "C" int mediasoup_worker_run(
const char* version,
int consumerChannelFd,
int producerChannelFd,
int payloadConsumeChannelFd,
int payloadProduceChannelFd,
ChannelReadFn channelReadFn,
ChannelReadCtx channelReadCtx,
ChannelWriteFn channelWriteFn,
Expand Down
2 changes: 1 addition & 1 deletion worker/src/Channel/ChannelSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace Channel
return;
}

SendImpl(reinterpret_cast<const uint8_t*>(data), dataLen);
SendImpl(data, dataLen);
}

void ChannelSocket::SendLog(const char* data, uint32_t dataLen)
Expand Down
2 changes: 0 additions & 2 deletions worker/src/lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ extern "C" int mediasoup_worker_run(
const char* version,
int consumerChannelFd,
int producerChannelFd,
int /*payloadConsumeChannelFd*/,
int /*payloadProduceChannelFd*/,
ChannelReadFn channelReadFn,
ChannelReadCtx channelReadCtx,
ChannelWriteFn channelWriteFn,
Expand Down
2 changes: 0 additions & 2 deletions worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ extern "C" {
version: *const c_char,
consumer_channel_fd: c_int,
producer_channel_fd: c_int,
payload_consumer_channel_fd: c_int,
payload_producer_channel_fd: c_int,
channel_read_fn: ChannelReadFn,
channel_read_ctx: ChannelReadCtx,
channel_write_fn: ChannelWriteFn,
Expand Down
14 changes: 1 addition & 13 deletions worker/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

static constexpr int ConsumerChannelFd{ 3 };
static constexpr int ProducerChannelFd{ 4 };
static constexpr int PayloadConsumerChannelFd{ 5 };
static constexpr int PayloadProducerChannelFd{ 6 };

int main(int argc, char* argv[])
{
Expand All @@ -25,17 +23,7 @@ int main(int argc, char* argv[])
const std::string version = std::getenv("MEDIASOUP_VERSION");

auto statusCode = mediasoup_worker_run(
argc,
argv,
version.c_str(),
ConsumerChannelFd,
ProducerChannelFd,
PayloadConsumerChannelFd,
PayloadProducerChannelFd,
nullptr,
nullptr,
nullptr,
nullptr);
argc, argv, version.c_str(), ConsumerChannelFd, ProducerChannelFd, nullptr, nullptr, nullptr, nullptr);

std::_Exit(statusCode);
}

0 comments on commit 5775aff

Please sign in to comment.