chameleon.playlist.Media类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中chameleon.playlist.Media类的一些代码示例,展示了Media类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Media类的具体详情如下:
包路径:chameleon.playlist.Media
类名称:Media

Media介绍

[英]The definition of a media content.
[中]媒体内容的定义。

代码示例

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-pla

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    filenames.add(media.getSource().toString()); // Shall not throw UnsupportedOperationException, ClassCastException, NullPointerException, IllegalArgumentException.

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-plp

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (String filename : _filenames)
  {
    final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
    final Content content = new Content(filename); // NOPMD Avoid instantiating new objects inside loops
    media.setSource(content);
    ret.getRootSequence().addComponent(media);
  }
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/core

@Override
public void endVisitMedia(final Media target)
{
  // Suppress media components with unspecified URI.
  if (target.getSource() == null)
  {
    _logger.info("Removing media with no source: " + target);
    target.getParent().removeComponent(target);
  }
}

代码示例来源:origin: com.github.muff1nman.chameleon/core

if ((media2.getSource() == null) || !media2.getSource().equals(media1.getSource()))
if (((media2.getDuration() == null) && (media1.getDuration() != null)) ||
  ((media2.getDuration() != null) && !media2.getDuration().equals(media1.getDuration())))

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-smil

final Media media = new Media();
final Content content = new Content(smilRef.getSource());
media.setSource(content);
  media.setDuration(smilRef.getDuration());
  media.setRepeatCount(repeatCount.intValue());

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-asx

final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
    media.setSource(new Content(reference.getHref())); // NOPMD Avoid instantiating new objects inside loops
      media.setDuration(duration.getValue()); // Shall not throw IllegalArgumentException.
final Media media = new Media();
media.setSource(new Content(entryRef.getHref()));
currentSequence.addComponent(media);

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-plp

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    filenames.add(media.getSource().toString()); // Shall not throw UnsupportedOperationException, ClassCastException, NullPointerException, IllegalArgumentException.

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-pla

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (String filename : _filenames)
  {
    final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
    final Content content = new Content(filename); // NOPMD Avoid instantiating new objects inside loops
    media.setSource(content);
    ret.getRootSequence().addComponent(media);
  }
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-mpcpl

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    resource.setFilename(media.getSource().toString());

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-mpcpl

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (Resource resource : _resources)
  {
    if (resource.getFilename() != null)
    {
      final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
      final Content content = new Content(resource.getFilename()); // NOPMD Avoid instantiating new objects inside loops
      media.setSource(content);
      ret.getRootSequence().addComponent(media);
    }
  }
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-pls

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    resource.setLocation(media.getSource().toString());
    if (media.getSource().getDuration() >= 0L)
      resource.setLength((media.getSource().getDuration() + 999L) / 1000L);

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-kpl

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (Entry entry : _entries)
  {
    if (entry.getFilename() != null)
    {
      final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
      final Content content = new Content(entry.getFilename()); // NOPMD Avoid instantiating new objects inside loops
      media.setSource(content);
      ret.getRootSequence().addComponent(media);
    }
  }
  // We don't really need it.
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-wpl

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    wplMedia.setSource(media.getSource().toString());
    wplSeq.addMedia(wplMedia);

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-hypetape

@Override
public chameleon.playlist.Playlist toPlaylist()
{
  final chameleon.playlist.Playlist ret = new chameleon.playlist.Playlist();
  for (Track track : _tracks)
  {
    if (track.getMP3() != null)
    {
      final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
      final Content content = new Content(track.getMP3()); // NOPMD Avoid instantiating new objects inside loops
      media.setSource(content);
      ret.getRootSequence().addComponent(media);
    }
  }
  // We don't really need it.
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-hypetape

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    track.setId(Integer.toString(System.identityHashCode(media.getSource())));
    track.setName(media.getSource().toString());
    track.setMP3(media.getSource().toString());
    playlist.addTrack(track);

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-pls

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (Resource resource : _resources)
  {
    if (resource.getLocation() != null)
    {
      final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
      final Content content = new Content(resource.getLocation()); // NOPMD Avoid instantiating new objects inside loops
      media.setSource(content);
      content.setDuration(resource.getLength() * 1000L);
      ret.getRootSequence().addComponent(media);
    }
  }
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-b4s

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    entry.setPlaystring(media.getSource().toString());
    if (media.getSource().getLength() >= 0L) // NOPMD Deeply nested if..then statements are hard to read
      entry.setLength((int) media.getSource().getLength()); // Shall not throw IllegalArgumentException.

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-m3u

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (Resource resource : _resources)
  {
    if (resource.getLocation() != null)
    {
      final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
      final Content content = new Content(resource.getLocation()); // NOPMD Avoid instantiating new objects inside loops
      media.setSource(content);
      content.setDuration(resource.getLength() * 1000L);
      ret.getRootSequence().addComponent(media);
    }
  }
  ret.normalize();
  return ret;
}

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-m3u

if (media.getDuration() != null)
if (media.getRepeatCount() < 0)
if (media.getSource() != null)
  for (int iter = 0; iter < media.getRepeatCount(); iter++)
    resource.setLocation(media.getSource().toString());
    if (media.getSource().getDuration() >= 0L)
      resource.setLength((media.getSource().getDuration() + 999L) / 1000L);

代码示例来源:origin: com.github.muff1nman.chameleon/playlist-wpl

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  if (_body != null)
  {
    for (Media wplMedia : _body.getSeq().getMedias())
    {
      if (wplMedia.getSource() != null)
      {
        final chameleon.playlist.Media media = new chameleon.playlist.Media(); // NOPMD Avoid instantiating new objects inside loops
        media.setSource(new Content(wplMedia.getSource())); // NOPMD Avoid instantiating new objects inside loops
        ret.getRootSequence().addComponent(media);
      }
    }
    ret.normalize();
  }
  return ret;
}

相关文章