warren-bank / Android-RTSP-IPCam-Viewer

Android app to view RTSP and RTMP IP camera video streams.
GNU General Public License v2.0
77 stars 11 forks source link

Can upgrade Exoplayer version ? #2

Closed CMingTseng closed 4 years ago

CMingTseng commented 4 years ago

Dear Sir

Exoplayer new release version is 2.1.1

some method change !!

can upgrade ?

i try to upgrade but get crash !!

THX

warren-bank commented 4 years ago

Hi. I'm sorry that the app crashed for you.

This was one of my first Android apps. Having a little more experience with the platform, I'm guessing that the cause for your crash is that:

When I do fix this issue (and test the app in a newer version of Android).. I'll also be sure to bump the version of ExoPlayer.

I'll get around to making these updates in the next few days, and will check back with you here when I have a new release to share.

update:

warren-bank commented 4 years ago

Oh.. wait.. I just re-read what you said in your issue..

Please clarify my understanding:

  1. did my release build of this app crash on your device?
  2. or did you try to upgrade ExoPlayer to the newest official stable release (which doesn't include support for RTSP).. build your own modified version.. and did that build crash on your device?
CMingTseng commented 4 years ago

Dear Sir

Thx your answer

this is my doing { try to upgrade ExoPlayer to the newest official stable release (which doesn't include support for RTSP).. build your own modified version.. and did that build crash on your device }

and

build your own modified version <--- base your develop very thx

i try modify it can pass building apk

but when playing get Client null ---> crash

THX

warren-bank commented 4 years ago

ok.. then you can ignore pretty much everything that I said in my 1st reply; the only important take-away is that if you want to update ExoPlayer and build your own apk.. then you'll need to pull from the HEAD of this dev branch.. and that will remain the case until the corresponding PR is merged into master (of the official repo).

CMingTseng commented 4 years ago

@warren-bank

i fork and modify

can help me ?

https://github.com/CMingTseng/Android-RTSP-IPCam-Viewer/tree/dev_neo

THX

CMingTseng commented 4 years ago

ok.. then you can ignore pretty much everything that I said in my 1st reply; the only important take-away is that if you want to update ExoPlayer and build your own apk.. then you'll need to pull from the HEAD of this dev branch.. and that will remain the case until the corresponding PR is merged into master (of the official repo).

@warren-bank i also check tresvecesseis version

but the version is too old !!

it lost very ....

and it version can not play rtsp !! <--- i do not know why !! it can pass build

your version it close release-v2 <-- better !!

can help me ?

THX

warren-bank commented 4 years ago

a few thoughts..

CMingTseng commented 4 years ago

very sorry

My English is awful

Can't express my meaning well

I clone https://github.com/tresvecesseis/ExoPlayer/tree/dev-v2-rtsp-test <-- branch dev-v2-rtsp-test

But this version

Cannot play RTSP stream <--- pass build apk

I manually compared the differences between you and tresvecesseis_dev-v2-rtsp-test

Your version is revised / added a lot in the RTSP ( if need i can list )

The version of tresvecesseis_dev-v2-rtsp-test seems to be quite old.

There is also a composition of TransferListener in UdpDataSource/BaseDataSource

But this has been @Deprecated in later versions

and the new version

maybe DRM ? so UdpDataSource is final & SampleQueue need DrmSessionManager

THX

warren-bank commented 4 years ago

here is what I came up with.

The library in tresvecesseis fork is a little behind the official master. I would give those guys some time to iron it out; master just released a bunch of breaking changes.

My version is a bit of a hack.. attempting to merge the conflict between the two code-bases. For a while, it felt like a game of whack-a-mole.. for every API I patched.. there would be 2 new errors. Total waste of time.. but the apk works.. so I guess that's something :)

CMingTseng commented 4 years ago

Dear Sir

  1. i try use & modify your new version

if use your core & ui library at Google Exoplayer Demo app

will get

AGPBI: {"kind":"error","text":"Program type already present: com.google.android.exoplayer2.AudioBecomingNoisyManager$AudioBecomingNoisyReceiver","sources":[{}],"tool":"D8"} com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: com.google.android.exoplayer2.AudioBecomingNoisyManager$AudioBecomingNoisyReceiver

but i check AudioBecomingNoisyManager AudioBecomingNoisyReceiver

  1. if not modify just unzip & clean and build project (v02.01.00-alpha.01)

i can not look any rtsp (but logcat show message the application handshake rtsp )

THX

warren-bank commented 4 years ago
  1. regarding updating the rest of tresvecesseis ExoPlayer fork..
    including modified versions of official demos
    • I made a comment in the corresponding open PR.. if they ask for assistance, then I will
    • seems that Google has no intention to merge this library..
      not sure how much maintenance it's going to see from the community
  2. regarding building the updated apk from my v02.01.00-alpha.01 tag
    • works for me
      • no errors building
      • rtsp streams play fine

fwiw.. duplicate classes implies that you're importing the ui library twice; you should check your code.

CMingTseng commented 4 years ago
  1. regarding updating the rest of tresvecesseis ExoPlayer fork..including modified versions of official demos

    • I made a comment in the corresponding open PR.. if they ask for assistance, then I will
    • seems that Google has no intention to merge this library..not sure how much maintenance it's going to see from the community
  2. regarding building the updated apk from my v02.01.00-alpha.01 tag

    • works for me

      • no errors building
      • rtsp streams play fine

fwiw.. duplicate classes implies that you're importing the ui library twice; you should check your code.

Dear Sir

as general develop

we . like use jenter / bintray to get library

like this :

dependencies { implementation group: 'com.google.android.exoplayer', name: 'core', version: '2.9.2' implementation "com.google.android.exoplayer:ui:2.9.2" }

as you say { . seems that Google has no intention to merge this library ..}

so i try to export & refactoring the RTSP library as Google project Structure

let other develop can use

dependencies { implementation group: 'com.google.android.exoplayer', name: 'core', version: '2.9.2' implementation "com.google.android.exoplayer:ui:2.9.2" implementation group: 'com.google.android.exoplayer', name: 'extra-core', version: '0.0.1' implementation "com.google.android.exoplayer:extra-ui:0.0.1" implementation "com.google.android.exoplayer:extension-sdp:0.0.1" implementation "com.google.android.exoplayer:extension-rtp:0.0.1" implementation "com.google.android.exoplayer:extension-rtsp:0.0.1" }

it seem ok ?? !! <--- pass build apk

But i can not play RTSP ?? (it seem work i can see logcat get information )

not any streaming . show at screen !!!

{

01-09 12:19:19.379 13457-13659/com.github.warren_bank.rtsp_ipcam_viewer V/Receiver: RTSP/1.0 200 OK CSeq: 3 Transport: RTP/AVP;unicast;client_port=59446-59447;server_port=50024-50025;ssrc=DA8B1BCB;mode="PLAY" Server: GStreamer RTSP server Session: u3wAm6BMU3DXa$gJ; timeout=60 Date: Thu, 09 Jan 2020 04:19:19 GMT 01-09 12:19:19.388 13457-13660/com.github.warren_bank.rtsp_ipcam_viewer V/Sender: PLAY rtsp://8.42.69.117:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0 CSeq: 4 User-Agent: ExoPlayerLib/2.11.1 (Media Player for Android) Session: u3wAm6BMU3DXa$gJ; Range: npt=0.000- Scale: 1.0

}

can fixed ?

PS . your v02.01.00-alpha.01 ---> some devices ok . some devices only handshake rtsp no streaming at screen

THX

warren-bank commented 4 years ago

Please don't take this the wrong way.. but until somebody on tresvecesseis dev team asks me for a contribution.. I'm done making changes.

If they released their code under a suitable public license.. then I suppose that you're free to publish your own version. Personally, I think that's disrespectful to the original authors.. considering they've been trying to get the code merged for a long time now, and if anybody deserves proper credit.. they do.

OK.. that's about all I have to say on the topic.

CMingTseng commented 2 years ago

now Exoplayer office support RTSP

https://exoplayer.dev/rtsp.html

warren-bank commented 2 years ago

Hi. I just updated ExoPlayer to r2.16.0 ..which is the most recent stable release. As you said, RTSP is now officially supported.. so the experimental dependency is no-longer needed.