Bug 855595: Add Listener as well as track for unittests. Also clean up warnings r=ekr

This commit is contained in:
Randell Jesup 2013-03-28 22:28:49 -04:00
parent 0c43b0f43b
commit 53e525588d
2 changed files with 6 additions and 11 deletions

View File

@ -850,11 +850,6 @@ nsresult MediaPipelineReceiveAudio::Init() {
}
void GenericReceiveListener::AddSelf(MediaSegment* segment) {
RefPtr<TrackAddedCallback> callback = new GenericReceiveCallback(this);
AddTrackAndListener(source_, track_id_, track_rate_, this, segment, callback);
}
// Add a track and listener on the MSG thread using the MSG command queue
static void AddTrackAndListener(MediaStream* source,
TrackID track_id, TrackRate track_rate,
@ -916,10 +911,16 @@ static void AddTrackAndListener(MediaStream* source,
source->GraphImpl()->AppendMessage(new Message(source, track_id, track_rate, segment, listener, completed));
#else
source->AddListener(listener);
source->AsSourceStream()->AddTrack(track_id, track_rate, 0, segment);
#endif
}
void GenericReceiveListener::AddSelf(MediaSegment* segment) {
RefPtr<TrackAddedCallback> callback = new GenericReceiveCallback(this);
AddTrackAndListener(source_, track_id_, track_rate_, this, segment, callback);
}
MediaPipelineReceiveAudio::PipelineListener::PipelineListener(
SourceMediaStream * source, TrackID track_id,
const RefPtr<MediaSessionConduit>& conduit)

View File

@ -282,12 +282,6 @@ class GenericReceiveCallback : public TrackAddedCallback
RefPtr<GenericReceiveListener> listener_;
};
// Add a track and listener on the MSG thread using the MSG command queue
static void AddTrackAndListener(MediaStream* source,
TrackID track_id, TrackRate track_rate,
MediaStreamListener* listener, MediaSegment* segment,
const RefPtr<TrackAddedCallback>& completed);
class ConduitDeleteEvent: public nsRunnable
{
public: