1
0
mirror of https://github.com/ioacademy-jikim/multimedia synced 2026-08-21 13:22:56 +00:00

멀티미디어 예제

This commit is contained in:
ioacademy-jikim
2015-08-04 19:14:13 +09:00
commit d3b375295e
59 changed files with 8232 additions and 0 deletions
+77
View File
@@ -0,0 +1,77 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
//#define LOG_NDEBUG 0
#define LOG_TAG "ATMParser"
#include "ATMParser.h"
#include <ctype.h>
#include <utils/Log.h>
#define LOGD ALOGD
namespace anatomy {
static char pszSource[] = "\
M9a1X1M13B1M55/1M9B1Z1a1M11B1W1a1M54/1M8Z1r1X2M10@1r1S1;1Z1M53/1M9Z1X1r1M3\
W2B1W2M3r1X2M6r1X1M12Z1i1X1M4X1;1X1M24/1M10B1X1S2X7S2X1W1M7.1 1Z1M11X1 2X1M3:1 2\
M6@1M17/1M9B1S2X2a1S1a1S1a1S1a1S3a1W1M7 1r1:1i1M3S1 2M5 1X1M5 1M4:1 2,1M16/1M8X5\
S1X1S2a1S2X6a1M6 2S1 1S1M1B1 1W1,1 1M4 1S1M5 1M3Z1 1M2 1S1M15/1M6@1X3Z1B5S2a1B5a\
1X2S1M5 1S1M1 1X1M1:1 1;1i1 1M4 1S1M5 1M3i1 1M2.1,1M15/1M6X1S2X1@1M5a1X1B1M5B1S2\
X1a1M4 1W1M1 1Z1M1X1 1M2i1M4 1Z1M5 1M3a1 1M2 1X1M1Z1 1a1M11/1M5X2S1a1S1Z6S2a1Z1B\
1Z4S1a1S1X1B1M2.1 2Z1 2W1M1 3;1M2X1 4M2 5M2.1 3M2B1 2M11/1M4W1X1S1a1S1a1S2X3S2a1\
S2X3S2a3S1X1M2B1Z1B1M1B2M3B1@1M3@1Z1@2W1M2W1Z1@1W1@1M3W1B1M3a1 1W1M11/1M2@1B1S2a\
1S1a1S1a1S3a1S1a1S1a1S1a1S1a1S1a1S1a1S1a1X1Z1M35B1Z1M12/1M1B1r1X2a1S1X20S2a1r1X2\
Z1M46/1Z1S2a1S2Z1M6@1M5@1M1@1M5@1S2X1a1S1r1B1M45/1X1Z1S1Z1X1S1Z1M21S1a1X1a1S1X2M\
45/1B1S1a2S2a1X19S1X1a2S1a2X1a1M45/1M1B1r1S1X1a2S3X1S1X1S9X1S6a1X1a1X2@1M45/1M2B\
1X3a4Z1a18S1r1X1Z1M47/1M4W1X1S1a8Z1a12S1X1Z1M23a1X1M24/1M5S1X1S1a6Z1a13S1X1M4B1W\
1M11W1B1M5 2M5Z1X1M17/1M5@1X1a1S1a8Z1a7Z1a2X1Z1M2X1 3X1M2 2,1 2M2 4M2r1 4:1M2 4M\
2 6W2 2S1i1 1.1/1M6Z1X1a10Z1a8X2M3a1:1M1 2M2@1 1i1M1 1M2.1W1r1 1M4 1:1M3B1 1M2 1\
i1M1i1 1M1 1M1 1X1M1X1 1M2 1M1/1M7a1X1a2Z1a13Z1S1X1W1M3B1 2S1X1M3 1M2 1M2i1 1;1i\
1M4.1r1M1@1M1X1 1M2i1 1M1X1,1M1 1M1,1r1M2 1S2i1M1/1M8Z1X1a5S1a1S1a6Z1S1X1W1M4 2Z\
2 2M2 1Z1M1 1W1B1 2M1 2r1M2 2a1 1M1@1 1W1M1 1S1M1r1 1M1 1M1 1i1M3 2M2/1M9X1r1S1a\
1Z1S3a1S1a1S1a3X3@1M4X1 2i1 1.1M1.1 2r1 2M1 2.1 2W1M2r1 2a1M2X1 2i1M2 2,1 1,1 2M\
3.1 1M2/1M9X1S1X3S1X9S1a1X1Z1M46B1 2Z1M2/1M9X1S1Z1S1X1M3@3M2X1a2S1r1B1M46W1 1.1M\
3/1M9@1a1Z3M8W1a1Z1a1Z1M53";
ATMParser::ATMParser()
: mOffset(0),
mLength(sizeof(pszSource)) {
}
void ATMParser::read(void* buffer, int* length) {
int i = 0;
if ( mOffset < mLength )
{
for ( i = mOffset+1; i < mLength; i++ )
{
if ( !isdigit(pszSource[i]) )
break;
}
*length = i - mOffset + 1;
memcpy(buffer, &pszSource[mOffset], *length);
mOffset = i;
LOGD("mOffset : %d , mLength : %d, *length : %d", mOffset, mLength, *length);
}
};
}
+35
View File
@@ -0,0 +1,35 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef ATM_PARSER_H_
#define ATM_PARSER_H_
namespace anatomy {
class ATMParser {
public:
ATMParser();
virtual ~ATMParser(){}
void read(void* buffer,int* length);
private:
int mOffset;
int mLength;
};
} // namespace anatomy
#endif // ATM_PARSER_H_
+263
View File
@@ -0,0 +1,263 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
//#define LOG_NDEBUG 0
#define LOG_TAG "AnatomyOMXClient"
#include "AnatomyOMXClient.h"
#include "AnatomyOMXCore.h"
#include <media/stagefright/foundation/ADebug.h>
#include <utils/Log.h>
#define LOGW ALOGW
#define LOGD ALOGD
namespace anatomy {
template<class T>
static void InitOMXParams(T *params) {
params->nSize = sizeof(T);
params->nVersion.s.nVersionMajor = 1;
params->nVersion.s.nVersionMinor = 0;
params->nVersion.s.nRevision = 0;
params->nVersion.s.nStep = 0;
}
void AnatomyOMXClient::prepare() {
init();
changeState(OMX_StateIdle);
allocateBuffers();
sleep(1);
changeState(OMX_StateExecuting);
sleep(1);
}
void AnatomyOMXClient::stop() {
changeState(OMX_StateIdle);
sleep(1);
changeState(OMX_StateLoaded);
freeBuffers();
sleep(1);
deinit();
}
void AnatomyOMXClient::init() {
OMX_HANDLETYPE handle = NULL;
char componentName[256];
OMX_Init();
OMX_ComponentNameEnum(componentName, 256, 0);
OMX_GetHandle(&handle, componentName, this, &AnatomyOMXClient::kCallbacks);
CHECK(handle != NULL);
mComponentHandle = handle;
}
void AnatomyOMXClient::changeState(OMX_STATETYPE state) {
OMX_SendCommand(mComponentHandle, OMX_CommandStateSet, state, NULL);
}
void AnatomyOMXClient::allocateBuffers() {
OMX_PARAM_PORTDEFINITIONTYPE def;
InitOMXParams(&def);
def.nPortIndex = kPortIndexInput;
OMX_GetParameter(mComponentHandle, OMX_IndexParamPortDefinition, &def);
OMX_BUFFERHEADERTYPE *pInputHeader;
for(uint i = 0; i < def.nBufferCountActual; i++ )
{
OMX_AllocateBuffer(mComponentHandle, &pInputHeader, 0, this, def.nBufferSize);
addOMXBufferInfo(kPortIndexInput, pInputHeader);
}
InitOMXParams(&def);
def.nPortIndex = kPortIndexOutput;
OMX_GetParameter(mComponentHandle, OMX_IndexParamPortDefinition, &def);
OMX_BUFFERHEADERTYPE *pOutputHeader;
for(uint i = 0; i < def.nBufferCountActual; i++ )
{
OMX_AllocateBuffer(mComponentHandle, &pOutputHeader, 1, this, def.nBufferSize);
addOMXBufferInfo(kPortIndexOutput, pOutputHeader);
}
}
void AnatomyOMXClient::excute() {
int nSize = 0;
OMX_BUFFERHEADERTYPE *pInputHeader = NULL;
OMX_BUFFERHEADERTYPE *pOutputHeader = NULL;
for(size_t i = 0; i < mBufferInfo.size(); i++) {
if( mBufferInfo[i].mPortIndex == kPortIndexInput ) {
pInputHeader = mBufferInfo[i].mBufferHeader;
read((char*)(pInputHeader->pBuffer), &nSize);
OMX_EmptyThisBuffer(mComponentHandle, pInputHeader);
removeOMXBufferInfo(kPortIndexInput, mBufferInfo[i].mBufferHeader);
}
if( mBufferInfo[i].mPortIndex == kPortIndexOutput ) {
pOutputHeader = mBufferInfo[i].mBufferHeader;
OMX_FillThisBuffer(mComponentHandle, pOutputHeader);
removeOMXBufferInfo(kPortIndexOutput, mBufferInfo[i].mBufferHeader);
}
}
}
void AnatomyOMXClient::deinit() {
OMX_FreeHandle(mComponentHandle);
OMX_Deinit();
}
void AnatomyOMXClient::addOMXBufferInfo(
OMX_U32 portIndex, OMX_BUFFERHEADERTYPE* header) {
OMXClientBufferInfo info;
info.mPortIndex = portIndex;
info.mBufferHeader = header;
mBufferInfo.push(info);
}
void AnatomyOMXClient::removeOMXBufferInfo(
OMX_U32 portIndex, OMX_BUFFERHEADERTYPE* header) {
bool found = false;
for (size_t i = 0; i < mBufferInfo.size(); i++) {
if (mBufferInfo[i].mPortIndex == portIndex
&& mBufferInfo[i].mBufferHeader == header) {
found = true;
mBufferInfo.removeItemsAt(i);
break;
}
}
if (!found) {
LOGW("Attempt to remove an active buffer we know nothing about...");
}
}
void AnatomyOMXClient::freeBuffers() {
LOGD("=============================================");
for (size_t i = mBufferInfo.size(); i--;) {
int port_index= mBufferInfo[i].mPortIndex;
OMX_BUFFERHEADERTYPE *header = mBufferInfo[i].mBufferHeader;
LOGD("mBufferInfo[%d] mPortIndex : %d, mBufferHeader %p",i, port_index, header);
removeOMXBufferInfo(port_index, header);
OMX_FreeBuffer(mComponentHandle, port_index, header);
}
LOGD("=============================================");
}
// static
OMX_CALLBACKTYPE AnatomyOMXClient::kCallbacks = {
&OnEvent, &OnEmptyBufferDone, &OnFillBufferDone
};
OMX_ERRORTYPE AnatomyOMXClient::OnFillBufferDone(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
AnatomyOMXClient* omxclient = reinterpret_cast<AnatomyOMXClient*>(pAppData);
CHECK( NULL != omxclient);
CHECK( NULL != pBuffer );
omxclient->addOMXBufferInfo(kPortIndexOutput, pBuffer);
if( pBuffer->nFlags & OMX_BUFFERFLAG_EOS || omxclient->getStatus() == 1 )
{
omxclient->signalEOF();
omxclient->setStatus(1);
return OMX_ErrorNone;
}
if( pBuffer->nSize > 0 )
{
omxclient->render(pBuffer->pBuffer, pBuffer->nSize);
}
OMX_FillThisBuffer(hComponent, pBuffer);
omxclient->removeOMXBufferInfo(kPortIndexOutput, pBuffer);
return OMX_ErrorNone;
}
OMX_ERRORTYPE AnatomyOMXClient::OnEmptyBufferDone(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
AnatomyOMXClient* omxclient = reinterpret_cast<AnatomyOMXClient*>(pAppData);
int nSize = 0;
omxclient->addOMXBufferInfo(kPortIndexInput, pBuffer);
CHECK(NULL != omxclient);
CHECK( NULL != pBuffer );
if( pBuffer->nFlags & OMX_BUFFERFLAG_EOS )
{
return OMX_ErrorNone;
}
omxclient->read(pBuffer->pBuffer, &nSize);
if( nSize <= 0 ) {
pBuffer->nSize = 0;
pBuffer->nFlags |= OMX_BUFFERFLAG_EOS;
}
else {
pBuffer->nSize = nSize;
}
OMX_EmptyThisBuffer(hComponent, pBuffer);
omxclient->removeOMXBufferInfo(kPortIndexInput, pBuffer);
return OMX_ErrorNone;
}
OMX_ERRORTYPE AnatomyOMXClient::OnEvent(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_EVENTTYPE eEvent,
OMX_IN OMX_U32 nData1,
OMX_IN OMX_U32 nData2,
OMX_IN OMX_PTR pEventData) {
AnatomyOMXClient* omxclient = reinterpret_cast<AnatomyOMXClient*>(pAppData);
switch(eEvent)
{
case OMX_EventCmdComplete:
if (OMX_CommandStateSet == nData1)
{
switch (nData2)
{
case OMX_StateLoaded:
omxclient->signalLoadedState();
break;
case OMX_StateIdle:
omxclient->signalIdleState();
break;
case OMX_StateExecuting:
omxclient->signalExcutingState();
break;
}
}
break;
case OMX_EventError:
default:
break;
}
return OMX_ErrorNone;
}
}
+113
View File
@@ -0,0 +1,113 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef ANATOMY_OMXCLIENT_H_
#define ANATOMY_OMXCLIENT_H_
#include "ATMParser.h"
#include "StdoutRenderer.h"
#include "OMX_Types.h"
#include "OMX_Core.h"
#include "OMX_Component.h"
#include <utils/threads.h>
#include <utils/Vector.h>
namespace anatomy {
struct AnatomyOMXClient {
public:
AnatomyOMXClient(){}
virtual ~AnatomyOMXClient(){}
void prepare();
void start() { excute(); waitEOF();}
void stop();
private:
void waitEOF() { mEOSCondition.wait(mLock); }
void changeState(OMX_STATETYPE state);
void allocateBuffers();
void freeBuffers();
void init();
void deinit();
void excute();
void waitIdleState() { mIdleCondition.wait(mLock); }
void waitExcutingState() { mExcutingCondition.wait(mLock);}
void waitLoadedState() { mLoadedCondition.wait(mLock);}
void render(void* buffer,int length){mRenderer.render(buffer, length);}
void read(void* buffer,int* length){mParser.read(buffer, length);}
void signalEOF() { mEOSCondition.signal(); }
void signalIdleState() { mIdleCondition.signal(); }
void signalExcutingState() { mExcutingCondition.signal(); }
void signalLoadedState() { mLoadedCondition.signal(); }
void addOMXBufferInfo(OMX_U32 portIndex, OMX_BUFFERHEADERTYPE* header);
void removeOMXBufferInfo(OMX_U32 portIndex, OMX_BUFFERHEADERTYPE* header);
void setStatus(int status){ mStatus = status; }
int getStatus(){ return mStatus; }
static OMX_CALLBACKTYPE kCallbacks;
android::Condition mEOSCondition;
android::Condition mExcutingCondition;
android::Condition mIdleCondition;
android::Condition mLoadedCondition;
android::Mutex mLock;
ATMParser mParser;
StdoutRenderer mRenderer;
OMX_HANDLETYPE mComponentHandle;
int mStatus;
enum {
kPortIndexInput = 0,
kPortIndexOutput = 1
};
struct OMXClientBufferInfo {
OMX_U32 mPortIndex;
OMX_BUFFERHEADERTYPE* mBufferHeader;
};
android::Vector<OMXClientBufferInfo> mBufferInfo;
static OMX_ERRORTYPE OnEvent(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_EVENTTYPE eEvent,
OMX_IN OMX_U32 nData1,
OMX_IN OMX_U32 nData2,
OMX_IN OMX_PTR pEventData);
static OMX_ERRORTYPE OnEmptyBufferDone(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
static OMX_ERRORTYPE OnFillBufferDone(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
};
} // namespace anatomy
#endif // ANATOMY_OMXCLIENT_H_
+161
View File
@@ -0,0 +1,161 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
//#define LOG_NDEBUG 0
#define LOG_TAG "AnatomyOMXComponent"
#include <utils/Log.h>
#include "AnatomyOMXComponent.h"
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
#include <media/IOMX.h>
#define LOGD ALOGD
namespace android {
template<class T>
static void InitOMXParams(T *params) {
params->nSize = sizeof(T);
params->nVersion.s.nVersionMajor = 1;
params->nVersion.s.nVersionMinor = 0;
params->nVersion.s.nRevision = 0;
params->nVersion.s.nStep = 0;
}
AnatomyOMXComponent::AnatomyOMXComponent(
const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
OMX_COMPONENTTYPE **component)
: SimpleSoftOMXComponent(name, callbacks, appData, component) {
LOGD("anatomy component created");
initPorts();
}
AnatomyOMXComponent::~AnatomyOMXComponent() {
List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);
List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
CHECK(outQueue.empty());
CHECK(inQueue.empty());
}
void AnatomyOMXComponent::initPorts() {
OMX_PARAM_PORTDEFINITIONTYPE def;
InitOMXParams(&def);
def.nPortIndex = kInputPortIndex;
def.eDir = OMX_DirInput;
def.nBufferCountMin = kNumInputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 2048;
def.bEnabled = OMX_TRUE;
def.bPopulated = OMX_FALSE;
def.eDomain = OMX_PortDomainOther;
def.bBuffersContiguous = OMX_FALSE;
def.nBufferAlignment = 1;//TODO
def.format.other.eFormat = OMX_OTHER_FormatVendorStartUnused; //TODO
addPort(def);
def.nPortIndex = kOutputPortIndex;
def.eDir = OMX_DirOutput;
def.nBufferCountMin = kNumOutputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 2048;
def.bEnabled = OMX_TRUE;
def.bPopulated = OMX_FALSE;
def.eDomain = OMX_PortDomainOther;
def.bBuffersContiguous = OMX_FALSE;
def.nBufferAlignment = 1;
def.format.other.eFormat = OMX_OTHER_FormatVendorStartUnused; //TODO
addPort(def);
}
void AnatomyOMXComponent::onQueueFilled(OMX_U32 portIndex) {
List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);
LOGD("onQueueFilled called");
while (!inQueue.empty() && !outQueue.empty()) {
BufferInfo *inInfo = *inQueue.begin();
OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader;
BufferInfo *outInfo = *outQueue.begin();
OMX_BUFFERHEADERTYPE *outHeader = outInfo->mHeader;
if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) {
inQueue.erase(inQueue.begin());
inInfo->mOwnedByUs = false;
notifyEmptyBufferDone(inHeader);
outHeader->nFilledLen = 0;
outHeader->nFlags = OMX_BUFFERFLAG_EOS;
outQueue.erase(outQueue.begin());
outInfo->mOwnedByUs = false;
notifyFillBufferDone(outHeader);
return;
}
OMX_U32 decoded_size;
decodeBuffer(outHeader->pBuffer, inHeader->pBuffer, inHeader->nSize, &decoded_size);
usleep(10000);
outHeader->nSize = decoded_size;
inQueue.erase(inQueue.begin());
inInfo->mOwnedByUs = false;
inInfo = NULL;
notifyEmptyBufferDone(inHeader);
inHeader = NULL;
outQueue.erase(outQueue.begin());
outInfo->mOwnedByUs = false;
outInfo = NULL;
notifyFillBufferDone(outHeader);
outHeader = NULL;
}
}
void AnatomyOMXComponent::decodeBuffer(OMX_U8* dst, OMX_U8* src, OMX_U32 size, OMX_U32* decoded_size) {
char ascii;
char* ascii_length;
int length = 0;
ascii = src[0];
length = atoi((char *)&src[1]);
LOGD("decode value %c, %d",ascii,length);
*decoded_size = length;
for(int i = 0; i < length; i++)
{
dst[i] = ascii;
}
}
} // namespace android
android::SoftOMXComponent *createSoftOMXComponent(
const char *name, const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData, OMX_COMPONENTTYPE **component) {
return new android::AnatomyOMXComponent(name, callbacks, appData, component);
}
+54
View File
@@ -0,0 +1,54 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef ANATOMY_OMX_COMPONENT_H_
#define ANATOMY_OMX_COMPONENT_H_
#include <include/SimpleSoftOMXComponent.h>
#include <utils/KeyedVector.h>
namespace android {
struct AnatomyOMXComponent : public SimpleSoftOMXComponent {
AnatomyOMXComponent(const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
OMX_COMPONENTTYPE **component);
protected:
virtual ~AnatomyOMXComponent();
virtual void onQueueFilled(OMX_U32 portIndex);
private:
enum {
kInputPortIndex = 0,
kOutputPortIndex = 1,
kNumInputBuffers = 2,
kNumOutputBuffers = 5,
};
void initPorts();
void decodeBuffer(OMX_U8* dst, OMX_U8* src, OMX_U32 size, OMX_U32* decoded_size);
DISALLOW_EVIL_CONSTRUCTORS(AnatomyOMXComponent);
};
} // namespace android
#endif // ANATOMY_OMX_COMPONENT_H_
+159
View File
@@ -0,0 +1,159 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include "AnatomyOMXCore.h"
#include <utils/Log.h>
#include <include/SimpleSoftOMXComponent.h>
//#include <media/stagefright/foundation/ADebug.h>
//#include <media/stagefright/foundation/AString.h>
#include <dlfcn.h>
#define LOGD ALOGD
#define LOGV ALOGV
using namespace android;
static const struct {
const char *mName;
const char *mLibName;
const char *mRole;
} kComponentInfo[] = {
{"OMX.anatomy.atm.decoder", "libanatomy_atmdec.so", "ascii_decoder.atm" },
};
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_Init()
{
return OMX_ErrorNone;
}
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_Deinit()
{
return OMX_ErrorNone;
}
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_GetHandle(OMX_OUT OMX_HANDLETYPE* handle,
OMX_IN OMX_STRING componentName,
OMX_IN OMX_PTR appData,
OMX_IN OMX_CALLBACKTYPE* callBacks)
{
if (strcmp(componentName, kComponentInfo[0].mName) == 0) {
AString libName;
libName.append(kComponentInfo[0].mLibName);
void *libHandle = dlopen(libName.c_str(), RTLD_NOW);
typedef SoftOMXComponent *(*CreateSoftOMXComponentFunc)(
const char *, const OMX_CALLBACKTYPE *,
OMX_PTR, OMX_COMPONENTTYPE **);
CreateSoftOMXComponentFunc createSoftOMXComponent =
(CreateSoftOMXComponentFunc)dlsym(
libHandle,
"_Z22createSoftOMXComponentPKcPK16OMX_CALLBACKTYPE"
"PvPP17OMX_COMPONENTTYPE");
sp<SoftOMXComponent> codec =
(*createSoftOMXComponent)(componentName, callBacks, appData, (OMX_COMPONENTTYPE **)handle);
codec->initCheck();
codec->incStrong(handle);
codec->setLibHandle(libHandle);
return OMX_ErrorNone;
}
return OMX_ErrorInvalidComponentName;
}
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_FreeHandle(OMX_IN OMX_HANDLETYPE hComp)
{
SoftOMXComponent *me =
(SoftOMXComponent *)
((OMX_COMPONENTTYPE *)hComp)->pComponentPrivate;
me->prepareForDestruction();
void *libHandle = me->libHandle();
me = NULL;
dlclose(libHandle);
libHandle = NULL;
return OMX_ErrorNone;
}
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_ComponentNameEnum(OMX_OUT OMX_STRING componentName,
OMX_IN OMX_U32 nameLen,
OMX_IN OMX_U32 index)
{
if (index >= 1 ) {
return OMX_ErrorNoMore;
}
strncpy(componentName, kComponentInfo[0].mName, nameLen);
return OMX_ErrorNone;
}
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_SetupTunnel(OMX_IN OMX_HANDLETYPE outputComponent,
OMX_IN OMX_U32 outputPort,
OMX_IN OMX_HANDLETYPE inputComponent,
OMX_IN OMX_U32 inputPort)
{
return OMX_ErrorNotImplemented;
}
OMX_API OMX_ERRORTYPE
OMX_GetContentPipe(OMX_OUT OMX_HANDLETYPE* pipe,
OMX_IN OMX_STRING uri)
{
return OMX_ErrorNotImplemented;
}
OMX_API OMX_ERRORTYPE
OMX_GetComponentsOfRole(OMX_IN OMX_STRING role,
OMX_INOUT OMX_U32* numComps,
OMX_INOUT OMX_U8** compNames)
{
return OMX_ErrorNotImplemented;
}
OMX_API OMX_ERRORTYPE
OMX_GetRolesOfComponent(OMX_IN OMX_STRING compName,
OMX_INOUT OMX_U32* numRoles,
OMX_OUT OMX_U8** roles)
{
return OMX_ErrorNotImplemented;
}
+65
View File
@@ -0,0 +1,65 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef ANATOMYOMXCORE_H_
#define ANATOMYOMXCORE_H_
#include "OMX_Types.h"
#include "OMX_Core.h"
#include "OMX_Component.h"
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_Init();
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_Deinit();
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_GetHandle(OMX_OUT OMX_HANDLETYPE* handle,
OMX_IN OMX_STRING componentName,
OMX_IN OMX_PTR appData,
OMX_IN OMX_CALLBACKTYPE* callBacks);
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_FreeHandle(OMX_IN OMX_HANDLETYPE hComp);
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_SetupTunnel(OMX_IN OMX_HANDLETYPE outputComponent,
OMX_IN OMX_U32 outputPort,
OMX_IN OMX_HANDLETYPE inputComponent,
OMX_IN OMX_U32 inputPort);
OMX_API OMX_ERRORTYPE
OMX_GetContentPipe(OMX_OUT OMX_HANDLETYPE* pipe,
OMX_IN OMX_STRING uri);
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_ComponentNameEnum(OMX_OUT OMX_STRING componentName,
OMX_IN OMX_U32 nameLen,
OMX_IN OMX_U32 index);
OMX_API OMX_ERRORTYPE
OMX_GetComponentsOfRole(OMX_IN OMX_STRING role,
OMX_INOUT OMX_U32* numComps,
OMX_INOUT OMX_U8** compNames);
OMX_API OMX_ERRORTYPE
OMX_GetRolesOfComponent(OMX_IN OMX_STRING compName,
OMX_INOUT OMX_U32* numRoles,
OMX_OUT OMX_U8** roles);
#endif /* ANATOMYOMXCORE_H_ */
+170
View File
@@ -0,0 +1,170 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
//#define LOG_NDEBUG 0
#define LOG_TAG "AnatomyOMXPlugin"
#include <utils/Log.h>
#include "AnatomyOMXPlugin.h"
#include <include/SoftOMXComponent.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AString.h>
#include <dlfcn.h>
#define LOGV ALOGV
#define LOGE ALOGE
namespace android {
static const struct {
const char *mName;
const char *mLibNameSuffix;
const char *mRole;
} kComponents[] = {
{ "OMX.anatomy.atm.decoder", "atmdec", "ascii_decoder.atm" },
};
static const size_t kNumComponents =
sizeof(kComponents) / sizeof(kComponents[0]);
AnatomyOMXPlugin::AnatomyOMXPlugin() {
}
OMX_ERRORTYPE AnatomyOMXPlugin::makeComponentInstance(
const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
OMX_COMPONENTTYPE **component) {
LOGV("makeComponentInstance '%s'", name);
for (size_t i = 0; i < kNumComponents; ++i) {
if (strcmp(name, kComponents[i].mName)) {
continue;
}
AString libName = "libanatomy_";
libName.append(kComponents[i].mLibNameSuffix);
libName.append(".so");
void *libHandle = dlopen(libName.c_str(), RTLD_NOW);
if (libHandle == NULL) {
LOGE("unable to dlopen %s", libName.c_str());
return OMX_ErrorComponentNotFound;
}
typedef SoftOMXComponent *(*CreateSoftOMXComponentFunc)(
const char *, const OMX_CALLBACKTYPE *,
OMX_PTR, OMX_COMPONENTTYPE **);
CreateSoftOMXComponentFunc createSoftOMXComponent =
(CreateSoftOMXComponentFunc)dlsym(
libHandle,
"_Z22createSoftOMXComponentPKcPK16OMX_CALLBACKTYPE"
"PvPP17OMX_COMPONENTTYPE");
if (createSoftOMXComponent == NULL) {
dlclose(libHandle);
libHandle = NULL;
return OMX_ErrorComponentNotFound;
}
sp<SoftOMXComponent> codec =
(*createSoftOMXComponent)(name, callbacks, appData, component);
if (codec == NULL) {
dlclose(libHandle);
libHandle = NULL;
return OMX_ErrorInsufficientResources;
}
OMX_ERRORTYPE err = codec->initCheck();
if (err != OMX_ErrorNone) {
dlclose(libHandle);
libHandle = NULL;
return err;
}
codec->incStrong(this);
codec->setLibHandle(libHandle);
return OMX_ErrorNone;
}
return OMX_ErrorInvalidComponentName;
}
OMX_ERRORTYPE AnatomyOMXPlugin::destroyComponentInstance(
OMX_COMPONENTTYPE *component) {
SoftOMXComponent *me =
(SoftOMXComponent *)
((OMX_COMPONENTTYPE *)component)->pComponentPrivate;
me->prepareForDestruction();
void *libHandle = me->libHandle();
CHECK_EQ(me->getStrongCount(), 1);
me->decStrong(this);
me = NULL;
dlclose(libHandle);
libHandle = NULL;
return OMX_ErrorNone;
}
OMX_ERRORTYPE AnatomyOMXPlugin::enumerateComponents(
OMX_STRING name,
size_t size,
OMX_U32 index) {
if (index >= kNumComponents) {
return OMX_ErrorNoMore;
}
strcpy(name, kComponents[index].mName);
return OMX_ErrorNone;
}
OMX_ERRORTYPE AnatomyOMXPlugin::getRolesOfComponent(
const char *name,
Vector<String8> *roles) {
for (size_t i = 0; i < kNumComponents; ++i) {
if (strcmp(name, kComponents[i].mName)) {
continue;
}
roles->clear();
roles->push(String8(kComponents[i].mRole));
return OMX_ErrorNone;
}
return OMX_ErrorInvalidComponentName;
}
} // namespace android
+55
View File
@@ -0,0 +1,55 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef ANATOMY_OMX_PLUGIN_H_
#define ANATOMY_OMX_PLUGIN_H_
#include <media/stagefright/foundation/ABase.h>
#include <media/hardware/OMXPluginBase.h>
namespace android {
struct AnatomyOMXPlugin : public OMXPluginBase {
AnatomyOMXPlugin();
virtual OMX_ERRORTYPE makeComponentInstance(
const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
OMX_COMPONENTTYPE **component);
virtual OMX_ERRORTYPE destroyComponentInstance(
OMX_COMPONENTTYPE *component);
virtual OMX_ERRORTYPE enumerateComponents(
OMX_STRING name,
size_t size,
OMX_U32 index);
virtual OMX_ERRORTYPE getRolesOfComponent(
const char *name,
Vector<String8> *roles);
private:
DISALLOW_EVIL_CONSTRUCTORS(AnatomyOMXPlugin);
};
} // namespace android
#endif // ANATOMY_OMX_PLUGIN_H_
+59
View File
@@ -0,0 +1,59 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test-openmax
LOCAL_MODULE_TAGS := tests
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
bionic/ \
external/stlport/stlport \
frameworks/base/include \
frameworks/av/media/libstagefright \
frameworks/native/include/media/openmax \
LOCAL_SRC_FILES := \
AnatomyOMXCore.cpp \
AnatomyOMXPlugin.cpp \
main_anatomy_omxclient.cpp \
AnatomyOMXClient.cpp \
ATMParser.cpp \
StdoutRenderer.cpp \
LOCAL_SHARED_LIBRARIES := \
libcutils\
libutils\
libdl\
libstlport \
libstagefright_omx \
libstagefright_foundation \
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := libanatomy_atmdec
LOCAL_MODULE_TAGS := tests
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
bionic/ \
external/stlport/stlport \
frameworks/base/include \
frameworks/av/media/libstagefright \
frameworks/native/include/media/openmax \
LOCAL_SHARED_LIBRARIES := \
libcutils\
libutils\
libdl\
libstlport \
libstagefright_omx \
libstagefright_foundation \
LOCAL_SRC_FILES := \
AnatomyOMXComponent.cpp \
include $(BUILD_SHARED_LIBRARY)
+41
View File
@@ -0,0 +1,41 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
//#define LOG_NDEBUG 0
#define LOG_TAG "StdoutRenderer"
#include "StdoutRenderer.h"
#include <iostream>
namespace anatomy {
void StdoutRenderer::render(void* buffer,int length) {
memcpy(mBuffer, buffer, length);
mBuffer[length] = '\0';
if( mBuffer[0] == '/' )
{
std::cout << std::endl;
}
else
{
std::cout << mBuffer;
}
}
}
+36
View File
@@ -0,0 +1,36 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef STDOUT_RENDERER_H_
#define STDOUT_RENDERER_H_
namespace anatomy {
class StdoutRenderer {
public:
StdoutRenderer(){}
virtual ~StdoutRenderer(){}
void render(void* buffer,int length);
private:
char mBuffer[256];
};
} // namespace anatomy
#endif // STDOUT_RENDERER_H_
@@ -0,0 +1,41 @@
/*
**
** Copyright 2013, kod21236@gmail.com
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include "AnatomyOMXClient.h"
#include <utils/Log.h>
#include <media/stagefright/foundation/ADebug.h>
using namespace anatomy;
int main()
{
AnatomyOMXClient* pOMXClient = new AnatomyOMXClient;
CHECK( NULL != pOMXClient );
pOMXClient->prepare();
pOMXClient->start();
pOMXClient->stop();
delete pOMXClient;
return 0;
}
+138
View File
@@ -0,0 +1,138 @@
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
ANATOMYOMXCORE_H_ AnatomyOMXCore.h 19;" d
ANATOMY_OMXCLIENT_H_ AnatomyOMXClient.h 19;" d
ANATOMY_OMX_COMPONENT_H_ AnatomyOMXComponent.h 20;" d
ANATOMY_OMX_PLUGIN_H_ AnatomyOMXPlugin.h 20;" d
ATMParser ATMParser.cpp /^ATMParser::ATMParser()$/;" f class:anatomy::ATMParser
ATMParser ATMParser.h /^class ATMParser {$/;" c namespace:anatomy
ATM_PARSER_H_ ATMParser.h 18;" d
AnatomyOMXClient AnatomyOMXClient.h /^ AnatomyOMXClient(){}$/;" f struct:anatomy::AnatomyOMXClient
AnatomyOMXClient AnatomyOMXClient.h /^struct AnatomyOMXClient {$/;" s namespace:anatomy
AnatomyOMXComponent AnatomyOMXComponent.cpp /^AnatomyOMXComponent::AnatomyOMXComponent($/;" f class:android::AnatomyOMXComponent
AnatomyOMXComponent AnatomyOMXComponent.h /^struct AnatomyOMXComponent : public SimpleSoftOMXComponent {$/;" s namespace:android
AnatomyOMXPlugin AnatomyOMXPlugin.cpp /^AnatomyOMXPlugin::AnatomyOMXPlugin() {$/;" f class:android::AnatomyOMXPlugin
AnatomyOMXPlugin AnatomyOMXPlugin.h /^struct AnatomyOMXPlugin : public OMXPluginBase {$/;" s namespace:android
InitOMXParams AnatomyOMXClient.cpp /^static void InitOMXParams(T *params) {$/;" f namespace:anatomy
InitOMXParams AnatomyOMXComponent.cpp /^static void InitOMXParams(T *params) {$/;" f namespace:android
LOCAL_C_INCLUDES Android.mk /^LOCAL_C_INCLUDES := \\$/;" m
LOCAL_MODULE Android.mk /^LOCAL_MODULE := anatomy_omx_client$/;" m
LOCAL_MODULE Android.mk /^LOCAL_MODULE := libanatomy_atmdec$/;" m
LOCAL_MODULE_TAGS Android.mk /^LOCAL_MODULE_TAGS := tests$/;" m
LOCAL_PATH Android.mk /^LOCAL_PATH := $(call my-dir)$/;" m
LOCAL_SHARED_LIBRARIES Android.mk /^LOCAL_SHARED_LIBRARIES := \\$/;" m
LOCAL_SRC_FILES Android.mk /^LOCAL_SRC_FILES := \\$/;" m
LOGD ATMParser.cpp 25;" d file:
LOGD AnatomyOMXClient.cpp 28;" d file:
LOGD AnatomyOMXComponent.cpp 29;" d file:
LOGD AnatomyOMXCore.cpp 29;" d file:
LOGE AnatomyOMXPlugin.cpp 31;" d file:
LOGV AnatomyOMXCore.cpp 30;" d file:
LOGV AnatomyOMXPlugin.cpp 30;" d file:
LOGW AnatomyOMXClient.cpp 27;" d file:
LOG_TAG ATMParser.cpp 19;" d file:
LOG_TAG AnatomyOMXClient.cpp 19;" d file:
LOG_TAG AnatomyOMXComponent.cpp 19;" d file:
LOG_TAG AnatomyOMXPlugin.cpp 19;" d file:
LOG_TAG StdoutRenderer.cpp 19;" d file:
OMXClientBufferInfo AnatomyOMXClient.h /^ struct OMXClientBufferInfo {$/;" s struct:anatomy::AnatomyOMXClient
OMX_ComponentNameEnum AnatomyOMXCore.cpp /^OMX_ComponentNameEnum(OMX_OUT OMX_STRING componentName,$/;" f
OMX_Deinit AnatomyOMXCore.cpp /^OMX_Deinit()$/;" f
OMX_FreeHandle AnatomyOMXCore.cpp /^OMX_FreeHandle(OMX_IN OMX_HANDLETYPE hComp)$/;" f
OMX_GetComponentsOfRole AnatomyOMXCore.cpp /^OMX_GetComponentsOfRole(OMX_IN OMX_STRING role,$/;" f
OMX_GetContentPipe AnatomyOMXCore.cpp /^OMX_GetContentPipe(OMX_OUT OMX_HANDLETYPE* pipe,$/;" f
OMX_GetHandle AnatomyOMXCore.cpp /^OMX_GetHandle(OMX_OUT OMX_HANDLETYPE* handle,$/;" f
OMX_GetRolesOfComponent AnatomyOMXCore.cpp /^OMX_GetRolesOfComponent(OMX_IN OMX_STRING compName,$/;" f
OMX_Init AnatomyOMXCore.cpp /^OMX_Init()$/;" f
OMX_SetupTunnel AnatomyOMXCore.cpp /^OMX_SetupTunnel(OMX_IN OMX_HANDLETYPE outputComponent,$/;" f
OnEmptyBufferDone AnatomyOMXClient.cpp /^OMX_ERRORTYPE AnatomyOMXClient::OnEmptyBufferDone($/;" f class:anatomy::AnatomyOMXClient
OnEvent AnatomyOMXClient.cpp /^OMX_ERRORTYPE AnatomyOMXClient::OnEvent($/;" f class:anatomy::AnatomyOMXClient
OnFillBufferDone AnatomyOMXClient.cpp /^OMX_ERRORTYPE AnatomyOMXClient::OnFillBufferDone($/;" f class:anatomy::AnatomyOMXClient
STDOUT_RENDERER_H_ StdoutRenderer.h 19;" d
StdoutRenderer StdoutRenderer.h /^ StdoutRenderer(){}$/;" f class:anatomy::StdoutRenderer
StdoutRenderer StdoutRenderer.h /^class StdoutRenderer {$/;" c namespace:anatomy
addOMXBufferInfo AnatomyOMXClient.cpp /^void AnatomyOMXClient::addOMXBufferInfo($/;" f class:anatomy::AnatomyOMXClient
allocateBuffers AnatomyOMXClient.cpp /^void AnatomyOMXClient::allocateBuffers() {$/;" f class:anatomy::AnatomyOMXClient
anatomy ATMParser.cpp /^namespace anatomy {$/;" n file:
anatomy ATMParser.h /^namespace anatomy {$/;" n
anatomy AnatomyOMXClient.cpp /^namespace anatomy {$/;" n file:
anatomy AnatomyOMXClient.h /^namespace anatomy {$/;" n
anatomy StdoutRenderer.cpp /^namespace anatomy {$/;" n file:
anatomy StdoutRenderer.h /^namespace anatomy {$/;" n
android AnatomyOMXComponent.cpp /^namespace android {$/;" n file:
android AnatomyOMXComponent.h /^namespace android {$/;" n
android AnatomyOMXPlugin.cpp /^namespace android {$/;" n file:
android AnatomyOMXPlugin.h /^namespace android {$/;" n
changeState AnatomyOMXClient.cpp /^void AnatomyOMXClient::changeState(OMX_STATETYPE state) {$/;" f class:anatomy::AnatomyOMXClient
createSoftOMXComponent AnatomyOMXComponent.cpp /^android::SoftOMXComponent *createSoftOMXComponent($/;" f
decodeBuffer AnatomyOMXComponent.cpp /^void AnatomyOMXComponent::decodeBuffer(OMX_U8* dst, OMX_U8* src, OMX_U32 size, OMX_U32* decoded_size) {$/;" f class:android::AnatomyOMXComponent
deinit AnatomyOMXClient.cpp /^void AnatomyOMXClient::deinit() {$/;" f class:anatomy::AnatomyOMXClient
destroyComponentInstance AnatomyOMXPlugin.cpp /^OMX_ERRORTYPE AnatomyOMXPlugin::destroyComponentInstance($/;" f class:android::AnatomyOMXPlugin
enumerateComponents AnatomyOMXPlugin.cpp /^OMX_ERRORTYPE AnatomyOMXPlugin::enumerateComponents($/;" f class:android::AnatomyOMXPlugin
excute AnatomyOMXClient.cpp /^void AnatomyOMXClient::excute() {$/;" f class:anatomy::AnatomyOMXClient
freeBuffers AnatomyOMXClient.cpp /^void AnatomyOMXClient::freeBuffers() {$/;" f class:anatomy::AnatomyOMXClient
getRolesOfComponent AnatomyOMXPlugin.cpp /^OMX_ERRORTYPE AnatomyOMXPlugin::getRolesOfComponent($/;" f class:android::AnatomyOMXPlugin
getStatus AnatomyOMXClient.h /^ int getStatus(){ return mStatus; }$/;" f struct:anatomy::AnatomyOMXClient
init AnatomyOMXClient.cpp /^void AnatomyOMXClient::init() {$/;" f class:anatomy::AnatomyOMXClient
initPorts AnatomyOMXComponent.cpp /^void AnatomyOMXComponent::initPorts() {$/;" f class:android::AnatomyOMXComponent
kCallbacks AnatomyOMXClient.cpp /^OMX_CALLBACKTYPE AnatomyOMXClient::kCallbacks = {$/;" m class:anatomy::AnatomyOMXClient file:
kCallbacks AnatomyOMXClient.h /^ static OMX_CALLBACKTYPE kCallbacks;$/;" m struct:anatomy::AnatomyOMXClient
kComponentInfo AnatomyOMXCore.cpp /^} kComponentInfo[] = {$/;" v typeref:struct:__anon4 file:
kComponents AnatomyOMXPlugin.cpp /^} kComponents[] = {$/;" m namespace:android typeref:struct:android::__anon3 file:
kInputPortIndex AnatomyOMXComponent.h /^ kInputPortIndex = 0,$/;" e enum:android::AnatomyOMXComponent::__anon2
kNumComponents AnatomyOMXPlugin.cpp /^static const size_t kNumComponents =$/;" m namespace:android file:
kNumInputBuffers AnatomyOMXComponent.h /^ kNumInputBuffers = 2,$/;" e enum:android::AnatomyOMXComponent::__anon2
kNumOutputBuffers AnatomyOMXComponent.h /^ kNumOutputBuffers = 5,$/;" e enum:android::AnatomyOMXComponent::__anon2
kOutputPortIndex AnatomyOMXComponent.h /^ kOutputPortIndex = 1,$/;" e enum:android::AnatomyOMXComponent::__anon2
kPortIndexInput AnatomyOMXClient.h /^ kPortIndexInput = 0,$/;" e enum:anatomy::AnatomyOMXClient::__anon1
kPortIndexOutput AnatomyOMXClient.h /^ kPortIndexOutput = 1$/;" e enum:anatomy::AnatomyOMXClient::__anon1
mBuffer StdoutRenderer.h /^ char mBuffer[256];$/;" m class:anatomy::StdoutRenderer
mBufferHeader AnatomyOMXClient.h /^ OMX_BUFFERHEADERTYPE* mBufferHeader;$/;" m struct:anatomy::AnatomyOMXClient::OMXClientBufferInfo
mBufferInfo AnatomyOMXClient.h /^ android::Vector<OMXClientBufferInfo> mBufferInfo;$/;" m struct:anatomy::AnatomyOMXClient
mComponentHandle AnatomyOMXClient.h /^ OMX_HANDLETYPE mComponentHandle;$/;" m struct:anatomy::AnatomyOMXClient
mEOSCondition AnatomyOMXClient.h /^ android::Condition mEOSCondition;$/;" m struct:anatomy::AnatomyOMXClient
mExcutingCondition AnatomyOMXClient.h /^ android::Condition mExcutingCondition;$/;" m struct:anatomy::AnatomyOMXClient
mIdleCondition AnatomyOMXClient.h /^ android::Condition mIdleCondition;$/;" m struct:anatomy::AnatomyOMXClient
mLength ATMParser.h /^ int mLength;$/;" m class:anatomy::ATMParser
mLibName AnatomyOMXCore.cpp /^ const char *mLibName;$/;" m struct:__anon4 file:
mLibNameSuffix AnatomyOMXPlugin.cpp /^ const char *mLibNameSuffix;$/;" m struct:android::__anon3 file:
mLoadedCondition AnatomyOMXClient.h /^ android::Condition mLoadedCondition;$/;" m struct:anatomy::AnatomyOMXClient
mLock AnatomyOMXClient.h /^ android::Mutex mLock;$/;" m struct:anatomy::AnatomyOMXClient
mName AnatomyOMXCore.cpp /^ const char *mName;$/;" m struct:__anon4 file:
mName AnatomyOMXPlugin.cpp /^ const char *mName;$/;" m struct:android::__anon3 file:
mOffset ATMParser.h /^ int mOffset;$/;" m class:anatomy::ATMParser
mParser AnatomyOMXClient.h /^ ATMParser mParser;$/;" m struct:anatomy::AnatomyOMXClient
mPortIndex AnatomyOMXClient.h /^ OMX_U32 mPortIndex;$/;" m struct:anatomy::AnatomyOMXClient::OMXClientBufferInfo
mRenderer AnatomyOMXClient.h /^ StdoutRenderer mRenderer;$/;" m struct:anatomy::AnatomyOMXClient
mRole AnatomyOMXCore.cpp /^ const char *mRole;$/;" m struct:__anon4 file:
mRole AnatomyOMXPlugin.cpp /^ const char *mRole;$/;" m struct:android::__anon3 file:
mStatus AnatomyOMXClient.h /^ int mStatus;$/;" m struct:anatomy::AnatomyOMXClient
main main_anatomy_omxclient.cpp /^int main()$/;" f
makeComponentInstance AnatomyOMXPlugin.cpp /^OMX_ERRORTYPE AnatomyOMXPlugin::makeComponentInstance($/;" f class:android::AnatomyOMXPlugin
onQueueFilled AnatomyOMXComponent.cpp /^void AnatomyOMXComponent::onQueueFilled(OMX_U32 portIndex) {$/;" f class:android::AnatomyOMXComponent
prepare AnatomyOMXClient.cpp /^void AnatomyOMXClient::prepare() {$/;" f class:anatomy::AnatomyOMXClient
pszSource ATMParser.cpp /^static char pszSource[] = "\\$/;" m namespace:anatomy file:
read ATMParser.cpp /^void ATMParser::read(void* buffer, int* length) {$/;" f class:anatomy::ATMParser
read AnatomyOMXClient.h /^ void read(void* buffer,int* length){mParser.read(buffer, length);}$/;" f struct:anatomy::AnatomyOMXClient
removeOMXBufferInfo AnatomyOMXClient.cpp /^void AnatomyOMXClient::removeOMXBufferInfo($/;" f class:anatomy::AnatomyOMXClient
render AnatomyOMXClient.h /^ void render(void* buffer,int length){mRenderer.render(buffer, length);}$/;" f struct:anatomy::AnatomyOMXClient
render StdoutRenderer.cpp /^void StdoutRenderer::render(void* buffer,int length) {$/;" f class:anatomy::StdoutRenderer
setStatus AnatomyOMXClient.h /^ void setStatus(int status){ mStatus = status; }$/;" f struct:anatomy::AnatomyOMXClient
signalEOF AnatomyOMXClient.h /^ void signalEOF() { mEOSCondition.signal(); }$/;" f struct:anatomy::AnatomyOMXClient
signalExcutingState AnatomyOMXClient.h /^ void signalExcutingState() { mExcutingCondition.signal(); }$/;" f struct:anatomy::AnatomyOMXClient
signalIdleState AnatomyOMXClient.h /^ void signalIdleState() { mIdleCondition.signal(); }$/;" f struct:anatomy::AnatomyOMXClient
signalLoadedState AnatomyOMXClient.h /^ void signalLoadedState() { mLoadedCondition.signal(); }$/;" f struct:anatomy::AnatomyOMXClient
start AnatomyOMXClient.h /^ void start() { excute(); waitEOF();}$/;" f struct:anatomy::AnatomyOMXClient
stop AnatomyOMXClient.cpp /^void AnatomyOMXClient::stop() {$/;" f class:anatomy::AnatomyOMXClient
waitEOF AnatomyOMXClient.h /^ void waitEOF() { mEOSCondition.wait(mLock); }$/;" f struct:anatomy::AnatomyOMXClient
waitExcutingState AnatomyOMXClient.h /^ void waitExcutingState() { mExcutingCondition.wait(mLock);}$/;" f struct:anatomy::AnatomyOMXClient
waitIdleState AnatomyOMXClient.h /^ void waitIdleState() { mIdleCondition.wait(mLock); }$/;" f struct:anatomy::AnatomyOMXClient
waitLoadedState AnatomyOMXClient.h /^ void waitLoadedState() { mLoadedCondition.wait(mLock);}$/;" f struct:anatomy::AnatomyOMXClient
~ATMParser ATMParser.h /^ virtual ~ATMParser(){}$/;" f class:anatomy::ATMParser
~AnatomyOMXClient AnatomyOMXClient.h /^ virtual ~AnatomyOMXClient(){}$/;" f struct:anatomy::AnatomyOMXClient
~AnatomyOMXComponent AnatomyOMXComponent.cpp /^AnatomyOMXComponent::~AnatomyOMXComponent() {$/;" f class:android::AnatomyOMXComponent
~StdoutRenderer StdoutRenderer.h /^ virtual ~StdoutRenderer(){}$/;" f class:anatomy::StdoutRenderer