Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0752c0c9
authored
2014-09-26 15:34:24 -0700
by
Simeon Bateman
Committed by
David LaPalomento
2015-07-31 16:41:56 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
moving pes data to container object so we don't polute our new frame objects
1 parent
5b9cecd2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
src/transmuxer.js
src/transmuxer.js
View file @
0752c0c
...
...
@@ -282,12 +282,15 @@ ProgramStream = function() {
i
=
0
,
fragment
;
if
(
pes
!==
undefined
)
{
// move over data from PES into Stream frame
event
.
pts
=
pes
.
pts
;
event
.
dts
=
pes
.
dts
;
event
.
pid
=
pes
.
pid
;
event
.
dataAlignmentIndicator
=
pes
.
dataAlignmentIndicator
;
event
.
payloadUnitStartIndicator
=
pes
.
payloadUnitStartIndicator
event
.
pes
=
{};
event
.
pes
.
pts
=
pes
.
pts
;
event
.
pes
.
dts
=
pes
.
dts
;
event
.
pes
.
pid
=
pes
.
pid
;
event
.
pes
.
dataAlignmentIndicator
=
pes
.
dataAlignmentIndicator
;
event
.
pes
.
payloadUnitStartIndicator
=
pes
.
payloadUnitStartIndicator
}
// do nothing if there is no buffered data
if
(
!
stream
.
data
.
length
)
{
...
...
@@ -376,7 +379,6 @@ ProgramStream = function() {
* will flush the buffered packets.
*/
this
.
end
=
function
()
{
debugger
flushStream
(
video
,
'video'
);
flushStream
(
audio
,
'audio'
);
};
...
...
@@ -394,7 +396,6 @@ AacStream = function() {
this
.
push
=
function
(
packet
)
{
if
(
packet
.
type
==
"audio"
)
{
console
.
log
(
'AAC Stream Push!'
);
this
.
trigger
(
'data'
,
packet
);
}
};
...
...
@@ -412,7 +413,6 @@ H264Stream = function() {
this
.
push
=
function
(
packet
)
{
if
(
packet
.
type
==
"video"
)
{
console
.
log
(
'h264 Stream Push!'
);
this
.
trigger
(
'data'
,
packet
);
}
};
...
...
@@ -434,6 +434,7 @@ Transmuxer = function() {
packetStream
.
pipe
(
parseStream
);
parseStream
.
pipe
(
programStream
);
programStream
.
pipe
(
aacStream
);
programStream
.
pipe
(
h264Stream
);
// generate an init segment
this
.
initSegment
=
mp4
.
initSegment
();
...
...
@@ -441,7 +442,9 @@ Transmuxer = function() {
aacStream
.
on
(
'data'
,
function
(
data
)
{
self
.
trigger
(
'data'
,
data
);
});
h264Stream
.
on
(
'data'
,
function
(
data
)
{
self
.
trigger
(
'data'
,
data
);
});
// feed incoming data to the front of the parsing pipeline
this
.
push
=
function
(
data
)
{
packetStream
.
push
(
data
);
...
...
Please
register
or
sign in
to post a comment