Examples of IcyInputStream


Examples of com.tulskiy.musique.audio.IcyInputStream

        URI location = track.getTrackData().getLocation();
        if (location == null) {
            return null;
        }
        if (track.getTrackData().isStream()) {
            IcyInputStream inputStream = IcyInputStream.create(track);
            String contentType = inputStream.getContentType().trim();
            try {
                inputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

            if ("audio/mpeg".equals(contentType)) {
View Full Code Here

Examples of javazoom.spi.mpeg.sampled.file.tag.IcyInputStream

        InputStream inputStream = null;
        // Is is a shoutcast server ?
        if (isShout == true)
        {
            // Yes
            IcyInputStream icyStream = new IcyInputStream(bInputStream);
            icyStream.addTagParseListener(IcyListener.getInstance());
            inputStream = icyStream;
        }
        else
        {
            // No, is Icecast 2 ?
            String metaint = conn.getHeaderField("icy-metaint");
            if (metaint != null)
            {
                // Yes, it might be icecast 2 mp3 stream.
                IcyInputStream icyStream = new IcyInputStream(bInputStream, metaint);
                icyStream.addTagParseListener(IcyListener.getInstance());
                inputStream = icyStream;
            }
            else
            {
                // No
View Full Code Here

Examples of javazoom.spi.mpeg.sampled.file.tag.IcyInputStream

     * @param props
     * @throws IOException
     */
    protected void loadShoutcastInfo(InputStream input, HashMap props) throws IOException
    {
        IcyInputStream icy = new IcyInputStream(new BufferedInputStream(input));
        HashMap metadata = icy.getTagHash();
        MP3Tag titleMP3Tag = icy.getTag("icy-name");
        if (titleMP3Tag != null) props.put("title", ((String) titleMP3Tag.getValue()).trim());
        MP3Tag[] meta = icy.getTags();
        if (meta != null)
        {
            StringBuffer metaStr = new StringBuffer();
            for (int i = 0; i < meta.length; i++)
            {
                String key = meta[i].getName();
                String value = ((String) icy.getTag(key).getValue()).trim();
                props.put("mp3.shoutcast.metadata." + key, value);
            }
        }
    }
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.