summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-05-08 11:21:26 -0700
committerAndreas Huber <andih@google.com>2012-05-08 11:26:22 -0700
commit8ee516a515c70a492c395b67ce12e19e7d159804 (patch)
treeae968718f25cd7972a03c00e7496a6deb225fc1f /cmds
parenta62bde0a391f65a418d77c46e6ba468433d81dba (diff)
downloadframeworks_av-8ee516a515c70a492c395b67ce12e19e7d159804.zip
frameworks_av-8ee516a515c70a492c395b67ce12e19e7d159804.tar.gz
frameworks_av-8ee516a515c70a492c395b67ce12e19e7d159804.tar.bz2
Submit codec specific data automatically
if it is contained in the format passed to MediaCodec::configure. Change-Id: I8ef6755e8389ec47b44a9c70904ea6c03a00f4f2 related-to-bug: 6364139
Diffstat (limited to 'cmds')
-rw-r--r--cmds/stagefright/codec.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp
index 5a43829..f3370a5 100644
--- a/cmds/stagefright/codec.cpp
+++ b/cmds/stagefright/codec.cpp
@@ -50,8 +50,6 @@ namespace android {
struct CodecState {
sp<MediaCodec> mCodec;
- Vector<sp<ABuffer> > mCSD;
- size_t mCSDIndex;
Vector<sp<ABuffer> > mInBuffers;
Vector<sp<ABuffer> > mOutBuffers;
bool mSignalledInputEOS;
@@ -126,19 +124,8 @@ static int decode(
CHECK_EQ(err, (status_t)OK);
- size_t j = 0;
- sp<ABuffer> buffer;
- while (format->findBuffer(StringPrintf("csd-%d", j).c_str(), &buffer)) {
- state->mCSD.push_back(buffer);
-
- ++j;
- }
-
- state->mCSDIndex = 0;
state->mSignalledInputEOS = false;
state->mSawOutputEOS = false;
-
- ALOGV("got %d pieces of codec specific data.", state->mCSD.size());
}
CHECK(!stateByTrack.isEmpty());
@@ -157,28 +144,6 @@ static int decode(
ALOGV("got %d input and %d output buffers",
state->mInBuffers.size(), state->mOutBuffers.size());
-
- while (state->mCSDIndex < state->mCSD.size()) {
- size_t index;
- status_t err = codec->dequeueInputBuffer(&index, -1ll);
- CHECK_EQ(err, (status_t)OK);
-
- const sp<ABuffer> &srcBuffer =
- state->mCSD.itemAt(state->mCSDIndex++);
-
- const sp<ABuffer> &buffer = state->mInBuffers.itemAt(index);
-
- memcpy(buffer->data(), srcBuffer->data(), srcBuffer->size());
-
- err = codec->queueInputBuffer(
- index,
- 0 /* offset */,
- srcBuffer->size(),
- 0ll /* timeUs */,
- MediaCodec::BUFFER_FLAG_CODECCONFIG);
-
- CHECK_EQ(err, (status_t)OK);
- }
}
bool sawInputEOS = false;