forked from CyanogenMod/android_frameworks_av
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'android-5.1.0_r1' into HEAD
Android 5.1.0 release 1 Conflicts: include/media/stagefright/ACodec.h include/media/stagefright/foundation/AWakeLock.h media/libmedia/AudioTrack.cpp media/libmediaplayerservice/MediaPlayerFactory.cpp media/libmediaplayerservice/nuplayer/GenericSource.cpp media/libmediaplayerservice/nuplayer/GenericSource.h media/libmediaplayerservice/nuplayer/NuPlayer.cpp media/libmediaplayerservice/nuplayer/NuPlayer.h media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h media/libstagefright/ACodec.cpp media/libstagefright/CameraSource.cpp media/libstagefright/MediaCodec.cpp media/libstagefright/MediaCodecSource.cpp media/libstagefright/foundation/AWakeLock.cpp media/libstagefright/foundation/Android.mk media/libstagefright/httplive/PlaylistFetcher.h media/libstagefright/omx/OMXNodeInstance.cpp services/audioflinger/AudioFlinger.cpp services/audioflinger/Threads.cpp services/audiopolicy/AudioPolicyManager.cpp services/audiopolicy/AudioPolicyManager.h Change-Id: Ibf7f492d2e7d62f7a6dd49ce075cf275540fdbb3
- Loading branch information
Showing
493 changed files
with
13,675 additions
and
5,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright (C) 2014 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
#ifndef ANDROID_AUDIO_POLICY_H | ||
#define ANDROID_AUDIO_POLICY_H | ||
|
||
#include <system/audio.h> | ||
#include <system/audio_policy.h> | ||
#include <binder/Parcel.h> | ||
#include <utils/String8.h> | ||
#include <utils/Vector.h> | ||
|
||
namespace android { | ||
|
||
// Keep in sync with AudioMix.java, AudioMixingRule.java, AudioPolicyConfig.java | ||
#define RULE_EXCLUSION_MASK 0x8000 | ||
#define RULE_MATCH_ATTRIBUTE_USAGE 0x1 | ||
#define RULE_MATCH_ATTRIBUTE_CAPTURE_PRESET (0x1 << 1) | ||
#define RULE_EXCLUDE_ATTRIBUTE_USAGE (RULE_EXCLUSION_MASK|RULE_MATCH_ATTRIBUTE_USAGE) | ||
#define RULE_EXCLUDE_ATTRIBUTE_CAPTURE_PRESET \ | ||
(RULE_EXCLUSION_MASK|RULE_MATCH_ATTRIBUTE_CAPTURE_PRESET) | ||
|
||
#define MIX_TYPE_INVALID -1 | ||
#define MIX_TYPE_PLAYERS 0 | ||
#define MIX_TYPE_RECORDERS 1 | ||
|
||
#define ROUTE_FLAG_RENDER 0x1 | ||
#define ROUTE_FLAG_LOOP_BACK (0x1 << 1) | ||
|
||
#define MAX_MIXES_PER_POLICY 10 | ||
#define MAX_CRITERIA_PER_MIX 20 | ||
|
||
class AttributeMatchCriterion { | ||
public: | ||
AttributeMatchCriterion() {} | ||
AttributeMatchCriterion(audio_usage_t usage, audio_source_t source, uint32_t rule); | ||
|
||
status_t readFromParcel(Parcel *parcel); | ||
status_t writeToParcel(Parcel *parcel) const; | ||
|
||
union { | ||
audio_usage_t mUsage; | ||
audio_source_t mSource; | ||
} mAttr; | ||
uint32_t mRule; | ||
}; | ||
|
||
class AudioMix { | ||
public: | ||
AudioMix() {} | ||
AudioMix(Vector<AttributeMatchCriterion> criteria, uint32_t mixType, audio_config_t format, | ||
uint32_t routeFlags, String8 registrationId) : | ||
mCriteria(criteria), mMixType(mixType), mFormat(format), | ||
mRouteFlags(routeFlags), mRegistrationId(registrationId) {} | ||
|
||
status_t readFromParcel(Parcel *parcel); | ||
status_t writeToParcel(Parcel *parcel) const; | ||
|
||
Vector<AttributeMatchCriterion> mCriteria; | ||
uint32_t mMixType; | ||
audio_config_t mFormat; | ||
uint32_t mRouteFlags; | ||
String8 mRegistrationId; | ||
}; | ||
|
||
}; // namespace android | ||
|
||
#endif // ANDROID_AUDIO_POLICY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.