static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { return factory_new (tiz_get_type (ap_hdl, "tizuricfgport"), NULL, /* this port does not take options */ ARATELIA_MP3_METADATA_ERASER_COMPONENT_NAME, mp3_metadata_version); }
static OMX_PTR instantiate_opus_port (OMX_HANDLETYPE ap_hdl) { OMX_TIZONIA_AUDIO_PARAM_OPUSTYPE opustype; OMX_AUDIO_CODINGTYPE encodings[] = {(OMX_AUDIO_CODINGTYPE) OMX_AUDIO_CodingOPUS, OMX_AUDIO_CodingMax}; tiz_port_options_t opus_port_opts = { OMX_PortDomainAudio, OMX_DirInput, ARATELIA_OPUS_DECODER_PORT_MIN_BUF_COUNT, ARATELIA_OPUS_DECODER_PORT_MIN_INPUT_BUF_SIZE, ARATELIA_OPUS_DECODER_PORT_NONCONTIGUOUS, ARATELIA_OPUS_DECODER_PORT_ALIGNMENT, ARATELIA_OPUS_DECODER_PORT_SUPPLIERPREF, {ARATELIA_OPUS_DECODER_INPUT_PORT_INDEX, NULL, NULL, NULL}, 1 /* slave port's index */ }; opustype.nSize = sizeof (OMX_TIZONIA_AUDIO_PARAM_OPUSTYPE); opustype.nVersion.nVersion = OMX_VERSION; opustype.nPortIndex = ARATELIA_OPUS_DECODER_INPUT_PORT_INDEX; opustype.nChannels = 2; opustype.nBitRate = 256; opustype.nSampleRate = 48000; opustype.nFrameDuration = 2; opustype.nEncoderComplexity = 0; opustype.bPacketLossResilience = OMX_FALSE; opustype.bForwardErrorCorrection = OMX_FALSE; opustype.bDtx = OMX_FALSE; opustype.eChannelMode = OMX_AUDIO_ChannelModeStereo; opustype.eFormat = OMX_AUDIO_OPUSStreamFormatVBR; return factory_new (tiz_get_type (ap_hdl, "tizopusport"), &opus_port_opts, &encodings, &opustype); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { return factory_new (tiz_get_type (ap_hdl, "tizconfigport"), NULL, /* this port does not take options */ TC_COMPONENT_NAME, tc_comp_version); }
static OMX_PTR instantiate_mp3_port (OMX_HANDLETYPE ap_hdl) { OMX_AUDIO_PARAM_MP3TYPE mp3type; OMX_AUDIO_CODINGTYPE encodings[] = {OMX_AUDIO_CodingMP3, OMX_AUDIO_CodingMax}; tiz_port_options_t mp3_port_opts = { OMX_PortDomainAudio, OMX_DirOutput, ARATELIA_MP3_ENCODER_PORT_MIN_BUF_COUNT, ARATELIA_MP3_ENCODER_PORT_MIN_INPUT_BUF_SIZE, ARATELIA_MP3_ENCODER_PORT_NONCONTIGUOUS, ARATELIA_MP3_ENCODER_PORT_ALIGNMENT, ARATELIA_MP3_ENCODER_PORT_SUPPLIERPREF, {ARATELIA_MP3_ENCODER_OUTPUT_PORT_INDEX, NULL, NULL, NULL}, 0 /* Master port */ }; mp3type.nSize = sizeof (OMX_AUDIO_PARAM_MP3TYPE); mp3type.nVersion.nVersion = OMX_VERSION; mp3type.nPortIndex = ARATELIA_MP3_ENCODER_OUTPUT_PORT_INDEX; mp3type.nChannels = 2; mp3type.nBitRate = 0; mp3type.nSampleRate = 0; mp3type.nAudioBandWidth = 0; mp3type.eChannelMode = OMX_AUDIO_ChannelModeStereo; mp3type.eFormat = OMX_AUDIO_MP3StreamFormatMP1Layer3; return factory_new (tiz_get_type (ap_hdl, "tizmp3port"), &mp3_port_opts, &encodings, &mp3type); }
static OMX_PTR instantiate_processor (OMX_HANDLETYPE ap_hdl) { /* Instantiate the processor */ icer_prc_init (); return factory_new (icerprc, ap_hdl); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { return factory_new (tiz_get_type (ap_hdl, "tizuricfgport"), NULL, /* this port does not take options */ ARATELIA_FILE_WRITER_COMPONENT_NAME, file_writer_version); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { return factory_new (tiz_get_type (ap_hdl, "tizconfigport"), NULL, /* this port does not take options */ ARATELIA_MP3_ENCODER_COMPONENT_NAME, mp3_encoder_version); }
void init_webpdprc (void) { if (!webpdprc) { TIZ_LOG (TIZ_TRACE, "Initializing webpdprc..."); tiz_prc_init (); webpdprc = factory_new (tizprc_class, "webpdprc", tizprc, sizeof (struct webpdprc), ctor, webpd_proc_ctor, dtor, webpd_proc_dtor, tiz_prc_buffers_ready, webpd_proc_buffers_ready, tiz_srv_allocate_resources, webpd_proc_allocate_resources, tiz_srv_deallocate_resources, webpd_proc_deallocate_resources, tiz_srv_prepare_to_transfer, webpd_proc_prepare_to_transfer, tiz_srv_transfer_and_process, webpd_proc_transfer_and_process, tiz_srv_stop_and_return, webpd_proc_stop_and_return, 0); } }
void * tiz_waitforresources_init (void * ap_tos, void * ap_hdl) { void * tizstate = tiz_get_type (ap_hdl, "tizstate"); void * tizwaitforresources_class = tiz_get_type (ap_hdl, "tizwaitforresources_class"); TIZ_LOG_CLASS (tizwaitforresources_class); void * tizwaitforresources = factory_new (tizwaitforresources_class, "tizwaitforresources", tizstate, sizeof (tiz_waitforresources_t), ap_tos, ap_hdl, ctor, waitforresources_ctor, dtor, waitforresources_dtor, tiz_api_SetParameter, waitforresources_SetParameter, tiz_api_GetState, waitforresources_GetState, tiz_api_UseBuffer, waitforresources_UseBuffer, tiz_api_EmptyThisBuffer, waitforresources_EmptyThisBuffer, tiz_api_FillThisBuffer, waitforresources_FillThisBuffer, tiz_state_state_set, waitforresources_state_set, tiz_state_trans_complete, waitforresources_trans_complete, 0); return tizwaitforresources; }
static OMX_PTR instantiate_input_port (OMX_HANDLETYPE ap_hdl) { OMX_AUDIO_PARAM_VORBISTYPE vorbistype; OMX_AUDIO_CODINGTYPE encodings[] = { OMX_AUDIO_CodingVORBIS, OMX_AUDIO_CodingMax }; tiz_port_options_t vorbis_port_opts = { OMX_PortDomainAudio, OMX_DirInput, ARATELIA_VORBIS_DECODER_PORT_MIN_BUF_COUNT, ARATELIA_VORBIS_DECODER_PORT_MIN_INPUT_BUF_SIZE, ARATELIA_VORBIS_DECODER_PORT_NONCONTIGUOUS, ARATELIA_VORBIS_DECODER_PORT_ALIGNMENT, ARATELIA_VORBIS_DECODER_PORT_SUPPLIERPREF, { ARATELIA_VORBIS_DECODER_INPUT_PORT_INDEX, NULL, NULL, NULL }, 1 /* slave port's index */ }; vorbistype.nSize = sizeof(OMX_AUDIO_PARAM_VORBISTYPE); vorbistype.nVersion.nVersion = OMX_VERSION; vorbistype.nPortIndex = 0; vorbistype.nChannels = 2; vorbistype.nBitRate = 0; vorbistype.nMinBitRate = 0; vorbistype.nMaxBitRate = 0; vorbistype.nSampleRate = 48000; vorbistype.nAudioBandWidth = 0; vorbistype.nQuality = 5; vorbistype.bManaged = OMX_FALSE; vorbistype.bDownmix = OMX_FALSE; return factory_new (tiz_get_type (ap_hdl, "tizvorbisport"), &vorbis_port_opts, &encodings, &vorbistype); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { return factory_new (tiz_get_type (ap_hdl, "spfysrccfgport"), NULL, /* this port does not take options */ ARATELIA_SPOTIFY_SOURCE_COMPONENT_NAME, spotify_source_version); }
static OMX_PTR instantiate_pcm_port (OMX_HANDLETYPE ap_hdl) { OMX_PTR p_pcmport = NULL; OMX_AUDIO_PARAM_PCMMODETYPE pcmmode; OMX_AUDIO_CONFIG_VOLUMETYPE volume; OMX_AUDIO_CONFIG_MUTETYPE mute; OMX_AUDIO_CODINGTYPE encodings[] = { OMX_AUDIO_CodingPCM, OMX_AUDIO_CodingMax }; tiz_port_options_t pcm_port_opts = { OMX_PortDomainAudio, OMX_DirOutput, ARATELIA_MP3_DECODER_PORT_MIN_BUF_COUNT, ARATELIA_MP3_DECODER_PORT_MIN_OUTPUT_BUF_SIZE, ARATELIA_MP3_DECODER_PORT_NONCONTIGUOUS, ARATELIA_MP3_DECODER_PORT_ALIGNMENT, ARATELIA_MP3_DECODER_PORT_SUPPLIERPREF, {ARATELIA_MP3_DECODER_OUTPUT_PORT_INDEX, NULL, NULL, NULL}, 0 /* Master port */ }; /* Instantiate the pcm port */ pcmmode.nSize = sizeof (OMX_AUDIO_PARAM_PCMMODETYPE); pcmmode.nVersion.nVersion = OMX_VERSION; pcmmode.nPortIndex = ARATELIA_MP3_DECODER_OUTPUT_PORT_INDEX; pcmmode.nChannels = 2; pcmmode.eNumData = OMX_NumericalDataSigned; pcmmode.eEndian = OMX_EndianBig; pcmmode.bInterleaved = OMX_TRUE; pcmmode.nBitPerSample = 16; pcmmode.nSamplingRate = 48000; pcmmode.ePCMMode = OMX_AUDIO_PCMModeLinear; pcmmode.eChannelMapping[0] = OMX_AUDIO_ChannelLF; pcmmode.eChannelMapping[1] = OMX_AUDIO_ChannelRF; volume.nSize = sizeof (OMX_AUDIO_CONFIG_VOLUMETYPE); volume.nVersion.nVersion = OMX_VERSION; volume.nPortIndex = ARATELIA_MP3_DECODER_OUTPUT_PORT_INDEX; volume.bLinear = OMX_FALSE; volume.sVolume.nValue = 50; volume.sVolume.nMin = 0; volume.sVolume.nMax = 100; mute.nSize = sizeof (OMX_AUDIO_CONFIG_MUTETYPE); mute.nVersion.nVersion = OMX_VERSION; mute.nPortIndex = ARATELIA_MP3_DECODER_OUTPUT_PORT_INDEX; mute.bMute = OMX_FALSE; tiz_pcmport_init (); p_pcmport = factory_new (tizpcmport, &pcm_port_opts, &encodings, &pcmmode, &volume, &mute); assert (p_pcmport); return p_pcmport; }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { /* Instantiate the config port */ icer_cfgport_init (); return factory_new (icercfgport, NULL, /* this port does not take options */ ARATELIA_HTTP_RENDERER_COMPONENT_NAME, http_renderer_version); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { /* Instantiate the config port */ return factory_new (tiz_get_type (ap_hdl, "tizconfigport"), NULL, /* this port does not take options */ ARATELIA_AUDIO_RENDERER_COMPONENT_NAME, audio_renderer_version); }
void * scloud_cfgport_class_init (void * ap_tos, void * ap_hdl) { void * tizconfigport = tiz_get_type (ap_hdl, "tizconfigport"); void * scloudcfgport_class = factory_new (classOf (tizconfigport), "scloudcfgport_class", classOf (tizconfigport), sizeof (scloud_cfgport_class_t), ap_tos, ap_hdl, ctor, scloud_cfgport_class_ctor, 0); return scloudcfgport_class; }
void * gmusic_cfgport_class_init (void * ap_tos, void * ap_hdl) { void * tizconfigport = tiz_get_type (ap_hdl, "tizconfigport"); void * gmusiccfgport_class = factory_new (classOf (tizconfigport), "gmusiccfgport_class", classOf (tizconfigport), sizeof (gmusic_cfgport_class_t), ap_tos, ap_hdl, ctor, gmusic_cfgport_class_ctor, 0); return gmusiccfgport_class; }
void * tiz_loadedtoidle_class_init (void * ap_tos, void * ap_hdl) { void * tizloaded = tiz_get_type (ap_hdl, "tizloaded"); void * tizloadedtoidle_class = factory_new (classOf (tizloaded), "tizloadedtoidle_class", classOf (tizloaded), sizeof (tiz_loadedtoidle_class_t), ap_tos, ap_hdl, ctor, loadedtoidle_class_ctor, 0); return tizloadedtoidle_class; }
void * tiz_idletoloaded_class_init (void * ap_tos, void * ap_hdl) { void * tizidle = tiz_get_type (ap_hdl, "tizidle"); void * tizidletoloaded_class = factory_new (classOf (tizidle), "tizidletoloaded_class", classOf (tizidle), sizeof (tiz_idletoloaded_class_t), ap_tos, ap_hdl, ctor, idletoloaded_class_ctor, 0); return tizidletoloaded_class; }
void * cc_youtube_cfgport_class_init (void * ap_tos, void * ap_hdl) { void * cc_cfgport = tiz_get_type (ap_hdl, "cc_cfgport"); void * cc_youtubecfgport_class = factory_new (classOf (cc_cfgport), "cc_youtubecfgport_class", classOf (cc_cfgport), sizeof (cc_youtube_cfgport_class_t), ap_tos, ap_hdl, ctor, cc_youtube_cfgport_class_ctor, 0); return cc_youtubecfgport_class; }
static OMX_PTR instantiate_processor (OMX_HANDLETYPE ap_hdl) { OMX_PTR p_proc = NULL; /* Instantiate the processor */ fr_prc_init (); p_proc = factory_new (frprc, ap_hdl); assert (p_proc); return p_proc; }
static OMX_PTR instantiate_pcm_port (OMX_HANDLETYPE ap_hdl) { OMX_AUDIO_PARAM_PCMMODETYPE pcmmode; OMX_AUDIO_CONFIG_VOLUMETYPE volume; OMX_AUDIO_CONFIG_MUTETYPE mute; OMX_AUDIO_CODINGTYPE encodings[] = { OMX_AUDIO_CodingUnused, OMX_AUDIO_CodingAutoDetect, OMX_AUDIO_CodingPCM, OMX_AUDIO_CodingMax }; tiz_port_options_t port_opts = { OMX_PortDomainAudio, OMX_DirOutput, ARATELIA_SPOTIFY_SOURCE_PORT_MIN_BUF_COUNT, ARATELIA_SPOTIFY_SOURCE_PORT_MIN_BUF_SIZE, ARATELIA_SPOTIFY_SOURCE_PORT_NONCONTIGUOUS, ARATELIA_SPOTIFY_SOURCE_PORT_ALIGNMENT, ARATELIA_SPOTIFY_SOURCE_PORT_SUPPLIERPREF, {ARATELIA_SPOTIFY_SOURCE_PORT_INDEX, NULL, NULL, NULL}, -1 /* use -1 for now */ }; /* Instantiate the pcm port */ pcmmode.nSize = sizeof (OMX_AUDIO_PARAM_PCMMODETYPE); pcmmode.nVersion.nVersion = OMX_VERSION; pcmmode.nPortIndex = ARATELIA_SPOTIFY_SOURCE_PORT_INDEX; pcmmode.nChannels = 2; pcmmode.eNumData = OMX_NumericalDataSigned; pcmmode.eEndian = OMX_EndianLittle; pcmmode.bInterleaved = OMX_TRUE; pcmmode.nBitPerSample = 16; pcmmode.nSamplingRate = 48000; pcmmode.ePCMMode = OMX_AUDIO_PCMModeLinear; pcmmode.eChannelMapping[0] = OMX_AUDIO_ChannelLF; pcmmode.eChannelMapping[1] = OMX_AUDIO_ChannelRF; volume.nSize = sizeof (OMX_AUDIO_CONFIG_VOLUMETYPE); volume.nVersion.nVersion = OMX_VERSION; volume.nPortIndex = ARATELIA_SPOTIFY_SOURCE_PORT_INDEX; volume.bLinear = OMX_FALSE; volume.sVolume.nValue = ARATELIA_SPOTIFY_SOURCE_DEFAULT_VOLUME_VALUE; volume.sVolume.nMin = ARATELIA_SPOTIFY_SOURCE_MIN_VOLUME_VALUE; volume.sVolume.nMax = ARATELIA_SPOTIFY_SOURCE_MAX_VOLUME_VALUE; mute.nSize = sizeof (OMX_AUDIO_CONFIG_MUTETYPE); mute.nVersion.nVersion = OMX_VERSION; mute.nPortIndex = ARATELIA_SPOTIFY_SOURCE_PORT_INDEX; mute.bMute = OMX_FALSE; return factory_new (tiz_get_type (ap_hdl, "tizpcmport"), &port_opts, &encodings, &pcmmode, &volume, &mute); }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { OMX_PTR p_cport = NULL; tiz_configport_init (); p_cport = factory_new (tizconfigport, NULL, /* this port does not take options */ ARATELIA_MP3_DECODER_COMPONENT_NAME, mp3_decoder_version); assert (p_cport); return p_cport; }
void * tiz_pausetoidle_class_init (void * ap_tos, void * ap_hdl) { void * tizpause = tiz_get_type (ap_hdl, "tizpause"); void * tizpausetoidle_class = factory_new (classOf (tizpause), "tizpausetoidle_class", classOf (tizpause), sizeof (tiz_pausetoidle_class_t), ap_tos, ap_hdl, ctor, pausetoidle_class_ctor, 0); return tizpausetoidle_class; }
void * tiz_waitforresources_class_init (void * ap_tos, void * ap_hdl) { void * tizstate = tiz_get_type (ap_hdl, "tizstate"); void * tizwaitforresources_class = factory_new (classOf (tizstate), "tizwaitforresources_class", classOf (tizstate), sizeof (tiz_waitforresources_class_t), ap_tos, ap_hdl, ctor, waitforresources_class_ctor, 0); return tizwaitforresources_class; }
static OMX_PTR instantiate_config_port (OMX_HANDLETYPE ap_hdl) { OMX_PTR p_cport = NULL; /* Instantiate the config port */ fr_cfgport_init (); p_cport = factory_new (frcfgport, NULL, /* this port does not take options */ ARATELIA_FILE_READER_COMPONENT_NAME, file_reader_version); assert (p_cport); return p_cport; }
static OMX_PTR instantiate_input_port (OMX_HANDLETYPE ap_hdl) { OMX_VIDEO_PORTDEFINITIONTYPE portdef; OMX_VIDEO_PARAM_VP8TYPE vp8type; OMX_VIDEO_CODINGTYPE encodings[] = {OMX_VIDEO_CodingVP8, OMX_VIDEO_CodingMax}; OMX_COLOR_FORMATTYPE formats[] = { OMX_COLOR_FormatUnused, OMX_COLOR_FormatYUV420Planar, OMX_COLOR_FormatMax}; tiz_port_options_t vp8_port_opts = { OMX_PortDomainVideo, OMX_DirInput, ARATELIA_VP8_DECODER_PORT_MIN_BUF_COUNT, ARATELIA_VP8_DECODER_PORT_MIN_INPUT_BUF_SIZE, ARATELIA_VP8_DECODER_PORT_NONCONTIGUOUS, ARATELIA_VP8_DECODER_PORT_ALIGNMENT, ARATELIA_VP8_DECODER_PORT_SUPPLIERPREF, {ARATELIA_VP8_DECODER_INPUT_PORT_INDEX, NULL, NULL, NULL}, 1 /* slave port */ }; OMX_VIDEO_VP8LEVELTYPE levels[] = {OMX_VIDEO_VP8Level_Version0, OMX_VIDEO_VP8Level_Version1, OMX_VIDEO_VP8Level_Version2, OMX_VIDEO_VP8Level_Version3, OMX_VIDEO_VP8LevelMax}; /* This figures are based on the defaults defined in the standard for the VP8 * decoder component */ portdef.pNativeRender = NULL; portdef.nFrameWidth = 176; portdef.nFrameHeight = 144; portdef.nStride = 0; portdef.nSliceHeight = 0; portdef.nBitrate = 64000; portdef.xFramerate = 15 << 16; portdef.bFlagErrorConcealment = OMX_FALSE; portdef.eCompressionFormat = OMX_VIDEO_CodingVP8; portdef.eColorFormat = OMX_COLOR_FormatUnused; portdef.pNativeWindow = NULL; vp8type.nSize = sizeof (OMX_VIDEO_PARAM_VP8TYPE); vp8type.nVersion.nVersion = OMX_VERSION; vp8type.nPortIndex = ARATELIA_VP8_DECODER_INPUT_PORT_INDEX; vp8type.eProfile = OMX_VIDEO_VP8ProfileMain; vp8type.eLevel = OMX_VIDEO_VP8Level_Version0; vp8type.nDCTPartitions = 0; /* 1 DCP partitiion */ vp8type.bErrorResilientMode = OMX_FALSE; return factory_new (tiz_get_type (ap_hdl, "vp8dinport"), &vp8_port_opts, &portdef, &encodings, &formats, &vp8type, &levels, NULL /* OMX_VIDEO_PARAM_BITRATETYPE */); }
static OMX_PTR instantiate_video_port (OMX_HANDLETYPE ap_hdl) { tiz_port_options_t port_opts = { OMX_PortDomainVideo, OMX_DirOutput, ARATELIA_FILE_READER_PORT_MIN_BUF_COUNT, ARATELIA_FILE_READER_PORT_MIN_BUF_SIZE, ARATELIA_FILE_READER_PORT_NONCONTIGUOUS, ARATELIA_FILE_READER_PORT_ALIGNMENT, ARATELIA_FILE_READER_PORT_SUPPLIERPREF, {ARATELIA_FILE_READER_PORT_INDEX, NULL, NULL, NULL}, -1 /* use -1 for now */ }; return factory_new (tiz_get_type (ap_hdl, "tizbinaryport"), &port_opts); }
static OMX_PTR instantiate_video_input_port (OMX_HANDLETYPE ap_hdl, const OMX_U32 port_id) { OMX_VIDEO_PORTDEFINITIONTYPE portdef; OMX_VIDEO_CODINGTYPE encodings[] = {OMX_VIDEO_CodingUnused, OMX_VIDEO_CodingMax}; OMX_COLOR_FORMATTYPE formats[] = {OMX_COLOR_FormatUnused, OMX_COLOR_FormatMax}; tiz_port_options_t port_opts = { OMX_PortDomainVideo, OMX_DirInput, ARATELIA_OGG_MUXER_VIDEO_PORT_MIN_BUF_COUNT, ARATELIA_OGG_MUXER_VIDEO_PORT_MIN_BUF_SIZE, ARATELIA_OGG_MUXER_VIDEO_PORT_NONCONTIGUOUS, ARATELIA_OGG_MUXER_VIDEO_PORT_ALIGNMENT, ARATELIA_OGG_MUXER_VIDEO_PORT_SUPPLIERPREF, {port_id, NULL, NULL, NULL}, -1 /* use -1 for now */ }; /* The muxer port expects to receive raw the same structures as in a normal raw video port when instantiated as a video domain port */ /* NOTE: No defaults are defined in the standard for the video * output port of the video_reader.muxer component. So for the * sake of completeness, simply provide some default values * here. */ portdef.pNativeRender = NULL; portdef.nFrameWidth = 176; portdef.nFrameHeight = 144; portdef.nStride = 0; portdef.nSliceHeight = 0; portdef.nBitrate = 0; portdef.xFramerate = 15 << 16; portdef.bFlagErrorConcealment = OMX_FALSE; portdef.eCompressionFormat = OMX_VIDEO_CodingUnused; portdef.eColorFormat = OMX_COLOR_FormatYUV420Planar; portdef.pNativeWindow = NULL; return factory_new (tiz_get_type (ap_hdl, "tizmuxerport"), &port_opts, &portdef, &encodings, &formats); }
void * tiz_idletoloaded_init (void * ap_tos, void * ap_hdl) { void * tizidle = tiz_get_type (ap_hdl, "tizidle"); void * tizidletoloaded_class = tiz_get_type (ap_hdl, "tizidletoloaded_class"); TIZ_LOG_CLASS (tizidletoloaded_class); void * tizidletoloaded = factory_new ( tizidletoloaded_class, "tizidletoloaded", tizidle, sizeof (tiz_idletoloaded_t), ap_tos, ap_hdl, ctor, idletoloaded_ctor, dtor, idletoloaded_dtor, tiz_api_SetParameter, idletoloaded_SetParameter, tiz_api_GetState, idletoloaded_GetState, tiz_api_UseBuffer, idletoloaded_UseBuffer, tiz_api_AllocateBuffer, idletoloaded_AllocateBuffer, tiz_api_FreeBuffer, idletoloaded_FreeBuffer, tiz_api_EmptyThisBuffer, idletoloaded_EmptyThisBuffer, tiz_api_FillThisBuffer, idletoloaded_FillThisBuffer, tiz_state_trans_complete, idletoloaded_trans_complete, 0); return tizidletoloaded; }
static OMX_PTR instantiate_input_port (OMX_HANDLETYPE ap_hdl) { OMX_VIDEO_PORTDEFINITIONTYPE portdef; OMX_VIDEO_CODINGTYPE encodings[] = { OMX_VIDEO_CodingUnused, OMX_VIDEO_CodingMax }; OMX_COLOR_FORMATTYPE formats[] = { OMX_COLOR_FormatYUV420Planar, OMX_COLOR_FormatMax }; tiz_port_options_t rawvideo_port_opts = { OMX_PortDomainVideo, OMX_DirInput, ARATELIA_YUV_RENDERER_PORT_MIN_BUF_COUNT, ARATELIA_YUV_RENDERER_PORT_MIN_OUTPUT_BUF_SIZE, ARATELIA_YUV_RENDERER_PORT_NONCONTIGUOUS, ARATELIA_YUV_RENDERER_PORT_ALIGNMENT, ARATELIA_YUV_RENDERER_PORT_SUPPLIERPREF, {ARATELIA_YUV_RENDERER_PORT_INDEX, NULL, NULL, NULL}, 0 /* use 0 for now */ }; /* This figures are based on the defaults defined in the standard for the YUV * Overlay Image/Video Renderer */ portdef.pNativeRender = NULL; portdef.nFrameWidth = 176; portdef.nFrameHeight = 220; portdef.nStride = 0; portdef.nSliceHeight = 0; portdef.nBitrate = 64000; portdef.xFramerate = 15; portdef.bFlagErrorConcealment = OMX_FALSE; portdef.eCompressionFormat = OMX_VIDEO_CodingUnused; portdef.eColorFormat = OMX_COLOR_FormatYUV420Planar; portdef.pNativeWindow = NULL; return factory_new (tiz_get_type (ap_hdl, "tizivrport"), &rawvideo_port_opts, &portdef, &encodings, &formats); }