Wednesday, July 08, 2009

PERFORCE INTEGRATION ON THE MAC OF XCODE FRAMEWORK

P4V on the mac is once again lacking of UI quality... Obviously the quality of p4v is far behind the Windows Version. An other reason for me not to like the MAC... When it comes to integrate XCode Frameworks from a remote depot or a branch, it is crucial to add the -t flag to preserve the symlink of XCode Framework else the symlink will be treated as text file leading to compilation errors.... On windows the -t option is available through the UI when doing the integration or the preview of the integration the "preserve file type" check box but on the MAC you are screwed... You need to use p4 command line tool. To do so the easiest way consist in creating a .p4config file that you can store at the root of the current logged in user.


cd ~/
type > .p4config
vi .p4config
P4CLIENT=WORKSPACE
P4USER=P4User
P4PORT=fullyqualifiedperforceservername:1666
:w!
export P4CONFIG=/Users/CurrentUser/.p4config
p4 login
type password
now
p4 integrate -o -t -b "branchspec" //...@changelist

You can refresh p4v to view the integration changelist and you can merge
or most of the time accept theirs changes.
Finally you can check in to perforce in the depot

Thursday, June 25, 2009

HTC is my new Hero

My next phone. HTC / GOOGLE / ADOBE = KILLER COMBINATION

http://www.adobe.com/devnet/devices/articles/htchero.html

http://www.htc.com/europe/product/hero/specification.html

Monday, June 15, 2009

PDF and ITUNES poorly supported and iTunes COM SDK on Windows is getting older and older....

Well recently, I discovered that iTunes is not doing a good job at all when adding PDF file to iTunes. Let's say you decided to have iTunes automatically "organize" your iTunes files, iTunes will move the PDF file automatically under your iTunes Music folder under Unknown Artist and Unknown Album for instance C:\Documents and Settings\[current user]\My Documents\My Music\iTunes\iTunes Music\Unknown Artist\Unknown Album\. Unknown artist is by the way the most famous music band in the world and Unknown Album the best Album in the world. Almost all artists have an album with this name nowadays if they use iTunes or Windows Media Player. So APPLE should know better... For instance that Adobe introduced the XMP Metadata container which comes with free Adobe SDK to embed and extract Metadata from a various range of files including PDF. So it would be nice to do something with the metadata already present in a PDF file when adding a PDF to iTunes. Food for thoughs for Apple to make iTunes better. So if you add a files to iTunes using the COM SDK first add the file to the library, then right away to a playlist of your choice before tagging the track inside iTunes else you are screwed because iTunes would have moved the file again after you tag the file with no API to get the new location...


Finally it would be GREAT to update the iTunes COM SDK for one missing serious API :

iTunes COM SDK has no API to retrieve by filename (r.e.t.a.r.d.e.d.) so, unless thirdparty create a hash map of all iTunes Track the only way is to just iterate like drooling lamers. The advantage of a file name is that a full URI is unique on a file system per machine domain so this WOULD BE for sure a great way of accessing a music track inside iTunes.

More on XMP and PDF here

http://xml.coverpages.org/XMP-Embedding.pdf

Tuesday, June 09, 2009

rant: Apples new MacBook family just SUCKS

love it !

http://riajournal.com/ria/index.php/2009/06/08/apples-new-macbook-family-just-sucks/

Thursday, June 04, 2009

XCode Frameworks Versioning - How to find the version of a Framework

XCode and in general coding on the mac is not my cup of tea.... I think those expensive mac are good to play but not good to write code quicker than with Visual Studio 2008. XCode has a weird multiple window concept and force you to do some weird human interface action all over the place. The debugger is slow,
The Clean feature is slow as hell....

Anyway i wanted to talk about versioning :

When it comes to identify bug the version of dll on window are very usefull. Incremental file version each time you build and distribute the component to third party will help developers to diagnose and address bugs in an efficient manner.
On the mac the concept of dll didn't exist per say but the mac is using a similar mecanism through Frameworks and Bundle. When you browse for an Application you can right click and expand the package nd find out the dependency with third party frameworks or XCode Frameworks. If you want to get some information about the file version of a frameworks simply browse for the following

\debug\osx10\MySample.framework\Versions\A\Resources\Info.plist

The Plist will look like this

< have been replace by { and > by }

{?xml version="1.0" encoding="UTF-8"?}
{!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"}
{plist version="1.0"}
{dict}
{key}CFBundleDevelopmentRegion{/key}
{string}English{/string}
{key}CFBundleExecutable{/key}
{string}PlugPlug{/string}
{key}CFBundleIdentifier{/key}
{string}Bla bla{/string}
{key}CFBundleInfoDictionaryVersion{/key}
{string}6.0{/string}
{key}CFBundleLongVersionString{/key}
{string}1.0.0 (C) 2008 Freedom of Speech, Inc. All rights reserved.{/string}
{key}CFBundleName{/key}
{string}PlugPlug{/string}
{key}CFBundlePackageType{/key}
{string}FMWK{/string}
{key}CFBundleShortVersionString{/key}
{string}1.0.0{/string}
{key}CFBundleSignature{/key}
{string}Freedom of Speech{/string}
{key}CFBundleVersion{/key}
{string}1.0.0{/string}
{key}CSResourcesFileMapped{/key}
{string}yes{/string}
{/dict}
{/plist}

Friday, May 22, 2009

Flash and PaperVision Play With Spider

OneMotion.com has put together a nice experiment using flash and 3D (Papervision).
The demo is a spider crawling around following your mouse in 3D perspective. There is a crontrol panel to alter different characteristics of the spider (Body Scale, Speed and Velocity, Leg Reach, Height (shadow) etc…

http://www.onemotion.com/flash/spider/

Wednesday, May 20, 2009

Streaming A Live Event Using Mogulus

Mogulus live broadcast tool seemed to be able to pull off the task of streaming the show for a pretty decent cost, and with only about 15 minutes of setup time. Their free streaming service only allows for 50 concurrent connected viewers, and for a streaming data rate of around 500kbps, but it may do the trick. We still have to get a feel for how the online streaming shows popularity is going to play out. If you shell out the $350 per month, you can have HD quality streaming, remove all of the ads, have access to a white label player, be provided deep Analytics for your page viewers, and more importantly…have unlimited amounts of viewers. Pretty smoking Deal.

http://www.livestream.com/

Web Camera in Flash

Setting up a webcam in Flash has always been pretty simple. There are two cases in flash that you would use the webcam in a project: Streaming video for video chat or using it as a tool to take a photo(snapshot). These two cases have completely different purposes and thus you want your camera setup properly for each.

Setup Your Camera
First, let’s setup your camera and a video instance for playback. This code will setup a default camera and default video instance. Both will be setup for 320×240 playback.

1 var camera:Camera = Camera.getCamera();
2var video:Video = new Video();
3 video.attachCamera(camera);
4 addChild(video);


Setup Camera for Streaming Video Chat

Setting up your camera for streaming video chat involves a little more work and planning than just using it to take a photo within the player. Streaming video will require you to sacrifice video quality for speed, especially if you need to sync the video with audio. There are two methods of the Camera class that we will use to balance video quality and frame rate with bandwidth: Camera.setQuality() and Camera.setMode(). setQuality() is used to specify bandwidth and overall image quality of the Camera’s output video. Adobe’s Help Documentation has this to say:

» To indicate that bandwidth use takes precedence, pass a value for bandwidth and 0 for quality . Flash Player transmits video at the highest quality possible within the specified bandwidth. If necessary, Flash Player reduces picture quality to avoid exceeding the specified bandwidth. In general, as motion increases, quality decreases.
» To indicate that quality takes precedence, pass 0 for bandwidth and a numeric value for quality . Flash Player uses as much bandwidth as required to maintain the specified quality. If necessary, Flash Player reduces the frame rate to maintain picture quality. In general, as motion increases, bandwidth use also increases.
» To specify that both bandwidth and quality are equally important, pass numeric values for both parameters. Flash Player transmits video that achieves the specified quality and that doesn’t exceed the specified bandwidth. If necessary, Flash Player reduces the frame rate to maintain picture quality without exceeding the specified bandwidth.
Lets setup our code to have medium compressed quality and a frame rate of 15.

1 var bandwidth:int = 0; // Specifies the maximum amount of bandwidth that the
2 current outgoing video feed can use, in bytes per second. To specify that Flash
3 Player video can use as much bandwidth as needed to maintain the value of quality
4 , pass 0 for bandwidth . The default value is 16384.
5 var quality:int = 50; // this value is 0-100 with 1 being the lowest quality. Pass 6 0 if you want the quality to vary to keep better framerates
7 var camera:Camera = Camera.getCamera();
8 camera.setQuality(bandwidth, quality);
9 camera.setMode(320,240,15,true); // setMode(videoWidth, videoHeight, video fps,
10 favor area)

// Now attach the webcam stream to a video object.
var video:Video = new Video();
video.attachCamera(camera);
addChild(video);

Depending on your project, you can change bandwidth, quality, and frame-rate settings to find the best combination. It is recommended to set the video capture size smaller, then stretching it up. This will allow for a higher frame rate since you are sending smaller video that is stretched. The video is a littler blurry, but if you plan on having lots of movement, having a higher frame-rate will be more important.


Setup Camera to take a photo (snapshot)

This type of configuration isn’t a whole lot different the the code example above. The main difference is that we aren’t passing constant amounts of data to a streaming server each second. Instead, we just need to get the camera’s data once. So, we can up the quality and frame rate to our hearts content (granted the user’s hardware allows for the settings).

Here is the above example, but with maxed out configuration for high photo quality.



1 var bandwidth:int = 0; // Specifies the maximum amount of bandwidth that the
2 current outgoing video feed can use, in bytes per second. To specify that Flash
3 Player video can use as much bandwidth as needed to maintain the value of quality 4 , pass 0 for bandwidth . The default value is 16384.
5 var quality:int = 100; // this value is 0-100 with 1 being the lowest quality.
6 Pass 0 if you want the quality to vary to keep better framerates
7 var camera:Camera = Camera.getCamera();
8 camera.setQuality(bandwidth, quality);
9 camera.setMode(320,240,30,false); // setMode(videoWidth, videoHeight, video fps, 10 favor area)
11 var video:Video = new Video();
12 video.attachCamera(camera);
13 addChild(video)

AJAX Web Cam

AJAX Cam is a lightweight webcam script to automatically refresh an image on your webpage without having the whole page refresh. This saves on bandwidth, and makes for a better looking presentation.

http://www.ajaxcam.com/

Web Cam Driver Robot

http://driver-pro.com/related/english/device-driver-updates/?gclid=CJ6SmtXhy5oCFShRagodlA3D2w&hit=1&adurl=15809

Flash Media Server Live Video Record and Playback
Using FMS File Object For Dynamic File Play and Delete


This is an update of the Adobe supplied demo to record and playback a single flv file. This version keeps the same skin but includes user supply of the file name, using the FMS server side File class to provide a list of flv files for the current application instance, calling a server side function and returning results, dynamically maintained list of recorded files to play, deleting of the files and dynamic input of the uri connection string.
Rebuilt and updated of the Macromedia FMS tutorial_record adding in a dynamic uri for connection, disconnecting, a video selection combo that gets the list from the server side main.asc and a delete function. Reset the layers more functionally. Updated components to V2 and removed V1 components

http://www.hosfordusa.com/?p000100000119000000


Flash Media Server Text Chat Example

This is a Flash 8 AS 2 update of the Adobe supplied demo for a text chat on FMS server. Includes the V2 UI components and improvment of various coding elements. Improved the code comments.

For FMS2 you do not need a main.asc file in the application folder to try this.

Inside the FLA the following line requires your FMS server URI and then republish the movie:
var c_FmsUri:String = "rtmp://yourFMSdomain/tutorial_textchat/

http://www.hosfordusa.com/?p000100000142000000