Examples of BDLocator


Examples of org.bluray.net.BDLocator

    public Locator getLocator()
    {
        String url = "bd://" + titleNum;
        try {
            return new BDLocator(url);
        } catch (InvalidLocatorException ex) {
            logger.log(Level.WARNING, "Invalid locator: " + url);
            return null;
        }
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

        this.service = service;
    }
   
    public String getName()
    {
        BDLocator l = (BDLocator) getLocator();
        if (l == null)
            return null;
        return l.toString();
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

            str.append(".P:" + stream.getPid());
        else
            return null;
       
        try {
            return new BDLocator(str.toString());
        } catch (InvalidLocatorException e) {
            return null;
        }
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

    public Locator getLocator()
    {
        int title = Libbluray.getCurrentTitle();
       
        try {
            return new BDLocator(null, title, id);
        } catch (InvalidLocatorException e) {
            return null;
        }
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

    public Locator getLocator()
    {
        int title = Libbluray.getCurrentTitle();
        try {
            return new BDLocator("bd://" + title + ".PLAYLIST:" + playlistId + ".ITEM:" + playitemId);
        } catch (InvalidLocatorException e) {
            return null;
        }
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

    public Locator createLocator(String url) throws MalformedLocatorException
    {
        // check if it is a bluray locator
        if (url.startsWith("bd")) {
            try {
                return new BDLocator(url);
            } catch (org.davic.net.InvalidLocatorException ex) {
                throw new MalformedLocatorException(ex.getMessage());
            }
        } else {
            // just return a generic locator
View Full Code Here

Examples of org.bluray.net.BDLocator

    }

    public void attach(Locator locator) throws DSMCCException,
            InterruptedIOException, MPEGDeliveryException
    {  
        BDLocator bdl = checkLocator(locator);
        if (bdl == null)
            throw new DSMCCException("invalid BDLocator");
       
        if (!bdl.isJarFileItem())
            throw new DSMCCException("invalid BDLocator");
      
        try {
            this.mountPoint = new DSMCCObject(MountManager.mount(bdl.getJarFileId()));
        } catch (MountException e) {
            e.printStackTrace();
            throw new DSMCCException("couldn't mount jar");
        }
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

    public static URL getURL(Locator locator)
            throws NotLoadedException, InvalidLocatorException,
            FileNotFoundException
    {
        BDLocator bdl = checkLocator(locator);
        if (bdl == null)
            throw new InvalidLocatorException("invalid BDLocator");
       
        if (bdl.isJarFileItem()) {
            String mountPt = MountManager.getMount(bdl.getJarFileId());
           
            if (mountPt == null)
                throw new NotLoadedException();
           
            DSMCCObject obj = new DSMCCObject(mountPt, bdl.getPathSegments());
           
            if (!obj.exists())
                throw new FileNotFoundException();
           
            return obj.getURL();
View Full Code Here

Examples of org.bluray.net.BDLocator

    private static BDLocator checkLocator(Locator locator)
    {
        if (!(locator instanceof BDLocator))
            return null;
       
        BDLocator bdl = (BDLocator)locator;
       
        if (bdl.isJarFileItem())
            return bdl;
        else
            return null;
    }
View Full Code Here

Examples of org.bluray.net.BDLocator

    }

    public BDLocator getCurrentPlayList()
    {
        try {
            return new BDLocator(null, player.ti.getIndex(), player.ti.getPlaylist());
        } catch (org.davic.net.InvalidLocatorException e) {
            return null;
        }
    }
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.