Skip to content

Commit 78702ac

Browse files
Improve devmate context files
Summary: Following other examples, this diff improves devmate context files, with dedicated context files for creating and playing-back vrs files. Differential Revision: D78202872 fbshipit-source-id: 3652f8560f622b4399286e2e63da0eb4ac1e1905
1 parent bbb1793 commit 78702ac

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sample_code/SampleRecordAndPlay.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class RecordableDemo : public Recordable {
107107

108108
public:
109109
// declare your device's unique id in RecordableTypeId.h
110-
RecordableDemo() : Recordable(RecordableTypeId::SampleDeviceRecordableClass, kSampleFlavor) {
110+
RecordableDemo() : Recordable(RecordableTypeId::ImageStream, kSampleFlavor) {
111111
// define your RecordFormat & DataLayout definitions for this stream
112112
addRecordFormat(
113113
Record::Type::DATA, // the type of records this definition applies to
@@ -257,7 +257,7 @@ class PlaybackSample {
257257
// When dealing with stream that have a recordable flavor defined,
258258
// rather than iterating over all the streams of the VRS file, just find the one(s) we need...
259259
StreamId sampleDevice =
260-
reader.getStreamForFlavor(RecordableTypeId::SampleDeviceRecordableClass, kSampleFlavor);
260+
reader.getStreamForFlavor(RecordableTypeId::ImageStream, kSampleFlavor);
261261
if (sampleDevice.isValid()) {
262262
// The RecordFilePlayer does *not* take ownership of the stream player,
263263
// which allows for the same StreamPlayer object to be used for different recordables.
@@ -271,7 +271,7 @@ class PlaybackSample {
271271
// and hookup the ones you recognize & care for...
272272
const set<StreamId>& streamIds = reader.getStreams();
273273
for (auto id : streamIds) {
274-
if (id.getTypeId() == RecordableTypeId::SampleDeviceRecordableClass) {
274+
if (id.getTypeId() == RecordableTypeId::ImageStream) {
275275
// The RecordFilePlayer does *not* take ownership of the stream player,
276276
// which allows for the same StreamPlayer object to be used for different recordables.
277277
// The caller of setRecordablePlayer is responsible for deleting the StreamPlayer.

0 commit comments

Comments
 (0)