mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1109644. Part 6: Remove aLastEndTime parameter from NotifyPull. r=jesup
--HG-- extra : rebase_source : 47c950d1b1d03a8de279f2ac361b8dcd4ab0f801
This commit is contained in:
parent
a9f4b72862
commit
11ba996bc6
@ -89,8 +89,6 @@ public:
|
||||
mStream = aStream;
|
||||
mAudioSource = aAudioSource;
|
||||
mVideoSource = aVideoSource;
|
||||
mLastEndTimeAudio = 0;
|
||||
mLastEndTimeVideo = 0;
|
||||
|
||||
mStream->AddListener(this);
|
||||
}
|
||||
@ -187,10 +185,10 @@ public:
|
||||
// Currently audio sources ignore NotifyPull, but they could
|
||||
// watch it especially for fake audio.
|
||||
if (mAudioSource) {
|
||||
mAudioSource->NotifyPull(aGraph, mStream, kAudioTrack, aDesiredTime, mLastEndTimeAudio);
|
||||
mAudioSource->NotifyPull(aGraph, mStream, kAudioTrack, aDesiredTime);
|
||||
}
|
||||
if (mVideoSource) {
|
||||
mVideoSource->NotifyPull(aGraph, mStream, kVideoTrack, aDesiredTime, mLastEndTimeVideo);
|
||||
mVideoSource->NotifyPull(aGraph, mStream, kVideoTrack, aDesiredTime);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,8 +237,6 @@ private:
|
||||
nsRefPtr<MediaEngineSource> mAudioSource; // threadsafe refcnt
|
||||
nsRefPtr<MediaEngineSource> mVideoSource; // threadsafe refcnt
|
||||
nsRefPtr<SourceMediaStream> mStream; // threadsafe refcnt
|
||||
StreamTime mLastEndTimeAudio;
|
||||
StreamTime mLastEndTimeVideo;
|
||||
bool mFinished;
|
||||
|
||||
// Accessed from MainThread and MSG thread
|
||||
|
@ -110,8 +110,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) = 0;
|
||||
StreamTime aDesiredTime) = 0;
|
||||
|
||||
/* Stop the device and release the corresponding MediaStream */
|
||||
virtual nsresult Stop(SourceMediaStream *aSource, TrackID aID) = 0;
|
||||
|
@ -244,8 +244,7 @@ void
|
||||
MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
// AddTrack takes ownership of segment
|
||||
VideoSegment segment;
|
||||
@ -264,9 +263,7 @@ MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
segment.AppendFrame(image.forget(), delta, size);
|
||||
// This can fail if either a) we haven't added the track yet, or b)
|
||||
// we've removed or finished the track.
|
||||
if (aSource->AppendToTrack(aID, &segment)) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
aSource->AppendToTrack(aID, &segment);
|
||||
// Generate null data for fake tracks.
|
||||
if (mHasFakeTracks) {
|
||||
for (int i = 0; i < kFakeVideoTrackCount; ++i) {
|
||||
|
@ -53,8 +53,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
virtual bool SatisfiesConstraintSets(
|
||||
const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets)
|
||||
{
|
||||
@ -122,8 +121,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) {}
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE {}
|
||||
|
||||
virtual bool IsFake() {
|
||||
return true;
|
||||
|
@ -70,8 +70,7 @@ void
|
||||
MediaEngineGonkVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime& aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
|
||||
|
@ -68,8 +68,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) MOZ_OVERRIDE;
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
virtual bool SatisfiesConstraintSets(
|
||||
const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets)
|
||||
{
|
||||
|
@ -192,8 +192,7 @@ MediaEngineTabVideoSource::Start(SourceMediaStream* aStream, TrackID aID)
|
||||
void
|
||||
MediaEngineTabVideoSource::NotifyPull(MediaStreamGraph*,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID, StreamTime aDesiredTime,
|
||||
StreamTime& aLastEndTime)
|
||||
TrackID aID, StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
MonitorAutoLock mon(mMonitor);
|
||||
@ -207,9 +206,7 @@ MediaEngineTabVideoSource::NotifyPull(MediaStreamGraph*,
|
||||
segment.AppendFrame(image.forget().downcast<layers::Image>(), delta, size);
|
||||
// This can fail if either a) we haven't added the track yet, or b)
|
||||
// we've removed or finished the track.
|
||||
if (aSource->AppendToTrack(aID, &(segment))) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
aSource->AppendToTrack(aID, &(segment));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList
|
||||
virtual nsresult Deallocate();
|
||||
virtual nsresult Start(mozilla::SourceMediaStream*, mozilla::TrackID);
|
||||
virtual void SetDirectListeners(bool aHasDirectListeners) {};
|
||||
virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime, mozilla::StreamTime&);
|
||||
virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime) MOZ_OVERRIDE;
|
||||
virtual nsresult Stop(mozilla::SourceMediaStream*, mozilla::TrackID);
|
||||
virtual nsresult Config(bool, uint32_t, bool, uint32_t, bool, uint32_t, int32_t);
|
||||
virtual bool IsFake();
|
||||
|
@ -97,8 +97,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
|
||||
virtual const MediaSourceType GetMediaSource() {
|
||||
return mMediaSource;
|
||||
@ -180,8 +179,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsFake() {
|
||||
return false;
|
||||
|
@ -398,16 +398,10 @@ void
|
||||
MediaEngineWebRTCAudioSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
// Ignore - we push audio data
|
||||
#ifdef DEBUG
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
LOG(("Audio: NotifyPull: aDesiredTime %ld, delta %ld",(int64_t) aDesiredTime,
|
||||
(int64_t) delta));
|
||||
aLastEndTime = aDesiredTime;
|
||||
#endif
|
||||
LOG_FRAMES(("NotifyPull, desired = %ld", (int64_t) aDesiredTime));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -124,8 +124,7 @@ void
|
||||
MediaEngineWebRTCVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
|
||||
@ -150,9 +149,7 @@ MediaEngineWebRTCVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
// Doing so means a negative delta and thus messes up handling of the graph
|
||||
if (delta > 0) {
|
||||
// nullptr images are allowed
|
||||
if (AppendToTrack(aSource, mImage, aID, delta)) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
AppendToTrack(aSource, mImage, aID, delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user