├── appcel-service-encoder ├── .settings │ ├── org.eclipse.wst.jsdt.ui.superType.name │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.jdt.core.prefs │ ├── .jsdtscope │ └── org.eclipse.wst.common.component ├── src │ ├── main │ │ ├── webapp │ │ │ ├── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── WEB-INF │ │ │ │ ├── classes │ │ │ │ └── com │ │ │ │ │ └── appcel │ │ │ │ │ ├── core │ │ │ │ │ └── encoder │ │ │ │ │ │ ├── MediaFFmpeg.class │ │ │ │ │ │ ├── MediaEncoder.class │ │ │ │ │ │ ├── dao │ │ │ │ │ │ ├── MultimediaDao.class │ │ │ │ │ │ └── impl │ │ │ │ │ │ │ └── MultimediaDaoImpl.class │ │ │ │ │ │ ├── utils │ │ │ │ │ │ └── DurationUtil.class │ │ │ │ │ │ ├── executor │ │ │ │ │ │ ├── ExecutorEnum.class │ │ │ │ │ │ ├── ProcessKiller.class │ │ │ │ │ │ ├── EncoderExecutor.class │ │ │ │ │ │ ├── QTFaststartExecutor.class │ │ │ │ │ │ ├── EncoderBufferedReader.class │ │ │ │ │ │ └── MediaInputStreamParser.class │ │ │ │ │ │ ├── locator │ │ │ │ │ │ ├── EncoderLocator.class │ │ │ │ │ │ ├── QTFaststartLocator.class │ │ │ │ │ │ ├── DefaultEncoderLocator.class │ │ │ │ │ │ └── DefaultQTFaststartLocator.class │ │ │ │ │ │ ├── manager │ │ │ │ │ │ ├── MultimediaManager.class │ │ │ │ │ │ └── impl │ │ │ │ │ │ │ └── MultimediaManagerImpl.class │ │ │ │ │ │ └── config │ │ │ │ │ │ └── EncoderConfiguration.class │ │ │ │ │ ├── encoder │ │ │ │ │ └── VedioEncoderTest.class │ │ │ │ │ └── facade │ │ │ │ │ └── encoder │ │ │ │ │ └── service │ │ │ │ │ └── impl │ │ │ │ │ ├── EncoderServiceImpl.class │ │ │ │ │ ├── MultimediaServiceImpl.class │ │ │ │ │ ├── MediaEncoderServiceImpl.class │ │ │ │ │ └── FfmpegEncoderServiceImpl.class │ │ │ │ └── web.xml │ │ ├── resources │ │ │ ├── encoderdir │ │ │ │ └── watermark │ │ │ │ │ └── watermark.png │ │ │ ├── mq.properties │ │ │ ├── fdfs │ │ │ │ └── fdfs_client.conf │ │ │ ├── spring │ │ │ │ ├── spring-dubbo-consumer.xml │ │ │ │ ├── spring-dubbo-provider.xml │ │ │ │ ├── spring-context.xml │ │ │ │ ├── spring-activemq.xml │ │ │ │ ├── spring-mybatis.xml │ │ │ │ └── spring-scheduler-job.xml │ │ │ ├── encoder.properties │ │ │ └── mybatis │ │ │ │ ├── mapper │ │ │ │ └── multimedia │ │ │ │ │ ├── Configure.Mapper.xml │ │ │ │ │ ├── EncoderInfo.Mapper.xml │ │ │ │ │ └── Multimedia.Mapper.xml │ │ │ │ └── mybatis-config.xml │ │ └── java │ │ │ └── com │ │ │ └── appcel │ │ │ ├── core │ │ │ └── encoder │ │ │ │ ├── job │ │ │ │ ├── ExtractAudioJob.java │ │ │ │ └── ExtractSubtitleJob.java │ │ │ │ ├── dao │ │ │ │ ├── ConfigureDao.java │ │ │ │ ├── MultimediaDao.java │ │ │ │ ├── EncoderInfoDao.java │ │ │ │ └── impl │ │ │ │ │ ├── ConfigureDaoImpl.java │ │ │ │ │ ├── MultimediaDaoImpl.java │ │ │ │ │ └── EncoderInfoDaoImpl.java │ │ │ │ ├── manager │ │ │ │ ├── MultimediaManager.java │ │ │ │ ├── EncoderInfoManager.java │ │ │ │ └── impl │ │ │ │ │ ├── MultimediaManagerImpl.java │ │ │ │ │ └── EncoderInfoManagerImpl.java │ │ │ │ ├── executor │ │ │ │ ├── ProcessKiller.java │ │ │ │ ├── EncoderBufferedReader.java │ │ │ │ └── EncoderExecutor.java │ │ │ │ ├── locator │ │ │ │ └── AbstractEncoderLocator.java │ │ │ │ ├── utils │ │ │ │ └── DurationUtil.java │ │ │ │ └── queue │ │ │ │ └── EncoderSessionAwareMessageListener.java │ │ │ └── facade │ │ │ └── encoder │ │ │ └── service │ │ │ └── impl │ │ │ ├── MultimediaServiceImpl.java │ │ │ └── EncoderInfoServiceImpl.java │ └── test │ │ ├── resources │ │ ├── encoderdir │ │ │ └── watermark │ │ │ │ └── watermark.png │ │ ├── fdfs │ │ │ └── fdfs_client.conf │ │ ├── dubbo-consumer.xml │ │ └── service-encoder.sh │ │ └── java │ │ └── com │ │ └── appcel │ │ └── facade │ │ └── encoder │ │ └── service │ │ ├── MQConsumerTest.java │ │ ├── DubboProvider.java │ │ ├── MultimediaServiceTest.java │ │ └── EncoderInfoServiceTest.java ├── target │ ├── classes │ │ ├── encoderdir │ │ │ └── watermark │ │ │ │ └── watermark.png │ │ ├── com │ │ │ └── appcel │ │ │ │ ├── core │ │ │ │ └── encoder │ │ │ │ │ ├── FastDFSClient.class │ │ │ │ │ ├── MediaEncoder.class │ │ │ │ │ ├── MediaEncoder$1.class │ │ │ │ │ ├── dao │ │ │ │ │ ├── ConfigureDao.class │ │ │ │ │ ├── EncoderInfoDao.class │ │ │ │ │ ├── MultimediaDao.class │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ConfigureDaoImpl.class │ │ │ │ │ │ ├── EncoderInfoDaoImpl.class │ │ │ │ │ │ └── MultimediaDaoImpl.class │ │ │ │ │ ├── job │ │ │ │ │ ├── TranscodingJob.class │ │ │ │ │ ├── CaptureImageJob.class │ │ │ │ │ ├── ExtractAudioJob.class │ │ │ │ │ └── ExtractSubtitleJob.class │ │ │ │ │ ├── utils │ │ │ │ │ └── DurationUtil.class │ │ │ │ │ ├── executor │ │ │ │ │ ├── ProcessKiller.class │ │ │ │ │ ├── EncoderExecutor.class │ │ │ │ │ ├── QTFaststartExecutor.class │ │ │ │ │ ├── EncoderBufferedReader.class │ │ │ │ │ ├── FfmpegEncoderExecutor.class │ │ │ │ │ └── MediaInputStreamParser.class │ │ │ │ │ ├── locator │ │ │ │ │ ├── EncoderLocator.class │ │ │ │ │ └── AbstractEncoderLocator.class │ │ │ │ │ ├── manager │ │ │ │ │ ├── MultimediaManager.class │ │ │ │ │ ├── EncoderInfoManager.class │ │ │ │ │ └── impl │ │ │ │ │ │ ├── EncoderInfoManagerImpl.class │ │ │ │ │ │ └── MultimediaManagerImpl.class │ │ │ │ │ ├── config │ │ │ │ │ └── EncoderConfiguration.class │ │ │ │ │ └── queue │ │ │ │ │ ├── EncoderSessionAwareMessageListener.class │ │ │ │ │ └── EncoderSessionAwareMessageListener$1.class │ │ │ │ └── facade │ │ │ │ └── encoder │ │ │ │ └── service │ │ │ │ └── impl │ │ │ │ ├── EncoderServiceImpl.class │ │ │ │ ├── EncoderInfoServiceImpl.class │ │ │ │ └── MultimediaServiceImpl.class │ │ ├── mq.properties │ │ ├── fdfs │ │ │ └── fdfs_client.conf │ │ ├── META-INF │ │ │ ├── maven │ │ │ │ └── com.appcel │ │ │ │ │ └── appcel-service-encoder │ │ │ │ │ └── pom.properties │ │ │ ├── spring │ │ │ │ └── spring-context.xml │ │ │ └── MANIFEST.MF │ │ ├── spring │ │ │ ├── spring-dubbo-consumer.xml │ │ │ ├── spring-dubbo-provider.xml │ │ │ ├── spring-context.xml │ │ │ ├── spring-activemq.xml │ │ │ └── spring-mybatis.xml │ │ ├── encoder.properties │ │ └── mybatis │ │ │ ├── mapper │ │ │ └── multimedia │ │ │ │ ├── Configure.Mapper.xml │ │ │ │ ├── EncoderInfo.Mapper.xml │ │ │ │ └── Multimedia.Mapper.xml │ │ │ └── mybatis-config.xml │ ├── maven-archiver │ │ └── pom.properties │ ├── test-classes │ │ ├── encoderdir │ │ │ └── watermark │ │ │ │ └── watermark.png │ │ ├── com │ │ │ └── appcel │ │ │ │ └── facade │ │ │ │ └── encoder │ │ │ │ └── service │ │ │ │ ├── DubboProvider.class │ │ │ │ ├── MQConsumerTest.class │ │ │ │ ├── EncoderInfoServiceTest.class │ │ │ │ └── MultimediaServiceTest.class │ │ ├── fdfs │ │ │ └── fdfs_client.conf │ │ ├── dubbo-consumer.xml │ │ └── service-encoder.sh │ └── service-encoder.sh ├── .mymetadata ├── .classpath └── .project ├── .gitignore ├── appcel-facade-encoder ├── .settings │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── target │ ├── classes │ │ ├── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── maven │ │ │ │ └── com.appcel │ │ │ │ └── appcel-facade-encoder │ │ │ │ ├── pom.properties │ │ │ │ └── pom.xml │ │ └── com │ │ │ └── appcel │ │ │ └── facade │ │ │ └── encoder │ │ │ ├── mode │ │ │ ├── AudioInfo.class │ │ │ ├── Configure.class │ │ │ ├── VideoInfo.class │ │ │ ├── VideoSize.class │ │ │ ├── EncoderInfo.class │ │ │ ├── Multimedia.class │ │ │ ├── VoiceFileInfo.class │ │ │ └── SubtitleFileInfo.class │ │ │ ├── DTO │ │ │ ├── AudioInfoDTO.class │ │ │ ├── MediaRecord.class │ │ │ ├── VideoInfoDTO.class │ │ │ ├── VideoSizeDTO.class │ │ │ ├── AudioAttributes.class │ │ │ ├── MultimediaInfo.class │ │ │ ├── VideoAttributes.class │ │ │ └── EncodingAttributes.class │ │ │ ├── service │ │ │ ├── EncoderService.class │ │ │ ├── EncoderInfoService.class │ │ │ └── MultimediaService.class │ │ │ ├── enums │ │ │ ├── EncoderStatusEnum.class │ │ │ ├── EncoderExecutorEnum.class │ │ │ └── EncoderPlayModeEnum.class │ │ │ ├── exception │ │ │ ├── EncoderException.class │ │ │ ├── InputFormatException.class │ │ │ └── EncoderRuntimeException.class │ │ │ └── listener │ │ │ └── EncoderProgressListener.class │ ├── maven-archiver │ │ └── pom.properties │ ├── test-classes │ │ └── com │ │ │ └── appcel │ │ │ └── encoder │ │ │ └── VedioEncoderTest.class │ └── surefire-reports │ │ └── com.appcel.encoder.VedioEncoderTest.txt ├── .classpath ├── .project ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── appcel │ │ │ └── encoder │ │ │ └── VedioEncoderTest.java │ └── main │ │ └── java │ │ └── com │ │ └── appcel │ │ └── facade │ │ └── encoder │ │ ├── exception │ │ ├── InputFormatException.java │ │ ├── EncoderException.java │ │ └── EncoderRuntimeException.java │ │ ├── service │ │ ├── MultimediaService.java │ │ └── EncoderInfoService.java │ │ ├── listener │ │ └── EncoderProgressListener.java │ │ ├── DTO │ │ ├── VideoSizeDTO.java │ │ ├── VideoInfoDTO.java │ │ ├── MultimediaInfo.java │ │ ├── AudioInfoDTO.java │ │ └── VideoAttributes.java │ │ ├── enums │ │ ├── EncoderPlayModeEnum.java │ │ ├── EncoderExecutorEnum.java │ │ └── EncoderStatusEnum.java │ │ └── mode │ │ ├── VoiceFileInfo.java │ │ ├── Configure.java │ │ ├── SubtitleFileInfo.java │ │ ├── VideoSize.java │ │ └── AudioInfo.java └── pom.xml └── README.md /appcel-service-encoder/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Package Files # 4 | *.jar 5 | *.war 6 | *.ear 7 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /appcel-facade-encoder/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /appcel-facade-encoder/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: Administrator 3 | Build-Jdk: 1.6.0_13 4 | Created-By: Maven Integration for Eclipse 5 | 6 | -------------------------------------------------------------------------------- /appcel-facade-encoder/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Sat May 14 20:34:12 CST 2016 3 | version=1.0.0-SNAPSHOT 4 | groupId=com.appcel 5 | artifactId=appcel-facade-encoder 6 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/encoderdir/watermark/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/encoderdir/watermark/watermark.png -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/encoderdir/watermark/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/resources/encoderdir/watermark/watermark.png -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/resources/encoderdir/watermark/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/test/resources/encoderdir/watermark/watermark.png -------------------------------------------------------------------------------- /appcel-service-encoder/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Fri May 20 16:02:29 CST 2016 3 | version=1.0.0-SNAPSHOT 4 | groupId=com.appcel 5 | artifactId=appcel-service-encoder 6 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/encoderdir/watermark/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/test-classes/encoderdir/watermark/watermark.png -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/FastDFSClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/FastDFSClient.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/MediaEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/MediaEncoder.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/AudioInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/AudioInfo.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/Configure.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/Configure.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VideoInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VideoInfo.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VideoSize.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VideoSize.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/test-classes/com/appcel/encoder/VedioEncoderTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/test-classes/com/appcel/encoder/VedioEncoderTest.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/MediaEncoder$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/MediaEncoder$1.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/AudioInfoDTO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/AudioInfoDTO.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/MediaRecord.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/MediaRecord.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoInfoDTO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoInfoDTO.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoSizeDTO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoSizeDTO.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/EncoderInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/EncoderInfo.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/Multimedia.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/Multimedia.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/ConfigureDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/ConfigureDao.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/EncoderInfoDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/EncoderInfoDao.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/MultimediaDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/MultimediaDao.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/job/TranscodingJob.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/job/TranscodingJob.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/utils/DurationUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/utils/DurationUtil.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/AudioAttributes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/AudioAttributes.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/MultimediaInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/MultimediaInfo.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoAttributes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/VideoAttributes.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VoiceFileInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/VoiceFileInfo.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/job/CaptureImageJob.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/job/CaptureImageJob.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/job/ExtractAudioJob.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/job/ExtractAudioJob.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/EncodingAttributes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/DTO/EncodingAttributes.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/SubtitleFileInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/mode/SubtitleFileInfo.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/EncoderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/EncoderService.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/ProcessKiller.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/ProcessKiller.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/job/ExtractSubtitleJob.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/job/ExtractSubtitleJob.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/locator/EncoderLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/locator/EncoderLocator.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderStatusEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderStatusEnum.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/ConfigureDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/ConfigureDaoImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/EncoderExecutor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/EncoderExecutor.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/MultimediaManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/MultimediaManager.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderExecutorEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderExecutorEnum.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderPlayModeEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/enums/EncoderPlayModeEnum.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/EncoderException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/EncoderException.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/EncoderInfoService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/EncoderInfoService.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/MultimediaService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/service/MultimediaService.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/mq.properties: -------------------------------------------------------------------------------- 1 | ## MQ 2 | mq.brokerURL=tcp\://192.168.56.66\:61616 3 | mq.userName=kony 4 | mq.password=kony.123 5 | mq.pool.maxConnections=10 6 | #queueName 7 | queueName.encoder=appcel.queue.video.encoder.v1 -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/MediaFFmpeg.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/MediaFFmpeg.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/encoder/VedioEncoderTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/encoder/VedioEncoderTest.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/config/EncoderConfiguration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/config/EncoderConfiguration.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/EncoderInfoDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/EncoderInfoDaoImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/MultimediaDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/dao/impl/MultimediaDaoImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/QTFaststartExecutor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/QTFaststartExecutor.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/EncoderInfoManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/EncoderInfoManager.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/mq.properties: -------------------------------------------------------------------------------- 1 | ## MQ 2 | mq.brokerURL=tcp\://192.168.56.66\:61616 3 | mq.userName=kony 4 | mq.password=kony.123 5 | mq.pool.maxConnections=10 6 | #queueName 7 | queueName.encoder=appcel.queue.video.encoder.v1 -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/DubboProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/DubboProvider.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/MediaEncoder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/MediaEncoder.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/EncoderBufferedReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/EncoderBufferedReader.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/FfmpegEncoderExecutor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/FfmpegEncoderExecutor.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/locator/AbstractEncoderLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/locator/AbstractEncoderLocator.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/MQConsumerTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/MQConsumerTest.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/InputFormatException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/InputFormatException.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/listener/EncoderProgressListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/listener/EncoderProgressListener.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/MediaInputStreamParser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/executor/MediaInputStreamParser.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/EncoderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/EncoderServiceImpl.class -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/EncoderRuntimeException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-facade-encoder/target/classes/com/appcel/facade/encoder/exception/EncoderRuntimeException.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/dao/MultimediaDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/dao/MultimediaDao.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/utils/DurationUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/utils/DurationUtil.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/impl/EncoderInfoManagerImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/impl/EncoderInfoManagerImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/impl/MultimediaManagerImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/manager/impl/MultimediaManagerImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/ExecutorEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/ExecutorEnum.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/EncoderInfoServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/EncoderInfoServiceImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/MultimediaServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/facade/encoder/service/impl/MultimediaServiceImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/EncoderInfoServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/EncoderInfoServiceTest.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/MultimediaServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/test-classes/com/appcel/facade/encoder/service/MultimediaServiceTest.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/ProcessKiller.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/ProcessKiller.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/EncoderLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/EncoderLocator.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/queue/EncoderSessionAwareMessageListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/queue/EncoderSessionAwareMessageListener.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/dao/impl/MultimediaDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/dao/impl/MultimediaDaoImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/EncoderExecutor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/EncoderExecutor.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/QTFaststartLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/QTFaststartLocator.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/manager/MultimediaManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/manager/MultimediaManager.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/com/appcel/core/encoder/queue/EncoderSessionAwareMessageListener$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/target/classes/com/appcel/core/encoder/queue/EncoderSessionAwareMessageListener$1.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/config/EncoderConfiguration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/config/EncoderConfiguration.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/QTFaststartExecutor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/QTFaststartExecutor.class -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/fdfs/fdfs_client.conf: -------------------------------------------------------------------------------- 1 | connect_timeout = 10 2 | network_timeout = 30 3 | charset = UTF-8 4 | http.tracker_http_port = 8080 5 | http.anti_steal_token = no 6 | http.secret_key = FastDFS1234567890 7 | 8 | tracker_server = 192.168.56.66:22122 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/fdfs/fdfs_client.conf: -------------------------------------------------------------------------------- 1 | connect_timeout = 10 2 | network_timeout = 30 3 | charset = UTF-8 4 | http.tracker_http_port = 8080 5 | http.anti_steal_token = no 6 | http.secret_key = FastDFS1234567890 7 | 8 | tracker_server = 192.168.56.66:22122 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/EncoderBufferedReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/EncoderBufferedReader.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/MediaInputStreamParser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/executor/MediaInputStreamParser.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/DefaultEncoderLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/DefaultEncoderLocator.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/resources/fdfs/fdfs_client.conf: -------------------------------------------------------------------------------- 1 | connect_timeout = 10 2 | network_timeout = 30 3 | charset = UTF-8 4 | http.tracker_http_port = 8080 5 | http.anti_steal_token = no 6 | http.secret_key = FastDFS1234567890 7 | 8 | tracker_server = 192.168.56.66:22122 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/fdfs/fdfs_client.conf: -------------------------------------------------------------------------------- 1 | connect_timeout = 10 2 | network_timeout = 30 3 | charset = UTF-8 4 | http.tracker_http_port = 8080 5 | http.anti_steal_token = no 6 | http.secret_key = FastDFS1234567890 7 | 8 | tracker_server = 192.168.56.66:22122 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/main/resources/spring=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/DefaultQTFaststartLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/locator/DefaultQTFaststartLocator.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/EncoderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/EncoderServiceImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/manager/impl/MultimediaManagerImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/core/encoder/manager/impl/MultimediaManagerImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/MultimediaServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/MultimediaServiceImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/MediaEncoderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/MediaEncoderServiceImpl.class -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/FfmpegEncoderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pecker/kony-encorder/HEAD/appcel-service-encoder/src/main/webapp/WEB-INF/classes/com/appcel/facade/encoder/service/impl/FfmpegEncoderServiceImpl.class -------------------------------------------------------------------------------- /appcel-facade-encoder/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 3 | org.eclipse.jdt.core.compiler.compliance=1.7 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /appcel-facade-encoder/target/surefire-reports/com.appcel.encoder.VedioEncoderTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: com.appcel.encoder.VedioEncoderTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 sec 5 | -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/META-INF/maven/com.appcel/appcel-facade-encoder/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Sun Jun 19 09:27:33 CST 2016 3 | version=1.0.0-SNAPSHOT 4 | groupId=com.appcel 5 | m2e.projectName=appcel-facade-encoder 6 | m2e.projectLocation=D\:\\MyEclipse for Spring\\workspace\\appcel\\appcel-facade-encoder 7 | artifactId=appcel-facade-encoder 8 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/META-INF/maven/com.appcel/appcel-service-encoder/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Sun Jun 19 09:27:33 CST 2016 3 | version=1.0.0-SNAPSHOT 4 | groupId=com.appcel 5 | m2e.projectName=appcel-service-encoder 6 | m2e.projectLocation=D\:\\MyEclipse for Spring\\workspace\\appcel\\appcel-service-encoder 7 | artifactId=appcel-service-encoder 8 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/job/ExtractAudioJob.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.job; 7 | 8 | /** 9 | * 10 | * @author Kony.Lee 11 | * @version appcel 1.0 12 | * @since JDK-1.7.0 13 | * @date 2016-6-1 14 | */ 15 | public class ExtractAudioJob { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /appcel-service-encoder/.mymetadata: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/job/ExtractSubtitleJob.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.job; 7 | 8 | /** 9 | * 10 | * @author Kony.Lee 11 | * @version appcel 1.0 12 | * @since JDK-1.7.0 13 | * @date 2016-6-1 14 | */ 15 | public class ExtractSubtitleJob { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.7 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | index.jsp 10 | 11 | 12 | -------------------------------------------------------------------------------- /appcel-facade-encoder/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/spring/spring-dubbo-consumer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-dubbo-consumer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /appcel-facade-encoder/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | appcel-facade-encoder 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #kony-encorder 2 | 3 | 4 | 主要技术点: 5 | 6 | 通过 ffmpeg 3.0 + qt-faststart 将视频文件转换为 flv或mp4格式的视频 7 | 8 | 9 | fastdfs文件系统存储上传的原视频和转换后的视频文件,一个国内开源的支持分布式部署的文件系统。 10 | 11 | 12 | 通过 spring 容器对服务接口进行依赖注入、事务管理 13 | 14 | quartz 进行任务调度根据设置的cron trigger触发执行转换服务。Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用。Quartz可以用来创建简单或为运行十个,百个,甚至是好几万个Jobs这样复杂的程序。Jobs可以做成标准的Java组件或 EJBs。 15 | 16 | dubbo 分布式服务治理,服务提供者和消费者。DUBBO是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,是阿里巴巴SOA服务化治理方案的核心框架,每天为2,000+个服务提供3,000,000,000+次访问量支持,并被广泛应用于阿里巴巴集团的各成员站点。 17 | 18 | zookeeper 是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。 MyBatis服务化的文档转换服务。 19 | 20 | 视频转换服务,支持在对视频转换过程中加水印。 21 | 22 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/test/java/com/appcel/encoder/VedioEncoderTest.java: -------------------------------------------------------------------------------- 1 | package com.appcel.encoder; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class VedioEncoderTest extends TestCase { 11 | /** 12 | * Create the test case 13 | * 14 | * @param testName name of the test case 15 | */ 16 | public VedioEncoderTest(String testName) { 17 | super(testName); 18 | } 19 | 20 | /** 21 | * @return the suite of tests being tested 22 | */ 23 | public static Test suite() { 24 | return new TestSuite(VedioEncoderTest.class); 25 | } 26 | 27 | /** 28 | * Rigourous Test :-) 29 | */ 30 | public void testApp() { 31 | assertTrue(true); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/ConfigureDao.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.mode.Configure; 11 | import com.appcel.kernel.mybatis.dao.BaseDao; 12 | 13 | /** 14 | * 15 | * @author Kony.Lee 16 | * @version appcel 1.0 17 | * @since JDK-1.7.0 18 | * @date 2016-5-12 19 | */ 20 | public interface ConfigureDao extends BaseDao { 21 | 22 | Configure createConfigure(String name, String value, String remark); 23 | 24 | Configure findConfigureByKey(String key); 25 | 26 | List listAllConfigure(); 27 | 28 | boolean deleteConfigureByKey(String key); 29 | 30 | } -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/exception/InputFormatException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.exception; 7 | 8 | 9 | /** 10 | * 11 | * Defiend class file the InputFormatException.java 12 | * 13 | * This expection is thrown if a source file format is not recognized. 14 | * 15 | * @author Rock.Lee 16 | * @version appcel 1.0.0 17 | * @since JDK-1.7.0 18 | * @date 2014-12-2 19 | */ 20 | public class InputFormatException extends EncoderException { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | public InputFormatException() { 25 | super(); 26 | } 27 | 28 | public InputFormatException(String message) { 29 | super(message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /appcel-service-encoder/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/java/com/appcel/facade/encoder/service/MQConsumerTest.java: -------------------------------------------------------------------------------- 1 | package com.appcel.facade.encoder.service; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | /** 8 | * 9 | * @描述: ActiveMQ测试启动类 . 10 | * @作者: LiRongSheng . 11 | * @创建时间: 2015-3-17,上午2:25:20 . 12 | * @版本号: V1.0 . 13 | */ 14 | public class MQConsumerTest { 15 | private static final Log log = LogFactory.getLog(MQConsumerTest.class); 16 | 17 | public static void main(String[] args) { 18 | try { 19 | ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( 20 | "classpath:spring/spring-context.xml"); 21 | context.start(); 22 | } catch (Exception e) { 23 | log.error("==>MQ context start error:", e); 24 | System.exit(0); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /appcel-service-encoder/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/service/MultimediaService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.mode.AudioInfo; 11 | import com.appcel.facade.encoder.mode.Multimedia; 12 | import com.appcel.facade.encoder.mode.VideoInfo; 13 | 14 | /** 15 | * 16 | * @author Kony.Lee 17 | * @version appcel 1.0 18 | * @since JDK-1.7.0 19 | * @date 2016-5-3 20 | */ 21 | public interface MultimediaService { 22 | 23 | Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 24 | AudioInfo audioInfo, VideoInfo videoInfo); 25 | 26 | Multimedia getMultimediaByKey(String key); 27 | 28 | List getMultimediaByEntityKey(String entityKey); 29 | 30 | boolean deleteMultimedaByEntityKey(String entityKey); 31 | 32 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/resources/dubbo-consumer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/dubbo-consumer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/java/com/appcel/facade/encoder/service/DubboProvider.java: -------------------------------------------------------------------------------- 1 | package com.appcel.facade.encoder.service; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | /** 8 | * 测试注册服务 9 | * 10 | * @author Kony.Lee 11 | * @version appcel 1.0 12 | * @since JDK-1.7.0 13 | * @date 2016-4-6 14 | */ 15 | public class DubboProvider { 16 | 17 | private static final Log log = LogFactory.getLog(DubboProvider.class); 18 | 19 | public static void main(String[] args) { 20 | try { 21 | ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( 22 | "classpath:spring/spring-context.xml"); 23 | context.start(); 24 | } catch (Exception e) { 25 | log.error("== DubboProvider context start error:", e); 26 | } 27 | synchronized (DubboProvider.class) { 28 | while (true) { 29 | try { 30 | DubboProvider.class.wait(); 31 | } catch (InterruptedException e) { 32 | log.error("== synchronized error:", e); 33 | } 34 | } 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/manager/MultimediaManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.manager; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.mode.AudioInfo; 11 | import com.appcel.facade.encoder.mode.Multimedia; 12 | import com.appcel.facade.encoder.mode.VideoInfo; 13 | import com.appcel.kernel.mybatis.manager.BaseManager; 14 | 15 | /** 16 | * 17 | * Defiend class file the MultimediaManager.java 18 | * 19 | * 20 | * @author Rock.Lee 21 | * @version appcel 1.0.0 22 | * @since JDK-1.7.0 23 | * @date 2014-12-10 24 | */ 25 | public interface MultimediaManager extends BaseManager { 26 | 27 | Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 28 | AudioInfo audioInfo, VideoInfo videoInfo); 29 | 30 | Multimedia getMultimediaByKey(String key); 31 | 32 | List getMultimediaByEntityKey(String entityKey); 33 | 34 | boolean deleteMultimedaByEntityKey(String entityKey); 35 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/MultimediaDao.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.mode.AudioInfo; 11 | import com.appcel.facade.encoder.mode.Multimedia; 12 | import com.appcel.facade.encoder.mode.VideoInfo; 13 | import com.appcel.kernel.mybatis.dao.BaseDao; 14 | 15 | /** 16 | * 17 | * Defiend class file the MultimediaDao.java 18 | * 19 | * @author Rock.Lee 20 | * @version appcel 1.0.0 21 | * @since JDK-1.7.0 22 | * @date 2014-12-9 23 | */ 24 | public interface MultimediaDao extends BaseDao { 25 | 26 | Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 27 | AudioInfo audioInfo, VideoInfo videoInfo); 28 | 29 | Multimedia findMultimediaByKey(String key); 30 | 31 | List findMultimediaByEntityKey(String entityKey); 32 | 33 | boolean deleteMultimedaByEntityKey(String entityKey); 34 | 35 | boolean deleteMultimedaByKey(String key); 36 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/EncoderInfoDao.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 11 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 12 | import com.appcel.facade.encoder.mode.EncoderInfo; 13 | import com.appcel.kernel.mybatis.dao.BaseDao; 14 | 15 | /** 16 | * 17 | * @author Kony.Lee 18 | * @version appcel 1.0 19 | * @since JDK-1.7.0 20 | * @date 2016-5-11 21 | */ 22 | public interface EncoderInfoDao extends BaseDao { 23 | 24 | EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 25 | EncoderStatusEnum status, String remark); 26 | 27 | EncoderInfo findEncoderInfoByKey(String key); 28 | 29 | List findEncoderInfoByEntityKey(String entityKey); 30 | 31 | boolean deleteEncoderInfoByEntityKey(String entityKey); 32 | 33 | boolean deleteEncoderInfoByKey(String key); 34 | 35 | boolean updateEncoderTime(String key); 36 | 37 | List findEncoderInfoByStatus(EncoderStatusEnum encoderSatus); 38 | 39 | boolean updateEncoderStatus(String key, EncoderStatusEnum encoderSatus); 40 | 41 | } -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/service/EncoderInfoService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service; 7 | 8 | import java.util.List; 9 | 10 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 11 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 12 | import com.appcel.facade.encoder.mode.Configure; 13 | import com.appcel.facade.encoder.mode.EncoderInfo; 14 | 15 | /** 16 | * 17 | * @author Kony.Lee 18 | * @version appcel 1.0 19 | * @since JDK-1.7.0 20 | * @date 2016-5-12 21 | */ 22 | public interface EncoderInfoService { 23 | 24 | EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 25 | EncoderStatusEnum status, String remark); 26 | 27 | EncoderInfo getEncoderInfoByKey(String key); 28 | 29 | List getEncoderInfoByEntityKey(String entityKey); 30 | 31 | boolean deleteEncoderInfoByEntityKey(String entityKey); 32 | 33 | boolean updateEncoderTime(String key); 34 | 35 | boolean deleteEncoderInfoByKey(String key); 36 | 37 | Configure createConfigure(String name, String value, String remark); 38 | 39 | Configure findConfigureByKey(String key); 40 | 41 | List getAllConfigure(); 42 | 43 | boolean deleteConfigureByKey(String key); 44 | 45 | } -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/encoder.properties: -------------------------------------------------------------------------------- 1 | ########################################## 2 | ##************ 编码器转码配置 ********** ## 3 | ########################################## 4 | ## ************ 编码器命令执行器位置配置 ********** 5 | ## win conf 6 | encoder.ffmpeg.win.home=D:/ffmpeg/bin/ffmpeg.exe 7 | # linux conf 8 | encoder.ffmpeg.linux.home=/usr/local/bin/ffmpeg 9 | 10 | ## 用于flv文件加入metadata 11 | encoder.yamdi.win.home=D:/ffmpeg/bin/yamdi.exe 12 | ## 用于mp4文件加入metadata 13 | encoder.qt_faststart.win.home=D:/ffmpeg/bin/qt-faststart.exe 14 | encoder.qt_faststart.linux.home=/usr/bin/qt-faststart 15 | 16 | ## 用于转换 Mpeg、avi、rm、rmvb、mkv、DAT、DVD 视频格式文件到 flv 17 | encoder.mencoder.win.home=D;/ffmpeg/encoder/mencoder.exe 18 | # linux conf 19 | encoder.mencoder.linux.home=/usr/local/bin/mencoder 20 | 21 | 22 | ## ************ 转码参数配置 ********** 23 | ## ********* 设置比特率,缺省200kb/s 1500以上没效果 ********* 24 | encoder.video.bitrate=64000 25 | ## ********* 输出的分辨率为640x360,注意片源一定要是16:9的不然会变形 160*128 ********* 26 | encoder.video.width=640 27 | encoder.video.height=360 28 | ## ********* 视频截图的张数********* 29 | encoder.capture.image.count=1 30 | ## ********* 视频截图位置,播放5秒位置或者帧数********* 31 | encoder.capture.image.time=5 32 | ## ********* 视频截图大小220x110 ********* 33 | encoder.capture.image.size=220x110 34 | 35 | 36 | ## ************ 编码器转码目录配置 ********** 37 | encoder.execute.dir=encoderdir 38 | ## ************ 转码后的文件是否保留,默认false,不保留,转码完成后即会删除转码后的文件,以节省磁盘 ********** 39 | encoder.file.retained=true 40 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/encoder.properties: -------------------------------------------------------------------------------- 1 | ########################################## 2 | ##************ 编码器转码配置 ********** ## 3 | ########################################## 4 | ## ************ 编码器命令执行器位置配置 ********** 5 | ## win conf 6 | encoder.ffmpeg.win.home=D:/ffmpeg/bin/ffmpeg.exe 7 | # linux conf 8 | encoder.ffmpeg.linux.home=/usr/local/bin/ffmpeg 9 | 10 | ## 用于flv文件加入metadata 11 | encoder.yamdi.win.home=D:/ffmpeg/bin/yamdi.exe 12 | ## 用于mp4文件加入metadata 13 | encoder.qt_faststart.win.home=D:/ffmpeg/bin/qt-faststart.exe 14 | encoder.qt_faststart.linux.home=/usr/bin/qt-faststart 15 | 16 | ## 用于转换 Mpeg、avi、rm、rmvb、mkv、DAT、DVD 视频格式文件到 flv 17 | encoder.mencoder.win.home=D;/ffmpeg/encoder/mencoder.exe 18 | # linux conf 19 | encoder.mencoder.linux.home=/usr/local/bin/mencoder 20 | 21 | 22 | ## ************ 转码参数配置 ********** 23 | ## ********* 设置比特率,缺省200kb/s 1500以上没效果 ********* 24 | encoder.video.bitrate=64000 25 | ## ********* 输出的分辨率为640x360,注意片源一定要是16:9的不然会变形 160*128 ********* 26 | encoder.video.width=640 27 | encoder.video.height=360 28 | ## ********* 视频截图的张数********* 29 | encoder.capture.image.count=1 30 | ## ********* 视频截图位置,播放5秒位置或者帧数********* 31 | encoder.capture.image.time=5 32 | ## ********* 视频截图大小220x110 ********* 33 | encoder.capture.image.size=220x110 34 | 35 | 36 | ## ************ 编码器转码目录配置 ********** 37 | encoder.execute.dir=encoderdir 38 | ## ************ 转码后的文件是否保留,默认false,不保留,转码完成后即会删除转码后的文件,以节省磁盘 ********** 39 | encoder.file.retained=true 40 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/impl/ConfigureDaoImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao.impl; 7 | 8 | import java.util.List; 9 | 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.appcel.core.encoder.dao.ConfigureDao; 13 | import com.appcel.facade.encoder.mode.Configure; 14 | import com.appcel.kernel.mybatis.dao.BaseDaoImpl; 15 | 16 | /** 17 | * 18 | * @author Kony.Lee 19 | * @version appcel 1.0 20 | * @since JDK-1.7.0 21 | * @date 2016-5-11 22 | */ 23 | @Repository("configureDao") 24 | public class ConfigureDaoImpl extends BaseDaoImpl implements ConfigureDao { 25 | 26 | public Configure createConfigure(String name, String value, String remark) { 27 | Configure configure = new Configure(name, value, remark); 28 | String key = insert(configure); 29 | configure.setKey(key); 30 | return configure; 31 | } 32 | 33 | public Configure findConfigureByKey(String key) { 34 | Configure encoderInfo = findByKey(key); 35 | return encoderInfo; 36 | } 37 | 38 | public List listAllConfigure() { 39 | return super.listAll(); 40 | } 41 | 42 | public boolean deleteConfigureByKey(String key) { 43 | Configure configure = findByKey(key); 44 | if (configure != null) { 45 | deleteByKey(configure.getKey()); 46 | return true; 47 | } 48 | return false; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/java/com/appcel/facade/encoder/service/MultimediaServiceTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service; 7 | 8 | import org.junit.Assert; 9 | import org.junit.Test; 10 | import org.junit.runner.RunWith; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.test.context.ContextConfiguration; 13 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 14 | 15 | import com.appcel.facade.encoder.mode.AudioInfo; 16 | import com.appcel.facade.encoder.mode.Multimedia; 17 | import com.appcel.facade.encoder.mode.VideoInfo; 18 | 19 | /** 20 | * Unit test for simple App. 21 | * 22 | * @author Kony.Lee 23 | * @version appcel 1.0 24 | * @since JDK-1.7.0 25 | * @date 2016-5-9 26 | */ 27 | @RunWith(SpringJUnit4ClassRunner.class) 28 | @ContextConfiguration(locations = { "classpath:dubbo-consumer.xml" }) 29 | public class MultimediaServiceTest { 30 | @Autowired 31 | MultimediaService multimediaService; 32 | 33 | @Test 34 | public void testCreateDatastream() { 35 | AudioInfo audioInfo = new AudioInfo(0, 0, "audioBitrate"); 36 | VideoInfo videoInfo = new VideoInfo("videoBitrate", 0.0f, "vedioformat", "640x360", 640, 360); 37 | Multimedia multimedia = multimediaService.createMultimedia("entityKey", "duration", 68L, "type", "fps", "startTime", audioInfo, 38 | videoInfo); 39 | Assert.assertNotNull(multimedia); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /appcel-facade-encoder/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.appcel 7 | appcel-master 8 | 1.0.0-SNAPSHOT 9 | ../appcel-master 10 | 11 | 12 | appcel-facade-encoder 13 | ${appcel-facade-encoder.version} 14 | jar 15 | 16 | appcel-facade-encoder 17 | http://maven.apache.org 18 | 19 | 20 | UTF-8 21 | 22 | 23 | 24 | 25 | com.pointdew 26 | pointdew-common 27 | 28 | 29 | commons-io 30 | commons-io 31 | 32 | 33 | commons-lang 34 | commons-lang 35 | 36 | 37 | 38 | com.appcel 39 | appcel-kernel-mybatis 40 | 41 | 42 | 43 | junit 44 | junit 45 | test 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/spring/spring-dubbo-provider.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/listener/EncoderProgressListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.listener; 7 | 8 | import com.appcel.facade.encoder.DTO.MultimediaInfo; 9 | 10 | /** 11 | * 12 | * Defiend class file the EncoderProgressListener.java 13 | * 14 | * Encoding progress listener interface. Instances of implementing classes could 15 | * be used to listen an encoding process. 16 | * 17 | * @author Rock.Lee 18 | * @version appcel 1.0.0 19 | * @since JDK-1.7.0 20 | * @date 2014-12-2 21 | */ 22 | public interface EncoderProgressListener { 23 | 24 | /** 25 | * This method is called before the encoding process starts, reporting 26 | * information about the source stream that will be decoded and re-encoded. 27 | * 28 | * @param info 29 | * Informations about the source multimedia stream. 30 | */ 31 | public void sourceInfo(MultimediaInfo info); 32 | 33 | /** 34 | * This method is called to notify a progress in the encoding process. 35 | * 36 | * @param permil 37 | * A permil value representing the encoding process progress. 38 | */ 39 | public void progress(int permil); 40 | 41 | /** 42 | * This method is called every time the encoder need to send a message 43 | * (usually, a warning). 44 | * 45 | * @param message 46 | * The message sent by the encoder. 47 | */ 48 | public void message(String message); 49 | 50 | } 51 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-dubbo-provider.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/DTO/VideoSizeDTO.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.DTO; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * Defiend class file the VideoSize.java 13 | * 14 | * Instances of this class report informations about videos size. 15 | * 16 | * @author Rock.Lee 17 | * @version appcel 1.0.0 18 | * @since JDK-1.7.0 19 | * @date 2014-12-2 20 | */ 21 | public class VideoSizeDTO implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * The video width. 27 | */ 28 | private int width; 29 | 30 | /** 31 | * The video height. 32 | */ 33 | private int height; 34 | 35 | /** 36 | * It builds the bean. 37 | * 38 | * @param width 39 | * The video width. 40 | * @param height 41 | * The video height. 42 | */ 43 | public VideoSizeDTO(int width, int height) { 44 | this.width = width; 45 | this.height = height; 46 | } 47 | 48 | /** 49 | * Returns the video width. 50 | * 51 | * @return The video width. 52 | */ 53 | public int getWidth() { 54 | return width; 55 | } 56 | 57 | /** 58 | * Returns the video height. 59 | * 60 | * @return The video height. 61 | */ 62 | public int getHeight() { 63 | return height; 64 | } 65 | 66 | public String toString() { 67 | return getClass().getName() + " (width=" + width + ", height=" + height + ")"; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/service-encoder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## java env 4 | export JAVA_HOME=/usr/java/jdk1.7.0_80 5 | export JRE_HOME=$JAVA_HOME/jre 6 | 7 | ## service name 8 | APP_NAME=encoder 9 | 10 | SERVICE_DIR=/home/kony/appcel/service/$APP_NAME 11 | SERVICE_NAME=appcel-service-$APP_NAME 12 | JAR_NAME=$SERVICE_NAME\.jar 13 | PID=$SERVICE_NAME\.pid 14 | 15 | cd $SERVICE_DIR 16 | 17 | case "$1" in 18 | 19 | start) 20 | nohup $JRE_HOME/bin/java -Xms256m -Xmx512m -jar $JAR_NAME >/dev/null 2>&1 & 21 | echo $! > $SERVICE_DIR/$PID 22 | echo "=== start $SERVICE_NAME" 23 | ;; 24 | 25 | stop) 26 | kill `cat $SERVICE_DIR/$PID` 27 | rm -rf $SERVICE_DIR/$PID 28 | echo "=== stop $SERVICE_NAME" 29 | 30 | sleep 5 31 | ## 32 | ## edu-service-aa.jar 33 | ## edu-service-aa-bb.jar 34 | P_ID=`ps -ef | grep -w "$SERVICE_NAME" | grep -v "grep" | awk '{print $2}'` 35 | if [ "$P_ID" == "" ]; then 36 | echo "=== $SERVICE_NAME process not exists or stop success" 37 | else 38 | echo "=== $SERVICE_NAME process pid is:$P_ID" 39 | echo "=== begin kill $SERVICE_NAME process, pid is:$P_ID" 40 | kill -9 $P_ID 41 | fi 42 | ;; 43 | 44 | restart) 45 | $0 stop 46 | sleep 2 47 | $0 start 48 | echo "=== restart $SERVICE_NAME" 49 | ;; 50 | 51 | *) 52 | ## restart 53 | $0 stop 54 | sleep 2 55 | $0 start 56 | ;; 57 | 58 | esac 59 | exit 0 60 | 61 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/resources/service-encoder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## java env 4 | export JAVA_HOME=/usr/java/jdk1.7.0_80 5 | export JRE_HOME=$JAVA_HOME/jre 6 | 7 | ## service name 8 | APP_NAME=encoder 9 | 10 | SERVICE_DIR=/home/kony/appcel/service/$APP_NAME 11 | SERVICE_NAME=appcel-service-$APP_NAME 12 | JAR_NAME=$SERVICE_NAME\.jar 13 | PID=$SERVICE_NAME\.pid 14 | 15 | cd $SERVICE_DIR 16 | 17 | case "$1" in 18 | 19 | start) 20 | nohup $JRE_HOME/bin/java -Xms256m -Xmx512m -jar $JAR_NAME >/dev/null 2>&1 & 21 | echo $! > $SERVICE_DIR/$PID 22 | echo "=== start $SERVICE_NAME" 23 | ;; 24 | 25 | stop) 26 | kill `cat $SERVICE_DIR/$PID` 27 | rm -rf $SERVICE_DIR/$PID 28 | echo "=== stop $SERVICE_NAME" 29 | 30 | sleep 5 31 | ## 32 | ## edu-service-aa.jar 33 | ## edu-service-aa-bb.jar 34 | P_ID=`ps -ef | grep -w "$SERVICE_NAME" | grep -v "grep" | awk '{print $2}'` 35 | if [ "$P_ID" == "" ]; then 36 | echo "=== $SERVICE_NAME process not exists or stop success" 37 | else 38 | echo "=== $SERVICE_NAME process pid is:$P_ID" 39 | echo "=== begin kill $SERVICE_NAME process, pid is:$P_ID" 40 | kill -9 $P_ID 41 | fi 42 | ;; 43 | 44 | restart) 45 | $0 stop 46 | sleep 2 47 | $0 start 48 | echo "=== restart $SERVICE_NAME" 49 | ;; 50 | 51 | *) 52 | ## restart 53 | $0 stop 54 | sleep 2 55 | $0 start 56 | ;; 57 | 58 | esac 59 | exit 0 60 | 61 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/test-classes/service-encoder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## java env 4 | export JAVA_HOME=/usr/java/jdk1.7.0_80 5 | export JRE_HOME=$JAVA_HOME/jre 6 | 7 | ## service name 8 | APP_NAME=encoder 9 | 10 | SERVICE_DIR=/home/kony/appcel/service/$APP_NAME 11 | SERVICE_NAME=appcel-service-$APP_NAME 12 | JAR_NAME=$SERVICE_NAME\.jar 13 | PID=$SERVICE_NAME\.pid 14 | 15 | cd $SERVICE_DIR 16 | 17 | case "$1" in 18 | 19 | start) 20 | nohup $JRE_HOME/bin/java -Xms256m -Xmx512m -jar $JAR_NAME >/dev/null 2>&1 & 21 | echo $! > $SERVICE_DIR/$PID 22 | echo "=== start $SERVICE_NAME" 23 | ;; 24 | 25 | stop) 26 | kill `cat $SERVICE_DIR/$PID` 27 | rm -rf $SERVICE_DIR/$PID 28 | echo "=== stop $SERVICE_NAME" 29 | 30 | sleep 5 31 | ## 32 | ## edu-service-aa.jar 33 | ## edu-service-aa-bb.jar 34 | P_ID=`ps -ef | grep -w "$SERVICE_NAME" | grep -v "grep" | awk '{print $2}'` 35 | if [ "$P_ID" == "" ]; then 36 | echo "=== $SERVICE_NAME process not exists or stop success" 37 | else 38 | echo "=== $SERVICE_NAME process pid is:$P_ID" 39 | echo "=== begin kill $SERVICE_NAME process, pid is:$P_ID" 40 | kill -9 $P_ID 41 | fi 42 | ;; 43 | 44 | restart) 45 | $0 stop 46 | sleep 2 47 | $0 start 48 | echo "=== restart $SERVICE_NAME" 49 | ;; 50 | 51 | *) 52 | ## restart 53 | $0 stop 54 | sleep 2 55 | $0 start 56 | ;; 57 | 58 | esac 59 | exit 0 60 | 61 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/mybatis/mapper/multimedia/Configure.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_encoder_configure 6 | 7 | 8 | insert into 9 | (KEYX, VERSIONX, NAME, VALUE, REMARK, CREATETIME) 10 | values ( 11 | #{key, jdbcType=VARCHAR}, 12 | 0, 13 | #{name}, 14 | #{value}, 15 | #{remark}, 16 | #{createTime,jdbcType=TIMESTAMP} 17 | ) 18 | 19 | 20 | 21 | 22 | update 23 | 24 | VERSIONX = #{version}+1 , 25 | NAME = #{name}, 26 | VALUE = #{value}, 27 | REMARK = #{remark}, 28 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 29 | 30 | 31 | KEYX = #{key} and VERSIONX = #{version} 32 | 33 | 34 | 35 | 38 | 39 | 42 | 43 | 44 | delete from where KEYX = #{key} 45 | 46 | 47 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/mybatis/mapper/multimedia/Configure.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_encoder_configure 6 | 7 | 8 | insert into 9 | (KEYX, VERSIONX, NAME, VALUE, REMARK, CREATETIME) 10 | values ( 11 | #{key, jdbcType=VARCHAR}, 12 | 0, 13 | #{name}, 14 | #{value}, 15 | #{remark}, 16 | #{createTime,jdbcType=TIMESTAMP} 17 | ) 18 | 19 | 20 | 21 | 22 | update 23 | 24 | VERSIONX = #{version}+1 , 25 | NAME = #{name}, 26 | VALUE = #{value}, 27 | REMARK = #{remark}, 28 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 29 | 30 | 31 | KEYX = #{key} and VERSIONX = #{version} 32 | 33 | 34 | 35 | 38 | 39 | 42 | 43 | 44 | delete from where KEYX = #{key} 45 | 46 | 47 | -------------------------------------------------------------------------------- /appcel-facade-encoder/target/classes/META-INF/maven/com.appcel/appcel-facade-encoder/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.appcel 7 | appcel-master 8 | 1.0.0-SNAPSHOT 9 | ../appcel-master 10 | 11 | 12 | appcel-facade-encoder 13 | ${appcel-facade-encoder.version} 14 | jar 15 | 16 | appcel-facade-encoder 17 | http://maven.apache.org 18 | 19 | 20 | UTF-8 21 | 22 | 23 | 24 | 25 | com.pointdew 26 | pointdew-common 27 | 28 | 29 | commons-io 30 | commons-io 31 | 32 | 33 | commons-lang 34 | commons-lang 35 | 36 | 37 | 38 | com.appcel 39 | appcel-kernel-mybatis 40 | 41 | 42 | 43 | junit 44 | junit 45 | test 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/exception/EncoderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * Encoder A Java Audio/Video Encoder (based on FFMPEG) 5 | * 6 | * Copyright (C) 2006-2014 LiRongSheng (http://www.pointdew.com) 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | package com.appcel.facade.encoder.exception; 22 | 23 | /** 24 | * 25 | * Defiend class file the EncoderException.java 26 | * 27 | * Encoding expection. 28 | * 29 | * @author Rock.Lee 30 | * @version appcel 1.0.0 31 | * @since JDK-1.7.0 32 | * @date 2014-12-2 33 | */ 34 | public class EncoderException extends Exception { 35 | 36 | private static final long serialVersionUID = 1L; 37 | 38 | EncoderException() { 39 | super(); 40 | } 41 | 42 | public EncoderException(String message) { 43 | super(message); 44 | } 45 | 46 | public EncoderException(Throwable cause) { 47 | super(cause); 48 | } 49 | 50 | public EncoderException(String message, Throwable cause) { 51 | super(message, cause); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/manager/EncoderInfoManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.manager; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 12 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 13 | import com.appcel.facade.encoder.mode.Configure; 14 | import com.appcel.facade.encoder.mode.EncoderInfo; 15 | import com.appcel.kernel.mybatis.manager.BaseManager; 16 | 17 | /** 18 | * 19 | * @author Kony.Lee 20 | * @version appcel 1.0 21 | * @since JDK-1.7.0 22 | * @date 2016-5-12 23 | */ 24 | public interface EncoderInfoManager extends BaseManager { 25 | 26 | EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 27 | EncoderStatusEnum status, String remark); 28 | 29 | EncoderInfo getEncoderInfoByKey(String key); 30 | 31 | List getEncoderInfoByEntityKey(String entityKey); 32 | 33 | boolean deleteEncoderInfoByEntityKey(String entityKey); 34 | 35 | boolean updateEncoderTime(String key); 36 | 37 | boolean deleteEncoderInfoByKey(String key); 38 | 39 | Configure createConfigure(String name, String value, String remark); 40 | 41 | Configure getConfigureByKey(String key); 42 | 43 | List getAllConfigure(); 44 | 45 | boolean deleteConfigureByKey(String key); 46 | 47 | boolean updateEncoderStatus(String key, EncoderStatusEnum encoderSatus); 48 | 49 | List getEncoderInfoByStatus(EncoderStatusEnum encoderSatus); 50 | 51 | Map getAllConfigureMap(); 52 | 53 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/executor/ProcessKiller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Encoder A Java Audio/Video Encoder (based on FFMPEG) 3 | * 4 | * Copyright (C) 2008-2009 Carlo Pelliccia (www.sauronsoftware.it) 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | package com.appcel.core.encoder.executor; 20 | 21 | /** 22 | * 23 | * Defiend class file the ProcessKiller.java 24 | * 25 | * A package-private utility to add a shutdown hook to kill ongoing encoding 26 | * processes at the jvm shutdown. 27 | * 28 | * @author Rock.Lee 29 | * @version appcel 1.0.0 30 | * @since JDK-1.7.0 31 | * @date 2014-12-2 32 | */ 33 | class ProcessKiller extends Thread { 34 | 35 | /** 36 | * The process to kill. 37 | */ 38 | private Process process; 39 | 40 | /** 41 | * Builds the killer. 42 | * 43 | * @param process 44 | * The process to kill. 45 | */ 46 | public ProcessKiller(Process process) { 47 | this.process = process; 48 | } 49 | 50 | /** 51 | * It kills the supplied process. 52 | */ 53 | public void run() { 54 | process.destroy(); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/executor/EncoderBufferedReader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.executor; 7 | 8 | import java.io.BufferedReader; 9 | import java.io.IOException; 10 | import java.io.Reader; 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | * 16 | * Defiend class file the RBufferedReader.java 17 | * 18 | * A package-private utility extending java.io.BufferedReader. If a line read 19 | * with {@link EncoderBufferedReader#readLine()} is not useful for the calling code, 20 | * it can be re-inserted in the stream. The same line will be returned again at 21 | * the next readLine() call. 22 | * 23 | * @author Rock.Lee 24 | * @version appcel 1.0.0 25 | * @since JDK-1.7.0 26 | * @date 2014-12-2 27 | */ 28 | public class EncoderBufferedReader extends BufferedReader { 29 | 30 | /** 31 | * Re-inserted lines buffer. 32 | */ 33 | private List lines = new ArrayList(); 34 | 35 | /** 36 | * It builds the reader. 37 | * 38 | * @param in 39 | * The underlying reader. 40 | */ 41 | public EncoderBufferedReader(Reader in) { 42 | super(in); 43 | } 44 | 45 | /** 46 | * It returns the next line in the stream. 47 | */ 48 | public String readLine() throws IOException { 49 | if (lines.size() > 0) { 50 | return lines.remove(0); 51 | } else { 52 | return super.readLine(); 53 | } 54 | } 55 | 56 | /** 57 | * Reinserts a line in the stream. The line will be returned at the next 58 | * {@link EncoderBufferedReader#readLine()} call. 59 | * 60 | * @param line 61 | * The line. 62 | */ 63 | public void reinsertLine(String line) { 64 | lines.add(0, line); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/facade/encoder/service/impl/MultimediaServiceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service.impl; 7 | 8 | import java.util.List; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import com.appcel.core.encoder.manager.MultimediaManager; 14 | import com.appcel.facade.encoder.mode.AudioInfo; 15 | import com.appcel.facade.encoder.mode.Multimedia; 16 | import com.appcel.facade.encoder.mode.VideoInfo; 17 | import com.appcel.facade.encoder.service.MultimediaService; 18 | 19 | /** 20 | * 21 | * Defiend class file the MultimediaManagerImpl.java 22 | * 23 | * 24 | * @author Rock.Lee 25 | * @version appcel 1.0.0 26 | * @since JDK-1.7.0 27 | * @date 2014-12-9 28 | */ 29 | @Service("multimediaService") 30 | public class MultimediaServiceImpl implements MultimediaService { 31 | 32 | @Autowired 33 | MultimediaManager multimediaManager; 34 | 35 | public Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 36 | AudioInfo audioInfo, VideoInfo videoInfo) { 37 | return multimediaManager.createMultimedia(entityKey, duration, timelen, type, fps, startTime, audioInfo, videoInfo); 38 | } 39 | 40 | public Multimedia getMultimediaByKey(String key) { 41 | return multimediaManager.getMultimediaByKey(key); 42 | } 43 | 44 | public List getMultimediaByEntityKey(String entityKey) { 45 | return multimediaManager.getMultimediaByEntityKey(entityKey); 46 | } 47 | 48 | public boolean deleteMultimedaByEntityKey(String entityKey) { 49 | return multimediaManager.deleteMultimedaByEntityKey(entityKey); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /appcel-service-encoder/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | appcel-service-encoder 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.jdt.core.javabuilder 25 | 26 | 27 | 28 | 29 | com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator 30 | 31 | 32 | 33 | 34 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator 35 | 36 | 37 | 38 | 39 | org.eclipse.wst.validation.validationbuilder 40 | 41 | 42 | 43 | 44 | org.eclipse.m2e.core.maven2Builder 45 | 46 | 47 | 48 | 49 | 50 | org.eclipse.jem.workbench.JavaEMFNature 51 | com.genuitec.eclipse.j2eedt.core.webnature 52 | org.eclipse.jdt.core.javanature 53 | org.eclipse.m2e.core.maven2Nature 54 | org.eclipse.wst.common.project.facet.core.nature 55 | org.eclipse.wst.common.modulecore.ModuleCoreNature 56 | org.eclipse.wst.jsdt.core.jsNature 57 | 58 | 59 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/locator/AbstractEncoderLocator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * Encoder A Java Audio/Video Encoder (based on FFMPEG) 5 | * 6 | * Copyright (C) 2006-2014 LiRongSheng (http://www.pointdew.com) 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | package com.appcel.core.encoder.locator; 22 | 23 | import com.appcel.core.encoder.executor.EncoderExecutor; 24 | import com.appcel.facade.encoder.enums.EncoderExecutorEnum; 25 | import com.appcel.facade.encoder.service.impl.EncoderServiceImpl; 26 | 27 | /** 28 | * 29 | * Defiend class file the FFMPEGLocator.java 30 | * 31 | * Abstract class whose derived concrete instances are used by {@link EncoderServiceImpl} 32 | * to locate the ffmpeg executable path. 33 | * 34 | * @author Rock.Lee 35 | * @version appcel 1.0.0 36 | * @since JDK-1.7.0 37 | * @date 2014-12-2 38 | * @see EncoderServiceImpl 39 | */ 40 | public abstract class AbstractEncoderLocator { 41 | 42 | /** 43 | * This method should return the path of a EncoderExcutor executable suitable for 44 | * the current machine. 45 | * 46 | * @return The path of the EncoderExcutor executable. 47 | */ 48 | public abstract EncoderExecutor createEncoderExecutor(EncoderExecutorEnum encoderExcutorEnum); 49 | 50 | } -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/enums/EncoderPlayModeEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.enums; 7 | 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * 15 | * @author Kony.Lee 16 | * @version appcel 1.0 17 | * @since JDK-1.7.0 18 | * @date 2016-5-10 19 | */ 20 | public enum EncoderPlayModeEnum { 21 | /** 22 | * 点播模式 23 | */ 24 | VOD("点播", 0), 25 | 26 | /** 27 | * 直播模式 28 | */ 29 | LIVE("直播", 1); 30 | 31 | /** 名称,状态描述 */ 32 | private String name; 33 | /** 枚举值 */ 34 | private int value; 35 | 36 | /** 构造函数 */ 37 | private EncoderPlayModeEnum(String name, int value) { 38 | this.name = name; 39 | this.value = value; 40 | } 41 | 42 | public String getName() { 43 | return name; 44 | } 45 | 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | 50 | public void setValue(int value) { 51 | this.value = value; 52 | } 53 | 54 | public int getValue() { 55 | return value; 56 | } 57 | 58 | public static EncoderPlayModeEnum getEnum(int value) { 59 | EncoderPlayModeEnum resultEnum = null; 60 | EncoderPlayModeEnum[] enumAry = EncoderPlayModeEnum.values(); 61 | for (int i = 0; i < enumAry.length; i++) { 62 | if (enumAry[i].getValue() == value) { 63 | resultEnum = enumAry[i]; 64 | break; 65 | } 66 | } 67 | return resultEnum; 68 | } 69 | 70 | @SuppressWarnings({ "rawtypes", "unchecked" }) 71 | public static List toList() { 72 | EncoderPlayModeEnum[] ary = EncoderPlayModeEnum.values(); 73 | List list = new ArrayList(); 74 | for (int i = 0; i < ary.length; i++) { 75 | Map map = new HashMap(); 76 | map.put("value", String.valueOf(ary[i].getValue())); 77 | map.put("desc", ary[i].getName()); 78 | list.add(map); 79 | } 80 | return list; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/utils/DurationUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.utils; 7 | 8 | /** 9 | * 10 | * Defiend class file the EncoderUtil.java 11 | * 12 | * 13 | * 14 | * @author Rock.Lee 15 | * @version appcel 1.0.0 16 | * @since JDK-1.7.0 17 | * @date 2014-7-29 18 | */ 19 | public class DurationUtil { 20 | 21 | /** 22 | * 根据多媒体时长,计算播放时间 23 | * 24 | * @param duration 时长格式:"00:00:10.68" 25 | * @return 返回总时长,秒为单位 26 | */ 27 | public static int calculateDuration(String duration) { 28 | int min = 0; 29 | String strs[] = duration.split(":"); 30 | if (strs[0].compareTo("0") > 0) { 31 | min += Integer.valueOf(strs[0]) * 60 * 60;//秒 32 | } 33 | if (strs[1].compareTo("0") > 0) { 34 | min += Integer.valueOf(strs[1]) * 60; 35 | } 36 | if (strs[2].compareTo("0") > 0) { 37 | min += Math.round(Float.valueOf(strs[2])); 38 | } 39 | return min; 40 | } 41 | 42 | /** 43 | * 格式化毫秒,将毫秒数换算成x天x时x分x秒x毫秒 44 | * 45 | * @param ms 46 | * @return 47 | */ 48 | public static String formatMS2DTMSMS(long ms) { 49 | int ss = 1000; 50 | int mi = ss * 60; 51 | int hh = mi * 60; 52 | int dd = hh * 24; 53 | 54 | long day = ms / dd; 55 | long hour = (ms - day * dd) / hh; 56 | long minute = (ms - day * dd - hour * hh) / mi; 57 | long second = (ms - day * dd - hour * hh - minute * mi) / ss; 58 | long milliSecond = ms - day * dd - hour * hh - minute * mi - second * ss; 59 | 60 | String strDay = day < 10 ? "0" + day : "" + day; 61 | String strHour = hour < 10 ? "0" + hour : "" + hour; 62 | String strMinute = minute < 10 ? "0" + minute : "" + minute; 63 | String strSecond = second < 10 ? "0" + second : "" + second; 64 | String strMilliSecond = milliSecond < 10 ? "0" + milliSecond : "" + milliSecond; 65 | strMilliSecond = milliSecond < 100 ? "0" + strMilliSecond : "" + strMilliSecond; 66 | return strDay + " " + strHour + ":" + strMinute + ":" + strSecond + " " + strMilliSecond; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/enums/EncoderExecutorEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.enums; 7 | 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * 转换器枚举 15 | * 16 | * @author Kony.Lee 17 | * @version appcel 1.0 18 | * @since JDK-1.7.0 19 | * @date 2016-5-11 20 | */ 21 | public enum EncoderExecutorEnum { 22 | FFMPEGEXECUTOR("ffmpeg 转换执行器", "ffmpeg"), MENCODEREXECUTOR("mencoder 转换执行器", "mencoder"), YAMDIEXECUTOR( 23 | "yamdi flv格式流媒体关键帧注入执行器", "yamdi"), QT_FASTSTART("qt-faststart mp4格式流媒体播放头部信息处理器", "qt-faststart"); 24 | 25 | /** 名称,状态描述 */ 26 | private String name; 27 | /** 枚举值 */ 28 | private String value; 29 | 30 | /** 构造函数 */ 31 | private EncoderExecutorEnum(String name, String value) { 32 | this.name = name; 33 | this.value = value; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String name) { 41 | this.name = name; 42 | } 43 | 44 | public void setValue(String value) { 45 | this.value = value; 46 | } 47 | 48 | public String getValue() { 49 | return value; 50 | } 51 | 52 | public static EncoderExecutorEnum getEnum(String value) { 53 | EncoderExecutorEnum resultEnum = null; 54 | EncoderExecutorEnum[] enumAry = EncoderExecutorEnum.values(); 55 | for (int i = 0; i < enumAry.length; i++) { 56 | if (enumAry[i].getValue() == value) { 57 | resultEnum = enumAry[i]; 58 | break; 59 | } 60 | } 61 | return resultEnum; 62 | } 63 | 64 | @SuppressWarnings({ "rawtypes", "unchecked" }) 65 | public static List toList() { 66 | EncoderExecutorEnum[] ary = EncoderExecutorEnum.values(); 67 | List list = new ArrayList(); 68 | for (int i = 0; i < ary.length; i++) { 69 | Map map = new HashMap(); 70 | map.put("value", String.valueOf(ary[i].getValue())); 71 | map.put("name", ary[i].getName()); 72 | list.add(map); 73 | } 74 | return list; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/executor/EncoderExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.executor; 7 | 8 | import java.io.File; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | import java.io.OutputStream; 12 | 13 | import com.appcel.facade.encoder.DTO.MediaRecord; 14 | import com.appcel.facade.encoder.exception.EncoderException; 15 | 16 | /** 17 | * 18 | * @author Kony.Lee 19 | * @version appcel 1.0 20 | * @since JDK-1.7.0 21 | * @date 2016-5-11 22 | */ 23 | public interface EncoderExecutor { 24 | 25 | boolean isLinuxos(); 26 | 27 | /** 28 | * Adds an argument to the encoderExcutor executable call. 29 | * 30 | * @param arg 31 | * The argument. 32 | */ 33 | void addArgument(String arg); 34 | 35 | /** 36 | * Executes the encoderExcutor process with the previous given arguments. 37 | * 38 | * @throws IOException 39 | * If the process call fails. 40 | */ 41 | void execute() throws EncoderException; 42 | 43 | void execute(File directory) throws EncoderException; 44 | 45 | void execute(MediaRecord record) throws EncoderException; 46 | 47 | void execute(MediaRecord record, File directory) throws EncoderException; 48 | 49 | /** 50 | * Returns a stream reading from the encoderExcutor process standard output channel. 51 | * 52 | * @return A stream reading from the encoderExcutor process standard output channel. 53 | */ 54 | InputStream getInputStream(); 55 | 56 | /** 57 | * Returns a stream writing in the encoderExcutor process standard input channel. 58 | * 59 | * @return A stream writing in the encoderExcutor process standard input channel. 60 | */ 61 | OutputStream getOutputStream(); 62 | 63 | /** 64 | * Returns a stream reading from the encoderExcutor process standard error channel. 65 | * 66 | * @return A stream reading from the encoderExcutor process standard error channel. 67 | */ 68 | InputStream getErrorStream(); 69 | 70 | /** 71 | * If there's a encoderExcutor execution in progress, it kills it. 72 | */ 73 | void destroy(); 74 | 75 | } -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/manager/impl/MultimediaManagerImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.manager.impl; 7 | 8 | import java.util.List; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import com.appcel.core.encoder.dao.MultimediaDao; 14 | import com.appcel.core.encoder.manager.MultimediaManager; 15 | import com.appcel.facade.encoder.mode.AudioInfo; 16 | import com.appcel.facade.encoder.mode.Multimedia; 17 | import com.appcel.facade.encoder.mode.VideoInfo; 18 | import com.appcel.kernel.mybatis.dao.BaseDao; 19 | import com.appcel.kernel.mybatis.manager.BaseManagerImpl; 20 | 21 | /** 22 | * 23 | * Defiend class file the MultimediaManagerImpl.java 24 | * 25 | * 26 | * @author Rock.Lee 27 | * @version appcel 1.0.0 28 | * @since JDK-1.7.0 29 | * @date 2014-12-9 30 | */ 31 | @Service("multimediaManager") 32 | public class MultimediaManagerImpl extends BaseManagerImpl implements MultimediaManager { 33 | 34 | @Autowired 35 | MultimediaDao multimediaDao; 36 | 37 | public Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 38 | AudioInfo audioInfo, VideoInfo videoInfo) { 39 | return multimediaDao.createMultimedia(entityKey, duration, timelen, type, fps, startTime, audioInfo, videoInfo); 40 | 41 | } 42 | 43 | public Multimedia getMultimediaByKey(String key) { 44 | checkParameter(key, "multimedia key"); 45 | return multimediaDao.findMultimediaByKey(key); 46 | } 47 | 48 | public List getMultimediaByEntityKey(String entityKey) { 49 | checkParameter(entityKey, "Multimedia relation entityKey"); 50 | return multimediaDao.findMultimediaByEntityKey(entityKey); 51 | } 52 | 53 | public boolean deleteMultimedaByEntityKey(String entityKey) { 54 | checkParameter(entityKey, "Multimedia relation entityKey"); 55 | return multimediaDao.deleteMultimedaByEntityKey(entityKey); 56 | } 57 | 58 | protected BaseDao getDao() { 59 | return this.multimediaDao; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/enums/EncoderStatusEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.enums; 7 | 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * 15 | * @author Kony.Lee 16 | * @version appcel 1.0 17 | * @since JDK-1.7.0 18 | * @date 2016-5-10 19 | */ 20 | public enum EncoderStatusEnum { 21 | /** 22 | * 1 待上传转换文件 23 | */ 24 | STATUS_WAIT_UPLOAD("待上传", 1), 25 | 26 | /** 27 | * 2 待截图文件 CaptureImage 28 | */ 29 | STATUS_WAIT_CAPTUREIMG("待截图", 2), 30 | 31 | /** 32 | * 3 待转换文件 encoder, trans coder 33 | */ 34 | STATUS_WAIT_ENCODER("待转换", 3), 35 | 36 | /** 37 | * 4 已转换文件,转换已完成 38 | */ 39 | STATUS_COMPLETE("已转换", 4), 40 | 41 | /** 42 | * 5 转换失败 43 | */ 44 | STATUS_FAIL("转换失败", 5); 45 | 46 | /** 名称,状态描述 */ 47 | private String name; 48 | /** 枚举值 */ 49 | private int value; 50 | 51 | /** 构造函数 */ 52 | private EncoderStatusEnum(String name, int value) { 53 | this.name = name; 54 | this.value = value; 55 | } 56 | 57 | public String getName() { 58 | return name; 59 | } 60 | 61 | public void setName(String name) { 62 | this.name = name; 63 | } 64 | 65 | public void setValue(int value) { 66 | this.value = value; 67 | } 68 | 69 | public int getValue() { 70 | return value; 71 | } 72 | 73 | public static EncoderStatusEnum getEnum(int value) { 74 | EncoderStatusEnum resultEnum = null; 75 | EncoderStatusEnum[] enumAry = EncoderStatusEnum.values(); 76 | for (int i = 0; i < enumAry.length; i++) { 77 | if (enumAry[i].getValue() == value) { 78 | resultEnum = enumAry[i]; 79 | break; 80 | } 81 | } 82 | return resultEnum; 83 | } 84 | 85 | @SuppressWarnings({ "rawtypes", "unchecked" }) 86 | public static List toList() { 87 | EncoderStatusEnum[] ary = EncoderStatusEnum.values(); 88 | List list = new ArrayList(); 89 | for (int i = 0; i < ary.length; i++) { 90 | Map map = new HashMap(); 91 | map.put("value", String.valueOf(ary[i].getValue())); 92 | map.put("desc", ary[i].getName()); 93 | list.add(map); 94 | } 95 | return list; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/mode/VoiceFileInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.mode; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * @author Kony.Lee 13 | * @version appcel 1.0 14 | * @since JDK-1.7.0 15 | * @date 2016-5-25 16 | */ 17 | public class VoiceFileInfo implements Serializable { 18 | /** 19 | * 20 | */ 21 | private static final long serialVersionUID = 1L; 22 | /** 23 | * 音频文件存放路径 24 | */ 25 | private String voiceFilePath; 26 | /** 27 | * 音频文件大小 28 | */ 29 | private long voiceFileSize; 30 | 31 | public VoiceFileInfo() { 32 | } 33 | 34 | public VoiceFileInfo(String voiceFilePath, long voiceFileSize) { 35 | this.voiceFilePath = voiceFilePath; 36 | this.voiceFileSize = voiceFileSize; 37 | } 38 | 39 | public String getVoiceFilePath() { 40 | return voiceFilePath; 41 | } 42 | 43 | public void setVoiceFilePath(String voiceFilePath) { 44 | this.voiceFilePath = voiceFilePath; 45 | } 46 | 47 | public long getVoiceFileSize() { 48 | return voiceFileSize; 49 | } 50 | 51 | public void setVoiceFileSize(long voiceFileSize) { 52 | this.voiceFileSize = voiceFileSize; 53 | } 54 | 55 | @Override 56 | public int hashCode() { 57 | final int prime = 31; 58 | int result = 1; 59 | result = prime * result + ((voiceFilePath == null) ? 0 : voiceFilePath.hashCode()); 60 | result = prime * result + (int) (voiceFileSize ^ (voiceFileSize >>> 32)); 61 | return result; 62 | } 63 | 64 | @Override 65 | public boolean equals(Object obj) { 66 | if (this == obj) 67 | return true; 68 | if (obj == null) 69 | return false; 70 | if (getClass() != obj.getClass()) 71 | return false; 72 | VoiceFileInfo other = (VoiceFileInfo) obj; 73 | if (voiceFilePath == null) { 74 | if (other.voiceFilePath != null) 75 | return false; 76 | } else if (!voiceFilePath.equals(other.voiceFilePath)) 77 | return false; 78 | if (voiceFileSize != other.voiceFileSize) 79 | return false; 80 | return true; 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "VoiceFileInfo [voiceFilePath=" + voiceFilePath + ", voiceFileSize=" + voiceFileSize + "]"; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/mode/Configure.java: -------------------------------------------------------------------------------- 1 | package com.appcel.facade.encoder.mode; 2 | 3 | import com.appcel.kernel.mybatis.model.BaseModel; 4 | 5 | public class Configure extends BaseModel { 6 | 7 | private static final long serialVersionUID = 1L; 8 | private String name; 9 | private String value; 10 | private String remark; 11 | 12 | public Configure() { 13 | } 14 | 15 | /** full constructor */ 16 | public Configure(String name, String value, String remark) { 17 | this.name = name; 18 | this.value = value; 19 | this.remark = remark; 20 | } 21 | 22 | public String getName() { 23 | return this.name; 24 | } 25 | 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | public String getValue() { 31 | return this.value; 32 | } 33 | 34 | public void setValue(String value) { 35 | this.value = value; 36 | } 37 | 38 | public String getRemark() { 39 | return this.remark; 40 | } 41 | 42 | public void setRemark(String remark) { 43 | this.remark = remark; 44 | } 45 | 46 | @Override 47 | public int hashCode() { 48 | final int prime = 31; 49 | int result = super.hashCode(); 50 | result = prime * result + ((name == null) ? 0 : name.hashCode()); 51 | result = prime * result + ((remark == null) ? 0 : remark.hashCode()); 52 | result = prime * result + ((value == null) ? 0 : value.hashCode()); 53 | return result; 54 | } 55 | 56 | @Override 57 | public boolean equals(Object obj) { 58 | if (this == obj) 59 | return true; 60 | if (!super.equals(obj)) 61 | return false; 62 | if (getClass() != obj.getClass()) 63 | return false; 64 | Configure other = (Configure) obj; 65 | if (name == null) { 66 | if (other.name != null) 67 | return false; 68 | } else if (!name.equals(other.name)) 69 | return false; 70 | if (remark == null) { 71 | if (other.remark != null) 72 | return false; 73 | } else if (!remark.equals(other.remark)) 74 | return false; 75 | if (value == null) { 76 | if (other.value != null) 77 | return false; 78 | } else if (!value.equals(other.value)) 79 | return false; 80 | return true; 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "Configure [name=" + name + ", value=" + value + ", remark=" + remark + "]"; 86 | } 87 | 88 | } -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/spring/spring-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/META-INF/spring/spring-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/mode/SubtitleFileInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.mode; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * Defiend class file the SubtitleInfo.java 13 | * 14 | * 视频多媒体字幕信息 15 | * 16 | * @author Rock.Lee 17 | * @version appcel 1.0.0 18 | * @since JDK-1.7.0 19 | * @date 2014-12-9 20 | */ 21 | public class SubtitleFileInfo implements Serializable { 22 | 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = 1L; 27 | 28 | /** 29 | * 字幕文件存放路径 30 | */ 31 | private String subtitleFilePath; 32 | /** 33 | * 字幕文件大小 34 | */ 35 | private long subtitleFileSize; 36 | 37 | public SubtitleFileInfo() { 38 | } 39 | 40 | public SubtitleFileInfo(String subtitleFilePath, long subtitleFileSize) { 41 | this.subtitleFilePath = subtitleFilePath; 42 | this.subtitleFileSize = subtitleFileSize; 43 | } 44 | 45 | public String getSubtitleFilePath() { 46 | return subtitleFilePath; 47 | } 48 | 49 | public void setSubtitleFilePath(String subtitleFilePath) { 50 | this.subtitleFilePath = subtitleFilePath; 51 | } 52 | 53 | public long getSubtitleFileSize() { 54 | return subtitleFileSize; 55 | } 56 | 57 | public void setSubtitleFileSize(long subtitleFileSize) { 58 | this.subtitleFileSize = subtitleFileSize; 59 | } 60 | 61 | @Override 62 | public int hashCode() { 63 | final int prime = 31; 64 | int result = 1; 65 | result = prime * result + ((subtitleFilePath == null) ? 0 : subtitleFilePath.hashCode()); 66 | result = prime * result + (int) (subtitleFileSize ^ (subtitleFileSize >>> 32)); 67 | return result; 68 | } 69 | 70 | @Override 71 | public boolean equals(Object obj) { 72 | if (this == obj) 73 | return true; 74 | if (obj == null) 75 | return false; 76 | if (getClass() != obj.getClass()) 77 | return false; 78 | SubtitleFileInfo other = (SubtitleFileInfo) obj; 79 | if (subtitleFilePath == null) { 80 | if (other.subtitleFilePath != null) 81 | return false; 82 | } else if (!subtitleFilePath.equals(other.subtitleFilePath)) 83 | return false; 84 | if (subtitleFileSize != other.subtitleFileSize) 85 | return false; 86 | return true; 87 | } 88 | 89 | @Override 90 | public String toString() { 91 | return "SubtitleFileInfo [subtitleFilePath=" + subtitleFilePath + ", subtitleFileSize=" + subtitleFileSize + "]"; 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/exception/EncoderRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.appcel.facade.encoder.exception; 2 | 3 | import java.io.PrintStream; 4 | import java.io.PrintWriter; 5 | 6 | /** 7 | * 8 | * Defiend class file the EncoderRuntimeException.java 9 | * 10 | * 11 | * @author Rock.Lee 12 | * @version cel 1.0.0 13 | * @since JDK-1.7.0 14 | * @date 2014年1月20日下午2:16:23 15 | */ 16 | public class EncoderRuntimeException extends RuntimeException { 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 1L; 21 | protected Throwable cause = null; 22 | 23 | /** 24 | * Constructor for KernelRuntimeException. 25 | */ 26 | public EncoderRuntimeException() { 27 | super(); 28 | } 29 | 30 | /** 31 | * Constructor for KernelRuntimeException. 32 | * 33 | * @param message 34 | */ 35 | public EncoderRuntimeException(String message) { 36 | super(message); 37 | } 38 | 39 | /** 40 | * Constructor for KernelRuntimeException. 41 | * 42 | * @param message 43 | * @param cause 44 | */ 45 | public EncoderRuntimeException(String message, Throwable cause) { 46 | super(message); 47 | this.cause = cause; 48 | } 49 | 50 | /** 51 | * Constructor for KernelRuntimeException. 52 | * 53 | * @param cause 54 | */ 55 | public EncoderRuntimeException(Throwable cause) { 56 | super(); 57 | this.cause = cause; 58 | } 59 | 60 | /** 61 | * @return the cause of this exception or null if nonexistent 62 | */ 63 | public Throwable getCause() { 64 | return cause; 65 | } 66 | 67 | /** 68 | * Set the cause of this exception 69 | */ 70 | public Throwable initCause(Throwable cause) { 71 | this.cause = cause; 72 | return this.cause; 73 | } 74 | 75 | /** 76 | * Print this throwable and its backtrace 77 | */ 78 | public void printStackTrace() { 79 | if (cause != null) { 80 | cause.printStackTrace(); 81 | } 82 | super.printStackTrace(); 83 | } 84 | 85 | /** 86 | * Print this throwable and its backtrace using a PrintStream object 87 | */ 88 | public void printStackTrace(PrintStream s) { 89 | if (cause != null) { 90 | cause.printStackTrace(s); 91 | } 92 | super.printStackTrace(s); 93 | } 94 | 95 | /** 96 | * Print this throwable and its backtrace using a PrintWriter object 97 | */ 98 | public void printStackTrace(PrintWriter w) { 99 | if (cause != null) { 100 | cause.printStackTrace(w); 101 | } 102 | super.printStackTrace(w); 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/facade/encoder/service/impl/EncoderInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service.impl; 7 | 8 | import java.util.List; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import com.appcel.core.encoder.manager.EncoderInfoManager; 14 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 15 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 16 | import com.appcel.facade.encoder.mode.Configure; 17 | import com.appcel.facade.encoder.mode.EncoderInfo; 18 | import com.appcel.facade.encoder.service.EncoderInfoService; 19 | 20 | /** 21 | * 22 | * @author Kony.Lee 23 | * @version appcel 1.0 24 | * @since JDK-1.7.0 25 | * @date 2016-5-12 26 | */ 27 | @Service("encoderInfoService") 28 | public class EncoderInfoServiceImpl implements EncoderInfoService { 29 | 30 | @Autowired 31 | EncoderInfoManager encoderInfoManager; 32 | 33 | public EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 34 | EncoderStatusEnum status, String remark) { 35 | return encoderInfoManager.createEncoderInfo(entityKey, fileName, srcFilePath, playMode, status, remark); 36 | } 37 | 38 | public EncoderInfo getEncoderInfoByKey(String key) { 39 | return encoderInfoManager.getEncoderInfoByKey(key); 40 | } 41 | 42 | public List getEncoderInfoByEntityKey(String entityKey) { 43 | return encoderInfoManager.getEncoderInfoByEntityKey(entityKey); 44 | } 45 | 46 | public boolean deleteEncoderInfoByEntityKey(String entityKey) { 47 | return encoderInfoManager.deleteEncoderInfoByEntityKey(entityKey); 48 | } 49 | 50 | public boolean updateEncoderTime(String key) { 51 | return encoderInfoManager.updateEncoderTime(key); 52 | } 53 | 54 | public boolean deleteEncoderInfoByKey(String key) { 55 | return encoderInfoManager.deleteEncoderInfoByKey(key); 56 | } 57 | 58 | public Configure createConfigure(String name, String value, String remark) { 59 | return encoderInfoManager.createConfigure(name, value, remark); 60 | } 61 | 62 | public Configure findConfigureByKey(String key) { 63 | return encoderInfoManager.getConfigureByKey(key); 64 | } 65 | 66 | public List getAllConfigure() { 67 | return encoderInfoManager.getAllConfigure(); 68 | } 69 | 70 | public boolean deleteConfigureByKey(String key) { 71 | return encoderInfoManager.deleteConfigureByKey(key); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/impl/MultimediaDaoImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao.impl; 7 | 8 | import java.util.List; 9 | 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.appcel.core.encoder.dao.MultimediaDao; 13 | import com.appcel.facade.encoder.mode.AudioInfo; 14 | import com.appcel.facade.encoder.mode.Multimedia; 15 | import com.appcel.facade.encoder.mode.VideoInfo; 16 | import com.appcel.kernel.mybatis.dao.BaseDaoImpl; 17 | 18 | /** 19 | * 20 | * Defiend class file the MultimediaDaoImpl.java 21 | * 22 | * @author Rock.Lee 23 | * @version appcel 1.0.0 24 | * @since JDK-1.7.0 25 | * @date 2014-12-9 26 | */ 27 | @Repository("multimediaDao") 28 | public class MultimediaDaoImpl extends BaseDaoImpl implements MultimediaDao { 29 | 30 | public Multimedia createMultimedia(String entityKey, String duration, Long timelen, String type, String fps, String startTime, 31 | AudioInfo audioInfo, VideoInfo videoInfo) { 32 | 33 | // AudioInfo audioInfo = new AudioInfo(samplingRate, channels, audioBitrate); 34 | // VideoSize videoSize = new VideoSize(sizex, width, height); 35 | // VideoInfo videoInfo = new VideoInfo(videoSize, videoBitrate, frameRate, vedioformat); 36 | 37 | Multimedia multimedia = new Multimedia(audioInfo, videoInfo, entityKey, startTime); 38 | 39 | multimedia.setEntityKey(entityKey); 40 | multimedia.setDuration(duration); 41 | multimedia.setTimelen(timelen); 42 | multimedia.setType(type); 43 | multimedia.setFps(fps); 44 | save(multimedia); 45 | return multimedia; 46 | } 47 | 48 | public Multimedia findMultimediaByKey(String key) { 49 | Multimedia multimedia = findByKey(key); 50 | return multimedia; 51 | } 52 | 53 | public List findMultimediaByEntityKey(String entityKey) { 54 | return super.getSessionTemplate().selectList("listByEntityKey", entityKey); 55 | } 56 | 57 | public boolean deleteMultimedaByEntityKey(String entityKey) { 58 | List multimedias = findMultimediaByEntityKey(entityKey); 59 | if (null != multimedias && !multimedias.isEmpty()) { 60 | for (Multimedia multimedia : multimedias) { 61 | deleteByKey(multimedia.getKey()); 62 | } 63 | return true; 64 | } 65 | return false; 66 | } 67 | 68 | public boolean deleteMultimedaByKey(String key) { 69 | Multimedia multimedia = findByKey(key); 70 | if (multimedia != null) { 71 | deleteByKey(multimedia.getKey()); 72 | return true; 73 | } 74 | return false; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: Administrator 3 | Build-Jdk: 1.6.0_13 4 | Class-Path: . lib/pointdew-common-1.0.0-SNAPSHOT.jar lib/ant-1.9.3.jar 5 | lib/ant-launcher-1.9.3.jar lib/jdom-2.0.2.jar lib/jakarta-oro-1.1.ja 6 | r lib/commons-lang-2.6.jar lib/chardet-1.0.jar lib/appcel-common-1.0. 7 | 0-SNAPSHOT.jar lib/poi-3.9.jar lib/poi-ooxml-3.9.jar lib/poi-ooxml-sc 8 | hemas-3.9.jar lib/xmlbeans-2.3.0.jar lib/stax-api-1.0.1.jar lib/poi-s 9 | cratchpad-3.9.jar lib/poi-contrib-3.6.jar lib/commons-httpclient-3.1. 10 | jar lib/velocity-1.7.jar lib/mail-1.4.7.jar lib/activation-1.1.jar li 11 | b/pdfbox-0.7.3.jar lib/fontbox-0.1.0.jar lib/jempbox-0.2.0.jar lib/bc 12 | mail-jdk14-136.jar lib/bcprov-jdk14-136.jar lib/htmlparser-1.6.jar li 13 | b/kaptcha-2.3.2.jar lib/edtFTPj-2.4.0.jar lib/pointdew-license-1.0.0- 14 | SNAPSHOT.jar lib/appcel-kernel-mybatis-1.0.0-SNAPSHOT.jar lib/spring- 15 | jdbc-4.2.5.RELEASE.jar lib/appcel-config-1.0.0-SNAPSHOT.jar lib/appce 16 | l-facade-encoder-1.0.0-SNAPSHOT.jar lib/mysql-connector-java-5.1.30.j 17 | ar lib/mybatis-3.3.1.jar lib/mybatis-spring-1.2.5.jar lib/antlr-2.7.7 18 | .jar lib/aopalliance-1.0.jar lib/aspectjweaver-1.7.4.jar lib/aspectjr 19 | t-1.7.4.jar lib/cglib-3.2.2.jar lib/asm-5.0.4.jar lib/json-lib-2.4-jd 20 | k15.jar lib/ognl-3.1.4.jar lib/javassist-3.20.0-GA.jar lib/oro-2.0.8. 21 | jar lib/commons-beanutils-1.9.1.jar lib/commons-codec-1.10.jar lib/co 22 | mmons-collections-3.2.1.jar lib/commons-digester-2.1.jar lib/commons- 23 | fileupload-1.3.1.jar lib/commons-io-2.4.jar lib/commons-lang3-3.4.jar 24 | lib/commons-logging-1.1.1.jar lib/commons-validator-1.5.1.jar lib/do 25 | m4j-1.6.1.jar lib/xml-apis-1.0.b2.jar lib/ezmorph-1.0.6.jar lib/javas 26 | sist-3.12.1.GA.jar lib/log4j-1.2.17.jar lib/slf4j-api-1.7.5.jar lib/s 27 | lf4j-log4j12-1.7.5.jar lib/fastjson-1.2.6.jar lib/spring-aop-4.2.5.RE 28 | LEASE.jar lib/spring-aspects-4.2.5.RELEASE.jar lib/spring-beans-4.2.5 29 | .RELEASE.jar lib/spring-context-4.2.5.RELEASE.jar lib/spring-expressi 30 | on-4.2.5.RELEASE.jar lib/spring-context-support-4.2.5.RELEASE.jar lib 31 | /spring-core-4.2.5.RELEASE.jar lib/spring-jms-4.2.5.RELEASE.jar lib/s 32 | pring-messaging-4.2.5.RELEASE.jar lib/spring-orm-4.2.5.RELEASE.jar li 33 | b/spring-oxm-4.2.5.RELEASE.jar lib/spring-tx-4.2.5.RELEASE.jar lib/ac 34 | tivemq-all-5.13.2.jar lib/activemq-pool-5.13.2.jar lib/activemq-jms-p 35 | ool-5.13.2.jar lib/geronimo-jms_1.1_spec-1.1.1.jar lib/activemq-clien 36 | t-5.13.2.jar lib/hawtbuf-1.11.jar lib/geronimo-j2ee-management_1.1_sp 37 | ec-1.0.1.jar lib/geronimo-jta_1.0.1B_spec-1.0.1.jar lib/commons-pool2 38 | -2.4.2.jar lib/druid-1.0.18.jar lib/dubbo-2.5.3.jar lib/netty-3.2.5.F 39 | inal.jar lib/zookeeper-3.4.5.jar lib/jline-0.9.94.jar lib/zkclient-0. 40 | 3.jar lib/fastDFS-client-1.24.jar lib/quartz-2.2.3.jar lib/c3p0-0.9.1 41 | .2.jar lib/quartz-jobs-2.2.3.jar 42 | Main-Class: com.alibaba.dubbo.container.Main 43 | Created-By: Maven Integration for Eclipse 44 | 45 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/dao/impl/EncoderInfoDaoImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.dao.impl; 7 | 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | import org.springframework.stereotype.Repository; 12 | 13 | import com.appcel.core.encoder.dao.EncoderInfoDao; 14 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 15 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 16 | import com.appcel.facade.encoder.mode.EncoderInfo; 17 | import com.appcel.kernel.mybatis.dao.BaseDaoImpl; 18 | 19 | /** 20 | * 21 | * @author Kony.Lee 22 | * @version appcel 1.0 23 | * @since JDK-1.7.0 24 | * @date 2016-5-11 25 | */ 26 | @Repository("encoderInfoDao") 27 | public class EncoderInfoDaoImpl extends BaseDaoImpl implements EncoderInfoDao { 28 | 29 | public EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 30 | EncoderStatusEnum status, String remark) { 31 | EncoderInfo encoderInfo = new EncoderInfo(entityKey, fileName, srcFilePath, playMode, status, remark); 32 | String key = save(encoderInfo); 33 | encoderInfo.setKey(key); 34 | return encoderInfo; 35 | } 36 | 37 | public EncoderInfo findEncoderInfoByKey(String key) { 38 | EncoderInfo encoderInfo = findByKey(key); 39 | return encoderInfo; 40 | } 41 | 42 | public List findEncoderInfoByEntityKey(String entityKey) { 43 | return super.getSessionTemplate().selectList("listByEntityKey", entityKey); 44 | } 45 | 46 | public List findEncoderInfoByStatus(EncoderStatusEnum encoderSatus) { 47 | Integer status = encoderSatus.getValue(); 48 | return super.getSessionTemplate().selectList("listByStatus", status); 49 | } 50 | 51 | public boolean deleteEncoderInfoByEntityKey(String entityKey) { 52 | List encoderInfos = findEncoderInfoByEntityKey(entityKey); 53 | if (null != encoderInfos && !encoderInfos.isEmpty()) { 54 | for (EncoderInfo encoderInfo : encoderInfos) { 55 | deleteByKey(encoderInfo.getKey()); 56 | } 57 | return true; 58 | } 59 | return false; 60 | } 61 | 62 | public boolean updateEncoderTime(String key) { 63 | EncoderInfo encoderInfo = findByKey(key); 64 | if (encoderInfo != null) { 65 | encoderInfo.setEncoderTime(new Date()); 66 | update(encoderInfo); 67 | return true; 68 | } 69 | return false; 70 | } 71 | 72 | public boolean updateEncoderStatus(String key, EncoderStatusEnum encoderSatus) { 73 | EncoderInfo encoderInfo = findByKey(key); 74 | if (encoderInfo != null) { 75 | encoderInfo.setStatus(encoderSatus.getValue()); 76 | update(encoderInfo); 77 | return true; 78 | } 79 | return false; 80 | } 81 | 82 | public boolean deleteEncoderInfoByKey(String key) { 83 | EncoderInfo encoderInfo = findByKey(key); 84 | if (encoderInfo != null) { 85 | deleteByKey(encoderInfo.getKey()); 86 | return true; 87 | } 88 | return false; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/test/java/com/appcel/facade/encoder/service/EncoderInfoServiceTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.service; 7 | 8 | import java.io.File; 9 | 10 | import org.apache.commons.logging.Log; 11 | import org.apache.commons.logging.LogFactory; 12 | import org.junit.Assert; 13 | import org.junit.Test; 14 | import org.junit.runner.RunWith; 15 | import org.springframework.beans.factory.annotation.Autowired; 16 | import org.springframework.test.context.ContextConfiguration; 17 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 18 | 19 | import com.appcel.core.encoder.FastDFSClient; 20 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 21 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 22 | import com.appcel.facade.encoder.mode.EncoderInfo; 23 | 24 | /** 25 | * 26 | * @author Kony.Lee 27 | * @version appcel 1.0 28 | * @since JDK-1.7.0 29 | * @date 2016-5-13 30 | */ 31 | @RunWith(SpringJUnit4ClassRunner.class) 32 | @ContextConfiguration(locations = { "classpath:dubbo-consumer.xml" }) 33 | public class EncoderInfoServiceTest { 34 | private static final Log log = LogFactory.getLog(EncoderInfoServiceTest.class); 35 | 36 | @Autowired 37 | EncoderInfoService encoderInfoService; 38 | 39 | /** 40 | * 上传测试. 41 | * @throws Exception 42 | */ 43 | public String upload(File file, String filePath) throws Exception { 44 | 45 | String fileId = FastDFSClient.uploadFile(file, filePath); 46 | System.out.println("Upload local file " + filePath + " ok, fileid=" + fileId); 47 | // fileId: group1/M00/00/00/wKg4Q1b6IEuAO-zIAAGoSC2lYbU129.png 48 | // url: http://192.168.56.67:8888/group1/M00/00/00/wKg4Q1b6IEuAO-zIAAGoSC2lYbU129.png 49 | return fileId; 50 | } 51 | 52 | @Test 53 | public void testTranscoding() { 54 | try { 55 | 56 | String filePath = "D:\\FFmpeg\\test\\zs.swf"; 57 | File file = new File(filePath); 58 | String fileId = upload(file, filePath); 59 | 60 | //String filePath = "group1/M00/00/00/wKg4Q1c1iMaAT1uXAEmTktBBsV4183.wmv";//"group1/M00/00/00/wKg4Q1cx4ACAaNihAGGnSIoqNtM031.avi"; 61 | //String fileId = filePath; 62 | 63 | log.info(fileId); 64 | 65 | // 文件转换 66 | String entityKey = "wKg4Q1cx4ACAaNihAGGnSIoqNtM031"; 67 | String fileName = "wKg4Q1cx4ACAaNihAGGnSIoqNtM031"; 68 | String srcFilePath = fileId; 69 | // Integer playMode = EncoderPlayModeEnum.VOD.getValue(); 70 | // Integer status = EncoderStatusEnum.STATUS_WAIT_CAPTUREIMG.getValue(); 71 | String remark = "测试文件转码截图试试看"; 72 | 73 | EncoderInfo encoderInfo = encoderInfoService.createEncoderInfo(entityKey, fileName, srcFilePath, EncoderPlayModeEnum.VOD, 74 | EncoderStatusEnum.STATUS_WAIT_CAPTUREIMG, remark); 75 | Assert.assertNotNull(encoderInfo); 76 | 77 | } catch (Exception e) { 78 | log.error("==>Encoder tanscoding start error:", e); 79 | e.printStackTrace(); 80 | System.exit(0); 81 | } finally { 82 | log.info("===>System.exit"); 83 | System.exit(0); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/mode/VideoSize.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.mode; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * Defiend class file the VideoSize.java 13 | * 14 | * Instances of this class report informations about videos size. 15 | * 16 | * @author Rock.Lee 17 | * @version appcel 1.0.0 18 | * @since JDK-1.7.0 19 | * @date 2014-12-2 20 | */ 21 | public class VideoSize implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * 分辨率 27 | */ 28 | private String sizex; 29 | /** 30 | * The video width. 31 | */ 32 | private int width; 33 | 34 | /** 35 | * The video height. 36 | */ 37 | private int height; 38 | 39 | public VideoSize() { 40 | } 41 | 42 | /** 43 | * It builds the bean. 44 | * 45 | * @param width 46 | * The video width. 47 | * @param height 48 | * The video height. 49 | */ 50 | public VideoSize(String sizex, int width, int height) { 51 | this.sizex = sizex; 52 | this.width = width; 53 | this.height = height; 54 | } 55 | 56 | /** 57 | * Returns the video width. 58 | * 59 | * @return The video width. 60 | */ 61 | public int getWidth() { 62 | return width; 63 | } 64 | 65 | /** 66 | * Returns the video height. 67 | * 68 | * @return The video height. 69 | */ 70 | public int getHeight() { 71 | return height; 72 | } 73 | 74 | /** 75 | * @param width the width to set 76 | */ 77 | public void setWidth(int width) { 78 | this.width = width; 79 | } 80 | 81 | /** 82 | * @param height the height to set 83 | */ 84 | public void setHeight(int height) { 85 | this.height = height; 86 | } 87 | 88 | /** 89 | * @return the sizex 90 | */ 91 | public String getSizex() { 92 | return sizex; 93 | } 94 | 95 | /** 96 | * @param sizex the sizex to set 97 | */ 98 | public void setSizex(String sizex) { 99 | this.sizex = sizex; 100 | } 101 | 102 | @Override 103 | public int hashCode() { 104 | final int prime = 31; 105 | int result = 1; 106 | result = prime * result + height; 107 | result = prime * result + ((sizex == null) ? 0 : sizex.hashCode()); 108 | result = prime * result + width; 109 | return result; 110 | } 111 | 112 | @Override 113 | public boolean equals(Object obj) { 114 | if (this == obj) 115 | return true; 116 | if (obj == null) 117 | return false; 118 | if (getClass() != obj.getClass()) 119 | return false; 120 | VideoSize other = (VideoSize) obj; 121 | if (height != other.height) 122 | return false; 123 | if (sizex == null) { 124 | if (other.sizex != null) 125 | return false; 126 | } else if (!sizex.equals(other.sizex)) 127 | return false; 128 | if (width != other.width) 129 | return false; 130 | return true; 131 | } 132 | 133 | @Override 134 | public String toString() { 135 | return "VideoSize [sizex=" + sizex + ", width=" + width + ", height=" + height + "]"; 136 | } 137 | 138 | } 139 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/DTO/VideoInfoDTO.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.DTO; 7 | 8 | /** 9 | * 10 | * Defiend class file the VideoInfo.java 11 | * 12 | * Instances of this class report informations about a video stream that can be 13 | * decoded. 14 | * 15 | * @author Rock.Lee 16 | * @version appcel 1.0.0 17 | * @since JDK-1.7.0 18 | * @date 2014-12-2 19 | */ 20 | public class VideoInfoDTO { 21 | 22 | /** 23 | * The video stream decoder name. 24 | */ 25 | private String decoder; 26 | 27 | /** 28 | * The video size. If null this information is not available. 29 | */ 30 | private VideoSizeDTO size = null; 31 | 32 | /** 33 | * The video stream (average) bit rate. If less than 0, this information is 34 | * not available. 35 | */ 36 | private int bitRate = -1; 37 | 38 | /** 39 | * The video frame rate. If less than 0 this information is not available. 40 | */ 41 | private float frameRate = -1; 42 | 43 | /** 44 | * Returns the video stream decoder name. 45 | * 46 | * @return The video stream decoder name. 47 | */ 48 | public String getDecoder() { 49 | return decoder; 50 | } 51 | 52 | /** 53 | * Sets the video stream decoder name. 54 | * 55 | * @param decoder 56 | * The video stream decoder name. 57 | */ 58 | public void setDecoder(String codec) { 59 | this.decoder = codec; 60 | } 61 | 62 | /** 63 | * Returns the video size. If null this information is not available. 64 | * 65 | * @return the size The video size. 66 | */ 67 | public VideoSizeDTO getSize() { 68 | return size; 69 | } 70 | 71 | /** 72 | * Sets the video size. 73 | * 74 | * @param size 75 | * The video size. 76 | */ 77 | public void setSize(VideoSizeDTO size) { 78 | this.size = size; 79 | } 80 | 81 | /** 82 | * Returns the video frame rate. If less than 0 this information is not 83 | * available. 84 | * 85 | * @return The video frame rate. 86 | */ 87 | public float getFrameRate() { 88 | return frameRate; 89 | } 90 | 91 | /** 92 | * Sets the video frame rate. 93 | * 94 | * @param frameRate 95 | * The video frame rate. 96 | */ 97 | public void setFrameRate(float frameRate) { 98 | this.frameRate = frameRate; 99 | } 100 | 101 | /** 102 | * Returns the video stream (average) bit rate. If less than 0, this 103 | * information is not available. 104 | * 105 | * @return The video stream (average) bit rate. 106 | */ 107 | public int getBitRate() { 108 | return bitRate; 109 | } 110 | 111 | /** 112 | * Sets the video stream (average) bit rate. 113 | * 114 | * @param bitRate 115 | * The video stream (average) bit rate. 116 | */ 117 | public void setBitRate(int bitRate) { 118 | this.bitRate = bitRate; 119 | } 120 | 121 | public String toString() { 122 | return getClass().getName() + " (decoder=" + decoder + ", size=" + size + ", bitRate=" + bitRate 123 | + ", frameRate=" + frameRate + ")"; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/DTO/MultimediaInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.DTO; 7 | 8 | 9 | /** 10 | * 11 | * Defiend class file the MultimediaInfo.java 12 | * 13 | * Instances of this class report informations about a decoded multimedia file. 14 | * 15 | * @author Rock.Lee 16 | * @version appcel 1.0.0 17 | * @since JDK-1.7.0 18 | * @date 2014-12-2 19 | */ 20 | public class MultimediaInfo { 21 | 22 | /** 23 | * The multimedia file format name. 24 | */ 25 | private String format = null; 26 | 27 | /** 28 | * The stream duration in millis. If less than 0 this information is not 29 | * available. 30 | */ 31 | private long duration = -1; 32 | 33 | /** 34 | * A set of audio-specific informations. If null, there's no audio stream in 35 | * the multimedia file. 36 | */ 37 | private AudioInfoDTO audio = null; 38 | 39 | /** 40 | * A set of video-specific informations. If null, there's no video stream in 41 | * the multimedia file. 42 | */ 43 | private VideoInfoDTO video = null; 44 | 45 | /** 46 | * Returns the multimedia file format name. 47 | * 48 | * @return The multimedia file format name. 49 | */ 50 | public String getFormat() { 51 | return format; 52 | } 53 | 54 | /** 55 | * Sets the multimedia file format name. 56 | * 57 | * @param format 58 | * The multimedia file format name. 59 | */ 60 | public void setFormat(String format) { 61 | this.format = format; 62 | } 63 | 64 | /** 65 | * Returns the stream duration in millis. If less than 0 this information is 66 | * not available. 67 | * 68 | * @return The stream duration in millis. If less than 0 this information is 69 | * not available. 70 | */ 71 | public long getDuration() { 72 | return duration; 73 | } 74 | 75 | /** 76 | * Sets the stream duration in millis. 77 | * 78 | * @param duration 79 | * The stream duration in millis. 80 | */ 81 | public void setDuration(long duration) { 82 | this.duration = duration; 83 | } 84 | 85 | /** 86 | * Returns a set of audio-specific informations. If null, there's no audio 87 | * stream in the multimedia file. 88 | * 89 | * @return A set of audio-specific informations. 90 | */ 91 | public AudioInfoDTO getAudio() { 92 | return audio; 93 | } 94 | 95 | /** 96 | * Sets a set of audio-specific informations. 97 | * 98 | * @param audio 99 | * A set of audio-specific informations. 100 | */ 101 | public void setAudio(AudioInfoDTO audio) { 102 | this.audio = audio; 103 | } 104 | 105 | /** 106 | * Returns a set of video-specific informations. If null, there's no video 107 | * stream in the multimedia file. 108 | * 109 | * @return A set of audio-specific informations. 110 | */ 111 | public VideoInfoDTO getVideo() { 112 | return video; 113 | } 114 | 115 | /** 116 | * Sets a set of video-specific informations. 117 | * 118 | * @param video 119 | * A set of video-specific informations. 120 | */ 121 | public void setVideo(VideoInfoDTO video) { 122 | this.video = video; 123 | } 124 | 125 | public String toString() { 126 | return getClass().getName() + " (format=" + format + ", duration=" + duration + ", video=" + video + ", audio=" 127 | + audio + ")"; 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/DTO/AudioInfoDTO.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.DTO; 7 | 8 | /** 9 | * 10 | * Defiend class file the AudioInfo.java 11 | * 12 | * Instances of this class report informations about an audio stream that can be 13 | * decoded. 14 | * 15 | * @author Rock.Lee 16 | * @version appcel 1.0.0 17 | * @since JDK-1.7.0 18 | * @date 2014-12-2 19 | */ 20 | public class AudioInfoDTO { 21 | 22 | /** 23 | * The audio stream decoder name. 24 | */ 25 | private String decoder; 26 | 27 | /** 28 | * The audio stream sampling rate. If less than 0, this information is not 29 | * available. 30 | */ 31 | private int samplingRate = -1; 32 | 33 | /** 34 | * The audio stream channels number (1=mono, 2=stereo). If less than 0, this 35 | * information is not available. 36 | */ 37 | private int channels = -1; 38 | 39 | /** 40 | * The audio stream (average) bit rate. If less than 0, this information is 41 | * not available. 42 | */ 43 | private int bitRate = -1; 44 | 45 | /** 46 | * Returns the audio stream decoder name. 47 | * 48 | * @return The audio stream decoder name. 49 | */ 50 | public String getDecoder() { 51 | return decoder; 52 | } 53 | 54 | /** 55 | * Sets the audio stream decoder name. 56 | * 57 | * @param decoder 58 | * The audio stream decoder name. 59 | */ 60 | public void setDecoder(String format) { 61 | this.decoder = format; 62 | } 63 | 64 | /** 65 | * Returns the audio stream sampling rate. If less than 0, this information 66 | * is not available. 67 | * 68 | * @return The audio stream sampling rate. 69 | */ 70 | public int getSamplingRate() { 71 | return samplingRate; 72 | } 73 | 74 | /** 75 | * Sets the audio stream sampling rate. 76 | * 77 | * @param samplingRate 78 | * The audio stream sampling rate. 79 | */ 80 | public void setSamplingRate(int samplingRate) { 81 | this.samplingRate = samplingRate; 82 | } 83 | 84 | /** 85 | * Returns the audio stream channels number (1=mono, 2=stereo). If less than 86 | * 0, this information is not available. 87 | * 88 | * @return the channels The audio stream channels number (1=mono, 2=stereo). 89 | */ 90 | public int getChannels() { 91 | return channels; 92 | } 93 | 94 | /** 95 | * Sets the audio stream channels number (1=mono, 2=stereo). 96 | * 97 | * @param channels 98 | * The audio stream channels number (1=mono, 2=stereo). 99 | */ 100 | public void setChannels(int channels) { 101 | this.channels = channels; 102 | } 103 | 104 | /** 105 | * Returns the audio stream (average) bit rate. If less than 0, this 106 | * information is not available. 107 | * 108 | * @return The audio stream (average) bit rate. 109 | */ 110 | public int getBitRate() { 111 | return bitRate; 112 | } 113 | 114 | /** 115 | * Sets the audio stream (average) bit rate. 116 | * 117 | * @param bitRate 118 | * The audio stream (average) bit rate. 119 | */ 120 | public void setBitRate(int bitRate) { 121 | this.bitRate = bitRate; 122 | } 123 | 124 | public String toString() { 125 | return getClass().getName() + " (decoder=" + decoder + ", samplingRate=" + samplingRate + ", channels=" 126 | + channels + ", bitRate=" + bitRate + ")"; 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/spring/spring-activemq.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | ${queueName.encoder} 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-activemq.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | ${queueName.encoder} 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/manager/impl/EncoderInfoManagerImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.manager.impl; 7 | 8 | import java.util.HashMap; 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import com.appcel.core.encoder.dao.ConfigureDao; 16 | import com.appcel.core.encoder.dao.EncoderInfoDao; 17 | import com.appcel.core.encoder.manager.EncoderInfoManager; 18 | import com.appcel.facade.encoder.enums.EncoderPlayModeEnum; 19 | import com.appcel.facade.encoder.enums.EncoderStatusEnum; 20 | import com.appcel.facade.encoder.mode.Configure; 21 | import com.appcel.facade.encoder.mode.EncoderInfo; 22 | import com.appcel.kernel.mybatis.dao.BaseDao; 23 | import com.appcel.kernel.mybatis.manager.BaseManagerImpl; 24 | 25 | /** 26 | * 27 | * @author Kony.Lee 28 | * @version appcel 1.0 29 | * @since JDK-1.7.0 30 | * @date 2016-5-12 31 | */ 32 | @Service("encoderInfoManager") 33 | public class EncoderInfoManagerImpl extends BaseManagerImpl implements EncoderInfoManager { 34 | 35 | @Autowired 36 | EncoderInfoDao encoderInfoDao; 37 | @Autowired 38 | ConfigureDao configureDao; 39 | 40 | public EncoderInfo createEncoderInfo(String entityKey, String fileName, String srcFilePath, EncoderPlayModeEnum playMode, 41 | EncoderStatusEnum status, String remark) { 42 | return encoderInfoDao.createEncoderInfo(entityKey, fileName, srcFilePath, playMode, status, remark); 43 | } 44 | 45 | public EncoderInfo getEncoderInfoByKey(String key) { 46 | return encoderInfoDao.findEncoderInfoByKey(key); 47 | } 48 | 49 | public List getEncoderInfoByEntityKey(String entityKey) { 50 | return encoderInfoDao.findEncoderInfoByEntityKey(entityKey); 51 | } 52 | 53 | public List getEncoderInfoByStatus(EncoderStatusEnum encoderSatus) { 54 | return encoderInfoDao.findEncoderInfoByStatus(encoderSatus); 55 | } 56 | 57 | public boolean deleteEncoderInfoByEntityKey(String entityKey) { 58 | return encoderInfoDao.deleteEncoderInfoByEntityKey(entityKey); 59 | } 60 | 61 | public boolean updateEncoderTime(String key) { 62 | return encoderInfoDao.updateEncoderTime(key); 63 | } 64 | 65 | public boolean updateEncoderStatus(String key, EncoderStatusEnum encoderSatus) { 66 | return encoderInfoDao.updateEncoderStatus(key, encoderSatus); 67 | } 68 | 69 | public boolean deleteEncoderInfoByKey(String key) { 70 | return encoderInfoDao.deleteEncoderInfoByKey(key); 71 | } 72 | 73 | public Configure createConfigure(String name, String value, String remark) { 74 | return configureDao.createConfigure(name, value, remark); 75 | } 76 | 77 | public Configure getConfigureByKey(String key) { 78 | return configureDao.findConfigureByKey(key); 79 | } 80 | 81 | public List getAllConfigure() { 82 | return configureDao.listAllConfigure(); 83 | } 84 | 85 | public boolean deleteConfigureByKey(String key) { 86 | return configureDao.deleteConfigureByKey(key); 87 | } 88 | 89 | public Map getAllConfigureMap() { 90 | Map configMap = new HashMap(); 91 | List configures = configureDao.listAllConfigure(); 92 | for (Configure configure : configures) { 93 | configMap.put(configure.getName(), configure); 94 | } 95 | return configMap; 96 | } 97 | 98 | @Override 99 | protected BaseDao getDao() { 100 | 101 | return this.encoderInfoDao; 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/mybatis/mapper/multimedia/EncoderInfo.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_encoder_info 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | insert into 33 | 34 | (KEYX, VERSIONX, FILENAME, PLAYMODE, SRCFILEPATH, DESTFILEPATH, CAPTUREIMGPATH, ENTITYKEY, STATUS, REMARK, 35 | SUBTITLEFILEPATH, SUBTITLEFILESIZE, VOICEFILEPATH, VOICEFILESIZE, ENCODERTIME, CREATETIME) 36 | values ( 37 | #{key, jdbcType=VARCHAR}, 38 | 0, 39 | #{fileName}, 40 | #{playMode}, 41 | #{srcFilePath}, 42 | #{destFilePath}, 43 | #{captureImgPath}, 44 | #{entityKey}, 45 | #{status}, 46 | #{remark}, 47 | #{subtitleFilePath}, 48 | #{subtitleFileSize}, 49 | #{voiceFilePath}, 50 | #{voiceFileSize}, 51 | #{encoderTime,jdbcType=TIMESTAMP}, 52 | #{createTime,jdbcType=TIMESTAMP} 53 | ) 54 | 55 | 56 | 57 | 58 | update 59 | 60 | 61 | VERSIONX = #{version}+1 , 62 | FILENAME = #{fileName}, 63 | PLAYMODE = #{playMode}, 64 | SRCFILEPATH = #{srcFilePath}, 65 | DESTFILEPATH = #{destFilePath}, 66 | CAPTUREIMGPATH = #{captureImgPath}, 67 | ENTITYKEY = #{entityKey}, 68 | STATUS = #{status}, 69 | REMARK = #{remark}, 70 | SUBTITLEFILEPATH = #{subtitleFilePath}, 71 | SUBTITLEFILESIZE = #{subtitleFileSize}, 72 | VOICEFILEPATH = #{voiceFilePath}, 73 | VOICEFILESIZE = #{voiceFileSize}, 74 | ENCODERTIME = #{encoderTime,jdbcType=TIMESTAMP}, 75 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 76 | 77 | 78 | KEYX = #{key} and VERSIONX = #{version} 79 | 80 | 81 | 86 | 87 | 92 | 97 | 98 | delete from 99 | 100 | where KEYX = #{key} 101 | 102 | 103 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/mybatis/mapper/multimedia/EncoderInfo.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_encoder_info 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | insert into 33 | 34 | (KEYX, VERSIONX, FILENAME, PLAYMODE, SRCFILEPATH, DESTFILEPATH, CAPTUREIMGPATH, ENTITYKEY, STATUS, REMARK, 35 | SUBTITLEFILEPATH, SUBTITLEFILESIZE, VOICEFILEPATH, VOICEFILESIZE, ENCODERTIME, CREATETIME) 36 | values ( 37 | #{key, jdbcType=VARCHAR}, 38 | 0, 39 | #{fileName}, 40 | #{playMode}, 41 | #{srcFilePath}, 42 | #{destFilePath}, 43 | #{captureImgPath}, 44 | #{entityKey}, 45 | #{status}, 46 | #{remark}, 47 | #{subtitleFilePath}, 48 | #{subtitleFileSize}, 49 | #{voiceFilePath}, 50 | #{voiceFileSize}, 51 | #{encoderTime,jdbcType=TIMESTAMP}, 52 | #{createTime,jdbcType=TIMESTAMP} 53 | ) 54 | 55 | 56 | 57 | 58 | update 59 | 60 | 61 | VERSIONX = #{version}+1 , 62 | FILENAME = #{fileName}, 63 | PLAYMODE = #{playMode}, 64 | SRCFILEPATH = #{srcFilePath}, 65 | DESTFILEPATH = #{destFilePath}, 66 | CAPTUREIMGPATH = #{captureImgPath}, 67 | ENTITYKEY = #{entityKey}, 68 | STATUS = #{status}, 69 | REMARK = #{remark}, 70 | SUBTITLEFILEPATH = #{subtitleFilePath}, 71 | SUBTITLEFILESIZE = #{subtitleFileSize}, 72 | VOICEFILEPATH = #{voiceFilePath}, 73 | VOICEFILESIZE = #{voiceFileSize}, 74 | ENCODERTIME = #{encoderTime,jdbcType=TIMESTAMP}, 75 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 76 | 77 | 78 | KEYX = #{key} and VERSIONX = #{version} 79 | 80 | 81 | 86 | 87 | 92 | 97 | 98 | delete from 99 | 100 | where KEYX = #{key} 101 | 102 | 103 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/mybatis/mapper/multimedia/Multimedia.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_multimedia_info 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | insert into 37 | (KEYX, VERSIONX, AUDIOBITRATE, CHANNELS, SAMPLINGRATE, DURATION, TIMELEN, ENTITYKEY, TYPE, FPS, 38 | STARTTIME, FRAMERATE, HEIGHT, WIDTH, SIZEX, VIDEOBITRATE, VEDIOFORMAT, CREATETIME) 39 | values ( 40 | #{key, jdbcType=VARCHAR}, 41 | 0, 42 | #{audio.audioBitrate}, 43 | #{audio.channels}, 44 | #{audio.samplingRate}, 45 | #{duration}, 46 | #{timelen}, 47 | #{entityKey}, 48 | #{type}, 49 | #{fps}, 50 | #{startTime}, 51 | #{video.frameRate}, 52 | #{video.size.height}, 53 | #{video.size.width}, 54 | #{video.size.sizex}, 55 | #{video.videoBitrate}, 56 | #{video.vedioFormat}, 57 | #{createTime,jdbcType=TIMESTAMP} 58 | ) 59 | 60 | 61 | 62 | 63 | update 64 | 65 | VERSIONX = #{version}+1 , 66 | AUDIOBITRATE = #{audio.audioBitRate}, 67 | CHANNELS = #{audio.channels}, 68 | SAMPLINGRATE = #{audio.samplingRate}, 69 | DURATION = #{duration}, 70 | TIMELEN = #{timelen}, 71 | ENTITYKEY = #{entityKey}, 72 | FORMATX = #{type}, 73 | FPS = #{fps}, 74 | STARTTIME = #{startTime}, 75 | FRAMERATE = #{video.frameRate}, 76 | HEIGHT = #{video.size.height}, 77 | WIDTH = #{video.size.width}, 78 | SIZEX = #{sizex}, 79 | VIDEOBITRATE = #{video.videoBitrate}, 80 | VEDIOFORMAT = #{video.vedioFormat}, 81 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 82 | 83 | 84 | KEYX = #{key} and VERSIONX = #{version} 85 | 86 | 87 | 88 | 91 | 92 | 95 | 96 | 97 | delete from where KEYX = #{key} 98 | 99 | 100 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/mybatis/mapper/multimedia/Multimedia.Mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tb_multimedia_info 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | insert into 37 | (KEYX, VERSIONX, AUDIOBITRATE, CHANNELS, SAMPLINGRATE, DURATION, TIMELEN, ENTITYKEY, TYPE, FPS, 38 | STARTTIME, FRAMERATE, HEIGHT, WIDTH, SIZEX, VIDEOBITRATE, VEDIOFORMAT, CREATETIME) 39 | values ( 40 | #{key, jdbcType=VARCHAR}, 41 | 0, 42 | #{audio.audioBitrate}, 43 | #{audio.channels}, 44 | #{audio.samplingRate}, 45 | #{duration}, 46 | #{timelen}, 47 | #{entityKey}, 48 | #{type}, 49 | #{fps}, 50 | #{startTime}, 51 | #{video.frameRate}, 52 | #{video.size.height}, 53 | #{video.size.width}, 54 | #{video.size.sizex}, 55 | #{video.videoBitrate}, 56 | #{video.vedioFormat}, 57 | #{createTime,jdbcType=TIMESTAMP} 58 | ) 59 | 60 | 61 | 62 | 63 | update 64 | 65 | VERSIONX = #{version}+1 , 66 | AUDIOBITRATE = #{audio.audioBitRate}, 67 | CHANNELS = #{audio.channels}, 68 | SAMPLINGRATE = #{audio.samplingRate}, 69 | DURATION = #{duration}, 70 | TIMELEN = #{timelen}, 71 | ENTITYKEY = #{entityKey}, 72 | FORMATX = #{type}, 73 | FPS = #{fps}, 74 | STARTTIME = #{startTime}, 75 | FRAMERATE = #{video.frameRate}, 76 | HEIGHT = #{video.size.height}, 77 | WIDTH = #{video.size.width}, 78 | SIZEX = #{sizex}, 79 | VIDEOBITRATE = #{video.videoBitrate}, 80 | VEDIOFORMAT = #{video.vedioFormat}, 81 | CREATETIME = #{createTime,jdbcType=TIMESTAMP} 82 | 83 | 84 | KEYX = #{key} and VERSIONX = #{version} 85 | 86 | 87 | 88 | 91 | 92 | 95 | 96 | 97 | delete from where KEYX = #{key} 98 | 99 | 100 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/mode/AudioInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.mode; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * Defiend class file the AudioInfo.java 13 | * 14 | * 音频信息 15 | * 16 | * Instances of this class report informations about an audio stream that can be 17 | * decoded. 18 | * 19 | * @author Rock.Lee 20 | * @version appcel 1.0.0 21 | * @since JDK-1.7.0 22 | * @date 2014-12-2 23 | */ 24 | public class AudioInfo implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | /** 32 | * The audio stream sampling rate. If less than 0, this information is not 33 | * available. 34 | */ 35 | private int samplingRate = -1; 36 | 37 | /** 38 | * The audio stream channels number (1=mono, 2=stereo). If less than 0, this 39 | * information is not available. 40 | */ 41 | private int channels = -1; 42 | 43 | /** 44 | * The audio stream (average) bit rate. If less than 0, this information is 45 | * not available. 46 | * 47 | * 音频 Hz 字符串 单位 b 48 | */ 49 | private String audioBitrate = "0"; 50 | 51 | public AudioInfo() { 52 | } 53 | 54 | public AudioInfo(int samplingRate, int channels, String audioBitrate) { 55 | this.samplingRate = samplingRate; 56 | this.channels = channels; 57 | this.audioBitrate = audioBitrate; 58 | } 59 | 60 | /** 61 | * Returns the audio stream sampling rate. If less than 0, this information 62 | * is not available. 63 | * 64 | * @return The audio stream sampling rate. 65 | */ 66 | public int getSamplingRate() { 67 | return samplingRate; 68 | } 69 | 70 | /** 71 | * Sets the audio stream sampling rate. 72 | * 73 | * @param samplingRate 74 | * The audio stream sampling rate. 75 | */ 76 | public void setSamplingRate(int samplingRate) { 77 | this.samplingRate = samplingRate; 78 | } 79 | 80 | /** 81 | * Returns the audio stream channels number (1=mono, 2=stereo). If less than 82 | * 0, this information is not available. 83 | * 84 | * @return the channels The audio stream channels number (1=mono, 2=stereo). 85 | */ 86 | public int getChannels() { 87 | return channels; 88 | } 89 | 90 | /** 91 | * Sets the audio stream channels number (1=mono, 2=stereo). 92 | * 93 | * @param channels 94 | * The audio stream channels number (1=mono, 2=stereo). 95 | */ 96 | public void setChannels(int channels) { 97 | this.channels = channels; 98 | } 99 | 100 | /** 101 | * Returns the audio stream (average) bit rate. If less than 0, this 102 | * information is not available. 103 | * 104 | * @return The audio stream (average) bit rate. 105 | */ 106 | public String getAudioBitrate() { 107 | return audioBitrate; 108 | } 109 | 110 | /** 111 | * Sets the audio stream (average) bit rate. 112 | * 113 | * @param bitRate 114 | * The audio stream (average) bit rate. 115 | */ 116 | public void setAudioBitrate(String audioBitrate) { 117 | this.audioBitrate = audioBitrate; 118 | } 119 | 120 | @Override 121 | public int hashCode() { 122 | final int prime = 31; 123 | int result = 1; 124 | result = prime * result + ((audioBitrate == null) ? 0 : audioBitrate.hashCode()); 125 | result = prime * result + channels; 126 | result = prime * result + samplingRate; 127 | return result; 128 | } 129 | 130 | @Override 131 | public boolean equals(Object obj) { 132 | if (this == obj) 133 | return true; 134 | if (obj == null) 135 | return false; 136 | if (getClass() != obj.getClass()) 137 | return false; 138 | AudioInfo other = (AudioInfo) obj; 139 | if (audioBitrate == null) { 140 | if (other.audioBitrate != null) 141 | return false; 142 | } else if (!audioBitrate.equals(other.audioBitrate)) 143 | return false; 144 | if (channels != other.channels) 145 | return false; 146 | if (samplingRate != other.samplingRate) 147 | return false; 148 | return true; 149 | } 150 | 151 | @Override 152 | public String toString() { 153 | return "AudioInfo [samplingRate=" + samplingRate + ", channels=" + channels + ", audioBitrate=" + audioBitrate + "]"; 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/java/com/appcel/core/encoder/queue/EncoderSessionAwareMessageListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.core.encoder.queue; 7 | 8 | import javax.jms.Destination; 9 | import javax.jms.JMSException; 10 | import javax.jms.Message; 11 | import javax.jms.Session; 12 | 13 | import org.apache.activemq.command.ActiveMQTextMessage; 14 | import org.apache.commons.logging.Log; 15 | import org.apache.commons.logging.LogFactory; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.jms.core.JmsTemplate; 18 | import org.springframework.jms.core.MessageCreator; 19 | import org.springframework.jms.listener.SessionAwareMessageListener; 20 | 21 | import com.alibaba.fastjson.JSONObject; 22 | import com.appcel.common.DTO.EncoderObject; 23 | import com.appcel.common.enums.EncoderFormatEnum; 24 | import com.appcel.common.enums.EncoderTypeEnum; 25 | import com.appcel.core.encoder.MediaEncoder; 26 | import com.appcel.core.encoder.manager.MultimediaManager; 27 | import com.appcel.facade.encoder.DTO.MediaRecord; 28 | 29 | /** 30 | * 31 | * @描述: 多媒体文件转换消息队列监听器 . 32 | * @作者: LiRongSheng 33 | * @创建时间: 2015-3-17,下午11:21:23 . 34 | * @版本号: V1.0 . 35 | */ 36 | //@Component("encoderSessionAwareMessageListener") 37 | public class EncoderSessionAwareMessageListener implements SessionAwareMessageListener { 38 | 39 | private static final Log LOG = LogFactory.getLog(EncoderSessionAwareMessageListener.class); 40 | 41 | @Autowired 42 | private JmsTemplate encoderJmsTemplate; 43 | @Autowired 44 | private Destination sessionAwareQueue; 45 | @Autowired 46 | private MediaEncoder mediaEncoder; 47 | 48 | @Autowired 49 | MultimediaManager multimediaManager; 50 | 51 | // @Autowired 52 | // MediaEncoderService mediaEncoderService; 53 | 54 | public synchronized void onMessage(Message message, Session session) { 55 | try { 56 | ActiveMQTextMessage msg = (ActiveMQTextMessage) message; 57 | final String ms = msg.getText(); 58 | 59 | LOG.info("==>receive message:" + ms); 60 | 61 | EncoderObject encoderObject = JSONObject.parseObject(ms, EncoderObject.class);// 转换成相应的对象 62 | if (encoderObject == null) { 63 | return; 64 | } 65 | 66 | try { 67 | String captureImagePath = null; 68 | MediaRecord mediaRecord = null; 69 | EncoderTypeEnum encoderType = encoderObject.getEncoderType(); 70 | 71 | if (EncoderTypeEnum.VIDEO.equals(encoderType)) { 72 | // 处理视频转换截图 73 | EncoderObject encoderImageObject = encoderObject.clone(); 74 | encoderImageObject.setEncoderType(EncoderTypeEnum.IMAGE); 75 | encoderImageObject.setEncoderFormat(EncoderFormatEnum.IMAGE_FORMAT_PNG); 76 | 77 | mediaRecord = mediaEncoder.encode(encoderImageObject); 78 | captureImagePath = mediaRecord.getEntityFile(); 79 | 80 | LOG.info("视频转换截图文件 ==== >> " + captureImagePath); 81 | 82 | // // 处理视频转换 83 | // encoderObject.setEncoderType(EncoderTypeEnum.VIDEO); 84 | // encoderObject.setEncoderFormat(EncoderFormatEnum.VIDEO_FORMAT_MP4); 85 | // mediaRecord = mediaEncoder.encode(encoderObject); 86 | // 87 | // Multimedia multimedia = multimediaManager.createMultimedia(mediaRecord.getEntityFile(), 88 | // mediaRecord.getEntityFile(), mediaRecord.getType(), mediaRecord.getTimelen(), 89 | // mediaRecord.getStartTime(), mediaRecord.getAudioBitrate(), mediaRecord.getAudioBitrate(), 90 | // mediaRecord.getAudioBitrate(), mediaRecord.getFps(), mediaRecord.getFps(), 91 | // mediaRecord.getVedioformat(), captureImagePath, mediaRecord.getWidth(), 92 | // mediaRecord.getHeight()); 93 | // 94 | // LOG.info("视频转换多媒体信息数据 ==== >> " + multimedia); 95 | } else { 96 | throw new UnsupportedOperationException("不支持的媒体转换格式" + EncoderTypeEnum.toList()); 97 | } 98 | 99 | LOG.info("active mq consumer message : " + mediaRecord); 100 | 101 | } catch (Exception e) { 102 | //发送异常,重新放回队列 103 | encoderJmsTemplate.send(sessionAwareQueue, new MessageCreator() { 104 | public Message createMessage(Session session) throws JMSException { 105 | return session.createTextMessage(ms); 106 | } 107 | }); 108 | LOG.error("==>Encoder handle Exception:", e); 109 | } 110 | } catch (Exception e) { 111 | LOG.error("Activemq message handle Exception ==>", e); 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /appcel-service-encoder/target/classes/spring/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /appcel-facade-encoder/src/main/java/com/appcel/facade/encoder/DTO/VideoAttributes.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006, Pointdew Inc. All rights reserved. 3 | * 4 | * http://www.pointdew.com 5 | */ 6 | package com.appcel.facade.encoder.DTO; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * Defiend class file the VideoAttributes.java 13 | * 14 | * Attributes controlling the video encoding process. 15 | * 16 | * @author Rock.Lee 17 | * @version appcel 1.0.0 18 | * @since JDK-1.7.0 19 | * @date 2014-12-2 20 | */ 21 | public class VideoAttributes implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * This value can be setted in the codec field to perform a direct stream 27 | * copy, without re-encoding of the audio stream. 28 | */ 29 | public static final String DIRECT_STREAM_COPY = "copy"; 30 | 31 | /** 32 | * The codec name for the encoding process. If null or not specified the 33 | * encoder will perform a direct stream copy. 34 | */ 35 | private String codec = null; 36 | 37 | /** 38 | * The the forced tag/fourcc value for the video stream. 39 | */ 40 | private String tag = null; 41 | 42 | /** 43 | * The bitrate value for the encoding process. If null or not specified a 44 | * default value will be picked. 45 | */ 46 | private Integer bitRate = null; 47 | 48 | /** 49 | * The frame rate value for the encoding process. If null or not specified a 50 | * default value will be picked. 51 | */ 52 | private Integer frameRate = null; 53 | 54 | /** 55 | * The video size for the encoding process. If null or not specified the 56 | * source video size will not be modified. 57 | */ 58 | private VideoSizeDTO size = null; 59 | 60 | /** 61 | * Returns the codec name for the encoding process. 62 | * 63 | * @return The codec name for the encoding process. 64 | */ 65 | public String getCodec() { 66 | return codec; 67 | } 68 | 69 | /** 70 | * Sets the codec name for the encoding process. If null or not specified 71 | * the encoder will perform a direct stream copy. 72 | * 73 | * Be sure the supplied codec name is in the list returned by 74 | * {@link Encoder#getVideoEncoders()}. 75 | * 76 | * A special value can be picked from 77 | * {@link VideoAttributes#DIRECT_STREAM_COPY}. 78 | * 79 | * @param codec 80 | * The codec name for the encoding process. 81 | */ 82 | public void setCodec(String codec) { 83 | this.codec = codec; 84 | } 85 | 86 | /** 87 | * Returns the the forced tag/fourcc value for the video stream. 88 | * 89 | * @return The the forced tag/fourcc value for the video stream. 90 | */ 91 | public String getTag() { 92 | return tag; 93 | } 94 | 95 | /** 96 | * Sets the forced tag/fourcc value for the video stream. 97 | * 98 | * @param tag 99 | * The the forced tag/fourcc value for the video stream. 100 | */ 101 | public void setTag(String tag) { 102 | this.tag = tag; 103 | } 104 | 105 | /** 106 | * Returns the bitrate value for the encoding process. 107 | * 108 | * @return The bitrate value for the encoding process. 109 | */ 110 | public Integer getBitRate() { 111 | return bitRate; 112 | } 113 | 114 | /** 115 | * Sets the bitrate value for the encoding process. If null or not specified 116 | * a default value will be picked. 117 | * 118 | * @param bitRate 119 | * The bitrate value for the encoding process. 120 | */ 121 | public void setBitRate(Integer bitRate) { 122 | this.bitRate = bitRate; 123 | } 124 | 125 | /** 126 | * Returns the frame rate value for the encoding process. 127 | * 128 | * @return The frame rate value for the encoding process. 129 | */ 130 | public Integer getFrameRate() { 131 | return frameRate; 132 | } 133 | 134 | /** 135 | * Sets the frame rate value for the encoding process. If null or not 136 | * specified a default value will be picked. 137 | * 138 | * @param frameRate 139 | * The frame rate value for the encoding process. 140 | */ 141 | public void setFrameRate(Integer frameRate) { 142 | this.frameRate = frameRate; 143 | } 144 | 145 | /** 146 | * Returns the video size for the encoding process. 147 | * 148 | * @return The video size for the encoding process. 149 | */ 150 | public VideoSizeDTO getSize() { 151 | return size; 152 | } 153 | 154 | /** 155 | * Sets the video size for the encoding process. If null or not specified 156 | * the source video size will not be modified. 157 | * 158 | * @param size 159 | * he video size for the encoding process. 160 | */ 161 | public void setSize(VideoSizeDTO size) { 162 | this.size = size; 163 | } 164 | 165 | public String toString() { 166 | return getClass().getName() + "(codec=" + codec + ", bitRate=" + bitRate + ", frameRate=" + frameRate 167 | + ", size=" + size + ")"; 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /appcel-service-encoder/src/main/resources/spring/spring-scheduler-job.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 105 | --------------------------------------------------------------------------------