<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Anyway if anyone know a way or library please tell me.<br></div>
<div> </div>
<div id="sig12586409"><div class="signature">Ara<br></div>
</div>
<div> </div>
<div> </div>
<div>On Fri, Mar 6, 2015, at 08:12 AM, Philippe Lévi wrote:<br></div>
<blockquote type="cite"><div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;"><p style="margin-bottom: 0px; margin-top: 0px;">xwininfo ... linux ! ...<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">I need a solution for windows ...<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">I tried<br></p><p style="margin-bottom: 0px; margin-top: 0px;">whndl := WindowFromDC(wglGetCurrentDC())<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br>
but MPLAYER does not seem to like it, either in decimal format or hex format ...</p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">and I do not know how to check if I get the resquested value  ... the handle of the window launched by glutCreateWindow ...<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><div style="color: rgb(33, 33, 33);"><div><hr tabindex="-1" style="display:inline-block; width:98%"><br></div>
<div dir="ltr"><div><span style="color:rgb(0, 0, 0)" class="colour"><span style="font-family:Calibri," sans-serif"" class="font"><span style="font-size:11pt" class="size"><b>De:</b> aradeonas <aradeonas@operamail.com></span></span></span><br></div>
<div><span style="color:rgb(0, 0, 0)" class="colour"><span style="font-family:Calibri," sans-serif"" class="font"><span style="font-size:11pt" class="size"> <b>Enviado:</b> sexta-feira, 6 de março de 2015 12:58</span></span></span><br></div>
<div><span style="color:rgb(0, 0, 0)" class="colour"><span style="font-family:Calibri," sans-serif"" class="font"><span style="font-size:11pt" class="size"> <b>Para:</b> lazarus@lists.lazarus.freepascal.org<br> <b>Assunto:</b> Re: [Lazarus] Play video from memory</span></span></span></div>
<div> </div>
</div>
<div><div>Leonardo,<br></div>
<div> </div>
<div>Im not familiar with Mplayer but take a look at here:<br></div>
<div><a defang_rel="noreferrer" href="http://wiki.freepascal.org/TMPlayerControl">http://wiki.freepascal.org/TMPlayerControl</a><br></div>
<div>And in MPlayerCtrl unit line 665 it just pass handle.<br></div>
<div> </div>
<div>Do you have opinion about how to pass memory stream?<br></div>
<div> </div>
<div>Regards,<br></div>
<div>Ara<br></div>
<div> </div>
<div>On Fri, Mar 6, 2015, at 07:41 AM, Leonardo M. Ramé wrote:<br></div>
<div>> To embed mplayer into a window you must know its ID. Window IDs have a<br></div>
<div>> relation with the WindowHandle, but that value must be somehow<br></div>
<div>> "translated" to be understood by X11 (or Windows). I don't know how to<br></div>
<div>> translate it :(.<br></div>
<div>><br></div>
<div>> For example, If I use Format('%x', [Self.WindowHandle]) I get the Hex<br></div>
<div>> value BB5380, then, using the wininfo tool I can get the ID. Just run<br></div>
<div>> xwininfo and click on the window you want to embed mplayer into.<br></div>
<div>><br></div>
<div>> In my example I got:<br></div>
<div>><br></div>
<div>> xwininfo: Window id: 0x2800048 "BB5380"<br></div>
<div>><br></div>
<div>> Absolute upper-left X: 662<br></div>
<div>> Absolute upper-left Y: 270<br></div>
<div>> Relative upper-left X: 1<br></div>
<div>> Relative upper-left Y: 24<br></div>
<div>> Width: 320<br></div>
<div>> Height: 240<br></div>
<div>> Depth: 24<br></div>
<div>> Visual: 0x20<br></div>
<div>> Visual Class: TrueColor<br></div>
<div>> Border width: 0<br></div>
<div>> Class: InputOutput<br></div>
<div>> Colormap: 0x22 (installed)<br></div>
<div>> Bit Gravity State: NorthWestGravity<br></div>
<div>> Window Gravity State: NorthWestGravity<br></div>
<div>> Backing Store State: NotUseful<br></div>
<div>> Save Under State: no<br></div>
<div>> Map State: IsViewable<br></div>
<div>> Override Redirect State: no<br></div>
<div>> Corners: +662+270 -1744+270 -1744-258 +662-258<br></div>
<div>> -geometry 320x240+661+246<br></div>
<div>><br></div>
<div>> As you can see, the first line displays the same Hex number I get from<br></div>
<div>> Lazarus, and 0x2800048, this is the value mplayer expects.<br></div>
<div>><br></div>
<div>> So, to embed a movie into a window, when you know the window Id, you<br></div>
<div>> just launch mplayer using this options:<br></div>
<div>><br></div>
<div>> mplayer -wid 0x2800048<br></div>
<div>> /home/leonardo/Imágenes/Fotos/2009/11/21/mvi_0260.avi<br></div>
<div>><br></div>
<div>> Please, if any you know how to translate BB5380 to 0x2800048 I'll be<br></div>
<div>> glad to learn.<br></div>
<div>><br></div>
<div>> El 05/03/15 a las 18:51, Philippe Lévi escibió:<br></div>
<div>> > and you know how to tell MPLAYER to show the video in a specific window? (using WINDOWS, and glutCreateWindow).<br></div>
<div>> ><br></div>
<div>> > thanks<br></div>
<div>> > Philippe<br></div>
<div>> ><br></div>
<div>> > ________________________________________<br></div>
<div>> > De: "Leonardo M. Ramé" <l.rame@griensu.com><br></div>
<div>> > Enviado: quinta-feira, 5 de março de 2015 17:44<br></div>
<div>> > Para: lazarus@lists.lazarus.freepascal.org<br></div>
<div>> > Assunto: Re: [Lazarus] Play video from memory<br></div>
<div>> ><br></div>
<div>> > Yes, you can!.<br></div>
<div>> ><br></div>
<div>> > 1) Load your Video to a TStream (TMemoryStream for example).<br></div>
<div>> > 2) Use TProcess to execute "mplayer -", the "-" is the parameter.<br></div>
<div>> > 3) Send your stream to the standard input of the process.<br></div>
<div>> ><br></div>
<div>> ><br></div>
<div>> > El 05/03/15 a las 16:45, aradeonas escibió:<br></div>
<div>> >> Thank you Leonardo,<br></div>
<div>> >><br></div>
<div>> >> I saw it before but it doesn't seem there is a way to pass memory to it<br></div>
<div>> >> or I couldn't find out how.<br></div>
<div>> >> Do you know?<br></div>
<div>> >><br></div>
<div>> >> Regards,<br></div>
<div>> >> Ara<br></div>
<div>> >><br></div>
<div>> >> On Thu, Mar 5, 2015, at 11:40 AM, Leonardo M. Ramé wrote:<br></div>
<div>> >>> It looks like MPlayer can do this:<br></div>
<div>> >>> http://www.mplayerhq.hu/DOCS/HTML/en/streaming.html<br></div>
<div>> >>><br></div>
<div>> >>> El 04/03/15 a las 13:29, aradeonas escibió:<br></div>
<div>> >>>> Hi,<br></div>
<div>> >>>><br></div>
<div>> >>>> Any one know a library or way to buffer video file into memory and then<br></div>
<div>> >>>> pass it to player?<br></div>
<div>> >>>> Any simple player do the job but it should support a way to open file<br></div>
<div>> >>>> from memory.<br></div>
<div>> >>>><br></div>
<div>> >>>> Regards,<br></div>
<div>> >>>> Ara<br></div>
<div>> >>>><br></div>
<div>> >>> --<br></div>
<div>> >>> _______________________________________________<br></div>
<div>> >>> Lazarus mailing list<br></div>
<div>> >>> Lazarus@lists.lazarus.freepascal.org<br></div>
<div>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div>
<div>> ><br></div>
<div>> > --<br></div>
<div>> > _______________________________________________<br></div>
<div>> > Lazarus mailing list<br></div>
<div>> > Lazarus@lists.lazarus.freepascal.org<br></div>
<div>> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div>
<div>> ><br></div>
<div>> > --<br></div>
<div>> > _______________________________________________<br></div>
<div>> > Lazarus mailing list<br></div>
<div>> > Lazarus@lists.lazarus.freepascal.org<br></div>
<div>> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div>
<div>><br></div>
<div>><br></div>
<div>> --<br></div>
<div>> _______________________________________________<br></div>
<div>> Lazarus mailing list<br></div>
<div>> Lazarus@lists.lazarus.freepascal.org<br></div>
<div>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div>
<div> </div>
<pre>-- 
http://www.fastmail.com - Email service worth paying for. Try it for free<br></pre></div>
</div>
</div>
<div>--<br></div>
<div><u>_______________________________________________</u><br></div>
<div>Lazarus mailing list<br></div>
<div><a defang_rel="noreferrer" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br></div>
<div><a defang_rel="noreferrer" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br></div>
</blockquote><div> </div>
<pre>
-- 
http://www.fastmail.com - Send your email first class
</pre>
</body>
</html>