Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add init commend #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"babel-preset-stage-0": "6.16.0",
"chai": "^3.5.0",
"del": "^2.2.2",
"gulp": "3.9.1",
"gulp": "^3.9.1",
"gulp-babel": "6.1.2",
"gulp-eslint": "3.0.1",
"gulp-header": "1.8.8",
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-controller-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-core-loaderbuffer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-core-track/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
44 changes: 22 additions & 22 deletions packages/mccree-core/build/media-info.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand All @@ -15,27 +15,27 @@ var MediaInfo =
* @param {Object} config - the configurations
*/
function MediaInfo(mccree, config) {
_classCallCheck(this, MediaInfo);

this.TAG = 'MccreeMediaInfo';
this.mimeType = null;
this.duration = null;

this.hasAudio = null;
this.audioCodec = null;
this.audioDataRate = null;
this.audioSampleRate = null;

this.hasVideo = null;
this.videoCodec = null;
this.videoDataRate = null;
this.height = null;
this.width = null;
this.fps = null;
this.profile = null;
this.level = null;

this.metadata = null;
_classCallCheck(this, MediaInfo);

this.TAG = 'MccreeMediaInfo';
this.mimeType = null;
this.duration = null;

this.hasAudio = null;
this.audioCodec = null;
this.audioDataRate = null;
this.audioSampleRate = null;

this.hasVideo = null;
this.videoCodec = null;
this.videoDataRate = null;
this.height = null;
this.width = null;
this.fps = null;
this.profile = null;
this.level = null;

this.metadata = null;
};

exports.default = MediaInfo;
1 change: 1 addition & 0 deletions packages/mccree-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.1.1",
"description": "",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-demuxer-flv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-helper-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-helper-golomb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-helper-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-helper-spsparser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-helper-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-loader-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-loader-moz-xhr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Collection of helper functions for mccree",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-loader-tencentp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Collection of helper functions for mccree",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-loader-xyp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.1.1",
"description": "",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/mccree-plugin-mse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/mccree-remuxer-mp4live/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var MP4Remuxer = function () {
function MP4Remuxer(config) {
_classCallCheck(this, MP4Remuxer);

this.TAG = 'MP4Remuxer';
this.TAG = 'Mccree-remuxer-mp4live:index';

this.type = 'remuxer';

Expand Down Expand Up @@ -254,7 +254,7 @@ var MP4Remuxer = function () {
// 掉帧检测 音频抽帧
if (sampleDuration > videoTrack.meta.refSampleDuration + 1) {
this.observer.trigger('FRAME_DROPPED', Math.floor(sampleDuration / videoTrack.meta.refSampleDuration));
this.logger.debug(this.TAG, this.type, '检测到视频掉帧 掉帧时间点:' + base);
this.logger.warn(this.TAG, this.type, 'Video jump frame to ' + base);
}

this.mccree.media.videoDuration += sampleDuration;
Expand Down Expand Up @@ -308,7 +308,7 @@ var MP4Remuxer = function () {
mp4Samples = [];
// 如果音视频总时长差出一个音频片段长度,则该音频片段废弃。
while (audioSamples[0] && audioSamples[0].timestamp + sampleDuration < baseDts) {
this.logger.warn(this.TAG, this.type, '检测到音频掉帧/正在进行追帧,追帧时间点:' + audioSamples[0].timestamp);
this.logger.warn(this.TAG, 'Audio chase frame to ' + audioSamples[0].timestamp);
audioSamples.shift();
}

Expand Down Expand Up @@ -351,7 +351,7 @@ var MP4Remuxer = function () {
}

while (this.mccree.media.videoDuration - this.mccree.media.audioDuration > audioTrack.meta.refSampleDuration + 1) {
this.logger.debug(this.TAG, this.type, '检测到音频掉帧,正在进行补偿 基准时间点:' + base + ' 补偿时间点:' + next);
this.logger.debug(this.TAG, 'Audio fill the frame of ' + base + ' 补偿时间点:' + next);
base = next;
next = base + audioSample.sampleDuration;
var _mp4Sample = {
Expand Down
4 changes: 3 additions & 1 deletion packages/mccree-remuxer-mp4live/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "",
"main": "build/index.js",
"scripts": {
"test": "./scripts/test.sh"
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build"
},
"license": {
"type": "Apache-2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/panda-mccree-live/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "flvdemuxer",
"main": "build/index.js",
"scripts": {
"init": "npm install",
"test": "./scripts/test.sh",
"build": "gulp build",
"webpack": "gulp webpack"
Expand Down