зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1420162 - Remove USE_GRAPH_RATE because it's the default now, and we don't support anything else. r=jib
--HG-- extra : rebase_source : 07f87ea85fe2586236c4e5f64aa811a60e81e288
This commit is contained in:
Родитель
d6b3e5e45e
Коммит
652fe3c729
|
@ -53,11 +53,6 @@ public:
|
|||
static const int DEFAULT_169_VIDEO_WIDTH = 1280;
|
||||
static const int DEFAULT_169_VIDEO_HEIGHT = 720;
|
||||
|
||||
// This allows using whatever rate the graph is using for the
|
||||
// MediaStreamTrack. This is useful for microphone data, we know it's already
|
||||
// at the correct rate for insertion in the MSG.
|
||||
static const int USE_GRAPH_RATE = -1;
|
||||
|
||||
/* Populate an array of video sources in the nsTArray. Also include devices
|
||||
* that are currently unavailable. */
|
||||
virtual void EnumerateVideoDevices(dom::MediaSourceEnum,
|
||||
|
|
|
@ -70,7 +70,6 @@ MediaEngineWebRTCMicrophoneSource::MediaEngineWebRTCMicrophoneSource(
|
|||
, mExtendedFilter(aExtendedFilter)
|
||||
, mTrackID(TRACK_NONE)
|
||||
, mStarted(false)
|
||||
, mSampleFrequency(MediaEngine::USE_GRAPH_RATE)
|
||||
, mTotalFrames(0)
|
||||
, mLastLogFrames(0)
|
||||
, mSkipProcessing(false)
|
||||
|
@ -481,9 +480,7 @@ MediaEngineWebRTCMicrophoneSource::Start(SourceMediaStream *aStream,
|
|||
}
|
||||
|
||||
AudioSegment* segment = new AudioSegment();
|
||||
if (mSampleFrequency == MediaEngine::USE_GRAPH_RATE) {
|
||||
mSampleFrequency = aStream->GraphRate();
|
||||
}
|
||||
|
||||
aStream->AddAudioTrack(aID, aStream->GraphRate(), 0, segment, SourceMediaStream::ADDTRACK_QUEUED);
|
||||
|
||||
// XXX Make this based on the pref.
|
||||
|
@ -773,7 +770,7 @@ MediaEngineWebRTCMicrophoneSource::InsertInGraph(const T* aBuffer,
|
|||
|
||||
if (MOZ_LOG_TEST(AudioLogModule(), LogLevel::Debug)) {
|
||||
mTotalFrames += aFrames;
|
||||
if (mTotalFrames > mLastLogFrames + mSampleFrequency) { // ~ 1 second
|
||||
if (mTotalFrames > mLastLogFrames + mSources[0]->GraphRate()) { // ~ 1 second
|
||||
MOZ_LOG(AudioLogModule(), LogLevel::Debug,
|
||||
("%p: Inserting %zu samples into graph, total frames = %" PRIu64,
|
||||
(void*)this, aFrames, mTotalFrames));
|
||||
|
@ -894,9 +891,6 @@ MediaEngineWebRTCMicrophoneSource::FreeChannel()
|
|||
bool
|
||||
MediaEngineWebRTCMicrophoneSource::AllocChannel()
|
||||
{
|
||||
mSampleFrequency = MediaEngine::USE_GRAPH_RATE;
|
||||
LOG(("%s: sampling rate %u", __FUNCTION__, mSampleFrequency));
|
||||
|
||||
mState = kAllocated;
|
||||
sChannelsOpen++;
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче