Home
last modified time | relevance | path

Searched refs:dsd (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/media/apex/java/android/media/
DDataSourceDesc.java157 public Builder(@Nullable DataSourceDesc dsd) { in Builder() argument
158 if (dsd == null) { in Builder()
161 mMediaId = dsd.mMediaId; in Builder()
162 mStartPositionMs = dsd.mStartPositionMs; in Builder()
163 mEndPositionMs = dsd.mEndPositionMs; in Builder()
164 if (dsd instanceof FileDataSourceDesc) { in Builder()
166 mPFD = ((FileDataSourceDesc) dsd).getParcelFileDescriptor(); in Builder()
167 mOffset = ((FileDataSourceDesc) dsd).getOffset(); in Builder()
168 mLength = ((FileDataSourceDesc) dsd).getLength(); in Builder()
169 } else if (dsd instanceof UriDataSourceDesc) { in Builder()
[all …]
DMediaPlayer2.java586 public long getDuration(@NonNull DataSourceDesc dsd) {
587 if (dsd == null) {
590 SourceInfo sourceInfo = getSourceInfo(dsd);
622 public long getBufferedPosition(@NonNull DataSourceDesc dsd) {
623 if (dsd == null) {
626 SourceInfo sourceInfo = getSourceInfo(dsd);
634 long duration = getDuration(dsd);
739 public @NonNull Object setDataSource(@NonNull DataSourceDesc dsd) {
743 checkDataSourceDesc(dsd);
751 setCurrentSourceInfo_l(new SourceInfo(dsd));
[all …]
/frameworks/base/media/jni/
Dandroid_media_MediaPlayer2.cpp315 sp<DataSourceDesc> dsd = new DataSourceDesc(); in android_media_MediaPlayer2_handleDataSourceUrl() local
316 dsd->mId = srcId; in android_media_MediaPlayer2_handleDataSourceUrl()
317 dsd->mType = DataSourceDesc::TYPE_URL; in android_media_MediaPlayer2_handleDataSourceUrl()
318 dsd->mUrl = tmp; in android_media_MediaPlayer2_handleDataSourceUrl()
319 dsd->mStartPositionMs = startPos; in android_media_MediaPlayer2_handleDataSourceUrl()
320 dsd->mEndPositionMs = endPos; in android_media_MediaPlayer2_handleDataSourceUrl()
327 env, keys, values, &dsd->mHeaders)) { in android_media_MediaPlayer2_handleDataSourceUrl()
335 dsd->mHttpService = httpService; in android_media_MediaPlayer2_handleDataSourceUrl()
339 err = mp->setDataSource(dsd); in android_media_MediaPlayer2_handleDataSourceUrl()
341 err = mp->prepareNextDataSource(dsd); in android_media_MediaPlayer2_handleDataSourceUrl()
[all …]
/frameworks/av/media/libmediaplayer2/
Dmediaplayer2.cpp313 status_t MediaPlayer2::setDataSource(const sp<DataSourceDesc> &dsd) { in setDataSource() argument
314 if (dsd == NULL) { in setDataSource()
318 if (dsd->mStartPositionMs > DataSourceDesc::kMaxTimeMs) { in setDataSource()
319 dsd->mStartPositionMs = DataSourceDesc::kMaxTimeMs; in setDataSource()
320 ALOGW("setDataSource, start poistion clamped to %lld ms", (long long)dsd->mStartPositionMs); in setDataSource()
322 if (dsd->mEndPositionMs > DataSourceDesc::kMaxTimeMs) { in setDataSource()
323 dsd->mEndPositionMs = DataSourceDesc::kMaxTimeMs; in setDataSource()
324 ALOGW("setDataSource, end poistion clamped to %lld ms", (long long)dsd->mStartPositionMs); in setDataSource()
326 ALOGV("setDataSource type(%d), srcId(%lld)", dsd->mType, (long long)dsd->mId); in setDataSource()
350 err = player->setDataSource(dsd); in setDataSource()
[all …]
/frameworks/av/media/libmediaplayer2/nuplayer2/
DNuPlayer2.cpp274 status_t NuPlayer2::createNuPlayer2Source(const sp<DataSourceDesc> &dsd, in createNuPlayer2Source() argument
279 notify->setInt64("srcId", dsd->mId); in createNuPlayer2Source()
281 switch (dsd->mType) { in createNuPlayer2Source()
284 const char *url = dsd->mUrl.c_str(); in createNuPlayer2Source()
287 const sp<MediaHTTPService> &httpService = dsd->mHttpService; in createNuPlayer2Source()
288 KeyedVector<String8, String8> *headers = &(dsd->mHeaders); in createNuPlayer2Source()
334 dsd->mFD, (long long)dsd->mFDOffset, (long long)dsd->mFDLength, in createNuPlayer2Source()
337 err = genericSource->setDataSource(dsd->mFD, dsd->mFDOffset, dsd->mFDLength); in createNuPlayer2Source()
354 err = genericSource->setDataSource(dsd->mCallbackSource); in createNuPlayer2Source()
378 void NuPlayer2::setDataSourceAsync(const sp<DataSourceDesc> &dsd) { in setDataSourceAsync() argument
[all …]
DNuPlayer2.h51 void setDataSourceAsync(const sp<DataSourceDesc> &dsd);
52 void prepareNextDataSourceAsync(const sp<DataSourceDesc> &dsd);
294 status_t createNuPlayer2Source(const sp<DataSourceDesc> &dsd,
DNuPlayer2Driver.h34 virtual status_t setDataSource(const sp<DataSourceDesc> &dsd) override;
35 virtual status_t prepareNextDataSource(const sp<DataSourceDesc> &dsd) override;
DNuPlayer2Driver.cpp183 status_t NuPlayer2Driver::setDataSource(const sp<DataSourceDesc> &dsd) { in setDataSource() argument
191 mSrcId = dsd->mId; in setDataSource()
194 mPlayer->setDataSourceAsync(dsd); in setDataSource()
203 status_t NuPlayer2Driver::prepareNextDataSource(const sp<DataSourceDesc> &dsd) { in prepareNextDataSource() argument
207 mPlayer->prepareNextDataSourceAsync(dsd); in prepareNextDataSource()
/frameworks/av/media/libmediaplayer2/include/mediaplayer2/
Dmediaplayer2.h63 status_t setDataSource(const sp<DataSourceDesc> &dsd);
64 status_t prepareNextDataSource(const sp<DataSourceDesc> &dsd);
DMediaPlayer2Interface.h159 virtual status_t setDataSource(const sp<DataSourceDesc> &dsd) = 0;
161 virtual status_t prepareNextDataSource(const sp<DataSourceDesc> &dsd) = 0;