Re: Linking with FFmpeg

2013-01-06 Thread MrOrdinaire
On Sunday, 6 January 2013 at 18:39:32 UTC, Johannes Pfau wrote: Am Sun, 06 Jan 2013 09:43:11 -0800 schrieb Ali Çehreli : Ali P.S. To prove the point that that 4 in the signature has no meaning, I tested the C function also with the following C program: With C's arrays are pointers thing,

Re: foreach range construction bug?!!?!?!?

2013-01-06 Thread Era Scarecrow
On Sunday, 6 January 2013 at 23:16:13 UTC, Phil Lavoie wrote: since moving the constructor away seems to work correctly (-version=Working). Mmmm... But no construction happens, empty parameters equals default .init. Perhaps it's a bug related to confusing lvalue/rvalue and it's trying to acc

Re: foreach range construction bug?!!?!?!?

2013-01-06 Thread Phil Lavoie
I am currently working on Windows. The opengl32.lib is an import library created using implib /noi /system opengl32.lib C:\Windows\System32\opengl32.dll This all links correctly, otherwise I would get en error during compile + link. I run the command rdmd --force thismodule.d. The library is lo

LZW & Huffman - BitArray implimentations & examples

2013-01-06 Thread Era Scarecrow
On Sunday, 6 January 2013 at 21:14:08 UTC, Dmitry Olshansky wrote: 07-Jan-2013 00:51, Era Scarecrow wrote: Nearly done. Got a working LZW, multi-level huffman working, only cleanup/refactoring to do, and a way to save/load the tree structure for external storage. Do I assume you would want

Re: Why is immutable not possible as a result of a reduce expression?

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 21:59:32 Andrej Mitrovic wrote: > On 1/6/13, Jonathan M Davis wrote: > > If you or someone else > > It's going to have to be someone else. When someone asks something on > IRC/NG and another person responds with "it's because it's not a type > constructor", or "it's no

Re: BitArray/BitFields - Resumed and polishing

2013-01-06 Thread Dmitry Olshansky
07-Jan-2013 00:51, Era Scarecrow пишет: On Thursday, 3 January 2013 at 21:45:24 UTC, Era Scarecrow wrote: K, I'll likely re-work my multi-level huffman algorithmn and a LZW compression, although the LZW wouldn't make use of the more exotic features. Got half the LZW written, but I likely won't g

Re: Why is immutable not possible as a result of a reduce expression?

2013-01-06 Thread Andrej Mitrovic
On 1/6/13, Jonathan M Davis wrote: > If you or someone else It's going to have to be someone else. When someone asks something on IRC/NG and another person responds with "it's because it's not a type constructor", or "it's not a storage class" I get completely thrown off and don't understand what

Re: BitArray/BitFields - Resumed and polishing

2013-01-06 Thread Era Scarecrow
On Thursday, 3 January 2013 at 21:45:24 UTC, Era Scarecrow wrote: K, I'll likely re-work my multi-level huffman algorithmn and a LZW compression, although the LZW wouldn't make use of the more exotic features. Got half the LZW written, but I likely won't get this done for a few days. Nearly

Re: foreach range construction bug?!!?!?!?

2013-01-06 Thread Era Scarecrow
On Sunday, 6 January 2013 at 18:59:36 UTC, Phil Lavoie wrote: Hi all, I am very close to posting a bug report, however I would like some insights first. See the code below: version( Working ) { //Works with both. auto errors = GLErrors(); foreach( GLenum err; errors ) { wri

Re: Why is immutable not possible as a result of a reduce expression?

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 05:33:04 Andrej Mitrovic wrote: > On 1/6/13, Jonathan M Davis wrote: > > In D, the term storage class is used for pretty much any attribute on a > > variable which is not a type constructor > > This topic pops up in the newsgroups every once in a while[1]. Maybe > we s

Re: foreach range construction bug?!!?!?!?

2013-01-06 Thread Phil Lavoie
Oh, BTW, I am aware that GL_EXTENSIONS (whose value is missing but it's actually this: 0x1F03) is not a valid enum for the request, I am EXPECTING an error from opengl.

foreach range construction bug?!!?!?!?

2013-01-06 Thread Phil Lavoie
Hi all, I am very close to posting a bug report, however I would like some insights first. See the code below: module newstructerror; alias int GLint; alias uint GLenum; enum { GL_EXTENSIONS } /* Errors */ enum { GL_NO_ERROR = 0x0, GL_INVALID_VALUE

Re: Linking with FFmpeg

2013-01-06 Thread Johannes Pfau
Am Sun, 06 Jan 2013 09:43:11 -0800 schrieb Ali Çehreli : > > Ali > > P.S. To prove the point that that 4 in the signature has no meaning, > I tested the C function also with the following C program: With C's arrays are pointers thing, that might be true. But the signature (and ffmpeg) documenta

Re: Auto-Implemented properties

2013-01-06 Thread michaelc37
On Sunday, 6 January 2013 at 11:32:40 UTC, Jacob Carlborg wrote: On 2013-01-05 23:40, michaelc37 wrote: i was trying to make a D template to mimic auto-implemented properties in c#. I think i got it to work but when i tried to give the template a more meaning full name like AutoImplementedPro

Error 168 >64K Global Types

2013-01-06 Thread nrgyzer
Hi guys, after some hours I successfully compiled wxD without errors. When I try to compile a simple example like the hello example I get the following message: dmd -c -version=wx28 -version=__WXMSW__ -version=ANSI -I..\.. Hello.d dmd -g -of..\..\bin\Hello.exe Hello.obj ..\..\wxd.lib ..\.

Re: Linking with FFmpeg

2013-01-06 Thread Ali Çehreli
On 01/06/2013 01:48 AM, MrOrdinaire wrote: > My question is how this function declaration is written in D. > int av_image_alloc(uint8_t *pointers[4], int linesizes[4], > int w, int h, enum AVPixelFormat pix_fmt, int align); 1) No array is passed to a function as-is in C. Even though there seem

Re: Linking with FFmpeg

2013-01-06 Thread bearophile
Johannes Pfau: also says C int is the same as D int. How is this possible? Bye, bearophile

Re: Linking with FFmpeg

2013-01-06 Thread MrOrdinaire
On Sunday, 6 January 2013 at 11:54:34 UTC, bearophile wrote: MrOrdinaire: For the symbol "*", do you mean I should write something like this? uint8_t[4]* ptrs In D "ubyte" is probably enough, instead of "uint8_t". Bye, bearophile Thanks for noting that. I know that in std.stdint, uint8_t

Re: Linking with FFmpeg

2013-01-06 Thread MrOrdinaire
On Sunday, 6 January 2013 at 12:46:05 UTC, Johannes Pfau wrote: Am Sun, 06 Jan 2013 10:48:25 +0100 schrieb "MrOrdinaire" : Hi, I am working on D bindings for FFmpeg. I am trying to port the official examples of FFmpeg to D so that the bindings can be tested. My question is how this functio

Re: Linking with FFmpeg

2013-01-06 Thread H. S. Teoh
On Sun, Jan 06, 2013 at 10:48:25AM +0100, MrOrdinaire wrote: > Hi, > > I am working on D bindings for FFmpeg. I am trying to port the > official examples of FFmpeg to D so that the bindings can be tested. > > My question is how this function declaration is written in D. > int av_image_alloc(uint8

Re: is(...) with alias this

2013-01-06 Thread Zhenya
On Saturday, 5 January 2013 at 22:17:08 UTC, monarch_dodra wrote: On Saturday, 5 January 2013 at 22:09:45 UTC, Philippe Sigaud wrote: I think the alias this transformation is done 'before' any usual conversion. I guess it's a real replacement inside the code (I'm not sure how to explain my fee

Re: Linking with FFmpeg

2013-01-06 Thread Johannes Pfau
Am Sun, 06 Jan 2013 10:48:25 +0100 schrieb "MrOrdinaire" : > Hi, > > I am working on D bindings for FFmpeg. I am trying to port the > official examples of FFmpeg to D so that the bindings can be > tested. > > My question is how this function declaration is written in D. > int av_image_alloc(ui

Re: Linking with FFmpeg

2013-01-06 Thread Johannes Pfau
Am Sun, 06 Jan 2013 12:51:33 +0100 schrieb "bearophile" : > MrOrdinaire: > > > I cannot find "cint_t" nor "cint" in the d standard modules > > (mine are at /usr/include/d/). > > I don't remember the correct name. > Are you sure about c_int? I never heard of that before, I only know c_long and

Re: Return types are not matched with method return type.

2013-01-06 Thread RollingCat
Thank you very much. Your answer helped me to solve the problem. Regards

Re: Linking with FFmpeg

2013-01-06 Thread bearophile
MrOrdinaire: For the symbol "*", do you mean I should write something like this? uint8_t[4]* ptrs In D "ubyte" is probably enough, instead of "uint8_t". Bye, bearophile

Re: Linking with FFmpeg

2013-01-06 Thread bearophile
MrOrdinaire: I cannot find "cint_t" nor "cint" in the d standard modules (mine are at /usr/include/d/). I don't remember the correct name. For the symbol "*", do you mean I should write something like this? uint8_t[4]* ptrs Right. It's a D coding style convention that has a practical ba

Re: Auto-Implemented properties

2013-01-06 Thread Jacob Carlborg
On 2013-01-05 23:40, michaelc37 wrote: i was trying to make a D template to mimic auto-implemented properties in c#. I think i got it to work but when i tried to give the template a more meaning full name like AutoImplementedProperty i get a compile error "a.title is not an lvalue". Is this a bu

Re: Customizing ddoc from cmd-line

2013-01-06 Thread Peter Sommerfeld
06.01.2013 Ali Çehreli wrote>: On 01/05/2013 11:23 AM, Peter Sommerfeld wrote: > > I seem to be unable to customize DDoc from the > command line. > > Suppose the sources are in "src", docs in "doc". > Here is my command line (Win7 if that matters): > > dmd -D -Dddoc doc/my.ddoc src/main.

Re: Linking with FFmpeg

2013-01-06 Thread MrOrdinaire
On Sunday, 6 January 2013 at 10:21:56 UTC, bearophile wrote: MrOrdinaire: My question is how this function declaration is written in D. int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align); My best guess is the foll

Re: Linking with FFmpeg

2013-01-06 Thread bearophile
MrOrdinaire: My question is how this function declaration is written in D. int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align); My best guess is the following. extern(C) int av_image_alloc(ref uint8_t[4] *pointers,

Linking with FFmpeg

2013-01-06 Thread MrOrdinaire
Hi, I am working on D bindings for FFmpeg. I am trying to port the official examples of FFmpeg to D so that the bindings can be tested. My question is how this function declaration is written in D. int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enu