mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update login
This commit is contained in:
parent
3c9e6e0374
commit
08122a5e93
36 changed files with 2845 additions and 2228 deletions
|
@ -8,6 +8,10 @@ class DummyRemuxer {
|
|||
this.observer = observer;
|
||||
}
|
||||
|
||||
get passthrough() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return this.PES_TIMESCALE;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ class MP4Remuxer {
|
|||
this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;
|
||||
}
|
||||
|
||||
get passthrough() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return this.MP4_TIMESCALE;
|
||||
}
|
||||
|
@ -61,62 +65,55 @@ class MP4Remuxer {
|
|||
var observer = this.observer,
|
||||
audioSamples = audioTrack.samples,
|
||||
videoSamples = videoTrack.samples,
|
||||
nbAudio = audioSamples.length,
|
||||
nbVideo = videoSamples.length,
|
||||
pesTimeScale = this.PES_TIMESCALE;
|
||||
pesTimeScale = this.PES_TIMESCALE,
|
||||
tracks = {},
|
||||
data = { tracks : tracks, unique : false },
|
||||
computePTSDTS = (this._initPTS === undefined),
|
||||
initPTS, initDTS;
|
||||
|
||||
if(nbAudio === 0 && nbVideo === 0) {
|
||||
if (computePTSDTS) {
|
||||
initPTS = initDTS = Infinity;
|
||||
}
|
||||
|
||||
if (audioTrack.config && audioSamples.length) {
|
||||
tracks.audio = {
|
||||
container : 'audio/mp4',
|
||||
codec : audioTrack.codec,
|
||||
initSegment : MP4.initSegment([audioTrack]),
|
||||
metadata : {
|
||||
channelCount : audioTrack.channelCount
|
||||
}
|
||||
};
|
||||
if (computePTSDTS) {
|
||||
// remember first PTS of this demuxing context. for audio, PTS + DTS ...
|
||||
initPTS = initDTS = audioSamples[0].pts - pesTimeScale * timeOffset;
|
||||
}
|
||||
}
|
||||
|
||||
if (videoTrack.sps && videoTrack.pps && videoSamples.length) {
|
||||
tracks.video = {
|
||||
container : 'video/mp4',
|
||||
codec : videoTrack.codec,
|
||||
initSegment : MP4.initSegment([videoTrack]),
|
||||
metadata : {
|
||||
width : videoTrack.width,
|
||||
height : videoTrack.height
|
||||
}
|
||||
};
|
||||
if (computePTSDTS) {
|
||||
initPTS = Math.min(initPTS,videoSamples[0].pts - pesTimeScale * timeOffset);
|
||||
initDTS = Math.min(initDTS,videoSamples[0].dts - pesTimeScale * timeOffset);
|
||||
}
|
||||
}
|
||||
|
||||
if(!Object.keys(tracks)) {
|
||||
observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found'});
|
||||
} else if (nbVideo === 0) {
|
||||
//audio only
|
||||
if (audioTrack.config) {
|
||||
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {
|
||||
audioMoov: MP4.initSegment([audioTrack]),
|
||||
audioCodec : audioTrack.codec,
|
||||
audioChannelCount : audioTrack.channelCount
|
||||
});
|
||||
this.ISGenerated = true;
|
||||
}
|
||||
if (this._initPTS === undefined) {
|
||||
// remember first PTS of this demuxing context
|
||||
this._initPTS = audioSamples[0].pts - pesTimeScale * timeOffset;
|
||||
this._initDTS = audioSamples[0].dts - pesTimeScale * timeOffset;
|
||||
}
|
||||
} else
|
||||
if (nbAudio === 0) {
|
||||
//video only
|
||||
if (videoTrack.sps && videoTrack.pps) {
|
||||
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {
|
||||
videoMoov: MP4.initSegment([videoTrack]),
|
||||
videoCodec: videoTrack.codec,
|
||||
videoWidth: videoTrack.width,
|
||||
videoHeight: videoTrack.height
|
||||
});
|
||||
this.ISGenerated = true;
|
||||
if (this._initPTS === undefined) {
|
||||
// remember first PTS of this demuxing context
|
||||
this._initPTS = videoSamples[0].pts - pesTimeScale * timeOffset;
|
||||
this._initDTS = videoSamples[0].dts - pesTimeScale * timeOffset;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//audio and video
|
||||
if (audioTrack.config && videoTrack.sps && videoTrack.pps) {
|
||||
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {
|
||||
audioMoov: MP4.initSegment([audioTrack]),
|
||||
audioCodec: audioTrack.codec,
|
||||
audioChannelCount: audioTrack.channelCount,
|
||||
videoMoov: MP4.initSegment([videoTrack]),
|
||||
videoCodec: videoTrack.codec,
|
||||
videoWidth: videoTrack.width,
|
||||
videoHeight: videoTrack.height
|
||||
});
|
||||
this.ISGenerated = true;
|
||||
if (this._initPTS === undefined) {
|
||||
// remember first PTS of this demuxing context
|
||||
this._initPTS = Math.min(videoSamples[0].pts, audioSamples[0].pts) - pesTimeScale * timeOffset;
|
||||
this._initDTS = Math.min(videoSamples[0].dts, audioSamples[0].dts) - pesTimeScale * timeOffset;
|
||||
}
|
||||
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT,data);
|
||||
this.ISGenerated = true;
|
||||
if (computePTSDTS) {
|
||||
this._initPTS = initPTS;
|
||||
this._initDTS = initDTS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,8 +235,8 @@ class MP4Remuxer {
|
|||
moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
|
||||
track.samples = [];
|
||||
this.observer.trigger(Event.FRAG_PARSING_DATA, {
|
||||
moof: moof,
|
||||
mdat: mdat,
|
||||
data1: moof,
|
||||
data2: mdat,
|
||||
startPTS: firstPTS / pesTimeScale,
|
||||
endPTS: (ptsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,
|
||||
startDTS: firstDTS / pesTimeScale,
|
||||
|
@ -358,8 +355,8 @@ class MP4Remuxer {
|
|||
moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
|
||||
track.samples = [];
|
||||
this.observer.trigger(Event.FRAG_PARSING_DATA, {
|
||||
moof: moof,
|
||||
mdat: mdat,
|
||||
data1: moof,
|
||||
data2: mdat,
|
||||
startPTS: firstPTS / pesTimeScale,
|
||||
endPTS: this.nextAacPts / pesTimeScale,
|
||||
startDTS: firstDTS / pesTimeScale,
|
||||
|
|
75
dashboard-ui/bower_components/hls.js/src/remux/passthrough-remuxer.js
vendored
Normal file
75
dashboard-ui/bower_components/hls.js/src/remux/passthrough-remuxer.js
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* passthrough remuxer
|
||||
*/
|
||||
import Event from '../events';
|
||||
|
||||
class PassThroughRemuxer {
|
||||
constructor(observer) {
|
||||
this.observer = observer;
|
||||
this.ISGenerated = false;
|
||||
}
|
||||
|
||||
|
||||
get passthrough() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
}
|
||||
|
||||
insertDiscontinuity() {
|
||||
}
|
||||
|
||||
switchLevel() {
|
||||
this.ISGenerated = false;
|
||||
}
|
||||
|
||||
remux(audioTrack,videoTrack,id3Track,textTrack,timeOffset,rawData) {
|
||||
var observer = this.observer;
|
||||
// generate Init Segment if needed
|
||||
if (!this.ISGenerated) {
|
||||
var tracks = {},
|
||||
data = { tracks : tracks, unique : true },
|
||||
track = videoTrack,
|
||||
codec = track.codec;
|
||||
|
||||
if (codec) {
|
||||
data.tracks.video = {
|
||||
container : track.container,
|
||||
codec : codec,
|
||||
metadata : {
|
||||
width : track.width,
|
||||
height : track.height
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
track = audioTrack;
|
||||
codec = track.codec;
|
||||
if (codec) {
|
||||
data.tracks.audio = {
|
||||
container : track.container,
|
||||
codec : codec,
|
||||
metadata : {
|
||||
channelCount : track.channelCount
|
||||
}
|
||||
};
|
||||
}
|
||||
this.ISGenerated = true;
|
||||
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT,data);
|
||||
}
|
||||
observer.trigger(Event.FRAG_PARSING_DATA, {
|
||||
data1: rawData,
|
||||
startPTS: timeOffset,
|
||||
startDTS: timeOffset,
|
||||
type: 'audiovideo',
|
||||
nb: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default PassThroughRemuxer;
|
Loading…
Add table
Add a link
Reference in a new issue