9
9
#include < opentimelineio/missingReference.h>
10
10
#include < opentimelineio/serializableCollection.h>
11
11
#include < opentimelineio/timeline.h>
12
+ #include < opentimelineio/freezeFrame.h>
13
+ #include < opentimelineio/linearTimeWarp.h>
14
+ #include < opentimelineio/marker.h>
12
15
13
16
#include < iostream>
14
17
@@ -150,6 +153,22 @@ main(int argc, char** argv)
150
153
tests.add_test (" test_clip_media_representation" , [] {
151
154
using namespace otio ;
152
155
156
+ static constexpr auto time_scalar = 1.5 ;
157
+
158
+ SerializableObject::Retainer<LinearTimeWarp> ltw (new LinearTimeWarp (
159
+ LinearTimeWarp::Schema::name,
160
+ LinearTimeWarp::Schema::name,
161
+ time_scalar));
162
+ std::vector<Effect*> effects = { ltw };
163
+
164
+ static constexpr auto red = Marker::Color::red;
165
+
166
+ SerializableObject::Retainer<Marker> m (new Marker (
167
+ LinearTimeWarp::Schema::name,
168
+ TimeRange (),
169
+ red));
170
+ std::vector<Marker*> markers = { m };
171
+
153
172
static constexpr auto high_quality = " high_quality" ;
154
173
static constexpr auto proxy_quality = " proxy_quality" ;
155
174
@@ -161,6 +180,8 @@ main(int argc, char** argv)
161
180
media,
162
181
std::nullopt,
163
182
AnyDictionary (),
183
+ effects,
184
+ markers,
164
185
high_quality));
165
186
166
187
assertEqual (clip->active_media_reference_key ().c_str (), high_quality);
@@ -225,6 +246,18 @@ main(int argc, char** argv)
225
246
// should work
226
247
clip->set_media_references ({ { " cloud" , ref4 } }, " cloud" );
227
248
assertEqual (clip->media_reference (), ref4.value );
249
+
250
+ // basic test for an effect
251
+ assertEqual (clip->effects ().size (), effects.size ());
252
+ auto effect = dynamic_cast <OTIO_NS::LinearTimeWarp*>(
253
+ clip->effects ().front ().value );
254
+ assertEqual (effect->time_scalar (), time_scalar);
255
+
256
+ // basic test for a marker
257
+ assertEqual (clip->markers ().size (), markers.size ());
258
+ auto marker = dynamic_cast <OTIO_NS::Marker*>(
259
+ clip->markers ().front ().value );
260
+ assertEqual (marker->color ().c_str (), red);
228
261
});
229
262
230
263
tests.run (argc, argv);
0 commit comments