Page 22 of 30

Re: Record TV over USB

Posted: Wed May 26, 2010 5:44 pm
by sorcerer1
Please help me how to compile loader.c? I compile pvr.c successfully, but for loader.c I get error:

# cc -Wall -c -o loader.o loader.c
/tmp/ccLYFLhR.s: Assembler messages:
/tmp/ccLYFLhR.s:30: Error: immediate expression requires a # prefix -- `mov r0,[fp,#-24]'

UPD: With -O2 its ok! Thanks!

Re: Record TV over USB

Posted: Thu May 27, 2010 7:46 pm
by geo650
I am working on OSD symbols for my geoPVR app (which is based on well-known PVR app of course), but I have troubles with transparent bitmaps. Bitmaps are displayed as opaque although they are prepared as RGBA bitmaps with alpha-channel data. My question to other developers: Does anybody know how to display transparent bitmap using SDL functions called within PVR app? SDL_SetAlpha(item_surface, SDL_SRCALPHA, 100) before SDL_BlitSurface() function doesn't help (it only fades the whole image).
No more "VCR" nor "TV" messages! :lol:

Re: Record TV over USB

Posted: Thu May 27, 2010 9:14 pm
by arris69
geo650 wrote:I am working on OSD symbols for my geoPVR app (which is based on well-known PVR app of course), but I have troubles with transparent bitmaps. Bitmaps are displayed as opaque although they are prepared as RGBA bitmaps with alpha-channel data. My question to other developers: Does anybody know how to display transparent bitmap using SDL functions called within PVR app? SDL_SetAlpha(item_surface, SDL_SRCALPHA, 100) before SDL_BlitSurface() function doesn't help (it only fades the whole image).
No more "VCR" nor "TV" messages! :lol:
do you SDL_BlitSurface(item_surface,0, <some_kind_of_bg_image>,&rect) or SDL_BlitSurface(item_surface,0, <the_screen>,&rect) ?

Re: Record TV over USB

Posted: Thu May 27, 2010 9:21 pm
by moras86
geo650 did you tray simply use PNG image with alpha channel? I check image files inside TV flash memory and most of them are bitmaps, but some of GUI elements using PNG with transparent - example popupbg.png ;)

Re: Record TV over USB

Posted: Fri May 28, 2010 8:30 am
by geo650
arris69 wrote:do you SDL_BlitSurface(item_surface,0, <some_kind_of_bg_image>,&rect) or SDL_BlitSurface(item_surface,0, <the_screen>,&rect) ?
I am using such procedure (here is a simplified code):

Code: Select all

   SDL_Surface *screen = NULL;
   SDL_Surface *item = NULL;

   SDL_Init(SDL_INIT_VIDEO);
   screen = SDL_SetVideoMode(1920/2, 1080/2, 32, 0);
   item = SDL_LoadBMP("/path/to/my/bitmap.bmp");
   SDL_BlitSurface(item, NULL, screen, NULL);
   SDL_Flip(screen);
   ...
moras86 wrote:geo650 did you tray simply use PNG image with alpha channel? I check image files inside TV flash memory and most of them are bitmaps, but some of GUI elements using PNG with transparent - example popupbg.png ;)
I wanted to use transparent PNG images but they are not working with SDL_BlitSurface() function. Probably I should use PNG library to decompress them first. There are some transparent BMP files in the TV (see title image in Content Library, Gallery, Art for example) - but it is also displayed as opaque.

Re: Record TV over USB

Posted: Fri May 28, 2010 10:21 am
by arris69
geo650 wrote:
arris69 wrote:do you SDL_BlitSurface(item_surface,0, <some_kind_of_bg_image>,&rect) or SDL_BlitSurface(item_surface,0, <the_screen>,&rect) ?
I am using such procedure (here is a simplified code):

Code: Select all

   SDL_Surface *screen = NULL;
   SDL_Surface *item = NULL;

   SDL_Init(SDL_INIT_VIDEO);
   screen = SDL_SetVideoMode(1920/2, 1080/2, 32, 0);
   item = SDL_LoadBMP("/path/to/my/bitmap.bmp");
   SDL_BlitSurface(item, NULL, screen, NULL);
   SDL_Flip(screen);
   ...
moras86 wrote:geo650 did you tray simply use PNG image with alpha channel? I check image files inside TV flash memory and most of them are bitmaps, but some of GUI elements using PNG with transparent - example popupbg.png ;)
I wanted to use transparent PNG images but they are not working with SDL_BlitSurface() function. Probably I should use PNG library to decompress them first. There are some transparent BMP files in the TV (see title image in Content Library, Gallery, Art for example) - but it is also displayed as opaque.
i made a quick research in my old sources and saw for some reason i used IMG_Load() and not SDL_LoadBMP()

hth
arris

Re: Record TV over USB

Posted: Fri May 28, 2010 11:03 am
by geo650
black-byte wrote:And can a few words about geoPVR, than it will be radically different from PVR?
Will there be support for Russian (unicode) characters?
GeoPVR is designed especially for my needs. It is intended to be started automatically but I think you can run it from ContentLibrary as well. Today's differences between (older version of) PVR and geoPVR are:

- added destination drive checking before recording
- SOURCE key switches to HDMI1 (next press --> standard function)
- FAV.CH key calls APECT RATIO function (STOP, FAV.CH --> fav.channels)
- EPG data in recording filename (system time if no EPG data)
- different recording file name pattern
- no schedule for recordings (I think it is not much usuable)
- better protection for recording file names (stronger limits)
- mdb file deleting at stop
- alternative directory (press REC button twice)
- protection for some actions during recording (displays warnings)
- disabled or removed debugging code
- source code optimization, renaming of functions/variables/definitions
- graphical OSD symbols [NEW!]
- record function locking by 5xSTOP keypress [NEW!]

I am going to add configuration file to allow disabling of unwanted functions. Then I will release it here.

I can add support for Russian unicode letters, but I have to know how to convert them. I know Russian alphabet but don't know what latin letters should be replaced with. I suppose, there is a kind of standard for this? If you want, please explain this to me (using private message or here or pointing to external URL). Even better, please provide Russian UNICODE-to-ASCII table then I can make changes more quickly.
arris69 wrote:i made a quick research in my old sources and saw for some reason i used IMG_Load() and not SDL_LoadBMP(
I will try to use IMG_Load() then. Thanks. This is my second application using SDL (the first was hello-word app) so I am at the very early stage of learning SDL.

Re: Record TV over USB

Posted: Fri May 28, 2010 11:40 am
by doodlecz
Great job, looking forward to it :)