Menu

Changelog

Peter Maersk-Moller

Changelog for Snowmix

This page is a changelog for older versions of Snowmix. You can find the newer changelogs on the new Snowmix website.


Copyright 2012-2015 Peter Maersk-Moller

Version 0.4.5

Version 0.4.5 - released January 21 2015 - Release Notes available.

  • The function CCairoGraphics::OverlayText() has been renamed to CCairoGraphics::OverlayTextOld() and remain, but a new function CCairoGraphics::OverlayText() has been written to optimize calculations, include offset calculations and fix bugs including bug for round corners. Using round corners for text backgrounds would get it wrong if the scale_x != scale_y of the placed text. This is now fixed. The new function is used when overlaying text. The old one will eventually dissapear.

  • In CCairoGraphics::OverlayText() we now only spend time finding the new extend/geometry of a placed text, if its font or string has changed. We can trigger a new update of the extend by setting the text_id_seqno or font_id_seqno of a placed text to zero. If a string or font with a specific string id or font id is changed exactly 2^16 times wrapping the sequence counter to zero, the placed text will have its sized checked for every frame. The solution is to change the string or font again, possible just set it to the same, which triggers an increment of the sequence number.

  • A Pango Font Description is now allocated when the command text font is used to define a font with a font id. Previous the Pango Font Description was allocated for every placed text overlayed for every frame. This and the other optimization for texts has reduced the Snowmix load on an old Thinkpad T61 from 23-24% to 18-19% using the ini/basic_feeds example.

  • The command text place backgr would list pad values for top and bottom with the word "coor" infront possible confusing understanding. The word "coor" has been removed. It was this:

    MSG: text place backgr  0 pad    20,40    coor     2,4     alpha 1.0000 rgb(0.000,0.000,0.000) h
    

Has now been changed to this:

    MSG: text place backgr  0 pad-lrtb    20,40        2,4     alpha 1.0000 rgb(0.000,0.000,0.000) h
  • A number of text place ..." commands are considered obsolete yet supported until end of Snowmix version 0.4.x. They are replaced by shorter versions to optimize parsing. The output of command text help* has been updated to reflect this. The obsolete commands and their respective replacement are listed below:

        Obsolete command                Replacement command
        ----------------------------------------------------------
        text place align                text align
        text place alpha                text alpha
        text place anchor               text anchor
        text place backgr alpha         text backgr alpha
        text place backgr clip          text backgr clip
        text place backgr linpat        text backgr linpat
        text place backgr round         text backgr round
        text place backgr alpha         text backgr alpha
        text place backgr move alpha    text backgr move alpha
        text place backgr move clip     text backgr move clip
        text place backgr rgb           text backgr rgb
        text place backgr               text backgr
        text place clip                 text clip
        text place clipabs              text clipabs
        text place coor                 text coor
        text place grow                 text grow
        text place move alpha           text move alpha
        text place move clip            text move clip
        text place move coor            text move coor
        text place move rotation        text move rotation
        text place move scale           text move scale
        text place offset               text offset
        text place repeat move          text repeat move
        text place rgb                  text rgb
        text place rotation             text rotation
        text place scale                text scale
    
  • Adding new command text verbose in-line with setting/toggling the verbose level for images, shapes etc. Valid value for verbose level a positive integer including 0. The syntax is:

    text verbose [<verbose level>]
    
  • Adding new command text offset to add offset for rotation of text. Default value for offset is 0,0. The syntax is:

    text offset [<place id> <offset x> <offset y>]
    
  • The program snowcub in tcl/snowcub.tcl takes new parameters. Example:

    snowcub -- -s SOME_HOST
    snowcub -- -as SOME_HOST:9990
    

The first example starts snowcub with the Scene panel for host SOME_HOST and will connect to port 9999. The second example will start snowcub with the Audio and the Scene panel in that order and connect to SOME_HOST port 9990.

  • configure.ac now adds pkg-config info for libtcl if it adds anything. For Chakra we need to add '-ltcl' in addition to what pkg-config tell.

  • configure.ac now checks for libpng16 and prefers libpng16 over libpng12. If you have and older installation with port for Mac with libpng compiled in, you may have to uninstall port and all packages and reinstall port again. The bootstrap for OS X will offer to install port and missing packages.

  • Adding new command image source to create a new image from a feed, an image or the mixers system frame. Currently the system only have one system frame with the source id 0. If an image with the specified image id already exists, that image will be deleted. The command can also be used to scale, rotate or alpha blend existing images. The syntax is:

    image source [(feed | image | frame) <image id> <source id> [ <offset x> <offset y> <width> height> [<scale_x> <scale_y> [<rotation> <alpha> [(fast | good | best | nearest | bilinear | gaussian)]]]]]
    
  • Deleting/freeing a loaded image would leak memory if the image was given a name. Also row pointers for png was not freed. Fixed.

  • Adding two missing ']]' for image place in the list printed for the command image help.

  • The help list for audio feed had an extra ']' at the end of the audio feed drop line. Fixed.

  • A number of *image place ..." commands are considered obsolete yet supported until end of Snowmix version 0.4.x. The obsolete commands and their replacement are listed below:

        Obsolete command                Replacement command
        ----------------------------------------------------------
        image place align               image align
        image place alpha               image alpha
        image place anchor              image anchor
        image place clip                image clip
        image place coor                image coor
        image place filter              image filter
        image place image               image image
        image place matrix              image matrix
        image place move alpha          image move alpha
        image place move clip           image move clip
        image place move coor           image move coor
        image place move offset         image move offset
        image place move rotation       image move rotation
        image place move scale          image move scale
        image place offset              image offset
        image place rotation            image rotation
        image place scale               image scale
    
  • Adding new command image geometry listing the geometry of a single or all placed images depending on arguments. The syntax is:

    image geometry [ <place id> ]
    
  • Setting clip for virtual feed, the clip_w + clip_x must be less or equal to width. Same applies for clip_h + clip_y and height. This is also checked vor vfeed move clip where the movement/animations stops if clip is exceeding feeds geometry.

  • Optimizing CVideoImage::Update to only run its many checks if some of the step parameters are non zero. A run through update with no animation steps will disable future runs until a step parameter for a move command is set to non zero. This is similar to an optimization done previously for CTextItems.

  • Optimizing CVirtualFeed::Update to only run its many checks if some of the step parameters are non zero. A run through update with no animation steps will disable future runs until a step parameter for a move command is set to non zero. This is similar to an optimization done previously for CTextItems.

  • Adding new command image move offset to add animation for the the offset parameter for virtual feeds. The synatx is:

    image move offset [<place id> <delta offset x> <delta offset y> <step offset x> <step offset y>]
    
  • Adding new command vfeed move offset to add animation for the the offset parameter for virtual feeds. The synatx is:

    vfeed move offset [<vir id> <delta offset x> <delta offset y> <step offset x> <step offset y>]
    
  • Renaming IMAGE_ALIGN_ and TEXT_ALIGN_ to SNOWMIX_ALIGN_* and moving definition to snowmix.h

  • Major rewrite of CCairoGraphic::OverlayFrame() for optimization and correct handling of combination of offset/scale/rotation. Old code is still in CCairoGraphic::OverlayFrameOld(). Both functions now take argument align, but old code ignores its value.

  • Moving CVideoMixer::OverlayVirtualFeed() to CVirtualFeed::OverlayFeed() and major rewrite for optimization with less calls and pointers to pointers.

  • Command image help listed syntax for image load to be.

    image load [<id no> [<file name>]]
    image write <id no> <file name>
    

This has been changed to

    image load [<image id> [<file name>]]
    image write <image id> <file name>

Further more \<id no> changed to \<place id> for the rest of the image commands.

  • Command image place in verbose mode with arguments would print wrong number for id to control connection. Fixed.

  • Command shape place help listed the syntax for shape place alpha wrong. The syntax is:

    shape place alpha [<place id> <alpha>]
    
  • Class CTextItems, CVideoShape, CVirtualFeed and CVideoImage are now all using the same SetAnchor() function. Illegal anchor syntax, illegal is non n, s, e, w, c, ne, nw, se, sw, will leave anchor settings unchanged. In previous version an illegal setting would result in nw ie. 0,0.

  • Adding new command vfeed anchor to set or list anchor of virtual feeds. A placed virtual feed will be placed accoding to its anchor. The anchors, also appying to texts, shapes and images, are:

    n  : North adds w/2,0 to place coordinates.
    s  : South adds w/2,h to place coordinates.
    ne : North-east adds w,0 to place coordinates.
    e  : East adds w,h/2 to place coordinates.
    se : South-east adds w,h to place coordinates.
    nw : North-west adds 0,0 to place coordinates (default).
    w  : West adds 0,h/2 to place coordinates.
    sw : South-west adds 0,h to place coordinates.
    c  : Center adds w/2,h/2 to place coordinates.
    

The syntax is:

    vfeed anchor [<vir id> (n | s | e | w | c | ne | nw | se | sw)]
  • Adding new command text place anchor to set or list anchor of placed text. Used without arguments, the command will list anchor values for placed text. The syntax is:

    text place anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
    
  • Adding new command image place anchor to set or list anchor of placed images. Used without arguments, the command will list anchor values for placed images. The syntax is:

    image place anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
    
  • Adding new command shape place anchor to set or list anchor of placed images. Used without arguments, the command will list anchor values for placed shapes. The syntax is:

    shape place anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
    
  • Adding center option 'c' for anchor for placed text, place shapes and placed images. Adds to syntax list for command text help, shape place help and image help.

  • Adding new command vfeed align to set or list alignment of virtual feeds. A placed virtual feed will be placed accoding to the alignment. The syntax is:

    vfeed align [<vir id> (left | center | right ) ( top | middle | bottom)]
    

The order of vertical and horizontal alignment is indifferent.

  • The command vfeed place rect used without arguments will now also print alignment.

  • The command image help listed two possible different syntax lines for the command image place. The valid syntax is:

    image place [<id no> [<image id> <x> <y> [(n | s | e | w | c | ne | nw | se | sw)] [(left | center | right) (top | middle | bottom)]
    
  • All image commands setting parameters are silent when verbose level is set to 0 AND the command is successful. Default level is 0. When verbose level is greater than 0, using an image command for setting image parameters will return a single informative line. A failed command will always return a line with error message. The image overlay does not set any parameters and does not return any informative message. Commands update to print information when verbose and successful:

        image place alpha
        image place clip
        image place filter
        image place move alpha
        image place move clip
        image place move scale
        image place move coor
        image place move rotation
        image place offset
        image place image
        image place rotation
        image place scale
        image place matrix
        image name
        image write
    
  • Command image verbose now accepts a level as argument. Used without, verbose is toggled between 0 and 1 in line with verbose settings for other modules such as feed, shapes etc. Valid level is an integer number greater or equal to 0. The syntax is now:

    image verbose [ <level> ]
    

The image help command has been updated to reflect the change.

  • Command image write would print two lines if failing. Only one should be printed. More error info is now printed to stderr. Fixed.

  • Command image name would print two lines if failing. Only one should be printed. If verbose, more error info is now printed to stderr. Fixed.

  • Command image place align would print two lines if successful. Only one should be printed. Fixed.

  • Command image place align would in some cases continue parsing a command line despite synatx error and make no complaining about it. Fixed.

  • Command image place with only image id as argument for deleting a placed image would print two lines if successful. Only one should be printed. Fixed.

  • Command image help listed image load twice. Fixed.

  • Optimizing parsing image commands.

  • The command image place move rotation now accepts fraction of PI for the argument \<rotation>. such as 2PI/3 or 1PI/12.

  • The command image place rotation now accepts fraction of PI for the argument \<rotation>. such as 2PI/3 or 1PI/12.

  • The command vfeed move clip used without arguments, will now list the move parameters for clipping for vfeeds. The command vfeed help has been updated to list the option to use the command without arguments.

  • The command vfeed move coor used without arguments, will now list the move parameters for coordinates for vfeeds. The command vfeed help has been updated to list the option to use the command without arguments.

  • The command vfeed move scale used without arguments, will now list the move parameters for scale for vfeeds. The command vfeed help has been updated to list the option to use the command without arguments.

  • The command vfeed move rotation used without arguments, will now list the move parameters for rotation for vfeeds. The command vfeed help has been updated to list the option to use the command without arguments.

  • The command vfeed move alpha used without arguments, will now list the move parameters for alpha for vfeeds. The command vfeed help has been updated to list the option to use the command without arguments.

  • The command vfeed add did not remove trailing spaces in the name specified. This has now been fixed.

  • The vfeed help specified the non implemented command vfeed geometry for setting the geometry of a vfeed. However the geometry is defined by the source of the vfeed and can not be changed. The syntax printed for vfeed help is changed to reflect this and the code for listing the geometries has been added. Used without arguments, the command will list geometries for all vfeeds. The syntax is:

    vfeed geometry [ <vir id> ]
    
  • The command vfeed place rect was specified with a valid syntax including no arguments as many other place commands. However this was not implemented. The command used without arguments will now list vfeeds configured indluding parameters that can be set with the command.

  • In CVirtualFeed::set_virtual_feed_source, the function FeedState could theoretically return NULL leading to core dump. Fixed.

  • Adding command vfeed verbose to set or toggle verbose level for vfeed commands. The command vfeed info lists the verbose level. The syntax is:

    vfeed verbose [ <level> ]
    
  • All vfeed commands setting parameters are silent when verbose level is set to 0 AND the command is successful. Default level is 0. When verbose level is greater than 0, using a vfeed command for setting vfeed parameters will return a single informative line. A failed command will always return a line with error message. The vfeed overlay does not set any parameters and does not return any informative message.

  • Adding command vfeed info to list information on setup forvirtual feeds in line with command such as feed info etc. The syntax is:

    vfeed info
    
  • On OSX, bootstrap will now offer to download and installGStreamer 1.4.4 as opposed to 1.4.1 before.

  • bootstrapd/bootstrap-ubuntu modified to work with Debian 7.7.0. Will install missing packages and compile.

  • Adding command vfeed coor to set the coordinates for a virtual feed. Used without arguments, the command will list coordinates for the virtual feeds. The syntax is:

    vfeed coor [<vir id> <x> <y>]
    
  • Adding command vfeed clip to set clip parameters for a virtual feed. Used without arguments, the command will list clip paramaters for the virtual feeds. The syntax is:

    vfeed clip [<vir id> <clip w> <clip h> <src_x> <src_y>]
    
  • Changed help output for vfeed help for vfeed place rect. Thetext width and height was changed to clip h and clip h.

    vfeed place rect [<vir id> [<x> <y> <clip w> <clip h> <clip x> <clip y> [<rotation> <scale_x> <scale_y> <alpha>]]]
    
  • Adding command vfeed move rotation to the output of vfeed help. The command has been available since 0.3.0, but not part of the output of the vfeed help command.

  • The command vfeed move rotation now accepts fraction of PI for the argument \<rotation>. such as 2PI/3 or 1PI/12.

  • The command vfeed place rect now accepts fraction of PI for the optional argument \<rotation>. such as 2PI/3 or 1PI/12.

  • Adding command vfeed rotation to set or list rotation value for virtual feeds. Used without arguments, the command lists the rotation for the virtual feeds. The syntax is:

    vfeed rotation [ <vir id> <rotation> ]
    

The rotation parameter can use fractions of PI such as 2PI/3 or 1PI/12.

  • Adding command vfeed scale to set scale parameters for virtual feeds. Used without arguments, the command lists the scale settings for virtual feeds. The syntax is:

    vfeed scale [ <vir id> <scale_x> <scale_y> ]
    
  • Adding command vfeed alpha to set alpha value for virtual feeds. Used without arguments, the command lists the alphas for virtual feeds. The syntax is:

    vfeed alpha [ <vir id> <alpha> ]
    
  • The command vfeed help is update to list new vfeed commands.

  • Some parsing optimization in Parse in CVirtualFeed class.

  • Audio sink's Update() function has been rewritten to a new function NewUpdate(). The old function will remain for now, but is unused. The new functions buffers output if writing out audio samples would block. New functions for SetFds() and CheckReadWrite() has also been written for audio sink for used in the main loop for select() call, but remain inactive for now as they currently are deemed unnecessary. At each frame loop NewUpdate is called buffering all samples in audio sink and an attempt is made for writing out all buffered data. Non written samples may then get written the next time around.

  • Function bool NumberWithPI() moved to file snowmix_util.cpp/h.

  • Keyword vfeed and virtual feed are now interchangeable. All commands starting with keyword virtual feed can now be executed with the keyword vfeed. String compare in parsing in controller optimized. Listing help for virtual feed now list the keyword vfeed rather than virtual feed. All commands in CVirtualFeed that printed the keywords virtual feed now prints vfeed. It is not recommended in new scripts and programs to use the keyword virtual feed, but the ability to process virtual feed in commands will remain for now.

  • scripts/input2feed new has the following command syntax:

    scripts/input2feed <feed id> [ <audio feed id> [ <input file> ]]
    

Omitting \<audio feed id> or setting it to 0 will disable the audiofeed. Omitting the \<input file> the script will select a file in the test directory.

  • boostrapd/bootstrap-OSX now installs port 2.3.3 if needed instead of 2.3.0. Port 2.3.0 was not availble for OS X 10.10 Yosemite.

  • slib addition/change to feeds.slib.

    tcl eval FeedWatch <feed id>
    tcl eval FeedUnWatch <feed id>
    tcl eval FeedWatchCommand <feed id> <state> <command>
    tcl eval FeedWatchCheck
    

FeedWatch is used to add feeds to be checked for state change. FeedUnWatch is used to remove a feed from the list of feeds to be checked for state change. The list of feeds to be checked is stored in the variable feed(watchlist).
FeedWatchCommand is used to specify which tcl command to be executed when the feed changes state to \<state>. Multiple commands can be separated by semicolon. FeedWatchCheck is an internal function automatically added to the overlay pre command macro when at least one feed is to watched or checked for state change. This function is responsible for executing the command specified to be executed when a state change is detected. A state change to RUNNING requires the count of good frames for a feed to advance by at least one good frame. The count of good frames for a feed is an internal counter advanced by one for every Snowmix frame period if the feed has a frame available.

  • slib addition/change to scenes.slib.

    tcl eval ScenePush <scene id> [ <fade> ]
    tcl eval ScenePop [ <fade> ]
    

ScenePush will push the current active scene onto a stack and set the scene identified by \<scene id> as active scene. The \<fade> argument is passed onto the function SceneSetState used for activating the scene. The ScenePop function pops a scene id from the stack and sets this as the active scene.

  • Messages written to controllers using controller_write_msg() was written to controllers write_fd directly hoping for the best (in non bloking mode). Now if nothing is queued for writing for the controller, the message is written and write result is checked. If data remains to be written, this data is now queued in a list. All data is queued in a list if data is already pending (queued in the list) writing. The CController SetFds() now sets the write_fds for the controller, if data is queued in the controllers list and subsequently is part of the select() call in the main video loop. The CController CheckRead() is renamed to CheckReadWrite() and now also handles writing out pending data for a controller.

  • struct controller in CController added linked list output_buffer. Deleting an allocated controller should be handled through ControllerListDeleteElement().

  • Offset for rotation in CCairoGraphic::OverlayFrame was calculated as x,y plus half width and height. A scaled virtual feed would not rotate around its center, but around the center of the unscaled feed. It will now rotate around its center. This is a bugfix.

  • trim_string() optimization and secure against str==NULL. Safe guard and optimization.

  • Parsing shape commands was not checking against NULL nor empty string. This is just a safe guard and optimization.

Version 0.4.4

Version 0.4.4 - released September 3rd 2014 - Release Notes available.

  • Adding new command feed overlay to overlay/mix a single feed or a list of feeds. Note that the command can only beused as part of executing the command macro set with the command overlay finish. The syntax of the command is:

    feed overlay (<id> | <id>..<id> | all | end | <id>..end) [ (<id> | <id>..<id> | all | end | <id>..end) ] ....
    

The command is a supplement to the command stack allowing to control when the feeds are overlayed/mixed when executing the command macro associated the command overlay finish.

  • Adding new command feed fast overlay. This command replaces the undocumented command overlay feed which can still be used for the rest of version 0.4.x. Please see EndOfLifeAnnouncement file for more. The syntax of the argument for the new command is as for the old command overlay feed. Note that the command can only beused as part of executing the command macro set with the command overlay finish. The syntax is:

    feed fast overlay <feed id> <col> <row> <feed col> <feed row> <cut cols> <cut rows> [ <scale 1> <scale 2> [ <par_w> <par_h> [ center ]]]
    
  • Adding new command shape filter to control how a feed or an image is overlayed when a shape containing a feed or an image is overlayed. The command should be used directly after adding a feed or an image to a shape when defining a shape being a list of Cairo Graphic primitives. If the next primitive in a shape after a feed or image primitive is not a filter primitive, Snowmix will by default add the filter command FAST while executing the shape.

    shape filter <shape id> (fast | good | best | nearest | bilinear | gaussian)
    

The gaussian filter method is as of writing not implemented in libcairo, but the ability to set is left there in case libcairo in future versions implement gaussian blending. WARNING. Any filter setting not being fast or nearest will make the overlaying of that image 30-50 times slower. The example below demonstrate the use of the command:

    shape add 1 My shape
    shape moveto 1 0.0000 0.0000
    shape inshape 1 2
    shape clip 1
    shape newpath 1
    shape feed 1 -640.0000 -360.0000 0.6500 0.6500
    shape filter 1 bilinear
    shape paint 1 1.0000
  • Adding new command virtual feed filter to control how an image is overlayed when using the overlay virtual feed command. The syntax is:

    virtual feed filter [ <place id> (fast | good | best | nearest | bilinear | gaussian)]
    

The gaussian filter method is as of writing not implemented in libcairo, but the ability to set is left there in case libcairo in future versions implement gaussian blending. WARNING. Any filter setting not being fast or nearest will make the overlaying of that image 30-50 times slower. The default filter value is fast.

  • Adding new command image place filter to control how an image is overlayed when using the image overlay command. The syntax is:

    image place filter [ <place id> (fast | good | best | nearest | bilinear | gaussian)]
    

The gaussian filter method is as of writing not implemented in libcairo, but the ability to set is left there in case libcairo in future versions implement gaussian blending. Using a filter method being best, good or bilinear may be needed, if animation of scale of the image is used. WARNING. Any filter setting not being fast or nearest will make the overlaying of that image 30-50 times slower. Smaller images takes less time overlay. The default filter value is fast.

  • Adding new command feed filter to control how a feed is overlayed when using the stack command. The syntax is:

    feed filter [ <feed no> (fast | good | best | nearest | bilinear | gaussian)]
    

The gaussian filter method is as of writing not implemented in libcairo, but the ability to set is left there in case libcairo in future versions implement gaussian blending. WARNING. Any filter setting not being fast or nearest will make the overlaying of that feed 30-50 times slower. The default filter value is fast.

  • When overlaying a feed, an image, a virtual feed and a shape based feed, these were all being overlayed using cairo_set_source_surface(). This function would in libcairo-1.12.16 (Ubuntu 13.10 and previous as of date) use as deafult a BEST filter function for overlaying through libpixman. Ubuntu 14.10LTS has of writing libcairo-1.13.0. This library uses the filter BEST which is 30-50 times slower. Use of the filter FAST as default is now enabled and Snowmix will work as fast as before or even faster with libcairo.1.13.0 and forward. This is a bugfix for Ubuntu 14.10 and forward. Older Ubuntus may later also get an upgraded libcairo and then this fix will apply to them as well.

  • Listing help for shape place would not list the full syntax for the command shape overlay. Further more the entry was listed under the shape help rather than shape place overlay. It is now recommended but optional to write shape place overlay rather than just shape overlay as this command belongs to the shape place class of commands. This has now been fixed.

  • Listing help for image would not list the syntax for the command image overlay. This has now been fixed.

  • Listing help for text would not list the syntax for the command text overlay. This has now been fixed.

  • Listing help for virtual feed would not prepend each line with the "MSG: " string. Neither was an empty line with just "MSG:" printed as the last line. This has now been fixed.

  • Listing feed par or feed scale would not print an empty MSG: line. This has now been fixed.

  • Listing feed help would list the parameters for feed par to be scale_1 and scale_2. This has now been changed to width and height.

  • SDL on OSX requires pixel bytes to be copied in the order ABGR while on Linux a memcpy can work (BGRA). This is a bugfix for monitor on command for OSX.

  • CCairoGraphic::OverlayFrame mistakenlay allocated a Cairo Context and never really used it. The Cairo context is created in the main mixer loop before running the overlay finish macro. Not really a bug, but unnecessary. Fixed.

  • The command audio mixer status was for the delay parameter using the mixers channel count rather than the source channel count when calculating the delay currently in the queue. This is a bugfix.

  • Adding the command audio mixer source rmsthreshold. With this command the new buffers will not be added to the mixers source queue for the specific source if the max RMS value found for channels of the new buffer is not at least equal to the specified threshold level. The command is developed to be used in conjunction with the command audio mixer source pause. Togther, the source can pause mixing and new samples are only added if they exceeds a threshold possibly throwing away silent samples until the source threshold is zeroed or the pause is cancelled. The syntax is:

    audio mixer source [rmsthreshold <mixer id> <source no> <level>]
    
  • The command audio mixer help did not list the source drop option. Fixed.

  • The command audio mixer help did not list the source move option. Fixed.

  • Audio feed can now handle misaligned sample input. Misaligned audio input is when audio data received on the control connection in a single buffer does not contain enough bytes to construct a full sample set of sample for all channels for the audio feed using precisely all data received in the buffer. Assume 2 channels and 2 bytes per sample. Each sample set then require 4 bytes. If 43 bytes are received, then 10 sample sets can be constructed leaving 3 bytes. These 3 remaining bytes are now prepended the next audio data received hopefully eventually realigning sample data.

  • Adding the command audio mixer source pause to pause mixing a source into an audio mixer stream. The pause will last for as many frames as specified by the command. Samples added to the source queue will queue up. The syntax is:

    audio mixer source [pause <mixer id> <source no> <frames>]
    
  • The command virtual feed source, would return error if the source was an image and it would not work. This has now been corrected. This is a bugfix.

  • The command text place repeat move would under some circumstances not start moving. This has now been fixed. This is a bug fix.

  • When setting the feed geometry and when width or height is larger than the system geometry, the error just said the width or the height was illegal. It will now specify that the width or height must be set between 1 and system width or height.

  • When bytes read for a dead image file for feed was less than required, the error message said it was unable to read the file. This has now been change to specify that it was unable to read N number of bytes required.

  • Trailing whitespaces are now removed from command given to command command at.

  • set_tcl_exec was not freeing memory allocated for script sent to tcl_eval. This is bugfix.

  • When placing a shape using the command place shape, the range of valid color values was not checked. Values above 1.0 would when used have effect as the value was 1.0 and values below 0.0 would have effect as 0.0. Nevertheless when listed, values outside range would be displayed. This has now been corrected and values are silently set to values between 0.0 and 1.0.

  • Adding new command command pointer atline. The command can be used to change the command pointer for a given command. The command pointer is a positive number indicating from which line the command will start executing the next time a given command is called. The command given without any argument will list the command pointer status for all commands created. If a name is given as argument, the command will list the command pointer status for the specified command. If both a command name and a line number is given, the specified command will have its command pointer set to the given line number. The syntax is:

    command pointer atline [ <command name> [ <line> ]]
    

A negative command line in the listing indicates that the command ha its command pointer set beyond the end of the command. The following two commands are identical in function:

    command restart SOME_COMMAND_NAME
    command pointer atline SOME_COMMAND_NAME 1
  • If a command was created and that command was the last command used and the command gets deleted, its value was still present in the cache of the FindCommand. As such FindCommand would return this value if the command was sought after by all the code that uses FindCommand. This is a very rare case, but a bug. This has now been fixed so FindCommand now returns NULL in the specified case.

  • When using the feeds and stack for videomixing, the frame of feed 0 was made with memset filling zeros. This would set the alpha value for each pixel to zero. Under some circumstances this could potentially lead to noise in the mixed frame. This has now been fixed. This is a bugfix.

  • When setting the source for an audio sink, it was checked if thenumber of channels of the source is equal to number of channels of the sink, but only if the source is an audio feed. Now the check is also done if the source is a mixer. This is a feature enhancement.

  • When setting the source for an audio sink, rate of the source was not checked for being equal to the rate of the sink. This is now done. This is a feature enhancement.

  • Existing command stack is added the command option list. With this option the command will list the existing stack. The syntax is now:

    stack [ list | <feed id> [ <feed id> [ ... ]]]
    
  • Executing the feed par command would result in a message printed if the command succeeded. The command must be silent if succeeded as long as the command feed verbose has yet to be implemented.

  • Executing command text place backgr with the padding parameters and without the RGBA parameters would reset RGBA parameters of the background to 0,0,0,1. Now this no longer happens. This is a bugfix.

  • Adding new command text place backgr alpha to change the alpha value for a text background. The syntax is:

    text place backgr alpha [<place id> <alpha>]
    
  • Adding new command text place backgr rgb to change the color value for a text background. The syntax is:

    text place backgr rgb [<place id> [ <red> <green> blue> [ <alpha> ] ]
    
  • In the syntax printed for command text help, the inconsistent naming of the id number for placed text has where necessary been changed from <id no=""> to <place id="">.

  • In the syntax printed for command text help, the inconsistent naming of the id number for string text has where necessary been changed from <id no=""> to <string id="">.

  • When adding a source map to audio mixer and in verbose mode, the map reported created was printed wrong. This is a buf fix.

  • Adding missing message and messagef to printed list for the help* command.

  • Adding new command image name for associating a name with a loaded image. The syntax is:

    image name [<image id> [<name>]]
    
  • Adding missing function MaxPatterns() to class CVideoShape.

  • Command text help was missing newlines after text place backgr move alpha and text place repeat move. This is a bugfix.

  • When creating the CTclInterpreter class in CController class, it is now checked that the Interpreter was in fact craeated. This is a safety fix.

  • Adding new command tcl reset. The command will delete the Tcl Interpreter and create a new fresh one. All data and setting from the old interpreter is lost. The syntax is:

    tcl reset
    
  • Adding new command tcl help for listing available commands for the CTclInterface class. The command has been added to the output of the help command as well. The syntax is:

    tcl help
    
  • CTextItems::AddString and CTextItems::AddFont would in some cases not count the correct number of strings and fonts. This is a bugfix.

  • Adding command snowmix info to Tcl interpreter. It is now possible to query for Snowmix settings from inside the Tcl interpreter. The syntax are:

    tcl eval snowmix info audio (feed | sink) (info | status | extended | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info audio mixer (info | status | extended | source info |
        source status | source extended | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info command ( names | list | at | syntax ) [ format | <name> ]
    tcl eval snowmix info feed (geometry | status | extended | state | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info image (load | place | move | extended | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info text (string | font | place | move | backgr | linpat | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info (vfeed | virtual feed) (place | move | extended | syntax)
        (format | ids | maxid | nextavail | <id_list>)
    tcl eval snowmix info shape (info | list | place | move)
        ( format | ids | maxid | nextavail | <id_list> )
    tcl eval snowmix info system (info | status | maxplaces | overlay | syntax) [ format ]
    tcl eval snowmix info shape ( syntax | ( ( info | list | place | move )
        ( format | ids | maxid | nextavail | <id_list>) )
    tcl eval snowmix info system (info | status | maxplaces | overlay | syntax) [ format ]
    
    where <id list> = ( <id> | <id>..<id> | <id>..end | all [ <id>.. [ ..]] )
    

The format will list the format used when command is an id list. The ids will return a list of IDs in use. The maxid will return the maximum ID set with the maxplace command. The nextavail will list the next unused ID. The id_list will return return a list of information for the IDs in the list that are in use.

  • Adding command snowmix parse and snowmix parse silent to Tcl Interpreter. It is now possible to parse and execute native Snowmix commands directly from inside the Tcl interpreter. The command or commands can be single line as well as multi line (multiple commands). The syntax inside the interpreter is:

    snowmix parse <command> [ <newline> <command> [ <newline> <command> [ ... ]]]
    snowmix parse silent <command> [ <newline> <command> [ <newline> <command> [ ... ]]]
    snowmix parses <command> [ <newline> <command> [ <newline> <command> [ ... ]]]
    

The command section will be passed over to the parser of the CController class for imidiate execution. This is different from the way tcl eval command has bee programmed to work, where Snowmix commands returned by tcl eval are not executed until the command passed to tcl eval returns. The tcl command snowmix does not return any strings and will return TCL_OK upon success and TCL_ERROR upon failure. It is possible to execute nested commands similar to the following command:

    tcl eval snowmix parse tcl eval <some command>

but it is NOT recommended. The command snowmix parse silent is identical to the command snowmix parse except, the controller channel is set to NULL preventing printing any messages and status on the controller channel where the command is executed from. The command snowmix parses is identical to and a short version for snowmix parse silent.

  • International character support (UTF-8) is now implemented. Needed checking for *ci less than zero in trim_string and initial space parsing in trim_string and controller_parse_command. Command text place grow now supports multibyte characters (ie. UTF-8) international characters.

  • Command help was not listing the seven system output commands:

    system output buffers <buffer count>
    system output delay <frames>
    system output freeze <number frames to freeze>
    system output info
    system output mode <mode>
    system output reset
    system output status
    
  • Adding new command system output freeze which make Snowmix output the same frame for a specified number of frames creating the appearence of a frozen video stream. The command was introduced in 0.4.3, but was not mentioned in the change log nor the release notes.

    system output freeze <number frames to freeze>
    
  • Adding new command system output info which will list information about the systems output configuration. The command was introduced in 0.4.3, but was not mentioned in the change log nor the release notes. The syntax of the command is:

    system output info
    
  • Adding new command system output status which will list the status of the current video output. The command was introduced in 0.4.3, but was not mentioned in the change log nor the release notes. The syntax of the command is:

    system output status
    
  • Replacing macro system_frame_no with macro SYSTEM_FRAME_NO with NULL check of m_pVideoMixer and m_pVideoMixer->m_pController.

  • Setting the clip parameters for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the alpha value for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the rotation value for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the scale values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the move alpha values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the move clip values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the move coor values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the move rotation values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the move scale values for a placed image that does not exist would fail silently. This has now been fixed.

  • Setting the anchor value for a placed image that does not exist would fail silently. This has now been fixed.

  • Fixes in CVideoShape:

    - Allocation of memory for m_shapes was using sizeof shape_t instead shape_t*.
    - Allocation of memory for m_placed_shapes was using sizeof placed_shape_t instead of placed_shape_t*.
    - Allocation of memory for m_patterns was using sizeof pattern_t instead of pattern_t*.
    
  • Fixes in CTextItems:

    - Wrong type used for sizeof in calloc for text_item_t.
    - safe guard for pController in list_help was insufficient.
    - If we fail to allocate mem for string concat, we complain.
    - Potential memory leak in set_text_font if command was malformed.
    - Potential memory leak in set_text_string_concat. Code rewritten and contatenating non existent strings will now fail. Using a source string as destination will now work.
    - potential memory leak in set_text_font for malformed command.
    - m_text_places[id]->pRollerText was not freed in deconstructor.
    
  • Fixes in CAudioSink:

    - Using m_sinks[id] after it was freed in DeleteSink.
    - Double possible NULL reference for m_sinks[id] in SetSinkBufferSize.
    
  • Fixes in CAudioFeed:

    - Unnecessary setting n= -1 in set_feed_add.
    - Possible NULL reference for m_feeds[id] in SetFeedBufferSize.
    
  • Fixes in CVideoMixer:

    - StopMixer was referencing m_pVideoMixer->m_pController without NULL check (system_frame_no).
    - AddAudioToMixer was not checking against divide by zero.
    - Update unnecessary initialized pSource.
    - pSource->pAudioQueue was used in Update (inserting silence) without NULL checking
    
  • Fixes in CVideoFeed:

    - m_pixel_bytes was not checked against zero in feed_set_idle before used for calloc and allocated mem was not checked against NULL.
    - feed->width and height was not checked against zero before used in calloc.
    
  • Fixes in CVideoMixer:

    - Potential NULL reference for m_pController and m_pMonitor when outputting to monitor for output_producer.
    - Potential NULL reference for m_pCairoGraphic when writing PNG file in output_producer.
    - Potential NULL reference for m_pVideoImage in OverlayImage.
    
  • Fixes in CVirtualFeed:

    - Potential memory leak in SetFeedName (although less likely).
    - Deconstructor of class will use DeleteFeed to delete vfeeds.
    - Memory leak when deleting a feed. pMatrix was not freed
    
  • Fixes in CVideoOutput:

    - In MainLoopTimed buf could potentially be NULL.
    - In MainLoop last_buf was set and never used.
    
  • Fixes in CController:

    - ip_to was unnecessary intialized to a value never read.
    
  • Fixes in CCommand:

    - Double initialization of pC in CommandCheck.
    - p could potentially be NULL in DeleteCommandByName.
    - In DeleteCommandHead, the right part of the tree was not deleted correctly potentially producing a double free.
    - Potential memory leak of allocated space in case of errors is fixed
    
  • Fixes in CVideoImage:

    - set_image_load could potentially be called with ci == NULL
    - dead storage for number_of_pases in LoadImage.
    - width or height could potentially be zero for an image to load.
    
  • Fixes in CTclInterface:

    • Dead storage res removed in CTCLInterface. Optimization.
    • Memory Leak of script_name in set_tcl_exec in CTclInterface. Optimization.
  • Fixed potential division with zero in MakeRMS in audio_util.cpp.

  • The include file malloc.h resides in /usr/include/malloc/malloc.h on OS X, while it resides in /usr/include/malloc.h. This prevented compilation on OS X. This has now been fixed. This was primarily a compiler issue.

  • Printing u_int64_t on amd64 Linux require a long unsigned int (%lu) while on i386/i686 it require a long long unsigned int (%llu). The definition of WORDSIZE == 32 or 64 determine this. On OS X (using LLVM 5.0) the WORDSIZE is 64, but still require a long long unsigned int (%llu). This has now been fixed in various files primarily audio_feed.cpp, audio_mixer.cpp and audio_sink.cpp. This was primarily a compiler issue but it can have lead to strange output of verbose and status messages.

  • In CVideoOutput::CVideoOutput the variable m_pOutput_memory_list was not set to NULL. This had no apparent effect on Linux, but could fail on other platforms as head of list was undetermined. This is a bug fix.

  • In CVideoOutput::InitOutput the buffer allocated for each frame accounting was set to size of pointer of pointer to output_memory_list_type instead of size of output_memory_list_type. This had had no effect on Linux by pure luck. This could sometimes fail on other platforms. This is a bugfix.

Changelog for older versions of Snowmix

See also Changelog for Snowmix 0.4.0-0.4.3
See also Changelog for Snowmix 0.3.x


Related

Discussion: Snowmix 0.4.0 Released - Adding support for Audio Mixing
Discussion: New version 0.4.4 available
Discussion: SNowmix version 0.4.2 Released
Discussion: Version 0.4.5 Released
Discussion: New version 0.4.1 released
Discussion: New version 0.4.3 released
Wiki: Changelog 0.4.0-0.4.3
Wiki: Changelog-0.3.x
Wiki: Home
Wiki: Release Notes
Wiki: Snowmix Guide
Wiki: Snowmix News