Lumiera  0.pre.03
»edit your freedom«
make-clip-test.cpp
Go to the documentation of this file.
1 /*
2  MakeClip(Test) - create a Clip from a Media Asset
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 
19 #include "include/logging.h"
20 #include "lib/test/run.hpp"
21 #include "lib/util.hpp"
22 
23 #include "lib/time/timevalue.hpp"
24 #include "steam/assetmanager.hpp"
25 #include "steam/asset/media.hpp"
29 #include "lib/depend-inject.hpp"
30 
31 using util::contains;
32 using util::isnil;
33 using std::string;
34 
35 using std::static_pointer_cast; //TODO only temporarily;
36 
37 namespace steam {
38 namespace asset{
39 namespace test {
40 
41  using MediaAccessMock = lib::DependInject<vault::MediaAccessFacade>
42  ::Local<vault::test::MediaAccessMock>;
43 
44 
45 
46 
47  /*******************************************************************/
52  class MakeClip_test : public Test
53  {
54  typedef lib::P<asset::Media> PM;
55  typedef asset::Media::PClip PC;
56 
57  virtual void run (Arg)
58  {
59  MediaAccessMock useMockMedia;
60 
61 
62  PM mm = asset::Media::create("test-1", VIDEO);
63  PC cc = mm->createClip();
64  PM cm = cc->getMedia();
65 
66  CHECK (cm);
67  CHECK (!isnil (cc->getLength()));
68  CHECK (cm->ident.category.hasKind (VIDEO));
69  CHECK (cm->getFilename() == mm->getFilename());
70 TODO ("implement Processing Pattern!!!");
71 // CHECK (cm->howtoProc() == mm->howtoProc());
72  CHECK (cm->ident.org == mm->ident.org);
73  CHECK (dependencyCheck (cm,mm));
74 
75  TRACE (asset_mem, "leaving MakeClip_test::run()");
76  TRACE (mobject_mem, "leaving MakeClip_test::run()");
77  }
78 
79 
80  };
81 
82 
84  LAUNCHER (MakeClip_test, "function asset");
85 
86 
87 
88 }}} // namespace steam::asset::test
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Definition: trait.hpp:82
Steam-Layer Interface: Asset Lookup and Organisation.
Media data represented a specific kind of Asset.
Definition: run.hpp:40
Per type specific configuration of instances created as service dependencies.
MObject in the Session to represent a clip on the timeline.
Unit test helper to access an emulated media file.
This header is for including and configuring NoBug.
static MediaFactory create
storage for the static MediaFactory instance
Definition: media.hpp:75
Steam-Layer implementation namespace root.
This framework allows to (re)configure the lib::Depend front-end for dependency-injection.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Small helper and diagnostic functions related to Asset and AssetManager.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:71
a family of time value like entities and their relationships.
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:35
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container
Definition: util.hpp:255