## org.red5.io.mp4.impl
Class MP4Service

    java.lang.Object
      org.red5.io.BaseStreamableFileService
          org.red5.io.mp4.impl.MP4Service

All Implemented Interfaces:
  IStreamableFileService, IMP4Service

    public class MP4Service

extends BaseStreamableFileService
implements IMP4Service

A MP4ServiceImpl sets up the service and hands out MP4 objects to its callers.

Author:
  The Red5 Project (red5@osflash.org), Paul Gregoire, (mondain@gmail.com)

Constructor Summary
`MP4Service()`

Method Summary
`Deserializer` `getDeserializer()` Getter for deserializer
`String` `getExtension()` Getter for extension of file
`String` `getPrefix()` Getter for prefix.
`Serializer` `getSerializer()` Getter for serializer
`IStreamableFile` `getStreamableFile(File file)` Return streamable file reference.
`void` `setDeserializer(Deserializer deserializer)` Sets the deserializer
`void` `setExtension(String extension)` Sets the file extensions serviced.
`void` `setPrefix(String prefix)` Sets the prefix.
`void` `setSerializer(Serializer serializer)` Sets the serializer

Methods inherited from class org.red5.io.BaseStreamableFileService
`canHandle, prepareFilename`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.red5.io.IStreamableFileService
`canHandle, prepareFilename`

Constructor Detail

### MP4Service

    public MP4Service()

Method Detail

### setPrefix

    public void setPrefix(String prefix)

  Sets the prefix.

  Specified by:
    `setPrefix` in interface `IStreamableFileService`
  Overrides:
    `setPrefix` in class `BaseStreamableFileService`

### getPrefix

    public String getPrefix()

  Getter for prefix. Prefix is used in filename composition to fetch real file name.

  Specified by:
    `getPrefix` in interface `IStreamableFileService`
  Specified by:
    `getPrefix` in class `BaseStreamableFileService`
  Returns:
    Prefix

### setExtension

    public void setExtension(String extension)

  Sets the file extensions serviced. If there are more than one, they are separated by commas.

  Specified by:
    `setExtension` in interface `IStreamableFileService`
  Overrides:
    `setExtension` in class `BaseStreamableFileService`

### getExtension

    public String getExtension()

  Getter for extension of file

  Specified by:
    `getExtension` in interface `IStreamableFileService`
  Specified by:
    `getExtension` in class `BaseStreamableFileService`
  Returns:
    File extension that is used

### setSerializer

    public void setSerializer(Serializer serializer)

  Sets the serializer

  Specified by:
    `setSerializer` in interface `IMP4Service`
  Parameters:
    `serializer` - Serializer object

### setDeserializer

    public void setDeserializer(Deserializer deserializer)

  Sets the deserializer

  Specified by:
    `setDeserializer` in interface `IMP4Service`
  Parameters:
    `deserializer` - Deserializer object

### getStreamableFile

    public IStreamableFile getStreamableFile(File file)
                                      throws IOException

  Return streamable file reference. For FLV files returned streamable file already has generated metadata injected.

  Specified by:
    `getStreamableFile` in interface `IStreamableFileService`
  Specified by:
    `getStreamableFile` in class `BaseStreamableFileService`
  Parameters:
    `file` - File resource
  Returns:
    Streamable file resource
  Throws:
    `IOException` - Thrown if there were problems accessing given file

### getSerializer

    public Serializer getSerializer()

  Getter for serializer

  Returns:
    Serializer

### getDeserializer

    public Deserializer getDeserializer()

  Getter for deserializer

  Returns:
    Deserializer

Copyright © 2006-2010 The Red5 Project