From: Dennis S. <sy...@yo...> - 2005-02-28 21:10:19
|
On Sun, 2005-02-27 at 02:46 +0100, Jon =C3=98yvind Kjellman wrote: > Thanks for the advice, I created a small test program that runs, though= I =20 > have some issues: >=20 > 1. The program displays, but doesn't react to the music using alsa inpu= t. =20 > mplayer plug-in fails with: > > libvisual ERROR: ./example: inp_mplayer_init(): \ > > Could not open file '/home/jon/.mplayer/mplayer-af_export': No such f= ile =20 > > or directory You have to open the alsa capture gain, using alsamixer (this is=20 incredibly lame, I agree). (it works perfectly with alsa here) (your=20 example that is) > I'm unable to test with others. The examples from CVS failed similarly > 1. When a plug-in is 8-bit, is it always palette based or can it be gra= y =20 > scale. How do I determine? It's palette based, period :) You retrieve the palette from a VisActor=20 using VisPalette *visual_actor_get_palette (VisActor *actor). > 2. Take a look at display(), are my assumptions about color representat= ion =20 > good? Does plug-in's use alpha channel? The framework uses alpha channels for overlaying and such, but plugins=20 themself (are right now) not actively using alpha channels. I think the color ordering seems right, tho I am not sure how it would=20 hold on other endianess systems. Tho you draw the frame upside down :) (Just pointing out) > 3. Why doesn't visual_actor_new("foobar") return NULL if "foobar" doesn= 't =20 > exist? It's returns a plugin less VisActor. VisActor is just a facade for the underlaying VisActorPlugin stuff, and it helps you with video=20 negotiation. You can check for a plugin it's existance by doing: int visual_actor_valid_by_name (const char *name) > 4. Looking at the source. Why does the for-loop printing input names wo= rk =20 > (commented out), but the one printing actor names SIGSEGV? for(i =3D visual_actor_get_list()->head; i; i =3D i->next) printf("%s\n", ((VisPluginRef*)i->data)->info->plugname); Use that, just like with the input_get_list, it's a filtered list from the global plugin registry (VisPluginRefs) list. > A last observation. There exists a function visual_video_new_with_buffe= r() =20 > which will create a VisVideo object and allocate a buffer. However I ha= ve =20 > found no way to re-size the VisVideo object which will also re-size the= =20 > buffer. I have to do this with visual_video_allocate_buffer() (btw. the= =20 > docs doesn't mention that this _reallocates_ under certain circumstance= s.) =20 > Personally, IMHO, I find it a bit inconsistent, the object does keep tr= ack =20 > of whether or not it's in charge of buffer resizing and could very well= =20 > perform the re-size within visual_video_set_dimension(). After a resize, you can safely to visual_video_allocate_buffer, this=20 will free, the old one if it was allocated internally, by new_with_buffer for example, and after that reallocate a new buffer. If you manage your own allocated buffer, don't use this function but=20 manage your allocating yourself. > If you're interested, when I get it to work properly I could create a =20 > short tutorial. However it would need to be reviewed as there probably = =20 > would be some mistakes. I am very interested in this, I want to work up our state of docs, I=20 also want to startup a wiki as a source of information and the such. I understand that you're working on some car multimedia project ? do=20 you have urls regarding this, I am very interested about all this! :) > Best, > Jon =C3=98yvind Kjellman Cheers, Dennis |