Lizzy v1.1.1

christophedelory.playlist.asx
Class Asx

java.lang.Object
  extended by christophedelory.playlist.asx.Child
      extended by christophedelory.playlist.asx.AsxElement
          extended by christophedelory.playlist.asx.AsxOrEntryElement
              extended by christophedelory.playlist.asx.Asx
All Implemented Interfaces:
AsxElementContainer, SpecificPlaylist

public class Asx
extends AsxOrEntryElement
implements SpecificPlaylist, AsxElementContainer

A Windows Media metafile. Defines a file as an Advanced Stream Redirector (ASX) file.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Asx()
           
 
Method Summary
 void addAsxElement(AsxElement asxElement)
          Adds an ASX element to this container.
 List<AsxElement> getAsxElements()
          Returns the list of ASX elements defined in this container.
 String getBannerBar()
          Returns a value indicating whether Windows Media Player reserves space for a banner graphic.
 String getPreviewModeString()
          Returns a value indicating whether Windows Media Player enters preview mode before playing the first clip.
 SpecificPlaylistProvider getProvider()
          Returns the provider of this specific playlist.
 String getVersion()
          Returns the decimal number representing the version number of the syntax for the metafile.
 boolean isPreviewMode()
          Indicates whether Windows Media Player enters preview mode before playing the first clip.
 void setBannerBar(String bannerBar)
          Initializes the value indicating whether Windows Media Player reserves space for a banner graphic.
 void setPreviewMode(boolean previewMode)
          Indicates whether Windows Media Player enters preview mode before playing the first clip.
 void setPreviewModeString(String previewMode)
          Initializes the value indicating whether Windows Media Player enters preview mode before playing the first clip.
 void setProvider(SpecificPlaylistProvider provider)
          Initializes the provider of this specific playlist.
 void setVersion(String version)
          Initializes the decimal number representing the version number of the syntax for the metafile.
 Playlist toPlaylist()
          Builds a generic representation from this specific playlist.
 void writeTo(OutputStream out, String encoding)
          Writes this specific playlist to the specified output stream.
 
Methods inherited from class christophedelory.playlist.asx.AsxOrEntryElement
addLogURL, addParam, findParamValue, getAbstract, getAuthor, getBanner, getBase, getCopyright, getLogURLs, getMoreInfo, getParams, getPreviewDuration, getTitle, setAbstract, setAuthor, setBanner, setBase, setCopyright, setMoreInfo, setPreviewDuration, setTitle
 
Methods inherited from class christophedelory.playlist.asx.Child
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asx

public Asx()
Method Detail

setProvider

public void setProvider(SpecificPlaylistProvider provider)
Description copied from interface: SpecificPlaylist
Initializes the provider of this specific playlist.

Specified by:
setProvider in interface SpecificPlaylist
Parameters:
provider - the provider of this playlist. Shall not be null.
See Also:
SpecificPlaylist.getProvider()

getProvider

public SpecificPlaylistProvider getProvider()
Description copied from interface: SpecificPlaylist
Returns the provider of this specific playlist.

Specified by:
getProvider in interface SpecificPlaylist
Returns:
the provider of this playlist. May be null.
See Also:
SpecificPlaylist.setProvider(christophedelory.playlist.SpecificPlaylistProvider)

writeTo

public void writeTo(OutputStream out,
                    String encoding)
             throws Exception
Description copied from interface: SpecificPlaylist
Writes this specific playlist to the specified output stream. When done, the stream may be flushed, but not closed.

Specified by:
writeTo in interface SpecificPlaylist
Parameters:
out - an output stream. Shall not be null.
encoding - the content encoding of the output resource, or null if not known.
Throws:
NullPointerException - if out is null.
Exception - if any error occurs during the marshalling process.
See Also:
SpecificPlaylistFactory.readFrom(java.net.URL), SpecificPlaylistProvider.readFrom(java.io.InputStream, java.lang.String, org.apache.commons.logging.Log)

toPlaylist

public Playlist toPlaylist()
Description copied from interface: SpecificPlaylist
Builds a generic representation from this specific playlist.

Specified by:
toPlaylist in interface SpecificPlaylist
Returns:
a generic playlist. Shall not be null.
See Also:
SpecificPlaylistProvider.toSpecificPlaylist(christophedelory.playlist.Playlist)

getVersion

public String getVersion()
Returns the decimal number representing the version number of the syntax for the metafile. Acceptable values include both "3.0" and "3" (with or without the decimal point). Defaults to "3.0".

Returns:
a version string. Shall not be null.
See Also:
setVersion(java.lang.String)

setVersion

public void setVersion(String version)
Initializes the decimal number representing the version number of the syntax for the metafile.

Parameters:
version - a version string. Shall not be null.
Throws:
NullPointerException - if version is null.
See Also:
getVersion()

getBannerBar

public String getBannerBar()
Returns a value indicating whether Windows Media Player reserves space for a banner graphic. A banner is a graphic that is displayed in the video display area while media content is playing (use the BANNER element to add a banner to the content).
Must be one of the following values:
AUTO
The default value. Windows Media Player reserves space for the banner bar only when a piece of content includes one.
FIXED
Windows Media Player reserves a fixed space for a banner graphic for every piece of content played, whether or not there is an associated banner.
If the value of BANNERBAR is FIXED, Windows Media Player reserves banner space for every piece of media content, whether or not the media content has a banner. If a piece of media content does not have a banner associated with it, the space reserved for one is black. If the value of the BANNERBAR attribute is AUTO, Windows Media Player reserves space for the banner only when the media content includes one.
If you create a metafile with multiple clips (ENTRY or ENTRYREF elements) and set the value of the BANNERBAR attribute to AUTO, Windows Media Player might resize to allow space for a banner graphic for one clip, and then resize again if the next clip does not contain a banner graphic. If you want the size of the window to stay the same (except when the video size changes), use the FIXED value for the BANNERBAR attribute.
The space reserved for a banner graphic is 32 pixels high by 194 pixels wide. The reserved space appears below any rendered video content and 6 pixels above the lower edge of the video area, allowing space for the 6-pixel video area border. The reserved banner space is centered horizontally.
Windows Media Player renders the graphic beginning in the leftmost pixel of the banner space. If the graphic fills the entire space, it will appear centered horizontally. Otherwise there will be trailing space. Note that the minimum width of Windows Media Player is always wider than the size of the video clip, regardless of the value of the BANNERBAR attribute.
As banners are not supported in Windows CE, this attribute is set to "AUTO" and any attempts to change it are ignored. Even if content includes a banner, no space is reserved for it.

Returns:
a banner bar indicator. May be null.
See Also:
setBannerBar(java.lang.String)

setBannerBar

public void setBannerBar(String bannerBar)
Initializes the value indicating whether Windows Media Player reserves space for a banner graphic.

Parameters:
bannerBar - a banner bar indicator. May be null.
See Also:
getBannerBar()

getPreviewModeString

public String getPreviewModeString()
Returns a value indicating whether Windows Media Player enters preview mode before playing the first clip. Must be one of the following values:
YES
Windows Media Player enters preview mode before playing the first clip.
NO
The default value. Windows Media Player does not enter preview mode before playing the first clip.
If the value of the PREVIEWMODE attribute is YES, Windows Media Player immediately enters preview mode before playing the first clip. When Windows Media Player enters preview mode, it previews each clip referenced in the metafile. The PREVIEWDURATION element determines the duration of each preview. As preview mode is not supported in Microsoft® Windows® CE .NET, this attribute is set to "NO" and any attempts to change it are ignored.

Returns:
the preview mode. May be null.
See Also:
setPreviewModeString(java.lang.String), isPreviewMode()

setPreviewModeString

public void setPreviewModeString(String previewMode)
Initializes the value indicating whether Windows Media Player enters preview mode before playing the first clip.

Parameters:
previewMode - a preview mode. May be null.
See Also:
getPreviewModeString(), setPreviewMode(boolean)

isPreviewMode

public boolean isPreviewMode()
Indicates whether Windows Media Player enters preview mode before playing the first clip.

Returns:
the preview mode.
See Also:
setPreviewMode(boolean), getPreviewModeString()

setPreviewMode

public void setPreviewMode(boolean previewMode)
Indicates whether Windows Media Player enters preview mode before playing the first clip.

Parameters:
previewMode - the preview mode.
See Also:
isPreviewMode(), setPreviewModeString(java.lang.String)

addAsxElement

public void addAsxElement(AsxElement asxElement)
Description copied from interface: AsxElementContainer
Adds an ASX element to this container.

Specified by:
addAsxElement in interface AsxElementContainer
Parameters:
asxElement - an ASX element. Shall not be null
See Also:
AsxElementContainer.getAsxElements()

getAsxElements

public List<AsxElement> getAsxElements()
Description copied from interface: AsxElementContainer
Returns the list of ASX elements defined in this container.

Specified by:
getAsxElements in interface AsxElementContainer
Returns:
a list of ASX elements. May be empty but not null.
See Also:
AsxElementContainer.addAsxElement(christophedelory.playlist.asx.AsxElement)

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.