Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_wilhelm
Commits
a8179ea1
Commit
a8179ea1
authored
14 years ago
by
Glenn Kasten
Browse files
Options
Download
Email Patches
Plain Diff
Fix build warnings caused by the 'long' change
Change-Id: I34e74d723ae7fd829dd140614928d7880e669f03
parent
e31a69fc
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
57 additions
and
57 deletions
+57
-57
src/android/AudioPlayer_to_android.cpp
src/android/AudioPlayer_to_android.cpp
+3
-3
src/android/AudioRecorder_to_android.cpp
src/android/AudioRecorder_to_android.cpp
+4
-4
src/android/MediaPlayer_to_android.cpp
src/android/MediaPlayer_to_android.cpp
+2
-2
src/android/android_AudioToCbRenderer.cpp
src/android/android_AudioToCbRenderer.cpp
+1
-1
src/android/android_StreamPlayer.cpp
src/android/android_StreamPlayer.cpp
+2
-2
src/android/android_prompts.h
src/android/android_prompts.h
+1
-1
src/data.c
src/data.c
+20
-20
src/entry.c
src/entry.c
+2
-2
src/itf/IAndroidBufferQueue.c
src/itf/IAndroidBufferQueue.c
+2
-2
src/itf/IAndroidConfiguration.c
src/itf/IAndroidConfiguration.c
+2
-2
src/itf/IAndroidEffectCapabilities.c
src/itf/IAndroidEffectCapabilities.c
+4
-4
src/itf/IBufferQueue.c
src/itf/IBufferQueue.c
+1
-1
src/itf/IEffectSend.c
src/itf/IEffectSend.c
+1
-1
src/itf/IPlay.c
src/itf/IPlay.c
+1
-1
src/itf/IStreamInformation.c
src/itf/IStreamInformation.c
+4
-4
src/sles.c
src/sles.c
+4
-4
src/trace.c
src/trace.c
+3
-3
No files found.
src/android/AudioPlayer_to_android.cpp
View file @
a8179ea1
...
...
@@ -419,7 +419,7 @@ void audioPlayer_dispatch_prefetchStatus_lockPrefetch(CAudioPlayer *ap, SLuint32
//-----------------------------------------------------------------------------
SLresult
audioPlayer_setStreamType
(
CAudioPlayer
*
ap
,
SLint32
type
)
{
SLresult
result
=
SL_RESULT_SUCCESS
;
SL_LOGV
(
"type %
l
d"
,
type
);
SL_LOGV
(
"type %d"
,
type
);
int
newStreamType
=
ANDROID_DEFAULT_OUTPUT_STREAM_TYPE
;
switch
(
type
)
{
...
...
@@ -848,7 +848,7 @@ SLresult android_audioPlayer_checkSourceSink(CAudioPlayer *pAudioPlayer)
// others
default:
// this should have already been rejected by checkDataFormat
SL_LOGE
(
"Cannot create audio player: unsupported sample bit depth %
l
u"
,
SL_LOGE
(
"Cannot create audio player: unsupported sample bit depth %u"
,
(
SLuint32
)
df_pcm
->
bitsPerSample
);
return
SL_RESULT_CONTENT_UNSUPPORTED
;
}
...
...
@@ -1049,7 +1049,7 @@ static void audioTrack_callBack_pullFromBuffQueue(int event, void* user, void *i
interface_lock_exclusive
(
&
ap
->
mBufferQueue
);
if
(
ap
->
mBufferQueue
.
mState
.
count
!=
0
)
{
//SL_LOGV("nbBuffers in queue = %
l
u",ap->mBufferQueue.mState.count);
//SL_LOGV("nbBuffers in queue = %u",ap->mBufferQueue.mState.count);
assert
(
ap
->
mBufferQueue
.
mFront
!=
ap
->
mBufferQueue
.
mRear
);
BufferHeader
*
oldFront
=
ap
->
mBufferQueue
.
mFront
;
...
...
This diff is collapsed.
Click to expand it.
src/android/AudioRecorder_to_android.cpp
View file @
a8179ea1
...
...
@@ -172,7 +172,7 @@ SLresult android_audioRecorder_checkSourceSinkSupport(CAudioRecorder* ar) {
SLDataFormat_PCM
*
df_pcm
=
(
SLDataFormat_PCM
*
)
ar
->
mDataSink
.
u
.
mSink
.
pFormat
;
ar
->
mSampleRateMilliHz
=
df_pcm
->
samplesPerSec
;
ar
->
mNumChannels
=
df_pcm
->
numChannels
;
SL_LOGV
(
"AudioRecorder requested sample rate = %
l
umHz, %u channel(s)"
,
SL_LOGV
(
"AudioRecorder requested sample rate = %u
mHz, %u channel(s)"
,
ar
->
mSampleRateMilliHz
,
ar
->
mNumChannels
);
}
else
{
...
...
@@ -399,7 +399,7 @@ SLresult android_audioRecorder_realize(CAudioRecorder* ar, SLboolean async) {
// ar->mNumChannels
// ar->mSampleRateMilliHz
SL_LOGV
(
"new AudioRecord %u channels, %
l
u mHz"
,
ar
->
mNumChannels
,
ar
->
mSampleRateMilliHz
);
SL_LOGV
(
"new AudioRecord %u channels, %u mHz"
,
ar
->
mNumChannels
,
ar
->
mSampleRateMilliHz
);
// initialize platform-specific CAudioRecorder fields
ar
->
mAudioRecord
=
new
android
::
AudioRecord
();
...
...
@@ -452,7 +452,7 @@ void android_audioRecorder_destroy(CAudioRecorder* ar) {
//-----------------------------------------------------------------------------
void
android_audioRecorder_setRecordState
(
CAudioRecorder
*
ar
,
SLuint32
state
)
{
SL_LOGV
(
"android_audioRecorder_setRecordState(%p, %
l
u) entering"
,
ar
,
state
);
SL_LOGV
(
"android_audioRecorder_setRecordState(%p, %u) entering"
,
ar
,
state
);
if
(
NULL
==
ar
->
mAudioRecord
)
{
return
;
...
...
@@ -496,7 +496,7 @@ void android_audioRecorder_useEventMask(CAudioRecorder *ar) {
}
if
(
eventFlags
&
SL_RECORDEVENT_HEADATNEWPOS
)
{
SL_LOGV
(
"pos update period %
l
d"
,
pRecordItf
->
mPositionUpdatePeriod
);
SL_LOGV
(
"pos update period %d"
,
pRecordItf
->
mPositionUpdatePeriod
);
ar
->
mAudioRecord
->
setPositionUpdatePeriod
(
(
uint32_t
)((((
int64_t
)
pRecordItf
->
mPositionUpdatePeriod
*
sles_to_android_sampleRate
(
ar
->
mSampleRateMilliHz
)))
/
1000
));
...
...
This diff is collapsed.
Click to expand it.
src/android/MediaPlayer_to_android.cpp
View file @
a8179ea1
...
...
@@ -197,7 +197,7 @@ XAresult android_Player_create(CMediaPlayer *mp) {
break
;
case
XA_DATALOCATOR_ADDRESS
:
// intended fall-through
default:
SL_LOGE
(
"Unable to create MediaPlayer for data source locator 0x%
l
x"
,
sourceLocator
);
SL_LOGE
(
"Unable to create MediaPlayer for data source locator 0x%x"
,
sourceLocator
);
result
=
XA_RESULT_PARAMETER_INVALID
;
break
;
}
...
...
@@ -251,7 +251,7 @@ XAresult android_Player_realize(CMediaPlayer *mp, SLboolean async) {
}
break
;
default:
SL_LOGE
(
"Invalid or unsupported data locator type %
l
u for data source"
,
SL_LOGE
(
"Invalid or unsupported data locator type %u for data source"
,
mp
->
mDataSource
.
mLocator
.
mLocatorType
);
result
=
XA_RESULT_PARAMETER_INVALID
;
}
...
...
This diff is collapsed.
Click to expand it.
src/android/android_AudioToCbRenderer.cpp
View file @
a8179ea1
...
...
@@ -75,7 +75,7 @@ void AudioToCbRenderer::onRender() {
mDecodeBuffer
->
range_length
()
-
offset
,
mDecodeUser
);
offset
+=
consumed
;
//SL_LOGV("consumed=%
l
u, offset=%
l
u, full=%
l
u", consumed, offset, full);
//SL_LOGV("consumed=%u, offset=%u, full=%u", consumed, offset, full);
if
(
consumed
==
0
)
{
// decoded data is not being consumed, skip this buffer
break
;
...
...
This diff is collapsed.
Click to expand it.
src/android/android_StreamPlayer.cpp
View file @
a8179ea1
...
...
@@ -129,7 +129,7 @@ void StreamSourceAppProxy::pullFromBuffQueue() {
interface_lock_exclusive
(
mAndroidBufferQueue
);
if
(
mAndroidBufferQueue
->
mState
.
count
!=
0
)
{
// SL_LOGD("nbBuffers in ABQ = %
l
u, buffSize=%
l
u",abq->mState.count, buffSize);
// SL_LOGD("nbBuffers in ABQ = %u, buffSize=%u",abq->mState.count, buffSize);
assert
(
mAndroidBufferQueue
->
mFront
!=
mAndroidBufferQueue
->
mRear
);
oldFront
=
mAndroidBufferQueue
->
mFront
;
...
...
@@ -174,7 +174,7 @@ void StreamSourceAppProxy::pullFromBuffQueue() {
// requested as much available or more: consume the whole of the current
// buffer and move to the next
size_t
consumed
=
oldFront
->
mDataSize
-
oldFront
->
mDataSizeConsumed
;
//SL_LOGD("consuming rest of buffer: enqueueing=%
ld
", consumed);
//SL_LOGD("consuming rest of buffer: enqueueing=%
u
", consumed);
oldFront
->
mDataSizeConsumed
=
oldFront
->
mDataSize
;
// move queue to next
...
...
This diff is collapsed.
Click to expand it.
src/android/android_prompts.h
View file @
a8179ea1
...
...
@@ -36,7 +36,7 @@
#define ERROR_PLAYERSETPLAYSTATE_UNEXPECTED_OBJECT_TYPE_D \
"Cannot set AudioPlayer playstate: unexpected object type \%d"
#define ERROR_PLAYERSETPLAYSTATE_INVALID_OBJECT_STATE_D \
"Cannot set AudioPlayer playstate to %
l
d: Android object in invalid state"
"Cannot set AudioPlayer playstate to %d: Android object in invalid state"
#define ERROR_PLAYER_NEW_NULL_TRACK \
"Internal error: new AudioTrack shouldn't be NULL"
#define ERROR_PLAYER_PREFETCH_d \
...
...
This diff is collapsed.
Click to expand it.
src/data.c
View file @
a8179ea1
...
...
@@ -54,7 +54,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
// number of buffers must be specified, there is no default value, and can't be too big
if
(
!
((
1
<=
pDataLocator
->
mBufferQueue
.
numBuffers
)
&&
(
pDataLocator
->
mBufferQueue
.
numBuffers
<=
255
)))
{
SL_LOGE
(
"%s: numBuffers=%
l
u"
,
name
,
pDataLocator
->
mBufferQueue
.
numBuffers
);
SL_LOGE
(
"%s: numBuffers=%u"
,
name
,
pDataLocator
->
mBufferQueue
.
numBuffers
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
...
...
@@ -84,7 +84,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
case
SL_IODEVICE_AUDIOINPUT
:
// case SL_IODEVICE_AUDIOOUTPUT: // does not exist in 1.0.1, added in 1.1
default:
SL_LOGE
(
"%s: deviceType=%
l
u"
,
name
,
deviceType
);
SL_LOGE
(
"%s: deviceType=%u"
,
name
,
deviceType
);
pDataLocator
->
mIODevice
.
device
=
NULL
;
expectedObjectID
=
0
;
result
=
SL_RESULT_PARAMETER_INVALID
;
...
...
@@ -104,19 +104,19 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
switch
(
deviceType
)
{
case
SL_IODEVICE_LEDARRAY
:
if
(
SL_DEFAULTDEVICEID_LED
!=
deviceID
)
{
SL_LOGE
(
"%s: invalid LED deviceID=%
l
u"
,
name
,
deviceID
);
SL_LOGE
(
"%s: invalid LED deviceID=%u"
,
name
,
deviceID
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
case
SL_IODEVICE_VIBRA
:
if
(
SL_DEFAULTDEVICEID_VIBRA
!=
deviceID
)
{
SL_LOGE
(
"%s: invalid vibra deviceID=%
l
u"
,
name
,
deviceID
);
SL_LOGE
(
"%s: invalid vibra deviceID=%u"
,
name
,
deviceID
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
case
SL_IODEVICE_AUDIOINPUT
:
if
(
SL_DEFAULTDEVICEID_AUDIOINPUT
!=
deviceID
)
{
SL_LOGE
(
"%s: invalid audio input deviceID=%
l
u"
,
name
,
deviceID
);
SL_LOGE
(
"%s: invalid audio input deviceID=%u"
,
name
,
deviceID
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
...
...
@@ -125,7 +125,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
break
;
case
XA_IODEVICE_CAMERA
:
if
(
XA_DEFAULTDEVICEID_CAMERA
!=
deviceID
)
{
SL_LOGE
(
"%s: invalid audio input deviceID=%
l
u"
,
name
,
deviceID
);
SL_LOGE
(
"%s: invalid audio input deviceID=%u"
,
name
,
deviceID
);
result
=
XA_RESULT_PARAMETER_INVALID
;
}
break
;
...
...
@@ -133,7 +133,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
// does not exist in 1.0.1, added in 1.1
// break;
default:
SL_LOGE
(
"%s: deviceType=%
l
u is invalid"
,
name
,
deviceType
);
SL_LOGE
(
"%s: deviceType=%u is invalid"
,
name
,
deviceType
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
}
...
...
@@ -148,7 +148,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
// number of buffers must be specified, there is no default value, and can't be too big
if
(
!
((
1
<=
pDataLocator
->
mMIDIBufferQueue
.
numBuffers
)
&&
(
pDataLocator
->
mMIDIBufferQueue
.
numBuffers
<=
255
)))
{
SL_LOGE
(
"%s: SLDataLocator_MIDIBufferQueue.numBuffers=%
l
d"
,
name
,
SL_LOGE
(
"%s: SLDataLocator_MIDIBufferQueue.numBuffers=%d"
,
name
,
pDataLocator
->
mMIDIBufferQueue
.
numBuffers
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
...
...
@@ -212,11 +212,11 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
case
SL_DATALOCATOR_ANDROIDFD
:
{
pDataLocator
->
mFD
=
*
(
SLDataLocator_AndroidFD
*
)
pLocator
;
SL_LOGV
(
"%s: fd=%
l
d offset=%lld length=%lld"
,
name
,
pDataLocator
->
mFD
.
fd
,
SL_LOGV
(
"%s: fd=%d offset=%lld length=%lld"
,
name
,
pDataLocator
->
mFD
.
fd
,
pDataLocator
->
mFD
.
offset
,
pDataLocator
->
mFD
.
length
);
// NTH check against process fd limit
if
(
0
>
pDataLocator
->
mFD
.
fd
)
{
SL_LOGE
(
"%s: fd=%
l
d
\n
"
,
name
,
pDataLocator
->
mFD
.
fd
);
SL_LOGE
(
"%s: fd=%d
\n
"
,
name
,
pDataLocator
->
mFD
.
fd
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
...
...
@@ -227,7 +227,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
// number of buffers must be specified, there is no default value, and can't be too big
if
(
!
((
1
<=
pDataLocator
->
mBufferQueue
.
numBuffers
)
&&
(
pDataLocator
->
mBufferQueue
.
numBuffers
<=
255
)))
{
SL_LOGE
(
"%s: numBuffers=%
l
u"
,
name
,
pDataLocator
->
mABQ
.
numBuffers
);
SL_LOGE
(
"%s: numBuffers=%u"
,
name
,
pDataLocator
->
mABQ
.
numBuffers
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
break
;
...
...
@@ -236,14 +236,14 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
case
SL_DATALOCATOR_NULL
:
// a NULL pointer is allowed, but not a pointer to NULL
default:
SL_LOGE
(
"%s: locatorType=%
l
u"
,
name
,
locatorType
);
SL_LOGE
(
"%s: locatorType=%u"
,
name
,
locatorType
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
// Verify that another thread didn't change the locatorType field after we used it
// to determine sizeof struct to copy.
if
((
SL_RESULT_SUCCESS
==
result
)
&&
(
locatorType
!=
pDataLocator
->
mLocatorType
))
{
SL_LOGE
(
"%s: locatorType changed from %
l
u to %
l
u"
,
name
,
locatorType
,
SL_LOGE
(
"%s: locatorType changed from %u to %u"
,
name
,
locatorType
,
pDataLocator
->
mLocatorType
);
result
=
SL_RESULT_PRECONDITIONS_VIOLATED
;
}
...
...
@@ -277,7 +277,7 @@ static SLresult checkDataLocator(const char *name, void *pLocator, DataLocator *
break
;
}
if
(
!
(
allowedDataLocatorMask
&
actualMask
))
{
SL_LOGE
(
"%s: data locator type 0x%
l
x not allowed"
,
name
,
locatorType
);
SL_LOGE
(
"%s: data locator type 0x%x not allowed"
,
name
,
locatorType
);
result
=
SL_RESULT_CONTENT_UNSUPPORTED
;
}
}
...
...
@@ -390,7 +390,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
break
;
}
if
(
SL_RESULT_SUCCESS
!=
result
)
{
SL_LOGE
(
"%s: samplesPerSec=%
l
u"
,
name
,
pDataFormat
->
mPCM
.
samplesPerSec
);
SL_LOGE
(
"%s: samplesPerSec=%u"
,
name
,
pDataFormat
->
mPCM
.
samplesPerSec
);
break
;
}
...
...
@@ -410,7 +410,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
break
;
}
if
(
SL_RESULT_SUCCESS
!=
result
)
{
SL_LOGE
(
"%s: bitsPerSample=%
l
u"
,
name
,
pDataFormat
->
mPCM
.
bitsPerSample
);
SL_LOGE
(
"%s: bitsPerSample=%u"
,
name
,
pDataFormat
->
mPCM
.
bitsPerSample
);
break
;
}
...
...
@@ -450,7 +450,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
break
;
}
if
(
SL_RESULT_SUCCESS
!=
result
)
{
SL_LOGE
(
"%s: channelMask=0x%
l
x numChannels=%
l
u"
,
name
,
SL_LOGE
(
"%s: channelMask=0x%x numChannels=%u"
,
name
,
pDataFormat
->
mPCM
.
channelMask
,
pDataFormat
->
mPCM
.
numChannels
);
break
;
}
...
...
@@ -541,7 +541,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
case
XA_COLORFORMAT_UNUSED
:
default:
result
=
XA_RESULT_PARAMETER_INVALID
;
SL_LOGE
(
"%s: unsupported color format %
l
d"
,
name
,
SL_LOGE
(
"%s: unsupported color format %d"
,
name
,
pDataFormat
->
mRawImage
.
colorFormat
);
break
;
}
...
...
@@ -557,7 +557,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
// make sure format type was not modified asynchronously
if
((
SL_RESULT_SUCCESS
==
result
)
&&
(
formatType
!=
pDataFormat
->
mFormatType
))
{
SL_LOGE
(
"%s: formatType changed from %
l
u to %
l
u"
,
name
,
formatType
,
SL_LOGE
(
"%s: formatType changed from %u to %u"
,
name
,
formatType
,
pDataFormat
->
mFormatType
);
result
=
SL_RESULT_PRECONDITIONS_VIOLATED
;
}
...
...
@@ -580,7 +580,7 @@ static SLresult checkDataFormat(const char *name, void *pFormat, DataFormat *pDa
break
;
}
if
(
!
(
allowedDataFormatMask
&
actualMask
))
{
SL_LOGE
(
"%s: data format %
l
d not allowed"
,
name
,
formatType
);
SL_LOGE
(
"%s: data format %d not allowed"
,
name
,
formatType
);
result
=
SL_RESULT_CONTENT_UNSUPPORTED
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/entry.c
View file @
a8179ea1
...
...
@@ -46,7 +46,7 @@ LI_API SLresult liCreateEngine(SLObjectItf *pEngine, SLuint32 numOptions,
*
pEngine
=
NULL
;
if
((
0
<
numOptions
)
&&
(
NULL
==
pEngineOptions
))
{
SL_LOGE
(
"numOptions=%
l
u and pEngineOptions=NULL"
,
numOptions
);
SL_LOGE
(
"numOptions=%u and pEngineOptions=NULL"
,
numOptions
);
result
=
SL_RESULT_PARAMETER_INVALID
;
break
;
}
...
...
@@ -68,7 +68,7 @@ LI_API SLresult liCreateEngine(SLObjectItf *pEngine, SLuint32 numOptions,
lossOfControlGlobal
=
SL_BOOLEAN_FALSE
!=
(
SLboolean
)
option
->
data
;
// normalize
break
;
default:
SL_LOGE
(
"unknown engine option: feature=%
l
u data=%
l
u"
,
SL_LOGE
(
"unknown engine option: feature=%u data=%u"
,
option
->
feature
,
option
->
data
);
result
=
SL_RESULT_PARAMETER_INVALID
;
break
;
...
...
This diff is collapsed.
Click to expand it.
src/itf/IAndroidBufferQueue.c
View file @
a8179ea1
...
...
@@ -74,11 +74,11 @@ static void setItems(const SLAndroidBufferItem *pItems, SLuint32 itemsLength,
// supported Mpeg2Ts commands are mutually exclusive
if
(
SL_ANDROID_ITEMKEY_EOS
==
pItems
->
itemKey
)
{
pBuff
->
mItems
.
mTsCmdData
.
mTsCmdCode
|=
ANDROID_MP2TSEVENT_EOS
;
//SL_LOGD("Found EOS event=%
l
d", pBuff->mItems.mTsCmdData.mTsCmdCode);
//SL_LOGD("Found EOS event=%d", pBuff->mItems.mTsCmdData.mTsCmdCode);
}
else
if
(
SL_ANDROID_ITEMKEY_DISCONTINUITY
==
pItems
->
itemKey
)
{
if
(
pItems
->
itemSize
==
0
)
{
pBuff
->
mItems
.
mTsCmdData
.
mTsCmdCode
|=
ANDROID_MP2TSEVENT_DISCONTINUITY
;
//SL_LOGD("Found DISCONTINUITYevent=%
l
d", pBuff->mItems.mTsCmdData.mTsCmdCode);
//SL_LOGD("Found DISCONTINUITYevent=%d", pBuff->mItems.mTsCmdData.mTsCmdCode);
}
else
if
(
pItems
->
itemSize
==
sizeof
(
SLAuint64
))
{
pBuff
->
mItems
.
mTsCmdData
.
mTsCmdCode
|=
ANDROID_MP2TSEVENT_DISCON_NEWPTS
;
pBuff
->
mItems
.
mTsCmdData
.
mPts
=
*
((
SLAuint64
*
)
pItems
->
itemData
);
...
...
This diff is collapsed.
Click to expand it.
src/itf/IAndroidConfiguration.c
View file @
a8179ea1
...
...
@@ -32,12 +32,12 @@ static SLresult IAndroidConfiguration_SetConfiguration(SLAndroidConfigurationItf
// route configuration to the appropriate object
if
(
SL_OBJECTID_AUDIORECORDER
==
IObjectToObjectID
((
thiz
)
->
mThis
))
{
SL_LOGV
(
"SetConfiguration issued for AudioRecorder key=%s valueSize=%
l
u"
,
SL_LOGV
(
"SetConfiguration issued for AudioRecorder key=%s valueSize=%u"
,
configKey
,
valueSize
);
result
=
android_audioRecorder_setConfig
((
CAudioRecorder
*
)
thiz
->
mThis
,
configKey
,
pConfigValue
,
valueSize
);
}
else
if
(
SL_OBJECTID_AUDIOPLAYER
==
IObjectToObjectID
((
thiz
)
->
mThis
))
{
SL_LOGV
(
"SetConfiguration issued for AudioPlayer key=%s valueSize=%
l
u"
,
SL_LOGV
(
"SetConfiguration issued for AudioPlayer key=%s valueSize=%u"
,
configKey
,
valueSize
);
result
=
android_audioPlayer_setConfig
((
CAudioPlayer
*
)
thiz
->
mThis
,
configKey
,
pConfigValue
,
valueSize
);
...
...
This diff is collapsed.
Click to expand it.
src/itf/IAndroidEffectCapabilities.c
View file @
a8179ea1
...
...
@@ -92,24 +92,24 @@ bool IAndroidEffectCapabilities_Expose(void *self)
SLuint32
numEffects
=
0
;
SLresult
result
=
android_genericFx_queryNumEffects
(
&
numEffects
);
if
(
SL_RESULT_SUCCESS
!=
result
)
{
SL_LOGE
(
"android_genericFx_queryNumEffects %
l
u"
,
result
);
SL_LOGE
(
"android_genericFx_queryNumEffects %u"
,
result
);
return
false
;
}
thiz
->
mNumFx
=
numEffects
;
SL_LOGV
(
"Effect Capabilities has %
l
d effects"
,
thiz
->
mNumFx
);
SL_LOGV
(
"Effect Capabilities has %d effects"
,
thiz
->
mNumFx
);
if
(
thiz
->
mNumFx
>
0
)
{
thiz
->
mFxDescriptors
=
(
effect_descriptor_t
*
)
new
effect_descriptor_t
[
thiz
->
mNumFx
];
for
(
SLuint32
i
=
0
;
i
<
thiz
->
mNumFx
;
i
++
)
{
SLresult
result2
;
result2
=
android_genericFx_queryEffect
(
i
,
&
thiz
->
mFxDescriptors
[
i
]);
if
(
SL_RESULT_SUCCESS
!=
result2
)
{
SL_LOGE
(
"Error (SLresult is %
l
d) querying effect %
l
d"
,
result2
,
i
);
SL_LOGE
(
"Error (SLresult is %d) querying effect %d"
,
result2
,
i
);
// Remember the first failing result code, but keep going
if
(
SL_RESULT_SUCCESS
==
result
)
{
result
=
result2
;
}
}
else
{
SL_LOGV
(
"effect %
l
d: type=%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x name=%s"
,
SL_LOGV
(
"effect %d: type=%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x name=%s"
,
i
,
thiz
->
mFxDescriptors
[
i
].
type
.
timeLow
,
thiz
->
mFxDescriptors
[
i
].
type
.
timeMid
,
...
...
This diff is collapsed.
Click to expand it.
src/itf/IBufferQueue.c
View file @
a8179ea1
...
...
@@ -46,7 +46,7 @@ static SLuint32 getAssociatedState(IBufferQueue *thiz)
SLresult
IBufferQueue_Enqueue
(
SLBufferQueueItf
self
,
const
void
*
pBuffer
,
SLuint32
size
)
{
SL_ENTER_INTERFACE
//SL_LOGV("IBufferQueue_Enqueue(%p, %p, %
l
u)", self, pBuffer, size);
//SL_LOGV("IBufferQueue_Enqueue(%p, %p, %u)", self, pBuffer, size);
// Note that Enqueue while a Clear is pending is equivalent to Enqueue followed by Clear
...
...
This diff is collapsed.
Click to expand it.
src/itf/IEffectSend.c
View file @
a8179ea1
...
...
@@ -83,7 +83,7 @@ static struct EnableLevel *getEnableLevel(IEffectSend *thiz, const void *pAuxEff
SL_LOGE
(
"EffectSend no GetInterface yet"
);
break
;
default:
SL_LOGE
(
"EffectSend invalid interface state %
l
u"
,
state
);
SL_LOGE
(
"EffectSend invalid interface state %u"
,
state
);
break
;
}
return
NULL
;
...
...
This diff is collapsed.
Click to expand it.
src/itf/IPlay.c
View file @
a8179ea1
...
...
@@ -96,7 +96,7 @@ static SLresult IPlay_SetPlayState(SLPlayItf self, SLuint32 state)
thiz
->
mState
=
state
;
attr
=
ATTR_TRANSPORT
;
#endif
// SL_LOGD("set play state %
l
d", state);
// SL_LOGD("set play state %d", state);
interface_unlock_exclusive_attributes
(
thiz
,
attr
);
}
break
;
...
...
This diff is collapsed.
Click to expand it.
src/itf/IStreamInformation.c
View file @
a8179ea1
...
...
@@ -71,7 +71,7 @@ static XAresult IStreamInformation_QueryStreamType( XAStreamInformationItf self,
result
=
XA_RESULT_SUCCESS
;
*
domain
=
thiz
->
mStreamInfoTable
.
itemAt
(
streamIndex
).
domain
;
}
else
{
SL_LOGE
(
"Querying stream type for stream %
l
d, only %
l
d streams available"
,
SL_LOGE
(
"Querying stream type for stream %d, only %d streams available"
,
streamIndex
,
nbStreams
);
result
=
XA_RESULT_PARAMETER_INVALID
;
}
...
...
@@ -131,14 +131,14 @@ static XAresult IStreamInformation_QueryStreamInformation( XAStreamInformationIt
*
(
XAVendorStreamInformation
*
)
info
=
streamInfo
.
vendorInfo
;
break
;
default:
SL_LOGE
(
"StreamInformation::QueryStreamInformation index %
l
u has "
"unknown domain %
l
u"
,
streamIndex
,
streamInfo
.
domain
);
SL_LOGE
(
"StreamInformation::QueryStreamInformation index %u has "
"unknown domain %u"
,
streamIndex
,
streamInfo
.
domain
);
result
=
XA_RESULT_INTERNAL_ERROR
;
break
;
}
}
else
{
SL_LOGE
(
"Querying stream type for stream %
l
d, only %
l
d streams available"
,
SL_LOGE
(
"Querying stream type for stream %d, only %d streams available"
,
streamIndex
,
nbStreams
);
result
=
XA_RESULT_PARAMETER_INVALID
;
}
...
...
This diff is collapsed.
Click to expand it.
src/sles.c
View file @
a8179ea1
...
...
@@ -80,11 +80,11 @@ SLresult AcquireStrongRef(IObject *object, SLuint32 expectedObjectID)
object_lock_exclusive
(
object
);
SLuint32
actualObjectID
=
IObjectToObjectID
(
object
);
if
(
expectedObjectID
!=
actualObjectID
)
{
SL_LOGE
(
"object %p has object ID %
l
u but expected %
l
u"
,
object
,
actualObjectID
,
SL_LOGE
(
"object %p has object ID %u but expected %u"
,
object
,
actualObjectID
,
expectedObjectID
);
result
=
SL_RESULT_PARAMETER_INVALID
;
}
else
if
(
SL_OBJECT_STATE_REALIZED
!=
object
->
mState
)
{
SL_LOGE
(
"object %p with object ID %
l
u is not realized"
,
object
,
actualObjectID
);
SL_LOGE
(
"object %p with object ID %u is not realized"
,
object
,
actualObjectID
);
result
=
SL_RESULT_PRECONDITIONS_VIOLATED
;
}
else
{
++
object
->
mStrongRefCount
;
...
...
@@ -196,12 +196,12 @@ SLresult checkInterfaces(const ClassTable *clazz, SLuint32 numInterfaces,
// Here if interface was not found, or is not available for this object type
if
(
pInterfaceRequired
[
i
])
{
// Application said it required the interface, so give up
SL_LOGE
(
"class %s interface %
l
u required but unavailable MPH=%d"
,
SL_LOGE
(
"class %s interface %u required but unavailable MPH=%d"
,
clazz
->
mName
,
i
,
MPH
);
anyRequiredButUnsupported
=
true
;
}
// Application said it didn't really need the interface, so ignore with warning
SL_LOGW
(
"class %s interface %
l
u requested but unavailable MPH=%d"
,
SL_LOGW
(
"class %s interface %u requested but unavailable MPH=%d"
,
clazz
->
mName
,
i
,
MPH
);
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
src/trace.c
View file @
a8179ea1
...
...
@@ -50,7 +50,7 @@ void slTraceLeaveGlobal(const char *function, SLresult result)
if
(
NULL
!=
str
)
{
SL_LOGW
(
"Leaving %s (%s)"
,
function
,
str
);
}
else
{
SL_LOGW
(
"Leaving %s (0x%
l
X)"
,
function
,
result
);
SL_LOGW
(
"Leaving %s (0x%X)"
,
function
,
result
);
}
}
}
...
...
@@ -115,14 +115,14 @@ void slTraceLeaveInterface(const char *function, SLresult result)
SL_LOGW
(
"Leaving %.*s::%s (%s)"
,
(
int
)
(
underscore
-
function
),
function
,
&
underscore
[
1
],
str
);
}
else
{
SL_LOGW
(
"Leaving %.*s::%s (0x%
l
X)"
,
(
int
)
(
underscore
-
function
),
function
,
SL_LOGW
(
"Leaving %.*s::%s (0x%X)"
,
(
int
)
(
underscore
-
function
),
function
,
&
underscore
[
1
],
result
);
}
}
else
{
if
(
NULL
!=
str
)
{
SL_LOGW
(
"Leaving %s (%s)"
,
function
,
str
);
}
else
{
SL_LOGW
(
"Leaving %s (0x%
l
X)"
,
function
,
result
);
SL_LOGW
(
"Leaving %s (0x%X)"
,
function
,
result
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment