Lines Matching refs:sync
124 static sp<JMediaSync> setMediaSync(JNIEnv *env, jobject thiz, const sp<JMediaSync> &sync) { in setMediaSync() argument
126 if (sync != NULL) { in setMediaSync()
127 sync->incStrong(thiz); in setMediaSync()
133 env->SetLongField(thiz, gFields.context, (jlong)sync.get()); in setMediaSync()
174 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_setSurface() local
175 if (sync == NULL) { in android_media_MediaSync_native_setSurface()
191 status_t err = sync->setSurface(bufferProducer); in android_media_MediaSync_native_setSurface()
207 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_setAudioTrack() local
208 if (sync == NULL) { in android_media_MediaSync_native_setAudioTrack()
222 status_t err = sync->setAudioTrack(audioTrack); in android_media_MediaSync_native_setAudioTrack()
238 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_createInputSurface() local
239 if (sync == NULL) { in android_media_MediaSync_createInputSurface()
246 status_t err = sync->createInputSurface(&bufferProducer); in android_media_MediaSync_createInputSurface()
259 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_updateQueuedAudioData() local
260 if (sync == NULL) { in android_media_MediaSync_native_updateQueuedAudioData()
265 status_t err = sync->updateQueuedAudioData(sizeInBytes, presentationTimeUs); in android_media_MediaSync_native_updateQueuedAudioData()
274 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_getTimestamp() local
275 if (sync == NULL) { in android_media_MediaSync_native_getTimestamp()
280 sp<const MediaClock> mediaClock = sync->getMediaClock(); in android_media_MediaSync_native_getTimestamp()
302 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_getPlayTimeForPendingAudioFrames() local
303 if (sync == NULL) { in android_media_MediaSync_native_getPlayTimeForPendingAudioFrames()
308 status_t err = sync->getPlayTimeForPendingAudioFrames(&playTimeUs); in android_media_MediaSync_native_getPlayTimeForPendingAudioFrames()
317 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_setPlaybackParams() local
318 if (sync == NULL) { in android_media_MediaSync_setPlaybackParams()
332 sync->getPlaybackParams(&rate); in android_media_MediaSync_setPlaybackParams()
351 status_t err = sync->setPlaybackParams(rate); in android_media_MediaSync_setPlaybackParams()
358 sp<const MediaClock> mediaClock = sync->getMediaClock(); in android_media_MediaSync_setPlaybackParams()
368 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_getPlaybackParams() local
369 if (sync == NULL) { in android_media_MediaSync_getPlaybackParams()
376 sync->getPlaybackParams(&audioRate); in android_media_MediaSync_getPlaybackParams()
390 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_setSyncParams() local
391 if (sync == NULL) { in android_media_MediaSync_setSyncParams()
399 scs.syncSourceSet, scs.sync.mSource, in android_media_MediaSync_setSyncParams()
400 scs.audioAdjustModeSet, scs.sync.mAudioAdjustMode, in android_media_MediaSync_setSyncParams()
401 scs.toleranceSet, scs.sync.mTolerance, in android_media_MediaSync_setSyncParams()
405 sync->getSyncParams(&avsync); in android_media_MediaSync_setSyncParams()
409 avsync.mSource = scs.sync.mSource; in android_media_MediaSync_setSyncParams()
413 avsync.mAudioAdjustMode = scs.sync.mAudioAdjustMode; in android_media_MediaSync_setSyncParams()
417 avsync.mTolerance = scs.sync.mTolerance; in android_media_MediaSync_setSyncParams()
421 err = sync->setSyncParams(avsync); in android_media_MediaSync_setSyncParams()
425 err = sync->setVideoFrameRateHint(scs.frameRate); in android_media_MediaSync_setSyncParams()
432 sp<const MediaClock> mediaClock = sync->getMediaClock(); in android_media_MediaSync_setSyncParams()
441 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_getSyncParams() local
442 if (sync == NULL) { in android_media_MediaSync_getSyncParams()
448 sync->getSyncParams(&scs.sync); in android_media_MediaSync_getSyncParams()
449 scs.frameRate = sync->getVideoFrameRate(); in android_media_MediaSync_getSyncParams()
452 scs.sync.mSource, scs.sync.mAudioAdjustMode, scs.sync.mTolerance, scs.frameRate); in android_media_MediaSync_getSyncParams()
455 if (scs.sync.mSource >= AVSYNC_SOURCE_MAX in android_media_MediaSync_getSyncParams()
456 || scs.sync.mAudioAdjustMode >= AVSYNC_AUDIO_ADJUST_MODE_MAX in android_media_MediaSync_getSyncParams()
457 || scs.sync.mTolerance < 0.f in android_media_MediaSync_getSyncParams()
458 || scs.sync.mTolerance >= AVSYNC_TOLERANCE_MAX) { in android_media_MediaSync_getSyncParams()
472 sp<JMediaSync> sync = getMediaSync(env, thiz); in android_media_MediaSync_native_flush() local
473 if (sync == NULL) { in android_media_MediaSync_native_flush()
478 sync->flush(); in android_media_MediaSync_native_flush()
508 sp<JMediaSync> sync = new JMediaSync(); in android_media_MediaSync_native_setup() local
510 setMediaSync(env, thiz, sync); in android_media_MediaSync_native_setup()