File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 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
5858std::string
5959formatUserTimestamp (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
6767void printUsage (const char *program) {
Original file line number Diff line number Diff line change 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 }
You can’t perform that action at this time.
0 commit comments