• 大小: 10.26MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-05
  • 语言: Java
  • 标签: java  

资源简介

java多媒体技术(彭波 孙一林) 清华大学出版社 第一章 java 多媒体技术概述 第二章 java2D API应用原理

资源截图

代码片段和文件信息

package AudioCaptureTransmit;

import javax.media.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;
import java.io.IOException;
import javax.media.protocol.FileTypeDescriptor;
import javax.media.protocol.DataSource;
import javax.media.control.StreamWriterControl;
import javax.media.format.AudioFormat;
import javax.swing.*;

// 主界面类
public class AudioCapture extends frame{
  RTPTransmit rtpTransmit = null;                              // RTP传输类对象

  Label labelEncoding = new Label();
  Choice choiceEncoding = new Choice();                        // 编码方法下拉列表框
  Label labelSampleRate = new Label();
  Choice choiceSampleRate = new Choice();                      // 采样率下拉列表框
  Label labelBits = new Label();
  CheckboxGroup checkboxGroupBits = new CheckboxGroup();
  Checkbox checkbox8Bit = new Checkbox();                      // 每个样本的编码位数单选按钮
  Checkbox checkbox16Bit = new Checkbox();
  Label labelChannels = new Label();
  CheckboxGroup checkboxGroupChannels = new CheckboxGroup();
  Checkbox checkboxMono = new Checkbox();                      // 通道数单选按钮
  Checkbox checkboxStereo = new Checkbox();
  JLabel jLabel1 = new JLabel();

  Label labelIP = new Label();
  TextField textIPAdd1 = new TextField();                     // IP地址编辑框
  TextField textIPAdd4 = new TextField();
  TextField textIPAdd3 = new TextField();
  TextField textIPAdd2 = new TextField();
  Label labelPort = new Label();
  TextField textPort = new TextField();                       // 端口号编辑框
  JLabel jLabel2 = new JLabel();

  Button buttonCaptureTransmit = new Button();
  Button buttonstop = new Button();

  // 设置界面和添加事件的监听
  private void jbInit() throws Exception {
    this.setLayout(null);
    this.setBackground(Color.lightGray);

    labelEncoding.setText(“Encoding:“);
    labelEncoding.setBounds(new Rectangle(46 50 80 20));
    choiceEncoding.setBounds(new Rectangle(152 50 180 20));
    choiceEncoding.add(“DVI/RTP“);
    choiceEncoding.add(“G723/RTP“);
    choiceEncoding.add(“GSM/RTP“);
    choiceEncoding.add(“ULAW/RTP“);
    choiceEncoding.add(“MPEGAUDIO/RTP“);
    choiceEncoding.select(0);
    choiceEncoding.addItemListener(new java.awt.event.ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        choiceEncoding_itemStateChanged(e);
      }
    });

    labelSampleRate.setText(“Sample Rate:“);
    labelSampleRate.setBounds(new Rectangle(46 80 80 20));
    choiceSampleRate.setBounds(new Rectangle(152 80 180 20));
    choiceSampleRate.add(“22050.0“);
    choiceSampleRate.add(“11025.0“);
    choiceSampleRate.add(“8000.0“);
    choiceSampleRate.select(0);

    labelBits.setText(“Bits per Sample:“);
    labelBits.setBounds(new Rectangle(46 110 100 20));
    checkbox8Bit.setLabel(“8 bit“);
    checkbox8Bit.setBounds(new Rectangle(152 110 60 20));
    checkbox8Bit.setCheckboxGroup(checkboxGroupBits);
    checkbox16Bit.setLabel(“4 bit“);
    checkbox16Bit.setBounds(new Rectangle(250 110 60 20));
    checkbox16Bit.setCheckboxGr

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-03-07 15:15  java\
     文件          50  2002-02-10 11:32  java\autorun.inf
     文件        1595  2004-09-23 23:21  java\index.html
     文件        5060  2005-01-14 13:57  java\context.html
     文件        4290  2005-01-14 13:55  java\help.html
     文件         766  2002-02-10 11:32  java\syl.ico
     文件       53248  2001-12-30 17:05  java\start.exe
     目录           0  2009-03-07 15:15  java\第9章实例\
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\
     文件        3023  2009-03-06 21:43  java\第9章实例\RTPReceive\RTPReceive.jpx
     文件       13967  2009-03-06 20:46  java\第9章实例\RTPReceive\hs_err_pid3472.log
     文件        1186  2009-03-06 21:44  java\第9章实例\RTPReceive\RTPReceive.jpx.local~
     文件        1427  2009-03-06 21:44  java\第9章实例\RTPReceive\RTPReceive.jpx.local
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\classes\
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\classes\RTPReceive\
     文件        1014  2009-03-04 20:07  java\第9章实例\RTPReceive\classes\RTPReceive\RTPReceive$PlayerPanel.class
     文件        1333  2009-03-04 20:07  java\第9章实例\RTPReceive\classes\RTPReceive\RTPReceive$PlayerWindow.class
     文件        1430  2009-03-04 20:07  java\第9章实例\RTPReceive\classes\RTPReceive\RTPReceive$SessionLabel.class
     文件        9045  2009-03-04 20:07  java\第9章实例\RTPReceive\classes\RTPReceive\RTPReceive.class
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\classes\package cache\
     文件        6639  2009-03-04 20:07  java\第9章实例\RTPReceive\classes\package cache\RTPReceive.dep2
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\src\
     目录           0  2009-03-07 15:15  java\第9章实例\RTPReceive\src\RTPReceive\
     文件       12851  2002-10-17 16:13  java\第9章实例\RTPReceive\src\RTPReceive\RTPReceive.java
     目录           0  2009-03-07 15:15  java\第9章实例\RTPTransmit\
     文件        5324  2009-03-06 19:38  java\第9章实例\RTPTransmit\RTPTransmit.jpx
     文件         919  2009-03-06 20:32  java\第9章实例\RTPTransmit\RTPTransmit.jpx.local~
     文件         919  2009-03-06 20:32  java\第9章实例\RTPTransmit\RTPTransmit.jpx.local
     目录           0  2009-03-07 15:15  java\第9章实例\RTPTransmit\classes\
     目录           0  2009-03-07 15:15  java\第9章实例\RTPTransmit\classes\RTPTransmit\
     文件        2241  2009-03-01 10:48  java\第9章实例\RTPTransmit\classes\RTPTransmit\ExampleFileFilter.class
............此处省略755个文件信息

评论

共有 条评论