1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

Strange behavior of EveryPlay. It worked once, then stopped

Discussion in 'Unity Everyplay' started by DalerHakimov, Jun 9, 2015.

  1. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    300
    Hello,

    I'm in the process of integrating the EveryPlay. Here is the script which I do use so far (just for implementation purpose).
    Code (CSharp):
    1.  void Awake()
    2.     {
    3.         Everyplay.Initialize();
    4.     }
    5.     // Use this for initialization
    6.     void Start()
    7.     {
    8.  
    9.         Everyplay.ReadyForRecording += OnReadyForRecording;
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update()
    14.     {
    15.  
    16.     }
    17.     public void OnReadyForRecording(bool enabled)
    18.     {
    19.         if (enabled)
    20.         {
    21.             // The recording is supported
    22.             Debug.LogError("Recording is supported. Started recording");
    23.             Everyplay.SetMaxRecordingMinutesLength(1);
    24.             Everyplay.StartRecording();
    25.         }
    26.     }
    27.  
    28.     public void ShowEveryplayShareModal() // linked to a button on the death screen
    29.     {
    30.         Debug.LogError("Trying to show share window");
    31.         Everyplay.ShowSharingModal();
    32.     }
    33.  
    34.     public void Stop()
    35.     {
    36.         Debug.LogError("Stopped recording");
    37.         Everyplay.StopRecording();
    38.     }

    But it worked only once, then it stopped working. It worked once, but the Video has been recorded in Landscape mode, when the game itself has been played in portrait mode. So, what I did, I changed the build setting to portrait only, and after that I re-builded the project. Now I can't get it work anymore.

    Here is the Log output from the device.
    Code (CSharp):
    1. 06-09 09:27:23.107: W/libc(13270): pthread_create sched_setscheduler call failed: Operation not permitted
    2. 06-09 09:27:23.110: D/Unity(13270): Begin MonoManager ReloadAssembly
    3. 06-09 09:27:23.110: D/AudioTrack(13270): TrackOffload: AudioTrack Offload disabled by property, returning false
    4. 06-09 09:27:23.131: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/UnityEngine.dll (this message is harmless)
    5. 06-09 09:27:23.131: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/UnityEngine.dll into Unity Child Domain
    6. 06-09 09:27:23.213: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll (this message is harmless)
    7. 06-09 09:27:23.213: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll into Unity Child Domain
    8. 06-09 09:27:23.221: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll (this message is harmless)
    9. 06-09 09:27:23.227: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
    10. 06-09 09:27:23.227: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-UnityScript.dll (this message is harmless)
    11. 06-09 09:27:23.228: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/Assembly-UnityScript.dll into Unity Child Domain
    12. 06-09 09:27:23.231: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/UnityEngine.UI.dll (this message is harmless)
    13. 06-09 09:27:23.232: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/UnityEngine.UI.dll into Unity Child Domain
    14. 06-09 09:27:23.233: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/IFacebook.dll (this message is harmless)
    15. 06-09 09:27:23.234: D/Unity(13270): Loading /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/IFacebook.dll into Unity Child Domain
    16. 06-09 09:27:23.255: D/Unity(13270): - Completed reload, in  0.145 seconds
    17. 06-09 09:27:23.263: D/Unity(13270): PlayerInitEngineGraphics OK
    18. 06-09 09:27:23.264: D/Unity(13270): Found 17 native sensors
    19. 06-09 09:27:23.266: D/Unity(13270): Sensor :        Accelerometer ( 1) ; 0.076614 / 0.00s ; BMA2X2 Accelerometer/Temperature/Double-tap / BOSCH
    20. 06-09 09:27:23.268: D/Unity(13270): Sensor :        Accelerometer ( 1) ; 0.076614 / 0.00s ; BMA2X2 Accelerometer/Temperature/Double-tap / BOSCH
    21. 06-09 09:27:23.282: D/Unity(13270): Requested framebuffer: resolution[720x1280], rgba[8/8/8/8], depth+stencil[on], samples[0]
    22. 06-09 09:27:23.282: D/Unity(13270): Created framebuffer: resolution[720x1280], rgba[8/8/8/8], depth+stencil[24/8], samples[0]
    23. 06-09 09:27:23.511: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/System.Core.dll (this message is harmless)
    24. 06-09 09:27:23.558: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/System.dll (this message is harmless)
    25. 06-09 09:27:23.591: D/Unity(13270): Platform assembly: /data/app/cm.test.ddd-2/base.apk/assets/bin/Data/Managed/System.Xml.dll (this message is harmless)
    26. 06-09 09:27:24.078: D/Unity(13270): Unloading 14 Unused Serialized files (Serialized files now loaded: 0)
    27. 06-09 09:27:24.085: D/Unity(13270): Unloading 1 Unused Serialized files (Serialized files now loaded: 0)
    28. 06-09 09:27:24.276: I/Everyplay(13270): Everyplay SDK build: 1350
    29. 06-09 09:27:24.283: I/Everyplay(13270): JNI_OnLoad done
    30. 06-09 09:27:24.327: D/Unity(13270): Releasing Unity-StartupWakeLock
    31. 06-09 09:27:24.337: W/AudioCapabilities(13270): Unsupported mime audio/evrc
    32. 06-09 09:27:24.338: W/AudioCapabilities(13270): Unsupported mime audio/qcelp
    33. 06-09 09:27:24.338: D/Unity(13270): Sensor :        Accelerometer ( 1) ; 0.076614 / 0.00s ; BMA2X2 Accelerometer/Temperature/Double-tap / BOSCH
    34. 06-09 09:27:24.339: W/VideoCapabilities(13270): Unrecognized profile 2130706433 for video/avc
    35. 06-09 09:27:24.342: W/(13270): Unable to open '/system/framework/qcom.fmradio.jar': No such file or directory
    36. 06-09 09:27:24.342: W/art(13270): Failed to open zip archive '/system/framework/qcom.fmradio.jar': I/O Error
    37. 06-09 09:27:24.346: W/(13270): Unable to open '/system/framework/qcom.fmradio.jar': No such file or directory
    38. 06-09 09:27:24.346: W/art(13270): Failed to open zip archive '/system/framework/qcom.fmradio.jar': I/O Error
    39. 06-09 09:27:24.353: W/AudioCapabilities(13270): Unsupported mime audio/x-ms-wma
    40. 06-09 09:27:24.354: W/AudioCapabilities(13270): Unsupported mime audio/qcelp
    41. 06-09 09:27:24.356: W/AudioCapabilities(13270): Unsupported mime audio/evrc
    42. 06-09 09:27:24.366: W/VideoCapabilities(13270): Unsupported mime video/divx
    43. 06-09 09:27:24.369: W/VideoCapabilities(13270): Unsupported mime video/divx311
    44. 06-09 09:27:24.371: W/VideoCapabilities(13270): Unsupported mime video/divx4
    45. 06-09 09:27:24.391: I/VideoCapabilities(13270): Unsupported profile 4 for video/mp4v-es
    46. 06-09 09:27:24.396: I/Everyplay(13270): com.everyplay.Everyplay.encoding.a.b() (line:-1) :: Multiple video codecs found for video/avc: [OMX.qcom.video.encoder.avc, OMX.google.h264.encoder]
    47. 06-09 09:27:24.396: W/VideoCapabilities(13270): Unrecognized profile 2130706433 for video/avc
    48. 06-09 09:27:24.397: W/Everyplay(13270): com.everyplay.Everyplay.encoding.a.a() (line:-1) :: CodecProfileLevel unknown, falling to default
    49. 06-09 09:27:24.399: I/Everyplay(13270): com.everyplay.Everyplay.encoding.a.b() (line:-1) :: Multiple video codecs found for video/mp4v-es: [OMX.qcom.video.encoder.mpeg4, OMX.google.mpeg4.encoder]
    50. 06-09 09:27:24.400: I/VideoCapabilities(13270): Unsupported profile 4 for video/mp4v-es
    51. 06-09 09:27:24.402: I/Everyplay(13270): com.everyplay.Everyplay.encoding.a.b() (line:-1) :: Codec query took 86 ms
    52. 06-09 09:27:24.404: D/EveryplayServer(13270): Device settings query, debug response:
    53. 06-09 09:27:24.404: D/EveryplayServer(13270): Device calling home (build 1350). Sony / D5503 / 5.0.2 / MSM8974 / Sony/D5503/D5503:5.0.2/14.5.A.0.270/3750474323:user/release-keys
    54. 06-09 09:27:24.404: D/EveryplayServer(13270): H.264 codecs: [OMX.qcom.video.encoder.avc, OMX.google.h264.encoder]
    55. 06-09 09:27:24.404: D/EveryplayServer(13270): MPEG4 codecs: [OMX.qcom.video.encoder.mpeg4, OMX.google.mpeg4.encoder]
    56. 06-09 09:27:24.404: D/EveryplayServer(13270):   AAC codecs: [OMX.google.aac.encoder]
    57. 06-09 09:27:24.404: D/EveryplayServer(13270): Device settings OK
    58. 06-09 09:27:24.420: W/(13270): Unable to open '/system/framework/qcom.fmradio.jar': No such file or directory
    59. 06-09 09:27:24.421: W/art(13270): Failed to open zip archive '/system/framework/qcom.fmradio.jar': I/O Error
    60. 06-09 09:27:25.054: I/Everyplay(13270): com.everyplay.Everyplay.encoding.f.a() (line:-1) :: Initialized: type=0 codec=OMX.qcom.video.encoder.avc format={mime=video/avc, frame-rate=30, slice-height=1280, color-format=2130708361, height=1280, width=720, bitrate=3870720, i-frame-interval=1, stride=720}
    61. 06-09 09:27:25.058: I/OMXClient(13270): Using client-side OMX mux.
    62. 06-09 09:27:25.136: D/MediaCodec(13270): MediaCodec[kWhatConfigure]: video-output-protection: 00000000, audio-output-protection: 00000000
    63. 06-09 09:27:25.137: E/ACodec(13270): [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -2147483648
    64. 06-09 09:27:25.138: W/ACodec(13270): do not know color format 0x7fa30c04 = 2141391876
    65. 06-09 09:27:25.140: W/ACodec(13270): do not know color format 0x7f000789 = 2130708361
    66. 06-09 09:27:25.147: I/ACodec(13270): [OMX.qcom.video.encoder.avc] setupVideoEncoder succeeded
    67. 06-09 09:27:25.148: W/ACodec(13270): do not know color format 0x7f000789 = 2130708361
    68. 06-09 09:27:25.149: D/ACodec(13270): Found video-output-protection flags set to 00000000
    69. 06-09 09:27:25.452: D/EveryplayServer(13270): Device settings query, debug response:
    70. 06-09 09:27:25.452: D/EveryplayServer(13270): Device calling home (build 1350). Sony / D5503 / 5.0.2 / MSM8974 / Sony/D5503/D5503:5.0.2/14.5.A.0.270/3750474323:user/release-keys
    71. 06-09 09:27:25.452: D/EveryplayServer(13270): H.264 codecs: [OMX.qcom.video.encoder.avc, OMX.google.h264.encoder]
    72. 06-09 09:27:25.452: D/EveryplayServer(13270): MPEG4 codecs: [OMX.qcom.video.encoder.mpeg4, OMX.google.mpeg4.encoder]
    73. 06-09 09:27:25.452: D/EveryplayServer(13270):   AAC codecs: [OMX.google.aac.encoder]
    74. 06-09 09:27:25.452: D/EveryplayServer(13270): Device settings OK
    75. 06-09 09:27:29.964: D/Unity(13270): Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
    76. 06-09 09:27:30.005: D/Unity(13270): UnloadTime: 17.547001 ms
    77. 06-09 09:27:30.109: D/Unity(13270): System memory in use before: 8.0 MB.
    78. 06-09 09:27:30.114: D/Unity(13270): System memory in use after: 8.0 MB.
    79. 06-09 09:27:30.114: D/Unity(13270): Unloading 19 unused Assets to reduce memory usage. Loaded Objects now: 861.
    80. 06-09 09:27:30.114: D/Unity(13270): Total: 5.885000 ms (FindLiveObjects: 0.084000 ms CreateObjectMapping: 0.079000 ms MarkObjects: 5.377000 ms  DeleteObjects: 0.341000 ms)
    81. 06-09 09:27:36.201: I/Unity(13270): Hoorayyy game finished
    82. 06-09 09:27:36.201: I/Unity(13270): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    83. 06-09 09:27:36.201: I/Unity(13270): UnityEngine.Debug:Log(Object)
    84. 06-09 09:27:36.201: I/Unity(13270): game_engine:GameFinished() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:157)
    85. 06-09 09:27:36.201: I/Unity(13270): game_engine:CheckEndLevel() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:99)
    86. 06-09 09:27:36.201: I/Unity(13270): game_engine:MakeMove(Int32) (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:61)
    87. 06-09 09:27:36.201: I/Unity(13270): game_engine:Update() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:34)
    88. 06-09 09:27:36.201: I/Unity(13270):
    89. 06-09 09:27:36.201: I/Unity(13270): (Filename: D Line: 0)
    90. 06-09 09:27:37.056: E/Unity(13270): Stopped recording
    91. 06-09 09:27:37.056: E/Unity(13270): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    92. 06-09 09:27:37.056: E/Unity(13270): UnityEngine.Debug:LogError(Object)
    93. 06-09 09:27:37.056: E/Unity(13270): EveryPlayController:Stop() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\EveryPlayController.cs:49)
    94. 06-09 09:27:37.056: E/Unity(13270): <WaitForAnimation>c__Iterator17:MoveNext() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:107)
    95. 06-09 09:27:37.056: E/Unity(13270):
    96. 06-09 09:27:37.056: E/Unity(13270): (Filename: D Line: 0)
    97. 06-09 09:27:37.059: W/Everyplay(13270): already stopped
    98. 06-09 09:27:37.066: E/Unity(13270): Trying to show share window
    99. 06-09 09:27:37.066: E/Unity(13270): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    100. 06-09 09:27:37.066: E/Unity(13270): UnityEngine.Debug:LogError(Object)
    101. 06-09 09:27:37.066: E/Unity(13270): EveryPlayController:ShowEveryplayShareModal() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\EveryPlayController.cs:43)
    102. 06-09 09:27:37.066: E/Unity(13270): <WaitForAnimation>c__Iterator17:MoveNext() (at D:\Unity5Projects\Lightoff2d\Assets\Scripts\game_engine.cs:108)
    103. 06-09 09:27:37.066: E/Unity(13270):
    104. 06-09 09:27:37.066: E/Unity(13270): (Filename: D Line: 0)
    105. 06-09 09:27:40.756: I/Unity(13270): onPause
    106. 06-09 09:27:40.767: D/Unity(13270): Sensor :        Accelerometer ( 1) ; 0.076614 / 0.00s ; BMA2X2 Accelerometer/Temperature/Double-tap / BOSCH
    107. 06-09 09:27:40.825: I/Unity(13270): windowFocusChanged: false
    108. 06-09 09:27:40.873: D/Unity(13270): [EGL] Attaching window :0x0
    109.  

    Could you pls help me, what is wrong? My device is one of the high end Sony phones. It's Sony xperia z1 compact with Android 5.0.2, so the EveryPlay must work in this phone. Actually I saw it once working fine.
     
    Last edited: Jun 9, 2015
  2. surathunity3d

    surathunity3d

    Unity Technologies

    Joined:
    Sep 30, 2014
    Posts:
    128
    Hi @DalerHakimov

    Could you please try to clear cache, remove program from your device and re-deploy the app.
    Let us know if that worked.

    Cheers
    Surath
     
  3. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    300
    Thanks for the reply. It did worked. but again, only once.. Do I have to repeat all these process of clear cache->remove->re-deploy all the time during the development process?
    Because, for example, when first time it worked. I close the app, and then I lunch it back. It doesn't work anymore...
     
  4. D3m0n

    D3m0n

    Joined:
    Nov 11, 2014
    Posts:
    71
    Same problem and same "partial" solution!!
     
  5. surathunity3d

    surathunity3d

    Unity Technologies

    Joined:
    Sep 30, 2014
    Posts:
    128
    Hi,

    This ("partial solution") is happening because of our new failsafe feature for improving UX.

    In our release notes for Unity 1970-1350 - June 2nd 2015, we mentioned this as:

    New feature: Failsafe mode. If there's a crash during early initialization of Everyplay, the recording support will be disabled when the application is launched the next time

    @D3m0n - which device were you testing on?

    Cheers
    Surath
     
  6. D3m0n

    D3m0n

    Joined:
    Nov 11, 2014
    Posts:
    71
  7. surathunity3d

    surathunity3d

    Unity Technologies

    Joined:
    Sep 30, 2014
    Posts:
    128