diff options
author | Andreas Huber <andih@google.com> | 2009-08-28 13:32:48 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-08-28 13:32:48 -0700 |
commit | 6d43768514650d65f4f3695da4f7c3e2eefd483c (patch) | |
tree | c8a79356e7f5814b87e3071ca8effcb094199881 /cmds/stagefright | |
parent | a8a371c8a0d88d144d095404673d00cae6464fde (diff) | |
download | frameworks_av-6d43768514650d65f4f3695da4f7c3e2eefd483c.zip frameworks_av-6d43768514650d65f4f3695da4f7c3e2eefd483c.tar.gz frameworks_av-6d43768514650d65f4f3695da4f7c3e2eefd483c.tar.bz2 |
More assert => CHECK
Diffstat (limited to 'cmds/stagefright')
-rw-r--r-- | cmds/stagefright/record.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cmds/stagefright/record.cpp b/cmds/stagefright/record.cpp index 9a2416b..4b44761 100644 --- a/cmds/stagefright/record.cpp +++ b/cmds/stagefright/record.cpp @@ -14,12 +14,10 @@ * limitations under the License. */ -#undef NDEBUG -#include <assert.h> - #include <binder/ProcessState.h> #include <media/stagefright/CameraSource.h> #include <media/stagefright/MediaBufferGroup.h> +#include <media/stagefright/MediaDebug.h> #include <media/stagefright/MetaData.h> #include <media/stagefright/MPEG4Extractor.h> #include <media/stagefright/MPEG4Writer.h> @@ -97,7 +95,7 @@ sp<MediaSource> createSource(const char *filename) { sp<MetaData> meta; for (size_t i = 0; i < num_tracks; ++i) { meta = extractor->getTrackMetaData(i); - assert(meta.get() != NULL); + CHECK(meta.get() != NULL); const char *mime; if (!meta->findCString(kKeyMIMEType, &mime)) { @@ -125,7 +123,7 @@ int main(int argc, char **argv) { } OMXClient client; - assert(client.connect() == android::OK); + CHECK_EQ(client.connect(), OK); #if 0 sp<MediaSource> source = createSource(argv[1]); @@ -143,7 +141,7 @@ int main(int argc, char **argv) { int width, height; bool success = meta->findInt32(kKeyWidth, &width); success = success && meta->findInt32(kKeyHeight, &height); - assert(success); + CHECK(success); #else int width = 320; int height = 240; @@ -171,7 +169,7 @@ int main(int argc, char **argv) { encoder->start(); MediaBuffer *buffer; - while (encoder->read(&buffer) == ::OK) { + while (encoder->read(&buffer) == OK) { printf("got an output frame of size %d\n", buffer->range_length()); buffer->release(); @@ -191,7 +189,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 100; ++i) { MediaBuffer *buffer; status_t err = source->read(&buffer); - assert(err == OK); + CHECK_EQ(err, OK); printf("got a frame, data=%p, size=%d\n", buffer->data(), buffer->range_length()); |