blob: 3a7ef4e388e3cb1db85e751a94bfac3ff22f123f [file] [log] [blame]
Andreas Huberf9334412010-12-15 15:17:42 -08001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef NU_PLAYER_H_
18
19#define NU_PLAYER_H_
20
Lajos Molnar3a474aa2015-04-24 17:10:07 -070021#include <media/AudioResamplerPublic.h>
Hassan Shojaniacefac142017-02-06 21:02:02 -080022#include <media/ICrypto.h>
Andreas Huberf9334412010-12-15 15:17:42 -080023#include <media/MediaPlayerInterface.h>
24#include <media/stagefright/foundation/AHandler.h>
25
Andreas Huberf9334412010-12-15 15:17:42 -080026namespace android {
27
Chong Zhang404fced2014-06-11 14:45:31 -070028struct ABuffer;
Lajos Molnar87603c02014-08-20 19:25:30 -070029struct AMessage;
Lajos Molnar3a474aa2015-04-24 17:10:07 -070030struct AudioPlaybackRate;
31struct AVSyncSettings;
Lajos Molnaree4e1b12015-04-17 13:46:19 -070032class IDataSource;
Wei Jia0a68f662017-08-30 18:01:26 -070033struct MediaClock;
Bernhard Rosenkränzer86a58ca2014-11-17 20:14:08 +010034class MetaData;
Andreas Huber43c3e6c2011-01-05 12:17:08 -080035struct NuPlayerDriver;
Andreas Huberf9334412010-12-15 15:17:42 -080036
37struct NuPlayer : public AHandler {
Wei Jia0a68f662017-08-30 18:01:26 -070038 explicit NuPlayer(pid_t pid, const sp<MediaClock> &mediaClock);
Andreas Huberf9334412010-12-15 15:17:42 -080039
Andreas Huber9b80c2b2011-06-30 15:47:02 -070040 void setUID(uid_t uid);
41
Dongwon Kang47afe0a2018-03-27 15:15:30 -070042 void init(const wp<NuPlayerDriver> &driver);
Andreas Huberf9334412010-12-15 15:17:42 -080043
Andreas Huber9575c962013-02-05 13:59:56 -080044 void setDataSourceAsync(const sp<IStreamSource> &source);
Andreas Huber5bc087c2010-12-23 10:27:40 -080045
Andreas Huber9575c962013-02-05 13:59:56 -080046 void setDataSourceAsync(
Andreas Huber1b86fe02014-01-29 11:13:26 -080047 const sp<IMediaHTTPService> &httpService,
48 const char *url,
49 const KeyedVector<String8, String8> *headers);
Andreas Huber5bc087c2010-12-23 10:27:40 -080050
Andreas Huber9575c962013-02-05 13:59:56 -080051 void setDataSourceAsync(int fd, int64_t offset, int64_t length);
52
Chris Watkins99f31602015-03-20 13:06:33 -070053 void setDataSourceAsync(const sp<DataSource> &source);
54
Wei Jia9bb38032017-03-23 18:00:38 -070055 status_t getBufferingSettings(BufferingSettings* buffering /* nonnull */);
Wei Jia48fa06d2016-12-20 15:30:49 -080056 status_t setBufferingSettings(const BufferingSettings& buffering);
57
Andreas Huber9575c962013-02-05 13:59:56 -080058 void prepareAsync();
Andreas Huberafed0e12011-09-20 15:39:58 -070059
Andreas Huber57a339c2012-12-03 11:18:00 -080060 void setVideoSurfaceTextureAsync(
Andy McFadden8ba01022012-12-18 09:46:54 -080061 const sp<IGraphicBufferProducer> &bufferProducer);
Andreas Huber57a339c2012-12-03 11:18:00 -080062
Andreas Huberf9334412010-12-15 15:17:42 -080063 void setAudioSink(const sp<MediaPlayerBase::AudioSink> &sink);
Lajos Molnar3a474aa2015-04-24 17:10:07 -070064 status_t setPlaybackSettings(const AudioPlaybackRate &rate);
65 status_t getPlaybackSettings(AudioPlaybackRate *rate /* nonnull */);
66 status_t setSyncSettings(const AVSyncSettings &sync, float videoFpsHint);
67 status_t getSyncSettings(AVSyncSettings *sync /* nonnull */, float *videoFps /* nonnull */);
68
Andreas Huberf9334412010-12-15 15:17:42 -080069 void start();
70
Andreas Huber43c3e6c2011-01-05 12:17:08 -080071 void pause();
Andreas Huber43c3e6c2011-01-05 12:17:08 -080072
73 // Will notify the driver through "notifyResetComplete" once finished.
Andreas Huber1aef2112011-01-04 14:01:29 -080074 void resetAsync();
75
Wei Jia52c28512017-09-13 18:17:51 -070076 // Request a notification when specified media time is reached.
77 status_t notifyAt(int64_t mediaTimeUs);
78
Wei Jiae427abf2014-09-22 15:21:11 -070079 // Will notify the driver through "notifySeekComplete" once finished
80 // and needNotify is true.
Wei Jiac5de0912016-11-18 10:22:14 -080081 void seekToAsync(
82 int64_t seekTimeUs,
83 MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC,
84 bool needNotify = false);
Andreas Huber43c3e6c2011-01-05 12:17:08 -080085
James Dong0d268a32012-08-31 12:18:27 -070086 status_t setVideoScalingMode(int32_t mode);
Chong Zhangdcb89b32013-08-06 09:44:47 -070087 status_t getTrackInfo(Parcel* reply) const;
Robert Shih7c4f0d72014-07-09 18:53:31 -070088 status_t getSelectedTrack(int32_t type, Parcel* reply) const;
Robert Shih6ffb1fd2014-10-29 16:24:32 -070089 status_t selectTrack(size_t trackIndex, bool select, int64_t timeUs);
Ronghua Wua73d9e02014-10-08 15:13:29 -070090 status_t getCurrentPosition(int64_t *mediaUs);
Praveen Chavane1e5d7a2015-05-19 19:09:48 -070091 void getStats(Vector<sp<AMessage> > *mTrackStats);
James Dong0d268a32012-08-31 12:18:27 -070092
Marco Nelissenf0b72b52014-09-16 15:43:44 -070093 sp<MetaData> getFileMeta();
Ronghua Wuc8a70d32015-04-29 16:26:34 -070094 float getFrameRate();
Marco Nelissenf0b72b52014-09-16 15:43:44 -070095
Hassan Shojaniacefac142017-02-06 21:02:02 -080096 // Modular DRM
97 status_t prepareDrm(const uint8_t uuid[16], const Vector<uint8_t> &drmSessionId);
98 status_t releaseDrm();
99
Hassan Shojaniaff63de72017-04-26 15:10:42 -0700100 const char *getDataSourceType();
101
Ray Essickeda32522018-02-28 12:08:28 -0800102 void updateInternalTimers();
103
Andreas Huberf9334412010-12-15 15:17:42 -0800104protected:
105 virtual ~NuPlayer();
106
107 virtual void onMessageReceived(const sp<AMessage> &msg);
108
Andreas Huber84066782011-08-16 09:34:26 -0700109public:
110 struct NuPlayerStreamListener;
111 struct Source;
112
Andreas Huberf9334412010-12-15 15:17:42 -0800113private:
Andreas Huberf9334412010-12-15 15:17:42 -0800114 struct Decoder;
Chong Zhang7137ec72014-11-12 16:41:05 -0800115 struct DecoderBase;
Wei Jiabc2fb722014-07-08 16:37:57 -0700116 struct DecoderPassThrough;
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700117 struct CCDecoder;
Andreas Huberafed0e12011-09-20 15:39:58 -0700118 struct GenericSource;
Andreas Huber5bc087c2010-12-23 10:27:40 -0800119 struct HTTPLiveSource;
Andreas Huber5bc087c2010-12-23 10:27:40 -0800120 struct Renderer;
Andreas Huberafed0e12011-09-20 15:39:58 -0700121 struct RTSPSource;
Andreas Huber5bc087c2010-12-23 10:27:40 -0800122 struct StreamingSource;
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800123 struct Action;
124 struct SeekAction;
Andreas Huber57a339c2012-12-03 11:18:00 -0800125 struct SetSurfaceAction;
Chong Zhangf8d71772014-11-26 15:08:34 -0800126 struct ResumeDecoderAction;
Wei Jiafef808d2014-10-31 17:57:05 -0700127 struct FlushDecoderAction;
Andreas Huber14f76722013-01-15 09:04:18 -0800128 struct PostMessageAction;
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800129 struct SimpleAction;
Andreas Huberf9334412010-12-15 15:17:42 -0800130
131 enum {
Andreas Huber078cfcf2011-09-15 12:25:04 -0700132 kWhatSetDataSource = '=DaS',
Andreas Huber9575c962013-02-05 13:59:56 -0800133 kWhatPrepare = 'prep',
Lajos Molnar1de1e252015-04-30 18:18:34 -0700134 kWhatSetVideoSurface = '=VSu',
Andreas Huber078cfcf2011-09-15 12:25:04 -0700135 kWhatSetAudioSink = '=AuS',
136 kWhatMoreDataQueued = 'more',
Lajos Molnar3a474aa2015-04-24 17:10:07 -0700137 kWhatConfigPlayback = 'cfPB',
138 kWhatConfigSync = 'cfSy',
139 kWhatGetPlaybackSettings = 'gPbS',
140 kWhatGetSyncSettings = 'gSyS',
Andreas Huber078cfcf2011-09-15 12:25:04 -0700141 kWhatStart = 'strt',
142 kWhatScanSources = 'scan',
143 kWhatVideoNotify = 'vidN',
144 kWhatAudioNotify = 'audN',
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700145 kWhatClosedCaptionNotify = 'capN',
Andreas Huber078cfcf2011-09-15 12:25:04 -0700146 kWhatRendererNotify = 'renN',
147 kWhatReset = 'rset',
Wei Jia52c28512017-09-13 18:17:51 -0700148 kWhatNotifyTime = 'nfyT',
Andreas Huber078cfcf2011-09-15 12:25:04 -0700149 kWhatSeek = 'seek',
150 kWhatPause = 'paus',
151 kWhatResume = 'rsme',
Andreas Huberb7c8e912012-11-27 15:02:53 -0800152 kWhatPollDuration = 'polD',
Andreas Huberb5f25f02013-02-05 10:14:26 -0800153 kWhatSourceNotify = 'srcN',
Chong Zhangdcb89b32013-08-06 09:44:47 -0700154 kWhatGetTrackInfo = 'gTrI',
Robert Shih7c4f0d72014-07-09 18:53:31 -0700155 kWhatGetSelectedTrack = 'gSel',
Chong Zhangdcb89b32013-08-06 09:44:47 -0700156 kWhatSelectTrack = 'selT',
Wei Jia9bb38032017-03-23 18:00:38 -0700157 kWhatGetBufferingSettings = 'gBus',
Wei Jia48fa06d2016-12-20 15:30:49 -0800158 kWhatSetBufferingSettings = 'sBuS',
Hassan Shojaniacefac142017-02-06 21:02:02 -0800159 kWhatPrepareDrm = 'pDrm',
160 kWhatReleaseDrm = 'rDrm',
Dongwon Kang47afe0a2018-03-27 15:15:30 -0700161 kWhatMediaClockNotify = 'mckN',
Andreas Huberf9334412010-12-15 15:17:42 -0800162 };
163
Andreas Huber43c3e6c2011-01-05 12:17:08 -0800164 wp<NuPlayerDriver> mDriver;
Andreas Huber9b80c2b2011-06-30 15:47:02 -0700165 bool mUIDValid;
166 uid_t mUID;
Ronghua Wu68845c12015-07-21 09:50:48 -0700167 pid_t mPID;
Wei Jia0a68f662017-08-30 18:01:26 -0700168 const sp<MediaClock> mMediaClock;
Wei Jiac45a4b22016-04-15 15:30:23 -0700169 Mutex mSourceLock; // guard |mSource|.
Andreas Huber5bc087c2010-12-23 10:27:40 -0800170 sp<Source> mSource;
Andreas Huber9575c962013-02-05 13:59:56 -0800171 uint32_t mSourceFlags;
Lajos Molnar1de1e252015-04-30 18:18:34 -0700172 sp<Surface> mSurface;
Andreas Huberf9334412010-12-15 15:17:42 -0800173 sp<MediaPlayerBase::AudioSink> mAudioSink;
Chong Zhang7137ec72014-11-12 16:41:05 -0800174 sp<DecoderBase> mVideoDecoder;
Wei Jiabc2fb722014-07-08 16:37:57 -0700175 bool mOffloadAudio;
Chong Zhang7137ec72014-11-12 16:41:05 -0800176 sp<DecoderBase> mAudioDecoder;
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700177 sp<CCDecoder> mCCDecoder;
Andreas Huberf9334412010-12-15 15:17:42 -0800178 sp<Renderer> mRenderer;
Lajos Molnar09524832014-07-17 14:29:51 -0700179 sp<ALooper> mRendererLooper;
Wei Jia88703c32014-08-06 11:24:07 -0700180 int32_t mAudioDecoderGeneration;
181 int32_t mVideoDecoderGeneration;
Wei Jia57568df2014-09-22 10:16:29 -0700182 int32_t mRendererGeneration;
Andreas Huberf9334412010-12-15 15:17:42 -0800183
Ray Essick0d98c182017-11-09 13:42:42 -0800184 Mutex mPlayingTimeLock;
Ray Essickd4d00612017-01-03 09:36:27 -0800185 int64_t mLastStartedPlayingTimeNs;
Ray Essickeda32522018-02-28 12:08:28 -0800186 void updatePlaybackTimer(bool stopping, const char *where);
Ray Essick0d98c182017-11-09 13:42:42 -0800187 void startPlaybackTimer(const char *where);
Ray Essickd4d00612017-01-03 09:36:27 -0800188
Ray Essick58e0f7a2017-11-21 10:59:38 -0800189 int64_t mLastStartedRebufferingTimeNs;
190 void startRebufferingTimer();
Ray Essickeda32522018-02-28 12:08:28 -0800191 void updateRebufferingTimer(bool stopping, bool exitingPlayback);
Ray Essick58e0f7a2017-11-21 10:59:38 -0800192
Robert Shih1a5c8592015-08-04 18:07:44 -0700193 int64_t mPreviousSeekTimeUs;
194
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800195 List<sp<Action> > mDeferredActions;
196
Andreas Huberf9334412010-12-15 15:17:42 -0800197 bool mAudioEOS;
198 bool mVideoEOS;
199
Andreas Huber5bc087c2010-12-23 10:27:40 -0800200 bool mScanSourcesPending;
Andreas Huber1aef2112011-01-04 14:01:29 -0800201 int32_t mScanSourcesGeneration;
Andreas Huber5bc087c2010-12-23 10:27:40 -0800202
Andreas Huberb7c8e912012-11-27 15:02:53 -0800203 int32_t mPollDurationGeneration;
Robert Shihd3b0bbb2014-07-23 15:00:25 -0700204 int32_t mTimedTextGeneration;
Andreas Huberb7c8e912012-11-27 15:02:53 -0800205
Andreas Huberf9334412010-12-15 15:17:42 -0800206 enum FlushStatus {
207 NONE,
Andreas Huberf9334412010-12-15 15:17:42 -0800208 FLUSHING_DECODER,
Andreas Huber1aef2112011-01-04 14:01:29 -0800209 FLUSHING_DECODER_SHUTDOWN,
Andreas Huber3831a062010-12-21 10:22:33 -0800210 SHUTTING_DOWN_DECODER,
211 FLUSHED,
212 SHUT_DOWN,
Andreas Huberf9334412010-12-15 15:17:42 -0800213 };
214
Wei Jiafef808d2014-10-31 17:57:05 -0700215 enum FlushCommand {
216 FLUSH_CMD_NONE,
217 FLUSH_CMD_FLUSH,
218 FLUSH_CMD_SHUTDOWN,
219 };
220
Andy Hung8d121d42014-10-03 09:53:53 -0700221 // Status of flush responses from the decoder and renderer.
222 bool mFlushComplete[2][2];
223
Andreas Huberf9334412010-12-15 15:17:42 -0800224 FlushStatus mFlushingAudio;
225 FlushStatus mFlushingVideo;
226
Chong Zhangf8d71772014-11-26 15:08:34 -0800227 // Status of flush responses from the decoder and renderer.
228 bool mResumePending;
229
James Dong0d268a32012-08-31 12:18:27 -0700230 int32_t mVideoScalingMode;
231
Lajos Molnar3a474aa2015-04-24 17:10:07 -0700232 AudioPlaybackRate mPlaybackSettings;
233 AVSyncSettings mSyncSettings;
234 float mVideoFpsHint;
Andreas Huber57a339c2012-12-03 11:18:00 -0800235 bool mStarted;
Wei Jia8a092d32016-06-03 14:57:24 -0700236 bool mPrepared;
Ronghua Wu64c2d172015-10-07 16:52:19 -0700237 bool mResetting;
Robert Shih0c61a0d2015-07-06 15:09:10 -0700238 bool mSourceStarted;
Wei Jia686e8e52017-04-03 14:08:01 -0700239 bool mAudioDecoderError;
240 bool mVideoDecoderError;
Andreas Huber57a339c2012-12-03 11:18:00 -0800241
Chong Zhangefbb6192015-01-30 17:13:27 -0800242 // Actual pause state, either as requested by client or due to buffering.
243 bool mPaused;
244
245 // Pause state as requested by client. Note that if mPausedByClient is
246 // true, mPaused is always true; if mPausedByClient is false, mPaused could
247 // still become true, when we pause internally due to buffering.
248 bool mPausedByClient;
249
Chong Zhang8a048332015-05-06 15:16:28 -0700250 // Pause state as requested by source (internally) due to buffering
251 bool mPausedForBuffering;
252
Hassan Shojaniacefac142017-02-06 21:02:02 -0800253 // Modular DRM
254 sp<ICrypto> mCrypto;
255 bool mIsDrmProtected;
256
Hassan Shojaniaff63de72017-04-26 15:10:42 -0700257 typedef enum {
258 DATA_SOURCE_TYPE_NONE,
259 DATA_SOURCE_TYPE_HTTP_LIVE,
260 DATA_SOURCE_TYPE_RTSP,
261 DATA_SOURCE_TYPE_GENERIC_URL,
262 DATA_SOURCE_TYPE_GENERIC_FD,
263 DATA_SOURCE_TYPE_MEDIA,
264 DATA_SOURCE_TYPE_STREAM,
265 } DATA_SOURCE_TYPE;
266
267 std::atomic<DATA_SOURCE_TYPE> mDataSourceType;
268
Chong Zhang7137ec72014-11-12 16:41:05 -0800269 inline const sp<DecoderBase> &getDecoder(bool audio) {
Lajos Molnar87603c02014-08-20 19:25:30 -0700270 return audio ? mAudioDecoder : mVideoDecoder;
271 }
272
Andy Hung8d121d42014-10-03 09:53:53 -0700273 inline void clearFlushComplete() {
274 mFlushComplete[0][0] = false;
275 mFlushComplete[0][1] = false;
276 mFlushComplete[1][0] = false;
277 mFlushComplete[1][1] = false;
278 }
279
Wei Jia41cd4632016-05-13 10:53:30 -0700280 void tryOpenAudioSinkForOffload(
281 const sp<AMessage> &format, const sp<MetaData> &audioMeta, bool hasVideo);
Andy Hung282a7e32014-08-14 15:56:34 -0700282 void closeAudioSink();
Wei Jia5031b2f2016-02-25 11:19:31 -0800283 void restartAudio(
Wei Jiaa05f1e32016-03-25 16:31:22 -0700284 int64_t currentPositionUs, bool forceNonOffload, bool needsToCreateAudioDecoder);
Wei Jia41cd4632016-05-13 10:53:30 -0700285 void determineAudioModeChange(const sp<AMessage> &audioFormat);
Andy Hung282a7e32014-08-14 15:56:34 -0700286
Wei Jiaa05f1e32016-03-25 16:31:22 -0700287 status_t instantiateDecoder(
288 bool audio, sp<DecoderBase> *decoder, bool checkAudioModeChange = true);
Andreas Huberf9334412010-12-15 15:17:42 -0800289
Lajos Molnarfcd3e942015-03-31 10:06:48 -0700290 status_t onInstantiateSecureDecoders();
291
Chong Zhangced1c2f2014-08-08 15:22:35 -0700292 void updateVideoSize(
293 const sp<AMessage> &inputFormat,
294 const sp<AMessage> &outputFormat = NULL);
295
Chong Zhangdcb89b32013-08-06 09:44:47 -0700296 void notifyListener(int msg, int ext1, int ext2, const Parcel *in = NULL);
Andreas Huberf9334412010-12-15 15:17:42 -0800297
Andy Hung8d121d42014-10-03 09:53:53 -0700298 void handleFlushComplete(bool audio, bool isDecoder);
Andreas Huber3831a062010-12-21 10:22:33 -0800299 void finishFlushIfPossible();
300
Wei Jiac5de0912016-11-18 10:22:14 -0800301 void onStart(
302 int64_t startPositionUs = -1,
303 MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC);
Wei Jia94211742014-10-28 17:09:06 -0700304 void onResume();
Chong Zhangefbb6192015-01-30 17:13:27 -0800305 void onPause();
Wei Jia94211742014-10-28 17:09:06 -0700306
Ronghua Wud7988b12014-10-03 15:19:10 -0700307 bool audioDecoderStillNeeded();
308
Chong Zhang7137ec72014-11-12 16:41:05 -0800309 void flushDecoder(bool audio, bool needShutdown);
Andreas Huber1aef2112011-01-04 14:01:29 -0800310
Chong Zhangf8d71772014-11-26 15:08:34 -0800311 void finishResume();
Wei Jia1061c9c2015-05-19 16:02:17 -0700312 void notifyDriverSeekComplete();
Chong Zhangf8d71772014-11-26 15:08:34 -0800313
Andreas Huber1aef2112011-01-04 14:01:29 -0800314 void postScanSources();
Andreas Huber53df1a42010-12-22 10:03:04 -0800315
Andreas Huberb7c8e912012-11-27 15:02:53 -0800316 void schedulePollDuration();
317 void cancelPollDuration();
318
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800319 void processDeferredActions();
320
Wei Jiac5de0912016-11-18 10:22:14 -0800321 void performSeek(int64_t seekTimeUs, MediaPlayerSeekMode mode);
Wei Jiafef808d2014-10-31 17:57:05 -0700322 void performDecoderFlush(FlushCommand audio, FlushCommand video);
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800323 void performReset();
324 void performScanSources();
Lajos Molnar1de1e252015-04-30 18:18:34 -0700325 void performSetSurface(const sp<Surface> &wrapper);
Chong Zhangf8d71772014-11-26 15:08:34 -0800326 void performResumeDecoders(bool needNotify);
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800327
Andreas Huber9575c962013-02-05 13:59:56 -0800328 void onSourceNotify(const sp<AMessage> &msg);
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700329 void onClosedCaptionNotify(const sp<AMessage> &msg);
Andreas Huber9575c962013-02-05 13:59:56 -0800330
Andreas Huber14f76722013-01-15 09:04:18 -0800331 void queueDecoderShutdown(
332 bool audio, bool video, const sp<AMessage> &reply);
333
Chong Zhang404fced2014-06-11 14:45:31 -0700334 void sendSubtitleData(const sp<ABuffer> &buffer, int32_t baseIndex);
Robert Shih08528432015-04-08 09:06:54 -0700335 void sendTimedMetaData(const sp<ABuffer> &buffer);
Robert Shihd3b0bbb2014-07-23 15:00:25 -0700336 void sendTimedTextData(const sp<ABuffer> &buffer);
Chong Zhang404fced2014-06-11 14:45:31 -0700337
Chih-Hung Hsiehe964d4e2016-08-09 14:31:32 -0700338 void writeTrackInfo(Parcel* reply, const sp<AMessage>& format) const;
Chong Zhang404fced2014-06-11 14:45:31 -0700339
Hassan Shojaniacefac142017-02-06 21:02:02 -0800340 status_t onPrepareDrm(const sp<AMessage> &msg);
341 status_t onReleaseDrm();
342
Andreas Huberf9334412010-12-15 15:17:42 -0800343 DISALLOW_EVIL_CONSTRUCTORS(NuPlayer);
344};
345
346} // namespace android
347
348#endif // NU_PLAYER_H_