Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
testclip.cpp
Go to the documentation of this file.
1/*
2 TestClip - test clip (stub) for checking Model/Session functionality
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
22#include "lib/depend-inject.hpp"
23#include "steam/asset/media.hpp"
24#include "steam/asset/clip.hpp"
25#include "lib/depend.hpp"
27
28namespace steam {
29namespace mobject {
30namespace session {
31namespace test {
32
33 using lib::time::Time;
35 using asset::VIDEO;
36
37 using PM = shared_ptr<asset::Media>;
39
41
42
43
46 {
47 // install Mock-Interface to Lumiera Vault
48 MediaAccessMock useMockMedia;
49
50 return *asset::Media::create("test-2", VIDEO); // query magic filename
51 }
52
53
56 {
57 return *(asset::Media::create(media));
58 }
59
60
71
72 lib::Depend<Testbed> testbed_1; // invoke ctor when creating first TestClip...
73
74
75
76
77
79 : Clip(testbed_1().clipA_,
80 testbed_1().media_)
81 {
82 CHECK (isValid());
83 }
84
85
86 /* == define some data for verification in unit tests == */
87
88 const Duration LENGTH_TestClip(Time(0,25,0,0));
89
90
91}}}} // namespace steam::mobject::session::test
Definition of Asset representation for a media clip.
Configuration handle for temporarily shadowing a dependency by a test mock instance.
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Duration is the internal Lumiera time metric.
Lumiera's internal time value datatype.
bookkeeping (Asset) view of a media clip.
key abstraction: media-like assets
Definition media.hpp:64
static MediaFactory create
storage for the static MediaFactory instance
Definition media.hpp:75
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
bool isValid() const
implementing the common MObject self test.
Interface to the vault layer: provides functions for querying (opening) a media file,...
Mock implementation of the MediaAccessFacade.
Per type specific configuration of instances created as service dependencies.
Singleton services and Dependency Injection.
Abstraction interface to query for a media file.
Unit test helper to access an emulated media file.
Media data represented a specific kind of Asset.
lib::Depend< Testbed > testbed_1
Definition testclip.cpp:72
shared_ptr< asset::Media > PM
Definition testclip.cpp:37
asset::Clip & createTestClipAsset(asset::Media &media)
Definition testclip.cpp:55
asset::Media & createTestMedia()
Definition testclip.cpp:45
const Duration LENGTH_TestClip(Time(0, 25, 0, 0))
Definition testclip.hpp:77
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
lib::DependInject< vault::MediaAccessFacade > ::Local< vault::test::MediaAccessMock > MediaAccessMock
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
A stub implementation of the Clip interface for unit testing.
a family of time value like entities and their relationships.