StreamingSource.h revision eac68baf095aeef54865c28b6888924dc6295cbd
15bc087c573c70c84c6a39946457590b42d392a33Andreas Huber/* 25bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * Copyright (C) 2010 The Android Open Source Project 35bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * 45bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * Licensed under the Apache License, Version 2.0 (the "License"); 55bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * you may not use this file except in compliance with the License. 65bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * You may obtain a copy of the License at 75bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * 85bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * http://www.apache.org/licenses/LICENSE-2.0 95bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * 105bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * Unless required by applicable law or agreed to in writing, software 115bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * distributed under the License is distributed on an "AS IS" BASIS, 125bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * See the License for the specific language governing permissions and 145bc087c573c70c84c6a39946457590b42d392a33Andreas Huber * limitations under the License. 155bc087c573c70c84c6a39946457590b42d392a33Andreas Huber */ 165bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 175bc087c573c70c84c6a39946457590b42d392a33Andreas Huber#ifndef STREAMING_SOURCE_H_ 185bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 195bc087c573c70c84c6a39946457590b42d392a33Andreas Huber#define STREAMING_SOURCE_H_ 205bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 215bc087c573c70c84c6a39946457590b42d392a33Andreas Huber#include "NuPlayer.h" 225bc087c573c70c84c6a39946457590b42d392a33Andreas Huber#include "NuPlayerSource.h" 235bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 245bc087c573c70c84c6a39946457590b42d392a33Andreas Hubernamespace android { 255bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 265bc087c573c70c84c6a39946457590b42d392a33Andreas Huberstruct ABuffer; 275bc087c573c70c84c6a39946457590b42d392a33Andreas Huberstruct ATSParser; 285bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 295bc087c573c70c84c6a39946457590b42d392a33Andreas Huberstruct NuPlayer::StreamingSource : public NuPlayer::Source { 305bc087c573c70c84c6a39946457590b42d392a33Andreas Huber StreamingSource(const sp<IStreamSource> &source); 315bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 3243c3e6ce02215ca99d506458f596cb1211639f29Andreas Huber virtual void start(); 335bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 34eac68baf095aeef54865c28b6888924dc6295cbdAndreas Huber virtual status_t feedMoreTSData(); 355bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 3643c3e6ce02215ca99d506458f596cb1211639f29Andreas Huber virtual sp<MetaData> getFormat(bool audio); 3743c3e6ce02215ca99d506458f596cb1211639f29Andreas Huber virtual status_t dequeueAccessUnit(bool audio, sp<ABuffer> *accessUnit); 385bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 395bc087c573c70c84c6a39946457590b42d392a33Andreas Huberprotected: 405bc087c573c70c84c6a39946457590b42d392a33Andreas Huber virtual ~StreamingSource(); 415bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 425bc087c573c70c84c6a39946457590b42d392a33Andreas Huberprivate: 435bc087c573c70c84c6a39946457590b42d392a33Andreas Huber sp<IStreamSource> mSource; 44eac68baf095aeef54865c28b6888924dc6295cbdAndreas Huber status_t mFinalResult; 455bc087c573c70c84c6a39946457590b42d392a33Andreas Huber sp<NuPlayerStreamListener> mStreamListener; 465bc087c573c70c84c6a39946457590b42d392a33Andreas Huber sp<ATSParser> mTSParser; 475bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 485bc087c573c70c84c6a39946457590b42d392a33Andreas Huber DISALLOW_EVIL_CONSTRUCTORS(StreamingSource); 495bc087c573c70c84c6a39946457590b42d392a33Andreas Huber}; 505bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 515bc087c573c70c84c6a39946457590b42d392a33Andreas Huber} // namespace android 525bc087c573c70c84c6a39946457590b42d392a33Andreas Huber 535bc087c573c70c84c6a39946457590b42d392a33Andreas Huber#endif // STREAMING_SOURCE_H_ 54