Merge change I91eb0354 into eclair-mr2
* changes: Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway.
This commit is contained in:
@ -38,12 +38,12 @@ int main() {
|
||||
meta->setInt32(kKeyMaxInputSize, maxInputSize);
|
||||
}
|
||||
|
||||
sp<OMXCodec> encoder = OMXCodec::Create(
|
||||
sp<MediaSource> encoder = OMXCodec::Create(
|
||||
client.interface(),
|
||||
meta, true /* createEncoder */,
|
||||
source);
|
||||
|
||||
sp<OMXCodec> decoder = OMXCodec::Create(
|
||||
sp<MediaSource> decoder = OMXCodec::Create(
|
||||
client.interface(),
|
||||
meta, false /* createEncoder */,
|
||||
encoder);
|
||||
|
@ -154,7 +154,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
sp<MetaData> meta = source->getFormat();
|
||||
|
||||
sp<OMXCodec> decoder = OMXCodec::Create(
|
||||
sp<MediaSource> decoder = OMXCodec::Create(
|
||||
client.interface(), meta, false /* createEncoder */, source);
|
||||
|
||||
int width, height;
|
||||
@ -173,7 +173,7 @@ int main(int argc, char **argv) {
|
||||
enc_meta->setInt32(kKeyWidth, width);
|
||||
enc_meta->setInt32(kKeyHeight, height);
|
||||
|
||||
sp<OMXCodec> encoder =
|
||||
sp<MediaSource> encoder =
|
||||
OMXCodec::Create(
|
||||
client.interface(), enc_meta, true /* createEncoder */, decoder);
|
||||
|
||||
|
@ -33,7 +33,7 @@ struct OMXCodec : public MediaSource,
|
||||
enum CreationFlags {
|
||||
kPreferSoftwareCodecs = 1,
|
||||
};
|
||||
static sp<OMXCodec> Create(
|
||||
static sp<MediaSource> Create(
|
||||
const sp<IOMX> &omx,
|
||||
const sp<MetaData> &meta, bool createEncoder,
|
||||
const sp<MediaSource> &source,
|
||||
|
@ -274,7 +274,7 @@ void OMXCodec::findMatchingCodecs(
|
||||
}
|
||||
|
||||
// static
|
||||
sp<OMXCodec> OMXCodec::Create(
|
||||
sp<MediaSource> OMXCodec::Create(
|
||||
const sp<IOMX> &omx,
|
||||
const sp<MetaData> &meta, bool createEncoder,
|
||||
const sp<MediaSource> &source,
|
||||
|
Reference in New Issue
Block a user