rmat = formatControl.getFormat();
//
FileTypeDescriptor outputType = new FileTypeDescriptor
(FileTypeDescriptor.MSVIDEO);
ProcessorModel processorModel = new ProcessorModel(cloneableSource, new Format[]{ defaultFormat }, outputType);
processor = Manager.createRealizedProcessor(processorModel);
} catch (Exception e) {
processException(e);
}
visualComponent = player.getVisualComponent();
File file = new File("F:/Myrecord/");
m=System.currentTimeMillis();
locatorString=String.valueOf(m)+".avi";
locatorString = "file://" + locatorString;
DataSource source = processor.getDataOutput();
MediaLocator dest = new MediaLocator( locatorString );
try {
//本地文件传输
fileWriter = Manager.createDataSink(source, dest);
fileWriter.open();
fileWriter.start();
} catch (Exception e) {
processException(e);
}
processor.start();
player.start();
.
.
.
}
以上就是本系统的结构与设计,下面看一下系统的测试过程和结果。
三. 测试
软件测试是软件设计、实现中一个非常重要的
工作阶段。通过完整的测试,系统验证正确实现了必需的功能,同时保证了软件在各种边界条件下的证确性、强壮性和高效性。这里我们采用黑盒测试和白盒测试相结合的方式对系统进行测试。下面是系统运行时的两张图片:
图3-1摄像头采集到的信息在服务器端播放 图3-2 手机端播放的远程服务器端的信息
四.总结
本文介绍了基于Android智能手机的多媒体远程监控系统的设计,提出了一种新的架构C/S+M架构,大大提升了系统的性能,同时增加了系统的移植性和代码的可重用性。并比较详细的介绍了系统的整体与各模块的结构与实现。在此期间重点介绍了服务器端指令处理模块及其自定义的编解码协议,手机端Socket管理器的实现与应用,还有Java多媒体框架的基本内容与应用。希望本文能对致力于远程监控行业的同行,有一些启发和帮助。
<