mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Remove MOZ_B2G leftovers and some dead B2G-only components.
This commit is contained in:
parent
75d98fd33e
commit
719ac1bc38
91 changed files with 28 additions and 5017 deletions
|
|
@ -333,11 +333,7 @@ AudioStream::Init(uint32_t aNumChannels, uint32_t aRate,
|
|||
params.rate = aRate;
|
||||
params.channels = mOutChannels;
|
||||
#if defined(__ANDROID__)
|
||||
#if defined(MOZ_B2G)
|
||||
params.stream_type = CubebUtils::ConvertChannelToCubebType(aAudioChannel);
|
||||
#else
|
||||
params.stream_type = CUBEB_STREAM_TYPE_MUSIC;
|
||||
#endif
|
||||
|
||||
if (params.stream_type == CUBEB_STREAM_TYPE_MAX) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
|
|
|||
|
|
@ -342,33 +342,6 @@ uint32_t MaxNumberOfChannels()
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__ANDROID__) && defined(MOZ_B2G)
|
||||
cubeb_stream_type ConvertChannelToCubebType(dom::AudioChannel aChannel)
|
||||
{
|
||||
switch(aChannel) {
|
||||
case dom::AudioChannel::Normal:
|
||||
/* FALLTHROUGH */
|
||||
case dom::AudioChannel::Content:
|
||||
return CUBEB_STREAM_TYPE_MUSIC;
|
||||
case dom::AudioChannel::Notification:
|
||||
return CUBEB_STREAM_TYPE_NOTIFICATION;
|
||||
case dom::AudioChannel::Alarm:
|
||||
return CUBEB_STREAM_TYPE_ALARM;
|
||||
case dom::AudioChannel::Telephony:
|
||||
return CUBEB_STREAM_TYPE_VOICE_CALL;
|
||||
case dom::AudioChannel::Ringer:
|
||||
return CUBEB_STREAM_TYPE_RING;
|
||||
case dom::AudioChannel::System:
|
||||
return CUBEB_STREAM_TYPE_SYSTEM;
|
||||
case dom::AudioChannel::Publicnotification:
|
||||
return CUBEB_STREAM_TYPE_SYSTEM_ENFORCED;
|
||||
default:
|
||||
NS_ERROR("The value of AudioChannel is invalid");
|
||||
return CUBEB_STREAM_TYPE_MAX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GetCurrentBackend(nsAString& aBackend)
|
||||
{
|
||||
cubeb* cubebContext = GetCubebContext();
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ void ReportCubebBackendUsed();
|
|||
uint32_t GetCubebPlaybackLatencyInMilliseconds();
|
||||
Maybe<uint32_t> GetCubebMSGLatencyInFrames();
|
||||
bool CubebLatencyPrefSet();
|
||||
#if defined(__ANDROID__) && defined(MOZ_B2G)
|
||||
cubeb_stream_type ConvertChannelToCubebType(dom::AudioChannel aChannel);
|
||||
#endif
|
||||
void GetCurrentBackend(nsAString& aBackend);
|
||||
|
||||
} // namespace CubebUtils
|
||||
|
|
|
|||
|
|
@ -640,11 +640,7 @@ AudioCallbackDriver::Init()
|
|||
mSampleRate = output.rate = CubebUtils::PreferredSampleRate();
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#if defined(MOZ_B2G)
|
||||
output.stream_type = CubebUtils::ConvertChannelToCubebType(mAudioChannel);
|
||||
#else
|
||||
output.stream_type = CUBEB_STREAM_TYPE_MUSIC;
|
||||
#endif
|
||||
if (output.stream_type == CUBEB_STREAM_TYPE_MAX) {
|
||||
NS_WARNING("Bad stream type");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -73,10 +73,6 @@
|
|||
#include "browser_logging/WebRtcLog.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
#include "MediaPermissionGonk.h"
|
||||
#endif
|
||||
|
||||
#if defined (XP_WIN)
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include <winsock2.h>
|
||||
|
|
@ -1819,10 +1815,6 @@ MediaManager::Get() {
|
|||
__LINE__,
|
||||
NS_LITERAL_STRING("Media shutdown"));
|
||||
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
|
||||
#ifdef MOZ_B2G
|
||||
// Init MediaPermissionManager before sending out any permission requests.
|
||||
(void) MediaPermissionManager::GetInstance();
|
||||
#endif //MOZ_B2G
|
||||
}
|
||||
return sSingleton;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -791,7 +791,6 @@ RTCPeerConnection.prototype = {
|
|||
return this._havePermission;
|
||||
}
|
||||
if (this._isChrome ||
|
||||
AppConstants.MOZ_B2G ||
|
||||
Services.prefs.getBoolPref("media.navigator.permission.disabled")) {
|
||||
return this._havePermission = Promise.resolve();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,11 +54,8 @@ public:
|
|||
static const int DEFAULT_169_VIDEO_WIDTH = 1280;
|
||||
static const int DEFAULT_169_VIDEO_HEIGHT = 720;
|
||||
|
||||
#ifndef MOZ_B2G
|
||||
static const int DEFAULT_SAMPLE_RATE = 32000;
|
||||
#else
|
||||
static const int DEFAULT_SAMPLE_RATE = 16000;
|
||||
#endif
|
||||
|
||||
// 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.
|
||||
|
|
|
|||
|
|
@ -741,9 +741,6 @@ MediaEngineWebRTCMicrophoneSource::AllocChannel()
|
|||
|
||||
// Check for availability.
|
||||
if (!mAudioInput->SetRecordingDevice(mCapIndex)) {
|
||||
#ifndef MOZ_B2G
|
||||
// Because of the permission mechanism of B2G, we need to skip the status
|
||||
// check here.
|
||||
bool avail = false;
|
||||
mAudioInput->GetRecordingDeviceStatus(avail);
|
||||
if (!avail) {
|
||||
|
|
@ -752,7 +749,6 @@ MediaEngineWebRTCMicrophoneSource::AllocChannel()
|
|||
}
|
||||
return false;
|
||||
}
|
||||
#endif // MOZ_B2G
|
||||
|
||||
// Set "codec" to PCM, 32kHz on 1 channel
|
||||
ScopedCustomReleasePtr<webrtc::VoECodec> ptrVoECodec(webrtc::VoECodec::GetInterface(mVoiceEngine));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue