Boa tarde, novamente recorro a ajuda dos Sr.s
Bom estou com uma imagem de fundo aparecendo.. e ao iniciar deveria aparecer um titulo (que aparece) e um video ( que nao aparece)
Acho que o problema deve estar nos conectores elo. Os que estou usando são estes:
<link id="elo_fundo" xconnector="connBase#onBeginStart">
<bind component="tela1" role="onBegin"/>
<bind component="titulo1" role="start" />
</link>
99 comentários
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! CABEÇALHO DO PROGRAMA
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<head>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! BASE DE REGRAS:
! definem regras utilizadas em switches para a seleção de nós
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <ruleBase>
<rule id="r1" var="opcao" comparator="eq" value="1"/>
<rule id="r2" var="opcao" comparator="eq" value="2"/>
<rule id="r3" var="opcao" comparator="eq" value="3"/>
<rule id="r4" var="opcao" comparator="eq" value="4"/>
<rule id="r5" var="opcao" comparator="eq" value="5"/>
<rule id="r6" var="opcao" comparator="eq" value="6"/>
</ruleBase>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! BASE DE REGIÕES:
! define as regiões na tela onde as mídias são apresentadas
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <regionBase> <!-- REGIAO DA TELA / VIDEO / TITULO -->
<region id="rgFundo" height="100%" width="100%" >
<region id="rgVideo1" left="0" top="0" width="300" height="150" zIndex="2" />
<region id="rgTitulo1" left="10" top="40" width="600" height="40" zIndex="0" />
</region> <!-- REGIAO DAS OPCOES DO MENU -->
<region id="rgOpcao1" left="200" top="100" width="200" height="50" zIndex="0"/>
<region id="rgOpcao2" left="200" top="150" width="200" height="50" zIndex="0"/>
<region id="rgOpcao3" left="200" top="200" width="200" height="50" zIndex="0"/>
<region id="rgOpcao4" left="200" top="250" width="200" height="50" zIndex="0"/>
<region id="rgOpcao5" left="200" top="300" width="200" height="50" zIndex="2"/>
<region id="rgOpcao6" left="200" top="350" width="200" height="50" zIndex="2"/>
<region id="rgResultado" left="150" top="100" width="200" height="100" zIndex="1"/> </regionBase>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! BASE DE DESCRITORES:
! define como as mídias são apresentadas
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <descriptorBase> <descriptor id="dVideo1" region="rgVideo1">
<!-- <descriptorParam name="soundLevel" value="1" /> -->
</descriptor> <descriptor id="dTitulo1" region="rgTitulo1">
<descriptorParam name="border" value="none" />
</descriptor>
<descriptor id="dFundo" region="rgFundo" /> <descriptor id="dOpcao1" region="rgOpcao1" focusIndex="1" moveDown="2" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dOpcao2" region="rgOpcao2" focusIndex="2" moveDown="3" moveUp="1" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dOpcao3" region="rgOpcao3" focusIndex="3" moveDown="4" moveUp="2" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dOpcao4" region="rgOpcao4" focusIndex="4" moveDown="5" moveUp="3" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dOpcao5" region="rgOpcao5" focusIndex="5" moveDown="6" moveUp="4" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dOpcao6" region="rgOpcao6" focusIndex="6" moveUp="5" focusBorderWidth="-2" focusBorderColor="blue"/>
<descriptor id="dResultado" region="rgResultado" /> </descriptorBase>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! BASE DE CONECTORES:
! definem o comportamento dos elos
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <connectorBase>
<!-- BASE DE CONECTORES PRONTOS DO COMPOSER-->
<importBase alias="connBase" documentURI="composerConnectorBase.conn"/>
</connectorBase> </head>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! CORPO DO PROGRAMA:
! define as mídias e estrutura do programa
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<body>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! PONTO DE ENTRADA:
! indica o componente onde o programa inicia
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <!--TESTES
!-->
<port component="video1" id="pInicio"/>
<port component="tela1" id="imagem_fundo1"/> <media type="application/x-ginga-settings" id="nodeSettings">
<property name="opcao"/>
</media> <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! MÍDIAS:
! define o local dos arquivos de mídia e as associa com seus descritores
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <!-- DESCRITOR DA IMAGEM DE FUNDO -->
<media descriptor="dFundo" id="tela1" src="midia/tela1.gif" type="image/gif">
<!--<area begin="0.0s" end="120.0s" id="anchor1"/> -->
</media> <media type="video/mpeg" id="video1" src="media/video1.mpg" descriptor="dVideo1" >
<area begin="0.0s" end="120.0s" id="anchor1"/>
</media> <media type="text/html" id="titulo1" src="http://www.softwarepublico.gov.br/misc/Tela1Teste/midia/titulo1.html" descriptor="dTitulo1" /> <!-- COMPONENTES DE SELEÇÂO --> <media id="opcao1" src="media/opcao1.gif" descriptor="dOpcao1"/>
<media id="opcao2" src="media/opcao2.gif" descriptor="dOpcao2"/>
<media id="opcao3" src="media/opcao3.gif" descriptor="dOpcao3"/>
<media id="opcao4" src="media/opcao4.gif" descriptor="dOpcao4"/>
<media id="opcao5" src="media/opcao5.gif" descriptor="dOpcao5"/>
<media id="opcao6" src="media/opcao6.gif" descriptor="dOpcao6"/>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! SWITCH:
! contém os nós dentre os quais um será selecionado
! com base nas regras definidas por bindRule
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <switch id="switchOpcao">
<!-- caso a regra ri seja válida, dispara o nó selecao --> <bindRule rule="r1" constituent="selecao1" />
<bindRule rule="r2" constituent="selecao2" />
<bindRule rule="r3" constituent="selecao3" />
<bindRule rule="r4" constituent="selecao4" />
<bindRule rule="r5" constituent="selecao5" />
<bindRule rule="r6" constituent="selecao6" /> <media id="selecao1" src="media/selecao1.html" descriptor="dResultado"/>
<media id="selecao2" src="media/selecao2.html" descriptor="dResultado"/>
<media id="selecao3" src="media/selecao3.html" descriptor="dResultado"/>
<media id="selecao4" src="media/selecao4.html" descriptor="dResultado"/>
<media id="selecao5" src="media/selecao5.html" descriptor="dResultado"/>
<media id="selecao6" src="media/selecao6.html" descriptor="dResultado"/> </switch> <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! ELOS
! define os elos que regem o sincronismo entre as mídias
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<!-- <link id="elo_fundo" xconnector="onBeginStart">
<bind component="tela1" role="onBegin"/>
<bind component="titulo1" role="start" />
<bind component="video1" role="start" />
</link>
<link id="lVideo1Titulo1Start" xconnector="connectors#onBeginNStartN">
<bind component="tela1" role="onBegin" />
<bind component="titulo1" role="start" />
</link>
<link id="elo_fundo" xconnector="connBase#onBeginStart">
<bind component="tela1" role="onBegin"/>
<bind component="titulo1" role="start" />
<bind component="video1" role="start" />
</link>
video1 deve ser iniciado simultaneamente a titulo1 <link id="lVideo1Titulo1Start" xconnector="connBase#onBegin1StartN">
<bind component="titulo1" role="onBegin" />
<bind component="video1" role="start" />
</link> titulo1 deve ser terminado simultaneamente a video1 <link id="lVideo1Titulo1Stop" xconnector="connBase#onEndStopN">
<bind component="video1" role="onEnd" />
<bind component="titulo1" role="stop" />
</link> -->
<link id="elo_fundo" xconnector="connBase#onBeginStart">
<bind component="tela1" role="onBegin"/>
<bind component="titulo1" role="start" />
</link> <!-- ** Ao Iniciar Titulo1 Iniciar Video1 ******* -->
<link id="IniciarVideo1" xconnector="connBase#onBegin1StartN">
<bind component="titulo1" role="onBegin"/>
<bind component="video1" role="start" />
</link> <!--******* COMPONENTES DA SELEÇÂO *****************--> <!-- início do vídeo 1 deve iniciar a exibição das opções --> <link id="Video1Start" xconnector="connBase#onBegin1StartN">
<bind component="video1" role="onBegin"/>
<bind component="opcao1" role="start"/>
<bind component="opcao2" role="start"/>
<bind component="opcao3" role="start"/>
<bind component="opcao4" role="start"/>
<bind component="opcao5" role="start"/>
<bind component="opcao6" role="start"/>
</link> <link id="Selecao_OK1" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao1" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="1"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> <link id="Selecao_OK2" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao2" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="2"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> <link id="Selecao_OK3" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao3" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="3"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> <link id="Selecao_OK4" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao4" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="4"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> <link id="Selecao_OK5" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao5" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="5"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> <link id="Selecao_OK6" xconnector="connBase#onSelection1SetNStopNStartN">
<bind component="opcao6" role="onSelection"/>
<bind component="nodeSettings" interface="opcao" role="set">
<bindParam name="var" value="6"/>
</bind>
<bind component="switchOpcao" role="start"/>
<bind component="video1" role="stop"/>
<bind component="opcao1" role="stop"/>
<bind component="opcao2" role="stop"/>
<bind component="opcao3" role="stop"/>
<bind component="opcao4" role="stop"/>
<bind component="opcao5" role="stop"/>
<bind component="opcao6" role="stop"/>
</link> </body>
</ncl>
----------------------------------------------- Este é o Codigo Completo.. Coloquei separado pois estava fazendo alguns testes. Ainda estou aprendendo NCL por isso tem bastante comentarios no codigo..
<!--+++++++++++++++++++++ ! PONTO DE ENTRADA:
! indica o componente onde o programa inicia
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<port component="video1" id="pInicio"/> <port component="tela1" id="imagem_fundo1"/> ---- Nesta declaração você está falando pro video1 e tela1 iniciarem o programa. Não entendi as declarações de link que você bota a seguir. Além disso você coloca vários links do tipo: <link id="IniciarVideo1" xconnector="connBase#onBegin1StartN">
<bind component="titulo1" role="onBegin"/>
<bind component="video1" role="start" />
</link> Que acabam dizendo a mesma coisa que as definições da porta. Onde você está fazendo seu NCL ? no composer ? tente usar o NCLEclipse, assim você vivencia mais o código e aprende mais NCL. Além de ter uma validador para seu código NCL, pelo que pude ver tem vários errinhos de programação, por exemplo: você define o conector: <link id="lVideo1Titulo1Start" xconnector="connectors#onBeginNStartN">, onde a base de conectores não relaciona nenhuma base com id connectors. Fica uma dica o uso do NCLEclipse, pelo menos para fazer a validação do código.
Grato .
AVPlayer::play() can't play, provider is NULL
ComponentManager::getComponent opening component 'libginganclimgpadapter.so'
ComponentManager::getComponent component 'libginganclimgpadapter.so' OPENED
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao3.gif'
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao1.gif'
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao5.gif'
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao2.gif'
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao6.gif'
ImagePlayer trying to find '/misc/ncl30/Tela1Teste/media/opcao4.gif'
(*) Direct/Interface: Using 'GIF' implementation of 'IDirectFBImageProvider'.
ComponentManager::getComponent opening component 'libgingancllkspadapter.so'
ComponentManager::getComponent component 'libgingancllkspadapter.so' OPENED
ComponentManager::getComponent opening component 'libgingaccplalks.so'
ComponentManager::getComponent component 'libgingaccplalks.so' OPENED
AVPlayer::play() can't play, provider is NULL Descobri o Erro : A pasta esta com nome /midia e quandona verdade no programa faço referencia a pasta /media . Erro corrigido arquivo de video funcionando e os outros tb.. Vlww Ai pela ajuda.