I'm maintaining an Android video replay app through Android Studio. All aspects of the application work fine across multiple devices (Samsung S8, S10, S20 etc) except for 64bit devices where the video decode fails. I'm looking for advice and/or an explaination as to what's causing the problem.
Below is a snippet of the code that is causing me grief. Below are the resultant logs. Basically the application works fine when run using jniLibs/armeabi however fails when run using jnilibs/arm64-v8a. The decoder threads keep failing with IllogicalArgumentException.
Code:
private class PlayerThread3 extends Thread {
private MediaCodec decoder;
private Surface surface;
public PlayerThread3(Surface surface) {
this.surface = surface;
}
#Override
public void run() {
Log.d("PlayerThread3->Run", "Entry surface=" + surface.toString());
MediaFormat format = MediaFormat.createVideoFormat("video/avc", mSurfaceWidth, mSurfaceHeight);
try {
Log.d("PlayerThread3->Run", "MediaFormat=" + format.toString());
decoder = MediaCodec.createByCodecName("OMX.google.h264.decoder");
Log.d("PlayerThread3->Run", "MediaCodec=" + decoder.toString());
if (surface.isValid()) {
Log.d("PlayerThread3->Run", "surface.isValid=" + surface.toString());
decoder.configure(format, surface, null, 0);
} else {
Log.i("debug","decoder31");
Message msg = Message.obtain();
msg.what = 3;
msg.obj = "Failed to start live video(surface)";
handler.sendMessage(msg);
return;
}
} catch (IllegalArgumentException e) {
Log.d("PlayerThread3->Run", "IA surface=" + surface.toString());
e.printStackTrace();
Log.i("debug", "decoder32");
Message msg = Message.obtain();
msg.what = 3;
msg.obj = "Failed to start live video(arg)";
handler.sendMessage(msg);
return;
} catch (IOException e) {
e.printStackTrace();
Log.i("debug", "decoder33");
Message msg = Message.obtain();
msg.what = 3;
msg.obj = "Failed to start live video(IO)";
handler.sendMessage(msg);
return;
}
try {
decoder.start();
inputBuffers3 = decoder.getInputBuffers();
Message msg = Message.obtain();
msg.what = 3;
handler.sendMessage(msg);
while (preferences_isAlways.getBoolean("indexDecode3" + index, false)) {
if (decoder_array3 != null) {
offerDecoder(decoder_array3, decoder_array3.length);
decoder_array3 = null;
}
}
decoder.stop();
decoder.release();
} catch (IllegalStateException e) {
e.printStackTrace();
Log.i("debug", "decoder34");
Message msg = Message.obtain();
msg.what = 3;
msg.obj = "Failed to start live video(IS)";
handler.sendMessage(msg);
}
}
Log:
I/frameRate: 2
I/whichPartOfFrame: 0
I/s_frame_serial: 40
I/frame_packet_body: 1952
D/PlayerThread3->Run: Entry surface=Surface(name=null)/#0x68f7d48
D/PlayerThread3->Run: MediaFormat={mime=video/avc, width=536, height=437}
D/CCodec: allocate(c2.android.avc.decoder)
I/CCodec: Created component [c2.android.avc.decoder]
D/CCodecConfig: read media type: video/avc
D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
extent() != 1 for single value type: output.buffers.allocator-ids.values
extent() != 1 for single value type: algo.buffers.allocator-ids.values
extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values
D/ReflectedParamUpdater: ignored struct field coded.color-format.locations
D/CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported
ignoring local param raw.color (0xd2001809) as it is already supported
D/ReflectedParamUpdater: ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig: query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig: c2 config is Dict {
c2::u32 coded.pl.level = 20496
c2::u32 coded.pl.profile = 20481
c2::u32 coded.vui.color.matrix = 0
c2::u32 coded.vui.color.primaries = 0
c2::u32 coded.vui.color.range = 2
c2::u32 coded.vui.color.transfer = 0
c2::u32 default.color.matrix = 0
c2::u32 default.color.primaries = 0
c2::u32 default.color.range = 0
c2::u32 default.color.transfer = 0
c2::u32 input.buffers.max-size.value = 57600
c2::u32 input.delay.value = 0
string input.media-type.value = "video/avc"
c2::u32 output.delay.value = 8
string output.media-type.value = "video/raw"
c2::u32 raw.color.matrix = 0
c2::u32 raw.color.primaries = 0
c2::u32 raw.color.range = 2
c2::u32 raw.color.transfer = 0
c2::u32 raw.max-size.height = 240
c2::u32 raw.max-size.width = 320
c2::u32 raw.pixel-format.value = 35
c2::i32 raw.rotation.flip = 0
c2::i32 raw.rotation.value = 0
c2::u32 raw.sar.height = 1
c2::u32 raw.sar.width = 1
c2::u32 raw.size.height = 240
c2::u32 raw.size.width = 320
c2::u32 ra
W/ColorUtils: expected specified color aspects (2:0:0:0)
D/PlayerThread3->Run: MediaCodec=android.media.MediaCodec#da3c906
surface.isValid=Surface(name=null)/#0x68f7d48
D/SurfaceUtils: connecting to surface 0x7645de8010, reason connectToSurface
I/MediaCodec: [c2.android.avc.decoder] setting surface generation to 27948035
D/SurfaceUtils: disconnecting from surface 0x7645de8010, reason connectToSurface(reconnect)
connecting to surface 0x7645de8010, reason connectToSurface(reconnect)
D/CCodecConfig: no c2 equivalents for native-window
config failed => CORRUPTED
Bad parameter value
D/CCodecConfig: c2 config is Dict {
c2::u32 coded.pl.level = 20496
c2::u32 coded.pl.profile = 20481
c2::u32 coded.vui.color.matrix = 0
c2::u32 coded.vui.color.primaries = 0
c2::u32 coded.vui.color.range = 2
c2::u32 coded.vui.color.transfer = 0
c2::u32 default.color.matrix = 0
c2::u32 default.color.primaries = 0
c2::u32 default.color.range = 0
c2::u32 default.color.transfer = 0
c2::u32 input.buffers.max-size.value = 57600
c2::u32 input.delay.value = 0
string input.media-type.value = "video/avc"
c2::u32 output.delay.value = 8
string output.media-type.value = "video/raw"
c2::u32 raw.color.matrix = 0
c2::u32 raw.color.primaries = 0
c2::u32 raw.color.range = 2
c2::u32 raw.color.transfer = 0
c2::u32 raw.max-size.height = 240
c2::u32 raw.max-size.width = 320
c2::u32 raw.pixel-format.value = 35
c2::i32 raw.rotation.flip = 0
c2::i32 raw.rotation.value = 0
c2::u32 raw.sar.height = 1
c2::u32 raw.sar.width = 1
c2::u32 raw.size.height = 240
c2::u32 raw.size.width = 536
c2::u32 ra
W/CCodec: failed to configure c2 params
E/MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 3
D/SurfaceUtils: disconnecting from surface 0x7645de8010, reason disconnectFromSurface
E/MediaCodec: configure failed with err 0xffffffea, resetting...
I/MediaCodec: Codec shutdown complete
D/CCodec: allocate(c2.android.avc.decoder)
I/CCodec: Created component [c2.android.avc.decoder]
D/CCodecConfig: read media type: video/avc
D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
extent() != 1 for single value type: output.subscribed-indices.values
extent() != 1 for single value type: input.buffers.allocator-ids.values
extent() != 1 for single value type: output.buffers.allocator-ids.values
extent() != 1 for single value type: algo.buffers.allocator-ids.values
extent() != 1 for single value type: output.buffers.pool-ids.values
extent() != 1 for single value type: algo.buffers.pool-ids.values
D/ReflectedParamUpdater: ignored struct field coded.color-format.locations
I/frameRate: 2
I/whichPartOfFrame: 0
I/s_frame_serial: 41
I/frame_packet_body: 46
D/CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported
ignoring local param raw.color (0xd2001809) as it is already supported
D/ReflectedParamUpdater: ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig: query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig: c2 config is Dict {
c2::u32 coded.pl.level = 20496
c2::u32 coded.pl.profile = 20481
c2::u32 coded.vui.color.matrix = 0
c2::u32 coded.vui.color.primaries = 0
c2::u32 coded.vui.color.range = 2
c2::u32 coded.vui.color.transfer = 0
c2::u32 default.color.matrix = 0
c2::u32 default.color.primaries = 0
c2::u32 default.color.range = 0
c2::u32 default.color.transfer = 0
c2::u32 input.buffers.max-size.value = 57600
c2::u32 input.delay.value = 0
string input.media-type.value = "video/avc"
c2::u32 output.delay.value = 8
string output.media-type.value = "video/raw"
c2::u32 raw.color.matrix = 0
c2::u32 raw.color.primaries = 0
c2::u32 raw.color.range = 2
c2::u32 raw.color.transfer = 0
c2::u32 raw.max-size.height = 240
c2::u32 raw.max-size.width = 320
c2::u32 raw.pixel-format.value = 35
c2::i32 raw.rotation.flip = 0
c2::i32 raw.rotation.value = 0
c2::u32 raw.sar.height = 1
c2::u32 raw.sar.width = 1
c2::u32 raw.size.height = 240
c2::u32 raw.size.width = 320
c2::u32 ra
W/ColorUtils: expected specified color aspects (2:0:0:0)
D/PlayerThread3->Run: IA surface=Surface(name=null)/#0x68f7d48
W/System.err: java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
W/System.err: at android.media.MediaCodec.configure(MediaCodec.java:2023)
at android.media.MediaCodec.configure(MediaCodec.java:1951)
at au.com.FreedomVMS.iFreedomVMSpro.live.ShowFragment$PlayerThread3.run(ShowFragment.java:5789)
I/debug: decoder32
I/.iFreedomVMSpr: Compiler allocated 15MB to compile void au.com.FreedomVMS.iFreedomVMSpro.live.ShowFragment.handleSocket1(int, byte, java.lang.String, int, java.lang.String, java.lang.String)
I/frameRate: 2
I/whichPartOfFrame: 1
I/s_frame_serial: 42
I/frame_packet_body: 10240
Simples, problem solved. Surface dimensions, width and height, have to be multiples of 16 under Android 10. The earlier versions of Android tested against don't appear to be worried by this constraint.
Related
I am working with the Unity Entities Graphics package and as per the 0.7 documentation have added the HYBRID_ENTITIES_CAMERA_CONVERSION tag to scripting define symbols on windows and android builds. It works great on windows but clearly the camera is not being converted to DOTS on android.
Have I missed a step in the project settings for camera conversion on android?
Version: com.unity.entities.graphics#1.0
Renderer: GLES3
Project Settings:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
---
!u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 25
productGUID: foo
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0
AndroidEnableSustainedPerformanceMode: 0
defaultScreenOrientation: 4
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: My Company
productName: My App
defaultCursor: { fileID: 0 }
cursorHotspot: { x: 0, y: 0 }
m_SplashScreenBackgroundColor:
{ r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1 }
m_ShowUnitySplashScreen: 1
m_ShowUnitySplashLogo: 1
m_SplashScreenOverlayOpacity: 1
m_SplashScreenAnimation: 1
m_SplashScreenLogoStyle: 1
m_SplashScreenDrawMode: 0
m_SplashScreenBackgroundAnimationZoom: 1
m_SplashScreenLogoAnimationZoom: 1
m_SplashScreenBackgroundLandscapeAspect: 1
m_SplashScreenBackgroundPortraitAspect: 1
m_SplashScreenBackgroundLandscapeUvs:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
m_SplashScreenBackgroundPortraitUvs:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: { fileID: 0 }
m_HolographicTrackingLossScreen: { fileID: 0 }
defaultScreenWidth: 1920
defaultScreenHeight: 1080
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0
m_ActiveColorSpace: 1
m_SpriteBatchVertexThreshold: 300
m_MTRendering: 1
mipStripping: 0
numberOfMipsStripped: 0
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
iosUseCustomAppBackgroundBehavior: 0
allowedAutorotateToPortrait: 1
allowedAutorotateToPortraitUpsideDown: 1
allowedAutorotateToLandscapeRight: 1
allowedAutorotateToLandscapeLeft: 1
useOSAutorotation: 1
use32BitDisplayBuffer: 1
preserveFramebufferAlpha: 0
disableDepthAndStencilBuffers: 0
androidStartInFullscreen: 1
androidRenderOutsideSafeArea: 1
androidUseSwappy: 0
androidBlitType: 0
androidResizableWindow: 0
androidDefaultWindowWidth: 1920
androidDefaultWindowHeight: 1080
androidMinimumWindowWidth: 400
androidMinimumWindowHeight: 300
androidFullscreenMode: 1
defaultIsNativeResolution: 1
macRetinaSupport: 1
runInBackground: 1
captureSingleScreen: 0
muteOtherAudioSources: 0
Prepare IOS For Recording: 0
Force IOS Speakers When Recording: 0
deferSystemGesturesMode: 0
hideHomeButton: 0
submitAnalytics: 1
usePlayerLog: 1
bakeCollisionMeshes: 0
forceSingleInstance: 0
useFlipModelSwapchain: 1
resizableWindow: 0
useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 0
xboxPIXTextureCapture: 0
xboxEnableAvatar: 0
xboxEnableKinect: 0
xboxEnableKinectAutoTracking: 0
xboxEnableFitness: 0
visibleInBackground: 1
allowFullscreenSwitch: 1
fullscreenMode: 3
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0
xboxEnablePIXSampling: 0
metalFramebufferOnly: 0
xboxOneResolution: 0
xboxOneSResolution: 0
xboxOneXResolution: 3
xboxOneMonoLoggingLevel: 0
xboxOneLoggingLevel: 1
xboxOneDisableEsram: 0
xboxOneEnableTypeOptimization: 0
xboxOnePresentImmediateThreshold: 0
switchQueueCommandMemory: 1048576
switchQueueControlMemory: 16384
switchQueueComputeMemory: 262144
switchNVNShaderPoolsGranularity: 33554432
switchNVNDefaultPoolsGranularity: 16777216
switchNVNOtherPoolsGranularity: 16777216
switchGpuScratchPoolGranularity: 2097152
switchAllowGpuScratchShrinking: 0
switchNVNMaxPublicTextureIDCount: 0
switchNVNMaxPublicSamplerIDCount: 0
switchNVNGraphicsFirmwareMemory: 32
stadiaPresentMode: 0
stadiaTargetFramerate: 0
vulkanNumSwapchainBuffers: 3
vulkanEnableSetSRGBWrite: 0
vulkanEnablePreTransform: 0
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 0.1.0
preloadedAssets:
- { fileID: 11400000, guid: de713b620f455aa4ea49b72d0a2f915d, type: 2 }
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
xboxOneDisableKinectGpuReservation: 1
xboxOneEnable7thCore: 1
vrSettings:
enable360StereoCapture: 0
isWsaHolographicRemotingEnabled: 0
enableFrameTimingStats: 0
enableOpenGLProfilerGPURecorders: 1
useHDRDisplay: 0
D3DHDRBitDepth: 0
m_ColorGamuts: 00000000
targetPixelDensity: 30
resolutionScalingMode: 0
resetResolutionOnWindowResize: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.mycompany.myapp
Standalone: com.UnityTechnologies.com.unity.template-starter-kit
buildNumber:
Standalone: 0
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
aotOptions:
stripEngineCode: 1
iPhoneStrippingLevel: 0
iPhoneScriptCallOptimization: 0
ForceInternetPermission: 0
ForceSDCardPermission: 0
CreateWallpaper: 0
APKExpansionFiles: 0
keepLoadedShadersAlive: 0
StripUnusedMeshComponents: 0
strictShaderVariantMatching: 0
VertexChannelCompressionMask: 4054
iPhoneSdkVersion: 988
iOSTargetOSVersionString: 12.0
tvOSSdkVersion: 0
tvOSRequireExtendedGameController: 0
tvOSTargetOSVersionString: 12.0
uIPrerenderedIcon: 0
uIRequiresPersistentWiFi: 0
uIRequiresFullScreen: 1
uIStatusBarHidden: 1
uIExitOnSuspend: 0
uIStatusBarStyle: 0
appleTVSplashScreen: { fileID: 0 }
appleTVSplashScreen2x: { fileID: 0 }
tvOSSmallIconLayers: []
tvOSSmallIconLayers2x: []
tvOSLargeIconLayers: []
tvOSLargeIconLayers2x: []
tvOSTopShelfImageLayers: []
tvOSTopShelfImageLayers2x: []
tvOSTopShelfImageWideLayers: []
tvOSTopShelfImageWideLayers2x: []
iOSLaunchScreenType: 0
iOSLaunchScreenPortrait: { fileID: 0 }
iOSLaunchScreenLandscape: { fileID: 0 }
iOSLaunchScreenBackgroundColor:
serializedVersion: 2
rgba: 0
iOSLaunchScreenFillPct: 100
iOSLaunchScreenSize: 100
iOSLaunchScreenCustomXibPath:
iOSLaunchScreeniPadType: 0
iOSLaunchScreeniPadImage: { fileID: 0 }
iOSLaunchScreeniPadBackgroundColor:
serializedVersion: 2
rgba: 0
iOSLaunchScreeniPadFillPct: 100
iOSLaunchScreeniPadSize: 100
iOSLaunchScreeniPadCustomXibPath:
iOSLaunchScreenCustomStoryboardPath:
iOSLaunchScreeniPadCustomStoryboardPath:
iOSDeviceRequirements: []
iOSURLSchemes: []
macOSURLSchemes: []
iOSBackgroundModes: 0
iOSMetalForceHardShadows: 0
metalEditorSupport: 1
metalAPIValidation: 1
iOSRenderExtraFrameOnPause: 0
iosCopyPluginsCodeInsteadOfSymlink: 0
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:
iOSManualSigningProvisioningProfileType: 0
tvOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 0
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
shaderPrecisionModel: 0
clonedFromGUID: 3c72c65a16f0acb438eed22b8b16c24a
templatePackageId: com.unity.template.urp-blank#2.0.3
templateDefaultScene: Assets/Scenes/SampleScene.unity
useCustomMainManifest: 0
useCustomLauncherManifest: 0
useCustomMainGradleTemplate: 0
useCustomLauncherGradleManifest: 0
useCustomBaseGradleTemplate: 0
useCustomGradlePropertiesTemplate: 0
useCustomProguardFile: 0
AndroidTargetArchitectures: 10
AndroidTargetDevices: 0
AndroidSplashScreenScale: 0
androidSplashScreen: { fileID: 0 }
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidEnableArmv9SecurityFeatures: 0
AndroidBuildApkPerCpuArchitecture: 0
AndroidTVCompatibility: 0
AndroidIsGame: 1
AndroidEnableTango: 0
androidEnableBanner: 1
androidUseLowAccuracyLocation: 0
androidUseCustomKeystore: 0
m_AndroidBanners:
- width: 320
height: 180
banner: { fileID: 0 }
androidGamepadSupportLevel: 0
chromeosInputEmulation: 1
AndroidMinifyRelease: 0
AndroidMinifyDebug: 0
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons:
- m_BuildTarget:
m_Icons:
- serializedVersion: 2
m_Icon:
{ fileID: 2800000, guid: cdf16c0107d02d74a9dda29a4a01a0c0, type: 3 }
m_Width: 128
m_Height: 128
m_Kind: 0
m_BuildTargetPlatformIcons:
- m_BuildTarget: iPhone
m_Icons:
- m_Textures: []
m_Width: 180
m_Height: 180
m_Kind: 0
m_SubKind: iPhone
- m_Textures: []
m_Width: 120
m_Height: 120
m_Kind: 0
m_SubKind: iPhone
- m_Textures: []
m_Width: 167
m_Height: 167
m_Kind: 0
m_SubKind: iPad
- m_Textures: []
m_Width: 152
m_Height: 152
m_Kind: 0
m_SubKind: iPad
- m_Textures: []
m_Width: 76
m_Height: 76
m_Kind: 0
m_SubKind: iPad
- m_Textures: []
m_Width: 120
m_Height: 120
m_Kind: 3
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPad
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 3
m_SubKind: iPad
- m_Textures: []
m_Width: 87
m_Height: 87
m_Kind: 1
m_SubKind: iPhone
- m_Textures: []
m_Width: 58
m_Height: 58
m_Kind: 1
m_SubKind: iPhone
- m_Textures: []
m_Width: 29
m_Height: 29
m_Kind: 1
m_SubKind: iPhone
- m_Textures: []
m_Width: 58
m_Height: 58
m_Kind: 1
m_SubKind: iPad
- m_Textures: []
m_Width: 29
m_Height: 29
m_Kind: 1
m_SubKind: iPad
- m_Textures: []
m_Width: 60
m_Height: 60
m_Kind: 2
m_SubKind: iPhone
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 2
m_SubKind: iPhone
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 2
m_SubKind: iPad
- m_Textures: []
m_Width: 20
m_Height: 20
m_Kind: 2
m_SubKind: iPad
- m_Textures: []
m_Width: 1024
m_Height: 1024
m_Kind: 4
m_SubKind: App Store
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 0
m_SubKind:
- m_BuildTarget: tvOS
m_Icons:
- m_Textures: []
m_Width: 1280
m_Height: 768
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 800
m_Height: 480
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 400
m_Height: 240
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 4640
m_Height: 1440
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 2320
m_Height: 720
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 3840
m_Height: 1440
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 1920
m_Height: 720
m_Kind: 1
m_SubKind:
m_BuildTargetBatching: []
m_BuildTargetShaderSettings: []
m_BuildTargetGraphicsJobs: []
m_BuildTargetGraphicsJobMode: []
m_BuildTargetGraphicsAPIs:
- m_BuildTarget: iOSSupport
m_APIs: 10000000
m_Automatic: 1
- m_BuildTarget: AndroidPlayer
m_APIs: 0b000000
m_Automatic: 0
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0b000000
m_Automatic: 0
m_BuildTargetVRSettings: []
m_DefaultShaderChunkSizeInMB: 16
m_DefaultShaderChunkCount: 0
openGLRequireES31: 0
openGLRequireES31AEP: 0
openGLRequireES32: 0
m_TemplateCustomTags: {}
mobileMTRendering:
Android: 1
iPhone: 1
tvOS: 1
m_BuildTargetGroupLightmapEncodingQuality: []
m_BuildTargetGroupHDRCubemapEncodingQuality: []
m_BuildTargetGroupLightmapSettings: []
m_BuildTargetGroupLoadStoreDebugModeSettings: []
m_BuildTargetNormalMapEncoding: []
m_BuildTargetDefaultTextureCompressionFormat: []
playModeTestRunnerEnabled: 0
runPlayModeTestAsEditModeTest: 0
actionOnDotNetUnhandledException: 1
enableInternalProfiler: 0
logObjCUncaughtExceptions: 1
enableCrashReportAPI: 0
cameraUsageDescription:
locationUsageDescription:
microphoneUsageDescription:
bluetoothUsageDescription:
macOSTargetOSVersion: 10.13.0
switchNMETAOverride:
switchNetLibKey:
switchSocketMemoryPoolSize: 6144
switchSocketAllocatorPoolSize: 128
switchSocketConcurrencyLimit: 14
switchScreenResolutionBehavior: 2
switchUseCPUProfiler: 0
switchUseGOLDLinker: 0
switchLTOSetting: 0
switchApplicationID: 0x01004b9000490000
switchNSODependencies:
switchCompilerFlags:
switchTitleNames_0:
switchTitleNames_1:
switchTitleNames_2:
switchTitleNames_3:
switchTitleNames_4:
switchTitleNames_5:
switchTitleNames_6:
switchTitleNames_7:
switchTitleNames_8:
switchTitleNames_9:
switchTitleNames_10:
switchTitleNames_11:
switchTitleNames_12:
switchTitleNames_13:
switchTitleNames_14:
switchTitleNames_15:
switchPublisherNames_0:
switchPublisherNames_1:
switchPublisherNames_2:
switchPublisherNames_3:
switchPublisherNames_4:
switchPublisherNames_5:
switchPublisherNames_6:
switchPublisherNames_7:
switchPublisherNames_8:
switchPublisherNames_9:
switchPublisherNames_10:
switchPublisherNames_11:
switchPublisherNames_12:
switchPublisherNames_13:
switchPublisherNames_14:
switchPublisherNames_15:
switchIcons_0: { fileID: 0 }
switchIcons_1: { fileID: 0 }
switchIcons_2: { fileID: 0 }
switchIcons_3: { fileID: 0 }
switchIcons_4: { fileID: 0 }
switchIcons_5: { fileID: 0 }
switchIcons_6: { fileID: 0 }
switchIcons_7: { fileID: 0 }
switchIcons_8: { fileID: 0 }
switchIcons_9: { fileID: 0 }
switchIcons_10: { fileID: 0 }
switchIcons_11: { fileID: 0 }
switchIcons_12: { fileID: 0 }
switchIcons_13: { fileID: 0 }
switchIcons_14: { fileID: 0 }
switchIcons_15: { fileID: 0 }
switchSmallIcons_0: { fileID: 0 }
switchSmallIcons_1: { fileID: 0 }
switchSmallIcons_2: { fileID: 0 }
switchSmallIcons_3: { fileID: 0 }
switchSmallIcons_4: { fileID: 0 }
switchSmallIcons_5: { fileID: 0 }
switchSmallIcons_6: { fileID: 0 }
switchSmallIcons_7: { fileID: 0 }
switchSmallIcons_8: { fileID: 0 }
switchSmallIcons_9: { fileID: 0 }
switchSmallIcons_10: { fileID: 0 }
switchSmallIcons_11: { fileID: 0 }
switchSmallIcons_12: { fileID: 0 }
switchSmallIcons_13: { fileID: 0 }
switchSmallIcons_14: { fileID: 0 }
switchSmallIcons_15: { fileID: 0 }
switchManualHTML:
switchAccessibleURLs:
switchLegalInformation:
switchMainThreadStackSize: 1048576
switchPresenceGroupId:
switchLogoHandling: 0
switchReleaseVersion: 0
switchDisplayVersion: 1.0.0
switchStartupUserAccount: 0
switchTouchScreenUsage: 0
switchSupportedLanguagesMask: 0
switchLogoType: 0
switchApplicationErrorCodeCategory:
switchUserAccountSaveDataSize: 0
switchUserAccountSaveDataJournalSize: 0
switchApplicationAttribute: 0
switchCardSpecSize: -1
switchCardSpecClock: -1
switchRatingsMask: 0
switchRatingsInt_0: 0
switchRatingsInt_1: 0
switchRatingsInt_2: 0
switchRatingsInt_3: 0
switchRatingsInt_4: 0
switchRatingsInt_5: 0
switchRatingsInt_6: 0
switchRatingsInt_7: 0
switchRatingsInt_8: 0
switchRatingsInt_9: 0
switchRatingsInt_10: 0
switchRatingsInt_11: 0
switchRatingsInt_12: 0
switchLocalCommunicationIds_0:
switchLocalCommunicationIds_1:
switchLocalCommunicationIds_2:
switchLocalCommunicationIds_3:
switchLocalCommunicationIds_4:
switchLocalCommunicationIds_5:
switchLocalCommunicationIds_6:
switchLocalCommunicationIds_7:
switchParentalControl: 0
switchAllowsScreenshot: 1
switchAllowsVideoCapturing: 1
switchAllowsRuntimeAddOnContentInstall: 0
switchDataLossConfirmation: 0
switchUserAccountLockEnabled: 0
switchSystemResourceMemory: 16777216
switchSupportedNpadStyles: 22
switchNativeFsCacheSize: 32
switchIsHoldTypeHorizontal: 0
switchSupportedNpadCount: 8
switchSocketConfigEnabled: 0
switchTcpInitialSendBufferSize: 32
switchTcpInitialReceiveBufferSize: 64
switchTcpAutoSendBufferSizeMax: 256
switchTcpAutoReceiveBufferSizeMax: 256
switchUdpSendBufferSize: 9
switchUdpReceiveBufferSize: 42
switchSocketBufferEfficiency: 4
switchSocketInitializeEnabled: 1
switchNetworkInterfaceManagerInitializeEnabled: 1
switchPlayerConnectionEnabled: 1
switchUseNewStyleFilepaths: 0
switchUseLegacyFmodPriorities: 0
switchUseMicroSleepForYield: 1
switchEnableRamDiskSupport: 0
switchMicroSleepForYieldTime: 25
switchRamDiskSpaceSize: 12
ps4NPAgeRating: 12
ps4NPTitleSecret:
ps4NPTrophyPackPath:
ps4ParentalLevel: 11
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
ps4Category: 0
ps4MasterVersion: 01.00
ps4AppVersion: 01.00
ps4AppType: 0
ps4ParamSfxPath:
ps4VideoOutPixelFormat: 0
ps4VideoOutInitialWidth: 1920
ps4VideoOutBaseModeInitialWidth: 1920
ps4VideoOutReprojectionRate: 60
ps4PronunciationXMLPath:
ps4PronunciationSIGPath:
ps4BackgroundImagePath:
ps4StartupImagePath:
ps4StartupImagesFolder:
ps4IconImagesFolder:
ps4SaveDataImagePath:
ps4SdkOverride:
ps4BGMPath:
ps4ShareFilePath:
ps4ShareOverlayImagePath:
ps4PrivacyGuardImagePath:
ps4ExtraSceSysFile:
ps4NPtitleDatPath:
ps4RemotePlayKeyAssignment: -1
ps4RemotePlayKeyMappingDir:
ps4PlayTogetherPlayerCount: 0
ps4EnterButtonAssignment: 2
ps4ApplicationParam1: 0
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
ps4DownloadDataSize: 0
ps4GarlicHeapSize: 2048
ps4ProGarlicHeapSize: 2560
playerPrefsMaxSize: 32768
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps4pnSessions: 1
ps4pnPresence: 1
ps4pnFriends: 1
ps4pnGameCustomData: 1
playerPrefsSupport: 0
enableApplicationExit: 0
resetTempFolder: 1
restrictedAudioUsageRights: 0
ps4UseResolutionFallback: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
ps4UseLowGarlicFragmentationMode: 1
ps4SocialScreenEnabled: 0
ps4ScriptOptimizationLevel: 2
ps4Audio3dVirtualSpeakerCount: 14
ps4attribCpuUsage: 0
ps4PatchPkgPath:
ps4PatchLatestPkgPath:
ps4PatchChangeinfoPath:
ps4PatchDayOne: 0
ps4attribUserManagement: 0
ps4attribMoveSupport: 0
ps4attrib3DSupport: 0
ps4attribShareSupport: 0
ps4attribExclusiveVR: 0
ps4disableAutoHideSplash: 0
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
ps4attribVROutputEnabled: 0
monoEnv:
splashScreenBackgroundSourceLandscape: { fileID: 0 }
splashScreenBackgroundSourcePortrait: { fileID: 0 }
blurSplashScreenBackground: 1
spritePackerPolicy:
webGLMemorySize: 32
webGLExceptionSupport: 1
webGLNameFilesAsHashes: 0
webGLShowDiagnostics: 0
webGLDataCaching: 1
webGLDebugSymbols: 0
webGLEmscriptenArgs:
webGLModulesDirectory:
webGLTemplate: APPLICATION:Default
webGLAnalyzeBuildSize: 0
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 0
webGLWasmArithmeticExceptions: 0
webGLLinkerTarget: 1
webGLThreadsSupport: 0
webGLDecompressionFallback: 0
webGLInitialMemorySize: 32
webGLMaximumMemorySize: 2048
webGLMemoryGrowthMode: 2
webGLMemoryLinearGrowthStep: 16
webGLMemoryGeometricGrowthStep: 0.2
webGLMemoryGeometricGrowthCap: 96
webGLPowerPreference: 2
scriptingDefineSymbols:
Android: HYBRID_ENTITIES_CAMERA_CONVERSION
Standalone: HYBRID_ENTITIES_CAMERA_CONVERSION
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend:
Android: 1
il2cppCompilerConfiguration: {}
il2cppCodeGeneration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
suppressCommonWarnings: 1
allowUnsafeCode: 0
useDeterministicCompilation: 1
selectedPlatform: 0
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
gcIncremental: 0
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: HelloUnity
metroPackageVersion:
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:
metroCertificateIssuer:
metroCertificateNotAfter: 0000000000000000
metroApplicationDescription: HelloUnity
wsaImages: {}
metroTileShortName:
metroTileShowName: 0
metroMediumTileShowName: 0
metroLargeTileShowName: 0
metroWideTileShowName: 0
metroSupportStreamingInstall: 0
metroLastRequiredScene: 0
metroDefaultTileSize: 1
metroTileForegroundText: 2
metroTileBackgroundColor:
{ r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0 }
metroSplashScreenBackgroundColor:
{ r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1 }
metroSplashScreenUseBackgroundColor: 0
platformCapabilities: {}
metroTargetDeviceFamilies: {}
metroFTAName:
metroFTAFileTypes: []
metroProtocolName:
vcxProjDefaultLanguage:
XboxOneProductId:
XboxOneUpdateKey:
XboxOneSandboxId:
XboxOneContentId:
XboxOneTitleId:
XboxOneSCId:
XboxOneGameOsOverridePath:
XboxOnePackagingOverridePath:
XboxOneAppManifestOverridePath:
XboxOneVersion: 1.0.0.0
XboxOnePackageEncryption: 0
XboxOnePackageUpdateGranularity: 2
XboxOneDescription:
XboxOneLanguage:
- enus
XboxOneCapability: []
XboxOneGameRating: {}
XboxOneIsContentPackage: 0
XboxOneEnhancedXboxCompatibilityMode: 0
XboxOneEnableGPUVariability: 1
XboxOneSockets: {}
XboxOneSplashScreen: { fileID: 0 }
XboxOneAllowedProductIds: []
XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
XboxOneOverrideIdentityName:
XboxOneOverrideIdentityPublisher:
vrEditorSettings: {}
cloudServicesEnabled: {}
luminIcon:
m_Name:
m_ModelFolderPath:
m_PortalFolderPath:
luminCert:
m_CertPath:
m_SignPackage: 1
luminIsChannelApp: 0
luminVersion:
m_VersionCode: 1
m_VersionName:
hmiPlayerDataPath:
hmiForceSRGBBlit: 1
embeddedLinuxEnableGamepadInput: 1
hmiCpuConfiguration:
apiCompatibilityLevel: 6
activeInputHandler: 2
windowsGamepadBackendHint: 0
cloudProjectId:
framebufferDepthMemorylessMode: 0
qualitySettingsNames: []
projectName:
organizationId:
cloudEnabled: 0
legacyClampBlendShapeWeights: 0
hmiLoadingImage: { fileID: 0 }
virtualTexturingSupportEnabled: 0
insecureHttpOption: 0
i am trying to implent test ads on my Flutter app. So far, what i notice is that 3 out of 4 times my test ad rewarded video are showing, but sometimes they are not. This is what i am getting when the video is not loading. Since the other times the video laods, i don't think that is a setup problem, but i am attaching my code.
This is the error: (Real device, Samsung Galaxy S10)
I/DynamiteModule( 9385): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:221908400
I/DynamiteModule( 9385): Selected remote version of com.google.android.gms.ads.dynamite, version >= 221908400
V/DynamiteModule( 9385): Dynamite loader version >= 2, using loadModule2NoCrashUtils
I/Ads ( 9385): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("57D8CCEE680443B3894B93AB5E6F61C8")) to get test ads on this device.
W/Ads ( 9385): Not retrying to fetch app settings
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 0
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 1
I/ExoPlayerImpl( 9385): Init ExoPlayerLib/2.4.2 [beyond1, SM-G973F, samsung, 31]
D/MetadataUtil( 9385): Skipped unknown metadata entry: gsst
D/MetadataUtil( 9385): Skipped unknown metadata entry: gstd
I/CCodec ( 9385): state->set(ALLOCATING)
I/CCodec ( 9385): allocate(c2.android.aac.decoder)
I/CCodec ( 9385): setting up 'default' as default (vendor) store
I/CCodec ( 9385): Created component [c2.android.aac.decoder]
I/CCodec ( 9385): state->set(ALLOCATED)
D/CCodecConfig( 9385): read media type: audio/mp4a-latm
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater( 9385): extent() != 1 for single value type: algo.buffers.pool-ids.values
I/CCodecConfig( 9385): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig( 9385): c2 config diff is Dict {
D/CCodecConfig( 9385): c2::u32 coded.aac-packaging.value = 0
D/CCodecConfig( 9385): c2::u32 coded.bitrate.value = 64000
D/CCodecConfig( 9385): c2::u32 coded.pl.level = 0
D/CCodecConfig( 9385): c2::u32 coded.pl.profile = 8192
D/CCodecConfig( 9385): c2::i32 coding.drc.album-mode.value = 0
D/CCodecConfig( 9385): c2::float coding.drc.attenuation-factor.value = 1
D/CCodecConfig( 9385): c2::float coding.drc.boost-factor.value = 1
D/CCodecConfig( 9385): c2::i32 coding.drc.compression-mode.value = 3
D/CCodecConfig( 9385): c2::i32 coding.drc.effect-type.value = 3
D/CCodecConfig( 9385): c2::float coding.drc.encoded-level.value = 0.25
D/CCodecConfig( 9385): c2::float coding.drc.reference-level.value = -16
D/CCodecConfig( 9385): c2::u32 input.buffers.max-size.value = 8192
D/CCodecConfig( 9385): c2::u32 input.delay.value = 0
D/CCodecConfig( 9385): string input.media-type.value = "audio/mp4a-latm"
D/CCodecConfig( 9385): c2::u32 output.delay.value = 2
D/CCodecConfig( 9385): c2::float output.drc.output-loudness.value = 0.25
D/CCodecConfig( 9385): string output.media-type.value = "audio/raw"
D/CCodecConfig( 9385): c2::u32 raw.channel-count.value = 1
D/CCodecConfig( 9385): c2::u32 raw.max-channel-count.value = 8
D/CCodecConfig( 9385): c2::u32 raw.sample-rate.value = 44100
D/CCodecConfig( 9385): }
D/CCodec ( 9385): [c2.android.aac.decoder] buffers are bound to CCodec for this session
I/CCodec ( 9385): appPid(9385) width(0) height(0)
D/CCodecConfig( 9385): no c2 equivalents for language
D/CCodecConfig( 9385): no c2 equivalents for flags
D/CCodecConfig( 9385): config failed => CORRUPTED
D/CCodecConfig( 9385): c2 config diff is c2::u32 raw.channel-count.value = 2
W/Codec2Client( 9385): query -- param skipped: index = 1107298332.
D/CCodec ( 9385): client requested max input size 540, which is smaller than what component recommended (8192); overriding with component recommendation.
W/CCodec ( 9385): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec ( 9385): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec ( 9385): int32_t aac-drc-album-mode = 0
D/CCodec ( 9385): int32_t aac-drc-boost-level = 127
D/CCodec ( 9385): int32_t aac-drc-cut-level = 127
D/CCodec ( 9385): int32_t aac-drc-effect-type = 3
D/CCodec ( 9385): int32_t aac-encoded-target-level = -1
D/CCodec ( 9385): int32_t aac-max-output-channel_count = 8
D/CCodec ( 9385): int32_t aac-target-ref-level = 64
D/CCodec ( 9385): int32_t bitrate = 64000
D/CCodec ( 9385): int32_t channel-count = 2
D/CCodec ( 9385): int32_t level = 0
D/CCodec ( 9385): int32_t max-input-size = 8192
D/CCodec ( 9385): string mime = "audio/mp4a-latm"
D/CCodec ( 9385): int32_t profile = 2
D/CCodec ( 9385): int32_t sample-rate = 44100
D/CCodec ( 9385): int64_t durationUs = 0
D/CCodec ( 9385): }
D/CCodec ( 9385): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec ( 9385): int32_t aac-drc-album-mode = 0
D/CCodec ( 9385): int32_t aac-drc-boost-level = 127
D/CCodec ( 9385): int32_t aac-drc-cut-level = 127
D/CCodec ( 9385): int32_t aac-drc-effect-type = 3
D/CCodec ( 9385): int32_t aac-drc-output-loudness = -1
D/CCodec ( 9385): int32_t aac-encoded-target-level = -1
D/CCodec ( 9385): int32_t aac-max-output-channel_count = 8
D/CCodec ( 9385): int32_t aac-target-ref-level = 64
D/CCodec ( 9385): int32_t channel-count = 2
D/CCodec ( 9385): string mime = "audio/raw"
D/CCodec ( 9385): int32_t sample-rate = 44100
D/CCodec ( 9385): }
I/CCodecConfig( 9385): query failed after returning 19 values (BAD_INDEX)
I/CCodec ( 9385): state->set(STARTING)
W/Codec2Client( 9385): query -- param skipped: index = 1342179345.
W/Codec2Client( 9385): query -- param skipped: index = 2415921170.
W/Codec2Client( 9385): query -- param skipped: index = 1610614798.
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] Created input block pool with allocatorID 16 => poolID 48 - OK (0)
I/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] Created output block pool with allocatorID 16 => poolID 277 - OK
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] Configured output block pool ids 277 => OK
I/CCodec ( 9385): state->set(RUNNING)
I/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] 4 initial input buffers available
I/ACodec ( 9385): [] Now uninitialized
I/ACodec ( 9385): [] onAllocateComponent
I/OMXClient( 9385): IOmx service obtained
E/ACodec ( 9385): Unable to instantiate codec 'OMX.Exynos.avc.dec' with err 0xfffffff4.
E/ACodec ( 9385): signalError(omxError 0xfffffff4, internalError -12)
E/MediaCodec( 9385): Codec reported err 0xfffffff4, actionCode 0, while in state 1/INITIALIZING
W/MediaCodec-JNI( 9385): try to release MediaCodec from JMediaCodec::~JMediaCodec()...
W/MediaCodec-JNI( 9385): done releasing MediaCodec from JMediaCodec::~JMediaCodec().
E/ExoPlayerImplInternal( 9385): Renderer error.
E/ExoPlayerImplInternal( 9385): com.google.android.gms.ads.exoplayer3.c
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:20)
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:4)
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:1)
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:3)
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:42)
E/ExoPlayerImplInternal( 9385): at android.os.Handler.dispatchMessage(Handler.java:102)
E/ExoPlayerImplInternal( 9385): at android.os.Looper.loopOnce(Looper.java:226)
E/ExoPlayerImplInternal( 9385): at android.os.Looper.loop(Looper.java:313)
E/ExoPlayerImplInternal( 9385): at android.os.HandlerThread.run(HandlerThread.java:67)
E/ExoPlayerImplInternal( 9385): Caused by: com.google.android.gms.ads.exoplayer3.mediacodec.b: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, video/avc, -1, null, [1280, 720, -1.0], [-1, -1])
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:19)
E/ExoPlayerImplInternal( 9385): ... 8 more
E/ExoPlayerImplInternal( 9385): Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.Exynos.avc.dec, error 0xfffffff4
E/ExoPlayerImplInternal( 9385): at android.media.MediaCodec.native_setup(Native Method)
E/ExoPlayerImplInternal( 9385): at android.media.MediaCodec.<init>(MediaCodec.java:1961)
E/ExoPlayerImplInternal( 9385): at android.media.MediaCodec.createByCodecName(MediaCodec.java:1938)
E/ExoPlayerImplInternal( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:9)
E/ExoPlayerImplInternal( 9385): ... 8 more
I/CCodec ( 9385): state->set(STOPPING)
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
W/Ads ( 9385): Precache error
W/Ads ( 9385): com.google.android.gms.ads.exoplayer3.c
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:20)
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:4)
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:1)
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:3)
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:42)
W/Ads ( 9385): at android.os.Handler.dispatchMessage(Handler.java:102)
W/Ads ( 9385): at android.os.Looper.loopOnce(Looper.java:226)
W/Ads ( 9385): at android.os.Looper.loop(Looper.java:313)
W/Ads ( 9385): at android.os.HandlerThread.run(HandlerThread.java:67)
W/Ads ( 9385): Caused by: com.google.android.gms.ads.exoplayer3.mediacodec.b: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, video/avc, -1, null, [1280, 720, -1.0], [-1, -1])
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:19)
W/Ads ( 9385): ... 8 more
W/Ads ( 9385): Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.Exynos.avc.dec, error 0xfffffff4
W/Ads ( 9385): at android.media.MediaCodec.native_setup(Native Method)
W/Ads ( 9385): at android.media.MediaCodec.<init>(MediaCodec.java:1961)
W/Ads ( 9385): at android.media.MediaCodec.createByCodecName(MediaCodec.java:1938)
W/Ads ( 9385): at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#221908400#221908400057.447330857.447330857:9)
W/Ads ( 9385): ... 8 more
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 9385): [c2.android.aac.decoder#324] MediaCodec discarded an unknown buffer
I/CCodec ( 9385): state->set(ALLOCATED)
I/CCodec ( 9385): state->set(RELEASING)
I/CCodec ( 9385): [c2.android.aac.decoder] release(1)
I/CCodec ( 9385): state->set(RELEASED)
I/hw-BpHwBinder( 9385): onLastStrongRef automatically unlinking death recipients
I/MediaCodec( 9385): Codec shutdown complete
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 0
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 1
D/BufferPoolAccessor2.0( 9385): bufferpool2 0x777c2d7a08 : 0(0 size) total buffers - 0(0 size) used buffers - 1/6 (recycle/alloc) - 5/8 (fetch/transfer)
D/BufferPoolAccessor2.0( 9385): evictor expired: 1, evicted: 1
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 0
I/ViewRootImpl#563214[MainActivity]( 9385): ViewPostIme pointer 1
D/BufferPoolAccessor2.0( 9385): evictor expired: 1, evicted: 0
D/BufferPoolAccessor2.0( 9385): bufferpool2 0x777c3571a8 : 0(0 size) total buffers - 0(0 size) used buffers - 1/6 (recycle/alloc) - 5/8 (fetch/transfer)
D/BufferPoolAccessor2.0( 9385): evictor expired: 1, evicted: 1
I/pestini.essenc( 9385): Background concurrent copying GC freed 573699(23MB) AllocSpace objects, 4(80KB) LOS objects, 43% free, 30MB/54MB, paused 232us,136us total 120.237ms
I/Ads ( 9385): Ad failed to load : 0
I/flutter ( 9385): Failed to load a rewarded ad: Internal error.
W/Ads ( 9385): Failed to preload url gcache://video/media/8744318498482049952?url=https%3A%2F%2Frr1---sn-uxaxpu5ap5-apol.googlevideo.com%2Fvideoplayback%3Fexpire%3D1661099020%26ei%3DjOsBY_yGIor_gAehs6ow%26ip%3D79.21.162.29%26id%3D795a0f5850e653a0%26itag%3D22%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DLS%26mm%3D31%26mn%3Dsn-uxaxpu5ap5-apol%26ms%3Dau%26mv%3Dm%26mvi%3D1%26pl%3D24%26susc%3Dgvp%26acao%3Dyes%26ctier%3DL%26mime%3Dvideo%252Fmp4%26vprv%3D1%26dur%3D5.038%26lmt%3D1606000670604054%26mt%3D1661069832%26txp%3D1211222%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Csusc%252Cacao%252Cctier%252Cmime%252Cvprv%252Cdur%252Clmt%26sig%3DAOq0QJ8wRQIgGnvHqkqA7FF7lDY492LRjEjdWvBXmcPJ7xXW7TyqniICIQDPrVizMFRdNZ_sfM9-LixHUPOCGqZuFQiFX131KzmH4w%253D%253D%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%26lsig%3DAG3C_xAwRQIgVaTrgTmchNN6aeKKZ3jqu_Jn8ufCI8Rc0FS9eq4kMLMCIQDRyVb6NYdv4le9BEjPs4N8loanOFOPpM27bOZ22ZM2gQ%253D%253D%26cpn%3DnVl-a3BtlRhfCqIr%26ic%3Dgmasdk&tag.duration=5038&tag.check_url=https%3A%2F%2Frr1---sn-uxaxpu5ap5-apol.googlevideo.com%2Fvideoplayback%3Fexpire%3D1661099020%26ei%3DjOsBY_yGIor_gAehs6ow%26ip%3D79.21.162.29%26id%3D795a0f5850e653a0%26itag%3D22%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DLS%26mm%3D31%26mn%3Dsn-uxaxpu5ap5-apol%26ms%3Dau%26mv%3Dm%26mvi%3D1%26pl%3D24%26susc%3Dgvp%26acao%3Dyes%26ctier%3DL%26mime%3Dvideo%2Fmp4%26vprv%3D1%26dur%3D5.038%26lmt%3D1606000670604054%26mt%3D1661069832%26txp%3D1211222%26sparams%3Dexpire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Csusc%2Cacao%2Cctier%2Cmime%2Cvprv%2Cdur%2Clmt%26sig%3DAOq0QJ8wRQIgGnvHqkqA7FF7lDY492LRjEjdWvBXmcPJ7xXW7TyqniICIQDPrVizMFRdNZ_sfM9-LixHUPOCGqZuFQiFX131KzmH4w%3D%3D%26lsparams%3Dmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%26lsig%3DAG3C_xAwRQIgVaTrgTmchNN6aeKKZ3jqu_Jn8ufCI8Rc0FS9eq4kMLMCIQDRyVb6NYdv4le9BEjPs4N8loanOFOPpM27bOZ22ZM2gQ%3D%3D%26cpn%3DnVl-a3BtlRhfCqIr Exception: ExoPlayer was released during preloading.
W/Ads ( 9385): #004 The webview is destroyed. Ignoring action.
W/Ads ( 9385): Failed to preload url gcache://video/media/-438303185308675417?url=https%3A%2F%2Frr2---sn-uxaxpu5ap5-apol.googlevideo.com%2Fvideoplayback%3Fexpire%3D1661098796%26ei%3DrOoBY-STOoXix_APlPi-sAI%26ip%3D79.21.162.29%26id%3Df9ead5933fc112a7%26itag%3D22%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DEA%26mm%3D31%26mn%3Dsn-uxaxpu5ap5-apol%26ms%3Dau%26mv%3Dm%26mvi%3D2%26pcm2cms%3Dyes%26pl%3D24%26susc%3Dgvp%26acao%3Dyes%26ctier%3DL%26mime%3Dvideo%252Fmp4%26vprv%3D1%26dur%3D7.267%26lmt%3D1609247274254961%26mt%3D1661069127%26txp%3D1211222%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Csusc%252Cacao%252Cctier%252Cmime%252Cvprv%252Cdur%252Clmt%26sig%3DAOq0QJ8wRQIhAKtTUzu10duuyNKA-tGUC1RWgchGK_uGHSDZdrav3sdGAiBCwnEMg6POUb_KHgvB6F8pf_4KmvyXoLJhS3_q8b-Iug%253D%253D%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpcm2cms%252Cpl%26lsig%3DAG3C_xAwRAIgTTAj7kuZyg1hKG_X6a9PcblwqoCCmRioT58RU7RQGccCIB7KyWOT9_iD5cpwMF9gEGrUgKNYFgees0Wxq_VTQeca%26cpn%3DKwm_j2j_MqowGqx3%26ic%3Dgmasdk&tag.duration=7267&tag.check_url=https%3A%2F%2Frr2---sn-uxaxpu5ap5-apol.googlevideo.com%2Fvideoplayback%3Fexpire%3D1661098796%26ei%3DrOoBY-STOoXix_APlPi-sAI%26ip%3D79.21.162.29%26id%3Df9ead5933fc112a7%26itag%3D22%26source%3Dyoutube%26requiressl%3Dyes%26mh%3DEA%26mm%3D31%26mn%3Dsn-uxaxpu5ap5-apol%26ms%3Dau%26mv%3Dm%26mvi%3D2%26pcm2cms%3Dyes%26pl%3D24%26susc%3Dgvp%26acao%3Dyes%26ctier%3DL%26mime%3Dvideo%2Fmp4%26vprv%3D1%26dur%3D7.267%26lmt%3D1609247274254961%26mt%3D1661069127%26txp%3D1211222%26sparams%3Dexpire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Csusc%2Cacao%2Cctier%2Cmime%2Cvprv%2Cdur%2Clmt%26sig%3DAOq0QJ8wRQIhAKtTUzu10duuyNKA-tGUC1RWgchGK_uGHSDZdrav3sdGAiBCwnEMg6POUb_KHgvB6F8pf_4KmvyXoLJhS3_q8b-Iug%3D%3D%26lsparams%3Dmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%26lsig%3DAG3C_xAwRAIgTTAj7kuZyg1hKG_X6a9PcblwqoCCmRioT58RU7RQGccCIB7KyWOT9_iD5cpwMF9gEGrUgKNYFgees0Wxq_VTQeca%26cpn%3DKwm_j2j_MqowGqx3 Exception: Timeout reached. Limit: 300000 ms
This is how i implemented rewared video test ads.
bool _isRewardedAdReady = false;
RewardedAd? _rewardedAd;
void _loadRewardedAd() {
RewardedAd.load(
adUnitId: AdHelper.rewardedAdUnitId,
request: AdRequest(),
rewardedAdLoadCallback: RewardedAdLoadCallback(
onAdLoaded: (ad) {
_rewardedAd = ad;
ad.fullScreenContentCallback = FullScreenContentCallback(
onAdDismissedFullScreenContent: (ad) {
setState(() {
_isRewardedAdReady = false;
});
_loadRewardedAd();
},
);
setState(() {
_isRewardedAdReady = true;
});
},
onAdFailedToLoad: (err) {
print('Failed to load a rewarded ad: ${err.message}');
setState(() {
_isRewardedAdReady = false;
});
},
),
);
}
#override
void initState() {
super.initState();
_loadRewardedAd();
}
#override
void dispose() {
_rewardedAd?.dispose();
super.dispose();
}
On the widget, i want to use to display the ad, i have this code
if (isRewardedAdReady) {
rewardedAd?.show(onUserEarnedReward:
(AdWithoutView ad, RewardItem reward) {
print(
'$ad with reward $RewardItem(${reward.amount}, ${reward.type}');
});
}
The implementation looks correct. You can may be check if the rewarded video is loaded or not before you load a new one..
if(isRewardedAdReady == false)
{
load a new ad here;
}
Also When you open the screen on which you wish to show the ad first load the ad and keep it ready. Then when you wish to display it check if its ready and display it. That gives you some time to load the ad. In the current implementation I see that you are setting state of isRewardedAdReady and that will trigger showing the ad immediately the ad is ready(unless they are implemented differently, sorry if I am wrong). Also please check the variables _isRewardedAdReady and isRewardedAdReady are they same or different (notice you missed the underscore). Since you mentioned that it is displaying ads properly you may also try on other devices or simulator too.
I am trying to create a dog photo/video generator app using Flutter and Dart. It basically sends a get request to a website called random.Dog to get a url to show on my app. Sometimes the url is a video and sometimes it is a img. When it is a video my app just buffers and this console message keeps on coming:
E/flutter ( 4345): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception:
MissingPluginException(No implementation found for method init on channel better_player_channel)
E/flutter ( 4345): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345):
E/flutter ( 4345): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method create on channel better_player_channel)
E/flutter ( 4345): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345): #1 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:358:43)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345): #2 MethodChannelVideoPlayer.create (package:better_player/src/video_player/method_channel_video_player.dart:38:9)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345): #3 VideoPlayerController._create (package:better_player/src/video_player/video_player.dart:202:18)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345):
I/flutter ( 4345): {"fileSizeBytes":3294982,"url":"https://random.dog/a922da9a-437c-4400-9d94-f36ec2e5452c.mp4"}
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 2)
D/BufferPoolAccessor2.0( 4345): bufferpool2 0xeac5e4a8 : 5(40960 size) total buffers - 5(40960 size) used buffers - 1/7 (recycle/alloc) - 6/45600 (fetch/transfer)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
I/CCodecConfig( 4345): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig( 4345): c2 config diff is c2::i32 coding.drc.compression-mode.value = 3
W/Codec2Client( 4345): query -- param skipped: index = 1342179345.
W/Codec2Client( 4345): query -- param skipped: index = 2415921170.
W/Codec2Client( 4345): query -- param skipped: index = 1610614798.
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers( 4345): int32_t aac-drc-album-mode = 0
D/CCodecBuffers( 4345): int32_t aac-drc-boost-level = 127
D/CCodecBuffers( 4345): int32_t aac-drc-cut-level = 127
D/CCodecBuffers( 4345): int32_t aac-drc-effect-type = 3
D/CCodecBuffers( 4345): int32_t aac-drc-heavy-compression = 3
D/CCodecBuffers( 4345): int32_t aac-drc-output-loudness = -1
D/CCodecBuffers( 4345): int32_t aac-encoded-target-level = -1
D/CCodecBuffers( 4345): int32_t aac-max-output-channel_count = 8
D/CCodecBuffers( 4345): int32_t aac-target-ref-level = 64
D/CCodecBuffers( 4345): int32_t channel-count = 1
D/CCodecBuffers( 4345): string mime = "audio/raw"
D/CCodecBuffers( 4345): int32_t sample-rate = 44100
D/CCodecBuffers( 4345): }
D/CCodecConfig( 4345): c2 config diff is c2::i32 coding.drc.compression-mode.value = 1
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers( 4345): int32_t aac-drc-album-mode = 0
D/CCodecBuffers( 4345): int32_t aac-drc-boost-level = 127
D/CCodecBuffers( 4345): int32_t aac-drc-cut-level = 127
D/CCodecBuffers( 4345): int32_t aac-drc-effect-type = 3
D/CCodecBuffers( 4345): int32_t aac-drc-heavy-compression = 1
D/CCodecBuffers( 4345): int32_t aac-drc-output-loudness = -1
D/CCodecBuffers( 4345): int32_t aac-encoded-target-level = -1
D/CCodecBuffers( 4345): int32_t aac-max-output-channel_count = 8
D/CCodecBuffers( 4345): int32_t aac-target-ref-level = 64
D/CCodecBuffers( 4345): int32_t channel-count = 1
D/CCodecBuffers( 4345): string mime = "audio/raw"
D/CCodecBuffers( 4345): int32_t sample-rate = 44100
D/CCodecBuffers( 4345): }
D/BufferPoolAccessor2.0( 4345): bufferpool2 0xeac5e4a8 : 5(40960 size) total buffers - 5(40960 size) used buffers - 1/7 (recycle/alloc) - 6/45824 (fetch/transfer)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 1)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
I/chatty ( 4345): uid=10154(com.example.randomdog) HwBinder:4345_1 identical 4 lines
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
D/BufferPoolAccessor2.0( 4345): bufferpool2 0xeac5e4a8 : 5(40960 size) total buffers - 5(40960 size) used buffers - 1/7 (recycle/alloc) - 6/46039 (fetch/transfer)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 3)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 4)
D/BufferPoolAccessor2.0( 4345): bufferpool2 0xeac5e4a8 : 5(40960 size) total buffers - 5(40960 size) used buffers - 1/7 (recycle/alloc) - 6/46268 (fetch/transfer)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 2)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 1)
D/BufferPoolAccessor2.0( 4345): bufferpool2 0xeac5e4a8 : 5(40960 size) total buffers - 5(40960 size) used buffers - 1/7 (recycle/alloc) - 6/46498 (fetch/transfer)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 3)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 4)
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
I/CCodecConfig( 4345): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig( 4345): c2 config diff is c2::i32 coding.drc.compression-mode.value = 3
W/Codec2Client( 4345): query -- param skipped: index = 1342179345.
W/Codec2Client( 4345): query -- param skipped: index = 2415921170.
W/Codec2Client( 4345): query -- param skipped: index = 1610614798.
D/CCodecBuffers( 4345): [c2.android.aac.decoder#768:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
And my video doenst show up on my emulator. What seems to be the problem and how do I fix it? My minimal code:
import 'package:better_player/better_player.dart';
void main() => runApp(MaterialApp(home: RandomDog()));
class RandomDog extends StatefulWidget {
#override
_RandomDogState createState() => _RandomDogState();
}
class _RandomDogState extends State<RandomDog> {
var headers = {'Content-Type': 'application/json'};
var body = {};
var video = false;
var img = false;
var message;
var loading = true;
var _controller;
#override
void initState() {
getDog();
super.initState();
}
getDog() async {
loading=true;
var response = await http.get(Uri.https('random.dog', '/woof.json'));
print(response.body);
message = jsonDecode(response.body);
if (message['url'].contains('gif') || message['url'].contains('png') ||
message['url'].contains('jpg') || message['url'].contains('jpeg')) {
video = false;
img = true;
} else {
video = true;
img = false;
}
loading = false;
setState(() {
});
}
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
. . .
body: Center(
child: loading == true ? CircularProgressIndicator() : Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Visibility(visible: img,
child: Image.network(message['url'], fit: BoxFit.scaleDown,)),
// Visibility(visible: video,child: VideoApp(url:message['url'])),
video == true? CircularProgressIndicator() :
Visibility(visible: video, child: BetterPlayer.network(message['url'],betterPlayerConfiguration: BetterPlayerConfiguration(autoPlay: true),)), //Chewie(controller: _controller,)
OutlinedButton(onPressed: () async {
getDog();
}, child: Text('GENERATE')),
],
),
),
);
}
}
Hope this solution work for you, Try to initialize your betterPlayer in your function getDog() by using :
BetterPlayerController _betterPlayerController; //declare first
BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(
BetterPlayerDataSourceType.network,
"message[url]");
_betterPlayerController = BetterPlayerController(
BetterPlayerConfiguration(),
betterPlayerDataSource: betterPlayerDataSource);
after that in your widget after CircularProgressIndicator you add this :
BetterPlayer(
controller: _betterPlayerController, ),
trying to use slide menu from function https://coronalabs.com/blog/2014/04/08/widgets-creating-a-sliding-panel/
I followed exactly the suggested code and I created a panel with 3 texts and one button. Then I added an event to the button to close the panel, but it does not work. Cannot understand why..:(. Here is the code:
local panel = widget.newPanel
{
location = "left",
--onComplete = panelTransDone,
width = display.contentWidth * 0.8,
height = display.contentHeight * 0.8,
speed = 500,
--inEasing = easing.outBack,
outEasing = easing.outCubic
}
panel.background = display.newRect( 100, -50, 900, 730 )
panel.background:setFillColor( 0.1, 0.1, 0.1, 0.9 )
panel:insert( panel.background )
panel.item1 = display.newText( "GAME DESCRIPTION", 0, 0, native.systemFontBold, 40 )
panel.item1:setFillColor( 1, 1, 0 )
panel.item1.x = -95
panel.item1.y = -350
panel:insert( panel.item1 )
panel.item2 = display.newText( "SET SOUNDS", 0, 0, native.systemFontBold, 40 )
panel.item2:setFillColor( 1, 1, 0 )
panel.item2.x = -170
panel.item2.y = -250
panel:insert( panel.item2 )
panel.item3 = display.newText( "CHECK SCORE", 0, 0, native.systemFontBold, 40 )
panel.item3:setFillColor( 1, 1, 0 )
panel.item3.x = -150
panel.item3.y = -150
panel:insert( panel.item3 )
panel.item4 = display.newText( "CLOSE", 0, 0, native.systemFontBold, 40 )
panel.item4:setFillColor( 1, 1, 0 )
panel.item4.x = -230
panel.item4.y = -50
panel:insert( panel.item4 )
local bottoneex = widget.newButton
{
--defaultFile = "play.png",
label="ESCI",
labelColor =
{
default = { 1, 1, 0, 255 },
},
font = native.systemFont,
fontSize = 40,
emboss = false,
textonly = true,
onEvent = provap
}
bottoneex.x = -250
bottoneex.y = 50
panel:insert( bottoneex )
function apripanel()
panel:show()
panel:toFront()
end
function provap()
panel:hide()
end
My target is to build a slide menu by adding to this panel several menu items. How can I achieve that? I tried putting a button ( textonly = true ) but I am not sure...what if I add displaytext (as I did)? How can I add listeners to texts?
Sorry for silly questions but I am quit new to this language! :)
Thanks a lot for your help! Ubaldo
Hiding the menu works for me, maybe you use an old version of newPanel.lua, this should work for you.
main.lua
widget = require("widget")
require("newPanel")
BG = display.newRect(160,240,300,460)
BG:setFillColor( 0.1, 0.1, 0.1, 1.0 )
local panel = widget.newPanel
{
location = "left",
onComplete = panelTransDone,
width = display.contentWidth*0.8,
height = display.contentHeight,
speed = 500,
inEasing = easing.outBack,
outEasing = easing.outCubic
}
panel.background = display.newRect( 0, 0, 320, 480 )
panel.background:setFillColor( 0.3, 0.3, 0.3, 0.9 )
panel:insert( panel.background )
panel.item1 = display.newText( "Item1", 0, 0, native.systemFontBold, 10 )
panel.item1:setFillColor( 1, 1, 0 )
panel:insert( panel.item1 )
local function ButtonEvent1(e)
if ( "ended" == e.phase ) then
print( "Button 1" )
panel:show()
panel:toFront()
end
end
local function ButtonEvent2(e)
if ( "ended" == e.phase ) then
print( "Button 1" )
panel:hide()
end
end
local B1 = widget.newButton({left = 100,top = 200,id = "button1",label = "Show",onEvent = ButtonEvent1})
local B2 = widget.newButton({left = 100,top = 300,id = "button2",label = "Hide",onEvent = ButtonEvent2})
newPanel.lua
function widget.newPanel( options )
local customOptions = options or {}
local opt = {}
opt.location = customOptions.location or "top"
local default_width, default_height
if ( opt.location == "top" or opt.location == "bottom" ) then
default_width = display.contentWidth
default_height = display.contentHeight * 0.33
else
default_width = display.contentWidth * 0.33
default_height = display.contentHeight
end
opt.width = customOptions.width or default_width
opt.height = customOptions.height or default_height
opt.speed = customOptions.speed or 500
opt.inEasing = customOptions.inEasing or easing.linear
opt.outEasing = customOptions.outEasing or easing.linear
if ( customOptions.onComplete and type(customOptions.onComplete) == "function" ) then
opt.listener = customOptions.onComplete
else
opt.listener = nil
end
local container = display.newContainer( opt.width, opt.height )
if ( opt.location == "left" ) then
container.anchorX = 1.0
container.x = display.screenOriginX
container.anchorY = 0.5
container.y = display.contentCenterY
elseif ( opt.location == "right" ) then
container.anchorX = 0.0
container.x = display.actualContentWidth
container.anchorY = 0.5
container.y = display.contentCenterY
elseif ( opt.location == "top" ) then
container.anchorX = 0.5
container.x = display.contentCenterX
container.anchorY = 1.0
container.y = display.screenOriginY
else
container.anchorX = 0.5
container.x = display.contentCenterX
container.anchorY = 0.0
container.y = display.actualContentHeight
end
function container:show()
local options = {
time = opt.speed,
transition = opt.inEasing
}
if ( opt.listener ) then
options.onComplete = opt.listener
self.completeState = "shown"
end
if ( opt.location == "top" ) then
options.y = display.screenOriginY + opt.height
elseif ( opt.location == "bottom" ) then
options.y = display.actualContentHeight - opt.height
elseif ( opt.location == "left" ) then
options.x = display.screenOriginX + opt.width
else
options.x = display.actualContentWidth - opt.width
end
transition.to( self, options )
end
function container:hide()
local options = {
time = opt.speed,
transition = opt.outEasing
}
if ( opt.listener ) then
options.onComplete = opt.listener
self.completeState = "hidden"
end
if ( opt.location == "top" ) then
options.y = display.screenOriginY
elseif ( opt.location == "bottom" ) then
options.y = display.actualContentHeight
elseif ( opt.location == "left" ) then
options.x = display.screenOriginX
else
options.x = display.actualContentWidth
end
transition.to( self, options )
end
return container
end
I'm developing an android app with the libav and I'm trying decode a 3gp with code below:
#define simbiLog(...) __android_log_print(ANDROID_LOG_DEBUG, "simbiose", __VA_ARGS__)
...
AVCodec *codec;
AVCodecContext *c = NULL;
int len;
FILE *infile, *outfile;
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
AVPacket avpkt;
AVFrame *decoded_frame = NULL;
simbiLog("inbuf size: %d", sizeof(inbuf) / sizeof(inbuf[0]));
av_register_all();
av_init_packet(&avpkt);
codec = avcodec_find_decoder(AV_CODEC_ID_AMR_NB);
if (!codec) {
simbiLog("codec not found");
return ERROR;
}
c = avcodec_alloc_context3(codec);
if (!c) {
simbiLog("Could not allocate audio codec context");
return ERROR;
}
int open = avcodec_open2(c, codec, NULL);
if (open < 0) {
simbiLog("could not open codec %d", open);
return ERROR;
}
infile = fopen(inputPath, "rb");
if (!infile) {
simbiLog("could not open %s", inputPath);
return ERROR;
}
outfile = fopen(outputPath, "wb");
if (!outfile) {
simbiLog("could not open %s", outputPath);
return ERROR;
}
avpkt.data = inbuf;
avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, infile);
int iterations = 0;
while (avpkt.size > 0) {
simbiLog("iteration %d", (++iterations));
simbiLog("avpkt.size %d avpkt.data %X", avpkt.size, avpkt.data);
int got_frame = 0;
if (!decoded_frame) {
if (!(decoded_frame = avcodec_alloc_frame())) {
simbiLog("out of memory");
return ERROR;
}
} else {
avcodec_get_frame_defaults(decoded_frame);
}
//below the error, but it isn't occur on first time, only in 4th loop interation
len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
if (len < 0) {
simbiLog("Error while decoding error %d frame %d duration %d", len, got_frame, avpkt.duration);
return ERROR;
} else {
simbiLog("Decoding length %d frame %d duration %d", len, got_frame, avpkt.duration);
}
if (got_frame) {
int data_size = av_samples_get_buffer_size(NULL, c->channels, decoded_frame->nb_samples, c->sample_fmt, 1);
size_t* fwrite_size = fwrite(decoded_frame->data[0], 1, data_size, outfile);
simbiLog("fwrite returned %d", fwrite_size);
}
avpkt.size -= len;
avpkt.data += len;
if (avpkt.size < AUDIO_REFILL_THRESH) {
memmove(inbuf, avpkt.data, avpkt.size);
avpkt.data = inbuf;
len = fread(avpkt.data + avpkt.size, 1, AUDIO_INBUF_SIZE - avpkt.size, infile);
if (len > 0)
avpkt.size += len;
simbiLog("fread returned %d", len);
}
}
fclose(outfile);
fclose(infile);
avcodec_close(c);
av_free(c);
av_free(decoded_frame);
but I'm getting the follow log and error:
inbuf size: 20488
iteration 1
avpkt.size 3305 avpkt.data BEEED40C
Decoding length 13 frame 1 duration 0
fwrite returned 640
fread returned 0
iteration 2
avpkt.size 3292 avpkt.data BEEED40C
Decoding length 13 frame 1 duration 0
fwrite returned 640
fread returned 0
iteration 3
avpkt.size 3279 avpkt.data BEEED40C
Decoding length 14 frame 1 duration 0
fwrite returned 640
fread returned 0
iteration 4
avpkt.size 3265 avpkt.data BEEED40C
Error while decoding error -1052488119 frame 0 duration 0
the audio file I'm trying decode:
$ avprobe blue.3gp
avprobe version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2007-2013 the Libav developers
built on Mar 30 2013 22:23:21 with gcc 4.7.2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'blue.3gp':
Metadata:
major_brand : 3gp4
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2013-09-19 18:53:38
Duration: 00:00:01.52, start: 0.000000, bitrate: 17 kb/s
Stream #0.0(eng): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
Metadata:
creation_time : 2013-09-19 18:53:38
thanks a lot!
EDITED
I read on ffmper documentation about the method avcodec_decode_audio4 the follow:
#warning The input buffer, avpkt->data must be FF_INPUT_BUFFER_PADDING_SIZE larger than the actual read bytes because some optimized bitstream readers read 32 or 64 bits at once and could read over the end.
#note You might have to align the input buffer. The alignment requirements depend on the CPU and the decoder.
and I see here a solution using posix_memalign, to android i founded a similar method called memalign, so i did the change:
removed:
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
inserted:
int inbufSize = sizeof(uint8_t) * (AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
uint8_t *inbuf = memalign(FF_INPUT_BUFFER_PADDING_SIZE, inbufSize);
simbiLog("inbuf size: %d", inbufSize);
for (; inbufSize >= 0; inbufSize--)
simbiLog("inbuf position: %d index: %p", inbufSize, &inbuf[inbufSize]);
I'm getting the correct memory sequence position, but the error not changed.
A piece of outpout:
inbuf position: 37 index: 0x4e43d745
inbuf position: 36 index: 0x4e43d744
inbuf position: 35 index: 0x4e43d743
inbuf position: 34 index: 0x4e43d742
inbuf position: 33 index: 0x4e43d741
inbuf position: 32 index: 0x4e43d740
inbuf position: 31 index: 0x4e43d73f
inbuf position: 30 index: 0x4e43d73e
inbuf position: 29 index: 0x4e43d73d
inbuf position: 28 index: 0x4e43d73c
inbuf position: 27 index: 0x4e43d73b
inbuf position: 26 index: 0x4e43d73a
inbuf position: 25 index: 0x4e43d739
inbuf position: 24 index: 0x4e43d738
inbuf position: 23 index: 0x4e43d737
inbuf position: 22 index: 0x4e43d736
inbuf position: 21 index: 0x4e43d735
inbuf position: 20 index: 0x4e43d734
inbuf position: 19 index: 0x4e43d733
You are trying to decode without demuxing.