Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp0002 committed Dec 16, 2024
1 parent e88a192 commit 9015537
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 29 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ android {


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'com.google.android.gms:play-services-nearby:18.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'de.mrmaffen:vlc-android-sdk:2.0.6@aar'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.7.0'
Expand Down
Binary file added app/libs/libvlc-android-2.1.12.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void showVideoFormatSelection(){
selectionTVOverlay.tvSettings.add(new TVSetting(aspect, R.drawable.round_video_settings, new Runnable() {
@Override
public void run() {
//TODO player.setAspectRatio(aspect);
player.setAspectRatio(aspect);
if(selectionTVOverlay != null)
getActivity().getSupportFragmentManager().beginTransaction().remove(selectionTVOverlay).commit();
openedFragment = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ protected void onCreate(Bundle savedInstanceState) {

args.add("--audio-resampler");
args.add("soxr");

args.add("--http-reconnect");
args.add("--sout-keep");
args.add("--no-audio-time-stretch");
Expand All @@ -67,6 +66,8 @@ protected void onCreate(Bundle savedInstanceState) {
args.add("--sout-mux-caching=1500");
args.add("--avcodec-hurry-up");
args.add("1");
args.add("--demux");
args.add("live555");

surfaceView = findViewById(R.id.video_layout);

Expand Down Expand Up @@ -195,15 +196,10 @@ public void run() {
int hwAccel = sp.getInt("setting_hwaccel", 1);
Log.d("URIIIL", channel.url);
final Media media = new Media(mLibVLC, Uri.parse(channel.url));
Log.d("URIIIL", "1");
mMediaPlayer.setMedia(media);
Log.d("URIIIL", "2");
media.setHWDecoderEnabled(hwAccel != 0, hwAccel == 2);
Log.d("URIIIL", "3");
media.release();
Log.d("URIIIL", "4");
mMediaPlayer.play();
Log.d("URIIIL", "5");

}
}, timeWait);
Expand Down Expand Up @@ -244,13 +240,10 @@ public void enterNumber(int entered) {
public void run() {
if (selection != null)
ChannelUtils.updateLastSelectedChannel(TVPlayerActivity.this, selection.number);
runOnUiThread(new Runnable() {
@Override
public void run() {
if (selection != null)
launchPlayer(true);
findViewById(R.id.player_enter_number_overlay).setVisibility(View.GONE);
}
runOnUiThread(() -> {
if (selection != null)
launchPlayer(true);
findViewById(R.id.player_enter_number_overlay).setVisibility(View.GONE);
});


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,20 @@ public void onEvent(MediaPlayer.Event event) {
notifyTracksChanged(tvTrackInfoList);


//if (player.getVideoTrack() != null) {
int videoTrack = player.getVideoTrack();
TvTrackInfo.Builder builder = new TvTrackInfo.Builder(TvTrackInfo.TYPE_VIDEO, "video");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
builder.setDescription("Video");
if (player.getCurrentVideoTrack() != null) {
Media.VideoTrack videoTrack = player.getCurrentVideoTrack();
TvTrackInfo.Builder builder = new TvTrackInfo.Builder(TvTrackInfo.TYPE_VIDEO, "video");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
builder.setDescription("Video");
}
builder.setVideoFrameRate(player.getRate());
float height = videoTrack.height;
if (height == 1088F) height = 1080F;
float width = videoTrack.width;
builder.setVideoHeight((int) height);
builder.setVideoWidth((int) width);
tvTrackInfoList.add(builder.build());
}
/*builder.setVideoFrameRate(player.getRate());
float height = videoTrack.height;
if (height == 1088F) height = 1080F;
float width = videoTrack.width;
builder.setVideoHeight((int) height);
builder.setVideoWidth((int) width);
tvTrackInfoList.add(builder.build());*///TODO
//}


if (audioId != null)
Expand Down

0 comments on commit 9015537

Please sign in to comment.