transform-swf-updates Mailing List for Transform SWF for Java (Page 2)
Brought to you by:
smackay
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
|
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(7) |
Jul
(9) |
Aug
(1) |
Sep
(3) |
Oct
(5) |
Nov
(1) |
Dec
|
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-06-04 17:06:44
|
Breaking News: There will be an alpha release next week - there are only one or two random bugs left and all the tests are passing but I don't want to rush out a release on a Friday just in case I missed something. Since all the tests are passing it seems likely that a beta version will be released shortly - certainly before the end of June and hopefully in the next week or so. Progress this week: API Changes: Simplified Movie by moving the version, compressed, frameSize and frameRate attributes into a new class MovieHeader. Movie is now purely a container class. It is also easier to write custom decoders which for example only decode the meta data on a movie. The decodeFromStream() and encodeToStream methods on Movie are now private. Compressed Flash files contain a mix of uncompressed and compressed data therefore the stream passed to the method was not necessarily the stream used to handle the encoding / decoding. For writing the encoding stream has to be closed to ensure all data is flushed to the file. To do this the stream actually used had to be returned so the calling code could close the correct one. This was ugly so the Movie class was simplified to make it easier to write custom encoders and decoders when required. Added the method decodeFromUrl(URL) to Movie to make it easier to read files from a network. The method is simple with no reries if there is an error. If retry functionality is needed then a custom decoder i.e. your own version of Movie must be written - however that is really easy to do by simply copying the existing Movie class and modifying the read(URL) method. This is probably the last of the changes to public methods so the API can be considered extremely stable, if not actually frozen. Code Changes: Simplified Context so the variables are accessible directly. Moved classes that handle decoding of the different types of object to packages to minimise the number of import directives. Coalesced all widely used constants into the SWF class. Moved ImageTag from com.flagstone.transform.coder to com.flagstone.transform.image. Moved MovieTag from com.flagstone.transform.coder to com.flagstone.transform. Moved DefineTag from com.flagstone.transform.coder to com.flagstone.transform. Refactored (cleaned up) coder classes to make them more independent and removed unused code. Testing: Resolved the issue with decoding DefineFont3. This problem is a bug in Flash where the containsLayout flag is not set if the font definition is followed by a FontAlignment tag even though the font definition does contain layout information. Closed Tickets: #30 Upgrade coder classes to support streams directly. #49 Add Event which merges (and replaces) MovieClipEvent and ButtonEvent. #121 Update Maven assembly to generate jars for sources and docs. #126 Group reads and write of bit fields into byte accesses. #127 Remove length attribute when passing a stream to ImageDecoder. #128 Remove length attribute when passing a stream to SoundDecoder. #130 Upgrade JPGDecoder to filter extension blocks. Closed Conditionally: #131 SoundDecoders should only load data on demand. This is closed for MP3 files where frames are only loaded on demand but this cannot be imp'lemented for WAV files since the the FMT block which defines the sound may be decoded from a file after the DATA block which contains the sound samples. This means that a WAV file must be completely loaded into memory before it can be processed. Open Tickets: #122 Register and deploy to a central Maven repository. #125 Add support for decoding files with hidden actionscript. Regards, Stuart -- Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-29 21:49:07
|
First: No alpha release yet. Progress this week: API Changes: Removed the identifier attribute from Movie. While getting movie to keep track of the identifiers used for object definitions was somewhat useful, it complicated the code and slowed the decoding of Movies. Now you will have to maintain the counter in your code rather than relying on Movie to do it. Separated out the Flash Video (FLV) related code. It will be added to a new project. Code Changes: Encoding and Decoding Movies is now based on streams. The SWFDecoder now supports an internal buffer where the data is loaded from the underlying stream before being decoded. Similarly the SWFEncoder uses the buffer to write to the underlying stream in blocks. Removed as many bit fields reads and writes, instead grouping them into calls to readByte / writeByte. These two changed combined seem to have contributed to a MAJOR increase in speed - the code is at least twice as fast. The increase is probably a result of the code changes but perhaps more importantly the reduction in memory use - it is certainly obvious when the garbage collector runs between tests. Previously tests on the real-world Flash files has to run with the JVM setting -Xmx256m. Now that is no longer necessary :) Testing: There are still a few issues when decoding DefineFont3 objects. Most decode without any problems but there are a few cases that cause unbderflow errors. The root cause is not known - there might be some functionality that is poorly described or not listed in Adobe's file format specification. Planned for next week: Adding support for streams took waaaaay more work then expected so next week's plan is the same plan as last week: More debugging and a decision on whether to have an alpha release of the code. Overall Progress: Transform now fully supports Flash 10. Now passing tests to decode, encode and copy 300 real-world Flash 8 and Flash 9 files - except some DefineFont3 tags. AWTDecoder is able to render text using Java AWT Fonts. TTFDecoder is able to render text using TrueType Fonts. BMPDecoder is passing all acceptance tests for Window BMP images. JPGDecoder is passing all acceptance tests for JPEG images. PNGDecoder is passing all acceptance tests for JPEG images. BufferedImageDecoder is mostly passing acceptance tests for PNGimages. WAVDecoder is passing tests for generating event and streaming sounds. MP3Decoder is passing tests for generating event and streaming sounds. Canvas is passing tests for drawing shapes. Open Tickets: #49 - Add Event which merges (and replaces) MovieClipEvent and ButtonEvent. #125 - Add support for decoding files with hidden actionscript. #121 - Update Maven assembly to generate jars for sources and docs. #122 - Register and deploy to a central Maven repository. #126 - Group reads and write of bit fields into byte accesses. Closed - but Trac is not updated yet. #30 - Upgrade coder classes to support streams directly. #43 - Sound decoders do not report incorrect sample rates. General Tasks Still ToDo: Assess test coverage. Fix problems reported by PMD. Complete suite of Unit Tests. Remove all the magic numbers reported by CheckStyle Add javadoc comments for all methods and fields. Review the javadoc comments. It has been a good week with great progress. Stuart -- Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-21 16:08:10
|
Progress this week: API Changes: 1. Added the CharacterSet convenience class for creating sorted lists of character codes for generating font definitions. 2. Added a new method to the SoundDecoder interface to specify the number of frames when generating a streaming sound. This should be useful when adding soundtrack to Movies where the soundtrack is longer than the movie and so avoids having to read the entire sound before generating the necessary objects. 3. Moved the methods in Place2.Builder and Place3.Builder back to being static methods on the parent class since the Builder classes were not full Builders and using as static methods is easier. 4. Added convenience methods to Bounds to generate a new bounds increased by a padding amount. Code Changes: 1. Added character encoding to Context to simplify SWFEncodable interface and simplify unit test classes. 2. Added TrueTypeGlyph to support decoding glyph information from TrueType fonts. Testing: 1. Acceptance tests for the sound decoder classes for playing MP3 files as streaming sounds are passing. 2. Acceptance tests for generating fonts displaying text using AWTDecoder and TTFDecoder now pass. 3. Acceptance tests for displaying PNG images using BufferedImageDecoder now pass but with a few issues with colour. 4. Added a test reports to quickly allow the results from the integration tests. 5. Reogranised tests and test resources to allow failsafe plugin to run integration tests and provide better integration with Maven. Documentation: 1. Cleaned up most of the javadoc problems reported by CheckStyle - leaving only undocumented methods and fields to add. Planned for next week: More debugging and a decision on whether to have an alpha release of the code. Overall Progress: Transform now fully supports Flash 10. Now passing tests to decode, encode and copy 300 real-world Flash 8 and Flash 9 files. AWTDecoder is able to render text using Java AWT Fonts. TTFDecoder is able to render text using TrueType Fonts. BMPDecoder is passing all acceptance tests for Window BMP images. JPGDecoder is passing all acceptance tests for JPEG images. PNGDecoder is passing all acceptance tests for JPEG images. BufferedImageDecoder is mostly passing acceptance tests for PNGimages. WAVDecoder is passing tests for generating event and streaming sounds. MP3Decoder is passing tests for generating event and streaming sounds. Canvas is passing tests for drawing shapes. Open Tickets: #30 - Upgrade coder classes to support streams directly. #43 - Sound decoders do not report incorrect sample rates. #49 - Add Event which merges (and replaces) MovieClipEvent and ButtonEvent. #125 - Add support for decoding files with hidden actionscript. #121 - Update Maven assembly to generate jars for sources and docs. #122 - Register and deploy to a central Maven repository. #126 - Group reads and write of bit fields into byte accesses. General Tasks Still ToDo: Assess test coverage. Fix problems reported by PMD. Complete suite of Unit Tests. Remove all the magic numbers reported by CheckStyle Add javadoc comments for all methods and fields. Review the javadoc comments. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-17 10:21:54
|
Transform SWF 2.3.3 for Java is now available for download. This release fixes two bugs when decoding AWT Fonts to generate font definitions using the FSTextConstructor. Bug Fixes: * Using characters with high value character codes causes errors. * AWT Fonts on Mac OSX are offset. Release notes: http://www.flagstonesoftware.com/downloads/transform-java-2.3.3.txt Downloads: http://www.flagstonesoftware.com/downloads/index.html Regards, Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-15 14:57:36
|
Another week with lots done: API Changes: Actions are now immutable to speed up copying of movies. Nested Builder classes were created for ExceptionHandler, NewFunction[2] & Push. Moved the static methods on Place2 and Place3 into a nested Builder class. Renamed identifier() method on Movie to nextIdentifier() so its purpose is clearer. Deleted ArraySIzeException - only used a couple of times and having an extra class did not justify it. Deleted StringSIzeException - only used a couple of times and having an extra class did not justify it. Code Changes Added envent codes to the enum MovieClipEvent to simplify the code in MovieClipEventHandler. Code Cleanup Removed all the errors and most of the warnings reported by PMD. Only complexity warnings remain which will be fixed in due course. Removed the rect, circle and ellipse methods from canvas to reduce the class size. The code will be made available in the cookbook. Converted a large number of magic numbers into constants to make the code easier to read. A lot remain which will be fixed in due course. Testing Acceptance tests for the image decoder classes for displaying BMP, JPG and PNG are passing (with 1 or two exceptions). Acceptance tests for the sound decoder classes for playing WAV and MP3 files as event sounds are passing. Acceptance tests for the sound decoder classes for playing WAV files as streaming sounds are passing (MP3 files are failing). The plan for next week is to concentrate on getting the remaining acceptance tests passing, then review the implementation plan and take a decision on releasing the code as an alpha or or possibly beta. Regards, Stuart Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-07 14:49:42
|
Well that didn't take long. Admittedly there were only two new classes (DefineFont4 and DefineJPEGImage4) and a new sound format (Speex) to deal with. It will be interested to see if there is anything missing from the file format specification published by Adobe - there was quite a bit missing from the Version 9 specification. Regards, Stuart MacKay Flagstone Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-05-07 13:39:04
|
After a pause of a couple of weeks I made excellent progress over the past five days. Version 3.0 now passes encoding, decoding and copying tests for 299 out of 300 real-world Flash 8 and Flash 9 files. This is the same type of tests that I used for acceptance tests of the current 2.3 version so at this point I am tempted to declare (a tactical) victory and release at least an alpha version - though this is probably a little premature since the utilities classes for adding imags etc are still untested. The next stage will be to add support for Flash 10 since the changes published in the specification are relatively minor. From there the utilities classes will be tested and a beta declared. After that the polishing of documentation, unit tests and other "housekeeping" tasks will proceed. Regards, Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-04-13 09:00:25
|
When an AWT Font object is used to generate a font definition on Mac OS X the characters are offset vertically. The problem appears to be the way the TrueType <https://sourceforge.net/apps/trac/transform-swf/wiki/TrueType> fonts are decoded by Java. In Sun's JDK 1.4 no translation was required as font glyphs were decoded but that changed in JDK 1.6 so the translation was applied. First assessment is that Apple's version of Java 1.6 operates the same as 1.4 so the translation in the current version is wrongly applied. It is hoped to have a fix ready for a scheduled release at the end of April. -- Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-04-13 08:49:34
|
In Transform SWF 2.3.2, when displaying characters with a character code of 16384 or more then an exception is thrown: java.lang.ArrayIndexOutOfBoundsException: -3999 at com.flagstone.transform.util.FSTextConstructor.advancesForGlyphIndice (Unknown Source) at com.flagstone.transform.util.FSTextConstructor.defineText(Unknown Source). The problem is the use of short[] for the tables used to index the glyphs. When a character code of 16384 or higher is stored in a table and read back it is not bit-masked so the value gets sign-extended. The result is that a negative value is used to index into the table containing the advances for each character. A patch has been uploaded for the ticket: https://sourceforge.net/apps/trac/transform-swf/ticket/123 A new release will be posted at the end of April once one other issue regarding the display of fonts on Mac OS X systems, see Ticket 124 has been resolved. -- Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-04-09 16:00:21
|
Last week was cut short by the Easter weekend so there was not much to report. This week, though I did not have much time has gone well. Out of a small set of Flash 8/9 files version 3 can now decode 16 out of 20. Interestingly the files which have problems in decoding do not appear to follow the Flash File format specification. At this point is not possible to tell whether the app that generated them was buggy or perhaps there is some fields that are not documented in the specification. Next step is to spend a little more time investigating the files that are failing, then if the root cause cannot be found for now, add them to the to-do list and start expanding the suite of test files to see if the errors are consistent. From there start testing the encoding process. Regards, Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-03-29 14:26:06
|
Started running the acceptance tests with Flash 8 and Flash 9 files. Since the code is running well with files up to Flash 7 this will hopefully accelerate the development process allowing at least a fully functioning beta release while the work on the unit tests and other project related tasks is completed. Regards, Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-03-21 16:37:23
|
Completed the work started last week on running the acceptance tests for encoding and decoding movies. The complete suite of real-world Flash files - up to Flash 7 - can now be successfully decoded and encoded then re-decoded. This means that the version 3.0 code can now be used to do useful work - though problably the best approach is to use it for porting existing applications. Regards, Stuart -- Stuart MacKay, Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-03-13 14:06:21
|
After a long pause work started in earnest to get version 3.0 out of the door. Here's a summary of what was completed: 1. Refactoring of packages moved all the video related classes into com.flagstone.transform.video. Previously the classes were spread across several packages since video can be encoded in SWF as well as FLV files. Moving everything into com.flagstone.transform.video helps reduce the size of other packages, particularly com.flagstone.transform and makes it easier to find all video related code. 2. Added a new class, PropertyValue which is used to handle undocumented or incorrectly encoded properties that prevent an enum Property being used. This appears to be a problem in Flash 4 files only. 3. Added new milestones and tasks to the project portal at http://sourceforge.net/apps/trac/transform-swf/roadmap Not all of the completed tasks are marked but over the next few weeks you should be able to get a reasonable view of how the project is progressing. 4. Ran the acceptance tests for Movies. 351 out of 359 files from a set of open source files downloaded from FlashKit can be now decoded and encoded successfully. There are some issues that cause the decoding to run out of control and there are problems reading/writing bit fields that extend across 32-bit word boundaries but generally this means that the current snapshot from the repository can be used to read/write files up to Flash 7. Files for Flash 8 and 9 will be added but not until more unit tests are written and passing. Overall I am pretty pleased with progress and hope to build more momentum in the project over the next few days. The next status update will be at the end of next week. Regards, Stuart MacKay Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-03-05 16:26:29
|
After a long pause due to work and family commitments development work on Version 3.0 of Transform SWF, which will include support for Flash 8 & 9 has now been restarted. Regular progress reports (probably weekly) will be posted to this list with descriptions of any changes (refactoring) to the current codebase. The first task is to continue updating the unit tests. The test patterns for all the different variations in the way each object is encoded and decoded is not stored in YAML files. This makes it easier to add new patterns without having add new tests. One sticking point previously was the converting the binary data into Base64 so it can be stored in the YAML file however Notepad++ and an improved version of the HexEditor plugin now makes the conversion process a lot easier and faster. Regards, Stuart -- Flagstone Software Ltd. |
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2009-07-31 13:10:58
|
Transform SWF 2.3.2 for Java is now available for download. This release fixes bugs when encoding movies with not UTF-8 character sets and improves the handling of sound files. Bug Fixes: 41. FSMovie does not set the character encoding in FSCoder. 42. FSSoundConstructor accepts sounds with any sample rate. 48. Extended arrays in FSShapeStyle are encoded as bit fields The release notes, http://www.flagstonesoftware.com/downloads/transform-java-2.3.2.txt has all the details. Regards, Stuart -- Stuart MacKay Flagstone Software Ltd. |