本文整理汇总了C++中OMX_SetParameter函数的典型用法代码示例。如果您正苦于以下问题:C++ OMX_SetParameter函数的具体用法?C++ OMX_SetParameter怎么用?C++ OMX_SetParameter使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OMX_SetParameter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: omx_clk_init
static void
omx_clk_init(omx_clk_t *clk, int has_audio)
{
OMX_TIME_CONFIG_CLOCKSTATETYPE cstate;
clk->has_audio = has_audio;
clk->seek_in_progress = 0;
OMX_INIT_STRUCTURE(cstate);
cstate.eState = OMX_TIME_ClockStateStopped;
omxchk(OMX_SetParameter(clk->c->oc_handle,
OMX_IndexConfigTimeClockState, &cstate));
omx_set_state(clk->c, OMX_StateIdle);
OMX_INIT_STRUCTURE(cstate);
cstate.eState = OMX_TIME_ClockStateWaitingForStartTime;
cstate.nWaitMask = has_audio ? 1 : 2;
omxchk(OMX_SetParameter(clk->c->oc_handle,
OMX_IndexConfigTimeClockState, &cstate));
OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE refClock;
OMX_INIT_STRUCTURE(refClock);
refClock.eClock = has_audio ? OMX_TIME_RefClockAudio : OMX_TIME_RefClockVideo;
omxchk(OMX_SetConfig(clk->c->oc_handle,
OMX_IndexConfigTimeActiveRefClock, &refClock));
omx_set_state(clk->c, OMX_StateExecuting);
}
示例2: omx_mp_init
static void
omx_mp_init(media_pipe_t *mp)
{
if(!(mp->mp_flags & MP_VIDEO))
return;
#if 0
if(0) {
mp->mp_seek_initiate = omx_mp_begin_seek;
mp->mp_seek_audio_done = omx_mp_seek_audio_done;
mp->mp_seek_video_done = omx_mp_seek_video_done;
}
#endif
mp->mp_hold_changed = omx_mp_hold_changed;
omx_clk_t *clk = calloc(1, sizeof(omx_clk_t));
TAILQ_INIT(&clk->q);
clk->mp = mp;
clk->c = omx_component_create("OMX.broadcom.clock", &mp->mp_mutex, NULL);
hts_cond_init(&clk->cond, &mp->mp_mutex);
mp->mp_extra = clk;
omx_set_state(clk->c, OMX_StateIdle);
#if 0
OMX_TIME_CONFIG_CLOCKSTATETYPE cstate;
OMX_INIT_STRUCTURE(cstate);
cstate.eState = OMX_TIME_ClockStateWaitingForStartTime;
cstate.nWaitMask = 1;
omxchk(OMX_SetParameter(c->oc_handle,
OMX_IndexConfigTimeClockState, &cstate));
OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE refClock;
OMX_INIT_STRUCTURE(refClock);
refClock.eClock = OMX_TIME_RefClockAudio;
// refClock.eClock = OMX_TIME_RefClockVideo;
// refClock.eClock = OMX_TIME_RefClockNone;
#else
OMX_TIME_CONFIG_CLOCKSTATETYPE cstate;
OMX_INIT_STRUCTURE(cstate);
cstate.eState = OMX_TIME_ClockStateRunning;
omxchk(OMX_SetParameter(clk->c->oc_handle,
OMX_IndexConfigTimeClockState, &cstate));
OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE refClock;
OMX_INIT_STRUCTURE(refClock);
refClock.eClock = OMX_TIME_RefClockAudio;
#endif
omxchk(OMX_SetConfig(clk->c->oc_handle,
OMX_IndexConfigTimeActiveRefClock, &refClock));
omx_set_state(clk->c, OMX_StateExecuting);
hts_thread_create_joinable("omxclkctrl", &clk->tid, omx_clk_thread, clk,
THREAD_PRIO_DEMUXER);
}
示例3: load_component
OMX_ERRORTYPE load_component(HTEST *hTest)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_HANDLETYPE hComponent = NULL;
OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
OMX_U32 i;
ret = OMX_GetHandle(&hComponent, hTest->name, hTest, &gCallBacks);
if(ret != OMX_ErrorNone)
{
printf("Load component %s failed.\n", hTest->name);
return ret;
}
hTest->hComponent = (OMX_COMPONENTTYPE*)hComponent;
OMX_INIT_STRUCT(&sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
sPortDef.nPortIndex = 1;
ret = OMX_GetParameter(hTest->hComponent,OMX_IndexParamPortDefinition,&sPortDef);
if (ret != OMX_ErrorNone)
return ret;
sPortDef.format.video.nFrameWidth = 176;
sPortDef.format.video.nFrameHeight = 144;
ret = OMX_SetParameter(hTest->hComponent,OMX_IndexParamPortDefinition,&sPortDef);
if (ret != OMX_ErrorNone)
return ret;
sPortDef.nPortIndex = 0;
ret = OMX_SetParameter(hTest->hComponent,OMX_IndexParamPortDefinition,&sPortDef);
if (ret != OMX_ErrorNone)
return ret;
hTest->nPorts = get_component_ports(hComponent);
OMX_INIT_STRUCT(&sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
for(i=0; i<hTest->nPorts; i++)
{
sPortDef.nPortIndex = i;
OMX_GetParameter(hComponent, OMX_IndexParamPortDefinition, &sPortDef);
if (sPortDef.eDomain == OMX_PortDomainAudio)
hTest->nAudioTrackNum = i;
if (sPortDef.eDomain == OMX_PortDomainVideo)
hTest->nVideoTrackNum = i;
hTest->PortDir[i] = sPortDef.eDir;
if(hTest->PortDir[i] == OMX_DirInput)
hTest->bAllocater[i] = OMX_FALSE;
if(hTest->PortDir[i] == OMX_DirOutput)
hTest->bAllocater[i] = OMX_TRUE;
if(i == 0)
hTest->bAllocater[i] = OMX_FALSE;
}
fsl_osal_thread_create(&hTest->pThreadId, NULL, process_thread, hTest);
return OMX_ErrorNone;
}
示例4: omxSetAudioRenderInput
OMX_ERRORTYPE omxSetAudioRenderInput(struct OMX_COMPONENT_T *component, int sample_rate, int bits_per_coded_sample, int channels)
{
OMX_ERRORTYPE omxErr;
OMX_AUDIO_PARAM_PCMMODETYPE pcmInput;
OMX_INIT_STRUCTURE(pcmInput);
pcmInput.nPortIndex = component->inputPort;
pcmInput.eNumData = OMX_NumericalDataSigned;
pcmInput.eEndian = OMX_EndianLittle;
pcmInput.bInterleaved = OMX_TRUE;
pcmInput.nBitPerSample = bits_per_coded_sample;
pcmInput.ePCMMode = OMX_AUDIO_PCMModeLinear;
pcmInput.nChannels = channels;
pcmInput.nSamplingRate = sample_rate;
pcmInput.eChannelMapping[0] = OMX_AUDIO_ChannelLF;
pcmInput.eChannelMapping[1] = OMX_AUDIO_ChannelRF;
omxErr = OMX_SetParameter(component->handle, OMX_IndexParamAudioPcm, &pcmInput);
if(omxErr != OMX_ErrorNone) {
logInfo(LOG_OMX, "Error SetParameter OMX_IndexParamAudioPcm for port %d status on component %s omxErr(0x%08x)\n", component->inputPort, component->componentName, (int)omxErr);
return omxErr;
}
OMX_AUDIO_PARAM_PORTFORMATTYPE formatType;
OMX_INIT_STRUCTURE(formatType);
formatType.nPortIndex = component->inputPort;
formatType.eEncoding = OMX_AUDIO_CodingPCM;
omxErr = OMX_SetParameter(component->handle, OMX_IndexParamAudioPortFormat, &formatType);
if(omxErr != OMX_ErrorNone) {
logInfo(LOG_OMX, "Error SetParameter OMX_IndexParamAudioPortFormat for port %d status on component %s omxErr(0x%08x)\n", component->inputPort, component->componentName, (int)omxErr);
return omxErr;
}
OMX_PARAM_PORTDEFINITIONTYPE portDef;
OMX_INIT_STRUCTURE(portDef);
portDef.nPortIndex = component->inputPort;
portDef.format.audio.eEncoding = OMX_AUDIO_CodingPCM;
portDef.nBufferSize = ((6144 * 2) + 15) & ~15;
portDef.nBufferCountActual = 60;
omxErr = OMX_SetParameter(component->handle, OMX_IndexParamPortDefinition, &portDef);
if(omxErr != OMX_ErrorNone) {
logInfo(LOG_OMX, "Error SetParameter OMX_IndexParamPortDefinition for port %d status on component %s omxErr(0x%08x)\n", component->inputPort, component->componentName, (int)omxErr);
return omxErr;
}
return OMX_ErrorNone;
}
示例5: autolock
status_t OMXNodeInstance::prepareForAdaptivePlayback(
OMX_U32 portIndex, OMX_BOOL enable, OMX_U32 maxFrameWidth,
OMX_U32 maxFrameHeight) {
Mutex::Autolock autolock(mLock);
OMX_INDEXTYPE index;
OMX_STRING name = const_cast<OMX_STRING>(
"OMX.google.android.index.prepareForAdaptivePlayback");
OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index);
if (err != OMX_ErrorNone) {
ALOGW_IF(enable, "OMX_GetExtensionIndex %s failed", name);
return StatusFromOMXError(err);
}
PrepareForAdaptivePlaybackParams params;
params.nSize = sizeof(params);
params.nVersion.s.nVersionMajor = 1;
params.nVersion.s.nVersionMinor = 0;
params.nVersion.s.nRevision = 0;
params.nVersion.s.nStep = 0;
params.nPortIndex = portIndex;
params.bEnable = enable;
params.nMaxFrameWidth = maxFrameWidth;
params.nMaxFrameHeight = maxFrameHeight;
if ((err = OMX_SetParameter(mHandle, index, ¶ms)) != OMX_ErrorNone) {
ALOGW("OMX_SetParameter failed for PrepareForAdaptivePlayback "
"with error %d (0x%08x)", err, err);
return UNKNOWN_ERROR;
}
return err;
}
示例6: TIZ_INIT_OMX_PORT_STRUCT
void graph::gmusicops::do_reconfigure_second_tunnel ()
{
// Retrieve the pcm settings from the decoder component
OMX_AUDIO_PARAM_PCMMODETYPE decoder_pcmtype;
const OMX_U32 decoder_port_id = 1;
TIZ_INIT_OMX_PORT_STRUCT (decoder_pcmtype, decoder_port_id);
G_OPS_BAIL_IF_ERROR (
OMX_GetParameter (handles_[1], OMX_IndexParamAudioPcm, &decoder_pcmtype),
"Unable to retrieve the PCM settings from the Mp3 decoder");
// Retrieve the pcm settings from the renderer component
OMX_AUDIO_PARAM_PCMMODETYPE renderer_pcmtype;
const OMX_U32 renderer_port_id = 0;
TIZ_INIT_OMX_PORT_STRUCT (renderer_pcmtype, renderer_port_id);
G_OPS_BAIL_IF_ERROR (
OMX_GetParameter (handles_[2], OMX_IndexParamAudioPcm, &renderer_pcmtype),
"Unable to retrieve the PCM settings from the pcm renderer");
// Now assign the current settings to the renderer structure
renderer_pcmtype.nChannels = decoder_pcmtype.nChannels;
renderer_pcmtype.nSamplingRate = decoder_pcmtype.nSamplingRate;
// Set the new pcm settings
G_OPS_BAIL_IF_ERROR (
OMX_SetParameter (handles_[2], OMX_IndexParamAudioPcm, &renderer_pcmtype),
"Unable to set the PCM settings on the audio renderer");
TIZ_PRINTF_MAG (
" %ld Ch, %g KHz, %lu:%s:%s\n", renderer_pcmtype.nChannels,
((float)renderer_pcmtype.nSamplingRate) / 1000,
renderer_pcmtype.nBitPerSample,
renderer_pcmtype.eNumData == OMX_NumericalDataSigned ? "s" : "u",
renderer_pcmtype.eEndian == OMX_EndianBig ? "b" : "l");
}
示例7: TIZ_LOG
OMX_ERRORTYPE
graph::gmusicops::set_channels_and_rate_on_decoder (
const OMX_U32 channels, const OMX_U32 sampling_rate)
{
const OMX_HANDLETYPE handle = handles_[1]; // decoder's handle
const OMX_U32 port_id = 0; // decoder's input port
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
// Retrieve the mp3 settings from the decoder component
TIZ_INIT_OMX_PORT_STRUCT (decoder_mp3type_, port_id);
tiz_check_omx (
OMX_GetParameter (handle, OMX_IndexParamAudioMp3, &decoder_mp3type_));
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
// Now assign the actual settings to the pcmtype structure
decoder_mp3type_.nChannels = channels;
decoder_mp3type_.nSampleRate = sampling_rate;
// Set the new mp3 settings
tiz_check_omx (
OMX_SetParameter (handle, OMX_IndexParamAudioMp3, &decoder_mp3type_));
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
return OMX_ErrorNone;
}
示例8: ForceSuppliersPerDomain
/* For each domain: force all the component's ports to be suppliers/non-suppliers */
OMX_ERRORTYPE ForceSuppliersPerDomain(OMX_INDEXTYPE nIndex, OMX_HANDLETYPE hComp, OMX_BOOL bSupplier)
{
OMX_PORT_PARAM_TYPE oParam;
OMX_U32 i;
OMX_U32 iPort;
OMX_ERRORTYPE eError;
OMX_PARAM_BUFFERSUPPLIERTYPE oSupplier;
OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
INIT_PARAM(oSupplier);
INIT_PARAM(oParam);
INIT_PARAM(oPortDef);
oSupplier.eBufferSupplier = bSupplier ? OMX_BufferSupplyInput : OMX_BufferSupplyOutput;
if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, nIndex, &oParam))) return eError;
for (i=0;i<oParam.nPorts;i++)
{
iPort = oParam.nStartPortNumber + i;
oPortDef.nPortIndex = iPort;
OMX_GetParameter(hComp, OMX_IndexParamPortDefinition, &oPortDef);
/* only set inputs */
if (oPortDef.eDir == OMX_DirInput){
oSupplier.nPortIndex = iPort;
OMX_SetParameter(hComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
}
}
return OMX_ErrorNone;
}
示例9: SetFormat
static OMX_ERRORTYPE SetFormat(filter_t *filter, OmxPort *port)
{
OMX_PARAM_PORTDEFINITIONTYPE *definition;
filter_sys_t *sys = filter->p_sys;
OMX_ERRORTYPE omx_error;
definition = &port->definition;
definition->format.image.nFrameWidth =
filter->fmt_in.video.i_width;
definition->format.image.nFrameHeight =
filter->fmt_in.video.i_height;
definition->format.image.nStride =
ALIGN(definition->format.image.nFrameWidth, 32);
definition->format.image.nSliceHeight =
ALIGN(definition->format.image.nFrameHeight, 16);
definition->nBufferSize = definition->format.image.nStride *
definition->format.image.nSliceHeight * 3 / 2;
omx_error = OMX_SetParameter(sys->omx_handle,
OMX_IndexParamPortDefinition, definition);
if (omx_error != OMX_ErrorNone)
msg_Warn(filter, "Could not configure port format (%x: %s).",
omx_error, ErrorToString(omx_error));
OMX_GetParameter(sys->omx_handle, OMX_IndexParamPortDefinition,
&definition);
msg_Dbg(filter, "Port %u\nFormat: %ux%u (%ux%u)\nnBufferSize: %u",
(unsigned)definition->nPortIndex,
(unsigned)definition->format.image.nFrameWidth,
(unsigned)definition->format.image.nFrameHeight,
(unsigned)definition->format.image.nStride,
(unsigned)definition->format.image.nSliceHeight,
(unsigned)definition->nBufferSize);
return omx_error;
}
示例10: omx_mp_init
static void
omx_mp_init(media_pipe_t *mp)
{
if(!(mp->mp_flags & MP_VIDEO))
return;
omx_component_t *c;
c = omx_component_create("OMX.broadcom.clock", &mp->mp_mutex, NULL);
mp->mp_extra = c;
omx_set_state(c, OMX_StateIdle);
OMX_TIME_CONFIG_CLOCKSTATETYPE cstate;
OMX_INIT_STRUCTURE(cstate);
cstate.eState = OMX_TIME_ClockStateWaitingForStartTime;
cstate.nWaitMask = 1;
omxchk(OMX_SetParameter(c->oc_handle,
OMX_IndexConfigTimeClockState, &cstate));
OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE refClock;
OMX_INIT_STRUCTURE(refClock);
refClock.eClock = OMX_TIME_RefClockAudio;
// refClock.eClock = OMX_TIME_RefClockVideo;
// refClock.eClock = OMX_TIME_RefClockNone;
omxchk(OMX_SetConfig(c->oc_handle,
OMX_IndexConfigTimeActiveRefClock, &refClock));
omx_set_state(c, OMX_StateExecuting);
}
示例11: OMX_INIT_STRUCTURE
OMX_ERRORTYPE NonTextureEngine::setupDisplay()
{
OMX_CONFIG_DISPLAYREGIONTYPE region;
OMX_INIT_STRUCTURE(region);
region.nPortIndex = VIDEO_RENDER_INPUT_PORT; /* Video render input port */
region.set = (OMX_DISPLAYSETTYPE)(OMX_DISPLAY_SET_DEST_RECT | OMX_DISPLAY_SET_FULLSCREEN | OMX_DISPLAY_SET_NOASPECT);
region.fullscreen = OMX_FALSE;
region.noaspect = OMX_TRUE;
region.dest_rect.x_offset = 0;
region.dest_rect.y_offset = 0;
region.dest_rect.width = omxCameraSettings.width;
region.dest_rect.height = omxCameraSettings.height;
OMX_ERRORTYPE error = OMX_SetParameter(render, OMX_IndexConfigDisplayRegion, ®ion);
if(error == OMX_ErrorNone)
{
ofLogVerbose(__func__) << "render OMX_IndexConfigDisplayRegion PASS";
}else
{
ofLog(OF_LOG_ERROR, "render OMX_IndexConfigDisplayRegion FAIL error: 0x%08x", error);
}
return error;
}
示例12: TIZ_INIT_OMX_STRUCT
OMX_ERRORTYPE
graph::gmusicops::set_gmusic_playlist (const OMX_HANDLETYPE handle,
const std::string &playlist)
{
// Set the Google Music playlist
OMX_TIZONIA_AUDIO_PARAM_GMUSICPLAYLISTTYPE playlisttype;
TIZ_INIT_OMX_STRUCT (playlisttype);
tiz_check_omx_err (OMX_GetParameter (
handle,
static_cast< OMX_INDEXTYPE >(OMX_TizoniaIndexParamAudioGmusicPlaylist),
&playlisttype));
copy_omx_string (playlisttype.cPlaylistName, playlist);
tizgmusicconfig_ptr_t gmusic_config
= boost::dynamic_pointer_cast< gmusicconfig >(config_);
assert (gmusic_config);
playlisttype.ePlaylistType = gmusic_config->get_playlist_type ();
playlisttype.bShuffle = playlist_->shuffle ();
return OMX_SetParameter (
handle,
static_cast< OMX_INDEXTYPE >(OMX_TizoniaIndexParamAudioGmusicPlaylist),
&playlisttype);
}
示例13: TIZ_LOG
OMX_ERRORTYPE
graph::gmusicops::set_channels_and_rate_on_renderer (
const OMX_U32 channels, const OMX_U32 sampling_rate,
const std::string encoding_str)
{
const OMX_HANDLETYPE handle = handles_[2]; // renderer's handle
const OMX_U32 port_id = 0; // renderer's input port
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
// Retrieve the pcm settings from the renderer component
TIZ_INIT_OMX_PORT_STRUCT (renderer_pcmtype_, port_id);
tiz_check_omx_err (
OMX_GetParameter (handle, OMX_IndexParamAudioPcm, &renderer_pcmtype_));
// Now assign the actual settings to the pcmtype structure
renderer_pcmtype_.nChannels = channels;
renderer_pcmtype_.nSamplingRate = sampling_rate;
renderer_pcmtype_.eNumData = OMX_NumericalDataSigned;
renderer_pcmtype_.eEndian
= (encoding_ == OMX_AUDIO_CodingMP3 ? OMX_EndianBig : OMX_EndianLittle);
// Set the new pcm settings
tiz_check_omx_err (
OMX_SetParameter (handle, OMX_IndexParamAudioPcm, &renderer_pcmtype_));
std::string coding_type_str ("gmusic");
tiz::graph::util::dump_graph_info (coding_type_str.c_str (),
"Connection established",
playlist_->get_current_uri ().c_str ());
dump_stream_metadata ();
return OMX_ErrorNone;
}
示例14: autoLock
// XXX: This function is here for backwards compatibility. Once the OMX
// implementations have been updated this can be removed and useGraphicBuffer2
// can be renamed to useGraphicBuffer.
status_t OMXNodeInstance::useGraphicBuffer(
OMX_U32 portIndex, const sp<GraphicBuffer>& graphicBuffer,
OMX::buffer_id *buffer) {
Mutex::Autolock autoLock(mLock);
// See if the newer version of the extension is present.
OMX_INDEXTYPE index;
if (OMX_GetExtensionIndex(
mHandle,
const_cast<OMX_STRING>("OMX.google.android.index.useAndroidNativeBuffer2"),
&index) == OMX_ErrorNone) {
return useGraphicBuffer2_l(portIndex, graphicBuffer, buffer);
}
OMX_STRING name = const_cast<OMX_STRING>(
"OMX.google.android.index.useAndroidNativeBuffer");
OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index);
if (err != OMX_ErrorNone) {
ALOGE("OMX_GetExtensionIndex %s failed", name);
return StatusFromOMXError(err);
}
BufferMeta *bufferMeta = new BufferMeta(graphicBuffer);
OMX_BUFFERHEADERTYPE *header;
OMX_VERSIONTYPE ver;
ver.s.nVersionMajor = 1;
ver.s.nVersionMinor = 0;
ver.s.nRevision = 0;
ver.s.nStep = 0;
UseAndroidNativeBufferParams params = {
sizeof(UseAndroidNativeBufferParams), ver, portIndex, bufferMeta,
&header, graphicBuffer,
};
err = OMX_SetParameter(mHandle, index, ¶ms);
if (err != OMX_ErrorNone) {
ALOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err,
err);
delete bufferMeta;
bufferMeta = NULL;
*buffer = 0;
return UNKNOWN_ERROR;
}
CHECK_EQ(header->pAppPrivate, bufferMeta);
*buffer = header;
addActiveBuffer(portIndex, *buffer);
return OK;
}
示例15: decoding_thread_setSpeed
int decoding_thread_setSpeed(float speed){
printf("try to lock thread\n");
if(ILC_GET_HANDLE(omx_clock) == NULL) return -1;
pthread_mutex_lock(&m_lock);
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_TIME_CONFIG_SCALETYPE scaleType;
OMX_INIT_STRUCTURE(scaleType);
scaleType.xScale = floor((speed * pow(2,16)));
printf("set speed to : %.2f, %d\n", speed, scaleType.xScale);
omx_err = OMX_SetParameter(ILC_GET_HANDLE(omx_clock), OMX_IndexConfigTimeScale, &scaleType);
if(omx_err != OMX_ErrorNone)
{
printf("Speed error setting OMX_IndexConfigTimeClockState : %d\n", omx_err);
pthread_mutex_unlock(&m_lock);
return -1;
}
printf("unlock thread\n");
pthread_mutex_unlock(&m_lock);
return 0;
}