patchGnash - The GNU Flash player - Patches: patch #6747, Gnash feature: Force movie to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6747: Gnash feature: Force movie to scale with exactfit

Submitter:  Kristian Frank Erikson <splint84>
Submitted:  Mon 16 Feb 2009 07:09:25 AM UTC
   
 
Category:  gui Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Open

Jump to the original submission

Thu 06 Jan 2011 01:18:33 PM UTC, comment #9: 

The second patch is better, but still needs improvement by storing a required fixed scale mode in just one place, then setting it and refusing to change the scale mode if this fixed one was set.

For setting an initial scale mode that the SWF is allowed to change later, no patch is required.

Benjamin Wolsey <bwy>
Group Member
Tue 01 Dec 2009 12:05:18 PM UTC, comment #8: 

Hi Benjamin

I've basically implemented the solution you suggest now against the latest trunk, hoping I can get you to add this one to the main trunk now.

Your solution was much more elegant I think. So thanks for your help in suggesting it, and helping with answering my silly questions :)

(file #19174)

Kristian Frank Erikson <splint84>
Tue 17 Nov 2009 12:34:49 PM UTC, comment #7: 

Nevermind that question. Upon more investigation I found http://www.gnu.org/software/gnash/manual/gnashuser.html#gnashrc and answered my own question. Sorry.

Kristian Frank Erikson <splint84>
Tue 17 Nov 2009 12:03:05 PM UTC, comment #6: 

Thanks so much Benjamin :)

Following your advise I've looked at the code and implemented something I think will work. It compiles... But.

I've got a (possible) silly question. I'm on a Ubuntu 9.10 machine. How do I set this rcfile value so I test if it works?

Kristian Frank Erikson <splint84>
Mon 16 Nov 2009 02:25:11 PM UTC, comment #5: 

See rc.h and rc.cpp. The closest to what you want is probably the quality setting, so you could look at that for a starting point.

Also bear in mind that there is a standard variable "salign" that you can pass in the FlashVars to a flash player (including Gnash). It won't prevent the SWF from changing the scale mode later, but sets the starting mode.

Benjamin Wolsey <bwy>
Group Member
Mon 16 Nov 2009 10:52:22 AM UTC, comment #4: 

I've updated the patch for Gnash 0.8.6.

However, it is still the same implementation.

Benjamin:
I would like to try create an implementation like the one you mentioned: "The simplest way would be an rcfile entry, which movie_root could check on construction (_scaleMode), and then refuse to change scale mode if requested by the SWF."

However. I'm not sure how to create this rcfile entry, or which it is... Can you please point me in the direction of source code for this?

(file #19068)

Kristian Frank Erikson <splint84>
Wed 01 Apr 2009 04:28:35 AM UTC, comment #3: 

Hi Sandro

You right, but we'll probably have situations where we'd like to be able to force a particular type of scaling. If we're trying to play 3rd party swf's and their scaling has been incorrectly set for instance, it's an easy way for us around that issue.

I will look at developing it into an rcfile entry, but I'm not quite sure how that works yet, and this patch is not a priority project atm, as the current patch works.

However, I probably will be looking to develop a more solid solution soon, as updating the patch to match the trunk quickly gets tedious.

Kristian Frank Erikson <splint84>
Fri 13 Mar 2009 02:35:24 PM UTC, comment #2: 

Kristian, as I get you're in control of those SWF movies,
wouldn't it be easier to set Stage.scaleMode in ActionScript directly ?

Sandro Santilli <strk>
Group Member
Sat 07 Mar 2009 12:44:43 PM UTC, comment #1: 

I wouldn't be against putting something like this in trunk, but there shouldn't be any need to clutter up the GUI like that.

Scale mode is a property of the Stage (movie_root), and there's no reason why Gnash can't provide an override. The simplest way would be an rcfile entry, which movie_root could check on construction (_scaleMode), and then refuse to change scale mode if requested by the SWF.

Benjamin Wolsey <bwy>
Group Member
Mon 16 Feb 2009 07:09:25 AM UTC, original submission:  

This patch was developed for eyemagnet as they wanted to be able to force an .swf to scale with the flash exactFit stage scaling mode.

I have attached some screenshots to try demonstrate what the plugin does exactly.

I hope this will make it into the Gnash main trunk, but if it does not then that's ok too. In that case hopefully posting it here will prove useful to someone else.

Kristian Frank Erikson <splint84>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19174:  gnash_rev.11615-Force_Exact_Fit.patch added by splint84 (4KiB - application/octet-stream - Patch for latest revision 11615, with Benjamin Wolsey's suggestions implemented.)
file #19068:  gnash_0.8.6-SWF_Scale_override.patch added by splint84 (7KiB - application/octet-stream - Patch updated for version 0.8.6)
file #17914:  swf-scale-rev.10692-fixed.patch added by splint84 (7KiB - text/x-diff - Patch for revision 10692 for tutorial on http://wiki.gnashdev.org/w/index.php?title=TargettingGnash)
file #17589:  swf-scale-0.8.5.patch added by splint84 (7KiB - text/x-patch - Version specifically targeted for new release 0.8.5)
file #17461:  Gnash-force-exactfit.patch added by splint84 (7KiB - text/x-diff - Patch with screenshots attached)
file #17462:  timeline.swf_without_exactfit.png added by splint84 (60KiB - image/png - Patch with screenshots attached)
file #17463:  timeline.swf_with_exactfit.png added by splint84 (77KiB - image/png - Patch with screenshots attached)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by bwy (Posted a comment)
  • -email is unavailable- added by splint84 (Submitted the item)
  • -email is unavailable- added by splint84
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-06 bwy StatusNone Wont Do
    2009-12-01 splint84 Attached File- Added gnash_rev.11615-Force_Exact_Fit.patch, #19174
    2009-11-16 splint84 Attached File- Added gnash_0.8.6-SWF_Scale_override.patch, #19068
    2009-04-13 splint84 Attached File- Added swf-scale-rev.10692-fixed.patch, #17914
    2009-03-04 splint84 Attached File- Added swf-scale-0.8.5.patch, #17589
    2009-02-16 splint84 Attached File- Added Gnash-force-exactfit.patch, #17461
        Attached File- Added timeline.swf_without_exactfit.png, #17462
        Attached File- Added timeline.swf_with_exactfit.png, #17463
        Carbon-Copy- Added splint84

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code