亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? playfile.java

?? java ogg player library. for play back ogg audio
?? JAVA
字號(hào):
/* -*-mode:java; c-basic-offset:2; -*- *//* JRoar -- pure Java streaming server for Ogg  * * Copyright (C) 2001,2002 ymnk, JCraft,Inc. * * Written by: 2001,2002 ymnk<ymnk@jcraft.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */package com.jcraft.jroar;import java.io.*;import java.net.*;import java.util.*;import com.jcraft.jogg.*;class PlayFile extends Source implements Runnable{  static final int BUFSIZE=4096*2;  private InputStream bitStream=null;  private SyncState oy;  private com.jcraft.jogg.Page og;    private byte[] buffer=null;  private int bytes=0;  private Thread me=null;  private String file=null;  private String[] files=null;  PlayFile(String mountpoint, String[] files){    super(mountpoint);HttpServer.source_connections++;    this.source="playlist";    this.files=files;  }  PlayFile(String mountpoint, String file){    super(mountpoint);HttpServer.source_connections++;    this.source="playlist";    if(file.startsWith("http://") &&        file.endsWith(".m3u")){      Vector foo=JRoar.fetch_m3u(file);      if(foo.size()>0){        this.files=new String[foo.size()];        for(int i=0; i<foo.size(); i++){          this.files[i]=(String)foo.elementAt(i);	}         this.source=file;      }      else{        drop();HttpServer.source_connections--;      }    }    else if(JRoar.running_as_applet){      drop();HttpServer.source_connections--;    }    else if(file.equals("-")){      this.files=new String[1];      this.files[0]=file;    }    else if(file.endsWith(".ogg") || file.endsWith(".spx")){      this.files=new String[1];      this.files[0]=file;      if(file.startsWith("http://")){        this.source=file;      }    }    else {      this.file=file;      try{	updateFiles(file);      }      catch(Exception e){System.out.println(e);        drop();HttpServer.source_connections--;      }    }  }  long file_lastm=0;  private void updateFiles(String file) throws java.io.FileNotFoundException{System.out.println("loadPlaylist: "+file);    File _file=new File(file);    file_lastm=_file.lastModified();    BufferedReader d      = new BufferedReader(new InputStreamReader(new FileInputStream(_file)));    Vector v=new Vector();    try{      while(true){	String s=d.readLine();	if(s==null)break;	if(s.startsWith("#")) continue;	if(!s.startsWith("http://") && 	   !s.endsWith(".ogg") && 	   !s.endsWith(".spx")) 	  continue;System.out.println("playFile ("+s+")");        v.addElement(s);      }      d.close();    }    catch(Exception ee){}    this.files=new String[v.size()];    for(int i=0; i<v.size(); i++){      this.files[i]=(String)v.elementAt(i);    }  }  void init_ogg(){    oy=new SyncState();    og=new com.jcraft.jogg.Page();    buffer=null;    bytes=0;    oy.init();  }  public void kick(){    if(me!=null){	/*      int size=listeners.size();      Client c=null;        c=(Client)(listeners.elementAt(1));System.out.println(c);        if(System.currentTimeMillis()-c.lasttime>1000){          try{            ((HttpClient)c).ms.close();	  }          catch(Exception e){}	}	*/      return;    }    me=new Thread(this);    me.start();  }static String status="status0";//static String file="??";  public void run(){    Vector http_header=new Vector();    http_header.addElement("HTTP/1.0 200 OK");    http_header.addElement("Content-Type: application/x-ogg");    int ii=-1;  loop:    while(me!=null){      ii++;      if(this.file!=null &&	 file_lastm<(new File(this.file)).lastModified()){	try{	  updateFiles(file);	}	catch(Exception e){	  break;	}      }      if(ii>=files.length)ii=0;status="status1";//System.out.println("status: "+status+" files.length="+files.length);      bitStream=null;      if(files[ii].startsWith("http://")){        try{          URL url=new URL(files[ii]);          URLConnection urlc=url.openConnection();          setURLProperties(urlc);        // for jroar           bitStream=urlc.getInputStream();	}	catch(Exception e){          System.out.println(e);	}      }      else if(files[ii].equals("-")){        bitStream=System.in;      }//System.out.println("bitStream: "+bitStream);      if(bitStream==null){        try{ bitStream=new FileInputStream(files[ii]); }	        catch(Exception e){        System.out.println(e);	}      }//System.out.println("bitStream: "+bitStream);      if(bitStream==null){        files[ii]=null;        String[] foo=new String[files.length-1];        if(ii>0)          System.arraycopy(files, 0, foo, 0, ii);        if(ii!=files.length-1)          System.arraycopy(files, ii+1, foo, ii, files.length-1-ii);        files=foo;	ii--;        if(files.length==0){          break;	}        continue;      }//System.out.println("bitStream: "+bitStream);file=files[ii];status="status2";//System.out.println("file: "+file);      init_ogg();      int serialno=-1;      long granulepos=-1;      long start_time=-1;      long last_sample=0;      long time=0;      ByteArrayOutputStream _header=new ByteArrayOutputStream();      byte[] header=null;      com.jcraft.jogg.Page[] pages=new com.jcraft.jogg.Page[10];      int page_count=0;      boolean eos=false;      while(!eos){status="status3";        if(me==null) break;status="status4";        int index=oy.buffer(BUFSIZE);        buffer=oy.data;        try{ bytes=bitStream.read(buffer, index, BUFSIZE); }        catch(Exception e){          System.err.println(e);          eos=true;          continue;        }        if(bytes==-1)break;        if(bytes==0)break;status="status5";        oy.wrote(bytes);        while(!eos){status="status6";          if(me==null) break;status="status7";          int result=oy.pageout(og);	  if(result==0)break; // need more data	  if(result==-1){ // missing or corrupt data at this page position//	    System.err.println("Corrupt or missing data in bitstream; continuing...");	  }	  else{	    /*  	    if(serialno!=og.serialno()){              header=null;              serialno=og.serialno();	    }	    */	    serialno=og.serialno();	    granulepos=og.granulepos();status="status8";          //System.out.println("og: "+og+", pos="+og.granulepos());            if((granulepos==0)               ||(granulepos==-1)          // hack for Speex	       ){	      if(pages.length<=page_count){		com.jcraft.jogg.Page[] foo=new com.jcraft.jogg.Page[pages.length*2];		System.arraycopy(pages, 0, foo, 0, pages.length);		pages=foo;	      }	      pages[page_count++]=og.copy();	    }            else{              if(header==null){		parseHeader(pages, page_count);//System.out.println("rate: "+current_info.rate);		com.jcraft.jogg.Page foo;		for(int i=0;i< page_count; i++){		  foo=pages[i];		  _header.write(foo.header_base, foo.header, foo.header_len);		  _header.write(foo.body_base, foo.body, foo.body_len);		}                header=_header.toByteArray();                _header.reset();		page_count=0;                start_time=System.currentTimeMillis();                last_sample=0;                time=0;	      }	    }status="status9";          //            synchronized(listeners){  // In some case, c.write will block.status="status99";            	      int size=listeners.size();              Client c=null;              for(int i=0; i<size;){status="status10";                try{   	          c=(Client)(listeners.elementAt(i));                  c.write(http_header, header,		          og.header_base, og.header, og.header_len,			  og.body_base, og.body, og.body_len);                }		catch(Exception e){                  c.close();                  removeListener(c);                  size--;                  continue;                }                i++;	      }//	    }status="status11";            if(granulepos!=0 &&	       key_serialno==serialno){status="status111";                if(last_sample==0){  	          time=(System.currentTimeMillis()-start_time)*1000;                }                else{ 		  time+= (long)(((granulepos-last_sample)*1000000)/			        ((current_info.rate)));		}                last_sample=granulepos;                long sleep=(time/1000)-(System.currentTimeMillis()-start_time);//System.out.println("sleep="+sleep);//if(sleep>10000){sleep=0; time=(System.currentTimeMillis()-start_time);}status="status112";                if(sleep>0){//System.out.println("sleep: "+sleep);  	          try{ Thread.sleep(sleep); }    	          catch(Exception e){}		} status="status12";	    }            // sleep for green thread.            try{ Thread.sleep(1); }            catch(Exception e){}status="status13";//	    if(og.eos()!=0)eos=true;	  }status="status14";        }status="status15";      }      oy.clear();      try { if(bitStream!=null)bitStream.close(); }       catch(Exception e) { }      bitStream=null;status="status16";    }    oy.clear();    try { if(bitStream!=null)bitStream.close(); }     catch(Exception e) { }    bitStream=null;status="status14";    drop();  }  private void setURLProperties(URLConnection urlc){    if(HttpServer.myURL!=null){      urlc.setRequestProperty("jroar-proxy", HttpServer.myURL+mountpoint);      //System.out.println(HttpServer.myURL+mountpoint);      if(JRoar.comment!=null)        urlc.setRequestProperty("jroar-comment", JRoar.comment);    }  }  public void stop(){    if(me!=null){      if(oy!=null) oy.clear();      try {       if(bitStream!=null)bitStream.close();      }       catch(Exception e) { }      bitStream=null;      me=null;    }    drop_clients();  }  void drop_clients(){    Client c=null;    synchronized(listeners){      int size=listeners.size();      for(int i=0; i<size;i++){        c=(Client)(listeners.elementAt(i));        try{ c.close();}        catch(Exception e){}      }      listeners.removeAllElements();    }  }  void drop(){    stop();    //drop_clients();    super.drop();  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
伊人婷婷欧美激情| 午夜久久久久久| 亚洲一级二级在线| 免费成人结看片| 成人av在线一区二区三区| 欧美日韩国产一区| 久久综合久久综合九色| 尤物视频一区二区| 国产精品99久久久久久久女警| 在线精品国精品国产尤物884a| 国产亚洲精品bt天堂精选| 亚洲综合在线免费观看| 国产成人av一区二区| 3atv在线一区二区三区| 亚洲丝袜美腿综合| 国产福利一区二区| 日韩一区二区三区精品视频| 亚洲成人免费影院| 99精品视频一区二区三区| 欧美成人一区二区三区片免费| 亚洲一区中文日韩| www.色综合.com| 欧美激情一区三区| 国产综合一区二区| 日韩久久久久久| 美女诱惑一区二区| 欧美日韩一区二区三区免费看| 亚洲精品亚洲人成人网在线播放| 国产电影一区二区三区| 精品国产乱码久久久久久久| 免费在线视频一区| 69精品人人人人| 日韩成人伦理电影在线观看| 欧美日韩激情一区二区| 亚洲福利一二三区| 在线观看亚洲a| 亚洲一区二区不卡免费| 色欲综合视频天天天| 亚洲欧美日韩一区二区 | 色成年激情久久综合| 国产免费成人在线视频| 国产九色sp调教91| 久久久精品2019中文字幕之3| 韩国成人福利片在线播放| 日韩精品专区在线影院观看| 九九在线精品视频| 欧美va亚洲va| 成人午夜电影网站| 日韩欧美第一区| 精品影视av免费| 欧美极品xxx| 成人动漫一区二区| 中文字幕一区三区| 欧美午夜理伦三级在线观看| 水蜜桃久久夜色精品一区的特点| 91精品国产综合久久福利| 麻豆一区二区三区| 久久精品综合网| 色悠久久久久综合欧美99| 五月婷婷激情综合网| 日韩免费性生活视频播放| 国产精品88av| 亚洲国产人成综合网站| 精品福利av导航| 91色综合久久久久婷婷| 日日夜夜一区二区| 久久久久久久综合色一本| 成人av先锋影音| 日日夜夜精品视频免费| 久久精品欧美日韩精品 | 亚洲少妇中出一区| 欧美日韩视频第一区| 精品无人区卡一卡二卡三乱码免费卡| 中文字幕精品一区| 日本高清不卡aⅴ免费网站| 麻豆精品在线播放| 亚洲男人的天堂在线aⅴ视频| 欧洲一区二区av| 国产精品久久久久久久久动漫| 精品嫩草影院久久| 成人免费视频app| 免费人成在线不卡| 国产精品美女一区二区| 91精品国产乱| 色综合夜色一区| 国内精品国产三级国产a久久| 一区二区三区四区精品在线视频| 精品免费国产一区二区三区四区| 在线看国产日韩| 成人午夜免费视频| 日韩和欧美一区二区三区| 国产精品国产三级国产普通话三级| 69堂精品视频| 欧美在线观看视频在线| 国产老女人精品毛片久久| 视频一区视频二区中文字幕| 国产欧美一区二区三区网站| 欧美一级片在线| 欧美日韩精品专区| 不卡的电视剧免费网站有什么| 久久激情五月婷婷| 午夜精品视频在线观看| 亚洲欧美一区二区三区孕妇| 欧美国产综合色视频| 欧美一区二区精品| 欧美高清视频一二三区 | 欧洲亚洲国产日韩| 成人福利在线看| 国产精品正在播放| 激情综合一区二区三区| 欧美aaa在线| 日韩黄色小视频| 日本不卡一二三| 日产国产高清一区二区三区| 亚洲午夜一区二区三区| 一区二区免费在线播放| 亚洲欧美另类久久久精品2019| 欧美激情艳妇裸体舞| 久久蜜桃av一区二区天堂| 欧美大片在线观看一区| 欧美一区二区三区男人的天堂| 欧美日韩精品系列| 欧美精品色一区二区三区| 欧美无人高清视频在线观看| 欧美性猛交一区二区三区精品| 色欧美乱欧美15图片| 一本色道综合亚洲| 色诱视频网站一区| 欧洲精品一区二区| 678五月天丁香亚洲综合网| 欧美高清hd18日本| 日韩三级视频中文字幕| 337p日本欧洲亚洲大胆精品| 久久久亚洲综合| 国产精品成人免费精品自在线观看| 国产精品灌醉下药二区| 亚洲欧美日韩成人高清在线一区| 亚洲欧洲精品一区二区精品久久久| 亚洲激情在线激情| 亚洲成人动漫一区| 欧美a级理论片| 国产**成人网毛片九色 | 亚洲自拍欧美精品| 日韩高清不卡在线| 国内成人免费视频| 99综合电影在线视频| 欧美性高清videossexo| 欧美精品久久99| 日本一区二区在线不卡| 亚洲色图丝袜美腿| 秋霞电影一区二区| 成人aa视频在线观看| 欧美日韩免费观看一区二区三区| 日韩一级黄色大片| 国产精品久久久久久久久久免费看| 亚洲精品日韩一| 日本特黄久久久高潮| 成人免费福利片| 日韩你懂的在线播放| 国产三级一区二区| 亚洲国产日产av| 成人久久18免费网站麻豆| 欧美午夜精品久久久| 久久久一区二区三区| 日日摸夜夜添夜夜添精品视频 | 色狠狠av一区二区三区| 日韩一卡二卡三卡国产欧美| 国产精品国产三级国产aⅴ入口| 亚洲成人www| 成人毛片在线观看| 911国产精品| 一区二区在线观看视频在线观看| 看国产成人h片视频| 91精品福利视频| 国产精品理论在线观看| 免费在线观看视频一区| 欧美亚男人的天堂| 日本一区二区免费在线| 丰满放荡岳乱妇91ww| 777奇米成人网| 中文字幕一区二区三区四区| 老司机精品视频导航| 欧美日韩一区小说| 国产精品成人免费在线| 国产一区二区在线看| 6080国产精品一区二区| 亚洲精品va在线观看| 北条麻妃一区二区三区| 久久精品欧美一区二区三区麻豆| 蜜臀av亚洲一区中文字幕| 欧日韩精品视频| 一区二区三区91| 91在线视频播放地址| 中文字幕欧美三区| 国产成人午夜视频| 久久久久综合网| 国产一区视频导航| 欧美一区2区视频在线观看| 亚洲香肠在线观看| 日本丶国产丶欧美色综合|