END_TEST #if 0 START_TEST (test_pcmenc_2) { GooComponentFactory *factory = goo_ti_component_factory_get_instance (); GooComponent *component = goo_component_factory_get_component (factory, GOO_TI_PCM_ENCODER); /* audio properties */ g_object_set (G_OBJECT (component), "dasf-mode", TRUE, "data-path", NULL, "mute", FALSE, NULL); { GOO_TI_PCMENC_GET_INPUT_PORT_PARAM (component)->nPortIndex = OMX_DirInput; GOO_TI_PCMENC_GET_INPUT_PORT_PARAM (component)->nChannels = 1; } /* output port component parameters */ { GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (component)->nPortIndex = OMX_DirOutput; GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (component)->nChannels = 1; GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (component)->nSamplingRate = 8000; } GOO_OBJECT_WARNING (component, "stream ID = %d", goo_ti_audio_component_get_stream_id (GOO_TI_AUDIO_COMPONENT (component))); GooEngine *engine = goo_engine_new (component, NULL, "/tmp/check_goo_8000.pcm"); g_object_set (engine, "num-buffers", 500, NULL); goo_component_set_state_idle (component); goo_component_set_state_executing (component); goo_engine_play (engine); goo_component_set_state_idle (component); goo_component_set_state_loaded (component); g_object_unref (G_OBJECT (engine)); g_object_unref (G_OBJECT (component)); g_object_unref (G_OBJECT (factory)); }
END_TEST START_TEST (test_pcmenc_2) { GooComponentFactory *factory = goo_ti_component_factory_get_instance (); GooComponent *component = goo_component_factory_get_component (factory, GOO_TI_PCM_ENCODER); /* audio properties */ g_object_set (G_OBJECT (component), "dasf-mode", FALSE, "data-path", NULL, NULL); { GOO_TI_PCMENC_GET_INPUT_PORT_PARAM (component)->nPortIndex = 0; GOO_TI_PCMENC_GET_INPUT_PORT_PARAM (component)->nChannels = 1; } /* output port component parameters */ { GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (component)->nPortIndex = 1; GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (component)->nChannels = 1; } GOO_OBJECT_WARNING (component, "stream ID = %d", goo_ti_audio_component_get_stream_id (GOO_TI_AUDIO_COMPONENT (component))); GooEngine *engine = goo_engine_new (component, "/omx/patterns/m16.wav", "/tmp/m_16000.pcm"); goo_component_set_state_idle (component); goo_component_set_state_executing (component); goo_engine_play (engine); goo_component_set_state_idle (component); goo_component_set_state_loaded (component); g_object_unref (G_OBJECT (engine)); g_object_unref (G_OBJECT (component)); g_object_unref (G_OBJECT (factory)); }
static void omx_sync (GstGooEncPcm* self) { g_assert (self != NULL); g_assert (self->component != NULL); OMX_AUDIO_PARAM_PCMMODETYPE* param; param = GOO_TI_PCMENC_GET_OUTPUT_PORT_PARAM (self->component); GST_INFO_OBJECT (self, ""); return; }