Skip to content

Commit ffb1985

Browse files
Try latest rust build to ensure fix
1 parent 9c3c73d commit ffb1985

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

client-sdk-rust

src/room_proto_converter.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ std::string bytesToString(const std::vector<std::uint8_t>& bytes) {
2828
return std::string(reinterpret_cast<const char*>(bytes.data()), bytes.size());
2929
}
3030

31-
std::vector<proto::PacketTrailerFeature> toProto(const PacketTrailerFeatures& features) {
32-
std::vector<proto::PacketTrailerFeature> out;
31+
std::vector<proto::FrameMetadataFeature> toProto(const PacketTrailerFeatures& features) {
32+
std::vector<proto::FrameMetadataFeature> out;
3333
out.reserve(2);
3434
if (features.user_timestamp) {
35-
out.push_back(proto::PacketTrailerFeature::PTF_USER_TIMESTAMP);
35+
out.push_back(proto::FrameMetadataFeature::FMF_USER_TIMESTAMP);
3636
}
3737
if (features.frame_id) {
38-
out.push_back(proto::PacketTrailerFeature::PTF_FRAME_ID);
38+
out.push_back(proto::FrameMetadataFeature::FMF_FRAME_ID);
3939
}
4040
return out;
4141
}
@@ -44,10 +44,10 @@ PacketTrailerFeatures fromProto(const google::protobuf::RepeatedField<int>& feat
4444
PacketTrailerFeatures out{};
4545
for (const int feature : features) {
4646
switch (feature) {
47-
case proto::PacketTrailerFeature::PTF_USER_TIMESTAMP:
47+
case proto::FrameMetadataFeature::FMF_USER_TIMESTAMP:
4848
out.user_timestamp = true;
4949
break;
50-
case proto::PacketTrailerFeature::PTF_FRAME_ID:
50+
case proto::FrameMetadataFeature::FMF_FRAME_ID:
5151
out.frame_id = true;
5252
break;
5353
default:
@@ -502,8 +502,8 @@ proto::TrackPublishOptions toProto(const TrackPublishOptions& in) {
502502
if (in.preconnect_buffer) {
503503
msg.set_preconnect_buffer(*in.preconnect_buffer);
504504
}
505-
for (const proto::PacketTrailerFeature feature : toProto(in.packet_trailer_features)) {
506-
msg.add_packet_trailer_features(feature);
505+
for (const proto::FrameMetadataFeature feature : toProto(in.packet_trailer_features)) {
506+
msg.add_frame_metadata_features(feature);
507507
}
508508
return msg;
509509
}
@@ -537,7 +537,7 @@ TrackPublishOptions fromProto(const proto::TrackPublishOptions& in) {
537537
if (in.has_preconnect_buffer()) {
538538
out.preconnect_buffer = in.preconnect_buffer();
539539
}
540-
out.packet_trailer_features = fromProto(in.packet_trailer_features());
540+
out.packet_trailer_features = fromProto(in.frame_metadata_features());
541541
return out;
542542
}
543543

src/tests/unit/test_video_frame_metadata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ TEST(TrackPublishOptionsTest, PacketTrailerFeaturesRoundTrip) {
8585
options.packet_trailer_features.frame_id = true;
8686

8787
proto::TrackPublishOptions proto_options = toProto(options);
88-
ASSERT_EQ(proto_options.packet_trailer_features_size(), 2);
89-
EXPECT_EQ(proto_options.packet_trailer_features(0), proto::PacketTrailerFeature::PTF_USER_TIMESTAMP);
90-
EXPECT_EQ(proto_options.packet_trailer_features(1), proto::PacketTrailerFeature::PTF_FRAME_ID);
88+
ASSERT_EQ(proto_options.frame_metadata_features_size(), 2);
89+
EXPECT_EQ(proto_options.frame_metadata_features(0), proto::FrameMetadataFeature::FMF_USER_TIMESTAMP);
90+
EXPECT_EQ(proto_options.frame_metadata_features(1), proto::FrameMetadataFeature::FMF_FRAME_ID);
9191

9292
TrackPublishOptions round_trip = fromProto(proto_options);
9393
EXPECT_TRUE(round_trip.packet_trailer_features.user_timestamp);

0 commit comments

Comments
 (0)