• 大小: 2.59MB
    文件类型: .zip
    金币: 2
    下载: 2 次
    发布日期: 2021-04-09
  • 语言: Java
  • 标签: 开源项目  

资源简介

Android rtmp rtsp 推流客户端.zip,用于Android的RTMP和RTSP流媒体库。Java中的所有代码

资源截图

代码片段和文件信息

package com.pedro.rtpstreamer;

import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import androidx.core.app.ActivityCompat;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.TextView;
import android.widget.Toast;
import com.pedro.rtpstreamer.backgroundexample.BackgroundActivity;
import com.pedro.rtpstreamer.customexample.RtmpActivity;
import com.pedro.rtpstreamer.customexample.RtspActivity;
import com.pedro.rtpstreamer.defaultexample.ExampleRtmpActivity;
import com.pedro.rtpstreamer.defaultexample.ExampleRtspActivity;
import com.pedro.rtpstreamer.displayexample.DisplayRtmpActivity;
import com.pedro.rtpstreamer.displayexample.DisplayRtspActivity;
import com.pedro.rtpstreamer.filestreamexample.RtmpFromFileActivity;
import com.pedro.rtpstreamer.filestreamexample.RtspFromFileActivity;
import com.pedro.rtpstreamer.openglexample.OpenGlRtmpActivity;
import com.pedro.rtpstreamer.openglexample.OpenGlRtspActivity;
import com.pedro.rtpstreamer.surfacemodeexample.SurfaceModeRtmpActivity;
import com.pedro.rtpstreamer.surfacemodeexample.SurfaceModeRtspActivity;
import com.pedro.rtpstreamer.texturemodeexample.TextureModeRtmpActivity;
import com.pedro.rtpstreamer.texturemodeexample.TextureModeRtspActivity;
import com.pedro.rtpstreamer.utils.Activitylink;
import com.pedro.rtpstreamer.utils.ImageAdapter;
import java.util.ArrayList;
import java.util.List;

import static android.os.Build.VERSION_CODES.JELLY_BEAN;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR2;
import static android.os.Build.VERSION_CODES.LOLLIPOP;

public class MainActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {

  private GridView list;
  private Listnk> activities;

  private final String[] PERMISSIONS = {
      Manifest.permission.RECORD_AUDIO Manifest.permission.CAMERA
      Manifest.permission.WRITE_EXTERNAL_STORAGE
  };

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    overridePendingTransition(R.transition.slide_in R.transition.slide_out);
    TextView tvVersion = findViewById(R.id.tv_version);
    tvVersion.setText(getString(R.string.version BuildConfig.VERSION_NAME));

    list = findViewById(R.id.list);
    createList();
    setListAdapter(activities);

    if (!hasPermissions(this PERMISSIONS)) {
      ActivityCompat.requestPermissions(this PERMISSIONS 1);
    }
  }

  private void createList() {
    activities = new ArrayList<>();
    activities.add(
        new Activitylink(new Intent(this RtmpActivity.class) getString(R.string.rtmp_streamer)
            JELLY_BEAN));
    activities.add(
        new Activitylink(new Intent(this RtspActivity.class) getString(R.string.rtsp_strea

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\
     文件          46  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\.gitignore
     文件       11357  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\LICENSE.txt
     文件        5278  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\README.md
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\
     文件           7  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\.gitignore
     文件         652  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\build.gradle
     文件         654  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\proguard-rules.pro
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\
     文件        4121  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\AndroidManifest.xml
     文件       16581  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\ic_launcher-web.png
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\
     文件        6551  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\MainActivity.java
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\backgroundexample\
     文件        1558  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\backgroundexample\BackgroundActivity.kt
     文件        1475  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\backgroundexample\ConnectCheckerRtp.kt
     文件        3871  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\backgroundexample\RtpService.kt
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\customexample\
     文件       16169  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\customexample\RtmpActivity.java
     文件       17269  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\customexample\RtspActivity.java
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\defaultexample\
     文件        7476  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\defaultexample\ExampleRtmpActivity.java
     文件        7532  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\defaultexample\ExampleRtspActivity.java
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\displayexample\
     文件        8130  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\displayexample\DisplayRtmpActivity.java
     文件        8134  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\displayexample\DisplayRtspActivity.java
     目录           0  2019-10-07 14:07  rtmp-rtsp-stream-client-java-master\app\src\main\java\com\pedro\rtpstreamer\filestreamexample\
............此处省略418个文件信息

评论

共有 条评论