Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log is very chatty - V/MediaPlayer-JNI, V/MediaPlayerNative - reopened #933

Open
adrianvintu opened this issue Jun 26, 2021 · 5 comments
Open
Labels
bug platform-android Affects the android platform

Comments

@adrianvintu
Copy link

adrianvintu commented Jun 26, 2021

Sorry, can you please reopen this ticket #902?

On both Samsung Galaxy S8 and Samsung Galaxy S10 I get full log, as in the first post #902 (comment)

On the Android Emulator API 27 8.1 with Google Play I only get the DRM log #902 (comment)

I have downloaded the whole project from https://github.com/luanpotter/audioplayers/

When pressing play on the first widget, I get a huge log on the real devices.

D/ViewRootImpl@a62bfb8[MainActivity](31739): Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x1 surface={valid=true 530714017792} changed=false
I/MediaPlayer(31739): Need to enable context aware info
V/MediaPlayer-JNI(31739): native_setup
V/MediaPlayerNative(31739): constructor
V/MediaPlayerNative(31739): setListener
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setAuxEffectSendLevel: level 0.000000
V/MediaPlayerNative(31739): MediaPlayer::setAuxEffectSendLevel(0.000000)
V/MediaPlayer-JNI(31739): setParameter: key 1400
V/MediaPlayerNative(31739): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setLooping: 0
V/MediaPlayerNative(31739): MediaPlayer::setLooping
V/MediaPlayer-JNI(31739): setDataSourceFD: fd 101
V/MediaPlayerNative(31739): setDataSource(101, 0, 576460752303423487)
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setLooping: 0
V/MediaPlayerNative(31739): MediaPlayer::setLooping
V/MediaPlayerNative(31739): setVideoSurfaceTexture
V/MediaPlayerNative(31739): prepareAsync
V/MediaPlayerNative(31739): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative(31739): info/warning (10973, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative(31739): MediaPlayer::notify() prepared
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): invoke 68
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 147305 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 147305 (msec)
D/ViewRootImpl@a62bfb8[MainActivity](31739): ViewPostIme pointer 0
D/ViewRootImpl@a62bfb8[MainActivity](31739): ViewPostIme pointer 1
V/MediaPlayer-JNI(31739): native_setup
V/MediaPlayerNative(31739): constructor
V/MediaPlayerNative(31739): setListener
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setAuxEffectSendLevel: level 0.000000
V/MediaPlayerNative(31739): MediaPlayer::setAuxEffectSendLevel(0.000000)
V/MediaPlayer-JNI(31739): setParameter: key 1400
V/MediaPlayerNative(31739): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setLooping: 0
V/MediaPlayerNative(31739): MediaPlayer::setLooping
V/MediaHTTPService(31739): MediaHTTPService(android.media.MediaHTTPService@307d0b7): Cookies: null
V/MediaPlayer-JNI(31739): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(31739): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(31739): setLooping: 0
V/MediaPlayerNative(31739): MediaPlayer::setLooping
V/MediaPlayerNative(31739): setVideoSurfaceTexture
V/MediaPlayerNative(31739): prepareAsync
V/MediaHTTPService(31739): makeHTTPConnection: CookieManager created: java.net.CookieManager@75d024
V/MediaHTTPService(31739): makeHTTPConnection(android.media.MediaHTTPService@307d0b7): cookieHandler: java.net.CookieManager@75d024 Cookies: null
D/MediaHTTPConnection(31739): setReadTimeOut =  15000ms
V/MediaPlayer-JNI(31739): getPlaybackSettings: 1.000000 1.000000 0 0
V/MediaPlayer-JNI(31739): setPlaybackParams: 1:1.000000 1:1.000000 1:0 1:0
V/MediaPlayerNative(31739): setPlaybackSettings: 1.000000 1.000000 0 0
D/MediaHTTPConnection(31739): setReadTimeout with 15000ms
I/System.out(31739): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(31739): (HTTPLog)-Static: isSBSettingEnabled false
I/MediaHTTPConnection(31739): response code = 200
V/MediaPlayerNative(31739): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative(31739): info/warning (10973, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative(31739): MediaPlayer::notify() prepared
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): invoke 68
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): start
V/MediaPlayerNative(31739): start
V/MediaPlayerNative(31739): message received msg=300, ext1=0, ext2=0
V/MediaPlayerNative(31739): Received SEC_MM_PLAYER_CONTEXT_AWARE
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 0 (msec)
V/MediaPlayerNative(31739): message received msg=3, ext1=3, ext2=0
V/MediaPlayerNative(31739): buffering 3
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=6, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (6, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayer-JNI(31739): getCurrentPosition: 0 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 78 (msec)
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 203 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 407 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 614 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 815 (msec)
V/MediaPlayerNative(31739): message received msg=3, ext1=51, ext2=0
V/MediaPlayerNative(31739): buffering 51
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 1017 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 1221 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 1424 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 1626 (msec)
V/MediaPlayerNative(31739): message received msg=3, ext1=100, ext2=0
V/MediaPlayerNative(31739): buffering 100
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 1828 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 2031 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 2234 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 2438 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 2642 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 2845 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 3049 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 3256 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 3459 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 3662 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 3867 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 4076 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 4285 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 4492 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 4697 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 4908 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 5118 (msec)
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 5325 (msec)
D/ViewRootImpl@a62bfb8[MainActivity](31739): ViewPostIme pointer 0
V/MediaPlayerNative(31739): getDuration_l
V/MediaPlayer-JNI(31739): getDuration: 210077 (msec)
V/MediaPlayer-JNI(31739): getCurrentPosition: 5530 (msec)
D/ViewRootImpl@a62bfb8[MainActivity](31739): ViewPostIme pointer 1
V/MediaPlayer-JNI(31739): stop
V/MediaPlayerNative(31739): stop
V/MediaPlayerNative(31739): message received msg=8, ext1=0, ext2=0
V/MediaPlayer-JNI(31739): reset
V/MediaPlayerNative(31739): reset
V/MediaPlayerNative(31739): unrecognized message: (8, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(31739): callback application
V/MediaPlayerNative(31739): back from callback
V/MediaPlayerNative(31739): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(31739): notify(211, 0, 0) callback on disconnected mediaplayer
V/MediaPlayer(31739): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(31739): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer(31739): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(31739): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI(31739): release
V/MediaPlayerNative(31739): setListener
V/MediaPlayerNative(31739): disconnect
V/MediaPlayerNative(31739): destructor
V/MediaPlayerNative(31739): disconnect
@luanpotter
Copy link
Member

Please use code blocks to properly format your issue...

@erickzanardo
Copy link
Member

@luanpotter is there anything we can do about it? I think that log is sent by the native layer right?

@luanpotter
Copy link
Member

Yes. I added a Logger PR as a first step, now we need to wire it on the android side to try to suppress these messages, but it's likely gonna be hacky, I tried this before and wasn't trivial.

@UmairSaqibBhutta
Copy link

@erickzanardo I'm also facing the same issue. If you have solved this issue please guide me.

@Gustl22 Gustl22 added the platform-android Affects the android platform label Sep 27, 2022
@Gustl22
Copy link
Collaborator

Gustl22 commented Mar 24, 2023

Probably this would be solved by replacing the Android MediaPlayer with ExoPlayer which is more actively developed and brings more advantages.

Gustl22 added a commit that referenced this issue Apr 4, 2023
# Description

- Replace Platform Method Channels (from platform -> to lib) with Event Channels
- Combined Event stream for player (`PlayerEvent`) and global
(`GlobalEvent`) events
- Add methods `create`, `dispose` and `getEventStream` to
`AudioplayersPlatformInterface`
- Add method `getGlobalEventStream` to
`GlobalAudioplayersPlatformInterface`
- Add log stream `player.onLog()` and `AudioPlayer.global.onLog()`
- Example for using Logger
- Throw PlatformException on Method Error via Method Channel (lib ->
platform)
- Emit PlatformException on Event Error via Event Channel (platform ->
lib) `player.eventStream.listen().onError()` and
`AudioPlayer.global.eventStream.listen().onError()`
- Add docs

## Breaking Change

### Migration instructions

**audioplayers**:
| Before | After |
|---|---|
| deprecated `AudioPlayer.global.changeLogLevel(LogLevel.info)` |
`Logger.logLevel = LogLevel.info` |
| deprecated `AudioPlayer.global.logLevel` | `Logger.logLevel` |
| deprecated `AudioPlayer.global.log()` | `Logger.log()` or
`Logger.error()` |
| deprecated `AudioPlayer.global.info()` | `Logger.log()` |
| deprecated `AudioPlayer.global.error()` | `Logger.error()` |
| `ForPlayer<>` | _removed_ |

**audioplayers_platform_interface**:
| Before | After |
|---|---|
| `LogLevel` | _moved_ to `audioplayers` package |
| `StreamsInterface` | _removed_ |
| `ForPlayer<>` | _removed_ |

## Related Issues

Closes #106
Closes #151
Closes #1266
Can handle error of #1260
Related to #208 and #933, but cannot hide Android MediaPlayer logs

This would bypass: flutter/flutter#69103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform-android Affects the android platform
Projects
None yet
Development

No branches or pull requests

5 participants