diff --git a/Makefile.am b/Makefile.am index d236fbfd8..068388274 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,11 +19,13 @@ ACLOCAL_AMFLAGS = -I m4 bin_PROGRAMS = -lib_LTLIBRARIES = noinst_PROGRAMS = check_PROGRAMS = noinst_LIBRARIES = +lib_LTLIBRARIES = check_LTLIBRARIES = +pkglib_LTLIBRARIES = +noinst_LTLIBRARIES = noinst_HEADERS = BUILT_SOURCES = EXTRA_DIST = diff --git a/SConstruct b/SConstruct index 07b791cb0..20fa76840 100644 --- a/SConstruct +++ b/SConstruct @@ -63,6 +63,7 @@ def setupBasicEnvironment(): ,toolpath = [TOOLDIR] ,tools = ["default", "BuilderGCH", "BuilderDoxygen"] ) + handleVerboseMessages(env) env.Append ( CCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honor CFLAGS, only CCFLAGS env.Replace( VERSION=VERSION @@ -73,7 +74,6 @@ def setupBasicEnvironment(): , CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CCFLAGS='-Wall ' # -fdiagnostics-show-option ) - RegisterIcon_Builder(env,SVGRENDERER) handleNoBugSwitches(env) @@ -102,7 +102,7 @@ def appendVal(env,var,targetVar,val=None): def handleNoBugSwitches(env): """ set the build level for NoBug. Release builds imply no DEBUG - wheras ALPHA and BETA require DEBUG + whereas ALPHA and BETA require DEBUG """ level = env['BUILDLEVEL'] if level in ['ALPHA', 'BETA']: @@ -113,6 +113,15 @@ def handleNoBugSwitches(env): elif level == 'RELEASE': env.Replace( DEBUG = 0 ) +def handleVerboseMessages(env): + """ toggle verbose build output """ + if not env['VERBOSE']: + # SetOption('silent', True) + env['CCCOMSTR'] = " Compiling $SOURCE" + env['CXXCOMSTR'] = " Compiling++ $SOURCE" + env['LINKCOMSTR'] = " Linking --> $TARGET" + env['LDMODULECOMSTR'] = " creating module [ $TARGET ]" + @@ -128,6 +137,9 @@ def defineCmdlineOptions(): allowed_values=('ALPHA', 'BETA', 'RELEASE')) ,BoolOption('DEBUG', 'Build with debugging information and no optimizations', False) ,BoolOption('OPTIMIZE', 'Build with strong optimization (-O3)', False) + ,BoolOption('VALGRIND', 'Run Testsuite under valgrind control', True) + ,BoolOption('VERBOSE', 'Print full build commands', False) + ,('TESTSUITES', 'Run only Testsuites matching the given pattern', '') # ,BoolOption('OPENGL', 'Include support for OpenGL preview rendering', False) # ,EnumOption('DIST_TARGET', 'Build target architecture', 'auto', # allowed_values=('auto', 'i386', 'i686', 'x86_64' ), ignorecase=2) @@ -151,7 +163,7 @@ Special Targets: build : just compile and link testcode: additionally compile the Testsuite check : build and run the Testsuite - doc : generate documetation (Doxygen) + doc : generate documentation (Doxygen) install : install created artifacts at PREFIX src.tar : create source tarball doc.tar : create developer doc tarball @@ -213,7 +225,6 @@ def configurePlatform(env): if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'): problems.append('We need the boost regular expression lib (incl. binary lib for linking).') -# if not conf.CheckLibWithHeader('gavl', ['gavlconfig.h', 'gavl/gavl.h'], 'C'): if not conf.CheckPkgConfig('gavl', 1.0): problems.append('Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html].') @@ -230,13 +241,16 @@ def configurePlatform(env): problems.append('Unable to configure Cairo--, exiting.') if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'): - problems.append('Unable to configure the GNOME DevTool Library, exiting.') + problems.append('Unable to configure the GNOME DevTool Library.') if not conf.CheckPkgConfig('librsvg-2.0', '2.18.1'): problems.append('Need rsvg Library for rendering icons.') - if not conf.CheckPkgConfig('xv'): problems.append('Need lib xv') -# if not conf.CheckPkgConfig('xext'): Exit(1) + if not conf.CheckCHeader(['X11/Xutil.h', 'X11/Xlib.h'],'<>'): + problems.append('Xlib.h and Xutil.h required. Please install libx11-dev.') + + if not conf.CheckPkgConfig('xv') : problems.append('Need libXv...') + if not conf.CheckPkgConfig('xext'): problems.append('Need libXext.') # if not conf.CheckPkgConfig('sm'): Exit(1) # # obviously not needed? @@ -298,7 +312,7 @@ def defineBuildTargets(env, artifacts): artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core ) - artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', objplug) + artifacts['plugins'] = env.LoadableModule('$BINDIR/lumiera-plugin', objplug) # the Lumiera GTK GUI envgtk = env.Clone().mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','librsvg-2.0','xv','xext','sm']) diff --git a/admin/Makefile.am b/admin/Makefile.am index f2c9c0636..9160c34ee 100644 --- a/admin/Makefile.am +++ b/admin/Makefile.am @@ -20,9 +20,9 @@ admin_srcdir = $(top_srcdir)/admin noinst_PROGRAMS += vgsuppression vgsuppression_SOURCES = $(admin_srcdir)/vgsuppression.c vgsuppression_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -vgsuppression_LDADD = liblumi.a $(NOBUGMT_LUMIERA_LIBS) -ldl +vgsuppression_LDADD = liblumiera.a $(NOBUGMT_LUMIERA_LIBS) -ldl noinst_PROGRAMS += rsvg-convert rsvg_convert_SOURCES = $(admin_srcdir)/rsvg-convert.c -rsvg_convert_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_LUMIERA_CFLAGS) -std=gnu99 -Wall -Werror +rsvg_convert_CPPFLAGS = $(AM_CPPFLAGS) $(LUMIERA_GUI_CFLAGS) -std=gnu99 -Wall -Werror rsvg_convert_LDADD = -lcairo -lglib-2.0 -lgthread-2.0 -lrsvg-2 diff --git a/admin/SConscript b/admin/SConscript index d0ad7b84e..2737bab7e 100644 --- a/admin/SConscript +++ b/admin/SConscript @@ -8,7 +8,7 @@ Import('env','envgtk','artifacts','core') vgsuppr = env.Program('#$BINDIR/vgsuppression',['vgsuppression.c']+core) rsvg = envgtk.Program('#$BINDIR/rsvg-convert','rsvg-convert.c') -artifacts['tools'] += [ vgsuppr ## for supressing false valgrind alarms +artifacts['tools'] += [ vgsuppr ## for suppressing false valgrind alarms + rsvg ## for rendering SVG icons (uses librsvg) ] diff --git a/configure.ac b/configure.ac index 4df50f245..4f705e01b 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,11 @@ AC_COPYRIGHT([ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ]) +# +# Global configuration +# AC_GNU_SOURCE +AC_DISABLE_STATIC # # Required programs @@ -83,6 +87,10 @@ AC_LANG_PUSH([C]) AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H)) # there is a warning in nobug, disabled til fixed AC_CHECK_HEADER([valgrind/valgrind.h], AC_DEFINE(HAVE_VALGRIND_VALGRIND_H)) +AC_CHECK_LIB(dl, dlopen, [LUMIERA_PLUGIN_LIBS="$LUMIERA_PLUGIN_LIBS -ldl"], + [AC_MSG_ERROR([Dynamic linking not supported, report a bug])] +) + AC_LANG_POP([C]) @@ -124,15 +132,19 @@ AC_LANG_POP([C++]) # END Internatinalization +############## Gtk Dependancies +PKG_CHECK_MODULES(LUMIERA_GUI, [ + gtkmm-2.4 >= 2.8 gdl-1.0 >= 0.6.1 cairomm-1.0 >= 0.6.0 + gavl >= 0.2.5 librsvg-2.0 >= 2.18.1]) + +# END Gtk Dependancies ############## X11 Dependancies AC_PATH_X AC_PATH_XTRA -# CFLAGS="$CFLAGS $X_CFLAGS" -LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],[], - [AC_MSG_ERROR([Xlib.h or Xutil.h not found install xdevel])]) + [AC_MSG_ERROR([Xlib.h or Xutil.h not found install xdevel])]) AC_CHECK_HEADERS([sys/ipc.h sys/shm.h],, [AC_MSG_ERROR([Required header not found. Please check that it is installed])] @@ -142,25 +154,19 @@ AC_CHECK_HEADERS([X11/extensions/Xvlib.h X11/extensions/XShm.h],, [#include ] ) -AC_CHECK_LIB(Xext, XInitExtension, , - [AC_MSG_ERROR([Could not link with libXext. Check that you have libXext installed])], -lX11 +AC_CHECK_LIB(Xext, XInitExtension, [LUMIERA_GUI_LIBS="$LUMIERA_GUI_LIBS -lXext"], + [AC_MSG_ERROR([Could not link with libXext. Check that you have libXext installed])], -lX11 ) -AC_CHECK_LIB(Xv, XvQueryAdaptors, , - [AC_MSG_ERROR([Could not link with libXv. Check that you have libXv installed])] +AC_CHECK_LIB(Xv, XvQueryAdaptors, [LUMIERA_GUI_LIBS="$LUMIERA_GUI_LIBS -lXv"], + [AC_MSG_ERROR([Could not link with libXv. Check that you have libXv installed])] ) # END X11 Dependancies -############## Gtk Dependancies -PKG_CHECK_MODULES(GTK_LUMIERA, [ - gtkmm-2.4 >= 2.8 gdl-1.0 >= 0.6.1 cairomm-1.0 >= 0.6.0 - gavl >= 0.2.5 librsvg-2.0 >= 2.18.1]) - -AC_SUBST(GTK_LUMIERA_CFLAGS) -AC_SUBST(GTK_LUMIERA_LIBS) - -# END Gtk Dependancies +AC_SUBST(LUMIERA_PLUGIN_LIBS) +AC_SUBST(LUMIERA_GUI_CFLAGS) +AC_SUBST(LUMIERA_GUI_LIBS) ############## Nobug Dependancies diff --git a/doc/devel/config_guide.txt b/doc/devel/config_guide.txt new file mode 100644 index 000000000..a4a5d711d --- /dev/null +++ b/doc/devel/config_guide.txt @@ -0,0 +1,80 @@ +The incomplete Guide to Lumiera Configuration +============================================== + +DONT EDIT THE CONFIG IF YOU DONT KNOW WHAT YOU ARE DOING! +Misconfiguration will break Lumiera and may destroy all your data! + +Order is roughly alphabetically, depending on the mood of the writer. +Defaults are noted if present. Not all are implemented yet. + +General Introduction +-------------------- + +Lumiera uses plaintext files with a INI file like syntax for +configuration. This Syntax is strictly line based. There are only a +few syntactic elements. + +TODO:describe config syntax here + +Config Subsystem +---------------- + +The path where Lumiera searches its configuration. Single components are +separated by colons as in PATH and other such environment variables. +Here it might be handy that any Lumiera configuration can be +overridden by a environment variable: +'LUMIERA_CONFIG_PATH=somewhere:else lumiera ...' +A default are initialized at installation time, this is important to +bootstrap the whole configuration system. + + config.path + + +The config system check for a preferred format when writing config +entries. For each key 'foo.bar', these can be overridden with a key +'config.format.foo.bar' linking to the desired format. + + config.formatkey ='config.format.%s' + + +The following are links to the default formatting when no explicit +format is set for a key. Changing these to a wrong type will break the +system! + + config.formatdef.link < config.formatstr.link + config.formatdef.number < config.formatstr.number.dec + config.formatdef.real < config.formatstr.real + config.formatdef.string < config.formatstr.string + config.formatdef.word < config.formatstr.word + config.formatdef.bool < config.formatstr.bool + + +This are the low level formating specifications for the buildin +types, DONT TOUCH THESE! + + config.formatstr.link = '< %s' + config.formatstr.number.dec = '= %lld' + config.formatstr.number.hex = '= 0x%llX' + config.formatstr.number.oct = '= 0%llo' + config.formatstr.real = '= %Lg' + config.formatstr.real.dec = '= %Lf' + config.formatstr.real.sci = '= %Le' + config.formatstr.string = '= %s' + config.formatstr.string.dquoted = '= \"%s\"' + config.formatstr.string.quoted = '= ''%s''' + config.formatstr.word = '= %s' + config.formatstr.bool = '= %d' + + +Plugin System +------------- + +The path where Lumiera searches its plugins. Single components are +separated by colons as in PATH and other such environment variables. +Here it might be handy that any Lumiera configuration can be +overridden by a environment variable: +'LUMIERA_PLUGIN_PATH=somewhere:else lumiera ...' +Sensible defaults are initialized at installation time. + + plugin.path + diff --git a/doc/devel/uml/class128005.html b/doc/devel/uml/class128005.html index 06db277ae..d033a8de1 100644 --- a/doc/devel/uml/class128005.html +++ b/doc/devel/uml/class128005.html @@ -18,7 +18,7 @@

Declaration :

Implementation class for the Session interface

Artifact : sessionimpl, Component(s) : Session

-
Relation edls (<directional aggregation by value>)

Declaration :

+
Relation edls (<directional aggregation by value>)

Declaration :

Relation theFixture (<unidirectional association>)

Declaration :

Relation pipes (<directional aggregation>)

Declaration :

the global ports (busses) of the session

All public operations : currEDL , getFixture

diff --git a/doc/devel/uml/class128133.html b/doc/devel/uml/class128133.html index caa5c3e37..175eb30d6 100644 --- a/doc/devel/uml/class128133.html +++ b/doc/devel/uml/class128133.html @@ -4,19 +4,19 @@ -Class EDL +Class Seq -
Class EDL
+
Class Seq

-

Declaration :

Directly inherited by : Fixture

+

Declaration :

Directly inherited by : Fixture

Artifact : edl, Component(s) : Session

Relation clips (<directional aggregation>)

Declaration :

diff --git a/doc/devel/uml/class128261.html b/doc/devel/uml/class128261.html index 0d8043e71..f02717863 100644 --- a/doc/devel/uml/class128261.html +++ b/doc/devel/uml/class128261.html @@ -16,9 +16,9 @@ -

Declaration :

Artifact : fixture, Component(s) : Session

+

Declaration :

  • C++ : class Fixture : public Seq

Artifact : fixture, Component(s) : Session

-
Relation theTimeline (<directional aggregation by value>)

Declaration :

+
Relation effectiveTimeline (<directional aggregation by value>)

Declaration :

Operation getPlaylistForRender

Declaration :

  • Uml : + getPlaylistForRender() : list<ExplicitPlacement [ProcessingLayer::MObject]>
  • C++ : public: list<ExplicitPlacement [ProcessingLayer::MObject]> getPlaylistForRender ()
Operation getAutomation

Declaration :

  • Uml : + getAutomation() : Auto [ProcessingLayer::MObject]*
  • C++ : public: Auto [ProcessingLayer::MObject]* getAutomation ()
Relation track (<unidirectional association>)

Declaration :

  • Uml : # track : Track
  • C++ : protected: Track* track
diff --git a/doc/devel/uml/class128389.html b/doc/devel/uml/class128389.html index 222aa9902..1adc7425d 100644 --- a/doc/devel/uml/class128389.html +++ b/doc/devel/uml/class128389.html @@ -16,7 +16,7 @@ -

Declaration :

  • C++ : class Track : public Meta

Artifact : track, Diagram : Session structure

+

Declaration :

Artifact : track, Diagram : Session structure

Relation subTracks (<directional aggregation by value>)

Declaration :

  • Uml : + subTracks : Track, multiplicity : *
  • C++ : public: Track subTracks

Child tracks in a tree structure

All public operations : apply , apply , dispatchOp

diff --git a/doc/devel/uml/class128517.html b/doc/devel/uml/class128517.html index 9b18007fc..892d720be 100644 --- a/doc/devel/uml/class128517.html +++ b/doc/devel/uml/class128517.html @@ -16,7 +16,7 @@ -

Declaration :

  • C++ : class MObject : public Buildable
  • Java : public interface MObject

Directly inherited by : AbstractMO

+

Declaration :

  • C++ : class MObject : public Buildable
  • Java : public interface MObject

Directly inherited by : AbstractMO Clip Effect Label Track

Artifact : mobject, Component(s) : Session

Attribut length
diff --git a/doc/devel/uml/class128901.html b/doc/devel/uml/class128901.html index 3258b0d8f..9cc9def6f 100644 --- a/doc/devel/uml/class128901.html +++ b/doc/devel/uml/class128901.html @@ -16,11 +16,9 @@ -

Declaration :

Directly inherited by : CompoundClip SimpleClip

+

Declaration :

Directly inherited by : CompoundClip SimpleClip

Artifact : clip

- -
Attribut start
-

Declaration :

  • Uml : # start : Time
  • C++ : protected: Time start

startpos in source

+
Relation source (<unidirectional association>)

Declaration :

  • Uml : # source : Media, multiplicity : 1
  • C++ : protected: Media* source

the media source this clip referes to

All public operations : apply , apply , dispatchOp

diff --git a/doc/devel/uml/class129029.html b/doc/devel/uml/class129029.html index f9a14681d..b04d54df7 100644 --- a/doc/devel/uml/class129029.html +++ b/doc/devel/uml/class129029.html @@ -16,10 +16,10 @@ -

Declaration :

Artifact : effect

+

Declaration :

Artifact : effect

-
Attribut plugID
-

Declaration :

  • Uml : # plugID : string
  • C++ : protected: string plugID

Identifier of the Plugin to be used

+
Attribut plugin
+

Declaration :

  • Uml : # plugin : string
  • C++ : protected: string plugin

Identifier of the Plugin to be used

All public operations : apply , apply , dispatchOp

diff --git a/doc/devel/uml/class129669.html b/doc/devel/uml/class129669.html index 8653baa45..199b5d53f 100644 --- a/doc/devel/uml/class129669.html +++ b/doc/devel/uml/class129669.html @@ -16,7 +16,7 @@ -

Declaration :

  • C++ : class Label : public Meta

Artifact : label

+

Declaration :

Artifact : label

All public operations : apply , apply , dispatchOp

diff --git a/doc/devel/uml/class139653.html b/doc/devel/uml/class139653.html index 641046544..076a6ee5b 100644 --- a/doc/devel/uml/class139653.html +++ b/doc/devel/uml/class139653.html @@ -19,7 +19,7 @@

Declaration :

  • C++ : class Session

Directly inherited by : SessionImpl

Primary Interface for all editing tasks.
The session contains defaults, all the assets being edited, and a set of EDL with the individual MObjects to be manipulated and rendered.

Artifact : session

-
Operation currEDL

Declaration :

  • Uml : + currEDL() : EDL
  • C++ : public: EDL currEDL ()

The EDL currently in focus. In most cases, Session and EDL are almost the same, just EDL emphasizes the collection aspect. But generally (for larger editing projects) one Session can contain several EDLs, which may even be nested. At any given time, only one of these EDLs has focus and recieves the editing commands.

+
Operation currEDL

Declaration :

  • Uml : + currEDL() : Seq
  • C++ : public: Seq currEDL ()

The EDL currently in focus. In most cases, Session and EDL are almost the same, just EDL emphasizes the collection aspect. But generally (for larger editing projects) one Session can contain several EDLs, which may even be nested. At any given time, only one of these EDLs has focus and recieves the editing commands.

Operation getFixture

Declaration :

  • Uml : + getFixture() : Fixture&
  • C++ : public: Fixture& getFixture ()

While the session can be comprised of several EDLs,
there is only one Fixture, which represents the actual
configuration of all Objects to be rendered

Relation current (<unidirectional association>)

Declaration :

Standard access path to get at the current session via the Session Manager, which acts as a "PImpl" smart pointer

Relation defaults (<unidirectional association>)

Declaration :

diff --git a/doc/devel/uml/class144773.html b/doc/devel/uml/class144773.html new file mode 100644 index 000000000..86e164da0 --- /dev/null +++ b/doc/devel/uml/class144773.html @@ -0,0 +1,25 @@ + + + + + + +Class StreamType + + + + + +
Class StreamType
+

+ + + + +

Declaration :

  • C++ : class StreamType

Artifact : streamtype

+ +
Relation <unidirectional association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+ + diff --git a/doc/devel/uml/class144901.html b/doc/devel/uml/class144901.html new file mode 100644 index 000000000..59beaefed --- /dev/null +++ b/doc/devel/uml/class144901.html @@ -0,0 +1,20 @@ + + + + + + +Class Prototype + + + + + +
Class Prototype
+

+ + + + +

Declaration :

  • C++ : class Prototype

Artifact : streamtype

+ diff --git a/doc/devel/uml/class145029.html b/doc/devel/uml/class145029.html new file mode 100644 index 000000000..13e240717 --- /dev/null +++ b/doc/devel/uml/class145029.html @@ -0,0 +1,20 @@ + + + + + + +Class ImplFacade + + + + + +
Class ImplFacade
+

+ + + + +

Declaration :

  • C++ : class ImplFacade

Artifact : streamtype

+ diff --git a/doc/devel/uml/class145157.html b/doc/devel/uml/class145157.html new file mode 100644 index 000000000..ca22769ab --- /dev/null +++ b/doc/devel/uml/class145157.html @@ -0,0 +1,22 @@ + + + + + + +Class StreamTypeID + + + + + +
Class StreamTypeID
+

+ + + + +

Declaration :

  • C++ : class StreamTypeID
+
+ + diff --git a/doc/devel/uml/class145285.html b/doc/devel/uml/class145285.html new file mode 100644 index 000000000..914d312aa --- /dev/null +++ b/doc/devel/uml/class145285.html @@ -0,0 +1,20 @@ + + + + + + +Class MediaKind + + + + + +
Class MediaKind
+

+ + + + +

Declaration :

  • C++ : enum MediaKind
  • Java : package enum MediaKind
+ diff --git a/doc/devel/uml/class145413.html b/doc/devel/uml/class145413.html new file mode 100644 index 000000000..fa26d80d8 --- /dev/null +++ b/doc/devel/uml/class145413.html @@ -0,0 +1,20 @@ + + + + + + +Class STypeManager + + + + + +
Class STypeManager
+

+ + + + +

Declaration :

  • C++ : class STypeManager

Artifact : stypemanager

+ diff --git a/doc/devel/uml/class145541.html b/doc/devel/uml/class145541.html new file mode 100644 index 000000000..06bd62289 --- /dev/null +++ b/doc/devel/uml/class145541.html @@ -0,0 +1,27 @@ + + + + + + +Class Timeline + + + + + +
Class Timeline
+

+ + + + +

Declaration :

  • C++ : class Timeline

Directly inherited by : TimelineView

+
+ +
Relation <aggregation by value>

Declaration :

+
Relation <unidirectional association>

Declaration :

+
Relation <unidirectional association>

Declaration :

+
Relation globalBusses (<directional aggregation by value>)

Declaration :

  • Uml : # globalBusses : Pipe, multiplicity : *
  • C++ : protected: Pipe globalBusses
+ + diff --git a/doc/devel/uml/class145669.html b/doc/devel/uml/class145669.html new file mode 100644 index 000000000..d2fb577a5 --- /dev/null +++ b/doc/devel/uml/class145669.html @@ -0,0 +1,24 @@ + + + + + + +Class Project + + + + + +
Class Project
+

+ + + + +

Declaration :

  • C++ : class Project
+ +
Relation <aggregation by value>

Declaration :

+
Relation <aggregation by value>

Declaration :

+ + diff --git a/doc/devel/uml/class145797.html b/doc/devel/uml/class145797.html new file mode 100644 index 000000000..d5a2b67c9 --- /dev/null +++ b/doc/devel/uml/class145797.html @@ -0,0 +1,24 @@ + + + + + + +Class TimelineView + + + + + +
Class TimelineView
+

+ + + + +

Declaration :

  • C++ : class TimelineView : public Timeline
+ +
Relation <unidirectional association>

Declaration :

+
Relation <association>

Declaration :

+ + diff --git a/doc/devel/uml/class145925.html b/doc/devel/uml/class145925.html new file mode 100644 index 000000000..ae3ae19c7 --- /dev/null +++ b/doc/devel/uml/class145925.html @@ -0,0 +1,23 @@ + + + + + + +Class PlayControl + + + + + +
Class PlayControl
+

+ + + + +

Declaration :

  • C++ : class PlayControl
+ +
Relation <unidirectional association>

Declaration :

+ + diff --git a/doc/devel/uml/class146053.html b/doc/devel/uml/class146053.html new file mode 100644 index 000000000..d2e874de1 --- /dev/null +++ b/doc/devel/uml/class146053.html @@ -0,0 +1,24 @@ + + + + + + +Class Monitor + + + + + +
Class Monitor
+

+ + + + +

Declaration :

  • C++ : class Monitor
+ +
Relation <unidirectional association>

Declaration :

+
Relation <association>

Declaration :

+ + diff --git a/doc/devel/uml/class146181.html b/doc/devel/uml/class146181.html new file mode 100644 index 000000000..31c08ed9c --- /dev/null +++ b/doc/devel/uml/class146181.html @@ -0,0 +1,23 @@ + + + + + + +Class RenderTask + + + + + +
Class RenderTask
+

+ + + + +

Declaration :

  • C++ : class RenderTask
+ +
Relation <unidirectional association>

Declaration :

+ + diff --git a/doc/devel/uml/class146309.html b/doc/devel/uml/class146309.html new file mode 100644 index 000000000..485390623 --- /dev/null +++ b/doc/devel/uml/class146309.html @@ -0,0 +1,26 @@ + + + + + + +Class Sequence + + + + + +
Class Sequence
+

+ + + + +

Declaration :

  • C++ : class Sequence
+ +
Relation <aggregation by value>

Declaration :

+
Relation subSequences (<unidirectional association>)

Declaration :

  • Uml : # subSequences : Sequence, multiplicity : *
  • C++ : protected: Sequence* subSequences
+
Relation <unidirectional association>

Declaration :

+
Relation trackTree (<unidirectional association>)

Declaration :

  • Uml : # trackTree : Track, multiplicity : 1
  • C++ : protected: Track* trackTree
+ + diff --git a/doc/devel/uml/class146437.html b/doc/devel/uml/class146437.html new file mode 100644 index 000000000..57ebd91f2 --- /dev/null +++ b/doc/devel/uml/class146437.html @@ -0,0 +1,24 @@ + + + + + + +Class PlayheadCursor + + + + + +
Class PlayheadCursor
+

+ + + + +

Declaration :

  • C++ : class PlayheadCursor
+ +
Relation <association>

Declaration :

+
Relation <association>

Declaration :

+ + diff --git a/doc/devel/uml/classdiagrams.html b/doc/devel/uml/classdiagrams.html index e1289d57d..f66c12462 100644 --- a/doc/devel/uml/classdiagrams.html +++ b/doc/devel/uml/classdiagrams.html @@ -31,7 +31,9 @@ Rules access Session structure StateAdapter composition +Stream Type Framework Struct-Asset Relations +TimelineSequences diff --git a/doc/devel/uml/classes.html b/doc/devel/uml/classes.html index 319577971..63214df7b 100644 --- a/doc/devel/uml/classes.html +++ b/doc/devel/uml/classes.html @@ -52,7 +52,6 @@ DefaultsRegistry DoAttach DoRecurse -EDL EffectEffect or media processing component Effect Error @@ -75,6 +74,7 @@ FrameDescriptorinterfaceA FrameDescriptor implements the higher level interfaces for frames. Further refinements are made by subclassing and policy classes FrameReference GLBuf +ImplFacade InterpolatorProvides the implementation for getting the acutal value of a time varying or automated effect/plugin parameter Invalid Invocation @@ -88,9 +88,11 @@ Mediakey abstraction: media-like assets MediaAccessFacadeboundaryprovides functions for querying (opening) a media file, detecting the channels or streams found within this file, etc. Delegating to the actual backend functions MediaFactoryspecialized Asset Factory for configuring (new) media asset instances based on existing media files on disk; can create placeholder assets as well +MediaKindenum Metakey abstraction: metadata and organisational asset Meta MObjectinterface +Monitor MutexI provided a reworked Mutex class in my Cinelerra2 repository NodeCreatorToolThis Tool implementation plays the central role in the buld process: given a MObject from Session, it is able to attach ProcNodes to the render engine under construction such as to reflect the properties of the MObject in the actual render. NodeWiring @@ -100,6 +102,8 @@ PathManagerWhile building a render engine, this Strategy class decides on the actual render strategy in accordance to the current controller settings (system state) Pipestructural asset representing a basic building block within the high level model: a port for building a processing chain and generating media output Placementinterfaceused to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative).
Placement at the same time acts as (refcounting) smart pointer for accessing the MObject. +PlayControl +PlayheadCursor Plug PluginAdapterAdapter used to integrage an effects processor in the render pipeline Prefetch @@ -110,7 +114,9 @@ Processor ProcNodeinterfaceKey abstraction of the Render Engine: A Data processing Node ProcPattspecial type of structural Asset representing information how to build some part of the render engine's processing nodes network. +Project ProjectorSpecial video processing node used to scale and translate image data. +Prototype PullInput QueryCache QueryHandlerinterface @@ -120,10 +126,13 @@ RelTypeenumthe possible kinds of RelativePlacements RenderEngine RenderStateEncapsulates the logic used to get a "current render process" in accordance to the currentyl applicable controller settings. The provided StateProxy serves to hold any mutalbe state used in the render process, so the rest of the render engine can be stateless. +RenderTask ResolverBase Scheduler Segment SegmentationToolTool implementation for deriving a partitioning of the current timeline such, that each segement has a constant configuration. "Constant" means here, that any remaining changes over time can be represented by automation solely, without the need to change the node connections. +Seq +Sequence Serializeractor SessionPrimary Interface for all editing tasks.
The session contains defaults, all the assets being edited, and a set of EDL with the individual MObjects to be manipulated and rendered. SessionImplImplementation class for the Session interface @@ -137,9 +146,14 @@ StateProxyimplementation std::exceptionauxiliary Strategy +StreamType +StreamTypeID Structkey abstraction: structural asset +STypeManager ThreadWe can basically reuse the Thread class design from Cinelerra2, Thread becomes a baseclass for all Threads Timedenotes a temporal position (time point), based on timeline start.

investigate posix.4 realtime timers, wrap these here +Timeline +TimelineView Tool ToolFactory Trackstructural asset holding the configuration of a track in the EDL diff --git a/doc/devel/uml/classes_list.html b/doc/devel/uml/classes_list.html index 8e8c2d9a6..96378253b 100644 --- a/doc/devel/uml/classes_list.html +++ b/doc/devel/uml/classes_list.html @@ -53,7 +53,6 @@ DefaultsRegistry
DoAttach
DoRecurse
-EDL
Effect
Effect
Error
@@ -76,6 +75,7 @@ FrameDescriptor
FrameReference
GLBuf
+ImplFacade
Interpolator
Invalid
Invocation
@@ -89,9 +89,11 @@ Media
MediaAccessFacade
MediaFactory
+MediaKind
Meta
Meta
MObject
+Monitor
Mutex
NodeCreatorTool
NodeWiring
@@ -101,6 +103,8 @@ PathManager
Pipe
Placement
+PlayControl
+PlayheadCursor
Plug
PluginAdapter
Prefetch
@@ -111,7 +115,9 @@ Processor
ProcNode
ProcPatt
+Project
Projector
+Prototype
PullInput
QueryCache
QueryHandler
@@ -121,10 +127,13 @@ RelType
RenderEngine
RenderState
+RenderTask
ResolverBase
Scheduler
Segment
SegmentationTool
+Seq
+Sequence
Serializer
Session
SessionImpl
@@ -138,9 +147,14 @@ StateProxy
std::exception
Strategy
+StreamType
+StreamTypeID
Struct
+STypeManager
Thread
Time
+Timeline
+TimelineView
Tool
ToolFactory
Track
diff --git a/doc/devel/uml/fig128133.png b/doc/devel/uml/fig128133.png index 089545c76..ca5e20d4e 100644 Binary files a/doc/devel/uml/fig128133.png and b/doc/devel/uml/fig128133.png differ diff --git a/doc/devel/uml/fig132485.png b/doc/devel/uml/fig132485.png new file mode 100644 index 000000000..54612a806 Binary files /dev/null and b/doc/devel/uml/fig132485.png differ diff --git a/doc/devel/uml/fig132741.png b/doc/devel/uml/fig132741.png new file mode 100644 index 000000000..da739593c Binary files /dev/null and b/doc/devel/uml/fig132741.png differ diff --git a/doc/devel/uml/index.html b/doc/devel/uml/index.html index 1081df7d3..c05d6f597 100644 --- a/doc/devel/uml/index.html +++ b/doc/devel/uml/index.html @@ -36,7 +36,7 @@ Documentation

required classes : Fixture, SessionImpl

Component Session
-

provided classes : EDL, Fixture, MObject, ParamProvider, SessionImpl

+

provided classes : Seq, Fixture, MObject, ParamProvider, SessionImpl

Component EDL
@@ -83,8 +83,21 @@ Documentation
Component client code

required classes : ProcDispatcher

+ +

1.2 Class View Project Entities

+
+ +

+

TimelineSequences



+
Class Project
+
+
Class Monitor
+
+
Class Sequence
+
+
-

1.2 Component View interfaces

+

1.3 Component View interfaces

@@ -104,10 +117,10 @@ Documentation

provided classes : MediaAccessFacade

-

1.3 Package codegen

+

1.4 Package codegen

This package is used to organize code generation by BOUML. It is considered useless after having generated the initial code skeleton.

-

1.3.1 Deployment View EXE Deployment

+

1.4.1 Deployment View EXE Deployment

defines and lists how the Lumiera executable has to be created

@@ -122,14 +135,14 @@ Documentation

Artifact source

-

1.3.2 Package common

+

1.4.2 Package common

  • C++ namespace : lumiera

sourcecode package

Common library and helper classes

Diagram : Source Overview

-

1.3.2.1 Deployment View gen

+

1.4.2.1 Deployment View gen

defines source files to be generated by BOUML

@@ -148,26 +161,29 @@ Documentation
Artifact time

unified representation of a time point, including conversion functions

Artifact source associated with : Time

+ +
Artifact streamtype
+

Artifact source associated with : StreamType, Prototype, ImplFacade

-

1.3.2.2 Package error

+

1.4.2.2 Package error

  • C++ namespace : lumiera::error

Namespace for Exception Kinds

-

1.3.2.3 Package visitor

+

1.4.2.3 Package visitor

  • C++ namespace : lumiera::visitor

sub-namespace for visitor library implementation

-

1.3.3 Package backend

+

1.4.3 Package backend

  • C++ namespace : backend_interface

sourcecode package

Data backend classes here...

-

1.3.3.1 Deployment View gen

+

1.4.3.1 Deployment View gen

Artifact mediaaccessfacade
@@ -176,13 +192,13 @@ Documentation
-

1.3.4 Package proc

+

1.4.4 Package proc

  • C++ namespace : proc_interface

sourcecode package

All classes belonging to the (middle) processing layer

-

1.3.4.1 Deployment View gen

+

1.4.4.1 Deployment View gen

defines source files to be generated by BOUML

@@ -207,13 +223,13 @@ Documentation

Artifact source associated with : Frame

-

1.3.4.2 Package asset

+

1.4.4.2 Package asset

  • C++ namespace : asset

sourcecode package

Asset Management

-

1.3.4.2.1 Deployment View gen

+

1.4.4.2.1 Deployment View gen

defines source files to be generated by BOUML

@@ -286,14 +302,37 @@ Documentation

Artifact source associated with : DB

+ +

1.4.4.3 Package control

+

    +
  • C++ namespace : control
  • +
+

sourcecode package

The Processing and Render Controller,
and the Proc-Layer dispatcher

+ +

1.4.4.3.1 Deployment View gen

+

defines source files to be generated by BOUML

+
+ +
Artifact pathmanager
+

Manager for deciding the actual render strategy

+

Artifact source associated with : PathManager

+ +
Artifact renderstate
+

renderengine state manager

+

Artifact source associated with : RenderState

+ +
Artifact stypemanager
+

Artifact source associated with : STypeManager

+
+
-

1.3.4.3 Package mobject

+

1.4.4.4 Package mobject

  • C++ namespace : mobject

sourcecode package

MObject Subsystem
including the Session (EDL), Builder and Processing Controller

-

1.3.4.3.1 Deployment View gen

+

1.4.4.4.1 Deployment View gen

defines source files to be generated by BOUML

@@ -334,13 +373,13 @@ Documentation

Artifact source associated with : Interpolator

-

1.3.4.3.2 Package session

+

1.4.4.4.2 Package session

  • C++ namespace : mobject::session

sourcecode package

Everything concerning the EDL and Session, within the MObject Subsystem

-

1.3.4.3.2.1 Deployment View gen

+

1.4.4.4.2.1 Deployment View gen

defines source files to be generated by BOUML

@@ -354,7 +393,7 @@ Documentation
Artifact edl

the (high level) Edit Decision List within the current Session

-

Artifact source associated with : EDL

+

Artifact source associated with : Seq

Artifact fixture

the (low level) representation of the EDL with concrete placement data

@@ -428,13 +467,13 @@ Documentation
-

1.3.4.3.3 Package builder

+

1.4.4.4.3 Package builder

  • C++ namespace : mobject::builder

sourcecode package

The Builder creating the Render Engine,
located within the MObject Subsystem

-

1.3.4.3.3.1 Deployment View gen

+

1.4.4.4.3.1 Deployment View gen

defines source files to be generated by BOUML

@@ -463,35 +502,15 @@ Documentation

Artifact source associated with : NodeCreatorTool

- -

1.3.4.3.4 Package controller

-

    -
  • C++ namespace : mobject::controller
  • -
-

sourcecode package

The Processing and Render Controller,
located within the MObject Subsystem

- -

1.3.4.3.4.1 Deployment View gen

-

defines source files to be generated by BOUML

-
- -
Artifact pathmanager
-

Manager for deciding the actual render strategy

-

Artifact source associated with : PathManager

- -
Artifact renderstate
-

renderengine state manager

-

Artifact source associated with : RenderState

-
-
-

1.3.4.4 Package engine

+

1.4.4.5 Package engine

  • C++ namespace : engine

sourcecode package

The Core Render Engine

-

1.3.4.4.1 Deployment View gen

+

1.4.4.5.1 Deployment View gen

defines source files to be generated by BOUML

@@ -574,20 +593,20 @@ Documentation
-

1.3.5 Package gui

+

1.4.5 Package gui

  • C++ namespace : gui

sourcecode package

User Interface classes go here

-

1.3.5.1 Deployment View gen

+

1.4.5.1 Deployment View gen

defines source files to be generated by BOUML

-

1.3.6 Package tool

+

1.4.6 Package tool

sourcecode package

Tools and Utilities
(separate from the main cinelrra binary)

-

1.3.6.1 Deployment View gen

+

1.4.6.1 Deployment View gen

defines source files to be generated by BOUML

@@ -637,11 +656,69 @@ Documentation
Class DoRecurse
+ +

2.2 Package Control

+
+ +

2.2.1 Class View Controller Workings

+
+ +

+

Controller Entities



+ +

2.2.1.1 Activity configure Render

+

Pre Condition :

    Post Condition :

      + +

      +

      the render configuration flow



      + +
      Activity action pin Render Request
      +

      Direction : input

      Type :

      Selection :

        +
        Flow <flow>

        From Render Request To determine Render Params

        Weight :

          Guard :

            Selection :

              Transformation :

                + +
                Opaque activity action setup StateProxy
                +

                Defined in configure Render

                Pre Condition :

                  Post Condition :

                    Behavior :

                      +
                      Flow <flow>

                      From setup StateProxy To build necessary?

                      Weight :

                        Guard :

                          Selection :

                            Transformation :

                              + + +
                              Decision activity node build necessary?
                              +

                              Defined in configure Render

                              +
                              Flow <flow>

                              From build necessary? To build Render Engine

                              Weight :

                                Guard :

                                • OCL :
                                  +build necessary

                                Selection :

                                  Transformation :

                                    Flow <flow>

                                    From build necessary? To merge activity node

                                    Weight :

                                      Guard :

                                      • OCL :
                                        +reuse exiting Engine

                                      Selection :

                                        Transformation :

                                          + +
                                          Opaque activity action setup Build Params
                                          +

                                          Defined in configure Render

                                          Pre Condition :

                                            Post Condition :

                                              Behavior :

                                                + +
                                                Merge activity node
                                                +

                                                Defined in configure Render

                                                +
                                                Flow <flow>

                                                From merge activity node To activity final

                                                Weight :

                                                  Guard :

                                                    Selection :

                                                      Transformation :

                                                        + +

                                                        2.2.1.1.1 Expansion region determine Render Params

                                                        + +
                                                        Opaque activity action determine Render Params
                                                        +

                                                        Diagram : the render configuration flow

                                                        +

                                                        Defined in configure Render

                                                        Pre Condition :

                                                          Post Condition :

                                                            Behavior :

                                                              +
                                                              Flow <flow>

                                                              From determine Render Params To setup StateProxy

                                                              Weight :

                                                                Guard :

                                                                  Selection :

                                                                    Transformation :

                                                                      + +
                                                                      Opaque activity action build Render Engine
                                                                      +

                                                                      Defined in configure Render

                                                                      Pre Condition :

                                                                        Post Condition :

                                                                          Behavior :

                                                                            +
                                                                            Flow <flow>

                                                                            From build Render Engine To merge activity node

                                                                            Weight :

                                                                              Guard :

                                                                                Selection :

                                                                                  Transformation :

                                                                                    + + +
                                                                                    Activity final
                                                                                    +

                                                                                    Defined in configure Render

                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    -

                                                                                    2.2 Package MObject

                                                                                    +

                                                                                    2.3 Package MObject

                                                                                    -

                                                                                    2.2.1 Class View Session

                                                                                    +

                                                                                    2.3.1 Class View Session

                                                                                    @@ -649,7 +726,9 @@ Documentation
                                                                                    Class Session
                                                                                    -
                                                                                    Class EDL
                                                                                    +
                                                                                    Class Timeline
                                                                                    +
                                                                                    +
                                                                                    Class Seq
                                                                                    Class Fixture
                                                                                    Class Segment
                                                                                    Class Track
                                                                                    @@ -677,16 +756,16 @@ Documentation
                                                                                    -

                                                                                    2.2.2 Package Builder

                                                                                    +

                                                                                    2.3.2 Package Builder

                                                                                    -

                                                                                    2.2.2.1 Class View Builder Workings

                                                                                    +

                                                                                    2.3.2.1 Class View Builder Workings

                                                                                    build process



                                                                                    This figure shows the process of building and starting a RenderEngine

                                                                                    -

                                                                                    2.2.2.1.1 Activity building the Engine

                                                                                    +

                                                                                    2.3.2.1.1 Activity building the Engine

                                                                                    Pre Condition :

                                                                                      Post Condition :

                                                                                        @@ -700,7 +779,7 @@ Documentation

                                                                                        Defined in building the Engine

                                                                                        Pre Condition :

                                                                                          Post Condition :

                                                                                            Behavior :

                                                                                              Flow <flow>

                                                                                              From configure Tools To fork activity node

                                                                                              Weight :

                                                                                                Guard :

                                                                                                  Selection :

                                                                                                    Transformation :

                                                                                                      -

                                                                                                      2.2.2.1.1.1 Expansion region establish partitioning

                                                                                                      +

                                                                                                      2.3.2.1.1.1 Expansion region establish partitioning

                                                                                                      Opaque activity action define segment
                                                                                                      @@ -727,7 +806,7 @@ Documentation

                                                                                                      Defined in building the Engine

                                                                                                      Flow <flow>

                                                                                                      From fork activity node To segment Tool

                                                                                                      Weight :

                                                                                                        Guard :

                                                                                                          Selection :

                                                                                                            Transformation :

                                                                                                              Flow <flow>

                                                                                                              From fork activity node To build Tool

                                                                                                              Weight :

                                                                                                                Guard :

                                                                                                                  Selection :

                                                                                                                    Transformation :

                                                                                                                      -

                                                                                                                      2.2.2.1.1.2 Expansion region build Processors

                                                                                                                      +

                                                                                                                      2.3.2.1.1.2 Expansion region build Processors

                                                                                                                      Activity object build Tool
                                                                                                                      @@ -771,65 +850,8 @@ Documentation
                                                                                                                      - -

                                                                                                                      2.2.3 Package Controller

                                                                                                                      -
                                                                                                                      - -

                                                                                                                      2.2.3.1 Class View Controller Workings

                                                                                                                      -
                                                                                                                      - -

                                                                                                                      -

                                                                                                                      Controller Entities



                                                                                                                      - -

                                                                                                                      2.2.3.1.1 Activity configure Render

                                                                                                                      -

                                                                                                                      Pre Condition :

                                                                                                                        Post Condition :

                                                                                                                          - -

                                                                                                                          -

                                                                                                                          the render configuration flow



                                                                                                                          - -
                                                                                                                          Activity action pin Render Request
                                                                                                                          -

                                                                                                                          Direction : input

                                                                                                                          Type :

                                                                                                                          Selection :

                                                                                                                            -
                                                                                                                            Flow <flow>

                                                                                                                            From Render Request To determine Render Params

                                                                                                                            Weight :

                                                                                                                              Guard :

                                                                                                                                Selection :

                                                                                                                                  Transformation :

                                                                                                                                    - -
                                                                                                                                    Opaque activity action setup StateProxy
                                                                                                                                    -

                                                                                                                                    Defined in configure Render

                                                                                                                                    Pre Condition :

                                                                                                                                      Post Condition :

                                                                                                                                        Behavior :

                                                                                                                                          -
                                                                                                                                          Flow <flow>

                                                                                                                                          From setup StateProxy To build necessary?

                                                                                                                                          Weight :

                                                                                                                                            Guard :

                                                                                                                                              Selection :

                                                                                                                                                Transformation :

                                                                                                                                                  - - -
                                                                                                                                                  Decision activity node build necessary?
                                                                                                                                                  -

                                                                                                                                                  Defined in configure Render

                                                                                                                                                  -
                                                                                                                                                  Flow <flow>

                                                                                                                                                  From build necessary? To build Render Engine

                                                                                                                                                  Weight :

                                                                                                                                                    Guard :

                                                                                                                                                    • OCL :
                                                                                                                                                      -build necessary

                                                                                                                                                    Selection :

                                                                                                                                                      Transformation :

                                                                                                                                                        Flow <flow>

                                                                                                                                                        From build necessary? To merge activity node

                                                                                                                                                        Weight :

                                                                                                                                                          Guard :

                                                                                                                                                          • OCL :
                                                                                                                                                            -reuse exiting Engine

                                                                                                                                                          Selection :

                                                                                                                                                            Transformation :

                                                                                                                                                              - -
                                                                                                                                                              Opaque activity action setup Build Params
                                                                                                                                                              -

                                                                                                                                                              Defined in configure Render

                                                                                                                                                              Pre Condition :

                                                                                                                                                                Post Condition :

                                                                                                                                                                  Behavior :

                                                                                                                                                                    - -
                                                                                                                                                                    Merge activity node
                                                                                                                                                                    -

                                                                                                                                                                    Defined in configure Render

                                                                                                                                                                    -
                                                                                                                                                                    Flow <flow>

                                                                                                                                                                    From merge activity node To activity final

                                                                                                                                                                    Weight :

                                                                                                                                                                      Guard :

                                                                                                                                                                        Selection :

                                                                                                                                                                          Transformation :

                                                                                                                                                                            - -

                                                                                                                                                                            2.2.3.1.1.1 Expansion region determine Render Params

                                                                                                                                                                            - -
                                                                                                                                                                            Opaque activity action determine Render Params
                                                                                                                                                                            -

                                                                                                                                                                            Diagram : the render configuration flow

                                                                                                                                                                            -

                                                                                                                                                                            Defined in configure Render

                                                                                                                                                                            Pre Condition :

                                                                                                                                                                              Post Condition :

                                                                                                                                                                                Behavior :

                                                                                                                                                                                  -
                                                                                                                                                                                  Flow <flow>

                                                                                                                                                                                  From determine Render Params To setup StateProxy

                                                                                                                                                                                  Weight :

                                                                                                                                                                                    Guard :

                                                                                                                                                                                      Selection :

                                                                                                                                                                                        Transformation :

                                                                                                                                                                                          - -
                                                                                                                                                                                          Opaque activity action build Render Engine
                                                                                                                                                                                          -

                                                                                                                                                                                          Defined in configure Render

                                                                                                                                                                                          Pre Condition :

                                                                                                                                                                                            Post Condition :

                                                                                                                                                                                              Behavior :

                                                                                                                                                                                                -
                                                                                                                                                                                                Flow <flow>

                                                                                                                                                                                                From build Render Engine To merge activity node

                                                                                                                                                                                                Weight :

                                                                                                                                                                                                  Guard :

                                                                                                                                                                                                    Selection :

                                                                                                                                                                                                      Transformation :

                                                                                                                                                                                                        - - -
                                                                                                                                                                                                        Activity final
                                                                                                                                                                                                        -

                                                                                                                                                                                                        Defined in configure Render

                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -

                                                                                                                                                                                                        2.2.4 Use Case View config examples

                                                                                                                                                                                                        +

                                                                                                                                                                                                        2.3.3 Use Case View config examples

                                                                                                                                                                                                        @@ -847,10 +869,10 @@ reuse exiting Engine

                                                                                                                                                                                                        Selection :

                                                                                                                                                                                                          Transformation
                                                                                                                                                                                                          Class instance

                                                                                                                                                                                                          type :Placement

                                                                                                                                                                                                          -

                                                                                                                                                                                                          2.3 Package RenderEngine

                                                                                                                                                                                                          +

                                                                                                                                                                                                          2.4 Package RenderEngine

                                                                                                                                                                                                          -

                                                                                                                                                                                                          2.3.1 Deployment View Engine Parts

                                                                                                                                                                                                          +

                                                                                                                                                                                                          2.4.1 Deployment View Engine Parts

                                                                                                                                                                                                          @@ -869,7 +891,7 @@ reuse exiting Engine

                                                                                                                                                                                                          Selection :

                                                                                                                                                                                                            Transformation
                                                                                                                                                                                                            Node State

                                                                                                                                                                                                            -

                                                                                                                                                                                                            2.3.2 Class View Engine Workings

                                                                                                                                                                                                            +

                                                                                                                                                                                                            2.4.2 Class View Engine Workings

                                                                                                                                                                                                            @@ -915,7 +937,7 @@ reuse exiting Engine

                                                                                                                                                                                                            Selection :

                                                                                                                                                                                                              Transformation

                                                                                                                                                                                                              -

                                                                                                                                                                                                              2.4 Use Case View Renderengine Use

                                                                                                                                                                                                              +

                                                                                                                                                                                                              2.5 Use Case View Renderengine Use

                                                                                                                                                                                                              @@ -943,11 +965,9 @@ reuse exiting Engine

                                                                                                                                                                                                              Selection :

                                                                                                                                                                                                                Transformation
                                                                                                                                                                                                                Class instance video1

                                                                                                                                                                                                                type :Track

                                                                                                                                                                                                                Class instance vid_A

                                                                                                                                                                                                                type :Clip

                                                                                                                                                                                                                attributes :

                                                                                                                                                                                                                Class instance aud_A

                                                                                                                                                                                                                type :Clip

                                                                                                                                                                                                                attributes :

                                                                                                                                                                                                                Class instance audio1

                                                                                                                                                                                                                type :Track

                                                                                                                                                                                                                Class instance

                                                                                                                                                                                                                type :ExplicitPlacement

                                                                                                                                                                                                                attributes :

                                                                                                                                                                                                                  @@ -958,9 +978,8 @@ reuse exiting Engine

                                                                                                                                                                                                                Selection :

                                                                                                                                                                                                                  Transformation
                                                                                                                                                                                                                  Class instance

                                                                                                                                                                                                                  type :Fixture

                                                                                                                                                                                                                  Class instance vid_A

                                                                                                                                                                                                                  type :Clip

                                                                                                                                                                                                                  attributes :

                                                                                                                                                                                                                  -
                                                                                                                                                                                                                  Class instance

                                                                                                                                                                                                                  type :EDL

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Class instance

                                                                                                                                                                                                                  type :Seq

                                                                                                                                                                                                                  Class instance refPoint

                                                                                                                                                                                                                  type :Label

                                                                                                                                                                                                                  attributes :

                                                                                                                                                                                                                  @@ -969,7 +988,6 @@ reuse exiting Engine

                                                                                                                                                                                                                  Selection :

                                                                                                                                                                                                                    Transformation

                                                                                                                                                                                                                    Class instance vid_A

                                                                                                                                                                                                                    type :Clip

                                                                                                                                                                                                                    attributes :

                                                                                                                                                                                                                    Class instance

                                                                                                                                                                                                                    type :RelativeLocation

                                                                                                                                                                                                                    attributes :

                                                                                                                                                                                                                    • relType = SAMETIME
                                                                                                                                                                                                                    • @@ -978,7 +996,7 @@ reuse exiting Engine

                                                                                                                                                                                                                    Selection :

                                                                                                                                                                                                                      Transformation

                                                                                                                                                                                                                      Class instance

                                                                                                                                                                                                                      type :Effect

                                                                                                                                                                                                                      attributes :

                                                                                                                                                                                                                      Class instance

                                                                                                                                                                                                                      type :RelativeLocation

                                                                                                                                                                                                                      attributes :

                                                                                                                                                                                                                      • offset = +3
                                                                                                                                                                                                                      • @@ -988,7 +1006,7 @@ reuse exiting Engine

                                                                                                                                                                                                                      Selection :

                                                                                                                                                                                                                        Transformation

                                                                                                                                                                                                                        Class instance

                                                                                                                                                                                                                        type :Effect

                                                                                                                                                                                                                        attributes :

                                                                                                                                                                                                                        Class instance

                                                                                                                                                                                                                        type :ExplicitPlacement

                                                                                                                                                                                                                        attributes :

                                                                                                                                                                                                                        • time = 5
                                                                                                                                                                                                                        • @@ -1162,11 +1180,23 @@ reuse exiting Engine

                                                                                                                                                                                                                        Selection :

                                                                                                                                                                                                                          Transformation

                                                                                                                                                                                                                          GUI is here just a container to hold any entities considered to be User Interface related, which is not in focus for this Design draft

                                                                                                                                                                                                                          5 Package CommonLib

                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                          5.1 Class View StreamType

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Stream Type Framework



                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Class Prototype
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Class MediaKind
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          -

                                                                                                                                                                                                                          5.1 Package ConfigQuery

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          5.2 Package ConfigQuery

                                                                                                                                                                                                                          -

                                                                                                                                                                                                                          5.1.1 Component View Query System overview

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          5.2.1 Component View Query System overview

                                                                                                                                                                                                                          @@ -1182,7 +1212,7 @@ reuse exiting Engine

                                                                                                                                                                                                                          Selection :

                                                                                                                                                                                                                            Transformation
                                                                                                                                                                                                                            Component DefaultsManager

                                                                                                                                                                                                                            -

                                                                                                                                                                                                                            5.1.2 Class View query

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            5.2.2 Class View query

                                                                                                                                                                                                                            @@ -1198,27 +1228,27 @@ reuse exiting Engine

                                                                                                                                                                                                                            Selection :

                                                                                                                                                                                                                              Transformation

                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3 Use Case View query use

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3 Use Case View query use

                                                                                                                                                                                                                              when to query



                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.1 Use Case create specific object

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.1 Use Case create specific object

                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.2 Use Case use "default" object

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.2 Use Case use "default" object

                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.3 Use Case load object from session

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.3 Use Case load object from session

                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.4 Use Case add new object to session

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.4 Use Case add new object to session

                                                                                                                                                                                                                              Class User
                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.5 Use Case ConfigQuery

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.5 Use Case ConfigQuery

                                                                                                                                                                                                                              -

                                                                                                                                                                                                                              5.1.3.6 Use Case need sub object

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              5.2.3.6 Use Case need sub object

                                                                                                                                                                                                                              "default" object



                                                                                                                                                                                                                              @@ -1226,7 +1256,7 @@ reuse exiting Engine

                                                                                                                                                                                                                              Selection :

                                                                                                                                                                                                                                Transformation
                                                                                                                                                                                                                                Class instance predicate impl

                                                                                                                                                                                                                                type :TypeHandler

                                                                                                                                                                                                                                -

                                                                                                                                                                                                                                5.2 Class View error

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                5.3 Class View error

                                                                                                                                                                                                                                @@ -1240,7 +1270,7 @@ reuse exiting Engine

                                                                                                                                                                                                                                Selection :

                                                                                                                                                                                                                                  Transformation

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  5.3 Class View Service Components

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  5.4 Class View Service Components

                                                                                                                                                                                                                                  Class Tool
                                                                                                                                                                                                                                  @@ -1250,7 +1280,7 @@ reuse exiting Engine

                                                                                                                                                                                                                                  Selection :

                                                                                                                                                                                                                                    Transformation
                                                                                                                                                                                                                                    Class Appconfig

                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                    5.4 Class View Posix Threads Abstraction

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    5.5 Class View Posix Threads Abstraction

                                                                                                                                                                                                                                    C++ wrapers for pthreads

                                                                                                                                                                                                                                    Class Thread
                                                                                                                                                                                                                                    @@ -1258,7 +1288,7 @@ reuse exiting Engine

                                                                                                                                                                                                                                    Selection :

                                                                                                                                                                                                                                      Transformation
                                                                                                                                                                                                                                      Class Mutex

                                                                                                                                                                                                                                      -

                                                                                                                                                                                                                                      5.5 Class View SmartPointers

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      5.6 Class View SmartPointers

                                                                                                                                                                                                                                      diff --git a/doc/devel/uml/index_60.html b/doc/devel/uml/index_60.html index a873c25b0..75ccc147d 100644 --- a/doc/devel/uml/index_60.html +++ b/doc/devel/uml/index_60.html @@ -17,8 +17,8 @@ - + @@ -28,8 +28,8 @@ - + diff --git a/doc/devel/uml/index_65.html b/doc/devel/uml/index_65.html index 33d5ebd2f..ab57596c5 100644 --- a/doc/devel/uml/index_65.html +++ b/doc/devel/uml/index_65.html @@ -55,12 +55,12 @@ - + - - + + diff --git a/doc/devel/uml/index_67.html b/doc/devel/uml/index_67.html index 8432e5cc6..81d96139c 100644 --- a/doc/devel/uml/index_67.html +++ b/doc/devel/uml/index_67.html @@ -26,38 +26,38 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -96,9 +96,9 @@ + + - - diff --git a/doc/devel/uml/index_69.html b/doc/devel/uml/index_69.html index a7245b34b..4fe57adfd 100644 --- a/doc/devel/uml/index_69.html +++ b/doc/devel/uml/index_69.html @@ -19,7 +19,6 @@ - @@ -27,6 +26,7 @@ + diff --git a/doc/devel/uml/index_70.html b/doc/devel/uml/index_70.html index 56bc1daaf..77ab812da 100644 --- a/doc/devel/uml/index_70.html +++ b/doc/devel/uml/index_70.html @@ -36,8 +36,8 @@ - + diff --git a/doc/devel/uml/index_71.html b/doc/devel/uml/index_71.html index f4ad7d96d..75f10c74f 100644 --- a/doc/devel/uml/index_71.html +++ b/doc/devel/uml/index_71.html @@ -46,6 +46,7 @@ + diff --git a/doc/devel/uml/index_73.html b/doc/devel/uml/index_73.html index e127cf07e..963294360 100644 --- a/doc/devel/uml/index_73.html +++ b/doc/devel/uml/index_73.html @@ -18,11 +18,12 @@
                                                                                                                                                                                                                                      NameKindDescription
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      <flow>transition
                                                                                                                                                                                                                                      Assetsclass view
                                                                                                                                                                                                                                      ATTACHattributeattach subject to anchor (e.g. an effect to a clip)
                                                                                                                                                                                                                                      au1class instance
                                                                                                                                                                                                                                      aud_Aclass instance
                                                                                                                                                                                                                                      aud_aclass instance
                                                                                                                                                                                                                                      aud_Aclass instance
                                                                                                                                                                                                                                      audioclass instance
                                                                                                                                                                                                                                      audio1class instance
                                                                                                                                                                                                                                      audio1class instance
                                                                                                                                                                                                                                      audio1class instance
                                                                                                                                                                                                                                      audio1class instance
                                                                                                                                                                                                                                      audio1class instance
                                                                                                                                                                                                                                      autoartifactMedia Object holding automation data
                                                                                                                                                                                                                                      AutoclassAutomation data for some parameter (i.e. a time varying function)
                                                                                                                                                                                                                                      Automation Entitiesclass diagram
                                                                                                                                                                                                                                      Categoryclasstree like classification of Assets
                                                                                                                                                                                                                                      categoryartifacttree like classification of Assets
                                                                                                                                                                                                                                      causeattributea copy of the first exception encountered in this exception chain
                                                                                                                                                                                                                                      chainoperationcreate and add another Placement for this media object, thus increasingly constraining the (possible) position of this object.
                                                                                                                                                                                                                                      chainrelationChain of additional Placements further constraining the position of this MObject
                                                                                                                                                                                                                                      chainoperationcreate and add another Placement for this media object, thus increasingly constraining the (possible) position of this object.
                                                                                                                                                                                                                                      checked_inrelationchecked_in objects are subject of cache aging and must be not in use
                                                                                                                                                                                                                                      checked_outrelationthis list keeps all mappings which are in use, and thus prevents them from Cache aging
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      class instanceclass instance
                                                                                                                                                                                                                                      clearoperationclear current session contents
                                                                                                                                                                                                                                      without resetting overall session config.
                                                                                                                                                                                                                                      Afterwards, the session will contain only one
                                                                                                                                                                                                                                      empty EDL, while all Assets are retained.
                                                                                                                                                                                                                                      client codecomponent
                                                                                                                                                                                                                                      Clipclassbookkeeping (asset) view of a media clip.
                                                                                                                                                                                                                                      connectopaque activity action
                                                                                                                                                                                                                                      constraintartifactLocatingPin representing an directive by the user that
                                                                                                                                                                                                                                      must not be violated
                                                                                                                                                                                                                                      Constraintclass
                                                                                                                                                                                                                                      controlpackagesourcecode package

                                                                                                                                                                                                                                      The Processing and Render Controller,
                                                                                                                                                                                                                                      and the Proc-Layer dispatcher
                                                                                                                                                                                                                                      Controlpackage
                                                                                                                                                                                                                                      Controllercomponent
                                                                                                                                                                                                                                      Controllerpackage
                                                                                                                                                                                                                                      controllerpackagesourcecode package

                                                                                                                                                                                                                                      The Processing and Render Controller,
                                                                                                                                                                                                                                      located within the MObject Subsystem
                                                                                                                                                                                                                                      Controller Entitiesclass diagram
                                                                                                                                                                                                                                      Controller Workingsclass view
                                                                                                                                                                                                                                      ControllerFacadeclassProvides unified access to the Proc-Subsystem Controller. Especially, this Facade class provides the functions to get a render engine to carry out actual renderings.
                                                                                                                                                                                                                                      NameKindDescription
                                                                                                                                                                                                                                      edlartifactthe (high level) Edit Decision List within the current Session
                                                                                                                                                                                                                                      EDLcomponent
                                                                                                                                                                                                                                      EDLclass
                                                                                                                                                                                                                                      EDL Example1object diagramA simple example showing how the actual objects are placed in the Fixture (=definitive playlist). It shows a Video and Audio clip placed on two tracks
                                                                                                                                                                                                                                      EDL Example2object diagramMore complex example showing the Object graph in the EDL and how it is linked into the Fixture to yield the actual locations. In this example, an HUE Effect is applied on a part of the Clip
                                                                                                                                                                                                                                      edlsrelation
                                                                                                                                                                                                                                      effectartifactEDL representation of a pluggable and automatable effect.
                                                                                                                                                                                                                                      effectartifactEffect or media processing component
                                                                                                                                                                                                                                      Effectclass
                                                                                                                                                                                                                                      effectiveTimelinerelation
                                                                                                                                                                                                                                      elementsrelationrelevant MObjects comprising this segment. TODO: actually necessary??
                                                                                                                                                                                                                                      enableoperationchange the enabled status of this asset. Note the corresponding #isActive predicate may depend on the enablement status of parent assets as well
                                                                                                                                                                                                                                      endattributeend of the timerange (excl)
                                                                                                                                                                                                                                      FixedLocationclass
                                                                                                                                                                                                                                      Fixtureactivity object
                                                                                                                                                                                                                                      fixtureartifactthe (low level) representation of the EDL with concrete placement data
                                                                                                                                                                                                                                      Fixturecomponent
                                                                                                                                                                                                                                      Fixtureclass
                                                                                                                                                                                                                                      Fixturecomponent
                                                                                                                                                                                                                                      fork activity nodefork activity node
                                                                                                                                                                                                                                      FrameclassFrames are just a low level lump of continous memory, most parts are opaque. Frames are memory sensitive, they will be small constant sized structures which can be efficently managed in a pool.
                                                                                                                                                                                                                                      Framenode
                                                                                                                                                                                                                                      getValueoperation
                                                                                                                                                                                                                                      GLBufclass
                                                                                                                                                                                                                                      glbufartifacta buffer and render process holding a Video frame for OpenGL rendering
                                                                                                                                                                                                                                      globalBussesrelation
                                                                                                                                                                                                                                      glpipeartifactspecialized connection element for handling OpenGL implementation details
                                                                                                                                                                                                                                      glrenderartifactRepresentation of a OpenGL accellerated Video render process
                                                                                                                                                                                                                                      groupsattributeadditional classification, selections or departments this asset belongs to. Groups are optional, non-exclusive and may be overlapping.
                                                                                                                                                                                                                                      + - - + + diff --git a/doc/devel/uml/index_77.html b/doc/devel/uml/index_77.html index e6d8e8031..c88824279 100644 --- a/doc/devel/uml/index_77.html +++ b/doc/devel/uml/index_77.html @@ -31,6 +31,7 @@ + @@ -40,6 +41,7 @@ +
                                                                                                                                                                                                                                      NameKindDescription
                                                                                                                                                                                                                                      idattributeAsset primary key.
                                                                                                                                                                                                                                      ImplFacadeclass
                                                                                                                                                                                                                                      In Memory Databaseclass diagram
                                                                                                                                                                                                                                      inFixtureactivity action pin
                                                                                                                                                                                                                                      inputclass instance
                                                                                                                                                                                                                                      inputclass instance
                                                                                                                                                                                                                                      inputclass instance
                                                                                                                                                                                                                                      inputclass instance
                                                                                                                                                                                                                                      inputclass instance
                                                                                                                                                                                                                                      instanceoperation
                                                                                                                                                                                                                                      instructionsrelation
                                                                                                                                                                                                                                      Interfaceclass view
                                                                                                                                                                                                                                      MediaAccessFacadeclassprovides functions for querying (opening) a media file, detecting the channels or streams found within this file, etc. Delegating to the actual backend functions
                                                                                                                                                                                                                                      MediaFactorycomponent
                                                                                                                                                                                                                                      MediaFactoryclassspecialized Asset Factory for configuring (new) media asset instances based on existing media files on disk; can create placeholder assets as well
                                                                                                                                                                                                                                      MediaKindclass
                                                                                                                                                                                                                                      merge activity nodemerge activity node
                                                                                                                                                                                                                                      Metaclasskey abstraction: metadata and organisational asset
                                                                                                                                                                                                                                      metaartifactkey abstraction: metadata and organisational asset
                                                                                                                                                                                                                                      mobjectpackagesourcecode package

                                                                                                                                                                                                                                      MObject Subsystem
                                                                                                                                                                                                                                      including the Session (EDL), Builder and Processing Controller
                                                                                                                                                                                                                                      MObjectpackage
                                                                                                                                                                                                                                      MObjectclass
                                                                                                                                                                                                                                      Monitorclass
                                                                                                                                                                                                                                      multichannel clipobject diagram
                                                                                                                                                                                                                                      MutexclassI provided a reworked Mutex class in my Cinelerra2 repository
                                                                                                                                                                                                                                      diff --git a/doc/devel/uml/index_80.html b/doc/devel/uml/index_80.html index 368babe6a..85ccb15d9 100644 --- a/doc/devel/uml/index_80.html +++ b/doc/devel/uml/index_80.html @@ -31,10 +31,12 @@ placementartifactKey Abstraction: a way to place and locate a Media Object Placementclassused to specify the position of a MObject in the EDL. This can be done in various ways (absolute, relative).
                                                                                                                                                                                                                                      Placement at the same time acts as (refcounting) smart pointer for accessing the MObject. playoperationTODO: will probably be handled differently (see Cehteh) +PlayControlclass +PlayheadCursorclass playlistnode plugartifactLocatingPin for requesting connection to some Port Plugclass -plugIDattributeIdentifier of the Plugin to be used +pluginattributeIdentifier of the Plugin to be used PluginAdapterclassAdapter used to integrage an effects processor in the render pipeline pluginadapterartifactAdapter for integrating various Effect processors in the render pipeline pnodenode @@ -63,8 +65,11 @@ procnodeartifactKey abstraction of the Render Engine: a Processing Node ProcPattclassspecial type of structural Asset representing information how to build some part of the render engine's processing nodes network. procpattartifacttemplate for building some render processing network +Projectclass +Project Entitiesclass view ProjectorclassSpecial video processing node used to scale and translate image data. projectorartifactvideo ProcNode for scaling and translating image data +Prototypeclass providerrelation pulloperation PullInputclass diff --git a/doc/devel/uml/index_82.html b/doc/devel/uml/index_82.html index 9b107d854..fd3368437 100644 --- a/doc/devel/uml/index_82.html +++ b/doc/devel/uml/index_82.html @@ -39,6 +39,7 @@ renderSegmentsrelation RenderStateclassEncapsulates the logic used to get a "current render process" in accordance to the currentyl applicable controller settings. The provided StateProxy serves to hold any mutalbe state used in the render process, so the rest of the render engine can be stateless. renderstateartifactrenderengine state manager +RenderTaskclass reprattributehuman readable representation of the condition characterizing this allocaton, e.g. "t >= 10" resetoperationreset all session config and
                                                                                                                                                                                                                                      start with a pristine default session. resolveoperationcreate an actual (explicit) placement while trying to satisfy the network of adjacent objects and placements. diff --git a/doc/devel/uml/index_83.html b/doc/devel/uml/index_83.html index 4ea8bf79b..e92c87510 100644 --- a/doc/devel/uml/index_83.html +++ b/doc/devel/uml/index_83.html @@ -28,12 +28,14 @@ segmentsactivity object segmentsactivity object segmentsrelationthe partitioning of the Timeline to be created by this tool. +Seqclass +Sequenceclass Serializerclass Service Componentsclass view Sessioncomponent sessionartifactInterface: the session edited by the user -Sessionclass view sessionpackagesourcecode package

                                                                                                                                                                                                                                      Everything concerning the EDL and Session, within the MObject Subsystem +Sessionclass view SessionclassPrimary Interface for all editing tasks.
                                                                                                                                                                                                                                      The session contains defaults, all the assets being edited, and a set of EDL with the individual MObjects to be manipulated and rendered. Session structureclass diagram sessionimplartifactholds the complete session data to be edited by the user @@ -52,7 +54,6 @@ SourceclassSource Node: represents a media source to pull data from. sourceartifactRepresentation of a Media source Source Overviewdeployment diagram -startattributestartpos in source startattributebegin of the timerange covered by this processor startattribute Stateclass @@ -65,11 +66,19 @@ stateproxyartifactKey Interface representing a render process and encapsulating state std::exceptionclass Strategyclass +Stream Type Frameworkclass diagram +StreamTypeclass view +streamtypeartifact +StreamTypeclass +StreamTypeIDclass Structclasskey abstraction: structural asset structartifactkey abstraction: structural asset Struct-Asset Relationsclass diagram +STypeManagerclass +stypemanagerartifact subjectrelationPlacement acts as smart pointer subPatternrelation +subSequencesrelation subTracksrelationChild tracks in a tree structure diff --git a/doc/devel/uml/index_84.html b/doc/devel/uml/index_84.html index 96532f18f..8f80d7c8d 100644 --- a/doc/devel/uml/index_84.html +++ b/doc/devel/uml/index_84.html @@ -20,35 +20,38 @@ the render configuration flowactivity diagram theApp_attributeholds the single instance and triggers initialization theFixturerelation -theTimelinerelation ThreadclassWe can basically reuse the Thread class design from Cinelerra2, Thread becomes a baseclass for all Threads timeattribute timeartifactunified representation of a time point, including conversion functions Timeclassdenotes a temporal position (time point), based on timeline start.

                                                                                                                                                                                                                                      investigate posix.4 realtime timers, wrap these here timelinenode +Timelineclass +TimelineSequencesclass diagram +TimelineViewclass toolpackagesourcecode package

                                                                                                                                                                                                                                      Tools and Utilities
                                                                                                                                                                                                                                      (separate from the main cinelrra binary) Toolclass ToolFactoryclass toolfactoryartifactsupply of Tool implementations for the Builder Trackclassstructural asset holding the configuration of a track in the EDL -trackrelation trackattribute trackrelation -trackartifactA grouping device within the EDL. The corresponding Placement
                                                                                                                                                                                                                                      by which this Track object is refered defines fallback placing
                                                                                                                                                                                                                                      properties to be used by all objects placed on this track in
                                                                                                                                                                                                                                      case they don't specify more concrete placements.
                                                                                                                                                                                                                                      Typically, tracks are used do make default Port connections,
                                                                                                                                                                                                                                      define a layer or pan for sound and for for disabling groups
                                                                                                                                                                                                                                      of clips. Note tracks are grouped in a tree like fashion.
                                                                                                                                                                                                                                      trackartifactstructural asset holding the configuration of a track in the EDL +trackartifactA grouping device within the EDL. The corresponding Placement
                                                                                                                                                                                                                                      by which this Track object is refered defines fallback placing
                                                                                                                                                                                                                                      properties to be used by all objects placed on this track in
                                                                                                                                                                                                                                      case they don't specify more concrete placements.
                                                                                                                                                                                                                                      Typically, tracks are used do make default Port connections,
                                                                                                                                                                                                                                      define a layer or pan for sound and for for disabling groups
                                                                                                                                                                                                                                      of clips. Note tracks are grouped in a tree like fashion.
                                                                                                                                                                                                                                      +trackrelation Trackclass tracksrelationelementary media assets comprising this compound +trackTreerelation Trafoclass trafoartifacttransforming processing Node treatoperation treatoperationThis operation is to be overloaded for the specific MObject subclasses to be treated. -treatoperation -treatoperation -treatoperation treatoperation +treatoperation +treatoperation +treatoperation treatoperation -treatoperation treatoperation +treatoperation TypeHandlerclass TypeHandler<Pipe>class diff --git a/doc/devel/uml/index_86.html b/doc/devel/uml/index_86.html index 3538c8202..203265efb 100644 --- a/doc/devel/uml/index_86.html +++ b/doc/devel/uml/index_86.html @@ -21,21 +21,21 @@ VFrameclass vframeartifacta buffer and render process holding a Video frame vid1class instance -vid_Aclass instance vid_aclass instance +vid_aclass instance +vid_Aclass instance vid_Aclass instance vid_Aclass instance -vid_aclass instance -videoclass instance videoclass instance videoclass instance videoclass instance -video1class instance -video1class instance -video1class instance +videoclass instance video1class instance +video1class instance +video1class instance video1class instance video1class instance +video1class instance Visitableclass visitorpackagesub-namespace for visitor library implementation visitorartifactAcyclic Visitor library diff --git a/doc/devel/uml/packages.html b/doc/devel/uml/packages.html index 49c0f4f80..25b52f427 100644 --- a/doc/devel/uml/packages.html +++ b/doc/devel/uml/packages.html @@ -20,14 +20,14 @@ Asset backendsrcsourcecode package

                                                                                                                                                                                                                                      Data backend classes here... BackendLayer -buildersrcsourcecode package

                                                                                                                                                                                                                                      The Builder creating the Render Engine,
                                                                                                                                                                                                                                      located within the MObject Subsystem Builder +buildersrcsourcecode package

                                                                                                                                                                                                                                      The Builder creating the Render Engine,
                                                                                                                                                                                                                                      located within the MObject Subsystem codegenThis package is used to organize code generation by BOUML. It is considered useless after having generated the initial code skeleton. commonsrcsourcecode package

                                                                                                                                                                                                                                      Common library and helper classes CommonLib ConfigQuery -Controller -controllersrcsourcecode package

                                                                                                                                                                                                                                      The Processing and Render Controller,
                                                                                                                                                                                                                                      located within the MObject Subsystem +controlsrcsourcecode package

                                                                                                                                                                                                                                      The Processing and Render Controller,
                                                                                                                                                                                                                                      and the Proc-Layer dispatcher +Control design designAll things concering the big picture.
                                                                                                                                                                                                                                      Not a real code package, rather a container for design drafts, specifications, decisions. enginesrcsourcecode package

                                                                                                                                                                                                                                      The Core Render Engine diff --git a/doc/devel/uml/public_operations.html b/doc/devel/uml/public_operations.html index 07fb079d7..fe9b01e39 100644 --- a/doc/devel/uml/public_operations.html +++ b/doc/devel/uml/public_operations.html @@ -69,12 +69,12 @@ saveSessManagercreate a complete, serialized representation
                                                                                                                                                                                                                                      of the current session config and contents.
                                                                                                                                                                                                                                      @todo how to serialize, prameters, return value? treatApplicable treatBuilderToolThis operation is to be overloaded for the specific MObject subclasses to be treated. +treatNodeCreatorTool treatNodeCreatorTool treatNodeCreatorTool -treatNodeCreatorTool treatNodeCreatorTool -treatSegmentationTool treatSegmentationTool +treatSegmentationTool treatSegmentationTool useFileFileProviderAnnounces that the application intends to use this file with mode (READ|WRITE|READWRITE) useTemporaryStorageFileProviderProvides a pool for interminate frames diff --git a/icons/Makefile.am b/icons/Makefile.am index 6693b6d1d..d8ec425de 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -33,24 +33,46 @@ iconcommand = python $(top_srcdir)/admin/render-icon.py 48x48pre = $(prerendereddir)/48x48 lumigui_DEPENDENCIES += \ - rsvg-convert \ - $(16x16)/tool-arrow.png $(22x22)/tool-arrow.png $(24x24)/tool-arrow.png $(32x32)/tool-arrow.png $(48x48)/tool-arrow.png \ - $(16x16)/tool-i-beam.png $(22x22)/tool-i-beam.png $(24x24)/tool-i-beam.png $(32x32)/tool-i-beam.png $(48x48)/tool-i-beam.png \ - $(16x16)/panel-assets.png $(22x22)/panel-assets.png $(32x32)/panel-assets.png \ - $(16x16)/panel-timeline.png \ - $(16x16)/panel-viewer.png $(22x22)/panel-viewer.png $(32x32)/panel-viewer.png + $(16x16)/tool-arrow.png $(22x22)/tool-arrow.png $(24x24)/tool-arrow.png $(32x32)/tool-arrow.png $(48x48)/tool-arrow.png \ + $(16x16)/tool-i-beam.png $(22x22)/tool-i-beam.png $(24x24)/tool-i-beam.png $(32x32)/tool-i-beam.png $(48x48)/tool-i-beam.png \ + $(16x16)/track-disabled.png \ + $(16x16)/track-enabled.png \ + $(16x16)/track-locked.png \ + $(16x16)/track-unlocked.png \ + $(16x16)/panel-assets.png $(22x22)/panel-assets.png $(32x32)/panel-assets.png \ + $(16x16)/panel-timeline.png \ + $(16x16)/panel-viewer.png $(22x22)/panel-viewer.png $(32x32)/panel-viewer.png -$(16x16)/tool-arrow.png $(22x22)/tool-arrow.png $(24x24)/tool-arrow.png $(32x32)/tool-arrow.png $(48x48)/tool-arrow.png : $(svgdir)/tool-arrow.svg + +# ========== SVG Icons ========== + +# Timeline Tools + +$(16x16)/tool-arrow.png $(22x22)/tool-arrow.png $(24x24)/tool-arrow.png $(32x32)/tool-arrow.png $(48x48)/tool-arrow.png : $(svgdir)/tool-arrow.svg $(top_builddir)/rsvg-convert $(iconcommand) $< $(icondir) -$(16x16)/tool-i-beam.png $(22x22)/tool-i-beam.png $(24x24)/tool-i-beam.png $(32x32)/tool-i-beam.png $(48x48)/tool-i-beam.png : $(svgdir)/tool-i-beam.svg +$(16x16)/tool-i-beam.png $(22x22)/tool-i-beam.png $(24x24)/tool-i-beam.png $(32x32)/tool-i-beam.png $(48x48)/tool-i-beam.png : $(svgdir)/tool-i-beam.svg $(top_builddir)/rsvg-convert $(iconcommand) $< $(icondir) +# Timeline Tracks +$(16x16)/track-disabled.png : $(svgdir)/track-disabled.svg $(top_builddir)/rsvg-convert + $(iconcommand) $< $(icondir) +$(16x16)/track-enabled.png : $(svgdir)/track-enabled.svg $(top_builddir)/rsvg-convert + $(iconcommand) $< $(icondir) +$(16x16)/track-locked.png : $(svgdir)/track-locked.svg $(top_builddir)/rsvg-convert + $(iconcommand) $< $(icondir) +$(16x16)/track-unlocked.png : $(svgdir)/track-unlocked.svg $(top_builddir)/rsvg-convert + $(iconcommand) $< $(icondir) + +# ========== Prerendered Icons ========== + +# Panels + $(16x16)/panel-assets.png: cp $(16x16pre)/panel-assets.png $(16x16) $(22x22)/panel-assets.png: - cp $(22x22pre)/panel-assets.png $(22x22) + cp $(22x22pre)/panel-assets.png $(22x22) $(32x32)/panel-assets.png: - cp $(32x32pre)/panel-assets.png $(32x32) + cp $(32x32pre)/panel-assets.png $(32x32) $(16x16)/panel-timeline.png: cp $(16x16pre)/panel-timeline.png $(16x16) @@ -61,5 +83,3 @@ $(22x22)/panel-viewer.png: cp $(22x22pre)/panel-viewer.png $(22x22) $(32x32)/panel-viewer.png: cp $(32x32pre)/panel-viewer.png $(32x32) - - diff --git a/icons/svg/track-disabled.svg b/icons/svg/track-disabled.svg new file mode 100644 index 000000000..04e87768e --- /dev/null +++ b/icons/svg/track-disabled.svg @@ -0,0 +1,663 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/icons/svg/track-enabled.svg b/icons/svg/track-enabled.svg new file mode 100644 index 000000000..ab6af9f53 --- /dev/null +++ b/icons/svg/track-enabled.svg @@ -0,0 +1,967 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/icons/svg/track-locked.svg b/icons/svg/track-locked.svg new file mode 100644 index 000000000..3ff1d34a4 --- /dev/null +++ b/icons/svg/track-locked.svg @@ -0,0 +1,866 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/icons/svg/track-unlocked.svg b/icons/svg/track-unlocked.svg new file mode 100644 index 000000000..beea19846 --- /dev/null +++ b/icons/svg/track-unlocked.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am index da39e71c6..f37f51a57 100644 --- a/src/backend/Makefile.am +++ b/src/backend/Makefile.am @@ -18,7 +18,8 @@ liblumibackend_a_srcdir = $(top_srcdir)/src/backend noinst_LIBRARIES += liblumibackend.a -liblumibackend_a_CFLAGS = $(CFLAGS) -std=gnu99 -Wextra -Wall -Werror +liblumibackend_a_CPPFLAGS = $(AM_CPPFLAGS) -DLUMIERA_PLUGIN_PATH="\"$(pkglibdir)\"" +liblumibackend_a_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wextra -Wall -Werror liblumibackend_a_SOURCES = \ $(liblumibackend_a_srcdir)/mediaaccessfacade.cpp \ @@ -29,6 +30,8 @@ liblumibackend_a_SOURCES = \ $(liblumibackend_a_srcdir)/filehandlecache.c \ $(liblumibackend_a_srcdir)/interface.c \ $(liblumibackend_a_srcdir)/interfaceregistry.c \ + $(liblumibackend_a_srcdir)/plugin.c \ + $(liblumibackend_a_srcdir)/plugin_dynlib.c \ $(liblumibackend_a_srcdir)/config.c \ $(liblumibackend_a_srcdir)/config_typed.c \ $(liblumibackend_a_srcdir)/config_wordlist.c \ @@ -47,6 +50,7 @@ noinst_HEADERS += \ $(liblumibackend_a_srcdir)/interface.h \ $(liblumibackend_a_srcdir)/interfaceregistry.h \ $(liblumibackend_a_srcdir)/interfacedescriptor.h \ + $(liblumibackend_a_srcdir)/plugin.h \ $(liblumibackend_a_srcdir)/config.h \ $(liblumibackend_a_srcdir)/configentry.h \ $(liblumibackend_a_srcdir)/configitem.h \ diff --git a/src/backend/config.h b/src/backend/config.h index 4e3acd9a9..445ed6e23 100644 --- a/src/backend/config.h +++ b/src/backend/config.h @@ -228,20 +228,22 @@ LUMIERA_CONFIG_TYPES * Get nth word of a wordlist. * @param key key under which this wordlist is stored * @param nth index of the word to get, starting with 0 + * @param delims a string literal listing all characters which are treated as delimiters * @return pointer to a tempbuf holding the nth word or NULL in case of error */ const char* -lumiera_config_wordlist_get_nth (const char* key, unsigned nth); +lumiera_config_wordlist_get_nth (const char* key, unsigned nth, const char* delims); /** * Find the index of a word in a wordlist. * @param key key under which this wordlist is stored * @param value word to find + * @param delims a string literal listing all characters which are treated as delimiters * @return index of the first occurence of the word or -1 in case of failure */ int -lumiera_config_wordlist_find (const char* key, const char* value); +lumiera_config_wordlist_find (const char* key, const char* value, const char* delims); /** @@ -254,20 +256,22 @@ lumiera_config_wordlist_find (const char* key, const char* value); * @param value word to be replaced * @param subst1 first replacement word * @param subst2 second replacement word + * @param delims a string literal listing all characters which are treated as delimiters * @return internal representation of the wordlist in a tmpbuf or NULL in case of an error */ const char* -lumiera_config_wordlist_replace (const char* key, const char* value, const char* subst1, const char* subst2); +lumiera_config_wordlist_replace (const char* key, const char* value, const char* subst1, const char* subst2, const char* delims); /** * Add a word to the end of a wordlist if it doesnt exist already * @param key key under which this wordlist is stored * @param value new word to add + * @param delims a string literal listing all characters which are treated as delimiters * @return internal representation of the wordlist in a tmpbuf or NULL in case of an error */ const char* -lumiera_config_wordlist_add (const char* key, const char* value); +lumiera_config_wordlist_add (const char* key, const char* value, const char* delims); // * {{{ lumiera_config_TYPE_set (const char* key, TYPE*value, const char* fmt) }}} // Highlevel interface for different types, fmt is a printf format specifier for the desired format, when NULL, defaults apply. diff --git a/src/backend/config_wordlist.c b/src/backend/config_wordlist.c index 6cd0389a7..47232f483 100644 --- a/src/backend/config_wordlist.c +++ b/src/backend/config_wordlist.c @@ -19,25 +19,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -//TODO: Support library includes// #include "lib/error.h" #include "lib/safeclib.h" -//TODO: Lumiera header includes// #include "backend/config.h" -//TODO: internal/static forward declarations// extern LumieraConfig lumiera_global_config; -//TODO: System includes// - /** * return nth word of a wordlist */ const char* -lumiera_config_wordlist_get_nth (const char* key, unsigned nth) +lumiera_config_wordlist_get_nth (const char* key, unsigned nth, const char* delims) { const char* value; size_t len; @@ -47,8 +42,8 @@ lumiera_config_wordlist_get_nth (const char* key, unsigned nth) for (;;) { - value += strspn (value, " \t,;"); - len = strcspn (value, " \t,;"); + value += strspn (value, delims); + len = strcspn (value, delims); if (!nth && *value) break; @@ -64,7 +59,7 @@ lumiera_config_wordlist_get_nth (const char* key, unsigned nth) int -lumiera_config_wordlist_find (const char* key, const char* value) +lumiera_config_wordlist_find (const char* key, const char* value, const char* delims) { const char* itr; size_t vlen = strlen (value); @@ -75,8 +70,8 @@ lumiera_config_wordlist_find (const char* key, const char* value) for (int idx = 0; *itr; itr += len, ++idx) { - itr += strspn (itr, " \t,;"); - len = strcspn (itr, " \t,;"); + itr += strspn (itr, delims); + len = strcspn (itr, delims); if (len == vlen && !strncmp (itr, value, vlen)) return idx; @@ -87,7 +82,7 @@ lumiera_config_wordlist_find (const char* key, const char* value) const char* -lumiera_config_wordlist_replace (const char* key, const char* value, const char* subst1, const char* subst2) +lumiera_config_wordlist_replace (const char* key, const char* value, const char* subst1, const char* subst2, const char* delims) { const char* wordlist; const char* str = NULL; @@ -106,28 +101,25 @@ lumiera_config_wordlist_replace (const char* key, const char* value, const char* for (const char* itr = start; *itr; itr += len) { const char* left_end = itr; - itr += strspn (itr, " \t,;"); - len = strcspn (itr, " \t,;"); + itr += strspn (itr, delims); + len = strcspn (itr, delims); if (len == vlen && !strncmp (itr, value, vlen)) { - TODO ("figure delimiter from original string out"); - const char* delim = " "; - /* step over the word */ itr += len; - itr += strspn (itr, " \t,;"); + itr += strspn (itr, delims); /* getting the delimiters right for the corner cases looks ugly, want to refactor it? just do it */ str = lumiera_tmpbuf_snprintf (SIZE_MAX, - "%.*s%.*s%s%s%s%s%s%s", + "%.*s%.*s%.1s%s%.1s%s%.1s%s", start - wordlist, wordlist, left_end - start, start, - (left_end - start && subst1 && *subst1) ? delim : "", + (left_end - start && subst1 && *subst1) ? delims : "", (subst1 && *subst1) ? subst1 : "", - ((left_end - start || (subst1 && *subst1)) && subst2 && *subst2) ? delim : "", + ((left_end - start || (subst1 && *subst1)) && subst2 && *subst2) ? delims : "", (subst2 && *subst2) ? subst2 : "", - ((left_end - start || (subst1 && *subst1) || (subst2 && *subst2)) && *itr) ? delim : "", + ((left_end - start || (subst1 && *subst1) || (subst2 && *subst2)) && *itr) ? delims : "", itr ); @@ -145,7 +137,7 @@ lumiera_config_wordlist_replace (const char* key, const char* value, const char* const char* -lumiera_config_wordlist_add (const char* key, const char* value) +lumiera_config_wordlist_add (const char* key, const char* value, const char* delims) { const char* wordlist = NULL; @@ -160,19 +152,16 @@ lumiera_config_wordlist_add (const char* key, const char* value) for (const char* itr = wordlist; *itr; itr += len) { - itr += strspn (itr, " \t,;"); - len = strcspn (itr, " \t,;"); + itr += strspn (itr, delims); + len = strcspn (itr, delims); if (len == vlen && !strncmp (itr, value, vlen)) goto end; } - TODO ("figure delimiter from original string out"); - const char* delim = " "; - - wordlist = lumiera_tmpbuf_snprintf (SIZE_MAX, "%s%s%s", + wordlist = lumiera_tmpbuf_snprintf (SIZE_MAX, "%s%.1s%s", wordlist, - wordlist[strspn (wordlist, " \t,;")]?delim:"", + wordlist[strspn (wordlist, delims)] ? delims : "", value); if (!lumiera_config_set (key, lumiera_tmpbuf_snprintf (SIZE_MAX, "=%s", wordlist))) diff --git a/src/backend/interface.c b/src/backend/interface.c index 58d0d0c0f..22e94cbcc 100644 --- a/src/backend/interface.c +++ b/src/backend/interface.c @@ -22,6 +22,7 @@ #include "lib/mutex.h" #include "lib/safeclib.h" +#include "backend/plugin.h" #include "backend/interface.h" #include "backend/interfaceregistry.h" @@ -49,6 +50,7 @@ lumiera_interface_open (const char* interface, unsigned version, size_t minminor { LumieraInterfacenode self = NULL; TRACE (interface, "%s", name); + WARN_IF (version == 0, interface, "opening experimental interface: %s_%d_%s", interface, version, name); LUMIERA_RECMUTEX_SECTION (interfaceregistry, &lumiera_interface_mutex) { @@ -132,8 +134,9 @@ depwalk (LumieraInterfacenode self, LumieraInterfacenode* stack) if (!cycle) { + if ((*dep)->plugin) + lumiera_plugin_refinc ((*dep)->plugin); ++(*dep)->refcnt; - (*dep)->lnk = *stack; *stack = *dep; @@ -183,7 +186,10 @@ lumiera_interface_open_interfacenode (LumieraInterfacenode self) if (!cycle) { + if (self->plugin) + lumiera_plugin_refinc (self->plugin); ++self->refcnt; + self->lnk = stack; stack = self; int collect_dependencies_bak = collect_dependencies; @@ -228,6 +234,16 @@ lumiera_interface_close (LumieraInterface self) } +unsigned +lumiera_interface_version (LumieraInterface self, const char* iname) +{ + if (self && iname && !strcmp (self->interface, iname)) + return self->version; + + return ~0; +} + + /* internal function, does no locking! */ static void lumiera_interfacenode_close (LumieraInterfacenode self) @@ -279,6 +295,8 @@ lumiera_interfacenode_close (LumieraInterfacenode self) stack = self->lnk; self->lnk = NULL; + if (self->plugin) + lumiera_plugin_refdec (self->plugin); --self->refcnt; } } diff --git a/src/backend/interface.h b/src/backend/interface.h index ef13e40e1..e962a2d10 100644 --- a/src/backend/interface.h +++ b/src/backend/interface.h @@ -102,9 +102,18 @@ * @param iname name of the interface * @param version major version of the interface * @param dname name for the instance + * @return constructed identifier */ -#define LUMIERA_INTERFACE_DNAME(iname, version, dname) PPMPL_CAT (LUMIERA_INTERFACE_INAME(iname, version), _##dname) +#define LUMIERA_INTERFACE_DNAME(iname, version, dname) PPMPL_CAT (LUMIERA_INTERFACE_INAME (iname, version), _##dname) +/** + * Construct a definition string r for an interface + * @param iname name of the interface + * @param version major version of the interface + * @param dname name for the instance + * @return constructed string + */ +#define LUMIERA_INTERFACE_DSTRING(iname, version, dname) PPMPL_STRINGIFY (LUMIERA_INTERFACE_DNAME (iname, version, dname)) /** * Return a reference (pointer) to an interface implementation @@ -259,16 +268,16 @@ LUMIERA_INTERFACE_INSTANCE (iname, version, /** * Generate interface container suitable for enumerating interfaces. * This takes a list of interface definitions, instantiates them and places pointers to them - * into a zero terminated array which address is returned by the a created function. - * For interfaces generated by he core, the user is responsible to register these at the - * plugindb dynamically - * @param queryfunc name of the function to be created. - * @param ... list of LUMIERA_INTERFACE_DEFINE() for all interfaces this plugin provides. + * into a zero terminated array which address is returned by a static function named 'lumiera_plugin_interfaces'. + * For interfaces generated by he core, the user is responsible to register these dynamically. + * When LUMIERA_PLUGIN is defined, things change and an additional 'lumieraorg__plugin' interface is generated. + * The plugin loader then uses this to register the provided interfaces automatically. + * @param ... list of LUMIERA_INTERFACE_DEFINE()/LUMIERA_INTERFACE_INLINE() for all interfaces this plugin provides. */ -#define LUMIERA_EXPORT(queryfunc, ...) \ +#define LUMIERA_EXPORT(...) \ PPMPL_FOREACH_L1(_P1_, __VA_ARGS__) \ static LumieraInterface* \ -queryfunc (void) \ +lumiera_plugin_interfaces (void) \ { \ static LumieraInterface interfaces[] = \ { \ @@ -276,31 +285,41 @@ queryfunc (void) \ NULL \ }; \ return interfaces; \ -} +} \ +LUMIERA_PLUGININTERFACE /** - * Generate interface container suitable for a lumiera plugin. - * This takes a list of interface definitions and places pointers to them into a zero terminated array. Further - * it instances a local 'plugin interface' which will be picked up by the plugin loader to query the array of - * provided interfaces. - * @param descriptor pointer to an interface instance which provides a description of this plugin, might be NULL - * @param acquire a function which is called whenever the plugin interface is opened for using, might be NULL - * @param release a function which is called whenever this plugin interface is closed after use, might be NULL - * @param luid unique identifier for the this plugin interfaces query, use the magic word LUIDGEN here and run the - * lumiera uuid generator tool (to be written) over the source file to generate luid's automatically - * @param ... list of LUMIERA_INTERFACE_DEFINE() for all interfaces this plugin provides. + * Create a plugin interface when being copiled as plugin */ -#define LUMIERA_PLUGIN(descriptor, acquire, release, luid, ...) \ -LUMIERA_EXPORT(plugin_interfaces, __VA_ARGS__) \ -LUMIERA_INTERFACE_DEFINE (lumieraorg_plugin, 0, \ - lumieraorg_plugin_0, \ - NULL, \ - NULL, \ - NULL, \ - LUMIERA_INTERFACE_MAP (plugin_interfaces, plugin_interfaces, luid) \ - ) - +#ifdef LUMIERA_PLUGIN +#define LUMIERA_PLUGININTERFACE \ +LUMIERA_INTERFACE_INSTANCE (lumieraorg__plugin, 0, \ + lumieraorg_plugin, \ + NULL, \ + NULL, \ + NULL, \ + LUMIERA_INTERFACE_MAP (plugin_interfaces, \ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", \ + lumiera_plugin_interfaces) \ + ); +#define LUMIERA_INTERFACE_REGISTEREXPORTED +#define LUMIERA_INTERFACE_UNREGISTEREXPORTED +#else +#define LUMIERA_PLUGININTERFACE +/** + * Register all exported interfaces when not a plugin + * This is a no-op when LUMIERA_PLUGIN is defined, since plugins are automatically registered + */ +#define LUMIERA_INTERFACE_REGISTEREXPORTED \ + lumiera_interfaceregistry_bulkregister_interfaces (lumiera_plugin_interfaces(), NULL) +/** + * Unregister all exported interfaces when not a plugin + * This is a no-op when LUMIERA_PLUGIN is defined, since plugins are automatically registered + */ +#define LUMIERA_INTERFACE_UNREGISTEREXPORTED \ + lumiera_interfaceregistry_bulkremove_interfaces (lumiera_plugin_interfaces()) +#endif /** @@ -313,6 +332,9 @@ LUMIERA_INTERFACE_DEFINE (lumieraorg_plugin, 0, #define LUMIERA_INTERFACE_OPEN(interface, version, minminor, name) \ LUMIERA_INTERFACE_CAST(interface, version) lumiera_interface_open (#interface, version, minminor, #name) +#define LUMIERA_INTERFACE_CLOSE(handle) \ + lumiera_interface_close (&(handle)->interface_header_) + typedef struct lumiera_interfaceslot_struct lumiera_interfaceslot; typedef lumiera_interfaceslot* LumieraInterfaceslot; @@ -372,6 +394,15 @@ struct lumiera_interface_struct #endif }; + +/** + * Plugin interface + */ +LUMIERA_INTERFACE_DECLARE (lumieraorg__plugin, 0, + LUMIERA_INTERFACE_SLOT (LumieraInterface*, plugin_interfaces, (void)), +); + + /* API to handle interfaces */ @@ -395,7 +426,16 @@ lumiera_interface_open (const char* interface, unsigned version, size_t minminor * consider 'self' to be invalidated after this call */ void -lumiera_interface_close (LumieraInterface iface); +lumiera_interface_close (LumieraInterface self); + +/** + * Runtime check for interface type and version + * @param self interface to check + * @param iname name of the interface + * @return version of the interface or ~0 (-1) if iname doesn't match the requested name + */ +unsigned +lumiera_interface_version (LumieraInterface self, const char* iname); #endif /* LUMIERA_INTERFACE_H */ diff --git a/src/backend/interfacedescriptor.h b/src/backend/interfacedescriptor.h index 468bd2e80..29894c686 100644 --- a/src/backend/interfacedescriptor.h +++ b/src/backend/interfacedescriptor.h @@ -23,20 +23,113 @@ #include "backend/interface.h" + /** - * WIP: interface descriptor, needs some generic metadata interface + * Release state of an interface implementation. + * The interface subsystem must be able to categorize implementations to present possible + * upgrade paths to the user. This is done by the tagging it to a certain state in concert + * with the version and the user supplied version compare function. The respective numbers + * are choosen in a way that a higher value indicates precedence when selecting an implementation. + * Note that 'BETA' is higher than 'DEPRECATED', we make the assumption that BETA is at least + * maintained code and something gets deprecated for some reason. For common practice it is + * suggested to make a stable release before declaring its predcessor version as deprecated. + */ +enum lumiera_interface_state { + /** some known bugs exist which won't be fixed, don't use this */ + LUMIERA_INTERFACE_BROKEN = -1, + /** Not finished development code */ + LUMIERA_INTERFACE_EXPERIMENTAL = 0, + /** Old implementation which is now unmaintained and will be removed soon */ + LUMIERA_INTERFACE_DEPRECATED = 1, + /** Finished but not finally released implementation for open testing */ + LUMIERA_INTERFACE_BETA = 2, + /** Finished, released and maintained implementation */ + LUMIERA_INTERFACE_STABLE = 3 +}; + + +/** + * Interface descriptor. + * This defines an interface for querying metadata common to all interface implementations */ LUMIERA_INTERFACE_DECLARE (lumieraorg_interfacedescriptor, 0, /* The following slots are some human-readable descriptions of certain properties */ LUMIERA_INTERFACE_SLOT (const char*, name, (LumieraInterface)), + LUMIERA_INTERFACE_SLOT (const char*, brief, (LumieraInterface)), + LUMIERA_INTERFACE_SLOT (const char*, homepage, (LumieraInterface)), LUMIERA_INTERFACE_SLOT (const char*, version, (LumieraInterface)), LUMIERA_INTERFACE_SLOT (const char*, author, (LumieraInterface)), + LUMIERA_INTERFACE_SLOT (const char*, email, (LumieraInterface)), LUMIERA_INTERFACE_SLOT (const char*, copyright, (LumieraInterface)), - LUMIERA_INTERFACE_SLOT (const char*, license, (LumieraInterface)) - /* TODO add more things here, dependencies, provisions etc */ + LUMIERA_INTERFACE_SLOT (const char*, license, (LumieraInterface)), + + /* some flags for properties */ + LUMIERA_INTERFACE_SLOT (int, state, (LumieraInterface)), + + /* compare 2 version strings in a custom way */ + LUMIERA_INTERFACE_SLOT (int, versioncmp, (const char*, const char*)) ); +#if 0 +/** + * For convinience, a copy'n'paste descriptor + */ +LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0, + /*IDENTIFIER*/, + NULL, NULL, NULL, + LUMIERA_INTERFACE_INLINE (name, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*NAME*/;} + ), + LUMIERA_INTERFACE_INLINE (brief, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*BRIEF*/;} + ), + LUMIERA_INTERFACE_INLINE (homepage, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*HOMEPAGE*/;} + ), + LUMIERA_INTERFACE_INLINE (version, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*VERSION*/;} + ), + LUMIERA_INTERFACE_INLINE (author, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*AUTHOR*/;} + ), + LUMIERA_INTERFACE_INLINE (email, LUIDGEN, + const char*, (LumieraInterface iface), + {return /*EMAIL*/;} + ), + LUMIERA_INTERFACE_INLINE (copyright, LUIDGEN, + const char*, (LumieraInterface iface), + { + return + "Copyright (C) "/*ORGANIZATION*/"\n" + " "/*YEARS*/" "/*AUTHOR*/" <"/*EMAIL*/">"; + } + ), + LUMIERA_INTERFACE_INLINE (license, LUIDGEN, + const char*, (LumieraInterface iface), + { + return + /*LICENSE*/; + } + ), + + LUMIERA_INTERFACE_INLINE (state, LUIDGEN, + int, (LumieraInterface iface), + {return /*LUMIERA_INTERFACE_EXPERIMENTAL*/;} + ), + + LUMIERA_INTERFACE_INLINE (versioncmp, LUIDGEN, + int, (const char* a, const char* b), + {return /*COMPARERESULT*/;} + ) + ); +#endif + #endif /* LUMIERA_INTERFACEDESCRIPTORS_H */ /* diff --git a/src/backend/interfaceregistry.c b/src/backend/interfaceregistry.c index ffa979340..969ab23e0 100644 --- a/src/backend/interfaceregistry.c +++ b/src/backend/interfaceregistry.c @@ -29,6 +29,7 @@ +#include "backend/plugin.h" #include "backend/interfaceregistry.h" /** @@ -39,27 +40,31 @@ */ NOBUG_DEFINE_FLAG_PARENT (interface_all, backend); +NOBUG_DEFINE_FLAG_PARENT (plugin, interface_all); NOBUG_DEFINE_FLAG_PARENT (interfaceregistry, interface_all); NOBUG_DEFINE_FLAG_PARENT (interface, interface_all); PSplay lumiera_interfaceregistry; +PSplay lumiera_pluginregistry; lumiera_mutex lumiera_interface_mutex; static int -cmp_fn (const void* keya, const void* keyb); +lumiera_interface_cmp_fn (const void* keya, const void* keyb); static const void* -key_fn (const PSplaynode node); +lumiera_interface_key_fn (const PSplaynode node); + static LumieraInterfacenode -lumiera_interfacenode_new (LumieraInterface iface) +lumiera_interfacenode_new (LumieraInterface iface, LumieraPlugin plugin) { LumieraInterfacenode self = lumiera_malloc (sizeof (*self)); psplaynode_init (&self->node); self->interface = iface; self->refcnt = 0; + self->plugin = plugin; self->lnk = NULL; self->deps_size = 0; self->deps = NULL; @@ -89,13 +94,20 @@ lumiera_interfaceregistry_init (void) NOBUG_INIT_FLAG (interface_all); NOBUG_INIT_FLAG (interfaceregistry); NOBUG_INIT_FLAG (interface); + NOBUG_INIT_FLAG (plugin); + TRACE (interfaceregistry); REQUIRE (!lumiera_interfaceregistry); + REQUIRE (!lumiera_pluginregistry); - lumiera_interfaceregistry = psplay_new (cmp_fn, key_fn, NULL); + lumiera_interfaceregistry = psplay_new (lumiera_interface_cmp_fn, lumiera_interface_key_fn, NULL); if (!lumiera_interfaceregistry) LUMIERA_DIE (ERRNO); + lumiera_pluginregistry = psplay_new (lumiera_plugin_cmp_fn, lumiera_plugin_key_fn, lumiera_plugin_delete_fn); + if (!lumiera_pluginregistry) + LUMIERA_DIE (ERRNO); + lumiera_recmutex_init (&lumiera_interface_mutex, "interfaceregistry", &NOBUG_FLAG(interfaceregistry)); } @@ -104,10 +116,15 @@ void lumiera_interfaceregistry_destroy (void) { TRACE (interfaceregistry); - REQUIRE (!psplay_nelements (lumiera_interfaceregistry)); + + if (lumiera_pluginregistry) + psplay_delete (lumiera_pluginregistry); + lumiera_pluginregistry = NULL; lumiera_mutex_destroy (&lumiera_interface_mutex, &NOBUG_FLAG(interfaceregistry)); + REQUIRE (!psplay_nelements (lumiera_interfaceregistry), "some interfaces still registered at shutdown"); + if (lumiera_interfaceregistry) psplay_destroy (lumiera_interfaceregistry); lumiera_interfaceregistry = NULL; @@ -115,7 +132,7 @@ lumiera_interfaceregistry_destroy (void) void -lumiera_interfaceregistry_register_interface (LumieraInterface self) +lumiera_interfaceregistry_register_interface (LumieraInterface self, LumieraPlugin plugin) { TRACE (interfaceregistry); REQUIRE (self); @@ -123,13 +140,13 @@ lumiera_interfaceregistry_register_interface (LumieraInterface self) LUMIERA_RECMUTEX_SECTION (interfaceregistry, &lumiera_interface_mutex) { TRACE (interfaceregistry, "interface %s, version %d, instance %s", self->interface, self->version, self->name); - psplay_insert (lumiera_interfaceregistry, &lumiera_interfacenode_new (self)->node, 100); + psplay_insert (lumiera_interfaceregistry, &lumiera_interfacenode_new (self, plugin)->node, 100); } } void -lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self) +lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self, LumieraPlugin plugin) { TRACE (interfaceregistry); REQUIRE (self); @@ -139,7 +156,7 @@ lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self) while (*self) { TRACE (interfaceregistry, "interface %s, version %d, instance %s", (*self)->interface, (*self)->version, (*self)->name); - psplay_insert (lumiera_interfaceregistry, &lumiera_interfacenode_new (*self)->node, 100); + psplay_insert (lumiera_interfaceregistry, &lumiera_interfacenode_new (*self, plugin)->node, 100); ++self; } } @@ -213,7 +230,7 @@ lumiera_interfaceregistry_interface_find (const char* interface, unsigned versio static int -cmp_fn (const void* keya, const void* keyb) +lumiera_interface_cmp_fn (const void* keya, const void* keyb) { const LumieraInterface a = (const LumieraInterface)keya; const LumieraInterface b = (const LumieraInterface)keyb; @@ -240,12 +257,11 @@ cmp_fn (const void* keya, const void* keyb) static const void* -key_fn (const PSplaynode node) +lumiera_interface_key_fn (const PSplaynode node) { return ((LumieraInterfacenode)node)->interface; } - /* // Local Variables: // mode: C diff --git a/src/backend/interfaceregistry.h b/src/backend/interfaceregistry.h index 02481072d..54ede293a 100644 --- a/src/backend/interfaceregistry.h +++ b/src/backend/interfaceregistry.h @@ -25,6 +25,7 @@ #include "lib/psplay.h" #include "backend/interface.h" +#include "backend/plugin.h" #include @@ -62,6 +63,10 @@ struct lumiera_interfacenode_struct /** reference counters and link used for internal reference management */ unsigned refcnt; + + /** backreference to its plugin if it comes from a plugin, else NULL */ + LumieraPlugin plugin; + /** temporary used to stack interfaces when recursively opening/closing them */ LumieraInterfacenode lnk; /** allocated size of the following deps table */ @@ -84,10 +89,10 @@ lumiera_interfaceregistry_destroy (void); void -lumiera_interfaceregistry_register_interface (LumieraInterface self); +lumiera_interfaceregistry_register_interface (LumieraInterface self, LumieraPlugin plugin); void -lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self); +lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self, LumieraPlugin plugin); void lumiera_interfaceregistry_remove_interface (LumieraInterface self); diff --git a/src/backend/plugin.c b/src/backend/plugin.c index f6ecd7649..ea189b57e 100644 --- a/src/backend/plugin.c +++ b/src/backend/plugin.c @@ -18,320 +18,403 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include + #include "lib/safeclib.h" +#include "lib/psplay.h" +#include "lib/mutex.h" +#include "lib/error.h" +#include "backend/interfaceregistry.h" +#include "backend/config.h" #include "backend/plugin.h" +#include + +#include + +#ifndef LUMIERA_PLUGIN_PATH +#error TODO: hey ichthyo, please figure the $pkglib path out by scons and use it as -DLUMIERA_PLUGIN_PATH for this source +#endif + /** * @file * Plugin loader. */ +/* just some declarations */ +extern PSplay lumiera_pluginregistry; +static char* init_exts_globs (); -/* TODO should be set by the build system to the actual plugin path */ -#define LUMIERA_PLUGIN_PATH "~/.lumiera/plugins:/usr/local/lib/lumiera/plugins:.libs" - -NOBUG_DEFINE_FLAG (lumiera_plugin); +/* TODO default plugin path should be set by the build system */ /* errors */ -LUMIERA_ERROR_DEFINE(PLUGIN_DLOPEN, "Could not open plugin"); -LUMIERA_ERROR_DEFINE(PLUGIN_HOOK, "Hook function failed"); -LUMIERA_ERROR_DEFINE(PLUGIN_NFILE, "No such plugin"); -LUMIERA_ERROR_DEFINE(PLUGIN_NIFACE, "No such interface"); -LUMIERA_ERROR_DEFINE(PLUGIN_REVISION, "Interface revision too old"); +LUMIERA_ERROR_DEFINE(PLUGIN_INIT, "Initialization error"); +LUMIERA_ERROR_DEFINE(PLUGIN_OPEN, "Could not open plugin"); +LUMIERA_ERROR_DEFINE(PLUGIN_WTF, "Not a Lumiera plugin"); +LUMIERA_ERROR_DEFINE(PLUGIN_REGISTER, "Could not register plugin"); +LUMIERA_ERROR_DEFINE(PLUGIN_VERSION, "Plugin Version unsupported"); -/* - supported (planned) plugin types and their file extensions -*/ +#define LUMIERA_PLUGIN_TYPE_PLANNED(name, ext) -enum lumiera_plugin_type - { - LUMIERA_PLUGIN_NULL, - LUMIERA_PLUGIN_DYNLIB, - LUMIERA_PLUGIN_CSOURCE - }; +/** + * Supported (and planned) plugin types and their file extensions + * This maps filename extensions to implementations (of the respective _load_NAME and _unload_NAME functions) + * So far we only support platform dynamic libraries, later we may add plugins implemented in lua + * and c source modules which get compiled on the fly. + */ +#define LUMIERA_PLUGIN_TYPES \ + LUMIERA_PLUGIN_TYPE(DYNLIB, ".so") \ + LUMIERA_PLUGIN_TYPE(DYNLIB, ".lum") \ + LUMIERA_PLUGIN_TYPE_PLANNED(LUA, ".lua") \ + LUMIERA_PLUGIN_TYPE_PLANNED(CSOURCE, ".c") -static const struct + +/** + * record the extension and a callback function for loading the associated plugin for each plugin type + */ +struct lumiera_plugintype_struct { - const char* const ext; - enum lumiera_plugin_type type; -} lumiera_plugin_extensions [] = + LumieraPlugin (*lumiera_plugin_load_fn)(const char*); + void (*lumiera_plugin_unload_fn)(LumieraPlugin); + const char* ext; +}; +typedef struct lumiera_plugintype_struct lumiera_plugintype; +typedef lumiera_plugintype* LumieraPlugintype; + +/* forward declare loader functions for all types */ +#define LUMIERA_PLUGIN_TYPE(type, ext) \ + LumieraPlugin lumiera_plugin_load_##type (const char*); \ + void lumiera_plugin_unload_##type (LumieraPlugin); +LUMIERA_PLUGIN_TYPES +#undef LUMIERA_PLUGIN_TYPE + +/* and now setup a table which will be used for dispatching loaders depending on the type of the plugin */ +#define LUMIERA_PLUGIN_TYPE(type, ext) {lumiera_plugin_load_##type, lumiera_plugin_unload_##type, ext}, +static lumiera_plugintype lumiera_plugin_types[] = { - {"so", LUMIERA_PLUGIN_DYNLIB}, - {"o", LUMIERA_PLUGIN_DYNLIB}, - {"c", LUMIERA_PLUGIN_CSOURCE}, - /* extend here */ - {NULL, LUMIERA_PLUGIN_NULL} + LUMIERA_PLUGIN_TYPES + {NULL, NULL, NULL} }; +#undef LUMIERA_PLUGIN_TYPE -struct lumiera_plugin + + +struct lumiera_plugin_struct { - /* short name as queried ("effects/audio/normalize") used for sorting/finding */ - const char* name; + psplaynode node; /* long names as looked up ("/usr/local/lib/lumiera/plugins/effects/audio/normalize.so") */ - const char* pathname; + const char* name; /* use count for all interfaces of this plugin */ - unsigned use_count; + unsigned refcnt; - /* time when the last open or close action happened */ + /* time when the refcounter dropped to 0 last time */ time_t last; - /* kind of plugin */ - enum lumiera_plugin_type type; + /* when loading plugins en masse we do not want to fail completely if one doesnt cooperate, instead we record local errors here */ + lumiera_err error; - /* dlopen handle */ + /* the 'plugin' interface itself */ + LumieraInterface plugin; + + /* generic handle for the plugin, dlopen handle, etc */ void* handle; }; -/* global plugin registry */ -void* lumiera_plugin_registry = NULL; - -/* plugin operations are protected by one big mutex */ -pthread_mutex_t lumiera_plugin_mutex = PTHREAD_MUTEX_INITIALIZER; - -/** - * the compare function for the registry tree. - * Compares the names of two struct lumiera_plugin. - * @return 0 if a and b are equal, just like strcmp. */ -static int -lumiera_plugin_name_cmp (const void* a, const void* b) +LumieraPlugin +lumiera_plugin_new (const char* name) { - return strcmp (((struct lumiera_plugin*) a)->name, ((struct lumiera_plugin*) b)->name); + LumieraPlugin self = lumiera_malloc (sizeof (*self)); + + psplaynode_init (&self->node); + self->name = lumiera_strndup (name, SIZE_MAX); + self->refcnt = 0; + time (&self->last); + self->error = LUMIERA_ERROR_PLUGIN_INIT; + self->plugin = NULL; + self->handle = NULL; + return self; } + +LumieraPlugin +lumiera_plugin_init (LumieraPlugin self, void* handle, LumieraInterface plugin) +{ + self->error = lumiera_error (); + self->plugin = plugin; + self->handle = handle; + return self; +} + + +lumiera_err +lumiera_plugin_error (LumieraPlugin self) +{ + REQUIRE (self); + return self->error; +} + + +void* +lumiera_plugin_handle (LumieraPlugin self) +{ + REQUIRE (self); + return self->handle; +} + + +const char* +lumiera_plugin_name (LumieraPlugin self) +{ + return self?self->name:NULL; +} + + void -lumiera_init_plugin (void) +lumiera_plugin_refinc (LumieraPlugin self) { - NOBUG_INIT_FLAG (lumiera_plugin); + ++self->refcnt; } -/** - * Find and set pathname for the plugin. - * Searches through given path for given plugin, trying to find the file's location in the filesystem. - * If found, self->pathname will be set to the found plugin file. - * @param self The lumiera_plugin to open look for. - * @param path The path to search trough (paths seperated by ":") - * @return 0 on success. -1 on error, or if plugin not found in path. - */ + +void +lumiera_plugin_refdec (LumieraPlugin self) +{ + if (!--self->refcnt) + time (&self->last); +} + + int -lumiera_plugin_lookup (struct lumiera_plugin* self, const char* path) +lumiera_plugin_discover (LumieraPlugin (*callback_load)(const char* plugin), + int (*callback_register) (LumieraPlugin)) { - if (!path) - return -1; + TRACE (plugin); + REQUIRE (callback_load); + REQUIRE (callback_register); - if (strlen(path) > 1023) - return -1; /*TODO error handling*/ + lumiera_config_setdefault ("plugin.path ="LUMIERA_PLUGIN_PATH); - char tpath[1024]; - TODO("dunno if PATH_MAX may be undefined (in case arbitary lengths are supported), I check that later"); - char pathname[1024] = {0}; - char* tmp; + /* construct glob trail {.so,.c,.foo} ... */ + static char* exts_globs = NULL; + if (!exts_globs) + exts_globs = init_exts_globs (&exts_globs); - strcpy(tpath, path); + const char* path; + unsigned i = 0; + int flags = GLOB_PERIOD|GLOB_BRACE|GLOB_TILDE_CHECK; + glob_t globs; - /*for each in path*/ - for (char* tok = strtok_r (tpath, ":", &tmp); tok; tok = strtok_r (NULL, ":", &tmp)) + while ((path = lumiera_config_wordlist_get_nth ("plugin.path", i, ":"))) { - /*for each extension*/ - for (int i = 0; lumiera_plugin_extensions[i].ext; ++i) - { - /* path/name.extension */ - int r = snprintf(pathname, 1024, "%s/%s.%s", tok, self->name, lumiera_plugin_extensions[i].ext); - if (r >= 1024) - return -1; /*TODO error handling, name too long*/ + path = lumiera_tmpbuf_snprintf (SIZE_MAX,"%s/%s", path, exts_globs); + TRACE (plugin, "globbing path '%s'", path); + int ret = glob (path, flags, NULL, &globs); + if (ret == GLOB_NOSPACE) + LUMIERA_DIE (NO_MEMORY); - TRACE (lumiera_plugin, "trying %s", pathname); - - if (!access(pathname, R_OK)) - { - /* got it */ - TRACE (lumiera_plugin, "found %s", pathname); - self->pathname = lumiera_strndup (pathname, PATH_MAX); - - self->type = lumiera_plugin_extensions[i].type; - return 0; - } - } + flags |= GLOB_APPEND; + ++i; } - return -1; /* plugin not found */ + + if (globs.gl_pathc) + LUMIERA_RECMUTEX_SECTION (plugin, &lumiera_interface_mutex) + { + for (char** itr = globs.gl_pathv; *itr; ++itr) + { + if (!psplay_find (lumiera_pluginregistry, *itr, 100)) + { + TRACE (plugin, "found new plugin '%s'", *itr); + callback_register (callback_load (*itr)); + } + } + } + + globfree (&globs); + + return !lumiera_error_peek (); } -struct lumiera_interface* -lumiera_interface_open (const char* name, const char* interface, size_t min_revision) +LumieraPlugin +lumiera_plugin_load (const char* plugin) { - //REQUIRE (min_revision > sizeof(struct lumiera_interface), "try to use an empty interface eh?"); - REQUIRE (interface, "interface name must be given"); + TRACE (plugin); - pthread_mutex_lock (&lumiera_plugin_mutex); + /* dispatch on ext, call the registered function */ + const char* ext = strrchr (plugin, '.'); - struct lumiera_plugin plugin; - struct lumiera_plugin** found; - - plugin.name = name; /* for searching */ - - found = tsearch (&plugin, &lumiera_plugin_registry, lumiera_plugin_name_cmp); - if (!found) - LUMIERA_DIE (NO_MEMORY); - - if (*found == &plugin) + LumieraPlugintype itr = lumiera_plugin_types; + while (itr->ext) { - NOTICE (lumiera_plugin, "new plugin"); + if (!strcmp (itr->ext, ext)) + return itr->lumiera_plugin_load_fn (plugin); + ++itr; + } + return NULL; +} - /* now really create new item */ - *found = lumiera_malloc (sizeof (struct lumiera_plugin)); - if (name) /* NULL is main app, no lookup needed */ +int +lumiera_plugin_register (LumieraPlugin plugin) +{ + TRACE (plugin); + if (!plugin) + return 1; + + LUMIERA_RECMUTEX_SECTION (plugin, &lumiera_interface_mutex) + { + if (psplay_insert (lumiera_pluginregistry, &plugin->node, 100)) { - /*lookup for $LUMIERA_PLUGIN_PATH*/ - (*found)->name = lumiera_strndup (name, PATH_MAX); - - if (!!lumiera_plugin_lookup (*found, getenv("LUMIERA_PLUGIN_PATH")) -#ifdef LUMIERA_PLUGIN_PATH - /* else lookup for -DLUMIERA_PLUGIN_PATH */ - && !!lumiera_plugin_lookup (*found, LUMIERA_PLUGIN_PATH) -#endif - ) + if (!plugin->error) { - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_NFILE); - goto elookup; + switch (lumiera_interface_version (plugin->plugin, "lumieraorg__plugin")) + { + case 0: + { + TRACE (plugin, "registering %s", plugin->name); + LUMIERA_INTERFACE_HANDLE(lumieraorg__plugin, 0) handle = + LUMIERA_INTERFACE_CAST(lumieraorg__plugin, 0) plugin->plugin; + lumiera_interfaceregistry_bulkregister_interfaces (handle->plugin_interfaces (), plugin); + } + break; + default: + LUMIERA_ERROR_SET (plugin, PLUGIN_VERSION); + } } } else { - (*found)->name = NULL; - (*found)->pathname = NULL; - } - - (*found)->use_count = 0; - - PLANNED("if .so like then dlopen; else if .c like tcc compile"); - TODO("factor dlopen and dlsym out"); - - TRACE(lumiera_plugin, "trying to open %s", (*found)->pathname); - - (*found)->handle = dlopen ((*found)->pathname, RTLD_LAZY|RTLD_LOCAL); - if (!(*found)->handle) - { - ERROR (lumiera_plugin, "dlopen failed: %s", dlerror()); - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_DLOPEN); - goto edlopen; - } - - /* if the plugin defines a 'lumiera_plugin_init' function, we call it, must return 0 on success */ - int (*init)(void) = dlsym((*found)->handle, "lumiera_plugin_init"); - if (init && init()) - { - //ERROR (lumiera_plugin, "lumiera_plugin_init failed: %s: %s", name, interface); - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_HOOK); - goto einit; + LUMIERA_ERROR_SET (plugin, PLUGIN_REGISTER); } } - /* we have the plugin, now get the interface descriptor */ - struct lumiera_interface* ret; - - dlerror(); - ret = dlsym ((*found)->handle, interface); - - const char *dlerr = dlerror(); - TRACE(lumiera_plugin, "%s", dlerr); - TODO ("need some way to tell 'interface not provided by plugin', maybe lumiera_plugin_error()?"); - if (dlerr) - { - //ERROR (lumiera_plugin, "plugin %s doesnt provide interface %s", name, interface); - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_NIFACE); - goto edlsym; - } - - /* is the interface older than required? */ - if (ret->size < min_revision) - { - ERROR (lumiera_plugin, "plugin %s provides older interface %s revision than required", name, interface); - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_REVISION); - goto erevision; - } - - ret->plugin = *found; - - /* if the interface provides a 'open' function, call it now, must return 0 on success */ - if (ret->open && ret->open()) - { - ERROR (lumiera_plugin, "open hook indicated an error"); - LUMIERA_ERROR_SET (lumiera_plugin, PLUGIN_HOOK); - goto eopen; - } - - (*found)->use_count++; - (*found)->last = time (NULL); - ret->use_count++; - - pthread_mutex_unlock (&lumiera_plugin_mutex); - return ret; - - /* Error cleanup */ - einit: - dlclose((*found)->handle); - eopen: - erevision: - edlsym: - edlopen: - elookup: - free ((char*)(*found)->name); - free (*found); - *found = &plugin; - tdelete (&plugin, &lumiera_plugin_registry, lumiera_plugin_name_cmp); - pthread_mutex_unlock (&lumiera_plugin_mutex); - return NULL; + return !!lumiera_error_peek(); } + +unsigned +lumiera_plugin_unload (LumieraPlugin self) +{ + TRACE (plugin); + + if (!self) + return 0; + + if (self->refcnt) + return self->refcnt; + + /* dispatch on ext, call the registered function */ + const char* ext = strrchr (self->name, '.'); + + LumieraPlugintype itr = lumiera_plugin_types; + while (itr->ext) + { + if (!strcmp (itr->ext, ext)) + { + LUMIERA_RECMUTEX_SECTION (plugin, &lumiera_interface_mutex) + { + if (psplay_remove (lumiera_pluginregistry, &self->node)) + { + if (!self->error) + { + LUMIERA_INTERFACE_HANDLE(lumieraorg__plugin, 0) handle = + LUMIERA_INTERFACE_CAST(lumieraorg__plugin, 0) self->plugin; + lumiera_interfaceregistry_bulkremove_interfaces (handle->plugin_interfaces ()); + } + } + } + itr->lumiera_plugin_unload_fn (self); + break; + } + ++itr; + } + + return 0; +} + + +LumieraPlugin +lumiera_plugin_lookup (const char* name) +{ + LumieraPlugin ret = NULL; + + if (name) + LUMIERA_RECMUTEX_SECTION (plugin, &lumiera_interface_mutex) + ret = (LumieraPlugin) psplay_find (lumiera_pluginregistry, name, 100); + + return ret; +} + + +static char* init_exts_globs () +{ + char* exts_globs; + size_t exts_sz = 3; /* * { } \0 less one comma */ + LumieraPlugintype itr = lumiera_plugin_types; + while (itr->ext) + { + exts_sz += strlen (itr->ext) + 1; + ++itr; + } + + exts_globs = lumiera_malloc (exts_sz); + *exts_globs = '\0'; + + itr = lumiera_plugin_types; + strcat (exts_globs, "*{"); + + while (itr->ext) + { + strcat (exts_globs, itr->ext); + strcat (exts_globs, ","); + ++itr; + } + exts_globs[exts_sz-2] = '}'; + TRACE (plugin, "initialized extension glob to '%s'", exts_globs); + return exts_globs; +} + +int +lumiera_plugin_cmp_fn (const void* keya, const void* keyb) +{ + return strcmp ((const char*)keya, (const char*)keyb); +} + + +const void* +lumiera_plugin_key_fn (const PSplaynode node) +{ + return ((LumieraPlugin)node)->name; +} + + void -lumiera_interface_close (void* ptr) +lumiera_plugin_delete_fn (PSplaynode node) { - TRACE (lumiera_plugin, "%p", ptr); - if(!ptr) - return; + LumieraPlugin self = (LumieraPlugin) node; - struct lumiera_interface* self = (struct lumiera_interface*) ptr; + ENSURE (!self->refcnt, "plugin %s still in use at shutdown", self->name); - pthread_mutex_lock (&lumiera_plugin_mutex); + const char* ext = strrchr (self->name, '.'); - struct lumiera_plugin* plugin = self->plugin; - - plugin->use_count--; - self->use_count--; - - /* if the interface provides a 'close' function, call it now */ - if (self->close) - self->close(); - - /* plugin not longer in use, unload it */ - if (!plugin->use_count) + LumieraPlugintype itr = lumiera_plugin_types; + while (itr->ext) { - TODO ("we dont want to close here, instead store time of recent use and make a expire run, already planned in my head"); - - /* if the plugin defines a 'lumiera_plugin_destroy' function, we call it */ - int (*destroy)(void) = dlsym(plugin->handle, "lumiera_plugin_destroy"); - if (destroy) - destroy(); - - /* and now cleanup */ - tdelete (plugin, &lumiera_plugin_registry, lumiera_plugin_name_cmp); - free ((char*)plugin->name); - dlclose(plugin->handle); - free (plugin); + if (!strcmp (itr->ext, ext)) + { + if (!self->error) + { + LUMIERA_INTERFACE_HANDLE(lumieraorg__plugin, 0) handle = + LUMIERA_INTERFACE_CAST(lumieraorg__plugin, 0) self->plugin; + lumiera_interfaceregistry_bulkremove_interfaces (handle->plugin_interfaces ()); + } + itr->lumiera_plugin_unload_fn (self); + break; + } + ++itr; } - pthread_mutex_unlock (&lumiera_plugin_mutex); } diff --git a/src/backend/plugin.h b/src/backend/plugin.h index 7e17afc18..26451edac 100644 --- a/src/backend/plugin.h +++ b/src/backend/plugin.h @@ -21,137 +21,188 @@ #ifndef LUMIERA_PLUGIN_H #define LUMIERA_PLUGIN_H -#ifdef __cplusplus -extern "C" { -#elif 0 -} /*eek, fixes emacs indenting for now*/ -#endif +#include "lib/psplay.h" +#include "lib/error.h" + +#include "backend/interface.h" #include #include -#include "error.h" - /** * @file - * Plugin loader, header. + * Lumiera plugins defines 'interfaces' as shown in interface.h, the plugin system handles the loading + * of all kinds of plugins under the hood, invoked from the interface system. Most things defined here + * are called internally and should not be used by other parts of the application. + * + * Plugin discovery + * The plugin_discover() function offers a automatic way to load and register new plugins. It traverses + * all configured plugin directories. It takes to function for loading and registering plugins as + * parameter, by now this only uses the here defined plugin_load() and plugin_register() functions + * which lets it load any newly found plugin unconditionally. Later these callbacks will be replaced by + * a smarter system (plugindb) which makes it possible to load plugins on-demand and select proper + * plugins based on their version and capabilities. + * + * Plugin loading + * Plugins are loaded and initialized in a sequence of steps: + * plugin_load() dispatches to a specific loader function depending on the type (extension) of a plugin. + * This loader allocates a new plugin structure with plugin_new() and then does it work and eventually + * finalizing the plugin structure initialization with plugin_init() by providing a handle to a + * lumieraorg__plugin interface. plugin_init() also stores the current error state (which might be clean) + * into the plugin. After that the plugin can be registered which records it in the pluginregistry and if + * its error state is clean, registering all interfaces it offers in the interface registry. With that + * the plugin is ready to be used. Plugins with the error state set should still be registered to prevent + * further discovery runs to try loading them again. + * */ -NOBUG_DECLARE_FLAG (lumiera_plugin); +LUMIERA_ERROR_DECLARE(PLUGIN_INIT); +LUMIERA_ERROR_DECLARE(PLUGIN_OPEN); +LUMIERA_ERROR_DECLARE(PLUGIN_WTF); +LUMIERA_ERROR_DECLARE(PLUGIN_REGISTER); +LUMIERA_ERROR_DECLARE(PLUGIN_VERSION); + + +NOBUG_DECLARE_FLAG (plugin); /* tool macros*/ -#define LUMIERA_INTERFACE_TYPE(name, version) struct lumiera_interface_##name##_##version -#define LUMIERA_INTERFACE_CAST(name, version) (LUMIERA_INTERFACE_TYPE(name, version)*) - -/* Interface definition */ -#define LUMIERA_INTERFACE(name, version, ...) \ -LUMIERA_INTERFACE_TYPE(name, version) \ -{ \ - struct lumiera_interface interface_header_; \ - __VA_ARGS__ \ -} - -#define LUMIERA_INTERFACE_PROTO(ret, name, params) ret (*name) params; - -/* Interface instantiation */ -#define LUMIERA_INTERFACE_IMPLEMENT(iname, version, name, open, close, ...) \ -LUMIERA_INTERFACE_TYPE(iname, version) name##_##version = \ -{ \ - { \ - version, \ - sizeof(LUMIERA_INTERFACE_TYPE(iname, version)), \ - NULL, \ - 0, \ - open, \ - close \ - }, \ - __VA_ARGS__ \ -} - -/* internally used */ -struct lumiera_plugin; +struct lumiera_plugin_struct; +typedef struct lumiera_plugin_struct lumiera_plugin; +typedef lumiera_plugin* LumieraPlugin; +enum lumiera_plugin_type; /** - * This is the header for any interface exported by plugins. - * Real interfaces append their functions at the end. There are few standard functions on each Interface - * Every function is required to be implemnted. + * Allocates an preinitializes a plugin structure + * @internal + * @param name path/filename of the plugin + * @return new allocated/preinitialized plugin structure with its error state set to LUMIERA_ERROR_PLUGIN_INIT */ -struct lumiera_interface -{ - /// interface version number - unsigned version; - /// size of the full structure is used to determine the revision (adding a new function increments the size) - size_t size; - /// back reference to plugin - struct lumiera_plugin* plugin; - /// incremented for each user of this interface and decremented when closed - unsigned use_count; - - /// called for each open of this interface - int (*open)(void); - /// called for each close of this interface - int (*close)(void); -}; +LumieraPlugin +lumiera_plugin_new (const char* name); /** - * Initialize the plugin system. - * always succeeds or aborts + * Complete plugin initialization + * @internal + * Stores any pending error (from loading) in self which clears out the LUMIERA_ERROR_PLUGIN_INIT error state + * which was initialized by lumiera_plugin_new(), stores the handle and plugin pointers in the plugin struct. + * @param self pointer to the plugin struct + * @param handle opaque handle refering to some plugin type specific data + * @param plugin a lumieraorg__plugin interface which will be used to initialize this plugin + */ +LumieraPlugin +lumiera_plugin_init (LumieraPlugin self, void* handle, LumieraInterface plugin); + + +/** + * Tries to load a plugin + * Creates a new plugin structure and tries to load and initialize the plugin. + * The plugins error state may be set on any problem which should be queried later. + * @param plugin path/filename of the plugin to load + * @return pointer to the new plugin structure (always, never NULL, check error state) + */ +LumieraPlugin +lumiera_plugin_load (const char* plugin); + + +/** + * Register a plugin and its interfaces. + * Registers the plugin (unconditionally) at the pluginregistry. + * When the error state of the plugin is NULL then use its lumieraorg__plugin interface + * to register all interfaces offered by the plugin at the interface registry. + * Registered plugins will be automatic unloaded at application end. + * @param self the plugin to be registered (calling with NULL is a no-op) + * @return 1 on success (including calling with NULL) and 0 when a error occured + */ +int +lumiera_plugin_register (LumieraPlugin self); + + +/** + * Query the error state of a plugin + * @param self plugin to query + * @return error identifier, NULL if no error was set + */ +lumiera_err +lumiera_plugin_error (LumieraPlugin self); + +/** + * Query the plugin handle + * @param self plugin to query + * @return opaque handle set by the loader functions + */ +void* +lumiera_plugin_handle (LumieraPlugin self); + + +/** + * Query the plugin name + * The name is the path and filname under which it was loaded + * @param self plugin to query + * @return pointer to the name string + */ +const char* +lumiera_plugin_name (LumieraPlugin self); + + +/** + * Increment refcount + * @internal + * @param self plugin which refcount to increment */ void -lumiera_init_plugin (void); +lumiera_plugin_refinc (LumieraPlugin self); /** - * Make an interface available. - * To use an interface provided by a plugin it must be opened first. It is allowed to open an interface - * more than once. Each open must be paired with a close. - * @param name name of the plugin to use. - * @param interface name of the interface to open. - * @param min_revision the size of the interface structure is used as measure of a minimal required - * revision (new functions are appended at the end) - * @return handle to the interface or NULL in case of a error. The application shall cast this handle to - * the actual interface type. - */ -struct lumiera_interface* -lumiera_interface_open (const char* plugin, const char* name, size_t min_revision); - - -/** - * Close an interface. Does not free associated resources - * Calling this function with self==NULL is legal. Every interface handle must be closed only once. - * @param ptr interface to be closed + * Decrement refcount + * @internal + * @param self plugin which refcount to decrement */ void -lumiera_interface_close (void* self); +lumiera_plugin_refdec (LumieraPlugin self); + /** * Tries to unload a plugin. * When the Plugin is unused, then all resources associated with it are freed and it will be removed from memory - * @param plugin name of the plugin to be unloaded. - * @return 0 on success, else the number if users which keeping the plugin loaded + * @param plugin the plugin to be unloaded. + * @return 0 on success, else the refcount of users which keeping the plugin loaded */ -int -lumiera_plugin_unload (const char* plugin); +unsigned +lumiera_plugin_unload (LumieraPlugin self); + /** - * Tries to unload plugins which are not in use. - * Calls lumiera_plugin_unload() for each Plugin which is not used for more than age seconds. - * This function might be infrequently called by the scheduler to remove things which are not needed. - * @param age timeout in seconds when to unload plugins + * Lookup a plugin handle in the pluginregistry + * @param name name of the plugin to be looked up + * @return plugin handle on success, NULL if the plugin is not found in the registry */ +LumieraPlugin +lumiera_plugin_lookup (const char* name); + + +/** + * discover new plugins + * traverses the configured plugin paths and calls the callback_load function for any plugin + * not actually loaded. If callback_load returns a plugin (and not NULL) then this is feed to + * the callback_register function. + */ +int +lumiera_plugin_discover (LumieraPlugin (*callback_load)(const char* plugin), + int (*callback_register) (LumieraPlugin)); + + +/* psplay support functions */ +int +lumiera_plugin_cmp_fn (const void* keya, const void* keyb); + +const void* +lumiera_plugin_key_fn (const PSplaynode node); + void -lumiera_plugin_expire (time_t age); +lumiera_plugin_delete_fn (PSplaynode node); -LUMIERA_ERROR_DECLARE(PLUGIN_DLOPEN); -LUMIERA_ERROR_DECLARE(PLUGIN_HOOK); -LUMIERA_ERROR_DECLARE(PLUGIN_NFILE); -LUMIERA_ERROR_DECLARE(PLUGIN_NIFACE); -LUMIERA_ERROR_DECLARE(PLUGIN_REVISION); - -#ifdef __cplusplus -} /* extern "C" */ -#endif #endif /* LUMIERA_PLUGIN_H */ diff --git a/src/backend/plugin_dynlib.c b/src/backend/plugin_dynlib.c new file mode 100644 index 000000000..50030843c --- /dev/null +++ b/src/backend/plugin_dynlib.c @@ -0,0 +1,60 @@ +/* + plugin_dynlib.c - Lumiera Plugin loader for dynamic libraries + + Copyright (C) Lumiera.org + 2008, Christian Thaeter + + This program 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "backend/plugin.h" + +#include +#include + +/** + * @file + * Plugin loader for dynamic libraries. + */ + +LumieraPlugin +lumiera_plugin_load_DYNLIB (const char* name) +{ + TRACE (plugin); + LumieraPlugin self = lumiera_plugin_new (name); + LumieraInterface plugin = NULL; + + void* handle = dlopen (name, RTLD_LAZY|RTLD_LOCAL); + if (handle) + { + plugin = (LumieraInterface) dlsym (handle, LUMIERA_INTERFACE_DSTRING (lumieraorg__plugin, 0, lumieraorg_plugin)); + + if (!plugin) + LUMIERA_ERROR_SET (plugin, PLUGIN_WTF); + } + else + LUMIERA_ERROR_SET (plugin, PLUGIN_OPEN); + + return lumiera_plugin_init (self, handle, plugin); +} + + +void +lumiera_plugin_unload_DYNLIB (LumieraPlugin self) +{ + TRACE (plugin); + void* handle = lumiera_plugin_handle (self); + if (handle) + dlclose (handle); +} diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 79e402310..22566db8e 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -24,66 +24,67 @@ lumigui_CPPFLAGS = $(AM_CPPFLAGS) \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ - $(GTK_LUMIERA_CFLAGS) + $(LUMIERA_GUI_CFLAGS) bin_PROGRAMS += lumigui -lumigui_SOURCES = \ - $(lumigui_srcdir)/gtk-lumiera.cpp \ - $(lumigui_srcdir)/gtk-lumiera.hpp \ - $(lumigui_srcdir)/window-manager.cpp \ - $(lumigui_srcdir)/window-manager.hpp \ - $(lumigui_srcdir)/workspace/actions.cpp \ - $(lumigui_srcdir)/workspace/actions.hpp \ - $(lumigui_srcdir)/workspace/workspace-window.cpp \ - $(lumigui_srcdir)/workspace/workspace-window.hpp \ - $(lumigui_srcdir)/dialogs/render.cpp \ - $(lumigui_srcdir)/dialogs/render.hpp \ - $(lumigui_srcdir)/dialogs/preferences-dialog.cpp \ - $(lumigui_srcdir)/dialogs/preferences-dialog.hpp \ - $(lumigui_srcdir)/panels/panel.cpp \ - $(lumigui_srcdir)/panels/panel.hpp \ - $(lumigui_srcdir)/panels/timeline-panel.cpp \ - $(lumigui_srcdir)/panels/timeline-panel.hpp \ - $(lumigui_srcdir)/panels/viewer-panel.cpp \ - $(lumigui_srcdir)/panels/viewer-panel.hpp \ - $(lumigui_srcdir)/panels/assets-panel.cpp \ - $(lumigui_srcdir)/panels/assets-panel.hpp \ - $(lumigui_srcdir)/widgets/video-display-widget.cpp \ - $(lumigui_srcdir)/widgets/video-display-widget.hpp \ - $(lumigui_srcdir)/widgets/timeline-widget.cpp \ - $(lumigui_srcdir)/widgets/timeline-widget.hpp \ - $(lumigui_srcdir)/widgets/timeline/header-container.cpp \ - $(lumigui_srcdir)/widgets/timeline/header-container.hpp \ - $(lumigui_srcdir)/widgets/timeline/track.cpp \ - $(lumigui_srcdir)/widgets/timeline/track.hpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-body.cpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-body.hpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-ruler.hpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-tool.cpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-tool.hpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.cpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.hpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.cpp \ - $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.hpp \ - $(lumigui_srcdir)/model/project.cpp \ - $(lumigui_srcdir)/model/project.hpp \ - $(lumigui_srcdir)/output/displayer.cpp \ - $(lumigui_srcdir)/output/displayer.hpp \ - $(lumigui_srcdir)/output/gdkdisplayer.cpp \ - $(lumigui_srcdir)/output/gdkdisplayer.hpp \ - $(lumigui_srcdir)/output/xvdisplayer.cpp \ +lumigui_SOURCES = \ + $(lumigui_srcdir)/gtk-lumiera.cpp \ + $(lumigui_srcdir)/gtk-lumiera.hpp \ + $(lumigui_srcdir)/window-manager.cpp \ + $(lumigui_srcdir)/window-manager.hpp \ + $(lumigui_srcdir)/workspace/actions.cpp \ + $(lumigui_srcdir)/workspace/actions.hpp \ + $(lumigui_srcdir)/workspace/workspace-window.cpp \ + $(lumigui_srcdir)/workspace/workspace-window.hpp \ + $(lumigui_srcdir)/dialogs/render.cpp \ + $(lumigui_srcdir)/dialogs/render.hpp \ + $(lumigui_srcdir)/dialogs/preferences-dialog.cpp \ + $(lumigui_srcdir)/dialogs/preferences-dialog.hpp \ + $(lumigui_srcdir)/panels/panel.cpp \ + $(lumigui_srcdir)/panels/panel.hpp \ + $(lumigui_srcdir)/panels/timeline-panel.cpp \ + $(lumigui_srcdir)/panels/timeline-panel.hpp \ + $(lumigui_srcdir)/panels/viewer-panel.cpp \ + $(lumigui_srcdir)/panels/viewer-panel.hpp \ + $(lumigui_srcdir)/panels/assets-panel.cpp \ + $(lumigui_srcdir)/panels/assets-panel.hpp \ + $(lumigui_srcdir)/widgets/video-display-widget.cpp \ + $(lumigui_srcdir)/widgets/video-display-widget.hpp \ + $(lumigui_srcdir)/widgets/timeline-widget.cpp \ + $(lumigui_srcdir)/widgets/timeline-widget.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-header-container.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-header-container.hpp \ + $(lumigui_srcdir)/widgets/timeline/track.cpp \ + $(lumigui_srcdir)/widgets/timeline/track.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-body.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-body.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ruler.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-tool.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.hpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.cpp \ + $(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.hpp \ + $(lumigui_srcdir)/model/project.cpp \ + $(lumigui_srcdir)/model/project.hpp \ + $(lumigui_srcdir)/output/displayer.cpp \ + $(lumigui_srcdir)/output/displayer.hpp \ + $(lumigui_srcdir)/output/gdkdisplayer.cpp \ + $(lumigui_srcdir)/output/gdkdisplayer.hpp \ + $(lumigui_srcdir)/output/xvdisplayer.cpp \ $(lumigui_srcdir)/output/xvdisplayer.hpp -lumigui_LDFLAGS = -lumigui_LDADD = $(GTK_LUMIERA_LIBS) liblumicommon.a liblumi.a $(NOBUGMT_LUMIERA_LIBS) +lumigui_LDFLAGS = +# $(LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) +lumigui_LDADD = $(LUMIERA_GUI_LIBS) liblumicommon.a liblumiera.a $(NOBUGMT_LUMIERA_LIBS) lumigui_DEPENDENCIES = \ $(top_builddir)/lumiera_ui.rc \ $(top_builddir)/liblumicommon.a \ - $(top_builddir)/liblumi.a - + $(top_builddir)/liblumiera.a + $(top_builddir)/lumiera_ui.rc: cp $(lumigui_srcdir)/lumiera_ui.rc $(top_builddir) diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp index 1a895084f..c73e45977 100644 --- a/src/gui/gtk-lumiera.cpp +++ b/src/gui/gtk-lumiera.cpp @@ -32,6 +32,10 @@ #include "workspace/workspace-window.hpp" #include "model/project.hpp" +extern "C" { +#include "backend/interface.h" +} + NOBUG_CPP_DEFINE_FLAG(gui); using namespace Gtk; diff --git a/src/gui/gtk-lumiera.hpp b/src/gui/gtk-lumiera.hpp index 180148f7f..a25927712 100644 --- a/src/gui/gtk-lumiera.hpp +++ b/src/gui/gtk-lumiera.hpp @@ -31,6 +31,7 @@ #include #include #include +#include extern "C" { #include @@ -91,7 +92,7 @@ static const gchar* AppAuthors[] = { /** * The main application class. */ -class GtkLumiera +class GtkLumiera : private boost::noncopyable { public: int main(int argc, char *argv[]); diff --git a/src/gui/lumiera_ui.rc b/src/gui/lumiera_ui.rc index 9d4f4d771..dcce8df48 100644 --- a/src/gui/lumiera_ui.rc +++ b/src/gui/lumiera_ui.rc @@ -152,13 +152,13 @@ style "timeline_ruler" = "default_base" gtkmm__CustomObject_TimelineRuler::playback_period_arrow_stem_size = 3 } -style "header_container" = "default_base" +style "timeline_header_container" = "default_base" { gtkmm__CustomObject_HeaderContainer::heading_margin = 4 } class "gtkmm__CustomObject_TimelineBody" style:highest "timeline_body" class "gtkmm__CustomObject_TimelineRuler" style:highest "timeline_ruler" -class "gtkmm__CustomObject_HeaderContainer" style:highest "header_container" +class "gtkmm__CustomObject_TimelineHeaderContainer" style:highest "timeline_header_container" diff --git a/src/gui/panels/viewer-panel.cpp b/src/gui/panels/viewer-panel.cpp index 4ebd3d0cb..e280694f3 100644 --- a/src/gui/panels/viewer-panel.cpp +++ b/src/gui/panels/viewer-panel.cpp @@ -31,18 +31,10 @@ namespace panels { ViewerPanel::ViewerPanel() : Panel("viewer", _("Viewer"), "panel_viewer") - { - //----- Set up the Tool Bar -----// - // Add the commands - - - // Configure the toolbar - toolBar.set_toolbar_style(TOOLBAR_ICONS); - - //----- Pack in the Widgets -----// - pack_start(display, PACK_EXPAND_WIDGET); - pack_start(toolBar, PACK_SHRINK); - } +{ + //----- Pack in the Widgets -----// + pack_start(display, PACK_EXPAND_WIDGET); +} } // namespace panels } // namespace gui diff --git a/src/gui/panels/viewer-panel.hpp b/src/gui/panels/viewer-panel.hpp index 0185e6d4a..a53e30561 100644 --- a/src/gui/panels/viewer-panel.hpp +++ b/src/gui/panels/viewer-panel.hpp @@ -34,16 +34,24 @@ namespace gui { namespace panels { - class ViewerPanel : public Panel - { - public: - ViewerPanel(); +/** + * A panel to display the video output. + **/ +class ViewerPanel : public Panel +{ +public: + /** + * Contructor. + **/ + ViewerPanel(); - protected: +protected: - gui::widgets::VideoDisplayWidget display; - Gtk::Toolbar toolBar; - }; + /** + * The video display widget, which will display the video. + **/ + gui::widgets::VideoDisplayWidget display; +}; } // namespace panels } // namespace gui diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index 20014e675..40d0ad09f 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -53,7 +53,7 @@ TimelineWidget::TimelineWidget() : { body = new TimelineBody(this); ENSURE(body != NULL); - headerContainer = new HeaderContainer(this); + headerContainer = new TimelineHeaderContainer(this); ENSURE(headerContainer != NULL); ruler = new TimelineRuler(this); ENSURE(ruler != NULL); @@ -69,6 +69,9 @@ TimelineWidget::TimelineWidget() : set_selection(2000000, 4000000); tracks.push_back(&video1); + video1.add_child_track(&video1a); + video1.add_child_track(&video1b); + video1b.add_child_track(&video1ba); tracks.push_back(&video2); update_tracks(); @@ -332,7 +335,7 @@ TimelineWidget::update_tracks() BOOST_FOREACH( Track* track, tracks ) { ASSERT(track != NULL); - totalHeight += track->get_height() + TrackPadding; + totalHeight += measure_branch_height(track); } } @@ -378,6 +381,20 @@ TimelineWidget::update_scroll() } +int +TimelineWidget::measure_branch_height(Track* track) +{ + REQUIRE(track != NULL); + + int height = track->get_height(); + + // Recurse through all the children + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + height += measure_branch_height(child); + + return height; +} + int TimelineWidget::get_y_scroll_offset() const { diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index 9a43769ed..b1b3b0600 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -27,7 +27,7 @@ #define TIMELINE_WIDGET_HPP #include "../gtk-lumiera.hpp" -#include "timeline/header-container.hpp" +#include "timeline/timeline-header-container.hpp" #include "timeline/timeline-body.hpp" #include "timeline/timeline-ruler.hpp" #include "timeline/timeline-tool.hpp" @@ -202,6 +202,8 @@ private: void update_scroll(); + static int measure_branch_height(timeline::Track* track); + int get_y_scroll_offset() const; bool on_motion_in_body_notify_event(GdkEventMotion *event); @@ -224,11 +226,14 @@ protected: int totalHeight; timeline::Track video1; + timeline::Track video1a; + timeline::Track video1b; + timeline::Track video1ba; timeline::Track video2; std::vector tracks; // Child Widgets - timeline::HeaderContainer *headerContainer; + timeline::TimelineHeaderContainer *headerContainer; timeline::TimelineBody *body; timeline::TimelineRuler *ruler; @@ -239,8 +244,7 @@ protected: // Signals sigc::signal viewChangedSignal; sigc::signal mouseHoverSignal; - sigc::signal - playbackPeriodDragReleasedSignal; + sigc::signal playbackPeriodDragReleasedSignal; /* ===== Constants ===== */ public: @@ -257,7 +261,7 @@ protected: static const double ZoomIncrement; friend class timeline::TimelineBody; - friend class timeline::HeaderContainer; + friend class timeline::TimelineHeaderContainer; friend class timeline::TimelineRuler; friend class timeline::Tool; friend class timeline::ArrowTool; diff --git a/src/gui/widgets/timeline/timeline-body.cpp b/src/gui/widgets/timeline/timeline-body.cpp index 11c3b2b73..72d56fd24 100644 --- a/src/gui/widgets/timeline/timeline-body.cpp +++ b/src/gui/widgets/timeline/timeline-body.cpp @@ -147,11 +147,8 @@ TimelineBody::on_expose_event(GdkEventExpose* event) Cairo::RefPtr cr = window->create_cairo_context(); REQUIRE(cr); - - // Translate the view by the scroll distance - cr->translate(0, -get_vertical_offset()); - - // Draw the view + + //----- Draw the view -----// draw_tracks(cr); draw_selection(cr); draw_playback_point(cr); @@ -272,32 +269,52 @@ TimelineBody::draw_tracks(Cairo::RefPtr cr) Cairo::Matrix view_matrix; cr->get_matrix(view_matrix); + // Translate the view by the scroll distance + cr->translate(0, -get_vertical_offset()); + // Interate drawing each track BOOST_FOREACH( Track* track, timelineWidget->tracks ) { ASSERT(track != NULL); - - const int height = track->get_height(); - ASSERT(height >= 0); - - // Draw the track background - cr->rectangle(0, 0, allocation.get_width(), height); - gdk_cairo_set_source_color(cr->cobj(), &backgroundColour); - cr->fill(); - - // Render the track - cr->save(); - track->draw_track(cr); - cr->restore(); - - // Shift for the next track - cr->translate(0, height + TimelineWidget::TrackPadding); + draw_track_recursive(cr, track, allocation.get_width()); } // Restore the view matrix cr->set_matrix(view_matrix); } +void +TimelineBody::draw_track_recursive(Cairo::RefPtr cr, + const Track *track, const int view_width) const +{ + REQUIRE(cr); + REQUIRE(track != NULL); + + const int height = track->get_height(); + ASSERT(height >= 0); + + // Draw the track background + cr->rectangle(0, 0, view_width, + height - TimelineWidget::TrackPadding); + GdkColor colour = backgroundColour; // Needed to preserve const qualifier + gdk_cairo_set_source_color(cr->cobj(), &colour); + cr->fill(); + + // Render the track + cr->save(); + track->draw_track(cr); + cr->restore(); + + // Shift for the next track + cr->translate(0, height); + + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + { + ASSERT(track != NULL); + draw_track_recursive(cr, child, view_width); + } +} + void TimelineBody::draw_selection(Cairo::RefPtr cr) { diff --git a/src/gui/widgets/timeline/timeline-body.hpp b/src/gui/widgets/timeline/timeline-body.hpp index 894cb9f09..9ce48f5e1 100644 --- a/src/gui/widgets/timeline/timeline-body.hpp +++ b/src/gui/widgets/timeline/timeline-body.hpp @@ -36,6 +36,8 @@ class TimelineWidget; namespace timeline { +class Track; + /** * Implementation of the timeline body subwidget. This widget is * displayed in the centre of the timeline widget, and displays the @@ -111,6 +113,10 @@ private: */ void draw_tracks(Cairo::RefPtr cr); + void draw_track_recursive(Cairo::RefPtr cr, + const gui::widgets::timeline::Track *track, + const int view_width) const; + /** * Draws the selected timeline period. * @param cr The cairo context to draw into. diff --git a/src/gui/widgets/timeline/header-container.cpp b/src/gui/widgets/timeline/timeline-header-container.cpp similarity index 60% rename from src/gui/widgets/timeline/header-container.cpp rename to src/gui/widgets/timeline/timeline-header-container.cpp index 27812ccd1..3c16d912e 100644 --- a/src/gui/widgets/timeline/header-container.cpp +++ b/src/gui/widgets/timeline/timeline-header-container.cpp @@ -1,5 +1,6 @@ /* - header-container.cpp - Implementation of the header container widget + timeline-header-container.cpp - Implementation of the timeline + header container widget Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -22,7 +23,7 @@ #include -#include "header-container.hpp" +#include "timeline-header-container.hpp" #include "track.hpp" #include "../timeline-widget.hpp" @@ -33,9 +34,9 @@ namespace gui { namespace widgets { namespace timeline { -HeaderContainer::HeaderContainer(gui::widgets::TimelineWidget +TimelineHeaderContainer::TimelineHeaderContainer(gui::widgets::TimelineWidget *timeline_widget) : - Glib::ObjectBase("HeaderContainer"), + Glib::ObjectBase("TimelineHeaderContainer"), timelineWidget(timeline_widget), margin(-1) { @@ -49,41 +50,24 @@ HeaderContainer::HeaderContainer(gui::widgets::TimelineWidget // Connect to the timeline widget's vertical scroll event, // so that we get notified when the view shifts timelineWidget->verticalAdjustment.signal_value_changed().connect( - sigc::mem_fun(this, &HeaderContainer::on_scroll) ); + sigc::mem_fun(this, &TimelineHeaderContainer::on_scroll) ); // Install style properties register_styles(); } - + void -HeaderContainer::update_headers() +TimelineHeaderContainer::update_headers() { REQUIRE(timelineWidget != NULL); - - // Remove any pre-exisitng headers - BOOST_FOREACH( RootHeader header, rootHeaders ) - { - header.widget->unparent(); - } - rootHeaders.clear(); - // Add fresh headers BOOST_FOREACH( Track* track, timelineWidget->tracks ) - { - ASSERT(track != NULL); - - const RootHeader header = { &track->get_header_widget(), track }; - header.widget->set_parent(*this); - - rootHeaders.push_back(header); - } - - layout_headers(); + set_parent_recursive(track); } void -HeaderContainer::on_realize() +TimelineHeaderContainer::on_realize() { set_flags(Gtk::NO_WINDOW); @@ -119,7 +103,7 @@ HeaderContainer::on_realize() } void -HeaderContainer::on_unrealize() +TimelineHeaderContainer::on_unrealize() { // Unreference any window we may have created gdkWindow.clear(); @@ -129,26 +113,22 @@ HeaderContainer::on_unrealize() } void -HeaderContainer::on_size_request (Requisition* requisition) +TimelineHeaderContainer::on_size_request (Requisition* requisition) { - // Initialize the output parameter: - *requisition = Gtk::Requisition(); - // We don't care about the size of all the child widgets, but if we // don't send the size request down the tree, some widgets fail to - // calculate their text layout correctly. - BOOST_FOREACH( RootHeader header, rootHeaders ) - { - if(header.widget != NULL && header.widget->is_visible()) - header.widget->size_request(); - } - + // calculate their text layout correctly. + BOOST_FOREACH( Track* track, timelineWidget->tracks ) + size_request_recursive(track); + + // Initialize the output parameter: + *requisition = Gtk::Requisition(); requisition->width = TimelineWidget::HeaderWidth; requisition->height = 0; } void -HeaderContainer::on_size_allocate (Allocation& allocation) +TimelineHeaderContainer::on_size_allocate (Allocation& allocation) { // Use the offered allocation for this container: set_allocation(allocation); @@ -162,18 +142,20 @@ HeaderContainer::on_size_allocate (Allocation& allocation) } void -HeaderContainer::forall_vfunc(gboolean /* include_internals */, +TimelineHeaderContainer::forall_vfunc(gboolean /* include_internals */, GtkCallback callback, gpointer callback_data) { - BOOST_FOREACH( RootHeader &header, rootHeaders ) + REQUIRE(callback != NULL); + + BOOST_FOREACH( Track* track, timelineWidget->tracks ) { - ASSERT(header.widget); - callback(header.widget->gobj(), callback_data); + ASSERT(track != NULL); + forall_vfunc_recursive(track, callback, callback_data); } } bool -HeaderContainer::on_expose_event(GdkEventExpose *event) +TimelineHeaderContainer::on_expose_event(GdkEventExpose *event) { if(gdkWindow) { @@ -186,12 +168,12 @@ HeaderContainer::on_expose_event(GdkEventExpose *event) read_styles(); // Paint a border underneath all the root headers - BOOST_FOREACH( RootHeader &header, rootHeaders ) + BOOST_FOREACH( Track* track, timelineWidget->tracks ) { - ASSERT(header.widget); - ASSERT(header.track != NULL); + ASSERT(track != NULL); - const int height = header.track->get_height(); + const int height = TimelineWidget::measure_branch_height( + track); ASSERT(height >= 0); style->paint_box( @@ -211,7 +193,7 @@ HeaderContainer::on_expose_event(GdkEventExpose *event) } void -HeaderContainer::on_scroll() +TimelineHeaderContainer::on_scroll() { // If the scroll has changed, we will have to shift all the // header widgets @@ -219,7 +201,7 @@ HeaderContainer::on_scroll() } void -HeaderContainer::layout_headers() +TimelineHeaderContainer::layout_headers() { ASSERT(timelineWidget != NULL); @@ -236,24 +218,11 @@ HeaderContainer::layout_headers() const int header_width = container_allocation.get_width () - margin * 2; - BOOST_FOREACH( RootHeader &header, rootHeaders ) + BOOST_FOREACH( Track* track, timelineWidget->tracks ) { - ASSERT(header.widget); - ASSERT(header.track != NULL); - - const int height = header.track->get_height(); - ASSERT(height >= 0); - - Gtk::Allocation header_allocation; - header_allocation.set_x (margin); - header_allocation.set_y (offset - y_scroll_offset + margin); - header_allocation.set_width (header_width); - header_allocation.set_height (height - margin * 2); - - if(header.widget->is_visible()) - header.widget->size_allocate (header_allocation); - - offset += height + TimelineWidget::TrackPadding; + ASSERT(track != NULL); + layout_headers_recursive(track, y_scroll_offset, offset, + header_width, 0); } // Repaint the background of our parenting @@ -261,7 +230,72 @@ HeaderContainer::layout_headers() } void -HeaderContainer::register_styles() const +TimelineHeaderContainer::layout_headers_recursive(Track *track, + const int y_scroll_offset, int &offset, + const int header_width, int depth) const +{ + const int height = track->get_height(); + ASSERT(height >= 0); + + const int indent = depth * 10; + + Allocation header_allocation; + header_allocation.set_x (margin + indent); + header_allocation.set_y (offset - y_scroll_offset + margin); + header_allocation.set_width (header_width - indent); + header_allocation.set_height (height - margin * 2); + + Widget &widget = track->get_header_widget(); + if(widget.is_visible()) + widget.size_allocate (header_allocation); + + offset += height + TimelineWidget::TrackPadding; + + // Recurse through all the children + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + layout_headers_recursive(child, y_scroll_offset, offset, + header_width, depth + 1); +} + +void +TimelineHeaderContainer::set_parent_recursive(Track *track) +{ + REQUIRE(track != NULL); + track->get_header_widget().set_parent(*this); + + // Recurse through all the children + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + set_parent_recursive(child); +} + +void +TimelineHeaderContainer::size_request_recursive(Track *track) +{ + REQUIRE(track != NULL); + if(track->get_header_widget().is_visible()) + track->get_header_widget().size_request(); + + // Recurse through all the children + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + size_request_recursive(child); +} + +void +TimelineHeaderContainer::forall_vfunc_recursive(Track* track, + GtkCallback callback, gpointer callback_data) +{ + REQUIRE(track != NULL); + REQUIRE(callback != NULL); + + callback(track->get_header_widget().gobj(), callback_data); + + // Recurse through all the children + BOOST_FOREACH( Track* child, track->get_child_tracks() ) + forall_vfunc_recursive(child, callback, callback_data); +} + +void +TimelineHeaderContainer::register_styles() const { GtkWidgetClass *klass = GTK_WIDGET_CLASS(G_OBJECT_GET_CLASS(gobj())); @@ -273,7 +307,7 @@ HeaderContainer::register_styles() const } void -HeaderContainer::read_styles() +TimelineHeaderContainer::read_styles() { if(margin <= 0) get_style_property("heading_margin", margin); diff --git a/src/gui/widgets/timeline/header-container.hpp b/src/gui/widgets/timeline/timeline-header-container.hpp similarity index 81% rename from src/gui/widgets/timeline/header-container.hpp rename to src/gui/widgets/timeline/timeline-header-container.hpp index 84f15116d..d287f2056 100644 --- a/src/gui/widgets/timeline/header-container.hpp +++ b/src/gui/widgets/timeline/timeline-header-container.hpp @@ -1,5 +1,6 @@ /* - header-container.hpp - Declaration of the header container widget + timeline-header-container.cpp - Declaration of the timeline + header container widget Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -19,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/** @file header-container.hpp +/** @file timeline-header-container.hpp ** This file contains the definition of the header container ** widget */ @@ -40,11 +41,11 @@ namespace timeline { class Track; /** - * A helper class for the TimelineWidget. HeaderContainer is - * container widget for all the left-hand-side header widgets + * A helper class for the TimelineWidget. TimelineHeaderContainer + * is container widget for all the left-hand-side header widgets * associated with timeline tracks. */ -class HeaderContainer : public Gtk::Container +class TimelineHeaderContainer : public Gtk::Container { public: /** @@ -52,7 +53,7 @@ public: * * @param[in] timeline_widget A pointer to the owner timeline widget */ - HeaderContainer(gui::widgets::TimelineWidget* timeline_widget); + TimelineHeaderContainer(gui::widgets::TimelineWidget* timeline_widget); /** * Attaches the header all the header widgets of root @@ -118,6 +119,21 @@ private: */ void layout_headers(); + void layout_headers_recursive(Track *track, + const int y_scroll_offset, int &offset, + const int header_width, int depth) const; + + /** + * Recursively sets all the track header widgets to be child widgets + * of this widget. + **/ + void set_parent_recursive(Track *track); + + static void size_request_recursive(Track *track); + + static void forall_vfunc_recursive(Track* track, + GtkCallback callback, gpointer callback_data); + /** * Registers all the styles that this class will respond to. */ @@ -142,24 +158,6 @@ private: * widgets are scrolled. */ Glib::RefPtr gdkWindow; - - //----- Header List -----// - - /** - * A structure to represent a header widget and it's - * associated track - */ - struct RootHeader - { - Gtk::Widget *widget; - Track *track; - }; - - /** - * Contains a list of the root currently present on - * the timeline view - */ - std::vector< RootHeader > rootHeaders; //----- Style Values -----// diff --git a/src/gui/widgets/timeline/track.cpp b/src/gui/widgets/timeline/track.cpp index f8acb35de..6d619b231 100644 --- a/src/gui/widgets/timeline/track.cpp +++ b/src/gui/widgets/timeline/track.cpp @@ -29,12 +29,31 @@ namespace widgets { namespace timeline { Track::Track() : - label1("test1"), label2("test2"), label3("test3"), label4("test4") + enableButton(Gtk::StockID("track_enabled")), + lockButton(Gtk::StockID("track_unlocked")) { - headerWidget.pack_start(label1, PACK_EXPAND_WIDGET); - headerWidget.pack_start(label2, PACK_EXPAND_WIDGET); - headerWidget.pack_start(label3, PACK_EXPAND_WIDGET); - headerWidget.pack_start(label4, PACK_EXPAND_WIDGET); + buttonBar.append(enableButton); + buttonBar.append(lockButton); + + buttonBar.set_toolbar_style(TOOLBAR_ICONS); +// buttonBar.set_icon_size(ICON_SIZE_MENU); /////TODO: commented out because it makes compile fail on Etch based system + + + headerWidget.pack_start(titleBox, PACK_SHRINK); + headerWidget.pack_start(buttonBar, PACK_SHRINK); +} + +void +Track::add_child_track(timeline::Track* child) +{ + REQUIRE(child != NULL); + children.push_back(child); +} + +const std::vector& +Track::get_child_tracks() const +{ + return children; } Gtk::Widget& @@ -43,20 +62,20 @@ Track::get_header_widget() return headerWidget; } +int +Track::get_height() const +{ + return 100; +} + Glib::ustring Track::get_title() { return "Hello"; } -int -Track::get_height() -{ - return 100; -} - void -Track::draw_track(Cairo::RefPtr cairo) +Track::draw_track(Cairo::RefPtr cairo) const { } diff --git a/src/gui/widgets/timeline/track.hpp b/src/gui/widgets/timeline/track.hpp index a1b6d48e8..9f7277dd1 100644 --- a/src/gui/widgets/timeline/track.hpp +++ b/src/gui/widgets/timeline/track.hpp @@ -32,25 +32,42 @@ namespace gui { namespace widgets { namespace timeline { +class Clip; + class Track { public: Track(); + void add_child_track(timeline::Track* child); + + const std::vector& get_child_tracks() const; + + Gtk::Widget& get_header_widget(); + + int get_height() const; + Glib::ustring get_title(); - Gtk::Widget& get_header_widget(); + void draw_track(Cairo::RefPtr cairo) const; + +private: + +private: - int get_height(); + //----- Data -----// + std::vector children; + std::vector clips; - void draw_track(Cairo::RefPtr cairo); - -protected: + //----- Header Widgets ------// + Gtk::VBox headerWidget; - Gtk::Label label1; - Gtk::Label label2; - Gtk::CheckButton label3; - Gtk::Button label4; + + Gtk::ToolButton enableButton; + Gtk::ToolButton lockButton; + + Gtk::Entry titleBox; + Gtk::Toolbar buttonBar; }; diff --git a/src/gui/window-manager.cpp b/src/gui/window-manager.cpp index 4a89158d7..c7cbb3c32 100644 --- a/src/gui/window-manager.cpp +++ b/src/gui/window-manager.cpp @@ -92,7 +92,12 @@ WindowManager::register_stock_items() add_stock_icon_set(factory, "panel-viewer", "panel_viewer", _("_Viewer")); add_stock_icon_set(factory, "tool-arrow", "tool_arrow", _("_Arrow")); - add_stock_icon_set(factory, "tool-i-beam", "tool_i_beam", _("_I-Beam")); + add_stock_icon_set(factory, "tool-i-beam", "tool_i_beam", _("_I-Beam")); + + add_stock_icon_set(factory, "track-disabled", "track_disabled", _("Track Disabled")); + add_stock_icon_set(factory, "track-enabled", "track_enabled", _("Track Enabled")); + add_stock_icon_set(factory, "track-locked", "track_locked", _("Track Locked")); + add_stock_icon_set(factory, "track-unlocked", "track_unlocked", _("Track Unlocked")); factory->add_default(); //Add factory to list of factories. } diff --git a/src/gui/window-manager.hpp b/src/gui/window-manager.hpp index c25a763ef..49c69ea50 100644 --- a/src/gui/window-manager.hpp +++ b/src/gui/window-manager.hpp @@ -35,7 +35,7 @@ namespace gui { /** * The centralised manager of all lumiera-gui's windows. **/ -class WindowManager +class WindowManager : private boost::noncopyable { public: /** diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 2681ddf24..2ba729d73 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -15,10 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -liblumi_a_srcdir = $(top_srcdir)/src/lib -noinst_LIBRARIES += liblumi.a +liblumiera_a_srcdir = $(top_srcdir)/src/lib +noinst_LIBRARIES += liblumiera.a -liblumi_a_CFLAGS = $(CFLAGS) -std=gnu99 -Wall -Werror +liblumiera_a_CFLAGS = $(CFLAGS) -std=gnu99 -Wall -Werror liblumiera_a_SOURCES = \ $(liblumiera_a_srcdir)/error.c \ @@ -31,7 +31,7 @@ liblumiera_a_SOURCES = \ $(liblumiera_a_srcdir)/psplay.c \ $(liblumiera_a_srcdir)/mrucache.c \ $(liblumiera_a_srcdir)/time.c \ - $(liblumiera_a_srcdir)/allocationcluster.cpp \ + $(liblumiera_a_srcdir)/allocationcluster.cpp\ $(liblumiera_a_srcdir)/external/libgavl.cpp \ $(liblumiera_a_srcdir)/appconfig.cpp @@ -48,9 +48,8 @@ noinst_HEADERS += \ $(liblumiera_a_srcdir)/time.h \ $(liblumiera_a_srcdir)/ppmpl.h \ $(liblumiera_a_srcdir)/appconfig.hpp \ - $(liblumiera_a_srcdir)/allocationcluster.hpp \ - $(liblumiera_a_srcdir)/scopedholdertransfer.hpp \ + $(liblumiera_a_srcdir)/allocationcluster.hpp \ + $(liblumiera_a_srcdir)/scopedholdertransfer.hpp \ $(liblumiera_a_srcdir)/scopedholder.hpp \ $(liblumiera_a_srcdir)/external/libgavl.hpp \ $(liblumiera_a_srcdir)/lifecycleregistry.hpp - diff --git a/src/lib/error.c b/src/lib/error.c index 1d3fb50c3..6007dcbdb 100644 --- a/src/lib/error.c +++ b/src/lib/error.c @@ -60,7 +60,7 @@ lumiera_error_set (lumiera_err nerr) lumiera_err -lumiera_error () +lumiera_error (void) { pthread_once (&lumiera_error_initialized, lumiera_error_tls_init); @@ -69,3 +69,12 @@ lumiera_error () pthread_setspecific (lumiera_error_tls, NULL); return err; } + + +lumiera_err +lumiera_error_peek (void) +{ + pthread_once (&lumiera_error_initialized, lumiera_error_tls_init); + + return pthread_getspecific (lumiera_error_tls); +} diff --git a/src/lib/error.h b/src/lib/error.h index 5c4a8c145..5ad8a3142 100644 --- a/src/lib/error.h +++ b/src/lib/error.h @@ -88,7 +88,19 @@ lumiera_error_set (lumiera_err err); * @return pointer to any pending error of this thread, NULL if no error is pending */ lumiera_err -lumiera_error (); +lumiera_error (void); + + +/** + * Check current error state without clearing it + * Please avoid this function and use lumiera_error() if possible. Errors must be cleared else certain + * parts of the application refuse to cooperate with you. This shall only be used to decide if one + * wants to barf out of a loop or subroutine to deliver the error to a higher level. + * @return pointer to any pending error of this thread, NULL if no error is pending + */ +lumiera_err +lumiera_error_peek (void); + /* predefined errors diff --git a/src/lib/luid.h b/src/lib/luid.h index 553d22765..0986e5580 100644 --- a/src/lib/luid.h +++ b/src/lib/luid.h @@ -48,6 +48,27 @@ typedef lumiera_uid* LumieraUid; #define LUMIERA_UID_INITIALIZER(l) l #endif +#define LUMIERA_UID_FMT \ + "\\%.3hho\\%.3hho\\%.3hho\\%.3hho" \ + "\\%.3hho\\%.3hho\\%.3hho\\%.3hho" \ + "\\%.3hho\\%.3hho\\%.3hho\\%.3hho" \ + "\\%.3hho\\%.3hho\\%.3hho\\%.3hho" + +#define LUMIERA_UID_CHAR(l,n) ((unsigned char*)l)[n] + + +#define LUMIERA_UID_ELEMENTS(l) \ + LUMIERA_UID_CHAR(l,0), LUMIERA_UID_CHAR(l,1), LUMIERA_UID_CHAR(l,2), LUMIERA_UID_CHAR(l,3), \ + LUMIERA_UID_CHAR(l,4), LUMIERA_UID_CHAR(l,5), LUMIERA_UID_CHAR(l,6), LUMIERA_UID_CHAR(l,7), \ + LUMIERA_UID_CHAR(l,8), LUMIERA_UID_CHAR(l,9), LUMIERA_UID_CHAR(l,10), LUMIERA_UID_CHAR(l,11), \ + LUMIERA_UID_CHAR(l,12), LUMIERA_UID_CHAR(l,13), LUMIERA_UID_CHAR(l,14), LUMIERA_UID_CHAR(l,15) + +/** + * LUIDGEN will be replaced by the 'luidgen' tool with a random uuid + */ +#define LUIDGEN PLEASE_RUN_THE_LUIDGEN_TOOL_ON_THIS_FILE + + /** * Retrieve a generic pointer stored in a luid */ diff --git a/src/lib/psplay.c b/src/lib/psplay.c index 7647fd905..1d2d4dd27 100644 --- a/src/lib/psplay.c +++ b/src/lib/psplay.c @@ -66,7 +66,7 @@ static inline uint32_t psplay_fast_prng () PSplay -psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn delete) +psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn del) { NOBUG_INIT_FLAG (psplay); TRACE (psplay); @@ -79,7 +79,7 @@ psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn self->found_parent = &self->tree; self->cmp = cmp; self->key = key; - self->delete = delete; + self->del = del; self->elem_cnt = 0; self->log2 = 0; } @@ -88,12 +88,12 @@ psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn PSplay -psplay_new (psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn delete) +psplay_new (psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn del) { PSplay self = malloc (sizeof *self); if (self) { - psplay_init (self , cmp, key, delete); + psplay_init (self , cmp, key, del); } return self; } @@ -107,8 +107,8 @@ psplay_destroy (PSplay self) if (self) while (self->tree) { PSplaynode n = psplay_remove (self, self->tree); - if (self->delete) - self->delete (n); + if (self->del) + self->del (n); } return self; } @@ -400,7 +400,7 @@ void psplay_delete_node (PSplay self, PSplaynode node) { if (node) - self->delete (psplay_remove (self, node)); + self->del (psplay_remove (self, node)); } @@ -428,8 +428,8 @@ psplay_handle (PSplay self, PSplaynode node, psplay_delete_fn res) else if (res == PSPLAY_REMOVE) { psplay_remove (self, node); - if (self->delete) - self->delete (node); + if (self->del) + self->del (node); } else { diff --git a/src/lib/psplay.h b/src/lib/psplay.h index b3c016c52..70c450fe3 100644 --- a/src/lib/psplay.h +++ b/src/lib/psplay.h @@ -94,7 +94,7 @@ struct psplay_struct PSplaynode* found_parent; /* maybe direct parent of last found node, used for fast remove */ psplay_cmp_fn cmp; psplay_key_fn key; - psplay_delete_fn delete; + psplay_delete_fn del; size_t elem_cnt; unsigned log2; /* roughly log2 of the elem_cnt*/ @@ -122,7 +122,7 @@ psplay_nelements (PSplay self) * @return self */ PSplay -psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn delete); +psplay_init (PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn del); /** @@ -142,7 +142,7 @@ psplay_destroy (PSplay self); * @return allcoated splay tree or NULL on error */ PSplay -psplay_new (psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn delete); +psplay_new (psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn del); /** diff --git a/src/tool/Makefile.am b/src/tool/Makefile.am index 69c4a7f25..a48bf0cea 100644 --- a/src/tool/Makefile.am +++ b/src/tool/Makefile.am @@ -24,5 +24,4 @@ luidgen_CPPFLAGS = -I$(top_srcdir)/src/ luidgen_SOURCES = \ $(lumitool_srcdir)/luidgen.c -luidgen_LDADD = liblumi.a - +luidgen_LDADD = liblumiera.a $(NOBUGMT_LUMIERA_LIBS) diff --git a/src/tool/luidgen.c b/src/tool/luidgen.c index 41081ca97..730395b6c 100644 --- a/src/tool/luidgen.c +++ b/src/tool/luidgen.c @@ -19,25 +19,98 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "lib/safeclib.h" #include "lib/luid.h" +#include +#include +#include #include +#include +#include /** * @file * Generate amd print a Lumiera uid as octal escaped string + * or process a file replaceing 'LUIDGEN' with a octal escaped string */ + int main (int argc, char** argv) { + NOBUG_INIT; lumiera_uid luid; - lumiera_uid_gen (&luid); - printf ("\""); - for (int i = 0; i < 16; ++i) - printf ("\\%.3hho", *(((char*)&luid)+i)); - printf ("\"\n"); + if (argc == 1) + { + lumiera_uid_gen (&luid); + printf ("\""); + for (int i = 0; i < 16; ++i) + printf ("\\%.3hho", *(((char*)&luid)+i)); + printf ("\"\n"); + } + else + { + for (int i = 1; i < argc; ++i) + { + FILE* in = fopen (argv[i], "r"); + if (!in) + { + fprintf (stderr, "Failed to open file %s for reading: %s\n", argv[i], strerror (errno)); + continue; + } + + char* outname = lumiera_tmpbuf_snprintf (SIZE_MAX, "%s.luidgen", argv[i]); + FILE* out = fopen (outname, "wx"); + if (!out) + { + fprintf (stderr, "Failed to open file %s for writing: %s\n", outname, strerror (errno)); + fclose (in); + continue; + } + + char buf[4096]; + char luidbuf[67]; + + printf ("Luidgen %s ", argv[i]); fflush (stdout); + + while (fgets (buf, 4096, in)) + { + char* pos; + while ((pos = strstr(buf, "LUIDGEN"))) + { + memmove (pos+66, pos+7, strlen (pos+7)+1); + lumiera_uid_gen (&luid); + sprintf (luidbuf, "\""LUMIERA_UID_FMT"\"", LUMIERA_UID_ELEMENTS(luid)); + memcpy (pos, luidbuf, 66); + putchar ('.'); fflush (stdout); + } + fputs (buf, out); + } + + fclose (out); + fclose (in); + + char* backup = lumiera_tmpbuf_snprintf (SIZE_MAX, "%s~", argv[i]); + unlink (backup); + + if (!!rename (argv[i], backup)) + { + fprintf (stderr, "Failed to create backupfile %s: %s\n", backup, strerror (errno)); + continue; + } + + if (!!rename (outname, argv[i])) + { + fprintf (stderr, "Renaming %s to %s failed: %s\n", outname, argv[i], strerror (errno)); + rename (backup, argv[i]); + continue; + } + + printf (" done\n"); + } + } return 0; } diff --git a/tests/20plugin.tests b/tests/20plugin.tests deleted file mode 100644 index d1d9fba2f..000000000 --- a/tests/20plugin.tests +++ /dev/null @@ -1,24 +0,0 @@ -TESTING "test plugin example code" ./test-plugin - -PLANNED "C plugin example" C < #include "hello_interface.h" +#include "backend/interfacedescriptor.h" int myopen(void) { @@ -34,12 +35,93 @@ void bye(const char* m) printf("Bye %s\n", m); } -LUMIERA_INTERFACE_IMPLEMENT(hello, 1, german, myopen, myclose, - hallo, - tschuess + +LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0, + lumieraorg_exampleplugin_descriptor, + NULL, NULL, NULL, + LUMIERA_INTERFACE_INLINE (name, "\003\307\005\305\201\304\175\377\120\105\332\016\136\354\251\022", + const char*, (LumieraInterface iface), + {return "LumieraTest";} + ), + LUMIERA_INTERFACE_INLINE (brief, "\303\047\265\010\242\210\365\340\024\030\350\310\067\171\170\260", + const char*, (LumieraInterface iface), + {return "Lumiera Test suite examples";} + ), + LUMIERA_INTERFACE_INLINE (homepage, "\363\125\352\312\056\255\274\322\351\245\051\350\120\024\115\263", + const char*, (LumieraInterface iface), + {return "http://www.lumiera.org/develompent.html";} + ), + LUMIERA_INTERFACE_INLINE (version, "\114\043\133\175\354\011\232\002\117\240\107\141\234\157\217\176", + const char*, (LumieraInterface iface), + {return "No Version";} + ), + LUMIERA_INTERFACE_INLINE (author, "\313\300\055\156\126\320\144\247\140\023\261\002\270\367\017\267", + const char*, (LumieraInterface iface), + {return "Christian Thaeter";} + ), + LUMIERA_INTERFACE_INLINE (email, "\163\051\312\276\137\317\267\305\237\274\133\012\276\006\255\160", + const char*, (LumieraInterface iface), + {return "ct@pipapo.org";} + ), + LUMIERA_INTERFACE_INLINE (copyright, "\160\246\161\204\123\262\375\351\157\276\333\073\355\036\062\341", + const char*, (LumieraInterface iface), + { + return + "Copyright (C) Lumiera.org\n" + " 2008 Christian Thaeter "; + } + ), + LUMIERA_INTERFACE_INLINE (license, "\007\311\044\214\064\223\201\326\331\111\233\356\055\264\211\201", + const char*, (LumieraInterface iface), + { + return + "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"; + } + ), + + LUMIERA_INTERFACE_INLINE (state, "\331\353\126\162\067\376\340\242\232\175\167\105\122\177\306\354", + int, (LumieraInterface iface), + {return LUMIERA_INTERFACE_EXPERIMENTAL;} + ), + + LUMIERA_INTERFACE_INLINE (versioncmp, "\363\145\363\224\325\104\177\057\344\023\367\111\376\221\152\135", + int, (const char* a, const char* b), + {return 0;} + ) ); -LUMIERA_INTERFACE_IMPLEMENT(hello, 1, english, myopen, myclose, - hello, - bye - ); + +LUMIERA_EXPORT( + LUMIERA_INTERFACE_DEFINE (lumieraorg_testhello, 0, + lumieraorg_hello_german, + LUMIERA_INTERFACE_REF (lumieraorg_interfacedescriptor, 0, lumieraorg_exampleplugin_descriptor), + NULL, + NULL, + LUMIERA_INTERFACE_MAP (hello, "\167\012\306\023\031\151\006\362\026\003\125\017\170\022\100\333", + hallo), + LUMIERA_INTERFACE_MAP (goodbye, "\324\267\214\166\340\213\155\053\157\125\064\264\167\235\020\223", + tschuess) + ), + LUMIERA_INTERFACE_DEFINE (lumieraorg_testhello, 0, + lumieraorg_hello_english, + LUMIERA_INTERFACE_REF (lumieraorg_interfacedescriptor, 0, lumieraorg_exampleplugin_descriptor), + NULL, + NULL, + LUMIERA_INTERFACE_MAP (hello, "\326\247\370\247\032\103\223\357\262\007\356\042\051\330\073\116", + hello), + LUMIERA_INTERFACE_MAP (goodbye, "\365\141\371\047\101\230\050\106\071\231\022\235\325\112\354\241", + bye) + ) + ) diff --git a/tests/backend/hello_interface.h b/tests/backend/hello_interface.h index d5cf99ea5..097861c01 100644 --- a/tests/backend/hello_interface.h +++ b/tests/backend/hello_interface.h @@ -1,6 +1,6 @@ -#include "lib/plugin.h" +#include "backend/interface.h" -LUMIERA_INTERFACE(hello, 1, - LUMIERA_INTERFACE_PROTO(void, hello, (void)) - LUMIERA_INTERFACE_PROTO(void, goodbye, (const char*)) - ); +LUMIERA_INTERFACE_DECLARE (lumieraorg_testhello, 0, + LUMIERA_INTERFACE_SLOT (void, hello, (void)), + LUMIERA_INTERFACE_SLOT (void, goodbye, (const char*)), +); diff --git a/tests/backend/test-config.c b/tests/backend/test-config.c index 506801454..120fc57d7 100644 --- a/tests/backend/test-config.c +++ b/tests/backend/test-config.c @@ -330,7 +330,7 @@ TEST ("wordlist_get_nth") if (!lumiera_config_wordlist_set (argv[2], &argv[3])) printf ("failed setting word '%s=%s': %s\n", argv[2], argv[3], lumiera_error ()); - const char* word = lumiera_config_wordlist_get_nth (argv[2], atoi (argv[4])); + const char* word = lumiera_config_wordlist_get_nth (argv[2], atoi (argv[4]), " \t,;"); printf ("'%s'\n", word?word:"NULL"); @@ -349,7 +349,7 @@ TEST ("wordlist_find") if (!lumiera_config_wordlist_set (argv[2], &argv[3])) printf ("failed setting word '%s=%s': %s\n", argv[2], argv[3], lumiera_error ()); - int n = lumiera_config_wordlist_find (argv[2], argv[4]); + int n = lumiera_config_wordlist_find (argv[2], argv[4], " \t,;"); printf ("'%d'\n", n); @@ -370,7 +370,7 @@ TEST ("wordlist_replace") if (!lumiera_config_wordlist_set (argv[2], &argv[3])) printf ("failed setting word '%s=%s': %s\n", argv[2], argv[3], lumiera_error ()); - const char* wordlist = lumiera_config_wordlist_replace (argv[2], argv[4], *argv[5]?argv[5]:NULL, *argv[6]?argv[6]:NULL); + const char* wordlist = lumiera_config_wordlist_replace (argv[2], argv[4], *argv[5]?argv[5]:NULL, *argv[6]?argv[6]:NULL, " \t,;"); if (wordlist) printf ("'%s'\n", wordlist); @@ -393,13 +393,13 @@ TEST ("wordlist_add") if (!lumiera_config_wordlist_set (argv[2], &argv[3])) printf ("failed setting word '%s=%s': %s\n", argv[2], argv[3], lumiera_error ()); - const char* wordlist = lumiera_config_wordlist_add (argv[2], argv[4]); + const char* wordlist = lumiera_config_wordlist_add (argv[2], argv[4], " \t,;"); if (wordlist) printf ("'%s'\n", wordlist); else printf ("%s\n", lumiera_error ()); - wordlist = lumiera_config_wordlist_add (argv[2], argv[5]); + wordlist = lumiera_config_wordlist_add (argv[2], argv[5], " \t,;"); if (wordlist) printf ("'%s'\n", wordlist); else diff --git a/tests/backend/test-interfaces.c b/tests/backend/test-interfaces.c index 09fa25afa..a087da735 100644 --- a/tests/backend/test-interfaces.c +++ b/tests/backend/test-interfaces.c @@ -22,7 +22,10 @@ #include "backend/interface.h" #include "backend/interfaceregistry.h" #include "backend/interfacedescriptor.h" +#include "backend/config.h" + #include "tests/test.h" +#include "tests/backend/hello_interface.h" /* define 2 example interfaces @@ -79,16 +82,28 @@ LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0, testacquire, testrelease, LUMIERA_INTERFACE_INLINE (name, "\073\003\054\127\344\046\324\321\221\262\232\026\376\123\125\243", + const char*, (LumieraInterface iface), + {return "LumieraTest";} + ), + LUMIERA_INTERFACE_INLINE (brief, "\241\337\035\172\323\377\355\036\171\326\323\163\177\242\364\172", const char*, (LumieraInterface iface), {return "Lumiera Test suite examples";} ), + LUMIERA_INTERFACE_INLINE (homepage, "\030\374\031\152\024\167\154\346\303\372\177\353\304\306\275\247", + const char*, (LumieraInterface iface), + {return "http://www.lumiera.org/develompent.html";} + ), LUMIERA_INTERFACE_INLINE (version, "\271\330\345\066\304\217\211\065\157\120\031\365\304\363\364\074", const char*, (LumieraInterface iface), {return "No Version";} ), LUMIERA_INTERFACE_INLINE (author, "\367\160\342\065\147\007\237\371\141\335\371\131\025\030\257\232", const char*, (LumieraInterface iface), - {return "Christian Thaeter ";} + {return "Christian Thaeter";} + ), + LUMIERA_INTERFACE_INLINE (email, "\334\272\125\312\140\347\121\020\155\047\226\352\244\141\107\363", + const char*, (LumieraInterface iface), + {return "ct@pipapo.org";} ), LUMIERA_INTERFACE_INLINE (copyright, "\163\106\344\014\251\125\111\252\236\322\174\120\335\225\333\245", const char*, (LumieraInterface iface), @@ -116,33 +131,21 @@ LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0, "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"; } + ), + + LUMIERA_INTERFACE_INLINE (state, "\364\002\115\170\361\321\301\244\350\322\270\362\010\231\207\334", + int, (LumieraInterface iface), + {return LUMIERA_INTERFACE_EXPERIMENTAL;} + ), + + LUMIERA_INTERFACE_INLINE (versioncmp, "\136\037\234\304\100\247\244\342\324\353\072\060\161\053\077\263", + int, (const char* a, const char* b), + {return 0;} ) ); -LUMIERA_EXPORT (interfaces_defined_here, - LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_one, 0, - lumieraorg_first_test, - LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), - testacquire, - testrelease, - LUMIERA_INTERFACE_MAP (foo1, "\214\310\136\372\003\344\163\377\075\100\070\200\375\221\227\324", - testfunc), - LUMIERA_INTERFACE_MAP (bar1, "\262\253\067\211\157\052\212\140\114\334\231\250\340\075\214\030", - testfunc) - ), - LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_two, 0, - lumieraorg_second_test, - LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), - testacquire, - testrelease, - LUMIERA_INTERFACE_MAP (foo2, "\110\152\002\271\363\052\324\272\373\045\132\270\277\000\271\217", - testfunc), - LUMIERA_INTERFACE_MAP (bar2, "\376\042\027\336\355\113\132\233\350\312\170\077\377\370\356\167", - testfunc) - ) - ); /* @@ -242,7 +245,27 @@ testrelease_four (LumieraInterface self) } -LUMIERA_EXPORT (dependencytests, +LUMIERA_EXPORT ( + LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_one, 0, + lumieraorg_first_test, + LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), + testacquire, + testrelease, + LUMIERA_INTERFACE_MAP (foo1, "\214\310\136\372\003\344\163\377\075\100\070\200\375\221\227\324", + testfunc), + LUMIERA_INTERFACE_MAP (bar1, "\262\253\067\211\157\052\212\140\114\334\231\250\340\075\214\030", + testfunc) + ), + LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_two, 0, + lumieraorg_second_test, + LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), + testacquire, + testrelease, + LUMIERA_INTERFACE_MAP (foo2, "\110\152\002\271\363\052\324\272\373\045\132\270\277\000\271\217", + testfunc), + LUMIERA_INTERFACE_MAP (bar2, "\376\042\027\336\355\113\132\233\350\312\170\077\377\370\356\167", + testfunc) + ), LUMIERA_INTERFACE_DEFINE (lumieraorg_testexample_void, 0, lumieraorg_dependencytest_one, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), @@ -276,7 +299,7 @@ TEST ("basic") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (interfaces_defined_here()); + lumiera_interfaceregistry_bulkregister_interfaces (lumiera_plugin_interfaces(), NULL); /* some ugly lowlevel handling tests */ @@ -292,14 +315,14 @@ TEST ("basic") handle2->foo2 ("this is foo2"); - lumiera_interfaceregistry_bulkremove_interfaces (interfaces_defined_here()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } TEST ("open_close") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (interfaces_defined_here()); + lumiera_interfaceregistry_bulkregister_interfaces (lumiera_plugin_interfaces(), NULL); LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_one, 0) handle = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_one, 0, 0, lumieraorg_first_test); @@ -309,14 +332,14 @@ TEST ("open_close") lumiera_interface_close ((LumieraInterface)handle); - lumiera_interfaceregistry_bulkremove_interfaces (interfaces_defined_here()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } TEST ("dependencies_one") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (dependencytests()); + LUMIERA_INTERFACE_REGISTEREXPORTED; LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_one); @@ -326,7 +349,7 @@ TEST ("dependencies_one") lumiera_interface_close ((LumieraInterface)handle); - lumiera_interfaceregistry_bulkremove_interfaces (dependencytests()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } @@ -334,7 +357,7 @@ TEST ("dependencies_one") TEST ("dependencies_two") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (dependencytests()); + LUMIERA_INTERFACE_REGISTEREXPORTED; LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_two); @@ -344,14 +367,14 @@ TEST ("dependencies_two") lumiera_interface_close ((LumieraInterface)handle); - lumiera_interfaceregistry_bulkremove_interfaces (dependencytests()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } TEST ("dependencies_three") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (dependencytests()); + LUMIERA_INTERFACE_REGISTEREXPORTED; LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_three); @@ -361,7 +384,7 @@ TEST ("dependencies_three") lumiera_interface_close ((LumieraInterface)handle); - lumiera_interfaceregistry_bulkremove_interfaces (dependencytests()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } @@ -369,7 +392,7 @@ TEST ("dependencies_three") TEST ("dependencies_four") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (dependencytests()); + LUMIERA_INTERFACE_REGISTEREXPORTED; LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle = LUMIERA_INTERFACE_OPEN (lumieraorg_testexample_void, 0, 0, lumieraorg_dependencytest_four); @@ -379,7 +402,7 @@ TEST ("dependencies_four") lumiera_interface_close ((LumieraInterface)handle); - lumiera_interfaceregistry_bulkremove_interfaces (dependencytests()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } @@ -388,7 +411,7 @@ TEST ("dependencies_four") TEST ("dependencies_all") { lumiera_interfaceregistry_init (); - lumiera_interfaceregistry_bulkregister_interfaces (dependencytests()); + LUMIERA_INTERFACE_REGISTEREXPORTED; TRACE (tests, "OPEN one"); LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0) handle_one = @@ -425,16 +448,70 @@ TEST ("dependencies_all") lumiera_interface_close ((LumieraInterface)handle_one); - lumiera_interfaceregistry_bulkremove_interfaces (dependencytests()); + LUMIERA_INTERFACE_UNREGISTEREXPORTED; lumiera_interfaceregistry_destroy (); } - -TEST ("highlevel, plugin") +TEST ("plugin_discover") { + lumiera_config_init ("./"); + lumiera_interfaceregistry_init (); + + if (lumiera_plugin_discover (lumiera_plugin_load, lumiera_plugin_register)) + { + LumieraPlugin p = lumiera_plugin_lookup (".libs/examplepluginc.so"); + printf ("found plugin: %s\n", lumiera_plugin_name (p)); + lumiera_plugin_discover (lumiera_plugin_load, lumiera_plugin_register); + } + else + printf ("error: %s\n", lumiera_error ()); + + lumiera_interfaceregistry_destroy (); + lumiera_config_destroy (); +} +TEST ("plugin_unload") +{ + lumiera_config_init ("./"); + lumiera_interfaceregistry_init (); + + lumiera_plugin_discover (lumiera_plugin_load, lumiera_plugin_register); + lumiera_plugin_unload (lumiera_plugin_lookup (".libs/examplepluginc.so")); + LumieraPlugin p = lumiera_plugin_lookup (".libs/examplepluginc.so"); + printf ("plugin unload: %p\n", p); + + lumiera_interfaceregistry_destroy (); + lumiera_config_destroy (); +} + + +TEST ("plugin_examplepluginc") +{ + lumiera_config_init ("./"); + lumiera_interfaceregistry_init (); + lumiera_plugin_discover (lumiera_plugin_load, lumiera_plugin_register); + + TODO ("macro to derrive minminor version from a slot"); + + LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) german = + LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_german); + + LUMIERA_INTERFACE_HANDLE(lumieraorg_testhello, 0) english = + LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_english); + + german->hello (); + german->goodbye ("Welt!"); + + english->hello (); + english->goodbye ("World!"); + + LUMIERA_INTERFACE_CLOSE (german); + LUMIERA_INTERFACE_CLOSE (english); + + lumiera_interfaceregistry_destroy (); + lumiera_config_destroy (); } TESTS_END diff --git a/tests/common/Makefile.am b/tests/common/Makefile.am index 5469b486e..06a7be493 100644 --- a/tests/common/Makefile.am +++ b/tests/common/Makefile.am @@ -20,23 +20,23 @@ testcommon_srcdir = $(top_srcdir)/tests/common check_PROGRAMS += test-common test_common_CPPFLAGS = $(AM_CPPFLAGS) -Wall -I$(testcommon_srcdir) -test_common_LDADD = \ - liblumiprocmobjectbuilder.a \ - liblumiprocmobjectsession.a \ - liblumiprocmobject.a \ +test_common_LDADD = \ + liblumiprocmobjectbuilder.a \ + liblumiprocmobjectsession.a \ + liblumiprocmobject.a \ liblumiprocengine.a \ - liblumiproccontrol.a \ + liblumiproccontrol.a \ liblumiproc.a \ liblumiprocasset.a \ - liblumibackend.a \ + liblumibackend.a \ liblumicommon.a \ liblumiera.a \ $(NOBUGMT_LUMIERA_LIBS) -ldl -lboost_program_options-mt -lboost_regex-mt -test_common_SOURCES = \ - $(testcommon_srcdir)/allocationclustertest.cpp \ +test_common_SOURCES = \ + $(testcommon_srcdir)/allocationclustertest.cpp \ $(testcommon_srcdir)/appconfigtest.cpp \ - $(testcommon_srcdir)/customsharedptrtest.cpp \ + $(testcommon_srcdir)/customsharedptrtest.cpp \ $(testcommon_srcdir)/exceptionerrortest.cpp \ $(testcommon_srcdir)/factoryspecialtest.cpp \ $(testcommon_srcdir)/factorytest.cpp \ @@ -44,27 +44,27 @@ test_common_SOURCES = \ $(testcommon_srcdir)/lifecycletest.cpp \ $(testcommon_srcdir)/mainsuite.cpp \ $(testcommon_srcdir)/meta/typelisttest.cpp \ - $(testcommon_srcdir)/meta/typelistmaniptest.cpp \ + $(testcommon_srcdir)/meta/typelistmaniptest.cpp \ $(testcommon_srcdir)/meta/generatortest.cpp \ $(testcommon_srcdir)/meta/configflagstest.cpp \ $(testcommon_srcdir)/query/queryutilstest.cpp \ - $(testcommon_srcdir)/removefromsettest.cpp \ + $(testcommon_srcdir)/removefromsettest.cpp \ $(testcommon_srcdir)/sanitizedidentifiertest.cpp \ $(testcommon_srcdir)/scopedholdertest.cpp \ $(testcommon_srcdir)/scopedholdertransfertest.cpp \ $(testcommon_srcdir)/singletonsubclasstest.cpp \ - $(testcommon_srcdir)/singletontest.cpp \ + $(testcommon_srcdir)/singletontest.cpp \ $(testcommon_srcdir)/singletontestmocktest.cpp \ $(testcommon_srcdir)/streamtypebasicstest.cpp \ $(testcommon_srcdir)/streamtypelifecycletest.cpp \ $(testcommon_srcdir)/test/cmdlinewrappertest.cpp \ $(testcommon_srcdir)/test/testoptiontest.cpp \ - $(testcommon_srcdir)/vectortransfertest.cpp \ + $(testcommon_srcdir)/vectortransfertest.cpp \ $(testcommon_srcdir)/visitingtoolconcept.cpp \ $(testcommon_srcdir)/visitingtoolextendedtest.cpp \ $(testcommon_srcdir)/visitingtooltest.cpp noinst_HEADERS += \ $(testcommon_srcdir)/query/querydiagnostics.hpp \ - $(testcommon_srcdir)/testdummy.hpp \ + $(testcommon_srcdir)/testdummy.hpp \ $(testcommon_srcdir)/testtargetobj.hpp diff --git a/tests/components/Makefile.am b/tests/components/Makefile.am index 733737580..43503640a 100644 --- a/tests/components/Makefile.am +++ b/tests/components/Makefile.am @@ -27,8 +27,7 @@ test_components_LDADD = \ liblumiprocmobjectsession.a \ liblumiprocasset.a \ liblumiprocmobject.a \ - liblumiprocmobjectcontroller.a \ - liblumi.a \ + liblumiera.a \ liblumicommon.a \ liblumibackend.a \ $(NOBUGMT_LUMIERA_LIBS) -ldl -lboost_program_options-mt -lboost_regex-mt diff --git a/tests/test.sh b/tests/test.sh index e2d5159b7..31c92da5b 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -200,7 +200,8 @@ function RUNTESTS() echo "$t" done | sort | uniq | { while read i; do - echo $i >&2 + echo + echo "### $i" >&2 if test -f $i; then source $i fi diff --git a/uml/lumiera/128005 b/uml/lumiera/128005 index dc0adfe5f..d3970e39a 100644 --- a/uml/lumiera/128005 +++ b/uml/lumiera/128005 @@ -1,6 +1,6 @@ format 40 "design" // design - revision 11 + revision 13 modified_by 5 "hiv" // class settings //class diagram settings @@ -50,7 +50,7 @@ Not a real code package, rather a container for design drafts, specifications, d component 128005 "Builder" stereotype "subsystem" provided_classes - class_ref 132741 // StateProxy + class_ref 132741 // State end required_classes class_ref 128261 // Fixture @@ -61,7 +61,7 @@ Not a real code package, rather a container for design drafts, specifications, d component 128133 "Session" stereotype "subsystem" provided_classes - class_ref 128133 // EDL + class_ref 128133 // Seq class_ref 128261 // Fixture class_ref 128517 // MObject class_ref 134661 // ParamProvider @@ -99,7 +99,7 @@ Not a real code package, rather a container for design drafts, specifications, d component 128901 "Engine" required_classes - class_ref 132741 // StateProxy + class_ref 132741 // State end simplerelation 128133 -_-> @@ -151,6 +151,206 @@ Not a real code package, rather a container for design drafts, specifications, d end end + classview 129413 "Project Entities" + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //class settings + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + + classdiagram 132741 "TimelineSequences" + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + size A4 + end + + class 145669 "Project" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 158981 // + relation 154885 *--- + a role_name "" multiplicity "1..*" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" + classrelation_ref 158981 // + b role_name "" multiplicity "1" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" + classrelation_ref 159109 // + end + + classrelation 159365 // + relation 155141 *--- + a role_name "" multiplicity "1..*" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" + classrelation_ref 159365 // + b role_name "" multiplicity "1" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" + classrelation_ref 159493 // + end + end + + class 145925 "PlayControl" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 160389 // + relation 156037 ---> + stereotype "direct" + a role_name "" multiplicity "*" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160389 // + b multiplicity "" parent class_ref 146437 // PlayheadCursor + end + end + + class 146053 "Monitor" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 160133 // + relation 155781 ---> + stereotype "attach" + a role_name "" multiplicity "0..1" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160133 // + b multiplicity "" parent class_ref 145541 // Timeline + end + + classrelation 160517 // + relation 156165 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160517 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160645 // + end + end + + class 146181 "RenderTask" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 160261 // + relation 155909 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160261 // + b multiplicity "" parent class_ref 145541 // Timeline + end + end + + class 146309 "Sequence" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 159493 // + relation_ref 155141 // + end + + classrelation 159877 // subSequences () + relation 155525 ---> + stereotype "contains" + a role_name "subSequences" multiplicity "*" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 159877 // subSequences () + b multiplicity "1..*" parent class_ref 146309 // Sequence + end + + classrelation 161541 // + relation 156933 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 161541 // + b multiplicity "" parent class_ref 128517 // MObject + end + + classrelation 161669 // trackTree () + relation 157061 ---> + a role_name "trackTree" multiplicity "1" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 161669 // trackTree () + b multiplicity "" parent class_ref 128389 // Track + end + end + + class 146437 "PlayheadCursor" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 160645 // + relation_ref 156165 // + end + + classrelation 160901 // + relation_ref 156293 // + end + end + end + componentview 128133 "interfaces" //component diagram settings package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default diff --git a/uml/lumiera/128133.diagram b/uml/lumiera/128133.diagram index 466c2ad1d..1fbd686ec 100644 --- a/uml/lumiera/128133.diagram +++ b/uml/lumiera/128133.diagram @@ -4,7 +4,7 @@ classcanvas 128005 class_ref 128005 // SessionImpl draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default xyz 18 679 2000 end -classcanvas 128133 class_ref 128133 // EDL +classcanvas 128133 class_ref 128133 // Seq draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default xyz 231 679 2000 end @@ -34,11 +34,11 @@ classcanvas 130949 class_ref 128773 // AbstractMO end classcanvas 131461 class_ref 128901 // Clip draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 279 361 2000 + xyz 279 368 2000 end classcanvas 131717 class_ref 129029 // Effect draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default - xyz 332 361 2000 + xyz 332 368 2000 end classcanvas 131973 class_ref 129157 // Meta draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default @@ -74,10 +74,8 @@ classcanvas 136581 class_ref 129925 // Auto end note 136837 "Placement \"locates\" a Media Object" xyzwh 370 73 3005 207 36 -textcanvas 136965 "the Timeline is a list of placements reduced to absolute coordinates (time, track)" - xyzwh 468 919 2000 121 90 textcanvas 137093 "Fixture is the actual assembly of various Media Objects ready to be performed" - xyzwh -27 863 2000 147 108 + xyzwh 28 862 2000 151 86 classcanvas 137221 class_ref 130053 // Wish draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default xyz 560 532 2000 @@ -114,8 +112,10 @@ classcanvas 146437 class_ref 140421 // Plug draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default xyz 560 597 2000 end -textcanvas 146821 "global processing Pipe Asset" - xyzwh 271 568 2000 149 24 +classcanvas 146949 class_ref 145541 // Timeline + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 114 546 2000 + end relationcanvas 128389 relation_ref 128005 // from ref 128005 z 1999 to ref 128133 role_a_pos 200 676 3000 no_role_b @@ -173,7 +173,7 @@ relationcanvas 135685 relation_ref 130949 // no_multiplicity_a no_multiplicity_b relationcanvas 135941 relation_ref 131077 // from ref 128261 z 1999 stereotype "<>" xyz 371 893 3000 to ref 135813 - role_a_pos 389 857 3000 no_role_b + role_a_pos 365 849 3000 no_role_b multiplicity_a_pos 451 877 3000 no_multiplicity_b relationcanvas 136069 relation_ref 131205 // from ref 135813 z 1999 to point 433 897 @@ -258,21 +258,16 @@ relationcanvas 145285 relation_ref 145029 // from ref 129029 z 1999 stereotype "<>" xyz 389 732 3000 to point 445 749 line 145413 z 1999 to point 369 749 line 145541 z 1999 to ref 129029 - role_a_pos 382 748 3000 no_role_b - multiplicity_a_pos 403 704 3000 no_multiplicity_b + role_a_pos 390 750 3000 no_role_b + multiplicity_a_pos 410 715 3000 no_multiplicity_b relationcanvas 145669 relation_ref 145157 // from ref 128133 z 1999 to ref 129029 - role_a_pos 376 681 3000 no_role_b + role_a_pos 392 672 3000 no_role_b no_multiplicity_a no_multiplicity_b relationcanvas 145925 relation_ref 145413 // from ref 128261 z 1999 to ref 129925 role_a_pos 321 978 3000 no_role_b no_multiplicity_a no_multiplicity_b -relationcanvas 146181 relation_ref 145541 // - from ref 128005 z 1999 to point 311 616 - line 146309 z 1999 stereotype "<>" xyz 103 649 3000 to ref 146053 - role_a_pos 307 594 3000 no_role_b - multiplicity_a_pos 329 627 3000 no_multiplicity_b relationcanvas 146565 relation_ref 145669 // from ref 146437 z 1999 to ref 137221 no_role_a no_role_b @@ -281,4 +276,8 @@ relationcanvas 146693 relation_ref 145797 // from ref 146437 z 1999 to ref 146053 role_a_pos 398 594 3000 no_role_b no_multiplicity_a no_multiplicity_b +relationcanvas 147077 relation_ref 155653 // + from ref 146949 z 1999 stereotype "<>" xyz 191 582 3000 to ref 146053 + role_a_pos 285 575 3000 no_role_b + multiplicity_a_pos 327 613 3000 multiplicity_b_pos 180 584 3000 end diff --git a/uml/lumiera/128261 b/uml/lumiera/128261 index c4b03ca90..0d01de253 100644 --- a/uml/lumiera/128261 +++ b/uml/lumiera/128261 @@ -1,6 +1,6 @@ format 40 "MObject" // ProcessingLayer::MObject - revision 32 + revision 33 modified_by 5 "hiv" // class settings //class diagram settings @@ -62,7 +62,7 @@ ${inlines} comment "Primary Interface for all editing tasks. The session contains defaults, all the assets being edited, and a set of EDL with the individual MObjects to be manipulated and rendered." operation 133509 "currEDL" - public return_type class_ref 128133 // EDL + public return_type class_ref 128133 // Seq nparams 0 cpp_decl " ${comment}${friend}${static}${inline}${virtual}${type} ${name} ${(}${)}${const}${volatile} ${throw}${abstract};" cpp_def "${comment}${inline}${type} @@ -133,7 +133,7 @@ ${inlines} cpp default " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value}; " classrelation_ref 128005 // edls () - b multiplicity "" parent class_ref 128133 // EDL + b multiplicity "" parent class_ref 128133 // Seq end classrelation 128261 // theFixture () @@ -250,7 +250,93 @@ of the current session config and contents. end end - class 128133 "EDL" + class 145541 "Timeline" + abstract visibility public + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 159109 // + relation_ref 154885 // + end + + classrelation 159237 // + relation 155013 ---> + stereotype "own" + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 159237 // + b multiplicity "" parent class_ref 145925 // PlayControl + end + + classrelation 159621 // + relation 155269 ---> + a role_name "" multiplicity "1" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 159621 // + b multiplicity "" parent class_ref 146309 // Sequence + end + + classrelation 160005 // globalBusses () + relation 155653 *--> + stereotype "list" + a role_name "globalBusses" multiplicity "*" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" + classrelation_ref 160005 // globalBusses () + b multiplicity "1" parent class_ref 138117 // Pipe + end + end + + class 145797 "TimelineView" + visibility package + cpp_decl "${comment}${template}class ${name}${inherit} + { +${members} }; +${inlines} +" + java_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 158853 // + relation 154757 -_-|> + a public + cpp default "${type}" + classrelation_ref 158853 // + b multiplicity "" parent class_ref 145541 // Timeline + end + + classrelation 159749 // + relation 155397 ---> + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 159749 // + b multiplicity "" parent class_ref 146309 // Sequence + end + + classrelation 160773 // + relation 156293 ---- + a role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160773 // + b role_name "" multiplicity "" protected + cpp default " ${comment}${static}${mutable}${volatile}${const}${type}* ${name}${value}; +" + classrelation_ref 160901 // + end + end + + class 128133 "Seq" visibility package cpp_decl "${comment}${template}class ${name}${inherit} { @@ -298,16 +384,16 @@ ${inlines} a public cpp default "${type}" classrelation_ref 128517 // - b multiplicity "" parent class_ref 128133 // EDL + b multiplicity "" parent class_ref 128133 // Seq end - classrelation 131717 // theTimeline () + classrelation 131717 // effectiveTimeline () relation 131077 *--> stereotype "list" - a role_name "theTimeline" multiplicity "*" protected + a role_name "effectiveTimeline" multiplicity "*" protected cpp default " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; " - classrelation_ref 131717 // theTimeline () + classrelation_ref 131717 // effectiveTimeline () b multiplicity "" parent class_ref 129797 // ExplicitPlacement end @@ -423,6 +509,14 @@ ${inlines} b multiplicity "" parent class_ref 128389 // Track association_type class_ref 128645 // Placement end + + classrelation 161413 // + relation 156805 -_-|> + a public + cpp default "${type}" + classrelation_ref 161413 // + b multiplicity "" parent class_ref 128517 // MObject + end end class 128517 "MObject" @@ -618,16 +712,6 @@ ${inlines} b multiplicity "" parent class_ref 128773 // AbstractMO end - attribute 128645 "start" - protected type class_ref 134917 // Time - init_value "Time(0)" - cpp_decl " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; -" - java_decl "" - idl_decl "" - comment "startpos in source" - end - classrelation 142469 // source () relation 140677 ---> a role_name "source" multiplicity "1" protected @@ -637,6 +721,14 @@ ${inlines} classrelation_ref 142469 // source () b multiplicity "*" parent class_ref 136709 // Media end + + classrelation 161029 // + relation 156421 -_-|> + a public + cpp default "${type}" + classrelation_ref 161029 // + b multiplicity "" parent class_ref 128517 // MObject + end end class 138885 "SimpleClip" @@ -711,7 +803,7 @@ ${inlines} b multiplicity "" parent class_ref 128773 // AbstractMO end - attribute 128901 "plugID" + attribute 128901 "plugin" protected explicit_type "string" cpp_decl " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; " @@ -719,6 +811,14 @@ ${inlines} idl_decl "" comment "Identifier of the Plugin to be used" end + + classrelation 161157 // + relation 156549 -_-|> + a public + cpp default "${type}" + classrelation_ref 161157 // + b multiplicity "" parent class_ref 128517 // MObject + end end class 129157 "Meta" @@ -911,6 +1011,14 @@ ${inlines} classrelation_ref 130949 // b multiplicity "" parent class_ref 129157 // Meta end + + classrelation 161285 // + relation 156677 -_-|> + a public + cpp default "${type}" + classrelation_ref 161285 // + b multiplicity "" parent class_ref 128517 // MObject + end end class 129925 "Auto" diff --git a/uml/lumiera/129029 b/uml/lumiera/129029 index 5c7a2a6f4..e091ca09b 100644 --- a/uml/lumiera/129029 +++ b/uml/lumiera/129029 @@ -1,6 +1,6 @@ format 40 "Control" // ProcessingLayer::Control - revision 6 + revision 7 modified_by 5 "hiv" // class settings //class diagram settings diff --git a/uml/lumiera/129285 b/uml/lumiera/129285 index 4ff722e2d..4089706c0 100644 --- a/uml/lumiera/129285 +++ b/uml/lumiera/129285 @@ -1,6 +1,6 @@ format 40 "ProcessingLayer" // ProcessingLayer - revision 23 + revision 24 modified_by 5 "hiv" // class settings //class diagram settings @@ -120,8 +120,6 @@ format 40 attributes attribute_ref 128517 // length "5" - attribute_ref 128645 // start - "100" end relations end @@ -132,8 +130,6 @@ format 40 attributes attribute_ref 128517 // length "8820" - attribute_ref 128645 // start - "176400" end relations end @@ -180,15 +176,13 @@ format 40 attributes attribute_ref 128517 // length "5" - attribute_ref 128645 // start - "100" end relations end end classinstance 129541 "" - type class_ref 128133 // EDL + type class_ref 128133 // Seq attributes end relations @@ -220,8 +214,6 @@ format 40 attributes attribute_ref 128517 // length "5" - attribute_ref 128645 // start - "100" end relations end @@ -244,7 +236,7 @@ format 40 attributes attribute_ref 128517 // length "3" - attribute_ref 128901 // plugID + attribute_ref 128901 // plugin "\"Hue\"" end relations @@ -270,7 +262,7 @@ format 40 attributes attribute_ref 128517 // length "3" - attribute_ref 128901 // plugID + attribute_ref 128901 // plugin "\"Hue\"" end relations diff --git a/uml/lumiera/132741.diagram b/uml/lumiera/132741.diagram new file mode 100644 index 000000000..c3a8d44f4 --- /dev/null +++ b/uml/lumiera/132741.diagram @@ -0,0 +1,153 @@ +format 40 + +classcanvas 128005 class_ref 145669 // Project + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 161 115 2000 + end +classcanvas 128133 class_ref 145541 // Timeline + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 177 222 2000 + end +classcanvas 128261 class_ref 145797 // TimelineView + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 163 323 2000 + end +classcanvas 128645 class_ref 145925 // PlayControl + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 315 223 2000 + end +classcanvas 128773 class_ref 146053 // Monitor + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 456 90 2000 + end +classcanvas 128901 class_ref 146181 // RenderTask + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 456 32 2000 + end +classcanvas 129029 class_ref 146309 // Sequence + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 41 323 2000 + end +classcanvas 130437 class_ref 138117 // Pipe + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 317 294 2000 + end +classcanvas 132101 class_ref 146437 // PlayheadCursor + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 452 222 2000 + end +classcanvas 132997 class_ref 128389 // Track + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 99 611 2000 + end +classcanvas 133125 class_ref 128517 // MObject + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 163 485 2000 + end +classcanvas 133253 class_ref 129029 // Effect + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 211 611 2000 + end +classcanvas 133381 class_ref 129669 // Label + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 259 611 2000 + end +classcanvas 133509 class_ref 128901 // Clip + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + xyz 163 611 2000 + end +relationcanvas 128389 relation_ref 154757 // + from ref 128261 z 1999 to ref 128133 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 129157 relation_ref 154885 // + from ref 128005 z 1999 to ref 128133 + no_role_a no_role_b + multiplicity_a_pos 173 197 3000 multiplicity_b_pos 173 166 3000 +relationcanvas 129285 relation_ref 155013 // + from ref 128133 z 1999 stereotype "<>" xyz 251 226 3000 to ref 128645 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 129413 relation_ref 155141 // + geometry VHr + from ref 128005 z 1999 to point 71 134 + line 129541 z 1999 to ref 129029 + no_role_a no_role_b + multiplicity_a_pos 47 298 3000 multiplicity_b_pos 144 145 3000 +relationcanvas 129669 relation_ref 155269 // + from ref 128133 z 1999 to ref 129029 + no_role_a no_role_b + multiplicity_a_pos 113 322 3000 no_multiplicity_b +relationcanvas 129797 relation_ref 155397 // + from ref 128261 z 1999 to ref 129029 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 129925 relation_ref 155525 // + from ref 129029 z 1999 stereotype "<>" xyz 33 389 3000 to point 71 387 + line 130309 z 1999 to point 46 387 + line 130181 z 1999 to ref 129029 + role_a_pos 23 401 3000 no_role_b + multiplicity_a_pos 42 369 3000 multiplicity_b_pos 75 369 3000 +relationcanvas 130565 relation_ref 155653 // + from ref 128133 z 1999 stereotype "<>" xyz 265 265 3000 to point 263 281 + line 131077 z 1999 to point 303 281 + line 131205 z 1999 to ref 130437 + role_a_pos 242 280 3000 no_role_b + multiplicity_a_pos 322 279 3000 multiplicity_b_pos 237 268 3000 +relationcanvas 131589 relation_ref 155781 // + from ref 128773 z 1999 stereotype "<>" xyz 274 147 3000 to point 282 172 + line 131845 z 1999 to ref 128133 + no_role_a no_role_b + multiplicity_a_pos 221 180 3000 no_multiplicity_b +relationcanvas 131717 relation_ref 155909 // + from ref 128901 z 1999 to point 272 156 + line 131973 z 1999 to ref 128133 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 132229 relation_ref 156037 // + from ref 128645 z 1999 stereotype "<>" xyz 391 226 3000 to ref 132101 + no_role_a no_role_b + multiplicity_a_pos 436 247 3000 no_multiplicity_b +relationcanvas 132357 relation_ref 156165 // + from ref 128773 z 1999 to ref 132101 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 132485 relation_ref 156293 // + from ref 128261 z 1999 to point 478 341 + line 132613 z 1999 to ref 132101 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 133765 relation_ref 156421 // + from ref 133509 z 1999 to ref 133125 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 133893 relation_ref 156549 // + from ref 133253 z 1999 to ref 133125 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 134021 relation_ref 156677 // + from ref 133381 z 1999 to ref 133125 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 134149 relation_ref 156805 // + from ref 132997 z 1999 to ref 133125 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 134405 relation_ref 156933 // + from ref 129029 z 1999 to point 99 363 + line 134533 z 1999 to ref 133125 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +relationcanvas 134661 relation_ref 157061 // + from ref 129029 z 1999 to point 99 364 + line 134789 z 1999 to point 118 463 + line 134917 z 1999 to ref 132997 + role_a_pos 68 538 3000 no_role_b + multiplicity_a_pos 104 586 3000 no_multiplicity_b +relationcanvas 135045 relation_ref 145029 // + from ref 132997 z 1999 stereotype "<>" xyz 35 599 3000 to point 70 630 + line 135173 z 1999 to point 70 661 + line 135301 z 1999 to ref 132997 + role_a_pos 37 612 3000 no_role_b + multiplicity_a_pos 91 657 3000 no_multiplicity_b +end diff --git a/uml/lumiera/5.session b/uml/lumiera/5.session index af68f0264..d04da5e91 100644 --- a/uml/lumiera/5.session +++ b/uml/lumiera/5.session @@ -1,24 +1,30 @@ window_sizes 1302 1004 270 1022 854 71 diagrams - classdiagram_ref 131973 // Render Mechanics - 407 690 100 4 2 0 - collaborationdiagram_ref 132229 // Render Process - 825 684 100 4 0 0 - classdiagram_ref 132357 // StateAdapter composition - 414 658 100 4 0 0 - active classdiagram_ref 132485 // Stream Type Framework - 463 594 100 4 0 0 + classdiagram_ref 128133 // Session structure + 853 742 100 4 120 0 + active classdiagram_ref 132741 // TimelineSequences + 585 732 100 4 0 0 end show_stereotypes selected package_ref 129 // lumiera open + class_ref 145925 // PlayControl deploymentview_ref 128261 // gen deploymentview_ref 129157 // gen package_ref 130181 // mobject classview_ref 128389 // Controller Workings - class_ref 132741 // State + class_ref 139653 // Session + class_ref 128005 // SessionImpl + class_ref 145541 // Timeline + class_ref 145797 // TimelineView + class_ref 128133 // Seq + class_ref 128389 // Track + class_ref 128901 // Clip + class_ref 129029 // Effect + + package_ref 128901 // Builder class_ref 131717 // ProcNode class_ref 142469 // StateProxy class_ref 142597 // StateAdapter @@ -32,7 +38,6 @@ open class_ref 144517 // Strategy class_ref 144005 // BuffTable class_ref 144261 // Invocation - usecaseview_ref 128005 // Renderengine Use classview_ref 129285 // StreamType classview_ref 128773 // error class_ref 140165 // Visitable diff --git a/uml/lumiera/lumiera.prj b/uml/lumiera/lumiera.prj index a533da6cc..1017e01e2 100644 --- a/uml/lumiera/lumiera.prj +++ b/uml/lumiera/lumiera.prj @@ -1,6 +1,6 @@ format 40 "lumiera" - revision 48 + revision 49 modified_by 5 "hiv" cpp_root_dir "../../src/" diff --git a/wiki/renderengine.html b/wiki/renderengine.html index f29e753cc..01c9a849d 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -1121,8 +1121,16 @@ The main tool used to implement this separation is the [[Builder Pattern|http:// Another pertinent theme is to make the basic building blocks simpler, while on the other hand gaining much more flexibility for combining these building blocks. For example we try to unfold any "internal-multi" effects into separate instances (e.g. the possibility of having an arbitrary number of single masks at any point of the pipeline instead of having one special masking facility encompassing multiple sub-masks. Similarly, we treat the Objects in the EDL in a more uniform manner and gain the possibility to [[place|Placement]] them in various ways.
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      ''EDL'' is a short-hand for __E__dit __D__ecision __L__ist. The use of this term can be confusing; for the usual meaning see the definition in [[Wikipedia|http://en.wikipedia.org/wiki/Edit_decision_list]]
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      <<<
                                                                                                                                                                                                                                      +{{red{WARNING: Naming is currently being discussed (11/08)}}}
                                                                                                                                                                                                                                      +* [[EDL]] probably will be called ''Sequence'' (or maybe ''Arrangement'')
                                                                                                                                                                                                                                      +* [[Session]] maybe renamed to ''Project''
                                                                                                                                                                                                                                      +* there seems to be a new entity called [[Timeline]] which holds the global Pipes
                                                                                                                                                                                                                                      +<<<
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +''EDL'' is a short-hand for __E__dit __D__ecision __L__ist. The use of this term can be confusing; for the usual meaning see the definition in [[Wikipedia|http://en.wikipedia.org/wiki/Edit_decision_list]]
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       Cinelerra uses this term in a related manner but with a somewhat shifted focus (and we just stick to this usage here): In Lumiera the EDL is comprised of the whole set of clips and other media objects parametrized and placed onto the tracks by the user. It is the result of the user's //editing efforts.//
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      @@ -1393,7 +1401,7 @@ Besides routing to a global pipe, wiring plugs can also connect to the source po
                                                                                                                                                                                                                                       Finally, this example shows an ''automation'' data set controlling some parameter of an effect contained in one of the global pipes. From the effect's POV, the automation is simply a ParamProvider, i.e a function yielding a scalar value over time. The automation data set may be implemented as a bézier curve, or by a mathematical function (e.g. sine or fractal pseudo random) or by some captured and interpolated data values. Interestingly, in this example the automation data set has been placed relatively to the meta clip (albeit on another track), thus it will follow and adjust when the latter is moved.
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      This wiki page is the entry point to detail notes covering some technical decisions, details and problems encountered in the course of the implementation of the Lumiera Renderengine, the Builder and the related parts.
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       * [[Packages, Interfaces and Namespaces|InterfaceNamespaces]]
                                                                                                                                                                                                                                      @@ -1412,6 +1420,7 @@ Finally, this example shows an ''automation'' data set controlling some paramete
                                                                                                                                                                                                                                       * [[how to handle »attached placement«|AttachedPlacementProblem]]
                                                                                                                                                                                                                                       * working out the [[basic building situations|BuilderPrimitives]] and [[mechanics of rendering|RenderMechanics]]
                                                                                                                                                                                                                                       * how to classify and [[describe media stream types|StreamType]] and how to [[use them|StreamTypeUse]]
                                                                                                                                                                                                                                      +* the relation of [[Project, Timelines and Sequences|TimelineSequences]]
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      @@ -2801,13 +2810,14 @@ Besides, they provide an important __inward interface__ for the [[ProcNode]]s, w
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      The Render Engine is the part of the application doing the actual video calculations. Its operations are guided by the Objects and Parameters edited by the user in [[the EDL|EDL]] and it retrieves the raw audio and video data from the [[Data backend|backend.html]]. Because the inner workings of the Render Engine are closely related to the structures used in the EDL, this design covers [[the aspect of objects placed into the EDL|MObjects]] as well.
                                                                                                                                                                                                                                       <<<
                                                                                                                                                                                                                                       ''Status'': started out as design draft in summer '07, Ichthyo is now in the middle of a implementing the foundations and main structures in C++
                                                                                                                                                                                                                                       * basic [[AssetManager]] working
                                                                                                                                                                                                                                       * [[Builder]] implementation is on the way (&rarr;[[more|BuilderPrimitives]])
                                                                                                                                                                                                                                       * made a first draft of how to wire and operate procesing nodes (&rarr;[[more|RenderMechanics]])
                                                                                                                                                                                                                                      +* working out the relation of [[Project, Timelines and Sequences|TimelineSequences]]
                                                                                                                                                                                                                                       <<<
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       !Summary
                                                                                                                                                                                                                                      @@ -3253,12 +3263,22 @@ The Session object is a singleton &mdash; actually it is a »~PImpl«-Facade
                                                                                                                                                                                                                                       * a collection of ''global Pipes''
                                                                                                                                                                                                                                       * the ''Fixture'' with a possibility to [[(re)build it|PlanningBuildFixture]]
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      The [[Session]] (sometimes also called //Project// ) contains all informations and objects to be edited by the User. It can be saved and loaded. The individual Objects within the Session, i.e. Clips, Media, Effects, are contained in one (or several) collections within the Session, which we call [[EDL (Edit Decision List)|EDL]]. Moreover, the sesion contains references to all the Media files used, and it contains various default or user defined configuration, all being represented as [[Asset]]. At any given time, there is //only one current session// opened within the application.
                                                                                                                                                                                                                                      -The Session is close to what is visible in the GUI. From a user's perspective, you'll find a timeline-like structure, where various Media Objects are arranged and placed. The available building blocks and the rules how they can be combined together form Lumiera's [[high-level data model|HighLevelModel]]. Basically, besides the [[media objects|MObjects]] there are data connections and all processing is organized around processing chains or [[pipes|Pipe]], which can be either global (in the Session) or local (in real or virtual clips)
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      <<<
                                                                                                                                                                                                                                      +{{red{WARNING: Naming is currently being discussed (11/08)}}}
                                                                                                                                                                                                                                      +* [[EDL]] probably will be called ''Sequence'' (or maybe ''Arrangement'')
                                                                                                                                                                                                                                      +* [[Session]] maybe renamed to ''Project''
                                                                                                                                                                                                                                      +* there seems to be a new entity called [[Timeline]] which holds the global Pipes
                                                                                                                                                                                                                                      +<<<
                                                                                                                                                                                                                                      +The [[Session]] (sometimes also called //Project// ) contains all informations and objects to be edited by the User. It can be saved and loaded. The individual Objects within the Session, i.e. Clips, Media, Effects, are contained in one (or several) collections within the Session, which we call [[EDL (Edit Decision List)|EDL]]. Moreover, the sesion contains references to all the Media files used, and it contains various default or user defined configuration, all being represented as [[Asset]]. At any given time, there is //only one current session// opened within the application.
                                                                                                                                                                                                                                      +The Session is close to what is visible in the GUI. From a user's perspective, you'll find a [[Timeline]]-like structure, containing an [[EDL (or Sequence)|EDL]], where various Media Objects are arranged and placed. The available building blocks and the rules how they can be combined together form Lumiera's [[high-level data model|HighLevelModel]]. Basically, besides the [[media objects|MObjects]] there are data connections and all processing is organized around processing chains or [[pipes|Pipe]], which can be either global (in the Session) or local (in real or virtual clips)
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       !!!larger projects
                                                                                                                                                                                                                                      -For larger editing projects the simple structure of a session containing "the" timeline is not sufficient. Rather, we have several timelines, e.g. one for each scene. Or we could have several layered or nested timelines (compositional work, multimedia productions). To support these cases without making the default case more complicated, Lumiera introduces a //focus// for selecting the //current EDL,// which will receive all editing operations.
                                                                                                                                                                                                                                      +For larger editing projects the simple structure of a session containing "the" timeline is not sufficient. Rather
                                                                                                                                                                                                                                      +* we may have several [[EDLs (=Sequences)|EDL]], e.g. one for each scene. These sequences can be even layered or nested (compositional work).
                                                                                                                                                                                                                                      +* within one project, there may be multiple, //independant Timelines// &mdash; each of which may have an associated Viewer or Monitor
                                                                                                                                                                                                                                      +To support these cases without making the default case more complicated, Lumiera introduces a //focus// for selecting the //current EDL,// which will receive all editing operations. [[Timelines|Timeline]] on the other hand are always top-level objects and can't be combined further. You can render a given timeline to output.
                                                                                                                                                                                                                                      +&rarr; see [[Relation of Project, Timelines and Sequences|TimelineSequences]]
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       !!!the definitive state
                                                                                                                                                                                                                                       With all the structural complexities possible within such a session, we need an isolation layer to provide __one__ definitive state where all configuration has been made explicit. Thus the session manages one special object list, the [[Fixture]], which can be seen as all currently active objects placed onto a single timeline.
                                                                                                                                                                                                                                      @@ -3274,6 +3294,8 @@ While all these possibilities may seem daunting, there is a simple default confi
                                                                                                                                                                                                                                       It will contain a global video and audio out pipe, just one EDL with a single track; this track will have a internal video and audio pipe (bus) configured with one fading device sending to the global output ports. So, by adding some clip with a simple absolute placement to this track and some time position, the clip gets connected and rendered, after [[(re)building|PlanningBuildFixture]] the [[Fixture]] and passing the result to the [[Builder]] &mdash; and using the resulting render nodes network (Render Engine).
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       &rarr; [[anatomy of the high-level model|HighLevelModel]]
                                                                                                                                                                                                                                      +&rarr; considerations regarding [[Tracks and Pipes within the EDL|TrackPipeEDL]]
                                                                                                                                                                                                                                      +&rarr; see [[Relation of Project, Timelines and Sequences|TimelineSequences]]
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      @@ -4731,20 +4753,46 @@ function addKeyDownHandlers(e)
                                                                                                                                                                                                                                      http://tiddlywiki.com/
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      Timeline is the name of a specific facility located in the [[Fixture]] (EDL): It is a ordered list of ExplicitPlacement.s of MObjects. By traversing the Playlist you get at all elements actually to be rendered; the [[Builder]] uses this Timeline-list to construct actual Render Engine configurations to carry out the calculations.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Timeline is the top level element within the [[Session (Project)|Session]]. It is visible within a //timeline view// in the GUI and represents the effective (resulting) arrangement of media objects, to be rendered for output or viewed in a Monitor (viewer window). A timeline is comprised of:
                                                                                                                                                                                                                                      +* a time axis in abolute time (WIP: not clear if this is an entity or just a conceptual definition) 
                                                                                                                                                                                                                                      +* a PlayControler
                                                                                                                                                                                                                                      +* a list of global Pipes representing the possible outputs (master busses)
                                                                                                                                                                                                                                      +* //exactly one// top-level [[EDL (Sequence)|EDL]], which in turn may contain further nested ~EDLs (Sequences).
                                                                                                                                                                                                                                      +Please note especially that following this design //a timeline doesn't define tracks.// [[Tracks form a Tree|Track]] and are part of the individual ~EDLs (Sequences), together with the media objects placed to these tracks.
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      +Within the Project, there may be ''multiple timelines'', to be viewed and rendered independently. But, being the top-level entities, multiple timelines may not be combined further. You can always just render (or view) one specific timeline. A given sequence may be referred directly or indirectly from multiple timelines though.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +''Note'': in early drafts of the design (2007) there was an entity called "Timeline" within the [[Fixture]]. This entity seems superfluous and has been dropped. It never got any relevance in existing code and at most was used in some code comments.
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                      Tracks are just a structure used to organize the Media Objects within the EDL. They form a grid, and besides that, they have no special meaning. They are grouping devices, not first-class entities. A track doesn't "have" a port or pipe or "is" a video track and the like; it can be configured to behave in such manner by using placements.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      There is a three-level hierarchy: [[Project|Session]], [[Timeline]], [[Sequence|EDL]]. Each project can contain ''multiple timelines'', to be viewed and rendered independently. But, being the top-level entities, these timelines may not be combined further. You can always just render (or view) one specific timeline. Each of those timelines refers to a Sequence, which is a bunch of [[media objects|MObject]] placed to a tree of [[tracks|Track]]. Of course it is possible to use ~Sub-EDLs (Sub-sequences) within the top-level sequence within a timeline to organize a movie into several scenes or chapters. 
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                      -Tracks are assets on their own, but they can be found within a given EDL. So, several ~EDLs can share a single track or each EDL can have its own, separate tracks. 
                                                                                                                                                                                                                                      -* Like most ~MObjects, tracks have a asset view: you can find a track asset in the asset manager.
                                                                                                                                                                                                                                      -* and they have an object view: there is an track MObject which can be [[placed|Placement]], thus defining properties of this track within one EDL
                                                                                                                                                                                                                                      +[>img[Relation of Timelines, Sequences and MObjects within the Project|uml/fig132741.png]]
                                                                                                                                                                                                                                      +As stated in the [[definition|Timeline]], a timeline refers to exactly one EDL (Sequence), and the latter defines a tree of [[tracks|Track]] and a bunch of media objects placed to these tracks. A Sequence may optionally also contain nested sequences as [[meta-clips|VirtualClip]]. Moreover, obviously several timelines (top-level entities) may refer to the same Sequence without problems.
                                                                                                                                                                                                                                      +This is because the top-level entities (Timelines) are not permitted to be combined further. You may play or render a given timeline, you may even play several timelines simultaneously in different monitor windows, and these different timelines may incorporate the same sequence in a different way. The Sequence just defines the relations between some objects and may be placed relatively to another object (clip, label,...) or similar reference point, or even anchored at an absolute time if desired. In a similar open fashion, within the track-tree of a sequence, we may define a specific signal routing, or we may just fall back to automatic output wiring.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +!Attaching output
                                                                                                                                                                                                                                      +The Timeline owns a list of global [[pipes (busses)|Pipe]] which are used to collect output. If the track tree of a sequence doesn't contain specific routing advice, then connections will be done directly to these global pipes in order and by matching StreamType (i.e. typically video to video master, audio to stereo audio master). When a monitor (viewer window) is attached to this timeline, similar output connections are made from those global pipes, i.e. the video display will take the contents of the first video (master) bus, and the first stereo audio pipe will be pulled and sent to system audio out. The timeline owns a ''play control'' shared by all attached viewers and coordinating the rendering-for-viewing. Similarly, a render task may be attached to the timeline to pull the pipes needed for a given kind of generated output. The actual implementation of the play controller and the coordination of render tasks is located in the Backend, which uses the service of the Proc-Layer to pull the respective exit nodes of the render engine network.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +!Timeline versus Timeline View
                                                                                                                                                                                                                                      +Actually, what the GUI creates and uses is the //view// of a given timeline. This makes no difference to start with, as the view is modelled to be a sub-concept of "timeline" and thus can stand-in. All different views of the //same// timeline also share one single play control instance, i.e. they all have one single playhead position. Doing it this way should be the default, because it's the least confusing. Anyway, it's also possible to create multiple //independent timelines// &mdash; in an extreme case even so when referring to the same top-level sequence. This configuration gives the ability to play the same arrangement in parallel with multiple independent play controllers (and thus independent playhead positions)
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +To complement this possibilities, I'd propose to give the //timeline view// the possibility to be re-linked to a sub-sequence. This way, it would stay connected to the main play control, but at the same time show a sub-sequence //in the way it will be treated as  embedded// within the top-level sequence. This would be the default operation mode when a meta-clip is opened (and showed in a separate tab with such a linked timeline view). The reason for this proposed handling is again to give the user the least surprising behaviour. Because, when &mdash; on the contrary &mdash; the sub-sequence would be opened as //separate timeline,// a different absolute time position and a different signal routing may result; doing such should be reserved for advanced use, e.g. when multiple editors cooperate on a single project and a sequence has to be prepared in isolation prior to being integrated in the global sequence (featuring the whole movie).
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Tracks are just a structure used to organize the Media Objects within the EDL. Tracks are associated allways to a specific EDL and the Tracks of an EDL form a //tree.// They can be considered to be an organizing grid, and besides that, they have no special meaning. They are grouping devices, not first-class entities. A track doesn't "have" a port or pipe or "is" a video track and the like; it can be configured to behave in such manner by using placements.
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +The ~Track-IDs are assets on their own, but they can be found within a given EDL. So, several ~EDLs can share a single track or each EDL can have tracks with their own, separate identity. (the latter is the default)
                                                                                                                                                                                                                                      +* Like most ~MObjects, tracks have a asset view: you can find a track asset (a track ID) in the asset manager.
                                                                                                                                                                                                                                      +* and they have an object view: there is an track MObject which can be [[placed|Placement]], thus defining properties of this track within one EDL, e.g. the starting point in time
                                                                                                                                                                                                                                       Of course, we can place other ~MObjects relative to some track (that's the main reason why we want to have tracks). In this sense, the [[handling of Tracks|TrackHandling]] is somewhat special: the placement of some track can be found directly within the EDL (and not within the general collection of placed objects which form the contents of any EDL). This placement defines properties of the track, which will be inherited if necessary by all ~MObjects placed to this track. For example, if placing (=plugging) a track to some global [[Pipe]], and if placing a clip to this track, without placing the clip directly to another pipe, the associated-to-pipe information of the track will be fetched by the builder when needed to make the output connection of the clip.
                                                                                                                                                                                                                                       &rarr; [[Handling of Tracks|TrackHandling]]
                                                                                                                                                                                                                                       &rarr; [[Handling of Pipes|PipeHandling]]
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +&rarr; [[Anatomy of the high-level model|HighLevelModel]]