Home
last modified time | relevance | path

Searched refs:mediaItem (Results 1 – 25 of 26) sorted by relevance

12

/external/exoplayer/tree/library/common/src/test/java/com/google/android/exoplayer2/
DMediaItemTest.java49 MediaItem mediaItem = MediaItem.fromUri(uri); in builderWithUri_setsSourceUri() local
51 assertThat(mediaItem.playbackProperties.sourceUri.toString()).isEqualTo(URI_STRING); in builderWithUri_setsSourceUri()
52 assertThat(mediaItem.mediaId).isEqualTo(URI_STRING); in builderWithUri_setsSourceUri()
53 assertThat(mediaItem.mediaMetadata).isNotNull(); in builderWithUri_setsSourceUri()
58 MediaItem mediaItem = MediaItem.fromUri(URI_STRING); in builderWithUriAsString_setsSourceUri() local
60 assertThat(mediaItem.playbackProperties.sourceUri.toString()).isEqualTo(URI_STRING); in builderWithUriAsString_setsSourceUri()
61 assertThat(mediaItem.mediaId).isEqualTo(URI_STRING); in builderWithUriAsString_setsSourceUri()
66 MediaItem mediaItem = MediaItem.fromUri(URI_STRING); in builderSetMimeType_isNullByDefault() local
68 assertThat(mediaItem.playbackProperties.mimeType).isNull(); in builderSetMimeType_isNullByDefault()
73 MediaItem mediaItem = in builderSetMimeType_setsMimeType() local
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/source/
DDefaultMediaSourceFactory.java247 public MediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
248 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
252 mediaItem.playbackProperties.sourceUri, mediaItem.playbackProperties.mimeType); in createMediaSource()
256 mediaSourceFactory.setDrmSessionManager(createDrmSessionManager(mediaItem)); in createMediaSource()
258 !mediaItem.playbackProperties.streamKeys.isEmpty() in createMediaSource()
259 ? mediaItem.playbackProperties.streamKeys in createMediaSource()
262 MediaSource mediaSource = mediaSourceFactory.createMediaSource(mediaItem); in createMediaSource()
264 List<MediaItem.Subtitle> subtitles = mediaItem.playbackProperties.subtitles; in createMediaSource()
284 return maybeWrapWithAdsMediaSource(mediaItem, maybeClipMediaSource(mediaItem, mediaSource)); in createMediaSource()
289 private DrmSessionManager createDrmSessionManager(MediaItem mediaItem) { in createDrmSessionManager() argument
[all …]
DProgressiveMediaSource.java180 public ProgressiveMediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
181 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
183 mediaItem.playbackProperties.sourceUri, in createMediaSource()
188 mediaItem.playbackProperties.customCacheKey != null in createMediaSource()
189 ? mediaItem.playbackProperties.customCacheKey in createMediaSource()
192 mediaItem.playbackProperties.tag != null ? mediaItem.playbackProperties.tag : tag); in createMediaSource()
DExtractorMediaSource.java187 public ExtractorMediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
188 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
190 mediaItem.playbackProperties.sourceUri, in createMediaSource()
196 mediaItem.playbackProperties.tag != null ? mediaItem.playbackProperties.tag : tag); in createMediaSource()
DMediaSourceFactory.java67 MediaSource createMediaSource(MediaItem mediaItem); in createMediaSource() argument
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/source/
DDefaultMediaSourceFactoryTest.java49 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA).build(); in createMediaSource_withoutMimeType_progressiveSource() local
51 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withoutMimeType_progressiveSource()
61 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA).setTag(tag).build(); in createMediaSource_withTag_tagInSource() local
63 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withTag_tagInSource()
72 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.mp3").build(); in createMediaSource_withPath_progressiveSource() local
74 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withPath_progressiveSource()
83 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA).build(); in createMediaSource_withNull_usesNonNullDefaults() local
90 .createMediaSource(mediaItem); in createMediaSource_withNull_usesNonNullDefaults()
104 MediaItem mediaItem = in createMediaSource_withSubtitle_isMergingMediaSource() local
107 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withSubtitle_isMergingMediaSource()
[all …]
/external/exoplayer/tree/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/
DDefaultMediaSourceFactoryTest.java42 MediaItem mediaItem = in createMediaSource_withMimeType_smoothstreamingSource() local
47 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withMimeType_smoothstreamingSource()
56 MediaItem mediaItem = in createMediaSource_withTag_tagInSource() local
63 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withTag_tagInSource()
72 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.ism").build(); in createMediaSource_withIsmPath_smoothstreamingSource() local
74 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withIsmPath_smoothstreamingSource()
83 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + ".ism/Manifest").build(); in createMediaSource_withManifestPath_smoothstreamingSource() local
85 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withManifestPath_smoothstreamingSource()
94 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.ism").build(); in createMediaSource_withNull_usesNonNullDefaults() local
101 .createMediaSource(mediaItem); in createMediaSource_withNull_usesNonNullDefaults()
/external/exoplayer/tree/extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/
DDefaultMediaItemConverter.java112 private static JSONObject getCustomData(MediaItem mediaItem) { in getCustomData() argument
115 json.put(KEY_MEDIA_ITEM, getMediaItemJson(mediaItem)); in getCustomData()
116 @Nullable JSONObject playerConfigJson = getPlayerConfigJson(mediaItem); in getCustomData()
126 private static JSONObject getMediaItemJson(MediaItem mediaItem) throws JSONException { in getMediaItemJson() argument
127 Assertions.checkNotNull(mediaItem.playbackProperties); in getMediaItemJson()
129 json.put(KEY_TITLE, mediaItem.mediaMetadata.title); in getMediaItemJson()
130 json.put(KEY_URI, mediaItem.playbackProperties.sourceUri.toString()); in getMediaItemJson()
131 json.put(KEY_MIME_TYPE, mediaItem.playbackProperties.mimeType); in getMediaItemJson()
132 if (mediaItem.playbackProperties.drmConfiguration != null) { in getMediaItemJson()
135 getDrmConfigurationJson(mediaItem.playbackProperties.drmConfiguration)); in getMediaItemJson()
[all …]
DMediaItemConverter.java30 MediaQueueItem toMediaQueueItem(MediaItem mediaItem); in toMediaQueueItem() argument
/external/exoplayer/tree/library/dash/src/test/java/com/google/android/exoplayer2/source/dash/
DDefaultMediaSourceFactoryTest.java40 MediaItem mediaItem = in createMediaSource_withMimeType_dashSource() local
46 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withMimeType_dashSource()
56 MediaItem mediaItem = in createMediaSource_withTag_tagInSource() local
63 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withTag_tagInSource()
72 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.mpd").build(); in createMediaSource_withPath_dashSource() local
74 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withPath_dashSource()
83 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.mpd").build(); in createMediaSource_withNull_usesNonNullDefaults() local
90 .createMediaSource(mediaItem); in createMediaSource_withNull_usesNonNullDefaults()
/external/exoplayer/tree/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/
DDefaultMediaSourceFactoryTest.java40 MediaItem mediaItem = in createMediaSource_withMimeType_hlsSource() local
46 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withMimeType_hlsSource()
56 MediaItem mediaItem = in createMediaSource_withTag_tagInSource() local
63 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withTag_tagInSource()
72 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.m3u8").build(); in createMediaSource_withPath_hlsSource() local
74 MediaSource mediaSource = defaultMediaSourceFactory.createMediaSource(mediaItem); in createMediaSource_withPath_hlsSource()
83 MediaItem mediaItem = new MediaItem.Builder().setSourceUri(URI_MEDIA + "/file.m3u8").build(); in createMediaSource_withNull_usesNonNullDefaults() local
90 .createMediaSource(mediaItem); in createMediaSource_withNull_usesNonNullDefaults()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/
DBasePlayer.java33 public void setMediaItem(MediaItem mediaItem) { in setMediaItem() argument
34 setMediaItems(Collections.singletonList(mediaItem)); in setMediaItem()
38 public void setMediaItem(MediaItem mediaItem, long startPositionMs) { in setMediaItem() argument
39 setMediaItems(Collections.singletonList(mediaItem), /* startWindowIndex= */ 0, startPositionMs); in setMediaItem()
43 public void setMediaItem(MediaItem mediaItem, boolean resetPosition) { in setMediaItem() argument
44 setMediaItems(Collections.singletonList(mediaItem), resetPosition); in setMediaItem()
59 public void addMediaItem(int index, MediaItem mediaItem) { in addMediaItem() argument
60 addMediaItems(index, Collections.singletonList(mediaItem)); in addMediaItem()
64 public void addMediaItem(MediaItem mediaItem) { in addMediaItem() argument
65 addMediaItems(Collections.singletonList(mediaItem)); in addMediaItem()
DPlayer.java849 void setMediaItem(MediaItem mediaItem); in setMediaItem() argument
857 void setMediaItem(MediaItem mediaItem, long startPositionMs); in setMediaItem() argument
867 void setMediaItem(MediaItem mediaItem, boolean resetPosition); in setMediaItem() argument
874 void addMediaItem(MediaItem mediaItem); in addMediaItem() argument
882 void addMediaItem(int index, MediaItem mediaItem); in addMediaItem() argument
DSimpleExoPlayer.java1320 public void setMediaItem(MediaItem mediaItem) { in setMediaItem() argument
1323 player.setMediaItem(mediaItem); in setMediaItem()
1327 public void setMediaItem(MediaItem mediaItem, boolean resetPosition) { in setMediaItem() argument
1330 player.setMediaItem(mediaItem, resetPosition); in setMediaItem()
1334 public void setMediaItem(MediaItem mediaItem, long startPositionMs) { in setMediaItem() argument
1337 player.setMediaItem(mediaItem, startPositionMs); in setMediaItem()
1396 public void addMediaItem(MediaItem mediaItem) { in addMediaItem() argument
1398 player.addMediaItem(mediaItem); in addMediaItem()
1402 public void addMediaItem(int index, MediaItem mediaItem) { in addMediaItem() argument
1404 player.addMediaItem(index, mediaItem); in addMediaItem()
/external/exoplayer/tree/demos/main/src/main/java/com/google/android/exoplayer2/demo/
DDownloadTracker.java87 public boolean isDownloaded(MediaItem mediaItem) { in isDownloaded() argument
88 Download download = downloads.get(checkNotNull(mediaItem.playbackProperties).sourceUri); in isDownloaded()
98 FragmentManager fragmentManager, MediaItem mediaItem, RenderersFactory renderersFactory) { in toggleDownload() argument
99 Download download = downloads.get(checkNotNull(mediaItem.playbackProperties).sourceUri); in toggleDownload()
109 fragmentManager, getDownloadHelper(mediaItem, renderersFactory), mediaItem); in toggleDownload()
124 private DownloadHelper getDownloadHelper(MediaItem mediaItem, RenderersFactory renderersFactory) { in getDownloadHelper() argument
125 MediaItem.PlaybackProperties playbackProperties = checkNotNull(mediaItem.playbackProperties); in getDownloadHelper()
175 private final MediaItem mediaItem; field in DownloadTracker.StartDownloadDialogHelper
181 FragmentManager fragmentManager, DownloadHelper downloadHelper, MediaItem mediaItem) { in StartDownloadDialogHelper() argument
184 this.mediaItem = mediaItem; in StartDownloadDialogHelper()
[all …]
DSampleChooserActivity.java376 MediaItem.Builder mediaItem = new MediaItem.Builder(); in readEntry() local
391 mediaItem.setDrmUuid(Util.getDrmUuid(reader.nextString())); in readEntry()
397 mediaItem.setDrmLicenseUri(reader.nextString()); in readEntry()
406 mediaItem.setDrmLicenseRequestHeaders(requestHeaders); in readEntry()
415 mediaItem.setDrmSessionForClearTypes(new ArrayList<>(drmSessionForClearTypes)); in readEntry()
418 mediaItem.setDrmMultiSession(reader.nextBoolean()); in readEntry()
430 mediaItem.setAdTagUri(reader.nextString()); in readEntry()
459 mediaItem in readEntry()
471 mediaItem.setSubtitles(Collections.singletonList(subtitle)); in readEntry()
473 return new PlaylistHolder(title, Collections.singletonList(mediaItem.build())); in readEntry()
DPlayerActivity.java364 MediaItem mediaItem = mediaItems.get(i); in createMediaItems() local
366 if (!Util.checkCleartextTrafficPermitted(mediaItem)) { in createMediaItems()
370 if (Util.maybeRequestReadExternalStoragePermission(/* activity= */ this, mediaItem)) { in createMediaItems()
376 Assertions.checkNotNull(mediaItem.playbackProperties).drmConfiguration; in createMediaItems()
388 hasAds |= mediaItem.playbackProperties.adTagUri != null; in createMediaItems()
/external/robolectric-shadows/shadows/supportv4/src/test/java/org/robolectric/shadows/support/v4/
DShadowMediaBrowserCompatTest.java77 mediaItemCallBack.mediaItem = null; in mediaBrowser_getItem()
140 MediaItem mediaItem; field in ShadowMediaBrowserCompatTest.MediaItemCallBack
143 public void onItemLoaded(MediaItem mediaItem) { in onItemLoaded() argument
144 super.onItemLoaded(mediaItem); in onItemLoaded()
145 this.mediaItem = mediaItem; in onItemLoaded()
149 return mediaItem; in getMediaItem()
/external/robolectric-shadows/shadows/supportv4/src/main/java/org/robolectric/shadows/support/v4/
DShadowMediaBrowserCompat.java98 final MediaItem mediaItem = mediaItems.get(mediaId); in getItem() local
100 if (isConnected && mediaItem != null) { in getItem()
101 handler.post(() -> cb.onItemLoaded(mediaItem)); in getItem()
194 final MediaItem mediaItem = new MediaItem(metadataCompat.getDescription(), flag); in createMediaItem() local
195 mediaItems.put(mediaId, mediaItem); in createMediaItem()
206 children.add(mediaItem); in createMediaItem()
209 return mediaItem; in createMediaItem()
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DStubExoPlayer.java145 public void setMediaItem(MediaItem mediaItem) { in setMediaItem() argument
150 public void setMediaItem(MediaItem mediaItem, long startPositionMs) { in setMediaItem() argument
155 public void setMediaItem(MediaItem mediaItem, boolean resetPosition) { in setMediaItem() argument
207 public void addMediaItem(MediaItem mediaItem) { in addMediaItem() argument
212 public void addMediaItem(int index, MediaItem mediaItem) { in addMediaItem() argument
/external/exoplayer/tree/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/
DHlsMediaSource.java346 public HlsMediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
347 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
350 !mediaItem.playbackProperties.streamKeys.isEmpty() in createMediaSource()
351 ? mediaItem.playbackProperties.streamKeys in createMediaSource()
358 mediaItem.playbackProperties.sourceUri, in createMediaSource()
369 mediaItem.playbackProperties.tag != null ? mediaItem.playbackProperties.tag : tag); in createMediaSource()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/
DMediaItem.java88 private Builder(MediaItem mediaItem) { in Builder() argument
90 clipEndPositionMs = mediaItem.clippingProperties.endPositionMs; in Builder()
91 clipRelativeToLiveWindow = mediaItem.clippingProperties.relativeToLiveWindow; in Builder()
92 clipRelativeToDefaultPosition = mediaItem.clippingProperties.relativeToDefaultPosition; in Builder()
93 clipStartPositionMs = mediaItem.clippingProperties.startPositionMs; in Builder()
94 clipStartsAtKeyFrame = mediaItem.clippingProperties.startsAtKeyFrame; in Builder()
95 mediaId = mediaItem.mediaId; in Builder()
96 mediaMetadata = mediaItem.mediaMetadata; in Builder()
97 @Nullable PlaybackProperties playbackProperties = mediaItem.playbackProperties; in Builder()
/external/exoplayer/tree/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/
DSsMediaSource.java295 public SsMediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
296 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
302 !mediaItem.playbackProperties.streamKeys.isEmpty() in createMediaSource()
303 ? mediaItem.playbackProperties.streamKeys in createMediaSource()
310 mediaItem.playbackProperties.sourceUri, in createMediaSource()
318 mediaItem.playbackProperties.tag != null ? mediaItem.playbackProperties.tag : tag); in createMediaSource()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/
DUtil.java212 for (MediaItem mediaItem : mediaItems) { in maybeRequestReadExternalStoragePermission()
213 if (mediaItem.playbackProperties == null) { in maybeRequestReadExternalStoragePermission()
216 if (isLocalFileUri(mediaItem.playbackProperties.sourceUri)) { in maybeRequestReadExternalStoragePermission()
219 for (int i = 0; i < mediaItem.playbackProperties.subtitles.size(); i++) { in maybeRequestReadExternalStoragePermission()
220 if (isLocalFileUri(mediaItem.playbackProperties.subtitles.get(i).uri)) { in maybeRequestReadExternalStoragePermission()
240 for (MediaItem mediaItem : mediaItems) { in checkCleartextTrafficPermitted()
241 if (mediaItem.playbackProperties == null) { in checkCleartextTrafficPermitted()
244 if (isTrafficRestricted(mediaItem.playbackProperties.sourceUri)) { in checkCleartextTrafficPermitted()
247 for (int i = 0; i < mediaItem.playbackProperties.subtitles.size(); i++) { in checkCleartextTrafficPermitted()
248 if (isTrafficRestricted(mediaItem.playbackProperties.subtitles.get(i).uri)) { in checkCleartextTrafficPermitted()
/external/exoplayer/tree/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/
DDashMediaSource.java327 public DashMediaSource createMediaSource(MediaItem mediaItem) { in createMediaSource() argument
328 Assertions.checkNotNull(mediaItem.playbackProperties); in createMediaSource()
334 !mediaItem.playbackProperties.streamKeys.isEmpty() in createMediaSource()
335 ? mediaItem.playbackProperties.streamKeys in createMediaSource()
342 mediaItem.playbackProperties.sourceUri, in createMediaSource()
351 mediaItem.playbackProperties.tag != null ? mediaItem.playbackProperties.tag : tag); in createMediaSource()

12