blob: 94812347ac0a43406ab01126da488384b0bfa558 [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
Andreas Huber43c3e6c2011-01-05 12:17:08 -080042 void setDriver(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',
Andreas Huberf9334412010-12-15 15:17:42 -0800161 };
162
Andreas Huber43c3e6c2011-01-05 12:17:08 -0800163 wp<NuPlayerDriver> mDriver;
Andreas Huber9b80c2b2011-06-30 15:47:02 -0700164 bool mUIDValid;
165 uid_t mUID;
Ronghua Wu68845c12015-07-21 09:50:48 -0700166 pid_t mPID;
Wei Jia0a68f662017-08-30 18:01:26 -0700167 const sp<MediaClock> mMediaClock;
Wei Jiac45a4b22016-04-15 15:30:23 -0700168 Mutex mSourceLock; // guard |mSource|.
Andreas Huber5bc087c2010-12-23 10:27:40 -0800169 sp<Source> mSource;
Andreas Huber9575c962013-02-05 13:59:56 -0800170 uint32_t mSourceFlags;
Lajos Molnar1de1e252015-04-30 18:18:34 -0700171 sp<Surface> mSurface;
Andreas Huberf9334412010-12-15 15:17:42 -0800172 sp<MediaPlayerBase::AudioSink> mAudioSink;
Chong Zhang7137ec72014-11-12 16:41:05 -0800173 sp<DecoderBase> mVideoDecoder;
Wei Jiabc2fb722014-07-08 16:37:57 -0700174 bool mOffloadAudio;
Chong Zhang7137ec72014-11-12 16:41:05 -0800175 sp<DecoderBase> mAudioDecoder;
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700176 sp<CCDecoder> mCCDecoder;
Andreas Huberf9334412010-12-15 15:17:42 -0800177 sp<Renderer> mRenderer;
Lajos Molnar09524832014-07-17 14:29:51 -0700178 sp<ALooper> mRendererLooper;
Wei Jia88703c32014-08-06 11:24:07 -0700179 int32_t mAudioDecoderGeneration;
180 int32_t mVideoDecoderGeneration;
Wei Jia57568df2014-09-22 10:16:29 -0700181 int32_t mRendererGeneration;
Andreas Huberf9334412010-12-15 15:17:42 -0800182
Ray Essick0d98c182017-11-09 13:42:42 -0800183 Mutex mPlayingTimeLock;
Ray Essickd4d00612017-01-03 09:36:27 -0800184 int64_t mLastStartedPlayingTimeNs;
Ray Essickeda32522018-02-28 12:08:28 -0800185 void updatePlaybackTimer(bool stopping, const char *where);
Ray Essick0d98c182017-11-09 13:42:42 -0800186 void startPlaybackTimer(const char *where);
Ray Essickd4d00612017-01-03 09:36:27 -0800187
Ray Essick58e0f7a2017-11-21 10:59:38 -0800188 int64_t mLastStartedRebufferingTimeNs;
189 void startRebufferingTimer();
Ray Essickeda32522018-02-28 12:08:28 -0800190 void updateRebufferingTimer(bool stopping, bool exitingPlayback);
Ray Essick58e0f7a2017-11-21 10:59:38 -0800191
Robert Shih1a5c8592015-08-04 18:07:44 -0700192 int64_t mPreviousSeekTimeUs;
193
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800194 List<sp<Action> > mDeferredActions;
195
Andreas Huberf9334412010-12-15 15:17:42 -0800196 bool mAudioEOS;
197 bool mVideoEOS;
198
Andreas Huber5bc087c2010-12-23 10:27:40 -0800199 bool mScanSourcesPending;
Andreas Huber1aef2112011-01-04 14:01:29 -0800200 int32_t mScanSourcesGeneration;
Andreas Huber5bc087c2010-12-23 10:27:40 -0800201
Andreas Huberb7c8e912012-11-27 15:02:53 -0800202 int32_t mPollDurationGeneration;
Robert Shihd3b0bbb2014-07-23 15:00:25 -0700203 int32_t mTimedTextGeneration;
Andreas Huberb7c8e912012-11-27 15:02:53 -0800204
Andreas Huberf9334412010-12-15 15:17:42 -0800205 enum FlushStatus {
206 NONE,
Andreas Huberf9334412010-12-15 15:17:42 -0800207 FLUSHING_DECODER,
Andreas Huber1aef2112011-01-04 14:01:29 -0800208 FLUSHING_DECODER_SHUTDOWN,
Andreas Huber3831a062010-12-21 10:22:33 -0800209 SHUTTING_DOWN_DECODER,
210 FLUSHED,
211 SHUT_DOWN,
Andreas Huberf9334412010-12-15 15:17:42 -0800212 };
213
Wei Jiafef808d2014-10-31 17:57:05 -0700214 enum FlushCommand {
215 FLUSH_CMD_NONE,
216 FLUSH_CMD_FLUSH,
217 FLUSH_CMD_SHUTDOWN,
218 };
219
Andy Hung8d121d42014-10-03 09:53:53 -0700220 // Status of flush responses from the decoder and renderer.
221 bool mFlushComplete[2][2];
222
Andreas Huberf9334412010-12-15 15:17:42 -0800223 FlushStatus mFlushingAudio;
224 FlushStatus mFlushingVideo;
225
Chong Zhangf8d71772014-11-26 15:08:34 -0800226 // Status of flush responses from the decoder and renderer.
227 bool mResumePending;
228
James Dong0d268a32012-08-31 12:18:27 -0700229 int32_t mVideoScalingMode;
230
Lajos Molnar3a474aa2015-04-24 17:10:07 -0700231 AudioPlaybackRate mPlaybackSettings;
232 AVSyncSettings mSyncSettings;
233 float mVideoFpsHint;
Andreas Huber57a339c2012-12-03 11:18:00 -0800234 bool mStarted;
Wei Jia8a092d32016-06-03 14:57:24 -0700235 bool mPrepared;
Ronghua Wu64c2d172015-10-07 16:52:19 -0700236 bool mResetting;
Robert Shih0c61a0d2015-07-06 15:09:10 -0700237 bool mSourceStarted;
Wei Jia686e8e52017-04-03 14:08:01 -0700238 bool mAudioDecoderError;
239 bool mVideoDecoderError;
Andreas Huber57a339c2012-12-03 11:18:00 -0800240
Chong Zhangefbb6192015-01-30 17:13:27 -0800241 // Actual pause state, either as requested by client or due to buffering.
242 bool mPaused;
243
244 // Pause state as requested by client. Note that if mPausedByClient is
245 // true, mPaused is always true; if mPausedByClient is false, mPaused could
246 // still become true, when we pause internally due to buffering.
247 bool mPausedByClient;
248
Chong Zhang8a048332015-05-06 15:16:28 -0700249 // Pause state as requested by source (internally) due to buffering
250 bool mPausedForBuffering;
251
Hassan Shojaniacefac142017-02-06 21:02:02 -0800252 // Modular DRM
253 sp<ICrypto> mCrypto;
254 bool mIsDrmProtected;
255
Hassan Shojaniaff63de72017-04-26 15:10:42 -0700256 typedef enum {
257 DATA_SOURCE_TYPE_NONE,
258 DATA_SOURCE_TYPE_HTTP_LIVE,
259 DATA_SOURCE_TYPE_RTSP,
260 DATA_SOURCE_TYPE_GENERIC_URL,
261 DATA_SOURCE_TYPE_GENERIC_FD,
262 DATA_SOURCE_TYPE_MEDIA,
263 DATA_SOURCE_TYPE_STREAM,
264 } DATA_SOURCE_TYPE;
265
266 std::atomic<DATA_SOURCE_TYPE> mDataSourceType;
267
Chong Zhang7137ec72014-11-12 16:41:05 -0800268 inline const sp<DecoderBase> &getDecoder(bool audio) {
Lajos Molnar87603c02014-08-20 19:25:30 -0700269 return audio ? mAudioDecoder : mVideoDecoder;
270 }
271
Andy Hung8d121d42014-10-03 09:53:53 -0700272 inline void clearFlushComplete() {
273 mFlushComplete[0][0] = false;
274 mFlushComplete[0][1] = false;
275 mFlushComplete[1][0] = false;
276 mFlushComplete[1][1] = false;
277 }
278
Wei Jia41cd4632016-05-13 10:53:30 -0700279 void tryOpenAudioSinkForOffload(
280 const sp<AMessage> &format, const sp<MetaData> &audioMeta, bool hasVideo);
Andy Hung282a7e32014-08-14 15:56:34 -0700281 void closeAudioSink();
Wei Jia5031b2f2016-02-25 11:19:31 -0800282 void restartAudio(
Wei Jiaa05f1e32016-03-25 16:31:22 -0700283 int64_t currentPositionUs, bool forceNonOffload, bool needsToCreateAudioDecoder);
Wei Jia41cd4632016-05-13 10:53:30 -0700284 void determineAudioModeChange(const sp<AMessage> &audioFormat);
Andy Hung282a7e32014-08-14 15:56:34 -0700285
Wei Jiaa05f1e32016-03-25 16:31:22 -0700286 status_t instantiateDecoder(
287 bool audio, sp<DecoderBase> *decoder, bool checkAudioModeChange = true);
Andreas Huberf9334412010-12-15 15:17:42 -0800288
Lajos Molnarfcd3e942015-03-31 10:06:48 -0700289 status_t onInstantiateSecureDecoders();
290
Chong Zhangced1c2f2014-08-08 15:22:35 -0700291 void updateVideoSize(
292 const sp<AMessage> &inputFormat,
293 const sp<AMessage> &outputFormat = NULL);
294
Chong Zhangdcb89b32013-08-06 09:44:47 -0700295 void notifyListener(int msg, int ext1, int ext2, const Parcel *in = NULL);
Andreas Huberf9334412010-12-15 15:17:42 -0800296
Andy Hung8d121d42014-10-03 09:53:53 -0700297 void handleFlushComplete(bool audio, bool isDecoder);
Andreas Huber3831a062010-12-21 10:22:33 -0800298 void finishFlushIfPossible();
299
Wei Jiac5de0912016-11-18 10:22:14 -0800300 void onStart(
301 int64_t startPositionUs = -1,
302 MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC);
Wei Jia94211742014-10-28 17:09:06 -0700303 void onResume();
Chong Zhangefbb6192015-01-30 17:13:27 -0800304 void onPause();
Wei Jia94211742014-10-28 17:09:06 -0700305
Ronghua Wud7988b12014-10-03 15:19:10 -0700306 bool audioDecoderStillNeeded();
307
Chong Zhang7137ec72014-11-12 16:41:05 -0800308 void flushDecoder(bool audio, bool needShutdown);
Andreas Huber1aef2112011-01-04 14:01:29 -0800309
Chong Zhangf8d71772014-11-26 15:08:34 -0800310 void finishResume();
Wei Jia1061c9c2015-05-19 16:02:17 -0700311 void notifyDriverSeekComplete();
Chong Zhangf8d71772014-11-26 15:08:34 -0800312
Andreas Huber1aef2112011-01-04 14:01:29 -0800313 void postScanSources();
Andreas Huber53df1a42010-12-22 10:03:04 -0800314
Andreas Huberb7c8e912012-11-27 15:02:53 -0800315 void schedulePollDuration();
316 void cancelPollDuration();
317
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800318 void processDeferredActions();
319
Wei Jiac5de0912016-11-18 10:22:14 -0800320 void performSeek(int64_t seekTimeUs, MediaPlayerSeekMode mode);
Wei Jiafef808d2014-10-31 17:57:05 -0700321 void performDecoderFlush(FlushCommand audio, FlushCommand video);
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800322 void performReset();
323 void performScanSources();
Lajos Molnar1de1e252015-04-30 18:18:34 -0700324 void performSetSurface(const sp<Surface> &wrapper);
Chong Zhangf8d71772014-11-26 15:08:34 -0800325 void performResumeDecoders(bool needNotify);
Andreas Hubera1f8ab02012-11-30 10:53:22 -0800326
Andreas Huber9575c962013-02-05 13:59:56 -0800327 void onSourceNotify(const sp<AMessage> &msg);
Chong Zhanga7fa1d92014-06-11 14:49:23 -0700328 void onClosedCaptionNotify(const sp<AMessage> &msg);
Andreas Huber9575c962013-02-05 13:59:56 -0800329
Andreas Huber14f76722013-01-15 09:04:18 -0800330 void queueDecoderShutdown(
331 bool audio, bool video, const sp<AMessage> &reply);
332
Chong Zhang404fced2014-06-11 14:45:31 -0700333 void sendSubtitleData(const sp<ABuffer> &buffer, int32_t baseIndex);
Robert Shih08528432015-04-08 09:06:54 -0700334 void sendTimedMetaData(const sp<ABuffer> &buffer);
Robert Shihd3b0bbb2014-07-23 15:00:25 -0700335 void sendTimedTextData(const sp<ABuffer> &buffer);
Chong Zhang404fced2014-06-11 14:45:31 -0700336
Chih-Hung Hsiehe964d4e2016-08-09 14:31:32 -0700337 void writeTrackInfo(Parcel* reply, const sp<AMessage>& format) const;
Chong Zhang404fced2014-06-11 14:45:31 -0700338
Hassan Shojaniacefac142017-02-06 21:02:02 -0800339 status_t onPrepareDrm(const sp<AMessage> &msg);
340 status_t onReleaseDrm();
341
Andreas Huberf9334412010-12-15 15:17:42 -0800342 DISALLOW_EVIL_CONSTRUCTORS(NuPlayer);
343};
344
345} // namespace android
346
347#endif // NU_PLAYER_H_