diff options
Diffstat (limited to 'cmds/stagefright/stream.cpp')
-rw-r--r-- | cmds/stagefright/stream.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp index dba67a9..0566d14 100644 --- a/cmds/stagefright/stream.cpp +++ b/cmds/stagefright/stream.cpp @@ -21,6 +21,7 @@ #include <binder/ProcessState.h> #include <cutils/properties.h> // for property_get +#include <media/IMediaHTTPService.h> #include <media/IStreamSource.h> #include <media/mediaplayer.h> #include <media/stagefright/foundation/ADebug.h> @@ -159,7 +160,9 @@ private: MyConvertingStreamSource::MyConvertingStreamSource(const char *filename) : mCurrentBufferIndex(-1), mCurrentBufferOffset(0) { - sp<DataSource> dataSource = DataSource::CreateFromURI(filename); + sp<DataSource> dataSource = + DataSource::CreateFromURI(NULL /* httpService */, filename); + CHECK(dataSource != NULL); sp<MediaExtractor> extractor = MediaExtractor::Create(dataSource); @@ -371,7 +374,7 @@ int main(int argc, char **argv) { } sp<IMediaPlayer> player = - service->create(client, 0); + service->create(client, AUDIO_SESSION_ALLOCATE); if (player != NULL && player->setDataSource(source) == NO_ERROR) { player->setVideoSurfaceTexture(surface->getIGraphicBufferProducer()); |