Você está na página 1de 71

Programando para o Ginga-NCL

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Programando em NCL Modelo Conceitual

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

Entidades Bsicas

O qu? como?

objetos de mdia propriedades


onde? propriedades

quando?

relacionamentos e relaes
Copy right 2006 Tele M dia 3

T V interat iv a se faz com Ginga

O qu? Objetos de Mdia

udio vdeo

imagem

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

Estrutura: contextos

body ctx1 udio1 vdeo1 abertura imagem1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Como acessar um objeto de mdia num contexto? (Como entrar/sair de um contexto?)


ctx1 pVideo1

O vdeo video1 do contexto ctx1 acessvel atravs da porta pVideo1

udio1 vdeo1

audio1 e imagem1
s so acessveis dentro do contexto ctx1

imagem1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

Onde?

rgV ideo1

Regies em um dispositivo especfico

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Como?

dV ideo1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

video1

dV ideo1

rgV ideo1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

Quando? Elos e Conectores

video1

audio1

Quando video1 terminar, inicia audio1 Quando audio1 iniciar, inicia imagem1 elo

image1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

10

Copyright Laboratrio TeleM dia, 2006

Quando? Elos e Conectores


onEnd A Star t

video1

audio1

Quando video1 terminar, inicia audio1 Quando audio1 iniciar, inicia imagem1

C onBeginStart

elo conector

C A

papel de condio papel de ao

imagem1

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

11

Programando em NCL A Linguagem

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

12

Copyright Laboratrio TeleM dia, 2006

Estrutura de um documento NCL Perfil TV digital


<?xml v ersion="1.0" encoding="ISO-8859-1"?> <ncl id="ex emplo00" xmlns="http://w w w .ncl.org.br/NCL3.0/EDTVProfile"> <head> </head> <body >

cabealho do documento corpo do documento

</body > </ncl>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

13

Planejando uma aplicao NCL


vises
storyboard estrutural leiaute temporal

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

14

Copyright Laboratrio TeleM dia, 2006

Exemplo 0 Storyboard

Copy right 2006 Tele M dia

Exemplo 0 Viso Estrutural

animao udio

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 16

Copyright Laboratrio TeleM dia, 2006

Exemplo 0 Viso de Leiaute

screenReg (100% x 100%)

5%

6.7%

screenReg (100% x 100%)

frameReg

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

17

Exemplo 0 Viso Temporal

animao choro drible


1 1 animao @ screenReg + choro 2 2 3 3 4 4 foto @ frameReg + animao @...+ choro

foto
5 5

drible @ frameReg + animao @... + choro

animao @... + choro

animao @... + choro

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

18

Copyright Laboratrio TeleM dia, 2006

Exemple 0 Viso Estrutural

onBegin onBegin

onBegin onEnd

Start Stop

Start
animation audio

Start

drible photo
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 19

Ambientes
Usurios (Telespectadores) Execuo

Prov edores de Serv ios de Telecomunicao

Exhibition Tools

Armazenamento
Controle de Verso Adaptation Suporte a trabalho cooperativo Provedores de contedo

Formatter

Dispositivos

Autoria
A mb ien te Gr fico

Edio Grfica

Usurios (Autores)

Edio Textual

<xml> <tag> content... </tag> </xml>

Provedores de Aplicao

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

20

Copyright Laboratrio TeleM dia, 2006

10

Composer

21

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

21

NCL Eclipse

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

22

Copyright Laboratrio TeleM dia, 2006

11

Set-top Box Virtual Ginga-NCL

23

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

23

Linguagem de Marcao XML


TAG ou Elemento XML (<tag>...</tag> OU <tag />):
<media id= v ideo1 descriptor= dVideoWholeScreen> ... </media> <media id= v ideo1 descriptor= dVideoWholeScreen/>

Atributo (formato: atributo=v alor)


id descriptor

Valor de atributo (entre aspas )


v ideo1 dVideoWhole Screen
julho /2008

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

24

Copyright Laboratrio TeleM dia, 2006

12

Construindo uma aplicao NCL


<?xml v ersion="1.0" encoding="ISO-8859-1"?> <ncl id="exemplo00" xmlns="http://w w w .ncl.org.br/NCL3.0/ EDTVProfile"> <head> </head> <body > </body > </ncl>
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 25

cabealho do documento

corpo do documento

Exemplo 0 Viso Estrutural

animao udio

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 26

Copyright Laboratrio TeleM dia, 2006

13

Exemplo 0
<body > <media id=" animat io n" src= ../media/animGar.mo v >

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

27

Esquema
file: http:

Parte especfica do esquema


///file_path/#fragment_identifier //server_identifier/file_path/#fragment_identifier

Uso
Para arquivos locais Para arquivos remotos buscados pelo canal de interatividade usando o protocolo http Para arquivos remotos buscados pelo canal de interatividade usando o protocolo https Para fluxos (streams) obtidos pelo canal de interatividade usando o protocolo rtsp Para fluxos (streams) obtidos pelo canal de interatividade usando o protocolo rtp Para um fluxo de contedo idntico a um que esteja em apresentao por um outro elemento de mdia

https:

//server_identifier/file_path/#fragment_identifier

rtsp:

//server_identifier/file_path/#fragment_identifier

rtp:

//server_identifier/file_path/#fragment_identifier

ncl-mirror:

//media_element_identifier

sbtvd-ts:

//program_number.component_tag

Para fluxos elementares recebidos pelo fluxo de transporte (TS)

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

28

Copyright Laboratrio TeleM dia, 2006

14

Exemplo 0
<body > <media id=" animat io n" src= ../media/animGar.mo v > <area id=" segDrible" begin= 12s" /> <area id=" segPho t o " begin= 41s"/> <pro pert y name=" w idt h" value= 100%"/> <pro pert y name=" heigt h" v alue= 100%"/> </media>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

29

Exemplo 0
<body > <media id=" animat io n" src= ../media/animGar.mo v > <area id=" segDrible" begin= 12s" /> <area id=" segPho t o " begin= 41s"/> <pro pert y name=" w idt h" value= 100%"/> <pro pert y name=" heigt h" v alue= 100%"/> <pro pert y name=" zIndex " v alue=" 2"/> </media> <media id=" cho ro " src=" ../media/cho ro .mp3" /> <media id=" drible" src=" ../media/drible.mp4" > <pro pert y name=" left " value= 5%"/> <pro pert y name=" t o p" value= 6.7%" /> <pro pert y name=" w idt h" value= 18.5%" /> <pro pert y name=" heigt h" v alue= 18.5%"/> <pro pert y name=" zIndex " v alue=" 3"/> </media>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

30

Copyright Laboratrio TeleM dia, 2006

15

Exemplo 0
<media id=" pho t o " src=" ../media/pho t o .png > <pro pert y name=" left " value= 5%"/> <pro pert y name=" t o p" value= 6.7%" /> <pro pert y name=" w idt h" value= 18.5%" /> <pro pert y name=" heigt h" v alue= 18.5%"/> <pro pert y name=" zIndex " v alue=" 3"/> <pro pert y name=" ex plicit Dur" v alue="5s"/> </media>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

31

Exemplo 0 Contexto body e port


<body > <port id= entry " component= animation" /> ... </body >

body

entry

animation

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

32

Copyright Laboratrio TeleM dia, 2006

16

Exemplo 0
<body > <po rt id=" ent ry " co mpo nent = animat io n" /> <media id=" animat io n" src= ../media/animGar.mo v > <area id=" segDrible" begin= 12s" /> <area id=" segPho t o " begin= 41s"/> <pro pert y name=" w idt h" value= 100%"/> <pro pert y name=" heigt h" v alue= 100%"/> <pro pert y name=" zIndex " v alue=" 2"/> </media> <media id=" cho ro " src=" ../media/cho ro .mp3" /> <media id=" drible" src=" ../media/drible.mp4" > <pro pert y name=" left " value= 5%"/> <pro pert y name=" t o p" value= 6.7%" /> <pro pert y name=" w idt h" value= 18.5%" /> <pro pert y name=" heigt h" v alue= 18.5%"/> <pro pert y name=" zIndex " v alue=" 3"/> </media>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

33

Exemplo 0 Viso Estrutural

onBegin

Start
animao udio

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 34

Copyright Laboratrio TeleM dia, 2006

17

Relacionamento entre Objetos

animation

?
Copy right 2006 Tele M dia

drible

T V interat iv a se faz com Ginga

35

Connector onBeginStart
...inicia a exibio da ncora ligada ao papel start.
st art

animation
onBegin bind

connector onBeginStart A

bind

drible
Quando iniciar a exibio da ncora ligada ao papel onBeg in...

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

36

Copyright Laboratrio TeleM dia, 2006

18

Connector onBeginStart
<causalConnector id="onBeginStart"> <simpleCondition role="onBegin"/> <simpleAction role="start" max="unbounded" </causalConnector>
drible

qualifier="par"/>

Elo que utiliza o conector onBeginStart: Iniciando o vdeo drible


<link xconnect or= onBeginStart">
<bind ro le=" o nBegin co mpo nent = animat io n" int erface= segDrible/> <bind role=" st art component = drible" />

animat ion connector onBeginStart C


o nBegin

A
st art

</link>

na seo body

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

37

Exemplo 0 Viso Estrutural

onBegin onBegin

Start
animao udio

Start

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 38

Copyright Laboratrio TeleM dia, 2006

19

Connector onBeginStart
<causalConnector id="onBeginStart"> <simpleCondition role="onBegin"/> <simpleAction role="start" max="unbounded" </causalConnector>
phot o

qualifier="par" />

Elo que utiliza o conector onBeginStart: Iniciando a imagem da foto


<link xconnect or= onBeginStart">

animat ion connector onBeginStart C


o nBegin

<bind ro le=" o nBegin co mpo nent = animat io n" int erface= segPho t o /> <bind role=" st art component = phot o" />

A
st art

</link>

na seo body

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

39

Exemplo 0 Viso Estrutural

onBegin onBegin

onBegin

Start

Start
animao udio

Start

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 40

Copyright Laboratrio TeleM dia, 2006

20

Connector onBeginStart
<causalConnector id="onBeginStartDelay"> <connectorParam name=xyz"/> <simpleCondition role="onBegin"/> <simpleAction role="start" delay="$xyz" max="unbounded" qualifier="par"/> </causalConnector>
choro

Elo que utiliza o conector onBeginStart: Iniciando o udio choro


<link xconnect or= onBeginStartDelay">
<bind ro le=" o nBegin co mpo nent = animat io n" /> <bind role=" st art component = choro" >

animat ion connector onBeginStart Delay

C
o nBegin

A
st art

<bindParam name=xyz" value="5s"/>


</bind>

</link>

na seo body
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 41

Mquina de Estado de Evento

paused
stop | abort pause start start | resume

sleeping

stop (natural end) abort

occurring

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

21

Eventos de Apresentao
start onBegin stop onEnd pause resume

Exibidor onPause NCL


onResume

Exibidor De Mdia

abort onAbort onEnd Fim natural

Eventos de Atribuio
start/set onBeginAttribution stop onEndAttribution pause resume

Exibidor onPauseAttribution NCL


onResumeAttribution

Exibidor De Mdia

abort onAbortAttribution onEndAttribution Natural end

Copyright Laboratrio TeleM dia, 2006

22

Eventos de Seleo
start onBeginSelection stop onEndSelection / onSelection pause resume

Exibidor onPauseSelection NCL


onResumeSelection

Exibidor De Mdia

abort onAbortSelection

Eventos de Seleo
start onBeginSelection stop onEndSelection / onSelection

NCL Player

Media Player

Copyright Laboratrio TeleM dia, 2006

23

Exemplo 0 Viso Estrutural

onBegin onBegin

onBegin onEnd

Start Stop

Start
animao udio

Start

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 47

Connector onEndStop
<causalConnector id="onEndStop"> <simpleCondition role="onEnd"/> <simpleAction role="stop" max="unbounded" </causalConnector>
choro

qualifier="par" />

Elo que utiliza o conector onBeginStart: T erminando o udio choro


<link xconnect or= onEndStop">
<bind ro le=" o nEnd co mpo nent = animat io n" /> <bind role=" st op component = choro" />

animat ion connector onEndStop C


o nEnd

A
st o p

</link>

na seo body

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

48

Copyright Laboratrio TeleM dia, 2006

24

Exemplo 0
<link id=" lM usic" xconnect or=" onBeginS t art " > <bind role=" onBegin" component = animat ion" /> <bind role=" st art " component =" choro" > <bindParam name= xy z v alue= 5s /> </bind> </link> <link id=" lDrible" xconnect or=" onBeginS t art " > <bind role=" onBegin" component =" animat ion" int erface=" segDrible" /> <bind role=" st art " component =" drible" /> </link> <link id=" lPhot o" xconnect or=" onBeginS t art " > <bind role=" onBegin" component =" animat ion" int erface=" segPhot o" /> <bind role=" st art " component =" phot o" /> </link> <link id=" lEnd" xconnect or=" onEndS t op" > <bind role=" onEnd" component =" animat ion" /> <bind role=" st op" component =" choro" /> </link> </ body > </ nc l>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

49

Exemplo 1 Viso Estrutural

onBegin onBegin

onBegin onEnd

Start Stop

Start
animao udio

Start

drible foto
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 50

Copyright Laboratrio TeleM dia, 2006

25

Entidades Bsica

o qu? como?

objetos de mdia propriedades ou descritores


onde? propriedades ou regies

quando?

relacionamentos e relaes
Copy right 2006 Tele M dia 51

T V interat iv a se faz com Ginga

<head> <regionBase> ... </regionBase> <descript orBase> ... </descript orBase> <connect orBase> ... </connect orBase> </head>

cabealho
regions - onde

descriptors - como

d1 d2 d3
E onEnd S Start onEnd E Start S onEnd E Start S

connectors - quando

<body > <port id=" pInicio" component =" video1" /> <!-- cont ext and media object s --> <!-- elos --> </body >
T V interat iv a se faz com Ginga

corpo
context e media o qu links - quando

2
au dio1 v ideo1 image1

Copy right 2006 Tele M dia

52

Copyright Laboratrio TeleM dia, 2006

26

Regions
<regionBase> <region id="screenReg" height=100%" width=100%" zIndex="2"> <region id="frameReg" left=5%" top=6.7%" height=18.5%" width="160 zIndex=3"/> </region> </regionBase>
5%

6.7%

screenReg frameReg

(100% x 100%)
T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 53

Descriptors

(how?)

em que regio um objeto ser apresentado


<descriptor id="photoDesc" region="f rameReg" explicitDur="5s"/>

por quanto tempo um objeto ser apresentado


<descriptor id="photoDesc" region="frameReg" explicitDur="5s"/>

Co mo um objeto inicialmente apresentado


p.ex. v olume do udio (soundLev el), borda de ums mdia textual (border)
<descriptor id= audioDesc" > <descriptorParam name="soundLevel" value="70%" /> </descriptor>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

54

Copyright Laboratrio TeleM dia, 2006

27

Exemplo 1 Descriptors
<descriptorBase> <descriptor id="screenDesc" region="screenReg"/> <descriptor id="photoDesc" region="f rameReg" explicitDur="5s"/> <descriptor id="audioDesc"/> <descriptor id="dribleDesc" region="f rameReg"/> </descriptorBase>

screenDesc

screenReg

phot oDesc frameReg dribleDesc

audioDesc

audioReg

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

55

<?x ml v ersio n=" 1.0" enco ding=" ISO- 8859- 1" ?> <! - - Ex emplo de sincro nismo sem a int eracao do usuario - - > <ncl id=" sy nc" xmlns=" http://www.ncl.o rg.br/NCL3.0/EDTVPro file" > <head> <regio nBase> <regio n id= screenReg" height = 100%" width= 100%" zIndex =" 1"> <regio n id=" frameReg" left = 5%" top= 6.7%" height = 18.5%" width=" 18.5%" zIndex = 3" /> </regio n> </regio nBase> <descript o rBase> <descript o r id=" screenDesc" regio n=" screenReg" /> <descript o r id=" pho t o Desc" regio n=" frameReg" ex plicit Dur=" 5s"/> <descript o r id=" audio Desc" /> <descript o r id=" dribleDesc" regio n=" frameReg" /> </descript o rBase> <co nnect o rBase> <impo rt Base do cument URI=" causalCo nnBase.ncl" alias=" co nEx " /> </co nnect o rBase> </head>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

56

Copyright Laboratrio TeleM dia, 2006

28

Exemplo 1
<body > <po rt id=" ent ry " co mpo nent = animat io n" /> <media id=" animat io n" src= ../media/animGar.mo v " descript o r=" screenDesc" > <area id=" segDrible" begin= 12s" /> <area id=" segPho t o " begin= 41s"/> </media> <media id=" cho ro " src= ../media/cho ro .mp3" descript o r=" audio Desc" /> <media id=" drible" src= ../media/drible.mp4" descript o r=" dribleDesc" /> <media id=" pho t o " src= ../media/pho t o .png" descript or=" pho toDesc"/>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

57

<?x ml v ersio n=" 1.0" enco ding=" ISO- 8859- 1" ?> <! - - Ex emplo de base de co nect o res - - > <ncl id= causalCo nnBase" x mlns=" ht tp://www.ncl.o rg.br/NCL3.0/causalCo nnect o rPro file" > <head> <co nnect o rBase> <causalCo nnect o r id=" o nBeginSt art Delay " > <co nnect o rParam name=" delay " /> <simpleCo ndit io n ro le=" o nBegin" /> <simpleAct io n ro le=" st art " delay ="$delay " max =" unbo unded" qualifier=" par" /> </causalCo nnect o r> <causalCo nnect o r id=" o nBeginSt art " > <simpleCo ndit io n ro le=" o nBegin" /> <simpleAct io n ro le=" st art " max =" unbo unded" qualifier=" par" /> </causalCo nnect o r> <causalCo nnect o r id=" o nEndSt o p" > <simpleCo ndit io n ro le=" o nEnd" /> <simpleAct io n ro le=" st op" max =" unbo unded" qualifier=" par" /> </causalCo nnect o r> </co nnect o rBase> </head>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

58

Copyright Laboratrio TeleM dia, 2006

29

<?x ml v ersio n=" 1.0" enco ding=" ISO- 8859- 1" ?> <! - - Ex emplo de sincro nismo sem a int eracao do usuario - - > <ncl id=" sy nc" xmlns=" http://www.ncl.o rg.br/NCL3.0/EDTVPro file" > <head> <regio nBase> <regio n id= screenReg" height = 100%" width= 100%" zIndex =" 1"> <regio n id=" frameReg" left = 5%" top= 6.7%" height = 18.5%" width=" 18.5%" zIndex = 3" /> </regio n> </regio nBase> <descript o rBase> <descript o r id=" screenDesc" regio n=" screenReg" /> <descript o r id=" pho t o Desc" regio n=" frameReg" ex plicit Dur=" 5s"/> <descript o r id=" audio Desc" /> <descript o r id=" dribleDesc" regio n=" frameReg" /> </descript o rBase> <co nnect o rBase> <impo rt Base do cument URI=" causalCo nnBase.ncl" alias=" co nEx " /> </co nnect o rBase> </head>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

59

Exemplo 1
<link id=" lM usic" xconnect or=" conEx#on Be ginS t art " > <bind role=" onBegin" component = animat ion" /> <bind role=" st art " component =" choro" > <bindParam name= xy z v alue= 5s /> </bind> </link> <link id=" lDrible" xconnect or=" con E x#on BeginS t art " > <bind role=" onBegin" component =" animat ion" int erface=" segDrible" /> <bind role=" st art " component =" drible" /> </link> <link id=" lPhot o" xconnect or=" conE x#on BeginS t a rt " > <bind role=" onBegin" component =" animat ion" int erface=" segPhot o" /> <bind role=" st art " component =" phot o" /> </link> <link id=" lEnd" xconnect or=" conE x#o nEndS t op" > <bind role=" onEnd" component =" animat ion" /> <bind role=" st op" component =" choro" /> </link> </ body > </ nc l>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

60

Copyright Laboratrio TeleM dia, 2006

30

Exemplo 0 e 1 Storyboard

Copy right 2006 Tele M dia

61

Exemplo 2 Storyboard

Copy right 2006 Tele M dia

62

Copyright Laboratrio TeleM dia, 2006

31

Exemplo 2

onBegin onBegin onBegin onBegin onEnd Start Set size Set size Stop Start Stop

Start

Start

Start

onSelection Stop onEnd Start

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

63

Conector onKeySelectionStopSetStart
<causalC onnector id="onKeySelectionStopSetStart"> <connectorP aram name="varSet"/> <connectorP aram name="keyCode"/> <simpleC ondition role="onSelection" key="$keyCode"/> <compoundA ction operator="seq"> <simpleA ction role="stop" max="unbounded" qualifier="par"/> <simpleA ction role="set" value="$varSet"/> <simpleA ction role="start" max="unbounded" qualifier="par"/> </compoundA ction> </causalC onnector>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

64

Copyright Laboratrio TeleM dia, 2006

32

Exemplo 3

onBegin onBegin onBegin onBegin Stop Stop onEnd Start Start

Start

Start

Start

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

65

Exemplo 0 Contexto body e port


<body > <port id= entry " component= animation" /> ... </body >

body

entry

animation

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

66

Copyright Laboratrio TeleM dia, 2006

33

port
define a v isibilidade externa dos elementos de um contexto formato:
<port id="id_da_porta" component="id_of_the_mapped_component" interface="component_interface" /> body pInicio video1

interface
uma porta de um outro contexto ou uma ncora de um n de contedo

exemplos:
<port id="pInicio1" component="video1" /> <port id="pInicio3" component="video1" interface="aCena2" /> <port id="pInicio2" component="ctxCapitulo1"
julho /2008

interface="pS ecao3 />

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

67

Example 3 Context port


<context> <port id= pIcon" component= icon" /> ... </context>

context

pIcon

icon

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

68

Copyright Laboratrio TeleM dia, 2006

34

Exemplo 3

onBegin onBegin onBegin onBegin Set size Set size Stop Stop onEnd Start Start

Start

Start

onSelection Start onSelection Stop Start onEnd

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

69

Exemplo 3/4 Storyboard

Copy right 2006 Tele M dia

70

Copyright Laboratrio TeleM dia, 2006

35

Exemplo 5 Storyboard

Copy right 2006 Tele M dia

71

Exemplo 5

onBegin onBegin

onBegin onEnd

Start Stop

Start

Stop

Start

Start

Start

onBegin onSelection Stop

Set Set size size onEnd Start

Start onEnd

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

72

Copyright Laboratrio TeleM dia, 2006

36

Exemplo 6

onBegin onBegin onBegin onEnd Stop Stop Start Start

Start

Start

Start

onBegin onSelection Stop

Set Set size size

Start onEnd Start

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

73

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

74

Copyright Laboratrio TeleM dia, 2006

37

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

75

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

76

Copyright Laboratrio TeleM dia, 2006

38

Exemplo 7

onBegin onBegin

onBegin Start onEnd Stop

Start

Stop

Start

Start

Contexto de Propaganda

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

77

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

78

Copyright Laboratrio TeleM dia, 2006

39

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

79

Exemplo 8

onBegin onBegin

onBegin onEnd

Start Stop

Start

Stop

Start

Start Set position

Contexto de Propaganda

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

80

Copyright Laboratrio TeleM dia, 2006

40

Exemplo 9 Storyboard

Copy right 2006 Tele M dia

81

Exemplo 9 Storyboard

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

82

Copyright Laboratrio TeleM dia, 2006

41

Exemplo 9
onBegin onBegin onBegin onEnd Stop Set position I = on Start onBegin onSelection Stop Start onEnd Start Stop Stop Start

Start

Start

Start

Stop Set Ion onBegin Set Set size size Set Ion onSelection Start Set Ioff Start onSelection Stop Start

Contexto de P ropaganda

Contexto de Interatividade

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

83

Conector onBeginVarStart
<causalC onnector id="onBeginVarS tart"> <compoundC ondition operator="and"> <simpleC ondition role="onBegin"/> <assessmentS tatement comparator="eq"> <attributeA ssessment role="var" attributeType="nodeProperty" ev entType="attribution"/> <v alueAssessment value="true"/> </assessmentS tatement> </compoundC ondition> <simpleA ction role="start"/> </causalC onnector>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

84

Copyright Laboratrio TeleM dia, 2006

42

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

85

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

86

Copyright Laboratrio TeleM dia, 2006

43

Exemplo 10
onBegin onBegin onEnd Start Start Set position Stop Start onEnd onBegin Stop Start

Stop Contexto de Interatividade onSelection

Set vol.
chorinho

Set vol. Start

onSelection currentFocus = ?

Stop Contexto de Propaganda Stop


rock techno cartoon

Copy right 2006 Tele M dia

Conector onOrSelectionSetStopStart
<causalC onnector id="onOrSelectionSetStopStart"> <connectorP aram name="var"/> <simpleC ondition role="onSelection" qualifier="or" max="unbounded"/> <compoundA ction operator="seq"> <simpleA ction role="set" value="$var" max="unbounded" qualifier="par"/> <simpleA ction role="stop"/> <simpleA ction role="start"/> </compoundA ction> </causalC onnector>

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

88

Copyright Laboratrio TeleM dia, 2006

44

Fluxo TS

Fluxo de Mdia Contnua

Copyright Laboratrio TeleM dia, 2006

45

Algumas alternativas em 6 MHz

SDTV 1 SDTV 2 SDTV 3


Data Data n SDTV
4
LDTV

HDTV 1

HDTV 1

Data SDTV 16

19,3 Mbps

MPEG-2 System

Component_tag Program_number

Copy r ight 2006 T ele M dia

Copyright Laboratrio TeleM dia, 2006

46

Streaming

Como um contedo pode ser localizado?


programNumber? componentTag? O que mais?

Streaming

Como um contedo pode ser localizado?


programNumber componentTag contentId Como obter o contentId?

Copyright Laboratrio TeleM dia, 2006

47

NPT

contentId = x contentId = y

contentId = x

Synchronism
Controle do NPT Controle da aplicao

Applications object Applications object Applications Applications obejct object

NPT de partida

Copyright Laboratrio TeleM dia, 2006

48

Objetos NCLua Embutidos

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

97

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

49

NCL
java

onBegin Start Start onBegin onEnd Stop Stop Start

Start

onBegin onSelection Stop

Set Set size size

Start onEnd Start

Interfaces

<area id=a1 label=funo interna>

<property name= fun o interna v alue =parametro>

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

50

Mquina de Estado de Evento

paused
stop | abort pause start start | resume

sleeping

stop (natural end) abort

occurring

Copy right 2006 Tele M dia

NCLua
local counter = 0 local dx, dy = canvas:attrSize() -- dimensoes do canvas function handler (evt) if evt.class =='ncl' and evt.type=='attribution' and evt.action== 'start ' and evt.name=='add' then if evt.value ~= 'FIM' then counter = counter + evt.value else canvas:attrColor ('black') canvas:drawRect('fill',0,0,dx,dy) canvas:attrColor ('yellow') canvas:attrFont ('vera', 24, 'bold') canvas:drawText (10,10, 'O nmero de vezes que voc trocou de ritmo foi: '..counter) canvas:flush() end event.post { class = 'ncl', type = 'attribution', name = 'add', action = 'stop', value = counter, } end end event.register(handler)

Copyright Laboratrio TeleM dia, 2006

51

Exemplo 11
onBegin onBegin onEnd Start Start Set position Set Stop Start onEnd onBegin Stop Start

Set counter Set counter onSelection Set vol.


chorinho

Stop Contexto de Interatividade

Set vol. Start

onSelection currentFocus = ?

Stop Contexto de Propaganda Stop


rock techno cartoon

Copy right 2006 Tele M dia

Objetos de Mdia NCL Embutidos

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

104

Copyright Laboratrio TeleM dia, 2006

52

NCL
java

onBegin Start Start onBegin onEnd Stop Stop Start

Start

onBegin onSelection Stop

Set Set size size

Start onEnd Start

Copy right 2006 Tele M dia

106

Copyright Laboratrio TeleM dia, 2006

53

Copy right 2006 Tele M dia

107

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

108

Copyright Laboratrio TeleM dia, 2006

54

Copy right 2006 Tele M dia

109

Copy right 2006 Tele M dia

110

Copyright Laboratrio TeleM dia, 2006

55

Copy right 2006 Tele M dia

111

Copy right 2006 Tele M dia

112

Copyright Laboratrio TeleM dia, 2006

56

Exemplo

onBegin onBegin onBegin onBegin onEnd Start Stop

Start Start

Copy right 2006 Tele M dia

Exemplos 12, 13, 14

Stop Start Stop

Start

Start onSelection

Copy right 2006 Tele M dia

114

Copyright Laboratrio TeleM dia, 2006

57

Exemplo 12, 13

onBegin onBegin onBegin Stop Start Start Stop Start Start onSelection Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

115

Objeto de Mdia NCL Embutido

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

116

Copyright Laboratrio TeleM dia, 2006

58

Interfaces

<area id=a1 label=porta interna do body>

<property name= porta interna do body>

Copy right 2006 Tele M dia

117

Exemplo 14

onBegin onBegin onBegin Stop Start Start Stop Start Start onSelection Stop Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

118

Copyright Laboratrio TeleM dia, 2006

59

Mltiplos Dispositivos de Exibio

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

119

java

onBegin Start Start onBegin onEnd Stop Stop Start

Start

onBegin onSelection Stop

Set Set size size

Start onEnd Start


Smil

TV interactiva se hace con Ginga

Copyright Laboratrio TeleM dia, 2006

60

Exemplo 15

onBegin onBegin onBegin Stop Start Start Stop Start Start Start onSelection Stop Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

61

Copyright Laboratrio TeleM dia, 2006

62

Exemplo 16

onBegin onBegin onBegin Stop Start Start Start Stop Start Start onSelection Stop Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

63

Exemplo 17

onBegin onBegin onBegin Stop Start Start Start Stop Start Start onSelection Stop Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Exemplos 18, 19 e 20

Stop Start Stop

Start

Start onSelection

Copy right 2006 Tele M dia

128

Copyright Laboratrio TeleM dia, 2006

64

Copy right 2006 Tele M dia

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

65

Copy right 2006 Tele M dia

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

66

Exemplo 18

onBegin onBegin onBegin Stop Start Start Start Stop Start Start onSelection Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

67

Exemplo 19

onBegin onBegin onBegin Stop Start Start Start Stop Start Start onSelection Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Copyright Laboratrio TeleM dia, 2006

68

Exemplo 20

onBegin onBegin onBegin Stop Start Start Start Stop Start Start onSelection Stop Start Start onBegin onEnd Start Stop

Copy right 2006 Tele M dia

Gerao do Fluxo TS

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

138

Copyright Laboratrio TeleM dia, 2006

69

Gerao do Fluxo TS
1) Codificao udio/vdeo:
V deo: H.264 HP L4.0 udio: HE AAC Ferrament a: TM PGEnc 4.0 X Press

2)

Encapsulamento Fluxo de Transporte CBR


Taxa CBR dev er ser 5% maior que a soma das t axas do udio e v deo. Caso queira adicionar out ros dados (como no nosso caso), dev e-se aument ar a t axa. Para o serv io Full-seg, ut ilizamos no nosso play out uma t axa de 15000000 bps. Ferrament a: Elecard X M uxer Pro

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

139

Gerao de Fluxo TS
1. Agregar Fluxos para Interativ idade
NPT Ferrament a: No exist e no mundo, apenas por hardw are. Implement ao do TeleM idia ser disponibilizada Gerao do Carrossel Ferrament a: dsmcc-mhp-t ools e/ou opencast er (codigo abert o)

M uxer S ubst it uir os pacot es nulos gerados pelo elecard. Ferrament a: ht t p://w w w.scara.com/~schirmer/o/ mp lex13818/ (cdigo abert o)

2. Upload para o play out

T V interat iv a se faz com Ginga

Copy right 2006 Tele M dia

140

Copyright Laboratrio TeleM dia, 2006

70

http://w w w.ncl.org.br http://w w w.ginga.org.br http://w w w.softwarepublico.gov.br http://w w w.telemidia.puc-rio.br


T V interat iv a se faz com Ginga Copy right 2006 Tele M dia 141

Copyright Laboratrio TeleM dia, 2006

71

Você também pode gostar