chameleon.playlist.Media.setSource()方法的使用及代码示例

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

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

Media.setSource介绍

[英]Initializes the media source.
[中]初始化媒体源。

代码示例

代码示例来源: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/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-rmp

media.setSource(content);
ret.getRootSequence().addComponent(media);

代码示例来源: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-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-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-b4s

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

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

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

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

@Override
public Playlist toPlaylist()
{
  final Playlist ret = new Playlist();
  for (Entry entry : _feed.getEntries())
  {
    for (Link link : entry.getLinks())
    {
      if ((link.getHref() != null) && "enclosure".equals(link.getRel()))
      {
        final Media media = new Media(); // NOPMD Avoid instantiating new objects inside loops
        final chameleon.content.Content content = new chameleon.content.Content(link.getHref()); // NOPMD Avoid instantiating new objects inside loops
        content.setType(link.getType());
        if (link.getLength() != null)
        {
          content.setLength(link.getLength().longValue());
        }
        media.setSource(content);
        ret.getRootSequence().addComponent(media);
      }
    }
  }
  // We don't really need it.
  ret.normalize();
  return ret;
}

代码示例来源: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-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-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;
}

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

media.setSource(content);
sequence.addComponent(media);
media.setSource(content);
sequence.addComponent(media);

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

final Content content = new Content(smilRef.getSource());
media.setSource(content);

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

media.setSource(new Content(reference.getHref())); // NOPMD Avoid instantiating new objects inside loops
media.setSource(new Content(entryRef.getHref()));
currentSequence.addComponent(media);

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

media.setSource(content);

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

content.setLength(enclosure.getLength());
content.setType(enclosure.getType());
media.setSource(content);
ret.getRootSequence().addComponent(media);

相关文章