当前位置: 首页>>代码示例>>Java>>正文


Java ContentDescriptor类代码示例

本文整理汇总了Java中javax.media.protocol.ContentDescriptor的典型用法代码示例。如果您正苦于以下问题:Java ContentDescriptor类的具体用法?Java ContentDescriptor怎么用?Java ContentDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContentDescriptor类属于javax.media.protocol包,在下文中一共展示了ContentDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: process

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public void process(String recordingFile, String movieFile) throws Exception {

      MediaLocator mediaLocator = new MediaLocator(new File(movieFile).toURI()
            .toURL());
      PlayerDataSource playerDataSource = new PlayerDataSource(recordingFile);
      Processor processor = Manager.createProcessor(playerDataSource);
      processor.addControllerListener(this);
      processor.configure();

      if (!waitForState(processor, Processor.Configured)) {
         System.err.println("Failed to configure the processor.");
         return;
      }

      processor.setContentDescriptor(new ContentDescriptor(
            FileTypeDescriptor.QUICKTIME));

      TrackControl trackControl[] = processor.getTrackControls();
      Format format[] = trackControl[0].getSupportedFormats();
      trackControl[0].setFormat(format[0]);
      processor.realize();
      if (!waitForState(processor, Processor.Realized)) {
         System.err.println("Failed to realize the processor.");
         return;
      }

      DataSource dataSource = processor.getDataOutput();
      DataSink dataSink = Manager.createDataSink(dataSource, mediaLocator);
      dataSink.open();
      processor.start();
      dataSink.start();
      waitForFileDone();
      dataSink.close();
      processor.removeControllerListener(this);
   }
 
开发者ID:openwarrior,项目名称:java-screen-recorder,代码行数:36,代码来源:RecordingConverter.java

示例2: controllerUpdate

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
@Override
public void controllerUpdate(ControllerEvent p0) {
	if (p0 instanceof ConfigureCompleteEvent) {
		ContentDescriptor cd = new ContentDescriptor(
				ContentDescriptor.RAW_RTP);
		processor.setContentDescriptor(cd);
		Format format;
		TrackControl track[] = processor.getTrackControls();
		int numPistas=track.length;
		for(int i=0;i<numPistas;i++){
			format = track[i].getFormat();

			if (format instanceof VideoFormat) {
				VideoFormat v = (VideoFormat) track[i].getFormat();
				setMyVideoFormat(v, track[i]);
			}
			if (format instanceof AudioFormat) {
				AudioFormat a = (AudioFormat) track[i].getFormat();
				setMyAudioFormat(a, track[i]);
			}
		}
		processor.realize();
	}

	if (p0 instanceof RealizeCompleteEvent) {
		try {
			ds = processor.getDataOutput();
			createMyRTPManager();
		} catch (NotRealizedError ex) {
			myEx(null, ex.getMessage());
		}
	}

	if (p0 instanceof EndOfMediaEvent) {
		closeMyStream();
		endofMedia = true;
	}
}
 
开发者ID:mloobo,项目名称:Dolphin-Streaming-Server,代码行数:39,代码来源:UnicastRtpWebcam.java

示例3: getStreams

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public PullSourceStream[] getStreams() {
	PullSourceStream [] streams = new PullSourceStream [1];
	InputSourceStream iss = new InputSourceStream(in, 
			new FileTypeDescriptor(ContentDescriptor.RAW));
	streams[0] = iss;
	return streams;
}
 
开发者ID:davidrudder23,项目名称:OpenNotification,代码行数:8,代码来源:InputStreamDataSource.java

示例4: getSupportedInputContentDescriptors

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
@Override
public ContentDescriptor[] getSupportedInputContentDescriptors()
{
	return supportedInputContentDescriptors;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:6,代码来源:QTParser.java

示例5: getSupportedInputContentDescriptors

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor [] getSupportedInputContentDescriptors() {
    return supportedFormat;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:4,代码来源:GsmParser.java

示例6: FTPSourceStream

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public FTPSourceStream(InputStream in)
{
   this.dataIn = in;
   eofMarker = false;
   cd = new ContentDescriptor("unknown");
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:7,代码来源:FTPSourceStream.java

示例7: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor()
{
   return cd;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:5,代码来源:FTPSourceStream.java

示例8: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor() {
return actual.getContentDescriptor();
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:4,代码来源:MonitorStream.java

示例9: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
/***************************************************************************
    * SourceStream
    ***************************************************************************/
   
   public ContentDescriptor getContentDescriptor() {
return cd;
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:8,代码来源:LiveStream.java

示例10: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor() {
    return new ContentDescriptor(ContentDescriptor.RAW);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:4,代码来源:JpegImagesToMovie.java

示例11: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor() {
    return null;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:4,代码来源:RTPSocketAdapter.java

示例12: getContentType

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public String getContentType() {
return ContentDescriptor.RAW;
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:4,代码来源:SuperGlueDataSource.java

示例13: getContentType

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
/**
 * Returns RAW since buffers of video frames are sent without a container format.
 */
@Override
public String getContentType()
{
	return ContentDescriptor.RAW;
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:9,代码来源:VideoPanel.java

示例14: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor()
{
	return new ContentDescriptor(ContentDescriptor.RAW);
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:5,代码来源:VideoPanel.java

示例15: getContentDescriptor

import javax.media.protocol.ContentDescriptor; //导入依赖的package包/类
public ContentDescriptor getContentDescriptor() {
   return new ContentDescriptor(ContentDescriptor.RAW);
}
 
开发者ID:openwarrior,项目名称:java-screen-recorder,代码行数:4,代码来源:PlayerSourceStream.java


注:本文中的javax.media.protocol.ContentDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。