Commit Graph

289 Commits

Author SHA1 Message Date
ctai
03882d4cec Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3

--HG--
extra : transplant_source : %21M%C5%07%B9%CB%16%96%D6gN%C0g%0A%E8%7D%A0%AB%98%26
2016-05-31 18:05:11 +08:00
ctai
2c69985ffe Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %3D%AA%00%CE%A3SV5%8F%84%96%AC%E2%D9%10%EC%85%07N%DF
2016-07-25 10:01:26 +08:00
ctai
27d3bbf12d Bug 1201363 - Register MediaStreamVideoSink into SourceMediaStream. r=jesup
MozReview-Commit-ID: 7X546VXVLJT

--HG--
extra : transplant_source : %98%26%05s%9B%96%05%D3%1Aq%7E87%F4%A5%A2%DE%C0Sw
2016-05-30 11:32:23 +08:00
ctai
0444986d79 Bug 1201363 - Let MediaStreamVideoSink bind with particular video track. r=jesup
MozReview-Commit-ID: FcjnmDKuRQI

--HG--
extra : transplant_source : %C3%D3%08%E5%C7%CA%9E%7C%F9L%C0w%C2o%11%16%877%04%21
2016-05-27 14:33:50 +08:00
ctai
b7fcb47572 Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %008z%D8W%EE%87%8E%E9/%2CT%26%EBvo%AE%099%A6
2016-05-27 14:33:48 +08:00
Sebastian Hengst
120f502e2a Backed out changeset 3851902daa94 (bug 1201363) 2016-08-03 19:33:25 +02:00
Sebastian Hengst
70a5dca1bd Backed out changeset 263cc3ad83c2 (bug 1201363) 2016-08-03 19:33:25 +02:00
Sebastian Hengst
1fe0a1cfb8 Backed out changeset 91e5ccbeef19 (bug 1201363) 2016-08-03 19:33:25 +02:00
Sebastian Hengst
f4671c3b11 Backed out changeset 4111e388bd90 (bug 1201363) 2016-08-03 19:33:25 +02:00
Sebastian Hengst
0c81148980 Backed out changeset ecee67ed1ddf (bug 1201363) 2016-08-03 19:33:24 +02:00
ctai
ab7a790f3b Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3

--HG--
extra : amend_source : 2c57e72a84dee45f673d7d02eaa8c973ca9f634a
2016-05-31 18:05:11 +08:00
ctai
a3cc6128d3 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : amend_source : 7b9c51dcb4046c6c807d1cf1e48bef301e45fa8e
2016-07-25 10:01:26 +08:00
ctai
9677265f4f Bug 1201363 - Register MediaStreamVideoSink into SourceMediaStream. r=jesup
MozReview-Commit-ID: 7X546VXVLJT

--HG--
extra : amend_source : c38f204c23ca5f8b2446b4ceceb16a8c9d94a7f3
2016-05-30 11:32:23 +08:00
ctai
7a07911d5f Bug 1201363 - Let MediaStreamVideoSink bind with particular video track. r=jesup
MozReview-Commit-ID: FcjnmDKuRQI

--HG--
extra : amend_source : 5591de347c10931f4188fa550c96a253d0c0b5f3
2016-05-27 14:33:50 +08:00
ctai
e28782c9ba Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : amend_source : 7eb1e87fdcbc61f2f9831fa3a6d803cc50306604
2016-05-27 14:33:48 +08:00
Carsten "Tomcat" Book
7e324b6cdb Backed out changeset b018ce9d1484 (bug 1201363) 2016-08-02 12:53:59 +02:00
Carsten "Tomcat" Book
72c34b88b3 Backed out changeset 488e4a5e859b (bug 1201363) 2016-08-02 12:53:57 +02:00
Carsten "Tomcat" Book
44057dc31a Backed out changeset cc59ebb35b26 (bug 1201363) 2016-08-02 12:53:56 +02:00
Carsten "Tomcat" Book
27cb7f4d79 Backed out changeset 06c0a7eb7bc6 (bug 1201363) 2016-08-02 12:53:53 +02:00
Carsten "Tomcat" Book
1cddcd1b7d Backed out changeset e350d8c25d2e (bug 1201363) 2016-08-02 12:53:46 +02:00
ctai
facfd7e206 Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3

--HG--
extra : transplant_source : %9Fk%8F%20%FE%12%FC%DF%A0%C6%02%AC%D2%3C%EE%08%26%E3%9E%27
2016-05-31 18:05:11 +08:00
ctai
edeaa48113 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %C4n%D7a%10%CFK%D5%F2%DC%10%08%C2%24%EC%11%13J%DB%5D
2016-07-25 10:01:26 +08:00
ctai
a81c3ec430 Bug 1201363 - Register MediaStreamVideoSink into SourceMediaStream. r=jesup
MozReview-Commit-ID: 7X546VXVLJT

--HG--
extra : transplant_source : z%E8%25E%07%AA%08%B1%EC%D83LQ%FE%0A%05%D0%9E%85%B6
2016-05-30 11:32:23 +08:00
ctai
150ab2d45b Bug 1201363 - Let MediaStreamVideoSink bind with particular video track. r=jesup
MozReview-Commit-ID: FcjnmDKuRQI

--HG--
extra : transplant_source : %E8%DE%0C%18%CB%FA%06%F4V%DD%28%DB%F3T%D6%BA%F9%A0%C3%C3
2016-05-27 14:33:50 +08:00
ctai
0948ae3f3a Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %9D%86%93%A6%DF%D5%9Ep%20%DF%FD%C1%E2%BA%A3Gq%1A%7E%A3
2016-05-27 14:33:48 +08:00
Karl Tomlinson
fc0ef5c59f bug 1242268 record MSG memory sizes asynchronously r=padenot
This removes the one second timeout for MSG collection, extending the timeout
period to the 50 second timeout of nsMemoryReporterManager.

Also removed:

* The condition variable logic that can stop waiting without checking the
  condition set when memory reports are complete.

* Races with mAudioStreamSizes modification on two threads after wait timeout.

Memory from streams in offline graphs that are not yet running is now also
included.

MozReview-Commit-ID: FkI61iJFrZ5

--HG--
extra : rebase_source : 200d332165ef21497bcfa24b86b6ff029f8ac212
2016-07-04 10:40:48 +12:00
Karl Tomlinson
42c4a689dc bug 1242268 collect memory reports of AudioNode dom objects on the main thread r=padenot
This will permit allowing the main thread to run while collecting
reports from graph thread objects.

MozReview-Commit-ID: 7xChGz7xJ8M

--HG--
extra : rebase_source : a69dd197bfd3173c9a46979bac35e654d7d0771e
2016-07-01 18:46:34 +12:00
Karl Tomlinson
dc9ad2f5b2 bug 1242268 use pointers instead of copies of string literals in AudioNode memory reporting r=padenot
MozReview-Commit-ID: E85FGrmfOWI

--HG--
extra : rebase_source : 0895e91ca000164f70251ae0fbb61fcca39cbe56
2016-07-04 16:24:47 +12:00
Karl Tomlinson
b85b74eb00 bug 1242268 don't try to wake up an empty MSG that is shutting down to report memory r=padenot
MozReview-Commit-ID: IWNUjWijukk

--HG--
extra : rebase_source : d153f3c3434c3a844a950fefbd87d6f75e88db6e
2016-07-04 20:55:29 +12:00
ctai
ff32ed223d Bug 1266646 - Change HTMLMediaElement::StreamSizeListerner to inherit MediaStreamTrackDirectListener. r=pehrsons
MozReview-Commit-ID: HnNv9BnlbDy

--HG--
extra : transplant_source : i0%FA%08%16%A6/%96%13%C5%F22%5E%EC%8C%2B%C6%B1%F3_
2016-05-10 17:02:15 +08:00
ctai
fd36b32d94 Bug 1266646 - Move group of MediaStreamListener to a new header file. r=pehrsons
This can reduce the include header dependency. MediaStreamVideoSink will inherit from DirectMediaStreamTrackListener. But we can't use forward declaration on MediaStreamListener because the usage of nsTArray<RefPtr<MediaStreamVideoSink>>.

MozReview-Commit-ID: 328s4Kw9NvW

--HG--
extra : transplant_source : %D2%18%E3%3B%0C%D8%F04%F3%EB%EB%A0%A7%8B%B1%A9%AB%97rY
2016-06-30 15:07:48 +08:00
ctai
533acf2e59 Bug 1266646 - Rename MediaStreamDirectListener and MediaStreamTrackDirectListener to DirectMediaStreamListener and DirectMediaStreamTrackListener respectively. r=pehrsons
Rename those two function to better name alignment with AddDirectListener and AddDirectTrackListener.

MozReview-Commit-ID: 6QY08oyih1X

--HG--
extra : transplant_source : %5C%1C%23%AC%D7%0D%97%24%CB%ED%8E%D5%60/%5E%07%F2%85Z%DA
2016-04-29 11:45:25 +08:00
Andreas Pehrson
f40d583675 Bug 1280445 - Clear out all MediaSegments directly on forced MediaStreamGraph shutdown. r=jesup
MozReview-Commit-ID: 3nDPEAAJABw

--HG--
extra : rebase_source : 9bda288ff3dc7382671e365ada7d88c23fc6c50f
extra : source : 43ecb11eccfb4c2bce62b5dc0e3a6c1ddc19609a
2016-06-16 12:45:29 +01:00
Andreas Pehrson
e028368c0f Bug 1280445 - Remove wrapper from MediaStream. r=jesup, r=padenot
MozReview-Commit-ID: CTCFloIUXKa

--HG--
extra : rebase_source : b1c2073c638bb65c19a0f40e8d17e9a5bae15c98
extra : source : c6d854b3209e7de7d97153c0bfc492c1d5f1e6b5
2016-06-29 12:27:13 +02:00
Andreas Pehrson
be9d25eccb Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg

--HG--
extra : rebase_source : d2ca7cb24ce154c4aa342bb477aee455c9cfef92
extra : intermediate-source : 80443106b2636d8de3c3de44f2706e99d70c06ae
extra : source : 70e8c5a785a9866e6205b54bd1c45faaf834717d
2016-05-24 13:23:50 +02:00
Andreas Pehrson
141eefc951 Bug 1208373 - Introduce a new blocking mode to MediaInputPort. r=jesup
This lets us notify about a created TrackUnionStream track (and since it was
created, we can notify when it ends), even though it has been blocked from main
thread.

MozReview-Commit-ID: HyopzISBfbb

--HG--
extra : rebase_source : a18be6b0fcb194c016ae06c62eb5cebbf86eb8d5
extra : intermediate-source : 38e3e48c8dd011a0503f1241c7b21a630738c6c0
extra : source : 690904309e169aa74f95163f0d796493ef882972
2016-06-07 16:20:29 +02:00
Paul Adenot
59f0db4ad0 Bug 1281193 - Lock when touching tracks in SourceAudioStreams. r=pehrsons
MozReview-Commit-ID: 2aSS8esq5jq
2016-06-22 17:44:46 +02:00
Sebastian Hengst
6d87e39b07 Backed out 9 changesets (bug 1208373) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 95412432bf10 (bug 1208373)
Backed out changeset 38e3e48c8dd0 (bug 1208373)
Backed out changeset 72cf70065470 (bug 1208373)
Backed out changeset 8cffa26910a8 (bug 1208373)
Backed out changeset 9a8c5a9bb9d5 (bug 1208373)
Backed out changeset bc120c9071bb (bug 1208373)
Backed out changeset fb8a0b464701 (bug 1208373)
Backed out changeset 5ddb73097cfd (bug 1208373)
Backed out changeset c4827087a333 (bug 1208373)
2016-06-14 11:06:51 +02:00
Sebastian Hengst
82d615aa16 Backed out 3 changesets (bug 1274221) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 80443106b263 (bug 1274221)
Backed out changeset 795bcfd6223d (bug 1274221)
Backed out changeset 30c253e762c6 (bug 1274221)
2016-06-14 11:05:33 +02:00
Sebastian Hengst
599c66055a Backed out changeset 2c235b056514 (bug 1266646) for frequently crashing in mda's test_streams_element_capture_createObjectURL.html. r=backout 2016-06-13 21:24:54 +02:00
Sebastian Hengst
f310d4012a Backed out changeset c89b8cc657b2 (bug 1266646) 2016-06-13 21:23:53 +02:00
ctai
4b40fd1bc1 Bug 1266646 - Rename MediaStreamDirectListener and MediaStreamTrackDirectListener to DirectMediaStreamListener and DirectMediaStreamTrackListener respectively. r=jesup,pehrsons
Rename those two function to better name alignment with AddDirectListener and AddDirectTrackListener.

MozReview-Commit-ID: 6QY08oyih1X

--HG--
extra : rebase_source : e0f2ac5de75d54a870f5a99f08505e40aa0696d9
2016-04-29 11:45:25 +08:00
ctai
4ab1e6cc57 Bug 1266646 - Change HTMLMediaElement::StreamSizeListerner to inherit MediaStreamTrackDirectListener. r=jesup, r=pehrsons
MozReview-Commit-ID: HnNv9BnlbDy

--HG--
extra : rebase_source : 7d04886895910b00964c2ce36a337873195b12fa
2016-05-10 17:02:15 +08:00
Andreas Pehrson
36786eb617 Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg

--HG--
extra : rebase_source : 4f7b9c116e7d25cfc4c3894551173925613c6c14
extra : intermediate-source : 45bfebd36a99baef6bee50e52ac9c78965a7f1c2
extra : source : 70e8c5a785a9866e6205b54bd1c45faaf834717d
2016-05-24 13:23:50 +02:00
Andreas Pehrson
d551df2bcf Bug 1208373 - Introduce a new blocking mode to MediaInputPort. r=jesup
This lets us notify about a created TrackUnionStream track (and since it was
created, we can notify when it ends), even though it has been blocked from main
thread.

MozReview-Commit-ID: HyopzISBfbb

--HG--
extra : rebase_source : a3d676257473bba08190b8e2b24d027c42306621
extra : intermediate-source : 5454dcaa31ff8eb060b6f1531a376dcbc24ffb4d
extra : source : 690904309e169aa74f95163f0d796493ef882972
2016-06-07 16:20:29 +02:00
Carsten "Tomcat" Book
79d88f89e8 Backed out changeset 5454dcaa31ff (bug 1208373) 2016-06-09 15:18:42 +02:00
Carsten "Tomcat" Book
fe2de5bf49 Backed out changeset 45bfebd36a99 (bug 1274221) 2016-06-09 15:18:36 +02:00
Andreas Pehrson
e9c91bddf6 Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg

--HG--
extra : rebase_source : 6f4fe68b888b6dd0d9ee370b6a390ff17da5f1de
extra : source : 70e8c5a785a9866e6205b54bd1c45faaf834717d
2016-05-24 13:23:50 +02:00
Andreas Pehrson
5b155d5add Bug 1208373 - Introduce a new blocking mode to MediaInputPort. r=jesup
This lets us notify about a created TrackUnionStream track (and since it was
created, we can notify when it ends), even though it has been blocked from main
thread.

MozReview-Commit-ID: HyopzISBfbb

--HG--
extra : rebase_source : 55d6dd5d6a34a0b499b45e0b72f900fc37cff1bf
extra : source : 690904309e169aa74f95163f0d796493ef882972
2016-06-07 16:20:29 +02:00
Karl Tomlinson
605ca4cc77 bug 1275754 strip obsolete updates from mStreamUpdates when adding new updates r=padenot
MozReview-Commit-ID: 64tRYsgC1pC

--HG--
extra : rebase_source : 85e43345c3eabc885f87c8c0dad5d16a2c2e6f6c
2016-05-25 19:18:17 +12:00