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

Import KS H265 decoder #11

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
122 changes: 0 additions & 122 deletions packages/mccree-demuxer-flv/build/exp-golomb.js

This file was deleted.

29 changes: 18 additions & 11 deletions packages/mccree-demuxer-flv/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ var FLVDemuxer = function () {
}

/**
* If the stream has audio or video.
* @param {numeber} streamFlag - Data from the stream which is define whether the audio / video track is exist.
* @param {String} playType - Defined by the customer. Optional.
* If the stream has audio or video.
* @param {numeber} streamFlag - Data from the stream which is define whether the audio / video track is exist.
* @param {String} playType - Defined by the customer. Optional.
*/

}, {
Expand All @@ -160,8 +160,8 @@ var FLVDemuxer = function () {
return trackInfo;
}

/**
* Set the default video configurations.
/**
* Set the default video configurations.
*/

}, {
Expand All @@ -172,8 +172,8 @@ var FLVDemuxer = function () {
videoTrack.id = videoTrack.meta.id = this._tracknum;
}

/**
* Set the default video configurations.
/**
* Set the default video configurations.
*/

}, {
Expand Down Expand Up @@ -206,7 +206,7 @@ var FLVDemuxer = function () {
}
}

/**
/**
* Parse the 11 byte tag Header
*/

Expand Down Expand Up @@ -249,7 +249,7 @@ var FLVDemuxer = function () {

chunk.timestamp = timestamp;

// streamId
// streamId
this.mccree.loaderBuffer.shift(3);
return chunk;
}
Expand Down Expand Up @@ -452,16 +452,23 @@ var FLVDemuxer = function () {
if (!this._datasizeValidator(chunk.datasize)) {
this.logger.warn(this.TAG, 'TAG length error at ' + chunk.datasize);
}
this.observer.trigger('VIDEODATA_PARSED');
this.mccree.media.tracks.videoTrack.samples.push(chunk);
this.observer.trigger('VIDEODATA_PARSED');
}
} else if (codecID === 12) {
chunk.data = this.mccree.loaderBuffer.shift(chunk.datasize - 1);
if (!this._datasizeValidator(chunk.datasize)) {
this.logger.warn(this.TAG, this.type, 'TAG 长度确认有误' + chunk.datasize);
}
this.mccree.media.tracks.videoTrack.samples.push(chunk);
this.observer.trigger('HEVC_VIDEODATA_PARSED');
} else {
chunk.data = this.mccree.loaderBuffer.shift(chunk.datasize - 1);
if (!this._datasizeValidator(chunk.datasize)) {
this.logger.warn(this.TAG, this.type, 'TAG length error at ' + chunk.datasize);
}
this.observer.trigger('VIDEODATA_PARSED');
this.mccree.media.tracks.videoTrack.samples.push(chunk);
this.observer.trigger('VIDEODATA_PARSED');
}

delete chunk.tagType;
Expand Down
Loading