Codota Logo
MediaSourceFactory
Code IndexAdd Codota to your IDE (free)

How to use
MediaSourceFactory
in
com.novoda.noplayer.internal.exoplayer.mediasource

Best Java code snippets using com.novoda.noplayer.internal.exoplayer.mediasource.MediaSourceFactory (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: novoda/no-player

public MediaSource create(Options options,
             Uri uri,
             MediaSourceEventListener mediaSourceEventListener,
             DefaultBandwidthMeter bandwidthMeter) {
  DefaultDataSourceFactory defaultDataSourceFactory = createDataSourceFactory(bandwidthMeter);
  switch (options.contentType()) {
    case HLS:
      return createHlsMediaSource(defaultDataSourceFactory, uri, mediaSourceEventListener);
    case H264:
      return createH264MediaSource(defaultDataSourceFactory, uri, mediaSourceEventListener);
    case DASH:
      return createDashMediaSource(defaultDataSourceFactory, uri, mediaSourceEventListener);
    default:
      throw new UnsupportedOperationException("Content type: " + options + " is not supported.");
  }
}
origin: novoda/no-player

  MediaSource givenMediaSource() {
    MediaSource mediaSource = mock(MediaSource.class);
    given(
        mediaSourceFactory.create(
            OPTIONS,
            uri,
            mediaSourceEventListener,
            defaultBandwidthMeter
        )
    ).willReturn(mediaSource);
    return mediaSource;
  }
}
origin: novoda/no-player

ExoPlayerTwoImpl create(Context context, DrmSessionCreator drmSessionCreator, boolean downgradeSecureDecoder) {
  MediaSourceFactory mediaSourceFactory = new MediaSourceFactory(context, handler, dataSourceFactory);
origin: novoda/no-player

void loadVideo(PlayerSurfaceHolder playerSurfaceHolder,
        DrmSessionCreator drmSessionCreator,
        Uri uri,
        Options options,
        ExoPlayerForwarder forwarder,
        MediaCodecSelector mediaCodecSelector) {
  this.options = options;
  DefaultBandwidthMeter bandwidthMeter = bandwidthMeterCreator.create(options.maxInitialBitrate());
  compositeTrackSelector = trackSelectorCreator.create(options, bandwidthMeter);
  exoPlayer = exoPlayerCreator.create(
      drmSessionCreator,
      forwarder.drmSessionEventListener(),
      mediaCodecSelector,
      compositeTrackSelector.trackSelector()
  );
  rendererTypeRequester = rendererTypeRequesterCreator.createfrom(exoPlayer);
  exoPlayer.addListener(forwarder.exoPlayerEventListener());
  exoPlayer.addAnalyticsListener(forwarder.analyticsListener());
  exoPlayer.addVideoListener(forwarder.videoListener());
  setMovieAudioAttributes(exoPlayer);
  MediaSource mediaSource = mediaSourceFactory.create(
      options,
      uri,
      forwarder.mediaSourceEventListener(),
      bandwidthMeter
  );
  attachToSurface(playerSurfaceHolder);
  exoPlayer.prepare(mediaSource, RESET_POSITION, DO_NOT_RESET_STATE);
}
com.novoda.noplayer.internal.exoplayer.mediasourceMediaSourceFactory

Most used methods

  • create
  • <init>
  • createDashMediaSource
  • createDataSourceFactory
  • createH264MediaSource
  • createHlsMediaSource

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now