blRtx
blRtx is a .NET 2.0 component which is a wrapper to
Inca RTX. It attempts
to make RTX development simpler and follows all the standard .NET conventions
for components. blRtx was originally conceived several years ago as a wrapper
for RTX 5.0 but has been modernized by making it Inca capable and .NET 2.0
savvy. Currently, the component only supports .NET 2.0 mainly because it makes
use of generics and new property visibility features. Making blRtx support
.NET 1.0 or 1.1 is only a few hours of extra work and if anyone has interest,
I'd be happy to make it support older versions of .NET. For my own purposes,
all new development is now .NET 2.0 so I wanted to make use of anything in 2.0
which could improve blRtx.
blRtx is made up of the following classes:
- Effect - this is an abstract class and a bunch of subclasses which support most
of the common RtxLib effects
- Image - a simplified wrapper for RtxLib.Layer
- Layout - a simplified wrapper for RtxLib.Layout
- Surface - a simplified wrapper for RtxLib.Framebuffer
- Trigger - a simplified wrapper for RtxLib.GPIO
- Timecode - a simplified wrapper for RtxLib.TimeCode
Note that there's no Rtx, RtxContext, Font, Color, Palette and many of the other
RtxLib interfaces. blRtx has attempted to create a simpler RTX while still
providing most of the capabilities we've learned to love. However, the class
design relies on the need for defining all graphics as images, layouts (using
RTX tags), vias and clips. So, things like RtxContext.DrawString are no longer
supported. Instead, a layout with an RTX tag must be used for this purpose. This
may seem like a step backwards but I believe that from a maintenance point of
view, this is a safer way to go.
A C# Helloworld for blRtx looks like:
void FormHelloWorld_Load(object sender, EventArgs e) {
m_surface = new Surface(0); // an overloaded constructor - what a concept! This constructor says create a surface for board 0
m_layout = new Layout("helloworld.ins", "helloworld"); // this constructor takes a playlist and layout name as arguments
m_layout.tags["hello"].text = "Hello World";
m_trans = new Transition();
m_trans.surface = m_source;
m_trans.SetSource(m_layout); // SetSource supports overloading so it can accepts surfaces, layouts or images
m_trans.Done += new Transition.DoneHandler(Done);
}
void buttonHelloWorld_Click(object sender, EventArgs e) {
m_trans.TakeAt(new Timecode() + new Timecode(0, 0, 2, 0)); // take at in 2 seconds - setups on surfaces and effects are optional
}
void Done(object sender, EventArgs e) {
MessageBox.Show("Done!");
}
Surface m_source, m_dest;
Layout m_layout;
Transition m_trans;
Where's the source code? I'm still contemplating what to do with blRtx. If
anyone wants to see the source code, please email me at ghentsch@blsoft.ca and
I'll make it available.
What makes this component better than the current com server? Well, in some
ways, it's not because I've trimmed the features. But the component is certainly
leaner and potentially easier to use and understand. Some of the .NET specific
improvements are:
- overloaded constructors, methods & operators
- events with clean names and argument passing using the standard .NET pattern
- no need to recompile all your apps every time a new rev of RtxLib comes around
- use of .NET 2.0 generic collections
- standard .NET documentation (MIDL wasn't the best place to document the com server)
- supports inheritance
- support for synchronization objects allowing events to sync to a UI or other object
- improved exceptions
- object persistence (not implemented yet!)
What's on the to do list for blRtx. Well, I wish I had the source code to RTX.
That would allow me to build a true native component. But, that's not going to
happen so what else can we expect to see from blRtx:
- make the classes cloneable so we can support the .NET copy method
- support matte files for video clips
- support trimming for audio & video clips
- dynamic cutlist - currently it's static i.e. items can only be added at setup
- animation effect should support animation layouts - it currently only supports vias
- add more effects
- keep up-to-date with Inca RTX - if a new feature is added to RTX and I want to utilize it, it'll be added to blRtx
- beef up exceptions
- standard comments throughout so we get proper help in the IDE
- there are several things I'd like Inscriber to improve with layouts & rtx
tags. For example, wouldn't some type of table support be beautiful for tags;
kind of like text in a box but with multiple rows/columns. This would be a great
improvement for Infocaster and the CG as well.
- object persistence - say goodbye to recompiling because the bounds of a
surface have changed - just need to make use of IDeserializationCallback to take
care of the RtxLib stuff
The cutlist is probably the biggest immediate deficiency in blRtx. The cutlist
I'm using is nice because it uses a generic collection class but I need to take
it a step further and support dynamic cutlists, trimming and matte files. That's
probably the next thing on my list.
I'd appreciate any feedback on blRtx; what you like, what you don't like and
what's missing will give me valuable feedback. blRtx is available for download
at:
http://www.blsoft.ca/downloads/blRtx.zip
Georg Hentsch
Bannister Lake Software Inc.
http://www.blsoft.ca
ghentsch@blsoft.ca