Examples of ISimpleMediaFile


Examples of com.xuggle.xuggler.ISimpleMediaFile

  }
 
  @Test
  public void testCopy()
  {
    ISimpleMediaFile obj = new SimpleMediaFile();
    // change all the defaults
    obj.setAudioBitRate(123);
    obj.setAudioChannels(2);
    obj.setAudioSampleRate(22050);
    obj.setAudioCodec(ICodec.ID.CODEC_ID_MP3);
    obj.setAudioTimeBase(IRational.make(17, 100));
    obj.setVideoWidth(1);
    obj.setVideoHeight(2);
    obj.setVideoTimeBase(IRational.make(1, 100));
    obj.setVideoCodec(ICodec.ID.CODEC_ID_FLV1);
    obj.setVideoPixelFormat(IPixelFormat.Type.ARGB);
    obj.setVideoNumPicturesInGroupOfPictures(12);
    obj.setVideoFrameRate(IRational.make(2, 15));
    obj.setVideoGlobalQuality(5);
    obj.setDuration(ITimeValue.make(1, ITimeValue.Unit.SECONDS));
    IContainerFormat format = IContainerFormat.make();
    format.setInputFormat("flv");
    obj.setContainerFormat(format);
    obj.setHasVideo(false);
    obj.setHasAudio(false);
    obj.setURL("foo:bar");
   
    ISimpleMediaFile copy = new SimpleMediaFile(obj);
    assertEquals(obj.getAudioBitRate(), copy.getAudioBitRate());
    assertEquals(obj.isAudioBitRateKnown(), copy.isAudioBitRateKnown());
    assertEquals(obj.getAudioChannels(), copy.getAudioChannels());
    assertEquals(obj.isAudioChannelsKnown(), copy.isAudioChannelsKnown());
    assertEquals(obj.getAudioSampleRate(), copy.getAudioSampleRate());
    assertEquals(obj.isAudioSampleRateKnown(), copy.isAudioSampleRateKnown());
    assertEquals(obj.getAudioCodec(), copy.getAudioCodec());
    assertEquals(obj.getAudioTimeBase().getNumerator(), copy.getAudioTimeBase().getNumerator());
    assertEquals(obj.getAudioTimeBase().getDenominator(), copy.getAudioTimeBase().getDenominator());
    assertEquals(obj.getVideoWidth(), copy.getVideoWidth());
    assertEquals(obj.isVideoWidthKnown(), copy.isVideoWidthKnown());
    assertEquals(obj.getVideoHeight(), copy.getVideoHeight());
    assertEquals(obj.isVideoHeightKnown(), copy.isVideoHeightKnown());
    assertEquals(obj.getVideoTimeBase().getNumerator(), copy.getVideoTimeBase().getNumerator());
    assertEquals(obj.getVideoTimeBase().getDenominator(), copy.getVideoTimeBase().getDenominator());
    assertEquals(obj.getVideoCodec(), copy.getVideoCodec());
    assertEquals(obj.getVideoPixelFormat(), copy.getVideoPixelFormat());
    assertEquals(obj.isVideoPixelFormatKnown(), copy.isVideoPixelFormatKnown());
    assertEquals(obj.getVideoNumPicturesInGroupOfPictures(), copy.getVideoNumPicturesInGroupOfPictures());
    assertEquals(obj.isVideoNumPicturesInGroupOfPicturesKnown(), copy.isVideoNumPicturesInGroupOfPicturesKnown());
    assertEquals(obj.getVideoFrameRate().getNumerator(), copy.getVideoFrameRate().getNumerator());
    assertEquals(obj.getVideoFrameRate().getDenominator(), copy.getVideoFrameRate().getDenominator());
    assertEquals(obj.getVideoGlobalQuality(), copy.getVideoGlobalQuality());
    assertEquals(obj.isVideoGlobalQualityKnown(), copy.isVideoGlobalQualityKnown());
    assertEquals(obj.hasVideo(), copy.hasVideo());
    assertEquals(obj.hasAudio(), copy.hasVideo());
    assertEquals(obj.getContainerFormat().getInputFormatLongName(), copy.getContainerFormat().getInputFormatLongName());
    assertEquals(obj.getDuration(), copy.getDuration());
    assertEquals(obj.getURL(), copy.getURL());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testAudioBitRate()
  {
    int defaultVal = 64000;
    int val=123;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getAudioBitRate());
    obj.setAudioBitRate(val);
    assertEquals("set method failed", val, obj.getAudioBitRate());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testAudioChannels()
  {
    int defaultVal = 1;
    int val=2;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getAudioChannels());
    obj.setAudioChannels(val);
    assertEquals("set method failed", val, obj.getAudioChannels());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testAudioSampleRate()
  {
    int defaultVal = 44100;
    int val=22050;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getAudioSampleRate());
    obj.setAudioSampleRate(val);
    assertEquals("set method failed", val, obj.getAudioSampleRate());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  {
    ICodec.ID defaultVal = ICodec.ID.CODEC_ID_NONE;
    ICodec.ID val=ICodec.ID.CODEC_ID_AAC;
    assertNotNull("couldn't find codec", val);
   
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getAudioCodec());
    obj.setAudioCodec(val);
    assertEquals("set method failed", val, obj.getAudioCodec());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testAudioTimeBase()
  {
    IRational val=IRational.make(1, 500);
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertNull(obj.getAudioTimeBase());
    obj.setAudioTimeBase(val);
    assertEquals("set method failed", val.getNumerator(), obj.getAudioTimeBase().getNumerator());
    assertEquals("set method failed", val.getDenominator(), obj.getAudioTimeBase().getDenominator());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  {
    ICodec.ID defaultVal = ICodec.ID.CODEC_ID_NONE;
    ICodec.ID val=ICodec.ID.CODEC_ID_MPEG4;
    assertNotNull("couldn't find codec", val);
   
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getVideoCodec());
    obj.setVideoCodec(val);
    assertEquals("set method failed", val, obj.getVideoCodec());
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testVideoHeight()
  {
    int defaultVal = 1;
    int val=123;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getVideoHeight());
    obj.setVideoHeight(val);
    assertEquals("set method failed", val, obj.getVideoHeight());   
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testVideoWidth()
  {
    int defaultVal = 1;
    int val=123;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getVideoWidth());
    obj.setVideoWidth(val);
    assertEquals("set method failed", val, obj.getVideoWidth());   
  }
View Full Code Here

Examples of com.xuggle.xuggler.ISimpleMediaFile

  @Test
  public void testVideoBitRate()
  {
    int defaultVal = 320000;
    int val=123;
    ISimpleMediaFile obj = new SimpleMediaFile();
    assertEquals("unexpected default", defaultVal, obj.getVideoBitRate());
    obj.setVideoBitRate(val);
    assertEquals("set method failed", val, obj.getVideoBitRate());   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.