Package net.pms.formats

Examples of net.pms.formats.MP3


    DLNAMediaAudio audio = new DLNAMediaAudio();
    audio.getAudioProperties().setNumberOfChannels(2);
    List<DLNAMediaAudio> audioCodes = new ArrayList<>();
    audioCodes.add(audio);
    info.setAudioTracksList(audioCodes);
    Format format = new MP3();
    format.match("test.mp3");
    assertEquals("PS3 is compatible with MP3", true,
        conf.isCompatible(info, format));

    // Construct five channel MP3 that the PS3 does not support natively
    audio.getAudioProperties().setNumberOfChannels(5);
View Full Code Here


        format.ps3compatible(),  conf.isCompatible(info, format));

    // MP3: true
    info = new DLNAMediaInfo();
    info.setContainer("mp3");
    format = new MP3();
    format.match("test.mp3");
    assertEquals("isCompatible() gives same outcome as ps3compatible() for MP3",
        format.ps3compatible(),  conf.isCompatible(info, format));

    // MPG: true
View Full Code Here

     * Test edge cases for {@link Format#match(String)}.
     */
    @Test
  public void testFormatEdgeCases() {
      // Empty string
    assertEquals("MP3 does not match \"\"", false, new MP3().match(""));

      // Null string
    assertEquals("MP3 does not match null", false, new MP3().match(null));

    // Mixed case
    assertEquals("TIFF matches \"tEsT.TiFf\"", true, new TIF().match("tEsT.TiFf"));

    // Starting with identifier instead of ending
View Full Code Here

    assertEquals("GIF matches \"test.gif\"", true, new GIF().match("test.gif"));
    assertEquals("ISO matches \"test.iso\"", true, new ISO().match("test.iso"));
    assertEquals("JPG matches \"test.jpg\"", true, new JPG().match("test.jpg"));
    assertEquals("M4A matches \"test.wma\"", true, new M4A().match("test.wma"));
    assertEquals("MKV matches \"test.mkv\"", true, new MKV().match("test.mkv"));
    assertEquals("MP3 matches \"test.mp3\"", true, new MP3().match("test.mp3"));
    assertEquals("MPG matches \"test.mpg\"", true, new MPG().match("test.mpg"));
    assertEquals("OGG matches \"test.ogg\"", true, new OGG().match("test.ogg"));
    assertEquals("PNG matches \"test.png\"", true, new PNG().match("test.png"));
    assertEquals("RAW matches \"test.arw\"", true, new RAW().match("test.arw"));
    assertEquals("TIF matches \"test.tiff\"", true, new TIF().match("test.tiff"));
View Full Code Here

TOP

Related Classes of net.pms.formats.MP3

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.