* Lumiera source code always was copyrighted by individual contributors * there is no entity "Lumiera.org" which holds any copyrights * Lumiera source code is provided under the GPL Version 2+ == Explanations == Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above. For this to become legally effective, the ''File COPYING in the root directory is sufficient.'' The licensing header in each file is not strictly necessary, yet considered good practice; attaching a licence notice increases the likeliness that this information is retained in case someone extracts individual code files. However, it is not by the presence of some text, that legally binding licensing terms become effective; rather the fact matters that a given piece of code was provably copyrighted and published under a license. Even reformatting the code, renaming some variables or deleting parts of the code will not alter this legal situation, but rather creates a derivative work, which is likewise covered by the GPL! The most relevant information in the file header is the notice regarding the time of the first individual copyright claim. By virtue of this initial copyright, the first author is entitled to choose the terms of licensing. All further modifications are permitted and covered by the License. The specific wording or format of the copyright header is not legally relevant, as long as the intention to publish under the GPL remains clear. The extended wording was based on a recommendation by the FSF. It can be shortened, because the full terms of the license are provided alongside the distribution, in the file COPYING.
88 lines
2.4 KiB
C++
88 lines
2.4 KiB
C++
/*
|
||
MakeClip(Test) - create a Clip from a Media Asset
|
||
|
||
Copyright (C)
|
||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
||
**Lumiera** is free software; you can redistribute it and/or modify it
|
||
under the terms of the GNU General Public License as published by the
|
||
Free Software Foundation; either version 2 of the License, or (at your
|
||
option) any later version. See the file COPYING for further details.
|
||
|
||
* *****************************************************************/
|
||
|
||
/** @file make-clip-test.cpp
|
||
** unit test \ref MakeClip_test
|
||
*/
|
||
|
||
|
||
#include "include/logging.h"
|
||
#include "lib/test/run.hpp"
|
||
#include "lib/util.hpp"
|
||
|
||
#include "lib/time/timevalue.hpp"
|
||
#include "steam/assetmanager.hpp"
|
||
#include "steam/asset/media.hpp"
|
||
#include "steam/mobject/session/clip.hpp"
|
||
#include "steam/asset/asset-diagnostics.hpp"
|
||
#include "vault/media-access-mock.hpp"
|
||
#include "lib/depend-inject.hpp"
|
||
|
||
using util::contains;
|
||
using util::isnil;
|
||
using std::string;
|
||
|
||
using std::static_pointer_cast; //TODO only temporarily;
|
||
|
||
namespace steam {
|
||
namespace asset{
|
||
namespace test {
|
||
|
||
using MediaAccessMock = lib::DependInject<vault::MediaAccessFacade>
|
||
::Local<vault::test::MediaAccessMock>;
|
||
|
||
|
||
|
||
|
||
/*******************************************************************//**
|
||
* @test creating a Clip MObject and an associated Clip Asset from
|
||
* a given asset::Media.
|
||
* @see asset::Media#createClip
|
||
*/
|
||
class MakeClip_test : public Test
|
||
{
|
||
typedef lib::P<asset::Media> PM;
|
||
typedef asset::Media::PClip PC;
|
||
|
||
virtual void run (Arg)
|
||
{
|
||
MediaAccessMock useMockMedia;
|
||
|
||
|
||
PM mm = asset::Media::create("test-1", VIDEO);
|
||
PC cc = mm->createClip();
|
||
PM cm = cc->getMedia();
|
||
|
||
CHECK (cm);
|
||
CHECK (!isnil (cc->getLength()));
|
||
CHECK (cm->ident.category.hasKind (VIDEO));
|
||
CHECK (cm->getFilename() == mm->getFilename());
|
||
TODO ("implement Processing Pattern!!!");
|
||
// CHECK (cm->howtoProc() == mm->howtoProc());
|
||
CHECK (cm->ident.org == mm->ident.org);
|
||
CHECK (dependencyCheck (cm,mm));
|
||
|
||
TRACE (asset_mem, "leaving MakeClip_test::run()");
|
||
TRACE (mobject_mem, "leaving MakeClip_test::run()");
|
||
}
|
||
|
||
|
||
};
|
||
|
||
|
||
/** Register this test class... */
|
||
LAUNCHER (MakeClip_test, "function asset");
|
||
|
||
|
||
|
||
}}} // namespace steam::asset::test
|