Skip to content

Commit 1c001f6

Browse files
lcaol_data_track: remove many overloaded tryPush() functions
1 parent a1f272e commit 1c001f6

2 files changed

Lines changed: 0 additions & 30 deletions

File tree

include/livekit/local_data_track.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,8 @@ class LocalDataTrack {
8080
* the frame could not be queued.
8181
*/
8282
Result<void, DataTrackError>
83-
tryPush(const std::vector<std::uint8_t> &payload,
84-
std::optional<std::uint64_t> user_timestamp = std::nullopt);
85-
Result<void, DataTrackError>
8683
tryPush(std::vector<std::uint8_t> &&payload,
8784
std::optional<std::uint64_t> user_timestamp = std::nullopt);
88-
/**
89-
* Try to push a frame to all subscribers of this track.
90-
*
91-
* @return success on delivery acceptance, or a typed error describing why
92-
* the frame could not be queued.
93-
*/
94-
Result<void, DataTrackError>
95-
tryPush(const std::uint8_t *data, std::size_t size,
96-
std::optional<std::uint64_t> user_timestamp = std::nullopt);
9785

9886
/// Whether the track is still published in the room.
9987
bool isPublished() const;

src/local_data_track.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ Result<void, DataTrackError> LocalDataTrack::tryPush(const DataFrame &frame) {
7070
}
7171
}
7272

73-
Result<void, DataTrackError>
74-
LocalDataTrack::tryPush(const std::vector<std::uint8_t> &payload,
75-
std::optional<std::uint64_t> user_timestamp) {
76-
DataFrame frame;
77-
frame.payload = payload;
78-
frame.user_timestamp = user_timestamp;
79-
return tryPush(frame);
80-
}
81-
8273
Result<void, DataTrackError>
8374
LocalDataTrack::tryPush(std::vector<std::uint8_t> &&payload,
8475
std::optional<std::uint64_t> user_timestamp) {
@@ -88,15 +79,6 @@ LocalDataTrack::tryPush(std::vector<std::uint8_t> &&payload,
8879
return tryPush(frame);
8980
}
9081

91-
Result<void, DataTrackError>
92-
LocalDataTrack::tryPush(const std::uint8_t *data, std::size_t size,
93-
std::optional<std::uint64_t> user_timestamp) {
94-
DataFrame frame;
95-
frame.payload.assign(data, data + size);
96-
frame.user_timestamp = user_timestamp;
97-
return tryPush(frame);
98-
}
99-
10082
bool LocalDataTrack::isPublished() const {
10183
if (!handle_.valid()) {
10284
return false;

0 commit comments

Comments
 (0)