Linux pipes
Tasos Laskos
tasos.laskos at gmail.com
Tue Sep 23 22:54:35 EEST 2008
Giorgos Keramidas wrote:
> On Tue, 23 Sep 2008 18:56:28 +0300, Tasos Laskos <tasos.laskos at gmail.com> wrote:
>> Kalispera sti lista,
>>
>> Exo mia aporia/provlima me linux pipes.
>> Exo grapsei ena programma to opoio katevazei video kai to stelnei sto
>> stdin tou Kaffeine player.
>>
>> Px:
>> ----------------
>> vget --stdout http://www.veoh.com/videos/v6272417ktA6zTWy | kaffeine
>> stdin://
>> ----------------
>>
>> Exo paratirisei omos pos otan patao pause sto Kaffeine to programma
>> kanei episis pause.
>> Stamataei akoma kai na katevazei to video, vlepo apo network monitor pos
>> i taxitita peftei sto 0kBps.
>>
>> To idio ginete kai sto vlc.
>>
>> Kai i8ela na rotiso, ayto ofeilete sto pipe?
>> 8a voleve poly otan pataei o xristis pause sto player tou to progama mou
>> na synexisei na stelnei data
>> sto pipe oste o player na to vazei sto buffer tou.
>>
>> Exei kaneis kapoia idea i kapoio link pou na eksigei ti ginete?
>
> Ναι, αυτό που φαντάστηκες γίνεται. Υπάρχει ένα είδος `flow control' στα
> UNIX pipes. Υπάρχει ένας ενδιάμεσος (συνήθως κυκλικός) buffer, που όταν
> γεμίσει μπλοκάρει τα writes του pipe-writer, μέχρι να αδειάσει λίγο χώρο
> ο reader.
>
> Δε μπορείς (εύκολα) να κάνεις το pipe-writer να γράψει άπειρα δεδομένα,
> αλλά μπορείς να στείλεις το vget output σε temporary file.
>
To vget arxika egrafe mono se file, to "--stdout" flag proste8ike meta
gia na ginei ayto to..as to po.. video streaming emulation.
Gia na mi xreiazete o xristis na perimenei na katevei olokliro to file
gia na dei to video.
Prospa8isa me "cat" kai pipe kai fd redirections ktl alla de ta
katafera, opote eipa na to kano The Proper Way(tm).
Mporeis na mou doseis ena paradeigma gia to pos 8a leitourgouse
xrisimopoiontas ena temp file
gia na to exo os enallaktiki gia xristes me low-bandwidth?
More information about the Linux-greek-users
mailing list