Skip to content

Commit 32a5c90

Browse files
user_timestamp_us
1 parent bbab802 commit 32a5c90

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

user_timestamped_video/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ producer/consumer combinations:
55

66
- `UserTimestampedVideoProducer` publishes a synthetic video track named
77
`"timestamped-camera"` and stamps each frame with
8-
`VideoCaptureOptions::metadata.user_timestamp`.
8+
`VideoCaptureOptions::metadata.user_timestamp_us`.
99
- `UserTimestampedVideoConsumer` subscribes to the remote
1010
`"timestamped-camera"` track by name with either the rich or legacy callback
1111
path.

user_timestamped_video/consumer/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// UserTimestampedVideoConsumer
1818
///
1919
/// Receives remote video frames via `Room::setOnVideoFrameEventCallback()` and
20-
/// logs any `VideoFrameMetadata::user_timestamp` values that arrive. Pair
20+
/// logs any `VideoFrameMetadata::user_timestamp_us` values that arrive. Pair
2121
/// with `UserTimestampedVideoProducer` running in another process.
2222
///
2323
/// Usage:
@@ -57,11 +57,11 @@ std::string getenvOrEmpty(const char *name) {
5757

5858
std::string
5959
formatUserTimestamp(const std::optional<VideoFrameMetadata> &metadata) {
60-
if (!metadata || !metadata->user_timestamp.has_value()) {
60+
if (!metadata || !metadata->user_timestamp_us.has_value()) {
6161
return "n/a";
6262
}
6363

64-
return std::to_string(*metadata->user_timestamp);
64+
return std::to_string(*metadata->user_timestamp_us);
6565
}
6666

6767
void printUsage(const char *program) {

user_timestamped_video/producer/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// UserTimestampedVideoProducer
1818
///
1919
/// Publishes a synthetic camera track and stamps each frame with
20-
/// `VideoCaptureOptions::metadata.user_timestamp`. Pair with
20+
/// `VideoCaptureOptions::metadata.user_timestamp_us`. Pair with
2121
/// `UserTimestampedVideoConsumer` in another process to observe the user
2222
/// timestamps flowing end to end.
2323
///
@@ -189,7 +189,7 @@ int main(int argc, char *argv[]) {
189189
capture_options.rotation = VideoRotation::VIDEO_ROTATION_0;
190190
if (send_user_timestamp) {
191191
capture_options.metadata = VideoFrameMetadata{};
192-
capture_options.metadata->user_timestamp = nowEpochUs();
192+
capture_options.metadata->user_timestamp_us = nowEpochUs();
193193
}
194194

195195
source->captureFrame(frame, capture_options);
@@ -200,7 +200,7 @@ int main(int argc, char *argv[]) {
200200
<< " user_ts_us="
201201
<< (send_user_timestamp
202202
? std::to_string(
203-
*capture_options.metadata->user_timestamp)
203+
*capture_options.metadata->user_timestamp_us)
204204
: std::string("disabled"))
205205
<< "\n";
206206
}

0 commit comments

Comments
 (0)