Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
machine -> reader -> demuxer -> resource, etc.
And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)
More will be added later on, from just converting MOZ_LOGs, and as needed.
MozReview-Commit-ID: KgNhHSz35t0
--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
For the project to export Gecko's media stack and import it into Servo,
I need a way to shutdown an abstract MediaResource. So I'd like to move
BaseMediaResource::Close() up into MediaResource class.
MozReview-Commit-ID: 9JmxJPs02PN
--HG--
extra : rebase_source : e61cc1a3a79b3e4ca7e9fa86a602e6e26044e247
For the project to export Gecko's media stack and import it into Servo,
I need a way to shutdown an abstract MediaResource. So I'd like to move
BaseMediaResource::Close() up into MediaResource class.
MozReview-Commit-ID: 9JmxJPs02PN
--HG--
extra : rebase_source : 77128d1f78bea516dda92cdae6975d010a4b303c
This moves the include into the file where it's used, and means I don't need
to import it into gecko-media crate yet.
MozReview-Commit-ID: JnEgtwnLxgO
--HG--
extra : rebase_source : 84f9b98e3c64dc1a337a12b714fd4c8bc45429a1
extra : source : 396e995935c6ada2a069c56cd1ede3c9ef418f31
This means we can simplify MediaResource.h to only include the abstract
interface, and MediaResourceIndex.
I also had to add a few includes here and there to fix the non-unified build.
MozReview-Commit-ID: 4R7LTXq25dm
--HG--
rename : dom/media/MediaResource.h => dom/media/BaseMediaResource.h
extra : rebase_source : edef4a65df4dcb92f8536052d170d78f95315753
It's only used in MediaCache.cpp, so it may as well be defined there.
MozReview-Commit-ID: HcA499xFOUg
--HG--
extra : rebase_source : f25c30d6e9be10549af80d5dfa963ef66abac576
It's only used in ChannelMediaResource.cpp, so it may as well be in there.
MozReview-Commit-ID: 5lyeFOoUsUN
--HG--
extra : rebase_source : 15aa06371c90e379e31383d2a8527d865944a4c3
It currently resides in MediaResource.h, but it's only used in a
ChannelMediaDecoder and ChannelMediaResource, so it doesn't need to be in the
abstract header.
MozReview-Commit-ID: GskE5mjMav1
--HG--
extra : rebase_source : b42321ddcb1966d4de7203f04852c14f6d271acd
So we don't have to look at GetOffset(). We want to reduce the use of
MediaCacheStream::mChannelOffset so it is easier to fix data races about it.
MozReview-Commit-ID: 3GAbKYA9xi4
--HG--
extra : rebase_source : bfaceb190da30e3276085fb7930468ad51e3a98f
So we know what to pass to SetupChannelHeaders()
when the channel is redirected.
MozReview-Commit-ID: DbCPGA3qIyn
--HG--
extra : rebase_source : 4b8a5b620344fa261b243c0935ce49ebb7a9b4aa
extra : source : dfe1a9fe59a623f4d1972f3184a5861cfef62ffd
We have MediaCacheStream::mChannelOffset to keep the download positon.
We don't need 2 variables for the same purpose.
MozReview-Commit-ID: IpnEJWuA9A9
--HG--
extra : rebase_source : 8e720d878c12555d0a5528167c183ddb881b249e
extra : source : 623cf4cc3ab5ad0d9d263bac05a58699b3577277
mIgnoreClose is always set in conjunction with a call to CloseChannel().
Since mListener->Revoke() will prevent future OnStopRequest() calls from coming,
it is unnecessary to set mIgnoreClose and therefore we can remove this member.
MozReview-Commit-ID: HEXIhIUG8WN
--HG--
extra : rebase_source : 656c1bb67fcddcca4c2c17b0bb783ad325ab52ec
extra : source : b852f796c1ba6a8bc442013b7b6058a24a33634b
The only caller is CacheClientSeek() which always passes nullptr to it.
MozReview-Commit-ID: 3CTkbF6ktp2
--HG--
extra : rebase_source : f53fe82ca0fc5e2926c4d2cf1346630098a9614f
extra : intermediate-source : a4823926a983af9293c9fe9857e39527735ea226
extra : source : 88a08faec452614217bebe80fc2b00a2b08f7f38
Since MediaResourceCallback is ref-counted, we don't need nsRevocableEventPtr
to handle the case ChannelMediaResource might go away before mCallback->NotifyDataArrived()
is run. This also avoid the data race in accessing mDataReceivedEvent on different threads
when OMT data delivery is enabled.
MozReview-Commit-ID: 1Tbjxrm1ar5
--HG--
extra : rebase_source : 235bca5f578aac0e586754596eaa0e0fa6325df4
extra : source : 74edc45577859a3f4593a6957880778df732d8eb
This is required to use nsIThreadRetargetableRequest::RetargetDeliveryTo().
MozReview-Commit-ID: GFuAjovabpY
--HG--
extra : rebase_source : 4fbc7877f2548dcf0777c820ee724f41c46de688
This patch removes the ability to select which protocols you want
included in necko, a wholly untested configuration that is broken in
practice. We have no need of this kind of configurability in necko.
In addition, this removes the final vestiges of rtsp support, which was
originally removed in bug 1295885 but still had some stuff hanging
around behind some ifdefs (that were never true).
MozReview-Commit-ID: KOEaDmit2IL
--HG--
extra : rebase_source : f6c2fdb972aaba46e922cda801252dc953550b94
This is a workaround to fix bug 687972. It should be OK now to remove
it since we have fix bug 1108960 where MediaCache failed to run the
update loop to update the suspend status of the stream.
MozReview-Commit-ID: MbInehhScs
--HG--
extra : rebase_source : 94345a00af31834db8b9858cdf5a9e889044156a
extra : source : 70f626894c3a15c8077f70425a97004478caa9e1
It would be less accurate to call SetReadMode(MediaCacheStream::MODE_PLAYBACK)
in ChannelMediaDecoder::MetadataLoaded() instead of DecodeMetadataState::OnMetadataRead()
because MDSM might have started decoding by the time 'metadata loaded' event arrives
in the main thread. However this little inaccuracy should be fine since it only
affects a small amount of data concerning the eviction algorithm.
MozReview-Commit-ID: JoQMGr5Fvge
--HG--
extra : rebase_source : 3663a028522cc8b973964f62e59d7568a5eba10a
extra : source : 359b4454633432d3334a106aedb267a2451afb45
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.
MozReview-Commit-ID: EAmUEv9WQk8
--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
1. we move clone related methods to BaseMediaResource which is the only cloneable sub-class of MediaResource.
2. add CanClone() to ChannelMediaDecoder to reduce the dependency on MediaResource for HTMLMediaElement.
MediaResource should be internal details to MediaDecoder.
MozReview-Commit-ID: Hl2nAiuyTO0
--HG--
extra : rebase_source : 43dd9ee33ef2ef2e9093eb6b264dc174379d61d2
extra : source : 978ded48a90f2c407c4545486243acabf492736a
Now we can store a more specific resource type in ChannelMediaDecoder.
MozReview-Commit-ID: EzXC547O7aR
--HG--
extra : rebase_source : eea1872eeeee9b5964fcc767c79b0315bf277602
extra : source : 84011bf4847bbed26e89af0b831aded93522f7ac
Also check that the offset doesn't overflow during reads.
MozReview-Commit-ID: DT5neeZuMZu
--HG--
extra : rebase_source : 1f0de82916ebf770a0ea2570161d607216232dfa
Note we remove the call to mChannel->SetContentType() from RecreateChannel().
The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.
[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500
MozReview-Commit-ID: 1n4yHEouCjC
--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c