Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Video files in Allgro?

Credits go to Ariesnl, Arthur Kalliokoski, Derezo, Evert, gnolam, HoHo, Jonny Cook, Kitty Cat, Michael Faerber, Michael Jensen, Randal Stackpoole, ReyBrujo, Thomas Fjellstrom, Tobias Dammers, Victor Williams Stafusa da Silva, and Zaphos for helping out!
This thread is locked; no one can reply to it. rss feed Print
Video files in Allgro?
Michael Jensen
Member #2,870
October 2002
avatar

Quote:

The image I had that I was refering to did seem that it was specifically tailored to be bad for PCX files - it had 63 colours in it, all of them above 192 (which is the magical number).

I guess that's kind of my point -- unless your image converting program is mega crazy that should never happen! :P

Quote:

Anyway, we won't be including all sorts of thirdparty libraries into the Allegro distribution.

Of course not, and you wont be doing what I want either (building that functionality into allegro itself) because that would also be crazy.

Quote:

Dynamicly loading shared libs would absolve the need for them to be required at compile time (and thusly become a run-time thing)

YOU FREAKING GENIUS! NOW GO AND IMPLIMENT IT!

Quote:

but that will only work on platforms that can use shared libs and would lock your program into needing the shared libs without any easy way of staticlinking them.

are there any besides DOS? I vote drop DOS... on the other hand you could always impliment this as an add-on library (sadly it makes half an ounce of sense, in that you'd only ever have to build one library, and just download .so's .lib's .a's or .dll's for something, and you could use it right out of the box.)

It's 1:45 am, isn't it? Can you tell? ;)

edit:

Quote:

You're spoiled by Allegro having so few external dependencies.

Allegro has external dependencies? ???

Actually I'm spoiled by the .NET framework/development environments with it's really tight debugger, and all kinds of autocompletion/intellisense and even autoformatting options! (that work!) 8-)

Evert
Member #794
November 2000
avatar

Quote:

Of course not, and you wont be doing what I want either (building that functionality into allegro itself) because that would also be crazy.

Well, we're not going to reinvent the wheel if that's what you mean.
But it simply becomes unwieldy to have that many external dependencies, not to mention the sheer size of the download. That's not saying someone can't make an Allegro package that contains it all, but we won't be the ones doing it.

Quote:

I vote drop DOS...

We did. Or at least we did unless someone can (and wants to) do the the work required to port the DOS drivers to the new API.

As for adding functionalty at runtime by dynamic loading of shared libraries, it sounds nifty. We need a good way to report to the user what is and isn't available at runtime though, so that he or she can respond appropriately.

Quote:

It's 1:45 am, isn't it?

No, it isn't. It's 11.15 am.

Quote:

Allegro has external dependencies?

Sure it does. On Windows, it's limited to the DirectX development headers and standard Win32 libraries; in *NIX it has loads of optional dependencies: X11 with a load of extensions (this is the main dependency), ALSA, aRts, SVGALib, fbdev, pthreads(actually, this is required)...
You normally don't notice that many of these dependencies are there because they're pretty much installed anyway or, in UNIX, the corresponding driver is simply not build. But the most common problems people run into when compiling Allegro are missing DirectX headers (in Windows) or missing X11 development libraries (in *NIX).

HoHo
Member #4,534
April 2004
avatar

Quote:

are there any besides DOS?

I think original Quake used some magic to get something similar to dynamic linking work in dos.
[edit]
but of course that is not saying that allegro devs should do that too

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

YOU FREAKING GENIUS! NOW GO AND IMPLIMENT IT!

It's not so clear-cut, unfortunately. Theoretically, it would work. But to do so, I'd have to copy out the exposed/used structures and typedefs. This is where undefined exposed structures (or whatever the name is) come in handy, because you'd just have the structure name, and you'd be basically dealing with pointers, while using accessor functions from the lib to get/set the data. The problem with defined exposed structures is if the size or member arrangement ever changes, the ABI instantly breaks and you need to recompile. In this way I hope Allegro's new API will allow run-time dynamic loading, but that's neither here nor there for this topic..

The problem is, and I didn't think about this 'til after the last post, is that libogg, libvorbis, and libtheora aren't designed to be dynamicly loaded like that. They have exposed structures that you directly access. libogg and libvorbis may be used so much that changing the structures would be devestating to a good number of programs that use the shared lib/dll (and thus should be okay to just copy the structures), but I don't believe libtheora is at that point yet.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Michael Jensen
Member #2,870
October 2002
avatar

Quote:

Well, we're not going to reinvent the wheel if that's what you mean.

Right, I pointed out that either end of the stick is either out of allegro's scope, or just plain crazy.

Quote:

We did. Or at least we did unless someone can (and wants to) do the the work required to port the DOS drivers to the new API.

Are you talking allegro 5? Tight.

Quote:

No, it isn't. It's 11.15 am.

Obviously you're not in Seattle right now, are you? And it's 3:11 AM now, so there.

Quote:

Sure it does.

Never thought of it like that...

Quote:

It's not so clear-cut, unfortunately. Theoretically, it would work.

Don't take it personal KC, I was j/k. Altho if the person to write such a library would come up with a standard struct definition protocol, and the dll's to be plugged into this library all supported that struct definition protocol (possibly supplying an emulation/translation layer), and it was FAST.... well then. But also what if santa clause could fly around the world 200 bazillion times a second, and I were able to do well on my japanese test tomorrow.... today... crap time for bed... goodnight.

HoHo
Member #4,534
April 2004
avatar

Quote:

Are you talking allegro 5? Tight.

I think he meant 4.3

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Martano
Member #6,536
October 2005
avatar

Now I am really lost.... :o

What do I need to do to use APEG?
I have the "make.exe" that came with Dev-C++ ( I think ). Should I use a shell to run it? What should I type?

Michael Jensen
Member #2,870
October 2002
avatar

Quote:

I think he meant 4.3

There's an API change in 4.3?

Andrés: Sorry for taking your thread so off-topic, I'm a troll :(! Anyway, does APEG come with a readme.txt or buildme.txt or something?

Martano
Member #6,536
October 2005
avatar

Quote:

Andrés: Sorry for taking your thread so off-topic, I'm a troll ! Anyway, does APEG come with a readme.txt or buildme.txt or something?

No problem. ;D

Yes, it have "apeg.txt".
But it says:

"To build APEG, first run make to compile a CBuild executable.If you have an sh-compatible shell, you can also run the cbuild.csource file directly, instead of creating the executable. You cancheck 'cbuild--help' for a list of available options. Now, runcbuild and let it do its thing."

But how to run "make"?

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

But how to run "make"?

The same way you did when you built Allegro and the Ogg/Vorbis/Theora libs. Open a command shell, switch to the directory APEG is in, and run make. As long as it's in your path , it'll run from there.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Jonny Cook
Member #4,055
November 2003

If you want, you can just download the binaries here. I compiled it a while ago and I had some problems with it too. Hope this helps.

The face of a child can say it all, especially the mouth part of the face.

Tobias Dammers
Member #2,604
August 2002
avatar

No. Someone not capable of running make does not deserve binaries. Kidding... but I do have a point, don't I?

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Randal Stackpoole
Member #4,075
November 2003
avatar

Everyone should be accessible to it. Even Christopher Reeve.

yvan eht nioj

Evert
Member #794
November 2000
avatar

Quote:

There's an API change in 4.3?

4.3 is the `gradually change Allegro 4.2's API into the new Allegro5 API' branch. So yes, there is.

Martano
Member #6,536
October 2005
avatar

I tried to run "make" again, but still got errors.
So I downloaded the binaries. (Huge thanks for them! ;D)

But "apeg.txt" says about an "CBuild executable", where is it?

Michael Jensen
Member #2,870
October 2002
avatar

Since you have the binaries you probably don't need it; it sounds like you run make to get cbuild, and you run cbuild to get the binaries.

Martano
Member #6,536
October 2005
avatar

But I need to include "<apeg.h>", and I have no "apeg.h". :'(

Derezo
Member #1,666
April 2001
avatar

Yes.
"apeg.h" means that apeg.h is in the same directory as the source.
<apeg.h> means that it would be in your compiler's include directory.

Quote:

Everyone should be accessible to it. Even Christopher Reeve.

You do know he's been dead for quite some time, right? :-/

"He who controls the stuffing controls the Universe"

Michael Jensen
Member #2,870
October 2002
avatar

Right, so the binaries would be JUST the part that is compiled. Apeg.h should be included in the source distro, as it wouldn't be modified at all during the build process, you should just manually copy it to your compiler's include directory.

Martano
Member #6,536
October 2005
avatar

Quote:

Yes.
"apeg.h" means that apeg.h is in the same directory as the source.
<apeg.h> means that it would be in your compiler's include directory.

Sorry, I meant: I don't have the apeg.h file. And the apeg.txt says that I will need it to use APEG.

-------------------------------------
EDIT:

Quote:

Right, so the binaries would be JUST the part that is compiled. Apeg.h should be included in the source distro, as it wouldn't be modified at all during the build process, you should just manually copy it to your compiler's include directory.

I'm dumb!, I didn't see that. ;D

Thanks to everyone! I will try it.

Michael Jensen
Member #2,870
October 2002
avatar

Sorry if I wasn't clear, it should be in the source package, somewhere.

Martano
Member #6,536
October 2005
avatar

Quote:

I'm dumb! I didn't see that.

:o

COOL!

I typed: L o l , I didn't see that.

And it shows: I'm dumb! I didn't see that.

:D

_____________________________________________

EDIT:

I copied the apeg.h to the include folder. Changed the linkers to:

libapeg.a
libogg.a
libtheora.a
libvorbisenc.a
libvorbis.a
-lalleg

And I am trying to compile one of the examples (exsimple.c) that comes with APEG. But I am having many of these errors:

[Linker error] undefined reference to `pack_fopen_vtable'

Did I do something wrong about the linkers?

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

[Linker error] undefined reference to `pack_fopen_vtable'

Do you have Allegro 4.2?

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Martano
Member #6,536
October 2005
avatar

No.... I have Version 4.0.3

Kitty Cat
Member #2,815
October 2002
avatar

You need 4.2 (or a late 4.1 WIP, but there's no reason for that).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham



Go to: