Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup remaining payload channel references #1326

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading